From ffc2fb3d7116fabaa8760e9997fce84082aba8c8 Mon Sep 17 00:00:00 2001 From: Konstantinos Triantafyllou Date: Fri, 10 Jul 2020 12:57:53 +0000 Subject: [PATCH] [Monitor Dashboard | Trunk]: Remove unused js and css file of theme. Fix dropdown when animation exists. Remove tooltip custom css. Add missing properties git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@59069 d315682c-612b-4755-9ff5-7f18f6832af3 --- src/app/app.module.ts | 4 +- src/assets/search.scss | 10 +- src/assets/theme-assets/css/login_page.css | 6082 ---- .../theme-assets/css/login_page.css.map | 1 - .../theme-assets/css/login_page.min.css | 1 - src/assets/theme-assets/css/main.css | 169 - .../theme-assets/js/altair_admin_common.js | 2 +- .../theme-assets/js/custom/ckeditor_config.js | 45 - .../js/custom/ckeditor_config.min.js | 1 - .../js/custom/codemirror_fullscreen.js | 48 - .../js/custom/codemirror_fullscreen.min.js | 1 - .../js/custom/datatables/buttons.uikit.js | 68 - .../js/custom/datatables/datatables.uikit.js | 198 - .../custom/datatables/datatables.uikit.min.js | 1 - src/assets/theme-assets/js/custom/dense.js | 399 - .../theme-assets/js/custom/dense.min.js | 1 - .../js/custom/echarts/maps/china.js | 27 - .../js/custom/echarts/maps/world.js | 27 - .../theme-assets/js/custom/enjoyhint.js | 1580 - .../theme-assets/js/custom/enjoyhint.min.js | 1 - .../theme-assets/js/custom/gantt_chart.js | 594 - .../theme-assets/js/custom/gantt_chart.min.js | 1 - .../js/custom/handlebars_helpers.js | 50 - .../js/custom/handlebars_helpers.min.js | 1 - .../theme-assets/js/custom/instafilta.min.js | 9 - .../js/custom/jquery.waitforimages.js | 229 - .../js/custom/jquery.waitforimages.min.js | 1 - .../js/custom/slickQuiz/slickQuiz.js | 744 - .../js/custom/slickQuiz/slickQuiz.min.js | 35 - .../js/custom/uikit_beforeready.js | 119 - .../js/custom/uikit_beforeready.min.js | 1 - .../js/custom/uikit_datepicker.js | 373 - .../js/custom/uikit_datepicker.min.js | 1 - .../theme-assets/js/custom/uikit_fileinput.js | 204 - .../js/custom/uikit_fileinput.min.js | 1 - .../theme-assets/js/custom/uikit_sortable.js | 683 - .../js/custom/uikit_sortable.min.js | 1 - .../js/custom/uikit_timepicker.js | 192 - .../js/custom/uikit_timepicker.min.js | 1 - .../theme-assets/js/custom/wizard_steps.js | 2056 -- .../js/custom/wizard_steps.min.js | 1 - .../js/custom/xeditable/jquery.poshytip.js | 484 - .../custom/xeditable/jquery.poshytip.min.js | 1 - .../custom/xeditable/select2/CONTRIBUTING.md | 107 - .../js/custom/xeditable/select2/LICENSE | 18 - .../js/custom/xeditable/select2/README.md | 115 - .../js/custom/xeditable/select2/bower.json | 8 - .../custom/xeditable/select2/component.json | 66 - .../js/custom/xeditable/select2/composer.json | 29 - .../js/custom/xeditable/select2/package.json | 20 - .../js/custom/xeditable/select2/release.sh | 79 - .../xeditable/select2/select2-bootstrap.css | 87 - .../xeditable/select2/select2-spinner.gif | Bin 1849 -> 0 bytes .../js/custom/xeditable/select2/select2.css | 692 - .../xeditable/select2/select2.jquery.json | 36 - .../js/custom/xeditable/select2/select2.js | 3729 -- .../custom/xeditable/select2/select2.min.js | 23 - .../js/custom/xeditable/select2/select2.png | Bin 613 -> 0 bytes .../xeditable/select2/select2_locale_ar.js | 19 - .../xeditable/select2/select2_locale_az.js | 20 - .../xeditable/select2/select2_locale_bg.js | 20 - .../xeditable/select2/select2_locale_ca.js | 19 - .../xeditable/select2/select2_locale_cs.js | 51 - .../xeditable/select2/select2_locale_da.js | 19 - .../xeditable/select2/select2_locale_de.js | 18 - .../xeditable/select2/select2_locale_el.js | 19 - .../select2/select2_locale_en.js.template | 20 - .../xeditable/select2/select2_locale_es.js | 19 - .../xeditable/select2/select2_locale_et.js | 19 - .../xeditable/select2/select2_locale_eu.js | 45 - .../xeditable/select2/select2_locale_fa.js | 21 - .../xeditable/select2/select2_locale_fi.js | 30 - .../xeditable/select2/select2_locale_fr.js | 18 - .../xeditable/select2/select2_locale_gl.js | 45 - .../xeditable/select2/select2_locale_he.js | 19 - .../xeditable/select2/select2_locale_hr.js | 24 - .../xeditable/select2/select2_locale_hu.js | 17 - .../xeditable/select2/select2_locale_id.js | 21 - .../xeditable/select2/select2_locale_is.js | 17 - .../xeditable/select2/select2_locale_it.js | 17 - .../xeditable/select2/select2_locale_ja.js | 17 - .../xeditable/select2/select2_locale_ka.js | 19 - .../xeditable/select2/select2_locale_ko.js | 19 - .../xeditable/select2/select2_locale_lt.js | 26 - .../xeditable/select2/select2_locale_lv.js | 19 - .../xeditable/select2/select2_locale_mk.js | 19 - .../xeditable/select2/select2_locale_ms.js | 21 - .../xeditable/select2/select2_locale_nb.js | 22 - .../xeditable/select2/select2_locale_nl.js | 17 - .../xeditable/select2/select2_locale_pl.js | 54 - .../xeditable/select2/select2_locale_pt-BR.js | 18 - .../xeditable/select2/select2_locale_pt-PT.js | 17 - .../xeditable/select2/select2_locale_ro.js | 17 - .../xeditable/select2/select2_locale_rs.js | 19 - .../xeditable/select2/select2_locale_ru.js | 23 - .../xeditable/select2/select2_locale_sk.js | 50 - .../xeditable/select2/select2_locale_sv.js | 19 - .../xeditable/select2/select2_locale_th.js | 19 - .../xeditable/select2/select2_locale_tr.js | 20 - .../xeditable/select2/select2_locale_ug-CN.js | 16 - .../xeditable/select2/select2_locale_uk.js | 25 - .../xeditable/select2/select2_locale_vi.js | 20 - .../xeditable/select2/select2_locale_zh-CN.js | 16 - .../xeditable/select2/select2_locale_zh-TW.js | 16 - .../js/custom/xeditable/select2/select2x2.png | Bin 845 -> 0 bytes src/assets/theme-assets/js/kendoui_custom.js | 30218 ---------------- .../theme-assets/js/kendoui_custom.min.js | 1 - .../js/pages/components_animations.js | 7 - .../js/pages/components_animations.min.js | 1 - .../theme-assets/js/pages/components_cards.js | 10 - .../js/pages/components_cards.min.js | 1 - .../js/pages/components_list_grid_view.js | 30 - .../js/pages/components_list_grid_view.min.js | 1 - .../js/pages/components_nestable.js | 72 - .../js/pages/components_nestable.min.js | 1 - .../js/pages/components_notifications.js | 64 - .../js/pages/components_notifications.min.js | 1 - .../js/pages/components_preloaders.js | 21 - .../js/pages/components_preloaders.min.js | 1 - .../js/pages/components_sortable.js | 27 - .../js/pages/components_sortable.min.js | 1 - src/assets/theme-assets/js/pages/dashboard.js | 545 - .../theme-assets/js/pages/dashboard.min.js | 1 - .../js/pages/ecommerce_payment_page.js | 7 - .../js/pages/ecommerce_payment_page.min.js | 1 - .../js/pages/ecommerce_product_edit.js | 122 - .../js/pages/ecommerce_product_edit.min.js | 1 - .../theme-assets/js/pages/forms_advanced.js | 321 - .../js/pages/forms_advanced.min.js | 1 - .../theme-assets/js/pages/forms_file_input.js | 22 - .../js/pages/forms_file_input.min.js | 1 - .../js/pages/forms_file_upload.js | 40 - .../js/pages/forms_file_upload.min.js | 1 - .../theme-assets/js/pages/forms_validation.js | 38 - .../js/pages/forms_validation.min.js | 1 - .../theme-assets/js/pages/forms_wizard.js | 127 - .../theme-assets/js/pages/forms_wizard.min.js | 1 - .../theme-assets/js/pages/forms_wysiwyg.js | 79 - .../js/pages/forms_wysiwyg.min.js | 1 - src/assets/theme-assets/js/pages/kendoui.js | 545 - .../theme-assets/js/pages/kendoui.min.js | 1 - src/assets/theme-assets/js/pages/login.js | 75 - src/assets/theme-assets/js/pages/login.min.js | 1 - src/assets/theme-assets/js/pages/page_chat.js | 40 - .../theme-assets/js/pages/page_chat.min.js | 1 - .../theme-assets/js/pages/page_chat_small.js | 177 - .../js/pages/page_chat_small.min.js | 1 - .../js/pages/page_contact_list.js | 70 - .../js/pages/page_contact_list.min.js | 1 - .../js/pages/page_contact_list_v2.js | 21 - .../js/pages/page_contact_list_v2.min.js | 1 - .../theme-assets/js/pages/page_gallery.js | 67 - .../theme-assets/js/pages/page_gallery.min.js | 1 - src/assets/theme-assets/js/pages/page_help.js | 48 - .../theme-assets/js/pages/page_help.min.js | 1 - .../theme-assets/js/pages/page_invoices.js | 264 - .../js/pages/page_invoices.min.js | 1 - .../theme-assets/js/pages/page_mailbox.js | 260 - .../theme-assets/js/pages/page_mailbox.min.js | 1 - .../theme-assets/js/pages/page_mailbox_v2.js | 82 - .../js/pages/page_mailbox_v2.min.js | 1 - .../theme-assets/js/pages/page_notes.js | 60 - .../theme-assets/js/pages/page_notes.min.js | 1 - src/assets/theme-assets/js/pages/page_quiz.js | 75 - .../theme-assets/js/pages/page_quiz.min.js | 1 - .../theme-assets/js/pages/page_scrum_board.js | 34 - .../js/pages/page_scrum_board.min.js | 1 - .../theme-assets/js/pages/page_search.js | 139 - .../theme-assets/js/pages/page_search.min.js | 1 - .../theme-assets/js/pages/page_settings.js | 77 - .../js/pages/page_settings.min.js | 1 - .../theme-assets/js/pages/page_snippets.js | 86 - .../js/pages/page_snippets.min.js | 1 - .../js/pages/page_sticky_notes.js | 374 - .../js/pages/page_sticky_notes.min.js | 1 - src/assets/theme-assets/js/pages/page_todo.js | 18 - .../theme-assets/js/pages/page_todo.min.js | 1 - .../theme-assets/js/pages/page_user_edit.js | 153 - .../js/pages/page_user_edit.min.js | 1 - .../theme-assets/js/pages/pages_issues.js | 125 - .../theme-assets/js/pages/pages_issues.min.js | 1 - .../theme-assets/js/pages/plugins_charts.js | 615 - .../js/pages/plugins_charts.min.js | 1 - .../js/pages/plugins_charts_echarts.js | 796 - .../js/pages/plugins_charts_echarts.min.js | 1 - .../js/pages/plugins_code_editor.js | 149 - .../js/pages/plugins_code_editor.min.js | 1 - .../js/pages/plugins_context_menu.js | 156 - .../js/pages/plugins_context_menu.min.js | 1 - .../js/pages/plugins_crud_table.js | 175 - .../js/pages/plugins_crud_table.min.js | 1 - .../js/pages/plugins_datatables.js | 115 - .../js/pages/plugins_datatables.min.js | 1 - .../theme-assets/js/pages/plugins_diff.js | 50 - .../theme-assets/js/pages/plugins_diff.min.js | 1 - .../theme-assets/js/pages/plugins_dropzone.js | 11 - .../js/pages/plugins_dropzone.min.js | 1 - .../js/pages/plugins_filemanager.js | 33 - .../js/pages/plugins_filemanager.min.js | 1 - .../js/pages/plugins_fullcalendar.js | 327 - .../js/pages/plugins_fullcalendar.min.js | 1 - .../js/pages/plugins_gantt_chart.js | 34 - .../js/pages/plugins_gantt_chart.min.js | 1 - .../js/pages/plugins_google_maps.js | 235 - .../js/pages/plugins_google_maps.min.js | 1 - .../js/pages/plugins_idle_timeout.js | 77 - .../js/pages/plugins_idle_timeout.min.js | 1 - .../js/pages/plugins_image_cropper.js | 205 - .../js/pages/plugins_image_cropper.min.js | 1 - .../js/pages/plugins_push_notifications.js | 22 - .../pages/plugins_push_notifications.min.js | 1 - .../js/pages/plugins_tablesorter.js | 379 - .../js/pages/plugins_tablesorter.min.js | 1 - .../theme-assets/js/pages/plugins_tour.js | 78 - .../theme-assets/js/pages/plugins_tour.min.js | 1 - .../theme-assets/js/pages/plugins_tree.js | 131 - .../theme-assets/js/pages/plugins_tree.min.js | 1 - .../js/pages/plugins_vector_maps.js | 360 - .../js/pages/plugins_vector_maps.min.js | 1 - .../js/pages/plugins_xeditable.js | 407 - .../js/pages/plugins_xeditable.min.js | 1 - src/assets/theme-assets/js/uikit_custom.js | 9744 ----- .../theme-assets/js/uikit_custom.min.js | 1 - .../js/uikit_htmleditor_custom.js | 14776 -------- .../js/uikit_htmleditor_custom.min.js | 1 - src/environments/environment.beta.ts | 10 +- src/environments/environment.prod.ts | 10 +- src/environments/environment.ts | 30 +- 228 files changed, 35 insertions(+), 83992 deletions(-) delete mode 100755 src/assets/theme-assets/css/login_page.css delete mode 100755 src/assets/theme-assets/css/login_page.css.map delete mode 100755 src/assets/theme-assets/css/login_page.min.css delete mode 100755 src/assets/theme-assets/js/custom/ckeditor_config.js delete mode 100755 src/assets/theme-assets/js/custom/ckeditor_config.min.js delete mode 100755 src/assets/theme-assets/js/custom/codemirror_fullscreen.js delete mode 100755 src/assets/theme-assets/js/custom/codemirror_fullscreen.min.js delete mode 100755 src/assets/theme-assets/js/custom/datatables/buttons.uikit.js delete mode 100755 src/assets/theme-assets/js/custom/datatables/datatables.uikit.js delete mode 100755 src/assets/theme-assets/js/custom/datatables/datatables.uikit.min.js delete mode 100755 src/assets/theme-assets/js/custom/dense.js delete mode 100755 src/assets/theme-assets/js/custom/dense.min.js delete mode 100755 src/assets/theme-assets/js/custom/echarts/maps/china.js delete mode 100755 src/assets/theme-assets/js/custom/echarts/maps/world.js delete mode 100755 src/assets/theme-assets/js/custom/enjoyhint.js delete mode 100755 src/assets/theme-assets/js/custom/enjoyhint.min.js delete mode 100755 src/assets/theme-assets/js/custom/gantt_chart.js delete mode 100755 src/assets/theme-assets/js/custom/gantt_chart.min.js delete mode 100755 src/assets/theme-assets/js/custom/handlebars_helpers.js delete mode 100755 src/assets/theme-assets/js/custom/handlebars_helpers.min.js delete mode 100755 src/assets/theme-assets/js/custom/instafilta.min.js delete mode 100755 src/assets/theme-assets/js/custom/jquery.waitforimages.js delete mode 100755 src/assets/theme-assets/js/custom/jquery.waitforimages.min.js delete mode 100755 src/assets/theme-assets/js/custom/slickQuiz/slickQuiz.js delete mode 100755 src/assets/theme-assets/js/custom/slickQuiz/slickQuiz.min.js delete mode 100755 src/assets/theme-assets/js/custom/uikit_beforeready.js delete mode 100755 src/assets/theme-assets/js/custom/uikit_beforeready.min.js delete mode 100755 src/assets/theme-assets/js/custom/uikit_datepicker.js delete mode 100755 src/assets/theme-assets/js/custom/uikit_datepicker.min.js delete mode 100755 src/assets/theme-assets/js/custom/uikit_fileinput.js delete mode 100755 src/assets/theme-assets/js/custom/uikit_fileinput.min.js delete mode 100755 src/assets/theme-assets/js/custom/uikit_sortable.js delete mode 100755 src/assets/theme-assets/js/custom/uikit_sortable.min.js delete mode 100755 src/assets/theme-assets/js/custom/uikit_timepicker.js delete mode 100755 src/assets/theme-assets/js/custom/uikit_timepicker.min.js delete mode 100755 src/assets/theme-assets/js/custom/wizard_steps.js delete mode 100755 src/assets/theme-assets/js/custom/wizard_steps.min.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/jquery.poshytip.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/jquery.poshytip.min.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/CONTRIBUTING.md delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/LICENSE delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/README.md delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/bower.json delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/component.json delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/composer.json delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/package.json delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/release.sh delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2-bootstrap.css delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2-spinner.gif delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2.css delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2.jquery.json delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2.min.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2.png delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_ar.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_az.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_bg.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_ca.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_cs.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_da.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_de.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_el.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_en.js.template delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_es.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_et.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_eu.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_fa.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_fi.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_fr.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_gl.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_he.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_hr.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_hu.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_id.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_is.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_it.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_ja.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_ka.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_ko.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_lt.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_lv.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_mk.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_ms.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_nb.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_nl.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_pl.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_pt-BR.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_pt-PT.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_ro.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_rs.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_ru.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_sk.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_sv.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_th.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_tr.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_ug-CN.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_uk.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_vi.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_zh-CN.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2_locale_zh-TW.js delete mode 100755 src/assets/theme-assets/js/custom/xeditable/select2/select2x2.png delete mode 100644 src/assets/theme-assets/js/kendoui_custom.js delete mode 100644 src/assets/theme-assets/js/kendoui_custom.min.js delete mode 100755 src/assets/theme-assets/js/pages/components_animations.js delete mode 100755 src/assets/theme-assets/js/pages/components_animations.min.js delete mode 100755 src/assets/theme-assets/js/pages/components_cards.js delete mode 100755 src/assets/theme-assets/js/pages/components_cards.min.js delete mode 100755 src/assets/theme-assets/js/pages/components_list_grid_view.js delete mode 100755 src/assets/theme-assets/js/pages/components_list_grid_view.min.js delete mode 100755 src/assets/theme-assets/js/pages/components_nestable.js delete mode 100755 src/assets/theme-assets/js/pages/components_nestable.min.js delete mode 100755 src/assets/theme-assets/js/pages/components_notifications.js delete mode 100755 src/assets/theme-assets/js/pages/components_notifications.min.js delete mode 100755 src/assets/theme-assets/js/pages/components_preloaders.js delete mode 100755 src/assets/theme-assets/js/pages/components_preloaders.min.js delete mode 100755 src/assets/theme-assets/js/pages/components_sortable.js delete mode 100755 src/assets/theme-assets/js/pages/components_sortable.min.js delete mode 100755 src/assets/theme-assets/js/pages/dashboard.js delete mode 100755 src/assets/theme-assets/js/pages/dashboard.min.js delete mode 100755 src/assets/theme-assets/js/pages/ecommerce_payment_page.js delete mode 100755 src/assets/theme-assets/js/pages/ecommerce_payment_page.min.js delete mode 100755 src/assets/theme-assets/js/pages/ecommerce_product_edit.js delete mode 100755 src/assets/theme-assets/js/pages/ecommerce_product_edit.min.js delete mode 100755 src/assets/theme-assets/js/pages/forms_advanced.js delete mode 100755 src/assets/theme-assets/js/pages/forms_advanced.min.js delete mode 100755 src/assets/theme-assets/js/pages/forms_file_input.js delete mode 100755 src/assets/theme-assets/js/pages/forms_file_input.min.js delete mode 100755 src/assets/theme-assets/js/pages/forms_file_upload.js delete mode 100755 src/assets/theme-assets/js/pages/forms_file_upload.min.js delete mode 100755 src/assets/theme-assets/js/pages/forms_validation.js delete mode 100755 src/assets/theme-assets/js/pages/forms_validation.min.js delete mode 100755 src/assets/theme-assets/js/pages/forms_wizard.js delete mode 100755 src/assets/theme-assets/js/pages/forms_wizard.min.js delete mode 100755 src/assets/theme-assets/js/pages/forms_wysiwyg.js delete mode 100755 src/assets/theme-assets/js/pages/forms_wysiwyg.min.js delete mode 100755 src/assets/theme-assets/js/pages/kendoui.js delete mode 100755 src/assets/theme-assets/js/pages/kendoui.min.js delete mode 100755 src/assets/theme-assets/js/pages/login.js delete mode 100755 src/assets/theme-assets/js/pages/login.min.js delete mode 100755 src/assets/theme-assets/js/pages/page_chat.js delete mode 100755 src/assets/theme-assets/js/pages/page_chat.min.js delete mode 100755 src/assets/theme-assets/js/pages/page_chat_small.js delete mode 100755 src/assets/theme-assets/js/pages/page_chat_small.min.js delete mode 100755 src/assets/theme-assets/js/pages/page_contact_list.js delete mode 100755 src/assets/theme-assets/js/pages/page_contact_list.min.js delete mode 100755 src/assets/theme-assets/js/pages/page_contact_list_v2.js delete mode 100755 src/assets/theme-assets/js/pages/page_contact_list_v2.min.js delete mode 100755 src/assets/theme-assets/js/pages/page_gallery.js delete mode 100755 src/assets/theme-assets/js/pages/page_gallery.min.js delete mode 100755 src/assets/theme-assets/js/pages/page_help.js delete mode 100755 src/assets/theme-assets/js/pages/page_help.min.js delete mode 100755 src/assets/theme-assets/js/pages/page_invoices.js delete mode 100755 src/assets/theme-assets/js/pages/page_invoices.min.js delete mode 100755 src/assets/theme-assets/js/pages/page_mailbox.js delete mode 100755 src/assets/theme-assets/js/pages/page_mailbox.min.js delete mode 100755 src/assets/theme-assets/js/pages/page_mailbox_v2.js delete mode 100755 src/assets/theme-assets/js/pages/page_mailbox_v2.min.js delete mode 100755 src/assets/theme-assets/js/pages/page_notes.js delete mode 100755 src/assets/theme-assets/js/pages/page_notes.min.js delete mode 100755 src/assets/theme-assets/js/pages/page_quiz.js delete mode 100755 src/assets/theme-assets/js/pages/page_quiz.min.js delete mode 100755 src/assets/theme-assets/js/pages/page_scrum_board.js delete mode 100755 src/assets/theme-assets/js/pages/page_scrum_board.min.js delete mode 100755 src/assets/theme-assets/js/pages/page_search.js delete mode 100755 src/assets/theme-assets/js/pages/page_search.min.js delete mode 100755 src/assets/theme-assets/js/pages/page_settings.js delete mode 100755 src/assets/theme-assets/js/pages/page_settings.min.js delete mode 100755 src/assets/theme-assets/js/pages/page_snippets.js delete mode 100755 src/assets/theme-assets/js/pages/page_snippets.min.js delete mode 100755 src/assets/theme-assets/js/pages/page_sticky_notes.js delete mode 100755 src/assets/theme-assets/js/pages/page_sticky_notes.min.js delete mode 100755 src/assets/theme-assets/js/pages/page_todo.js delete mode 100755 src/assets/theme-assets/js/pages/page_todo.min.js delete mode 100755 src/assets/theme-assets/js/pages/page_user_edit.js delete mode 100755 src/assets/theme-assets/js/pages/page_user_edit.min.js delete mode 100755 src/assets/theme-assets/js/pages/pages_issues.js delete mode 100755 src/assets/theme-assets/js/pages/pages_issues.min.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_charts.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_charts.min.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_charts_echarts.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_charts_echarts.min.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_code_editor.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_code_editor.min.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_context_menu.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_context_menu.min.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_crud_table.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_crud_table.min.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_datatables.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_datatables.min.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_diff.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_diff.min.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_dropzone.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_dropzone.min.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_filemanager.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_filemanager.min.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_fullcalendar.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_fullcalendar.min.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_gantt_chart.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_gantt_chart.min.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_google_maps.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_google_maps.min.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_idle_timeout.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_idle_timeout.min.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_image_cropper.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_image_cropper.min.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_push_notifications.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_push_notifications.min.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_tablesorter.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_tablesorter.min.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_tour.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_tour.min.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_tree.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_tree.min.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_vector_maps.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_vector_maps.min.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_xeditable.js delete mode 100755 src/assets/theme-assets/js/pages/plugins_xeditable.min.js delete mode 100755 src/assets/theme-assets/js/uikit_custom.js delete mode 100755 src/assets/theme-assets/js/uikit_custom.min.js delete mode 100644 src/assets/theme-assets/js/uikit_htmleditor_custom.js delete mode 100644 src/assets/theme-assets/js/uikit_htmleditor_custom.min.js diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 88ffb94..919a10a 100755 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -3,7 +3,7 @@ import {FormsModule} from '@angular/forms'; import {CommonModule} from '@angular/common'; import {HttpClientModule} from "@angular/common/http"; import {BrowserModule} from '@angular/platform-browser'; -import {NoopAnimationsModule} from '@angular/platform-browser/animations'; +import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; import {AppComponent} from './app.component'; import {OpenaireErrorPageComponent} from './error/errorPage.component'; @@ -23,7 +23,7 @@ import {SharedModule} from "./openaireLibrary/shared/shared.module"; imports: [ SharedModule, - NoopAnimationsModule, + BrowserAnimationsModule, CommonModule, HttpClientModule, ErrorModule, diff --git a/src/assets/search.scss b/src/assets/search.scss index d17aa72..60b0fa0 100644 --- a/src/assets/search.scss +++ b/src/assets/search.scss @@ -2,17 +2,19 @@ .dashboard { @import "common-assets/library-css/library"; - .uk-link { - color: #2d72d6; + /* Animation*/ + [class*=uk-animation-] { + animation-fill-mode: none !important; } + /* Link */ .uk-link:hover { color: var(--portal-main-color); text-decoration: none; } /* Paging */ - .uk-pagination>*>* { + .uk-pagination > * > * { display: block; color: #666; box-sizing: border-box; @@ -30,7 +32,7 @@ height: auto; } - .uk-pagination>*>:focus, .uk-pagination>*>:hover { + .uk-pagination > * > :focus, .uk-pagination > * > :hover { color: #4687e6; text-decoration: none; background-color: transparent !important; diff --git a/src/assets/theme-assets/css/login_page.css b/src/assets/theme-assets/css/login_page.css deleted file mode 100755 index c7b3311..0000000 --- a/src/assets/theme-assets/css/login_page.css +++ /dev/null @@ -1,6082 +0,0 @@ -/* login page */ -/* animations */ -[class*="uk-animation-"] { - -webkit-animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - -webkit-animation-duration: 560ms; - animation-duration: 560ms; -} -/* alerts */ -.uk-alert { - border: none; - background: #1976d2; - color: #fff; - text-shadow: none; - padding-right: 32px; - position: relative; - display: block; -} -.uk-alert-success { - background: #8bc34a !important; -} -.uk-alert-danger { - background: #e53935 !important; -} -.uk-alert-warning { - background: #ffa000 !important; -} -.uk-alert-info { - background: #0097a7 !important; -} -.uk-alert-large { - padding: 24px 32px 24px 24px; -} -.uk-alert-close { - position: absolute; - top: 10px; - right: 8px; - float: none !important; - margin: 0 !important; -} -.uk-alert-close:after { - color: #fff !important; -} -/* badges */ -.uk-badge { - background: #0097a7; - padding: 2px 6px; - border: none; - border-radius: 2px; - text-shadow: none; - font-size: 11px; - line-height: 15px; - font-weight: 400; - white-space: nowrap; -} -.uk-badge a { - color: #fff !important; -} -.uk-badge-default { - background: #9e9e9e; - color: #fff; -} -.uk-badge-primary { - background: #2196f3; -} -.uk-badge-danger { - background: #e53935; -} -.uk-badge-warning { - background: #ffa000; -} -.uk-badge-success { - background: #7cb342; -} -.uk-badge-muted { - background: #bdbdbd; -} -.uk-badge-notification { - border-radius: 20px; -} -.uk-badge-large { - font-size: 13px; - line-height: 16px; - padding: 4px 8px; -} -.uk-badge.inline-label { - vertical-align: 1px; - margin-left: 4px; -} -.uk-badge-outline { - border: 1px solid rgba(0, 0, 0, 0.12); - background: #fff; - color: #212121; - padding-bottom: 0; - line-height: 16px; -} -.uk-badge-inline { - vertical-align: 2px; -} -.uk-badge-group { - overflow: hidden; -} -.uk-badge-group .uk-badge { - float: left; - display: block; - margin: 0 4px 4px 0; -} -/* buttons */ -.uk-button { - font-weight: 400; - border-radius: 2px; - -webkit-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); - transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); -} -/* comments */ -.uk-comment-list > li + li { - border-top: 1px dashed rgba(0, 0, 0, 0.12); - margin-top: 16px !important; -} -.uk-comment-list .uk-comment + ul { - margin: 8px 0 0 0; -} -@media only screen and (min-width: 768px) { - .uk-comment-list .uk-comment + ul { - padding-left: 48px; - } -} -.uk-comment-header { - padding: 16px 8px 8px; - border: none; - background: none; - margin-bottom: 0; -} -.uk-comment-title { - margin: 0; - font-size: 14px; - line-height: 20px; -} -/* dialog modals */ -.uk-modal { - z-index: 1304; - background: rgba(0, 0, 0, 0.5); - -webkit-transition: opacity 250ms ease-out; - transition: opacity 250ms ease-out; - overflow: auto !important; -} -.uk-modal.uk-modal-no-backdrop { - background: transparent; -} -.uk-modal-dialog { - border-radius: 2px; - -webkit-box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22); - box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22); - padding: 24px; - display: block !important; - -webkit-animation: none !important; - animation: none !important; - -webkit-transition: opacity 280ms ease-in, -webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1); - transition: opacity 280ms ease-in, -webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1); - transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1), opacity 280ms ease-in; - transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1), opacity 280ms ease-in, -webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1); - -webkit-transform: scale(0); - transform: scale(0); -} -.uk-modal-dialog-blank { - padding: 0; - background: none; - -webkit-box-shadow: none; - box-shadow: none; -} -.uk-open .uk-modal-dialog { - -webkit-transform: scale(1); - transform: scale(1); -} -.uk-modal-dialog .uk-modal-header { - background: none; - border-bottom: none; - margin: 0 -24px 24px; - padding: 0 32px 0 24px; - overflow: hidden; -} -.uk-modal-dialog .uk-modal-header .uk-modal-title { - margin: 0; - font: 500 18px / 28px "Roboto", sans-serif; -} -.uk-modal-dialog .uk-modal-header .uk-modal-title span { - font-size: 16px; - display: block; - color: #727272; -} -.uk-modal-dialog .uk-modal-header .material-icons { - font-size: 24px; - vertical-align: -4px; - cursor: default; -} -.uk-modal-dialog .uk-modal-footer { - margin: 16px -16px -16px; - padding: 16px; - background: #fff; - border-top: none; -} -.uk-modal-dialog .uk-modal-footer:before, -.uk-modal-dialog .uk-modal-footer:after { - content: " "; - display: table; -} -.uk-modal-dialog .uk-modal-footer:after { - clear: both; -} -.uk-modal-dialog .uk-modal-footer:before, -.uk-modal-dialog .uk-modal-footer:after { - content: " "; - display: table; -} -.uk-modal-dialog .uk-modal-footer:after { - clear: both; -} -.uk-modal-dialog .uk-modal-footer .md-icon-btn { - margin-top: 2px; -} -.uk-modal-dialog .uk-modal-caption { - bottom: 16px; - margin: 0 32px; -} -.uk-modal-dialog > .uk-close:first-child { - top: 8px; - right: 8px; - position: absolute; - float: none; - margin: 0; -} -.uk-modal-dialog-lightbox { - padding: 0; -} -.uk-modal-dialog-lightbox > .uk-close:first-child { - top: -11px; - right: -11px; - -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); - box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); - border: none; - z-index: 10; -} -.uk-modal-dialog .uk-overflow-container { - margin: 16px 0; -} -.uk-modal-card-fullscreen { - overflow: hidden !important; -} -.uk-modal-card-fullscreen .uk-modal-close { - float: left; - margin: 8px 8px 0 0; - display: block; -} -.uk-modal-card-fullscreen > .uk-modal-dialog > .md-card > .md-card-toolbar { - position: fixed; - top: 0; - left: 0; - right: 0; - -webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); - box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); - z-index: 10; -} -.uk-modal-card-fullscreen > .uk-modal-dialog > .md-card > .md-card-content { - position: absolute; - top: 48px; - bottom: 0; - left: 0; - right: 0; - overflow-y: auto; -} -.uk-modal .uk-margin.uk-modal-content { - margin-bottom: 0; -} -.uk-modal.uk-modal-dialog-replace .uk-modal-content { - font-size: 18px; -} -.uk-modal-spinner { - -webkit-animation: uk-rotate 2s infinite linear; - animation: uk-rotate 2s infinite linear; - margin-left: -12px; - margin-top: -17px; - left: 50%; - right: auto; -} -.uk-modal .uk-modal-aside { - padding: 16px 32px 32px; -} -/* dropdowns */ -.uk-dropdown { - -webkit-transform: scale(0.25, 0); - transform: scale(0.25, 0); - opacity: 0; - -webkit-transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1); - transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1); - -webkit-animation: none !important; - animation: none !important; - -webkit-transform-origin: 50% 0 !important; - transform-origin: 50% 0 !important; - -webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); - box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); - border: none; - border-radius: 2px; -} -.uk-dropdown.uk-dropdown-xlarge { - width: 360px; -} -@media only screen and (max-width: 479px) { - .uk-dropdown.uk-dropdown-xlarge { - width: 260px; - } -} -.uk-dropdown.uk-dropdown-large { - width: 260px; -} -.uk-dropdown.uk-dropdown-small { - width: 160px; -} -.uk-dropdown > ul > li > a { - font-size: 14px; - color: #212121; -} -.uk-dropdown > ul > li > a:hover { - background: rgba(0, 0, 0, 0.085); -} -.uk-dropdown > ul > li.uk-active > a { - background: rgba(0, 0, 0, 0.085); -} -.uk-dropdown > ul > li.padding_sm { - padding: 2px 4px; -} -.uk-dropdown > ul > li.padding_md { - padding: 4px 8px; -} -.uk-dropdown.dropdown-modal { - z-index: 1310; -} -.uk-dropdown.dropdown-fs { - z-index: 9999; -} -.uk-dropdown.uk-dropdown-scrollable { - -webkit-overflow-scrolling: touch; -} -[data-uk-dropdown*="top-"] .uk-dropdown { - -webkit-transform-origin: 50% 100% !important; - transform-origin: 50% 100% !important; -} -[data-uk-dropdown*="left-"] .uk-dropdown { - -webkit-transform-origin: 100% 50% !important; - transform-origin: 100% 50% !important; -} -[data-uk-dropdown*="right-"] .uk-dropdown { - -webkit-transform-origin: 0 50% !important; - transform-origin: 0 50% !important; -} -[data-uk-dropdown*='justify'] { - position: static !important; -} -[data-uk-dropdown*='justify'] [class*="uk-dropdown-width"] { - left: 0 !important; - width: 100% !important; - min-width: inherit !important; - margin-left: 0 !important; -} -.uk-dropdown-active { - display: block !important; -} -.uk-dropdown-shown { - -webkit-transform: scale(1, 1); - transform: scale(1, 1); - opacity: 1; -} -.uk-nav-dropdown > li > a:focus, -.uk-nav-dropdown > li > a:hover { - text-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; - color: #212121; - background: rgba(153, 153, 153, 0.2); -} -/* forms */ -fieldset { - border: none; - margin: 0; -} -fieldset + * { - margin-top: 15px; -} -.uk-form input:not([type]), -.uk-form input[type=color], -.uk-form input[type=date], -.uk-form input[type=datetime-local], -.uk-form input[type=email], -.uk-form input[type=month], -.uk-form input[type=number], -.uk-form input[type=password], -.uk-form input[type=search], -.uk-form input[type=tel], -.uk-form input[type=text], -.uk-form input[type=time], -.uk-form input[type=url], -.uk-form input[type=week], -.uk-form select, -.uk-form textarea { - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding: 8px; - border: 1px solid rgba(0, 0, 0, 0.12); - -webkit-transition: border 200ms ease-in; - transition: border 200ms ease-in; - resize: none; -} -.uk-form input:not([type]):focus, -.uk-form input[type=color]:focus, -.uk-form input[type=date]:focus, -.uk-form input[type=datetime-local]:focus, -.uk-form input[type=email]:focus, -.uk-form input[type=month]:focus, -.uk-form input[type=number]:focus, -.uk-form input[type=password]:focus, -.uk-form input[type=search]:focus, -.uk-form input[type=tel]:focus, -.uk-form input[type=text]:focus, -.uk-form input[type=time]:focus, -.uk-form input[type=url]:focus, -.uk-form input[type=week]:focus, -.uk-form select:focus, -.uk-form textarea:focus { - background: none; - border-color: #2196f3; -} -.uk-form textarea { - -webkit-transition: border-color 200ms ease-in, height 280ms ease-in; - transition: border-color 200ms ease-in, height 280ms ease-in; -} -.uk-form-row { - -webkit-transition: all 200ms ease-out; - transition: all 200ms ease-out; -} -.uk-form-row + .uk-form-row { - margin-top: 24px; -} -.uk-form-stacked .uk-form-label { - font-weight: 500; - font-size: 13px; - display: block; - padding-bottom: 8px; -} -.uk-form-stacked .uk-form-label + p { - margin-top: 0; -} -.uk-form-help-block { - display: block; - font-size: 12px; - color: #727272; - padding: 4px 0 0 0; - font-style: italic; -} -.uk-form-width-large, -.uk-form-width-medium, -.uk-form-width-small, -.uk-form-width-mini { - max-width: 100%; -} -/* grid */ -.uk-grid + .uk-grid, -.uk-grid-margin, -.uk-grid > * > .uk-panel + .uk-panel { - margin-top: 24px; -} -.uk-grid.uk-grid-small + .uk-grid-small, -.uk-grid.uk-grid-small > * > .uk-panel + .uk-panel, -.uk-grid.uk-grid-small > .uk-grid-margin { - margin-top: 10px; -} -.uk-height-viewport { - min-height: 200px; -} -/* icons */ -[class*="uk-icon-"] { - color: #727272; -} -/* input groups */ -.uk-input-group { - position: relative; - display: table; - border-collapse: separate; - /*&-icon { - font-size: 20px !important; - vertical-align: -3px; - }*/ -} -.uk-input-group > input[type=text] { - position: relative; - z-index: 2; - float: left; - width: 100%; - margin-bottom: 0; -} -.uk-input-group-addon, -.uk-input-group > input[type=text] { - display: table-cell; -} -.uk-input-group-addon { - width: 1%; - white-space: nowrap; - vertical-align: middle; - line-height: 1; - text-align: center; - padding: 0 16px; - font-size: 16px; - min-width: 22px; -} -.uk-input-group > .md-input-wrapper { - display: inline-block; -} -.uk-input-group.uk-input-group-danger .uk-input-group-addon i { - color: #e53935 !important; -} -.uk-input-group.uk-input-group-danger + .parsley-errors-list { - margin-left: 58px; -} -.uk-input-group.uk-input-group-success .uk-input-group-addon i { - color: #7cb342 !important; -} -/* list */ -.uk-list-hover li:hover { - background: rgba(0, 0, 0, 0.1); -} -/* nav */ -.uk-nav-header { - color: #727272; - font-weight: normal; -} -.uk-nav-divider { - -webkit-box-shadow: none; - box-shadow: none; - border-top-color: rgba(0, 0, 0, 0.12); -} -.uk-nav-divider + .uk-nav-header { - margin-top: 0; -} -.uk-nav-label { - width: 12px; - height: 12px; - display: inline-block; - vertical-align: -1px; - margin-right: 8px; -} -.uk-nav-side > li > a { - font-weight: 500; - line-height: 22px; -} -.uk-nav-side > li > a > i { - font-size: 24px; - margin-right: 10px; - vertical-align: -7px; -} -.uk-nav-side > li > a:hover, -.uk-nav-side > li > a:focus { - background: transparent; - -webkit-box-shadow: none; - box-shadow: none; -} -.uk-nav-side > li.uk-active > a { - background: transparent; - -webkit-box-shadow: none; - box-shadow: none; -} -.uk-nav-side > li.uk-active > a, -.uk-nav-side > li.uk-active > a > i { - color: #7cb342; -} -.uk-nav-side > li li a { - text-shadow: none; - color: #212121; -} -.uk-nav-side ul.uk-nav-sub { - padding-top: 0; - padding-left: 24px; -} -/* pagination */ -.uk-pagination { - margin: 0; -} -.uk-pagination > li { - outline: none !important; -} -.uk-pagination > li > a, -.uk-pagination > li > span { - border: none; - padding: 4px 8px; - min-width: 32px; - line-height: 24px; - height: 32px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - text-shadow: none; - color: #212121; - border-radius: 4px; -} -.uk-pagination > li > a [class*="uk-icon-"], -.uk-pagination > li > span [class*="uk-icon-"] { - font-size: 16px; -} -.uk-pagination > li > a { - background: transparent; -} -.uk-pagination > li > a:hover { - background: #e1efd2; -} -.uk-pagination > li.uk-active > a, -.uk-pagination > li.uk-active > span { - background: #7cb342; -} -.uk-pagination > li.uk-active > a, -.uk-pagination > li.uk-active > span, -.uk-pagination > li.uk-active > a:hover, -.uk-pagination > li.uk-active > span:hover { - color: #fff; -} -.uk-pagination > li.uk-disabled > a, -.uk-pagination > li.uk-disabled > span { - border: none; - text-shadow: none; - background: transparent !important; - color: #aaa; - cursor: default; -} -/* panels */ -.uk-panel-box { - border-radius: 2px; - background: #fff; - border-color: rgba(0, 0, 0, 0.12); -} -.uk-panel-box .uk-panel-teaser { - border-radius: 2px 2px 0 0; -} -/* tables */ -.uk-table td { - border-bottom-color: rgba(0, 0, 0, 0.12); -} -.uk-table th { - border-bottom: 1px #444; -} -.uk-table-nowrap td, -.uk-table-nowrap th { - white-space: nowrap; -} -.uk-table-align-vertical td, -.uk-table-align-vertical th { - vertical-align: middle; -} -.uk-table tr th.small_col, -.uk-table tr td.small_col { - width: 1%; -} -.uk-table tr.row_checked td { - background: #e3f2fd; -} -.uk-table .uk-table { - margin-bottom: 0; -} -.uk-table .uk-table tr:last-child td { - border-bottom: none; -} -.uk-table-no-border td { - border-bottom-color: transparent; -} -/* sticky */ -.uk-sticky-placeholder .uk-active { - z-index: 1094; -} -/* subnav */ -.uk-subnav-pill > * > * { - color: #212121; -} -.uk-subnav-pill > .uk-active > * { - background: #7cb342; -} -/* tables */ -.uk-table thead th { - border-bottom: 2px solid rgba(0, 0, 0, 0.12); -} -.uk-table thead th, -.uk-table tfoot td, -.uk-table tfoot th { - font-style: normal; - font-weight: 400; - color: #727272; - font-size: 14px; -} -.uk-table td { - border-bottom-color: #e0e0e0; -} -.uk-table tfoot td, -.uk-table tfoot th { - border-top: 2px solid rgba(0, 0, 0, 0.12); - border-bottom: none; -} -.uk-table-striped tbody tr:nth-of-type(odd) { - background: rgba(0, 0, 0, 0.085); -} -.uk-table-hover tbody tr:hover { - background: #e3f2fd; -} -/* thumbnails */ -.uk-thumbnail { - border-radius: 0; - border-color: rgba(0, 0, 0, 0.12); -} -.uk-thumbnail-caption { - padding: 4px 4px 0; - line-height: 20px; - color: #727272; - font-size: 12px; -} -/* utilities */ -.uk-text-small { - font-size: 12px; -} -.uk-text-muted { - color: #757575 !important; -} -.uk-text-primary { - color: #2196f3 !important; -} -.uk-text-danger { - color: #e53935 !important; -} -.uk-text-success { - color: #7cb342 !important; -} -.uk-text-warning { - color: #ffa000 !important; -} -.uk-margin-bottom { - margin-bottom: 16px !important; -} -.uk-margin-small-bottom { - margin-bottom: 8px !important; -} -.uk-margin-medium-bottom { - margin-bottom: 32px !important; -} -.uk-margin-large-bottom { - margin-bottom: 48px !important; -} -.uk-margin-medium-top { - margin-top: 32px !important; -} -.uk-margin-large-top { - margin-top: 48px !important; -} -.uk-close { - font-size: 18px; - opacity: 1; -} -.uk-close:hover, -.uk-close:focus { - opacity: 1; -} -.uk-close:after { - opacity: 1 !important; - color: #727272; - content: '\e5cd'; - font-family: "Material Icons"; -} -.uk-float-none { - float: none !important; -} -/* ------------ Components ------------ */ -/* accordion */ -/*! UIkit 2.27.5 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ -/* ======================================================================== - Component: Accordion - ========================================================================== */ -/* Sub-object: `uk-accordion-title` - ========================================================================== */ -.uk-accordion-title { - margin-top: 0; - margin-bottom: 15px; - padding: 5px 15px; - background: #f5f5f5; - font-size: 18px; - line-height: 24px; - cursor: pointer; - border: 1px solid #ddd; - border-radius: 4px; -} -/* Sub-object: `uk-accordion-content` - ========================================================================== */ -.uk-accordion-content { - padding: 0 15px 15px 15px; -} -/* - * Micro clearfix to make panels more robust - */ -.uk-accordion-content:before, -.uk-accordion-content:after { - content: ""; - display: table; -} -.uk-accordion-content:after { - clear: both; -} -/* - * Remove margin from the last-child - */ -.uk-accordion-content > :last-child { - margin-bottom: 0; -} -.uk-accordion-title { - background: rgba(153, 153, 153, 0.2); - border-radius: 0; - border: none; - margin: 0 0 4px; - font-size: 15px; - font-weight: 400; - padding: 8px 24px 8px 16px; - position: relative; -} -.uk-accordion-title:after { - content: '\e313'; - font-family: "Material Icons"; - font-size: 18px; - position: absolute; - top: 8px; - right: 8px; - display: block; - color: #727272; - -webkit-transition: -webkit-transform 280ms; - transition: -webkit-transform 280ms; - transition: transform 280ms; - transition: transform 280ms, -webkit-transform 280ms; -} -.uk-accordion-title.uk-active:after { - -webkit-transform: rotate(-180deg); - transform: rotate(-180deg); -} -.uk-accordion-title-primary { - background: #2196f3; - color: #fff; -} -.uk-accordion-title-primary:after { - color: #fff; -} -.uk-accordion-title-danger { - background: #e53935; - color: #fff; -} -.uk-accordion-title-danger:after { - color: #fff; -} -.uk-accordion-title-success { - background: #7cb342; - color: #fff; -} -.uk-accordion-title-success:after { - color: #fff; -} -.uk-accordion-title-warning { - background: #ffa000; - color: #fff; -} -.uk-accordion-title-warning:after { - color: #fff; -} -.uk-accordion-content { - padding: 16px; -} -.uk-accordion-alt .uk-accordion-title { - background: #fff; - margin: 0; - padding: 16px 24px 16px 48px; - border-top: 1px solid rgba(0, 0, 0, 0.12); -} -.uk-accordion-alt .uk-accordion-title:first-child { - border-top: none; -} -.uk-accordion-alt .uk-accordion-title:after { - color: #2196f3; - content: '\e145'; - right: auto; - left: 16px; - top: 16px; -} -.uk-accordion-alt .uk-accordion-title.uk-active:after { - -webkit-transform: rotate(-180deg); - transform: rotate(-180deg); - content: '\e15b'; -} -.uk-accordion-alt .uk-accordion-content { - padding: 24px; -} -/* dotnav */ -/*! UIkit 2.27.5 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ -/* ======================================================================== - Component: Dotnav - ========================================================================== */ -/* - * 1. Gutter - * 2. Remove default list style - */ -.uk-dotnav { - display: -ms-flexbox; - display: -webkit-box; - display: flex; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - /* 1 */ - margin-left: -15px; - margin-top: -15px; - /* 2 */ - padding: 0; - list-style: none; -} -/* - * 1. Space is allocated solely based on content dimensions - * 2. Horizontal gutter is using `padding` so `uk-width-*` classes can be applied - */ -.uk-dotnav > * { - /* 1 */ - -ms-flex: none; - -webkit-box-flex: 0; - flex: none; - /* 2 */ - padding-left: 15px; - margin-top: 15px; -} -/* - * DEPRECATED IE9 Support - */ -.uk-dotnav:before, -.uk-dotnav:after { - content: ""; - display: block; - overflow: hidden; -} -.uk-dotnav:after { - clear: both; -} -.uk-dotnav > * { - float: left; -} -/* Items - ========================================================================== */ -/* - * Items - * 1. Hide text if present - */ -.uk-dotnav > * > * { - display: block; - -webkit-box-sizing: content-box; - box-sizing: content-box; - width: 20px; - height: 20px; - border-radius: 50%; - background: rgba(50, 50, 50, 0.1); - /* 1 */ - text-indent: 100%; - overflow: hidden; - white-space: nowrap; - -webkit-transition: all 0.2s ease-in-out; - transition: all 0.2s ease-in-out; -} -/* - * Hover - * 1. Apply hover style also to focus state - * 2. Remove default focus style - */ -.uk-dotnav > * > :hover, -.uk-dotnav > * > :focus { - background: rgba(50, 50, 50, 0.4); - /* 2 */ - outline: none; -} -/* OnClick */ -.uk-dotnav > * > :active { - background: rgba(50, 50, 50, 0.6); -} -/* Active */ -.uk-dotnav > .uk-active > * { - background: rgba(50, 50, 50, 0.4); - -webkit-transform: scale(1.3); - transform: scale(1.3); -} -/* Modifier: `uk-dotnav-contrast` - ========================================================================== */ -.uk-dotnav-contrast > * > * { - background: rgba(255, 255, 255, 0.4); -} -/* - * Hover - * 1. Apply hover style also to focus state - */ -.uk-dotnav-contrast > * > :hover, -.uk-dotnav-contrast > * > :focus { - background: rgba(255, 255, 255, 0.7); -} -/* OnClick */ -.uk-dotnav-contrast > * > :active { - background: rgba(255, 255, 255, 0.9); -} -/* Active */ -.uk-dotnav-contrast > .uk-active > * { - background: rgba(255, 255, 255, 0.9); -} -/* Modifier: 'uk-dotnav-vertical' - ========================================================================== */ -/* - * DEPRECATED - */ -.uk-dotnav-vertical { - -ms-flex-direction: column; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - flex-direction: column; -} -/* - * DEPRECATED IE9 Support - */ -.uk-dotnav-vertical > * { - float: none; -} -/* progress */ -/*! UIkit 2.27.5 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ -/* ======================================================================== - Component: Progress - ========================================================================== */ -/* - * 1. Clearing - * 2. Vertical alignment if text is used - */ -.uk-progress { - -webkit-box-sizing: border-box; - box-sizing: border-box; - height: 20px; - margin-bottom: 15px; - background: #f5f5f5; - /* 1 */ - overflow: hidden; - /* 2 */ - line-height: 20px; - -webkit-box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); - box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); - border-radius: 4px; -} -/* - * Add margin if adjacent element - */ -* + .uk-progress { - margin-top: 15px; -} -/* Sub-object: `uk-progress-bar` - ========================================================================== */ -/* - * 1. Transition - * 2. Needed for text - */ -.uk-progress-bar { - width: 0; - height: 100%; - background: #00a8e6; - float: left; - /* 1 */ - -webkit-transition: width 0.6s ease; - transition: width 0.6s ease; - /* 2 */ - font-size: 12px; - color: #fff; - text-align: center; - -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.1); -} -/* Size modifiers - ========================================================================== */ -/* Mini */ -.uk-progress-mini { - height: 6px; -} -/* Small */ -.uk-progress-small { - height: 12px; -} -/* Color modifiers - ========================================================================== */ -.uk-progress-success .uk-progress-bar { - background-color: #8cc14c; -} -.uk-progress-warning .uk-progress-bar { - background-color: #faa732; -} -.uk-progress-danger .uk-progress-bar { - background-color: #da314b; -} -/* Modifier: `uk-progress-striped` - ========================================================================== */ -.uk-progress-striped .uk-progress-bar { - background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-size: 30px 30px; -} -/* - * Animation - */ -.uk-progress-striped.uk-active .uk-progress-bar { - -webkit-animation: uk-progress-bar-stripes 2s linear infinite; - animation: uk-progress-bar-stripes 2s linear infinite; -} -@-webkit-keyframes uk-progress-bar-stripes { - 0% { - background-position: 0 0; - } - 100% { - background-position: 30px 0; - } -} -@keyframes uk-progress-bar-stripes { - 0% { - background-position: 0 0; - } - 100% { - background-position: 30px 0; - } -} -/* Size modifiers - ========================================================================== */ -.uk-progress-mini, -.uk-progress-small { - border-radius: 500px; -} -.uk-progress { - -webkit-box-shadow: none; - box-shadow: none; - border-radius: 2px; -} -.uk-progress-bar { - background: #009688; -} -.uk-progress-success .uk-progress-bar { - background-color: #7cb342; -} -.uk-progress-danger .uk-progress-bar { - background-color: #e53935; -} -.uk-progress-warning .uk-progress-bar { - background-color: #ffa000; -} -/* htmleditor */ -/*! UIkit 2.27.5 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ -/* ======================================================================== - Component: HTML editor - ========================================================================== */ -/* Sub-object `uk-htmleditor-navbar` - ========================================================================== */ -.uk-htmleditor-navbar { - background: #f5f5f5; - border: 1px solid rgba(0, 0, 0, 0.06); - border-top-left-radius: 4px; - border-top-right-radius: 4px; -} -/* - * Micro clearfix - */ -.uk-htmleditor-navbar:before, -.uk-htmleditor-navbar:after { - content: ""; - display: table; -} -.uk-htmleditor-navbar:after { - clear: both; -} -/* Sub-object `uk-htmleditor-navbar-nav` - ========================================================================== */ -.uk-htmleditor-navbar-nav { - margin: 0; - padding: 0; - list-style: none; - float: left; -} -.uk-htmleditor-navbar-nav > li { - float: left; -} -/* - * 1. Dimensions - * 2. Style - */ -.uk-htmleditor-navbar-nav > li > a { - display: block; - -webkit-box-sizing: border-box; - box-sizing: border-box; - text-decoration: none; - /* 1 */ - height: 41px; - padding: 0 15px; - line-height: 40px; - /* 2 */ - color: #444; - font-size: 11px; - cursor: pointer; - margin-top: -1px; - margin-left: -1px; - border: 1px solid transparent; - border-bottom-width: 0; - text-shadow: 0 1px 0 #fff; -} -/* - * Hover - * 1. Apply hover style also to focus state - * 2. Remove default focus style - */ -.uk-htmleditor-navbar-nav > li:hover > a, -.uk-htmleditor-navbar-nav > li > a:focus { - background-color: #fafafa; - color: #444; - outline: none; - /* 2 */ - position: relative; - z-index: 1; - border-left-color: rgba(0, 0, 0, 0.1); - border-right-color: rgba(0, 0, 0, 0.1); - border-top-color: rgba(0, 0, 0, 0.1); -} -/* OnClick */ -.uk-htmleditor-navbar-nav > li > a:active { - background-color: #eee; - color: #444; - border-left-color: rgba(0, 0, 0, 0.1); - border-right-color: rgba(0, 0, 0, 0.1); - border-top-color: rgba(0, 0, 0, 0.2); -} -/* Active */ -.uk-htmleditor-navbar-nav > li.uk-active > a { - background-color: #fafafa; - color: #444; - border-left-color: rgba(0, 0, 0, 0.1); - border-right-color: rgba(0, 0, 0, 0.1); - border-top-color: rgba(0, 0, 0, 0.1); -} -/* Sub-object: `uk-htmleditor-navbar-flip` - ========================================================================== */ -.uk-htmleditor-navbar-flip { - float: right; -} -/* Sub-object for special buttons - ========================================================================== */ -[data-mode='split'] .uk-htmleditor-button-code, -[data-mode='split'] .uk-htmleditor-button-preview { - display: none; -} -/* Sub-object `uk-htmleditor-content` - ========================================================================== */ -.uk-htmleditor-content { - border-left: 1px solid #ddd; - border-right: 1px solid #ddd; - border-bottom: 1px solid #ddd; - background: #fff; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; -} -/* - * Micro clearfix - */ -.uk-htmleditor-content:before, -.uk-htmleditor-content:after { - content: ""; - display: table; -} -.uk-htmleditor-content:after { - clear: both; -} -/* Modifier `uk-htmleditor-fullscreen` - ========================================================================== */ -.uk-htmleditor-fullscreen { - position: fixed; - top: 0; - left: 0; - right: 0; - bottom: 0; - z-index: 990; -} -.uk-htmleditor-fullscreen .uk-htmleditor-content { - position: absolute; - top: 41px; - left: 0; - right: 0; - bottom: 0; -} -.uk-htmleditor-fullscreen .uk-icon-expand:before { - content: "\f066"; -} -/* Sub-objects `uk-htmleditor-code` and `uk-htmleditor-preview` - ========================================================================== */ -.uk-htmleditor-code, -.uk-htmleditor-preview { - -webkit-box-sizing: border-box; - box-sizing: border-box; -} -.uk-htmleditor-preview { - padding: 20px; - overflow-y: scroll; - position: relative; -} -/* - * Tab view - */ -[data-mode='tab'][data-active-tab='code'] .uk-htmleditor-preview, -[data-mode='tab'][data-active-tab='preview'] .uk-htmleditor-code { - display: none; -} -/* - * Split view - */ -[data-mode='split'] .uk-htmleditor-code, -[data-mode='split'] .uk-htmleditor-preview { - float: left; - width: 50%; -} -[data-mode='split'] .uk-htmleditor-code { - border-right: 1px solid #eee; -} -/* Sub-object `uk-htmleditor-iframe` - ========================================================================== */ -.uk-htmleditor-iframe { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; -} -/* CodeMirror modifications - ========================================================================== */ -.uk-htmleditor .CodeMirror { - padding: 10px; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} -/* - * Apply same `border-radius` as `uk-htmleditor-navbar` - */ -.uk-htmleditor-navbar-nav:first-child > li:first-child > a { - border-top-left-radius: 4px; -} -/* - * Sub-modifier `uk-htmleditor-navbar-flip` - */ -/* Collapse border */ -.uk-htmleditor-navbar-flip .uk-htmleditor-navbar-nav > li > a { - margin-left: 0; - margin-right: -1px; -} -/* Apply same `border-radius` as `uk-htmleditor-navbar` */ -.uk-htmleditor-navbar-flip .uk-htmleditor-navbar-nav:first-child > li:first-child > a { - border-top-left-radius: 0; -} -.uk-htmleditor-navbar-flip .uk-htmleditor-navbar-nav:last-child > li:last-child > a { - border-top-right-radius: 4px; -} -/* - * Sub-modifier `uk-htmleditor-fullscreen` - */ -.uk-htmleditor-fullscreen .uk-htmleditor-navbar { - border-top: none; - border-left: none; - border-right: none; - border-radius: 0; -} -.uk-htmleditor-fullscreen .uk-htmleditor-content { - border: none; - border-radius: 0; -} -.uk-htmleditor-fullscreen .uk-htmleditor-navbar-nav > li > a { - border-radius: 0 !important; -} -.uk-htmleditor-navbar { - border-radius: 0; - background: #f9f9f9; - border-width: 1px 1px 0; - border-style: solid; - border-color: rgba(0, 0, 0, 0.12); - overflow: hidden; -} -.uk-htmleditor-navbar-nav > li > a { - border: none; - border-radius: 0 !important; - height: 38px; -} -.uk-htmleditor-navbar-nav > li.uk-active > a { - background: #ebebeb; -} -.uk-htmleditor-navbar-nav > li:hover > a, -.uk-htmleditor-navbar-nav > li > a:focus { - background: #ebebeb; -} -.uk-htmleditor-content { - border-radius: 0; - border: 1px solid rgba(0, 0, 0, 0.12); -} -.uk-htmleditor-fullscreen { - z-index: 1154; -} -.uk-htmleditor-fullscreen .uk-htmleditor-navbar { - border-bottom: 1px solid rgba(0, 0, 0, 0.12); -} -.uk-htmleditor-fullscreen .uk-htmleditor-content { - top: 38px; -} -/* upload */ -/*! UIkit 2.27.5 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ -/* ======================================================================== - Component: Form file - ========================================================================== */ -/* - * 1. Behave like form elements - * 2. Create position context for dropdowns - * 3. Clip content - */ -.uk-form-file { - /* 1 */ - display: inline-block; - vertical-align: middle; - /* 2 */ - position: relative; - /* 3 */ - overflow: hidden; -} -/* - * 1. Required for Firefox - * 2. Expand height and required for the cursor - */ -.uk-form-file input[type="file"] { - position: absolute; - top: 0; - z-index: 1; - width: 100%; - opacity: 0; - cursor: pointer; - /* 1 */ - left: 0; - /* 2 */ - font-size: 500px; -} -/*! UIkit 2.27.5 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ -/* ======================================================================== - Component: Upload - ========================================================================== */ -/* - * Create a box-shadow when dragging a file over the upload area - */ -.uk-dragover { - -webkit-box-shadow: 0 0 20px rgba(100, 100, 100, 0.3); - box-shadow: 0 0 20px rgba(100, 100, 100, 0.3); -} -.uk-file-upload { - width: 100%; - padding: 32px 16px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - background: #f5f5f5; - text-align: center; - -webkit-transition: all 200ms ease-in; - transition: all 200ms ease-in; -} -.uk-file-upload p { - margin: 0; -} -.uk-file-upload.uk-dragover { - -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.3); - box-shadow: 0 0 6px rgba(0, 0, 0, 0.3); -} -div.uk-form-file { - padding: 3px 2px; -} -div.uk-form-file.md-btn { - padding: 2px 12px; -} -.uk-form-file input[type="file"] { - position: absolute; - top: 0; - z-index: 1; - width: 100%; - opacity: 0; - cursor: pointer; - left: 0; - font-size: 500px; -} -.uk-form-file input[type="file"]::-webkit-file-upload-button { - cursor: pointer; -} -/* form select */ -/*! UIkit 2.27.5 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ -/* ======================================================================== - Component: Form select - ========================================================================== */ -/* - * 1. Behave like form elements - * 2. Create position context for dropdowns - * 3. Clip content - */ -.uk-form-select { - /* 1 */ - display: inline-block; - vertical-align: middle; - /* 2 */ - position: relative; - /* 3 */ - overflow: hidden; -} -/* - * 1. Required for Firefox - * 1. Required for Webkit to make `height` work - */ -.uk-form-select select { - position: absolute; - top: 0; - z-index: 1; - width: 100%; - height: 100%; - opacity: 0; - cursor: pointer; - /* 1 */ - left: 0; - /* 2 */ - -webkit-appearance: none; -} -/* datepicker */ -.uk-datepicker { - z-index: 1094; - width: auto; - padding: 0; -} -.uk-datepicker-nav { - margin-bottom: 15px; - text-align: center; - line-height: 20px; - background: #009688; - padding: 10px 0; -} -.uk-datepicker-nav a, -.uk-datepicker-nav a:hover { - text-decoration: none; - color: #fff; -} -.uk-datepicker-nav .uk-form-select { - font: 400 16px / 22px "Roboto", sans-serif; - color: #fff; - text-transform: uppercase; - border-bottom: 1px solid rgba(255, 255, 255, 0.5); - padding: 0 4px; -} -.uk-datepicker-nav .uk-form-select + .uk-form-select { - margin-left: 2px; -} -.uk-datepicker-previous { - float: left; - margin-left: 8px; -} -.uk-datepicker-previous:after { - content: "\f053"; -} -.uk-datepicker-next { - float: right; - margin-right: 8px; -} -.uk-datepicker-next:after { - content: "\f054"; -} -.uk-datepicker-previous:after, -.uk-datepicker-next:after { - width: 20px; - font-family: FontAwesome; -} -.uk-datepicker.dp-top { - -webkit-transform-origin: 50% 100% !important; - transform-origin: 50% 100% !important; -} -.uk-datepicker-table { - width: 100%; -} -.uk-datepicker-table th, -.uk-datepicker-table td { - padding: 2px; - font: 400 13px / 15px "Roboto", sans-serif; -} -.uk-datepicker-table th { - color: #727272; - font-size: 12px; - text-transform: uppercase; -} -.uk-datepicker-table a { - display: block; - width: 30px; - line-height: 30px; - height: 30px; - text-align: center; - text-decoration: none; - border-radius: 50%; - color: #212121; -} -.uk-datepicker-table a:hover { - background-color: rgba(0, 0, 0, 0.085); - color: #212121; - outline: none; -} -.uk-datepicker-table a.uk-active { - background-color: #009688; - color: #fff; -} -a.uk-datepicker-table-muted { - color: #999; -} -/* autocomplete, timepicker */ -.uk-autocomplete .uk-dropdown { - display: block; - max-height: 0; - padding: 0; - overflow-x: hidden; - overflow-y: auto; - border-radius: 0; - border: none; - -webkit-transform: scale(0.25, 0); - transform: scale(0.25, 0); - opacity: 0; - -webkit-transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1); - transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1); - -webkit-animation: none !important; - animation: none !important; - -webkit-transform-origin: 0 0; - transform-origin: 0 0; -} -.uk-autocomplete.uk-open .uk-dropdown { - -webkit-transform: scale(1); - transform: scale(1); - opacity: 1; - max-height: 210px; -} -[data-uk-autocomplete] .uk-dropdown { - width: 100%; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} -[data-uk-autocomplete] .uk-dropdown .uk-nav { - margin: 0; -} -/* password toggle */ -.uk-form-password-toggle { - position: absolute; - right: 8px; - top: 16px; - color: #727272; -} -.uk-form-password-toggle:hover { - color: #727272; -} -/* nestable */ -/*! UIkit 2.27.5 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ -/* ======================================================================== - Component: Nestable - ========================================================================== */ -.uk-nestable { - padding: 0; - list-style: none; -} -/* - * Disables the default callout shown when you touch and hold a touch target - * Currently only works in Webkit - */ -.uk-nestable a, -.uk-nestable img { - -webkit-touch-callout: none; -} -/* Sub-object `uk-nestable-list` - ========================================================================== */ -.uk-nestable-list { - margin: 0; - padding-left: 40px; - list-style: none; -} -/* Sub-modifier `uk-nestable-item` - ========================================================================== */ -/* - * 1. Deactivate browser touch actions in IE11 - */ -.uk-nestable-item { - /* 1 */ - -ms-touch-action: none; - touch-action: none; -} -.uk-nestable-item + .uk-nestable-item { - margin-top: 10px; -} -.uk-nestable-list:not(.uk-nestable-dragged) > .uk-nestable-item:first-child { - margin-top: 10px; -} -/* Sub-modifier `uk-nestable-dragged` - ========================================================================== */ -/* - * 1. Reset style - */ -.uk-nestable-dragged { - position: absolute; - z-index: 1050; - pointer-events: none; - /* 1 */ - padding-left: 0; -} -/* Sub-modifier `uk-nestable-placeholder` - ========================================================================== */ -.uk-nestable-placeholder { - position: relative; -} -.uk-nestable-placeholder > * { - opacity: 0; -} -.uk-nestable-placeholder:after { - content: ''; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - border: 1px dashed #ddd; - opacity: 1; -} -/* Empty List - ========================================================================== */ -.uk-nestable-empty { - min-height: 30px; -} -/* Sub-object `uk-nestable-handle` - ========================================================================== */ -/* - * Deactivate browser touch actions in IE11 - */ -.uk-nestable-handle { - -ms-touch-action: none; - touch-action: none; -} -/* Hover */ -.uk-nestable-handle:hover { - cursor: move; -} -/* Sub-object `uk-nestable-moving` - ========================================================================== */ -.uk-nestable-moving, -.uk-nestable-moving * { - cursor: move; -} -/* Fixes dragging items over iframes */ -.uk-nestable-moving iframe { - pointer-events: none; -} -/* [data-nestable-action='toggle'] - ========================================================================== */ -/* - * 1. Makes text unselectable. Happens if double clicked by mistake - */ -[data-nestable-action='toggle'] { - cursor: pointer; - /* 1 */ - -moz-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; - user-select: none; -} -/* Sub-object `.uk-nestable-toggle` - ========================================================================== */ -.uk-nestable-toggle { - display: inline-block; - visibility: hidden; -} -.uk-nestable-toggle:after { - content: "\f147"; - font-family: FontAwesome; -} -.uk-parent > :not(.uk-nestable-list) .uk-nestable-toggle { - visibility: visible; -} -/* - * Collapsed - */ -.uk-collapsed .uk-nestable-list { - display: none; -} -.uk-collapsed .uk-nestable-toggle:after { - content: "\f196"; -} -/* Sub-object `uk-nestable-panel` - ========================================================================== */ -.uk-nestable-panel { - padding: 5px; - background: #f5f5f5; - border-radius: 4px; - border: 1px solid rgba(0, 0, 0, 0.06); - text-shadow: 0 1px 0 #fff; -} -.uk-nestable-handle { - margin-right: 16px; -} -.uk-nestable-panel { - padding: 8px 16px; - background: #fff; - border-radius: 4px; - border: none; - text-shadow: none; - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); -} -.uk-nestable-placeholder:after { - content: ''; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - border: none; - background: rgba(0, 0, 0, 0.085); - opacity: 1; -} -.uk-nestable-toggle { - font-size: 18px; - height: 18px; - width: 18px; - line-height: 18px; - overflow: hidden; - vertical-align: middle; - margin-right: 8px; - display: none; -} -.uk-nestable-toggle:after { - vertical-align: top; - content: '\e316'; - font-family: "Material Icons"; -} -.uk-parent > .uk-nestable-panel .uk-nestable-toggle { - display: inline-block; -} -.uk-collapsed .uk-nestable-toggle:after { - content: "\e313"; -} -/* notify */ -/*! UIkit 2.27.5 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ -/* ======================================================================== - Component: Notify - ========================================================================== */ -/* - * Message container for positioning - */ -.uk-notify { - position: fixed; - top: 10px; - left: 10px; - z-index: 1040; - -webkit-box-sizing: border-box; - box-sizing: border-box; - width: 350px; -} -/* Position modifiers -========================================================================== */ -.uk-notify-top-right, -.uk-notify-bottom-right { - left: auto; - right: 10px; -} -.uk-notify-top-center, -.uk-notify-bottom-center { - left: 50%; - margin-left: -175px; -} -.uk-notify-bottom-left, -.uk-notify-bottom-right, -.uk-notify-bottom-center { - top: auto; - bottom: 10px; -} -/* Responsiveness -========================================================================== */ -/* Phones portrait and smaller */ -@media (max-width: 479px) { - /* - * Fit in small screen - */ - .uk-notify { - left: 10px; - right: 10px; - width: auto; - margin: 0; - } -} -/* Sub-object: `uk-notify-message` -========================================================================== */ -.uk-notify-message { - position: relative; - margin-bottom: 10px; - padding: 15px; - background: #444; - color: #fff; - font-size: 16px; - line-height: 22px; - cursor: pointer; - border: 1px solid #444; - border-radius: 4px; -} -/* Close in notify - ========================================================================== */ -.uk-notify-message > .uk-close { - visibility: hidden; - float: right; -} -.uk-notify-message:hover > .uk-close { - visibility: visible; -} -/* Modifier: `uk-notify-message-primary` - ========================================================================== */ -.uk-notify-message-primary { - background: #ebf7fd; - color: #2d7091; - border-color: rgba(45, 112, 145, 0.3); -} -/* Modifier: `uk-notify-message-success` - ========================================================================== */ -.uk-notify-message-success { - background: #f2fae3; - color: #659f13; - border-color: rgba(101, 159, 19, 0.3); -} -/* Modifier: `uk-notify-message-warning` - ========================================================================== */ -.uk-notify-message-warning { - background: #fffceb; - color: #e28327; - border-color: rgba(226, 131, 39, 0.3); -} -/* Modifier: `uk-notify-message-danger` - ========================================================================== */ -.uk-notify-message-danger { - background: #fff1f0; - color: #d85030; - border-color: rgba(216, 80, 48, 0.3); -} -.uk-notify { - z-index: 1114; - width: 400px; - top: 56px; - max-width: 100%; -} -.uk-notify-top-center, -.uk-notify-bottom-center { - margin-left: -200px; -} -.uk-notify-top-left { - left: 24px; -} -.uk-notify-top-right { - right: 24px; -} -.uk-notify-bottom-left { - left: 24px; -} -.uk-notify-bottom-right { - right: 24px; -} -.uk-notify-bottom-center, -.uk-notify-bottom-left, -.uk-notify-bottom-right { - top: auto; - bottom: 8px; -} -.uk-notify-message { - background: #323232; - border-radius: 4px; - padding: 12px 16px; - font-size: 14px; - line-height: 18px; - border: none; -} -.uk-notify .uk-close { - display: none; -} -.uk-notify .notify-action { - float: right; - text-transform: uppercase; - color: #8bc34a; - margin-left: 16px; -} -.uk-notify .notify-action:hover { - color: #689f38; -} -.uk-notify .notify-content { - overflow: hidden; -} -.uk-notify-message-info { - background: #1976d2; - color: #fff; -} -.uk-notify-message-success { - background: #7cb342; -} -.uk-notify-message-warning { - background: #ffa000; -} -.uk-notify-message-danger { - background: #e53935; -} -.uk-notify-message-info, -.uk-notify-message-success, -.uk-notify-message-warning, -.uk-notify-message-danger { - color: #fff; -} -.uk-notify-message-info .notify-action, -.uk-notify-message-success .notify-action, -.uk-notify-message-warning .notify-action, -.uk-notify-message-danger .notify-action { - color: #fff; -} -.uk-notify-message-info .notify-action:hover, -.uk-notify-message-success .notify-action:hover, -.uk-notify-message-warning .notify-action:hover, -.uk-notify-message-danger .notify-action:hover { - color: #fff; - text-decoration: underline; -} -@media only screen and (max-width: 767px) { - .uk-notify-top-center, - .uk-notify-top-left, - .uk-notify-top-right, - .uk-notify-bottom-center, - .uk-notify-bottom-left, - .uk-notify-bottom-right { - width: 100%; - margin: 0; - left: 0; - right: 0; - } - .uk-notify-top-center > .uk-notify-message, - .uk-notify-top-left > .uk-notify-message, - .uk-notify-top-right > .uk-notify-message, - .uk-notify-bottom-center > .uk-notify-message, - .uk-notify-bottom-left > .uk-notify-message, - .uk-notify-bottom-right > .uk-notify-message { - border-radius: 0; - padding: 16px 32px; - } - .uk-notify-top-center, - .uk-notify-top-left, - .uk-notify-top-right { - top: 0; - bottom: auto; - } - .uk-notify-bottom-center, - .uk-notify-bottom-left, - .uk-notify-bottom-right { - top: auto; - bottom: -10px; - } -} -@media only screen and (min-width: 960px) { - .sidebar_main_active .uk-notify-top-left, - .sidebar_main_open .uk-notify-top-left { - left: 256px; - } - .sidebar_main_active .uk-notify-top-center, - .sidebar_main_open .uk-notify-top-center { - margin-left: -80px; - } - .sidebar_main_active .uk-notify-bottom-left, - .sidebar_main_open .uk-notify-bottom-left { - left: 256px; - } - .sidebar_main_active .uk-notify-bottom-center, - .sidebar_main_open .uk-notify-bottom-center { - margin-left: -80px; - } -} -/* slideshow */ -/*! UIkit 2.27.5 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ -/* ======================================================================== - Component: Slideshow - ========================================================================== */ -/* - * 1. Create position context - * 2. Create stacking context to prevent z-index issues with other components - * 3. Set width because child elements are positioned absolute. Height is set via JS - * 4. Reset list style - * 5. Clip child elements - * 6. Deactivate browser history navigation in IE11 - */ -.uk-slideshow { - /* 1 */ - position: relative; - /* 2 */ - z-index: 0; - /* 3 */ - width: 100%; - /* 4 */ - margin: 0; - padding: 0; - list-style: none; - /* 5 */ - overflow: hidden; - /* 6 */ - -ms-touch-action: pan-y; - touch-action: pan-y; -} -/* - * Sub-object item - * 1. Position items above each other - * 2. Expand to parent container width - * 3. Hide by default - */ -.uk-slideshow > li { - /* 1 */ - position: absolute; - top: 0; - left: 0; - /* 2 */ - width: 100%; - /* 3 */ - opacity: 0; -} -/* - * Active - * 1. Stack at first - * 2. Show slide - */ -.uk-slideshow > .uk-active { - /* 1 */ - z-index: 10; - /* 2 */ - opacity: 1; -} -/* - * Hide default images which is only relevant to keep existing proportions - */ -.uk-slideshow > li > img { - visibility: hidden; -} -/* - * Pointer for controls - */ -[data-uk-slideshow-slide] { - cursor: pointer; -} -/* Modifier: `uk-slideshow-fullscreen` - ========================================================================== */ -.uk-slideshow-fullscreen, -.uk-slideshow-fullscreen > li { - height: 100vh; -} -/* Animations - ========================================================================== */ -/* - * Fade - */ -.uk-slideshow-fade-in { - -webkit-animation: uk-fade 0.5s linear; - animation: uk-fade 0.5s linear; -} -.uk-slideshow-fade-out { - -webkit-animation: uk-fade 0.5s linear reverse; - animation: uk-fade 0.5s linear reverse; -} -/* - * Scroll - */ -.uk-slideshow-scroll-forward-in { - -webkit-animation: uk-slide-right 0.5s ease-in-out; - animation: uk-slide-right 0.5s ease-in-out; -} -.uk-slideshow-scroll-forward-out { - -webkit-animation: uk-slide-left 0.5s ease-in-out reverse; - animation: uk-slide-left 0.5s ease-in-out reverse; -} -.uk-slideshow-scroll-backward-in { - -webkit-animation: uk-slide-left 0.5s ease-in-out; - animation: uk-slide-left 0.5s ease-in-out; -} -.uk-slideshow-scroll-backward-out { - -webkit-animation: uk-slide-right 0.5s ease-in-out reverse; - animation: uk-slide-right 0.5s ease-in-out reverse; -} -/* - * Scale - */ -.uk-slideshow-scale-out { - -webkit-animation: uk-fade-scale-15 0.5s ease-in-out reverse; - animation: uk-fade-scale-15 0.5s ease-in-out reverse; -} -/* - * Swipe - */ -.uk-slideshow-swipe-forward-in { - -webkit-animation: uk-slide-left-33 0.5s ease-in-out; - animation: uk-slide-left-33 0.5s ease-in-out; -} -.uk-slideshow-swipe-forward-out { - -webkit-animation: uk-slide-left 0.5s ease-in-out reverse; - animation: uk-slide-left 0.5s ease-in-out reverse; -} -.uk-slideshow-swipe-backward-in { - -webkit-animation: uk-slide-right-33 0.5s ease-in-out; - animation: uk-slide-right-33 0.5s ease-in-out; -} -.uk-slideshow-swipe-backward-out { - -webkit-animation: uk-slide-right 0.5s ease-in-out reverse; - animation: uk-slide-right 0.5s ease-in-out reverse; -} -.uk-slideshow-swipe-forward-in:before, -.uk-slideshow-swipe-backward-in:before { - content: ''; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - z-index: 1; - background: rgba(0, 0, 0, 0.6); - -webkit-animation: uk-fade 0.5s ease-in-out reverse; - animation: uk-fade 0.5s ease-in-out reverse; -} -/* slider */ -/*! UIkit 2.27.5 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ -/* ======================================================================== - Component: Slider - ========================================================================== */ -/* - * RTL Compatibility - */ -[data-uk-slider] { - direction: ltr; -} -html[dir="rtl"] .uk-slider > * { - direction: rtl; -} -/* - * 1. Create position context - * 2. Create stacking context to prevent z-index issues with other components - * 3. Deactivate browser history navigation in IE11 - */ -.uk-slider { - /* 1 */ - position: relative; - /* 2 */ - z-index: 0; - /* 3 */ - -ms-touch-action: pan-y; - touch-action: pan-y; -} -/* - * 1. Reset list style without interfering with grid - */ -.uk-slider:not(.uk-grid) { - /* 1 */ - margin: 0; - padding: 0; - list-style: none; -} -/* - * Sub-object item - * 1. Position items above each other - */ -.uk-slider > * { - /* 1 */ - position: absolute; - top: 0; - left: 0; -} -/* - * Clip child elements - */ -.uk-slider-container { - overflow: hidden; -} -/* - * Dragged - */ -.uk-slider:not(.uk-drag) { - -webkit-transition: -webkit-transform 200ms linear; - transition: -webkit-transform 200ms linear; - transition: transform 200ms linear; - transition: transform 200ms linear, -webkit-transform 200ms linear; -} -/* - * 1. Makes text unselectable - */ -.uk-slider.uk-drag { - cursor: col-resize; - /* 1 */ - -moz-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; - user-select: none; -} -/* - * 1. Prevents images and links from being dragged (default browser behavior) - * 2. Disables the default callout shown when you touch and hold a touch target - * Currently only works in Webkit - */ -.uk-slider a, -.uk-slider img { - /* 1 */ - -webkit-user-drag: none; - user-drag: none; - /* 2 */ - -webkit-touch-callout: none; -} -/* - * 1. Prevents images and links from being dragged in Firefox - */ -.uk-slider img { - pointer-events: none; -} -/* Modifier: `uk-slider-fullscreen` - ========================================================================== */ -.uk-slider-fullscreen, -.uk-slider-fullscreen > li { - height: 100vh; -} -.uk-slider .uk-active .md-card { - -webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); - box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); -} -.uk-slider-center li { - opacity: 0.4; -} -.uk-slider-center li.uk-active { - opacity: 1; -} -/* slidenav */ -/*! UIkit 2.27.5 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ -/* ======================================================================== - Component: Slidenav - ========================================================================== */ -/* - * 1. Required for `a` elements - * 2. Dimension - * 3. Style - */ -.uk-slidenav { - /* 1 */ - display: inline-block; - /* 2 */ - -webkit-box-sizing: border-box; - box-sizing: border-box; - width: 60px; - height: 60px; - /* 3 */ - line-height: 60px; - color: rgba(50, 50, 50, 0.4); - font-size: 60px; - text-align: center; -} -/* - * Hover - * 1. Apply hover style also to focus state - * 2. Remove default focus style - * 3. Required for `a` elements - * 4. Style - */ -.uk-slidenav:hover, -.uk-slidenav:focus { - /* 2 */ - outline: none; - /* 3 */ - text-decoration: none; - /* 4 */ - color: rgba(50, 50, 50, 0.7); - cursor: pointer; -} -/* Active */ -.uk-slidenav:active { - color: rgba(50, 50, 50, 0.9); -} -/* - * Icons - */ -.uk-slidenav-previous:before { - content: "\f104"; - font-family: FontAwesome; -} -.uk-slidenav-next:before { - content: "\f105"; - font-family: FontAwesome; -} -/* Sub-object: `uk-slidenav-position` - ========================================================================== */ -/* - * Create position context - */ -.uk-slidenav-position { - position: relative; -} -/* - * Center vertically - */ -.uk-slidenav-position .uk-slidenav { - display: none; - position: absolute; - top: 50%; - z-index: 1; - margin-top: -30px; -} -.uk-slidenav-position:hover .uk-slidenav { - display: block; -} -.uk-slidenav-position .uk-slidenav-previous { - left: 20px; -} -.uk-slidenav-position .uk-slidenav-next { - right: 20px; -} -/* Modifier: `uk-slidenav-contrast` - ========================================================================== */ -.uk-slidenav-contrast { - color: rgba(255, 255, 255, 0.5); -} -/* - * Hover - * 1. Apply hover style also to focus state - */ -.uk-slidenav-contrast:hover, -.uk-slidenav-contrast:focus { - color: rgba(255, 255, 255, 0.7); -} -/* Active */ -.uk-slidenav-contrast:active { - color: rgba(255, 255, 255, 0.9); -} -/* tooltips */ -/*! UIkit 2.27.5 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ -/* ======================================================================== - Component: Tooltip - ========================================================================== */ -/* - * 1. Hide by default - * 2. Set fixed position - * 3. Set dimensions - * 4. Set style - */ -.uk-tooltip { - /* 1 */ - display: none; - /* 2 */ - position: absolute; - z-index: 1030; - /* 3 */ - -webkit-box-sizing: border-box; - box-sizing: border-box; - max-width: 200px; - padding: 5px 8px; - /* 4 */ - background: #333; - color: rgba(255, 255, 255, 0.7); - font-size: 12px; - line-height: 18px; - border-radius: 3px; - text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5); -} -/* Triangle - ========================================================================== */ -/* - * 1. Dashed is less antialised than solid - */ -.uk-tooltip:after { - content: ""; - display: block; - position: absolute; - width: 0; - height: 0; - /* 1 */ - border: 5px dashed #333; -} -/* Direction modifiers - ========================================================================== */ -/* - * Top - */ -.uk-tooltip-top:after, -.uk-tooltip-top-left:after, -.uk-tooltip-top-right:after { - bottom: -5px; - border-top-style: solid; - border-bottom: none; - border-left-color: transparent; - border-right-color: transparent; - border-top-color: #333; -} -/* - * Bottom - */ -.uk-tooltip-bottom:after, -.uk-tooltip-bottom-left:after, -.uk-tooltip-bottom-right:after { - top: -5px; - border-bottom-style: solid; - border-top: none; - border-left-color: transparent; - border-right-color: transparent; - border-bottom-color: #333; -} -/* - * Top/Bottom center - */ -.uk-tooltip-top:after, -.uk-tooltip-bottom:after { - left: 50%; - margin-left: -5px; -} -/* - * Top/Bottom left - */ -.uk-tooltip-top-left:after, -.uk-tooltip-bottom-left:after { - left: 10px; -} -/* - * Top/Bottom right - */ -.uk-tooltip-top-right:after, -.uk-tooltip-bottom-right:after { - right: 10px; -} -/* - * Left - */ -.uk-tooltip-left:after { - right: -5px; - top: 50%; - margin-top: -5px; - border-left-style: solid; - border-right: none; - border-top-color: transparent; - border-bottom-color: transparent; - border-left-color: #333; -} -/* - * Right - */ -.uk-tooltip-right:after { - left: -5px; - top: 50%; - margin-top: -5px; - border-right-style: solid; - border-left: none; - border-top-color: transparent; - border-bottom-color: transparent; - border-right-color: #333; -} -.uk-tooltip { - background: #424242; - color: #fff; - font-size: 13px; - padding: 3px 16px; - line-height: 22px; - text-shadow: none; - min-width: 80px; - text-align: center; - z-index: 1304; - opacity: 0; -} -.uk-tooltip .uk-tooltip-inner { - text-overflow: ellipsis; - display: inline-block; - vertical-align: top; - white-space: nowrap; - overflow: hidden; - width: 100%; -} -.uk-tooltip:after { - display: none !important; -} -.uk-tooltip.long-text { - text-align: left; -} -.uk-tooltip.long-text .uk-tooltip-inner { - white-space: normal; - overflow: visible; - line-height: 18px; - padding: 4px 0; -} -.uk-tooltip-small { - -webkit-transform: scale(0.85); - transform: scale(0.85); -} -.uk-tooltip-top { - z-index: 9999; -} -.touch .uk-tooltip { - opacity: 1; -} -/* tabs */ -.uk-tab { - border-bottom-color: rgba(0, 0, 0, 0.12); -} -.uk-sticky-placeholder .uk-tab { - background: #fff; - padding-top: 8px; -} -.uk-tab > li { - margin-bottom: 0; - margin-top: 0 ; - z-index: 1; -} -.uk-tab > li > a { - font-size: 13px; - text-transform: uppercase; - color: #212121; - border: none; - border-bottom: 2px solid transparent; - border-radius: 0 !important; - font-weight: 500; - min-width: 100px; - max-width: 100%; - text-align: center; - -webkit-transition: all 220ms cubic-bezier(0.4, 0, 0.2, 1); - transition: all 220ms cubic-bezier(0.4, 0, 0.2, 1); - padding: 8px !important; - margin: 0 !important; - -webkit-box-sizing: border-box; - box-sizing: border-box; - position: relative; - top: 1px; - text-shadow: none; -} -.uk-tab > li > a:hover, -.uk-tab > li > a:focus { - background: none; - color: #212121; - border-bottom-color: #b2dbfb; -} -.uk-tab > li.uk-active > a { - background: transparent !important; - border-bottom-color: #2196f3; -} -.uk-tab > li.uk-disabled > a, -.uk-tab > li.uk-disabled > a:hover, -.uk-tab > li.uk-disabled > a:focus { - color: #aaa; -} -.uk-tab-bottom li { - margin-top: 0; -} -.uk-tab-bottom li > a { - border-top: 2px solid transparent; - border-bottom: none; - top: auto; - bottom: 1px; -} -.uk-tab-bottom li > a:hover, -.uk-tab-bottom li > a:focus { - border-top-color: #b2dbfb; -} -.uk-tab-bottom li.uk-active > a { - border-top-color: #2196f3; -} -.uk-tab-left { - border-bottom: none; -} -.uk-tab-left li > a { - border-right: 2px solid transparent; - border-bottom: none; - text-align: right; - top: auto; - bottom: auto; -} -.uk-tab-left li > a:hover, -.uk-tab-left li > a:focus { - border-right-color: #b2dbfb; -} -.uk-tab-left li.uk-active > a { - border-right-color: #2196f3; -} -.uk-tab-right { - border-bottom: none; -} -.uk-tab-right li > a { - border-left: 2px solid transparent; - border-bottom: none; - text-align: left; - top: auto; - bottom: auto; -} -.uk-tab-right li > a:hover, -.uk-tab-right li > a:focus { - border-left-color: #b2dbfb; -} -.uk-tab-right li.uk-active > a { - border-left-color: #2196f3; -} -.uk-tab-responsive li a { - border: none !important; -} -.uk-tab-responsive > a:before { - content: '\e5d2'; - font-family: "Material Icons"; - color: #727272; - margin-right: 8px; - vertical-align: -4px; - font-size: 18px; -} -.uk-tab-icons > li > a { - min-width: 64px; -} -.uk-tab-icons > li > a > .material-icons { - font-size: 24px; -} -.uk-tab-double-header { - margin: 10px 24px 0 !important; -} -.uk-tab-double-header > li > a { - color: #fff; - border-bottom: 4px solid transparent; -} -.uk-tab-double-header > li > a:hover, -.uk-tab-double-header > li > a:focus { - color: #fff; - border-bottom-color: #39a1f4; -} -.uk-tab-double-header > li.uk-active > a { - color: #fff; - border-bottom-color: #7cb342; -} -.uk-tab-double-header > li.uk-tab-responsive > a { - border-bottom: none; - padding-bottom: 5px !important; -} -.uk-tab-double-header > li.uk-tab-responsive > a:before { - color: #fff; -} -/* text truncate */ -.uk-text-truncate { - display: block; -} -/* sortable */ -/*! UIkit 2.27.5 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ -/* ======================================================================== - Component: Sortable - ========================================================================== */ -.uk-sortable { - position: relative; -} -/* - * Deactivate browser touch actions in IE11 - */ -.uk-sortable > * { - -ms-touch-action: none; - touch-action: none; -} -/* - * Disables the default callout shown when you touch and hold a touch target - * Currently only works in Webkit - */ -.uk-sortable a, -.uk-sortable img { - -webkit-touch-callout: none; -} -/* - * Remove margin from the last-child - */ -.uk-sortable > :last-child { - margin-bottom: 0; -} -/* Sub-modifier `uk-sortable-dragged` - ========================================================================== */ -.uk-sortable-dragged { - position: absolute; - z-index: 1050; - pointer-events: none; -} -/* Sub-modifier `uk-sortable-placeholder` - ========================================================================== */ -.uk-sortable-placeholder { - opacity: 0; -} -/* Empty List - ========================================================================== */ -.uk-sortable-empty { - min-height: 30px; -} -/* Sub-object `uk-sortable-handle` - ========================================================================== */ -/* - * Deactivate browser touch actions in IE11 - */ -.uk-sortable-handle { - -ms-touch-action: none; - touch-action: none; -} -/* Hover */ -.uk-sortable-handle:hover { - cursor: move; -} -/* Sub-object `uk-sortable-moving` - ========================================================================== */ -.uk-sortable-moving, -.uk-sortable-moving * { - cursor: move; -} -/* Fixes dragging items over iframes */ -.uk-sortable-moving iframe { - pointer-events: none; -} -.uk-sortable > * { - -ms-touch-action: auto; - touch-action: auto; -} -.uk-sortable.sortable-handler > * { - cursor: move; -} -.uk-sortable .sortable-handler { - cursor: move; -} -.uk-sortable-single { - min-height: 0; -} -.uk-switcher { - overflow: hidden; -} -/* -* add extra Uikit grid sizes -* -* usage: -* set custom breakpoint (1480px) and name ("xlarge-x") -* @media (min-width: 1480px) { -* .add-grid-sizes(xlarge-x); -* } -*/ -@media (min-width: 1480px) { - /* Whole */ - .uk-width-xLarge-1-1, - .uk-grid-width-xLarge-1-1 > * { - width: 100%; - } - /* Halves */ - .uk-width-xLarge-1-2, - .uk-width-xLarge-2-4, - .uk-width-xLarge-3-6, - .uk-width-xLarge-5-10, - .uk-grid-width-xLarge-1-2 > *, - .uk-grid-width-xLarge-2-4 > *, - .uk-grid-width-xLarge-3-6 > *, - .uk-grid-width-xLarge-5-10 > * { - width: 50%; - } - /* Thirds */ - .uk-width-xLarge-1-3, - .uk-width-xLarge-2-6, - .uk-grid-width-xLarge-1-3 > *, - .uk-grid-width-xLarge-2-6 > * { - width: 33.333%; - } - .uk-width-xLarge-2-3, - .uk-width-xLarge-4-6, - .uk-grid-width-xLarge-2-3 > *, - .uk-grid-width-xLarge-4-6 > * { - width: 66.666%; - } - /* Quarters */ - .uk-width-xLarge-1-4, - .uk-grid-width-xLarge-1-4 > * { - width: 25%; - } - .uk-width-xLarge-3-4, - .uk-grid-width-xLarge-3-4 > * { - width: 75%; - } - /* Fifths */ - .uk-width-xLarge-1-5, - .uk-width-xLarge-2-10, - .uk-grid-width-xLarge-1-5 > *, - .uk-grid-width-xLarge-2-10 > * { - width: 20%; - } - .uk-width-xLarge-2-5, - .uk-width-xLarge-4-10, - .uk-grid-width-xLarge-2-5 > *, - .uk-grid-width-xLarge-4-10 > * { - width: 40%; - } - .uk-width-xLarge-3-5, - .uk-width-xLarge-6-10, - .uk-grid-width-xLarge-3-5 > *, - .uk-grid-width-xLarge-6-10 > * { - width: 60%; - } - .uk-width-xLarge-4-5, - .uk-width-xLarge-8-10, - .uk-grid-width-xLarge-4-5 > *, - .uk-grid-width-xLarge-8-10 > * { - width: 80%; - } - /* Sixths */ - .uk-width-xLarge-1-6, - .uk-grid-width-xLarge-1-6 > * { - width: 16.666%; - } - .uk-width-xLarge-5-6, - .uk-grid-width-xLarge-5-6 > * { - width: 83.333%; - } - /* Tenths */ - .uk-width-xLarge-1-10, - .uk-grid-width-xLarge-1-10 > * { - width: 10%; - } - .uk-width-xLarge-3-10, - .uk-grid-width-xLarge-3-10 > * { - width: 30%; - } - .uk-width-xLarge-7-10, - .uk-grid-width-xLarge-7-10 > * { - width: 70%; - } - .uk-width-xLarge-9-10, - .uk-grid-width-xLarge-9-10 > * { - width: 90%; - } -} -/* ie9 fixes */ -.lte-ie9 *[class*="uk-animation-"] { - opacity: 1 !important; -} -/* bg colors */ -.md-bg-cyan { - background-color: #00acc1 !important; - color: #fff; -} -.md-bg-light-green { - background-color: #7cb342 !important; - color: #fff; -} -.md-bg-grey { - background-color: #616161 !important; - color: #fff; -} -.md-bg-red { - background-color: #d32f2f !important; - color: #fff; -} -.md-bg-light-blue { - background-color: #0288d1 !important; - color: #fff; -} -.md-bg-teal { - background-color: #00897b !important; - color: #fff; -} -.md-bg-purple { - background-color: #8e24aa !important; - color: #fff; -} -/* buttons */ -.md-btn { - background: #fff; - border: none; - border-radius: 2px; - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); - min-height: 31px; - min-width: 70px; - padding: 2px 16px; - text-align: center; - text-shadow: none; - text-transform: uppercase; - -webkit-transition: all 280ms ease; - transition: all 280ms ease; - color: #212121; - -webkit-box-sizing: border-box; - box-sizing: border-box; - cursor: pointer; - -webkit-appearance: none; - display: inline-block; - vertical-align: middle; - font: 500 14px / 31px "Roboto", sans-serif !important; -} -.md-btn:hover, -.md-btn:focus, -.md-btn:active, -.uk-button-dropdown.uk-open > .md-btn { - background: #fff; - outline: none; - text-decoration: none; - color: #212121; - -webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); - box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); -} -.md-btn:active, -.md-btn.uk-active, -.uk-button-dropdown.uk-open > .md-btn { - -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); - box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); -} -.md-btn.uk-active { - position: relative; -} -.md-btn.uk-active:after { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - display: block; - content: ''; - border: 2px solid rgba(0, 0, 0, 0.4); - border-radius: 2px; -} -.md-btn-flat { - -webkit-box-shadow: none !important; - box-shadow: none !important; - background: none; -} -.md-btn-flat:hover, -.md-btn-flat:focus { - background: rgba(153, 153, 153, 0.2); -} -.md-btn-flat:active, -.md-btn-flat.uk-active { - background: rgba(153, 153, 153, 0.4); -} -.md-btn-flat-danger, -.md-btn-flat-danger:hover, -.md-btn-flat-danger:focus, -.md-btn-flat-danger:active, -.md-btn-flat-danger .uk-active { - color: #e53935; -} -.md-btn-flat-danger:hover, -.md-btn-flat-danger:focus, -.md-btn-flat-danger:active { - background: #fceaea; -} -.md-btn-flat-danger.uk-active { - color: #cd1e1a; - background: #f6bebd; -} -.md-btn-flat-primary, -.md-btn-flat-primary:hover, -.md-btn-flat-primary:focus, -.md-btn-flat-primary:active, -.md-btn-flat-primary.uk-active { - color: #1976d2; -} -.md-btn-flat-primary:hover, -.md-btn-flat-primary:focus, -.md-btn-flat-primary:active { - background: #e3f2fd; -} -.md-btn-flat-primary.uk-active { - color: #0c7cd5; - background: #b2dbfb; -} -.md-btn-flat-success, -.md-btn-flat-success:hover, -.md-btn-flat-success:focus, -.md-btn-flat-success:active, -.md-btn-flat-success.uk-active { - color: #7cb342; -} -.md-btn-flat-success:hover, -.md-btn-flat-success:focus, -.md-btn-flat-success:active { - background: #e1efd2; -} -.md-btn-flat-success.uk-active { - color: #628e34; - background: #c8e1ad; -} -.md-btn-flat-warning, -.md-btn-flat-warning:hover, -.md-btn-flat-warning:focus, -.md-btn-flat-warning:active, -.md-btn-flat-warning.uk-active { - color: #ffa000; -} -.md-btn-flat-warning:hover, -.md-btn-flat-warning:focus, -.md-btn-flat-warning:active { - background: #ffeccc; -} -.md-btn-flat-warning.uk-active { - color: #cc8000; - background: #ffd999; -} -.md-btn-flat.disabled { - background: none !important; -} -.md-btn-danger, -.md-btn-danger:hover, -.md-btn-danger:focus, -.md-btn-danger:active, -.md-btn-danger.uk-active { - background: #e53935; -} -.md-btn-primary, -.md-btn-primary:hover, -.md-btn-primary:focus, -.md-btn-primary:active, -.md-btn-primary.uk-active { - background: #2196f3; -} -.md-btn-success, -.md-btn-success:hover, -.md-btn-success:focus, -.md-btn-success:active, -.md-btn-success.uk-active { - background: #7cb342; -} -.md-btn-warning, -.md-btn-warning:hover, -.md-btn-warning:focus, -.md-btn-warning:active, -.md-btn-warning.uk-active { - background: #ffa000; -} -.md-btn-danger, -.md-btn-primary, -.md-btn-success, -.md-btn-warning, -.md-btn-danger:hover, -.md-btn-primary:hover, -.md-btn-success:hover, -.md-btn-warning:hover, -.md-btn-danger:focus, -.md-btn-primary:focus, -.md-btn-success:focus, -.md-btn-warning:focus, -.md-btn-danger:active, -.md-btn-primary:active, -.md-btn-success:active, -.md-btn-warning:active, -.md-btn-danger.uk-active, -.md-btn-primary.uk-active, -.md-btn-success.uk-active, -.md-btn-warning.uk-active, -.md-btn-danger > i, -.md-btn-primary > i, -.md-btn-success > i, -.md-btn-warning > i { - color: #fff; -} -.md-btn.disabled, -.md-btn.disabled:hover, -.md-btn.disabled:focus, -.md-btn.disabled:active, -.md-btn.disabled.uk-active { - color: #a8a8a8; - background: #eaeaea; - -webkit-box-shadow: none !important; - box-shadow: none !important; - cursor: default; - pointer-events: none; -} -.md-btn > i.material-icons { - margin-top: 5px; - font-size: 18px; -} -.md-btn-mini { - line-height: 21px !important; - min-width: 12px; - font-size: 10px !important; - min-height: 24px; -} -.md-btn-small { - line-height: 27px !important; - min-width: 14px; - font-size: 11px !important; -} -.md-btn-large { - line-height: 42px !important; - font-size: 16px !important; -} -.md-btn::-moz-focus-inner { - border: 0; - padding: 0; -} -.md-btn + .md-btn { - margin-left: 8px; -} -.md-btn-block { - width: 100%; -} -.md-btn-block + .md-btn-block { - margin-left: 0; - margin-top: 12px; -} -.md-btn + .md-btn-group { - margin-left: 16px; -} -.md-btn-facebook { - background: #3b5998 !important; -} -.md-btn-twitter { - background: #00aced !important; -} -.md-btn-gplus { - background: #dd4b39 !important; -} -.md-btn-facebook, -.md-btn-twitter, -.md-btn-gplus, -.md-btn-facebook > i, -.md-btn-twitter > i, -.md-btn-gplus > i { - color: #fff !important; -} -.md-btn-icon > i.no_margin { - margin-right: 0 !important; - margin-left: 0 !important; -} -.md-btn-icon-large, -.md-btn-icon.md-btn-large { - min-width: 72px; -} -.md-btn-icon-large > i, -.md-btn-icon.md-btn-large > i { - font-size: 24px; - margin-right: 12px; - vertical-align: -3px; -} -.md-btn-icon-default, -.md-btn-icon { - min-width: 64px; -} -.md-btn-icon-default > i, -.md-btn-icon > i { - font-size: 18px; - margin-right: 8px; - vertical-align: -2px; -} -.md-btn-icon-small, -.md-btn-icon.md-btn-small { - min-width: 48px; -} -.md-btn-icon-small > i, -.md-btn-icon.md-btn-small > i { - font-size: 16px; - margin-right: 6px; - vertical-align: -2px; -} -.md-btn-icon-mini, -.md-btn-icon.md-btn-mini { - min-width: 36px; -} -.md-btn-icon-mini > i, -.md-btn-icon.md-btn-mini > i { - font-size: 16px; - margin-right: 4px; - vertical-align: -2px; -} -.md-fab { - -webkit-box-sizing: border-box; - box-sizing: border-box; - width: 64px; - height: 64px; - border-radius: 50%; - background: #fff; - color: #727272; - display: block; - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); - -webkit-transition: -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1); - transition: -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1); - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1); - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1); - border: none; - position: relative; - text-align: center; - cursor: pointer; -} -.md-fab:hover, -.md-fab:focus, -.md-fab:active { - -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); - box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); -} -.md-fab > i { - font-size: 36px; - line-height: 64px; - height: inherit; - width: inherit; - position: absolute; - left: 0; - top: 0; - color: #727272; -} -.md-fab.md-fab-accent { - background: #7cb342; -} -.md-fab.md-fab-accent > i { - color: #fff; -} -.md-fab.md-fab-success { - background: #7cb342; -} -.md-fab.md-fab-success > i { - color: #fff; -} -.md-fab.md-fab-danger { - background: #e53935; -} -.md-fab.md-fab-danger > i { - color: #fff; -} -.md-fab.md-fab-primary { - background: #2196f3; -} -.md-fab.md-fab-primary > i { - color: #fff; -} -.md-fab.md-fab-warning { - background: #ffa000; -} -.md-fab.md-fab-warning > i { - color: #fff; -} -.md-fab.md-fab-small { - width: 48px; - height: 48px; - border-radius: 50%; -} -.md-fab.md-fab-small > i { - line-height: 48px; - height: inherit; - width: inherit; - font-size: 24px; -} -.md-fab-speed-dial .md-fab-action-close { - display: none; -} -.md-fab-wrapper { - position: fixed; - bottom: 24px; - right: 24px; - z-index: 1004; - -webkit-transition: margin 280ms cubic-bezier(0.4, 0, 0.2, 1); - transition: margin 280ms cubic-bezier(0.4, 0, 0.2, 1); -} -@media only screen and (max-width: 767px) { - .md-fab-wrapper { - bottom: 20px; - right: 20px; - } -} -.md-fab-wrapper > .md-fab + .md-fab { - margin-top: 16px; -} -.md-fab-wrapper.md-fab-in-card { - position: absolute; -} -.md-fab-speed-dial .md-fab-wrapper-small { - position: absolute; - bottom: 80px; - right: 8px; - min-height: 48px; - width: 48px; - z-index: -1; -} -.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small { - -webkit-transform: scale(0); - transform: scale(0); - opacity: 0; - position: absolute; - right: 0; -} -.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-child(1) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms; -} -.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-last-child(2) { - bottom: 64px; -} -.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-child(2) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; -} -.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-last-child(3) { - bottom: 128px; -} -.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-child(3) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms; -} -.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-last-child(4) { - bottom: 192px; -} -.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-child(4) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms; -} -.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-last-child(5) { - bottom: 256px; -} -.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-child(5) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms; -} -.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-last-child(6) { - bottom: 320px; -} -.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-child(6) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms; -} -.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-last-child(7) { - bottom: 384px; -} -.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-child(7) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms; -} -.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-last-child(8) { - bottom: 448px; -} -.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-child(8) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms; -} -.md-fab-speed-dial.md-fab-active .md-fab-small { - -webkit-transform: scale(1); - transform: scale(1); - opacity: 1; - z-index: 10; -} -.md-fab-speed-dial.md-fab-active .md-fab-small:nth-last-child(1) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms; -} -.md-fab-speed-dial.md-fab-active .md-fab-small:nth-last-child(2) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; -} -.md-fab-speed-dial.md-fab-active .md-fab-small:nth-last-child(3) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms; -} -.md-fab-speed-dial.md-fab-active .md-fab-small:nth-last-child(4) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms; -} -.md-fab-speed-dial.md-fab-active .md-fab-small:nth-last-child(5) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms; -} -.md-fab-speed-dial.md-fab-active .md-fab-small:nth-last-child(6) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms; -} -.md-fab-speed-dial.md-fab-active .md-fab-small:nth-last-child(7) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms; -} -.md-fab-speed-dial.md-fab-active .md-fab-small:nth-last-child(8) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms; -} -.md-fab-speed-dial-horizontal .md-fab-wrapper-small { - position: absolute; - right: 80px; - bottom: 8px; - min-height: 48px; - width: 48px; - z-index: -1; -} -.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small { - -webkit-transform: scale(0); - transform: scale(0); - opacity: 0; - position: absolute; - right: 0; -} -.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-child(1) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms; -} -.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-last-child(2) { - right: 64px; -} -.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-child(2) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; -} -.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-last-child(3) { - right: 128px; -} -.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-child(3) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms; -} -.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-last-child(4) { - right: 192px; -} -.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-child(4) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms; -} -.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-last-child(5) { - right: 256px; -} -.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-child(5) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms; -} -.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-last-child(6) { - right: 320px; -} -.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-child(6) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms; -} -.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-last-child(7) { - right: 384px; -} -.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-child(7) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms; -} -.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-last-child(8) { - right: 448px; -} -.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-child(8) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms; -} -.md-fab-speed-dial-horizontal.md-fab-active .md-fab-small { - -webkit-transform: scale(1); - transform: scale(1); - opacity: 1; - z-index: 10; -} -.md-fab-speed-dial-horizontal.md-fab-active .md-fab-small:nth-last-child(1) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 50ms; -} -.md-fab-speed-dial-horizontal.md-fab-active .md-fab-small:nth-last-child(2) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 100ms; -} -.md-fab-speed-dial-horizontal.md-fab-active .md-fab-small:nth-last-child(3) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 150ms; -} -.md-fab-speed-dial-horizontal.md-fab-active .md-fab-small:nth-last-child(4) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 200ms; -} -.md-fab-speed-dial-horizontal.md-fab-active .md-fab-small:nth-last-child(5) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 250ms; -} -.md-fab-speed-dial-horizontal.md-fab-active .md-fab-small:nth-last-child(6) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms; -} -.md-fab-speed-dial-horizontal.md-fab-active .md-fab-small:nth-last-child(7) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms; -} -.md-fab-speed-dial-horizontal.md-fab-active .md-fab-small:nth-last-child(8) { - -webkit-transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms; - transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms; - transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms, opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms, -webkit-box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 100ms cubic-bezier(0.4, 0, 0.2, 1) 400ms; -} -.md-fab-speed-dial-horizontal[data-fab-hover] .md-fab { - display: inline-block; - vertical-align: bottom; -} -.md-fab-speed-dial-horizontal[data-fab-hover] .md-fab-wrapper-small { - display: none; - min-height: 48px; - width: auto; - z-index: -1; - white-space: nowrap; - padding-bottom: 8px; - vertical-align: bottom; - position: static; - right: auto; - bottom: auto; -} -.md-fab-speed-dial-horizontal[data-fab-hover] .md-fab-wrapper-small .md-fab-small { - position: static; - right: auto; - display: inline-block; - vertical-align: bottom; -} -.md-fab-speed-dial-horizontal[data-fab-hover] .md-fab-wrapper-small .md-fab-small + .md-fab-small { - margin-left: 16px; -} -.md-fab-speed-dial-horizontal[data-fab-hover] .md-fab-wrapper-small .md-fab-small:last-child { - margin-right: 16px; -} -.md-fab-speed-dial-horizontal[data-fab-hover].md-fab-over .md-fab-wrapper-small { - display: inline-block; -} -.md-fab-speed-dial[data-fab-hover] .md-fab-wrapper-small { - margin-left: 8px; - position: static; - display: none; - bottom: auto; - right: auto; -} -.md-fab-speed-dial[data-fab-hover] .md-fab-wrapper-small .md-fab-small { - position: static; - bottom: auto; -} -.md-fab-speed-dial[data-fab-hover] .md-fab-wrapper-small .md-fab-small + .md-fab-small { - margin-top: 16px; -} -.md-fab-speed-dial[data-fab-hover] .md-fab-wrapper-small .md-fab-small:last-child { - margin-bottom: 16px; -} -.md-fab-speed-dial[data-fab-hover].md-fab-over .md-fab-wrapper-small { - display: block; -} -.md-fab-toolbar { - -webkit-transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1); - transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1); - cursor: default; -} -.md-fab-toolbar > i { - cursor: pointer; -} -.md-fab-toolbar-actions { - visibility: hidden; - white-space: nowrap; - padding: 0 16px; - overflow: hidden; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} -.md-fab-toolbar-actions > a, -.md-fab-toolbar-actions > button { - display: block; - float: left; - opacity: 0; - margin: 0 0 0 16px; - height: 64px; - width: 48px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - -webkit-transition: opacity 280ms cubic-bezier(0.4, 0, 0.2, 1); - transition: opacity 280ms cubic-bezier(0.4, 0, 0.2, 1); - background: none; - border: none; - outline: none; - cursor: pointer; -} -.md-fab-toolbar-actions > a:first-child, -.md-fab-toolbar-actions > button:first-child { - margin-left: 0; -} -.md-fab-toolbar-actions .material-icons { - font-size: 36px; - line-height: 64px; -} -.md-fab-toolbar.md-fab-animated { - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); - border-radius: 4px; -} -.md-fab-toolbar.md-fab-animated > i { - display: none; -} -.md-fab-toolbar.md-fab-active .md-fab-toolbar-actions { - visibility: visible; -} -.md-fab-toolbar.md-fab-active .md-fab-toolbar-actions > a, -.md-fab-toolbar.md-fab-active .md-fab-toolbar-actions > button { - opacity: 1; -} -.md-fab-toolbar.md-fab-small .md-fab-toolbar-actions > a, -.md-fab-toolbar.md-fab-small .md-fab-toolbar-actions > button { - height: 48px; - width: 36px; - padding: 0; - margin: 0 0 0 8px; -} -.md-fab-toolbar.md-fab-small .md-fab-toolbar-actions > a:first-child, -.md-fab-toolbar.md-fab-small .md-fab-toolbar-actions > button:first-child { - margin-left: 0; -} -.md-fab-toolbar.md-fab-small .md-fab-toolbar-actions .material-icons { - font-size: 24px; - line-height: 48px; - height: inherit; -} -.md-fab-sheet { - -webkit-transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1); - transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1); - cursor: default; -} -.md-fab-sheet > i { - cursor: pointer; -} -.md-fab-sheet-actions { - visibility: hidden; - white-space: nowrap; - overflow: hidden; - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding: 4px 0; -} -.md-fab-sheet-actions > a { - display: block; - opacity: 0; - padding: 4px 16px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - font: 400 16px / 32px "Roboto", sans-serif; - text-align: left; -} -.md-fab-sheet-actions > a, -.md-fab-sheet-actions > a:hover { - color: #212121; -} -.md-fab-sheet-actions .material-icons { - font-size: 24px; - margin-right: 8px; - vertical-align: -6px; -} -.md-fab-sheet.md-fab-animated { - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); - border-radius: 4px; -} -.md-fab-sheet.md-fab-animated > i { - display: none; -} -.md-fab-sheet.md-fab-active .md-fab-sheet-actions { - visibility: visible; -} -.md-fab-sheet.md-fab-active .md-fab-sheet-actions > a { - opacity: 1; -} -.sidebar_secondary_active .md-fab-wrapper { - margin-right: 264px; -} -@media only screen and (max-width: 767px) { - .sidebar_secondary_active .md-fab-wrapper { - margin-right: 280px; - } -} -.md-toggle-group .md-toggle-button { - border-width: 0 0 2px; - border-style: solid; - border-color: transparent; - background: none; - line-height: 30px; - min-width: 42px; - text-align: center; - padding: 0 8px; - vertical-align: middle; - cursor: pointer; -} -.md-toggle-group .md-toggle-button.md-toggle-active { - border-bottom-color: #212121; -} -.md-toggle-group.md-toggle-group-small .md-toggle-button { - font-size: 11px; - line-height: 24px; - min-width: 16px; - padding: 0 6px; -} -.md-btn-group { - display: inline-block; - vertical-align: top; - position: relative; - font-size: 0; - white-space: nowrap; -} -.md-btn-group .md-btn { - vertical-align: top; - margin-left: 0 !important; -} -.md-btn-group .md-btn:first-child { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} -.md-btn-group .md-btn:not(:first-child):not(:last-child) { - border-radius: 0; -} -.md-btn-group .md-btn:last-child { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} -/* cards */ -.md-card { - background: #fff; - position: relative; - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); - border: none; -} -.md-card + .md-card, -.md-card + .uk-grid, -.uk-grid + .md-card { - margin-top: 25px; -} -.md-card .full_width_in_card { - padding: 16px 24px; - background: rgba(0, 0, 0, 0.085); -} -.md-card .md-card-toolbar { - height: 48px; - padding: 0 16px; - border-bottom: 1px solid rgba(0, 0, 0, 0.12); - background: #fff; -} -.md-card .md-card-toolbar:before, -.md-card .md-card-toolbar:after { - content: " "; - display: table; -} -.md-card .md-card-toolbar:after { - clear: both; -} -.md-card .md-card-toolbar:before, -.md-card .md-card-toolbar:after { - content: " "; - display: table; -} -.md-card .md-card-toolbar:after { - clear: both; -} -.md-card .md-card-toolbar-heading-text { - font: 500 14px / 50px "Roboto", sans-serif; - color: #212121; - margin: 0; - float: left; - overflow: hidden; - height: 48px; -} -.md-card .md-card-toolbar-heading-text.large { - font-size: 18px; - font-weight: 400; -} -.md-card .md-card-toolbar .md-toggle-group { - float: left; - margin: 8px 0 0 16px; -} -.md-card .md-card-toolbar .md-toggle-group.md-toggle-group-small { - margin-top: 10px; -} -.md-card .md-card-toolbar .md-card-toolbar-actions { - float: right; - padding-top: 10px; -} -.md-card .md-card-toolbar .md-card-toolbar-actions .uk-open .md-card-toolbar-icon { - background: rgba(0, 0, 0, 0.085); - color: #212121; -} -.md-card .md-card-toolbar .md-card-toolbar-actions .md-card-dropdown { - display: inline-block; - position: relative; -} -.md-card .md-card-toolbar .md-card-toolbar-actions .selectize-control { - min-width: 220px; - margin-top: -3px; -} -.md-card .md-card-toolbar .md-card-toolbar-actions .selectize-control .selectize-input { - min-height: 30px; - padding: 4px 8px; -} -.md-card .md-card-toolbar .md-card-toolbar-actions .selectize-control .selectize-dropdown { - margin-top: -34px; -} -.md-card .md-card-toolbar .md-icon + .md-card-dropdown { - margin-left: 4px; -} -.md-card .md-card-toolbar .md-card-fullscreen-deactivate { - margin: 9px 8px 0 0; -} -.md-card .md-card-toolbar-input { - border: none; - font: 400 18px / 24px "Roboto", sans-serif; - height: auto; - background: none !important; - padding: 12px 0; - width: 50%; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} -.md-card .md-card-toolbar .uk-tab { - margin-top: -2px; - border-bottom: none; -} -.md-card .md-card-toolbar .uk-tab li > a { - padding: 10px 8px !important; -} -.md-card .md-card-head { - height: 160px; - position: relative; - border-bottom: 1px solid rgba(0, 0, 0, 0.12); -} -.md-card .md-card-head-menu { - position: absolute; - right: 8px; - top: 8px; -} -.md-card .md-card-head-avatar { - width: 82px; - height: 82px; - border-radius: 50%; - margin-top: 16px; - border: 2px solid #fff; - display: inline-block; -} -.md-card .md-card-head-text { - padding: 8px 16px 16px; - font: 500 16px / 22px "Roboto", sans-serif; - color: #212121; - margin: 0; -} -.md-card .md-card-head-text span:not(.listNavSelector) { - display: block; - font: 400 12px / 18px "Roboto", sans-serif; - margin-top: -2px; -} -.md-card .md-card-head-text.text_dark { - color: #212121 !important; -} -.md-card .md-card-head-text-over { - background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.65)), to(rgba(0, 0, 0, 0))); - background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0) 100%); -} -.md-card .md-card-head-subtext { - position: absolute; - bottom: 10px; - left: 0; - right: 0; - padding: 0 16px; - text-align: right; - color: #fff; -} -.md-card .md-card-head-subtext span { - font-size: 26px; -} -.md-card .md-card-head-icon { - font-size: 48px; - color: #fff; - vertical-align: middle; -} -.md-card .md-card-head.head_background { - background-repeat: no-repeat; - background-position: center center; - background-size: cover; - border-bottom-color: transparent; -} -.md-card .md-card-head.head_background .md-card-head-text { - color: #fff; -} -.md-card .md-card-head.head_background_top { - background-repeat: no-repeat; - background-position: center top; -} -.md-card .md-card-head.head_background_bottom { - background-repeat: no-repeat; - background-position: center bottom; -} -.md-card .md-card-head .head_chart { - height: 100px; - width: 100%; - position: absolute !important; - left: 0; - top: 40px; -} -.md-card .md-card-head .fitVid_player { - width: 100%; - height: 160px; - overflow: hidden; -} -.md-card .md-card-head-img { - height: 100%; - width: auto; -} -.md-card .md-card-head iframe { - height: 160px; -} -.md-card .md-card-content { - padding: 16px; -} -.md-card .md-card-content.padding-reset { - padding: 0; -} -.md-card .md-card-content.large-padding { - padding: 24px 35px; -} -.md-card .md-card-content.small-padding { - padding: 8px; -} -.md-card.md-card-fullscreen-activate { - cursor: pointer; -} -.md-card.md-card-fullscreen { - position: fixed; - z-index: 9998; - overflow-x: hidden; - cursor: default; -} -.md-card.md-card-fullscreen .md-card-fullscreen-activate { - display: none; -} -.md-card.md-card-fullscreen .md-card-fullscreen-hide { - display: none; -} -.md-card .md-card-fullscreen-content { - display: none; - padding: 16px; -} -.md-card-fullscreen-content-hidden .md-card .md-card-fullscreen-content { - display: block; - visibility: hidden; - padding: 0; -} -.md-card.mdToolbar_fixed { - overflow-y: hidden; -} -.md-card.mdToolbar_fixed > .md-card-toolbar { - position: fixed; - left: 0; - right: 0; - top: 0; - z-index: 9999; - -webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); - box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); -} -.md-card.mdToolbar_fixed > .md-card-content { - overflow-y: scroll; - -webkit-box-sizing: border-box; - box-sizing: border-box; - position: absolute; - width: 100%; - top: 48px; - bottom: 0; -} -.md-card.mdToolbar_fixed > .md-card-content .md-card-fullscreen-content { - padding: 16px 0; -} -.md-card.md-card-overlay { - overflow: hidden; - padding-bottom: 54px; -} -.md-card.md-card-overlay .md-card-content { - height: 142px; - overflow: hidden; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} -.md-card.md-card-overlay .md-card-content.no_truncate { - position: relative; -} -.md-card.md-card-overlay .md-card-content.no_truncate:after { - position: absolute; - bottom: 0; - left: 0; - right: 0; - height: 8px; - background-image: -webkit-gradient(linear, left bottom, left top, color-stop(50%, #ffffff), to(rgba(255, 255, 255, 0))); - background-image: linear-gradient(to top, #ffffff 50%, rgba(255, 255, 255, 0) 100%); - display: block; - content: ''; - z-index: 10; -} -.md-card.md-card-overlay .md-card-content > pre { - margin-top: 0; - max-height: 110px; -} -.md-card.md-card-overlay .md-card-content > pre > code { - overflow: hidden; -} -.md-card.md-card-overlay .md-card-overlay-content { - position: absolute; - top: 100%; - left: 0; - right: 0; - padding: 0 16px; - margin-top: -54px; - border-top: 1px solid rgba(0, 0, 0, 0.12); - text-align: left; - bottom: 0; - background: #fff; - z-index: 10; - -webkit-transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1); - transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1); -} -.md-card.md-card-overlay .md-card-overlay-content p { - margin: 0; -} -.md-card.md-card-overlay .md-card-overlay-content p + * { - margin-top: 16px; -} -.md-card.md-card-overlay .md-card-overlay-content p + p { - margin-top: 4px; -} -.md-card.md-card-overlay .md-card-overlay-header { - padding: 12px 0; -} -.md-card.md-card-overlay .md-card-overlay-header:before, -.md-card.md-card-overlay .md-card-overlay-header:after { - content: " "; - display: table; -} -.md-card.md-card-overlay .md-card-overlay-header:after { - clear: both; -} -.md-card.md-card-overlay .md-card-overlay-header:before, -.md-card.md-card-overlay .md-card-overlay-header:after { - content: " "; - display: table; -} -.md-card.md-card-overlay .md-card-overlay-header:after { - clear: both; -} -.md-card.md-card-overlay .md-card-overlay-header h3, -.md-card.md-card-overlay .md-card-overlay-header h4 { - margin: 0; - text-overflow: ellipsis; - display: inline-block; - vertical-align: top; - white-space: nowrap; - overflow: hidden; - width: 100%; - padding-right: 32px; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} -.md-card.md-card-overlay .md-card-overlay-header h3 { - font: 400 16px / 30px "Roboto", sans-serif; -} -.md-card.md-card-overlay .md-card-overlay-header h4 { - font: 500 14px / 30px "Roboto", sans-serif; -} -.md-card.md-card-overlay .md-card-overlay-header .md-icon { - position: absolute; - right: 12px; - top: 11px; -} -.md-card.md-card-overlay-active .md-card-overlay-content { - top: -1px; - margin-top: 0; -} -.md-card.md-card-hover { - -webkit-transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1); - transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1); - will-change: box-shadow; -} -.md-card.md-card-hover:hover { - -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); - box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); -} -.uk-sortable-dragged .md-card { - -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); - box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); -} -.uk-sortable-dragged .md-card canvas { - margin: 0 auto; - display: block; -} -.md-card .heading_list { - padding: 0; -} -.md-card-primary, -.md-card-success, -.md-card-danger, -.md-card-warning { - border-left: 4px solid transparent; -} -.md-card-primary { - border-left-color: #2196f3; -} -.md-card-success { - border-left-color: #7cb342; -} -.md-card-danger { - border-left-color: #e53935; -} -.md-card-warning { - border-left-color: #ffa000; -} -.md-card-horizontal { - position: relative; - min-height: 200px; -} -.md-card-horizontal:before, -.md-card-horizontal:after { - content: " "; - display: table; -} -.md-card-horizontal:after { - clear: both; -} -.md-card-horizontal:before, -.md-card-horizontal:after { - content: " "; - display: table; -} -.md-card-horizontal:after { - clear: both; -} -.md-card-horizontal-grid { - min-height: auto; -} -.md-card-horizontal .md-card-head { - border-right: 1px solid rgba(0, 0, 0, 0.12); - border-bottom: none; - width: 200px; - height: 100%; - position: absolute; - left: 0; - top: 0; - bottom: 0; -} -@media only screen and (max-width: 767px) { - .md-card-horizontal .md-card-head { - width: 140px; - } -} -.md-card-horizontal .md-card-head-grid { - border-right: 1px solid rgba(0, 0, 0, 0.12); -} -.md-card-horizontal .md-card-head-menu { - right: auto; - left: 8px; -} -.md-card-horizontal .md-card-content { - margin-left: 200px; -} -@media only screen and (max-width: 767px) { - .md-card-horizontal .md-card-content { - margin-left: 140px; - } -} -.md-card-horizontal .md-card-content-grid { - padding: 16px; -} -.md-expand, -.md-expand-group > * { - opacity: 0; -} -.md-card-placeholder { - min-width: 100%; -} -.md-card-list-wrapper, -.md-card-list-wrapper:before, -.md-card-list-wrapper:after, -.md-card-list-wrapper *, -.md-card-list-wrapper *:before, -.md-card-list-wrapper *:after { - -webkit-box-sizing: border-box; - box-sizing: border-box; -} -.md-card-list-wrapper .md-card-list-header { - position: absolute; - top: -24px; - left: 0; -} -.md-card-list-wrapper .md-card-list { - margin: 48px 0 0 0; - position: relative; -} -.md-card-list-wrapper .md-card-list:first-child { - margin-top: 24px; -} -.md-card-list-wrapper .md-card-list > ul { - margin: 0; - padding: 0; - list-style: none; -} -.md-card-list-wrapper .md-card-list > ul > li { - padding: 0; - margin: 0; - list-style: none; -} -.md-card-list-wrapper .md-card-list > ul > li { - min-height: 34px; - padding: 8px 16px; - font-size: 13px; - -webkit-transition: background 150ms,padding 200ms; - transition: background 150ms,padding 200ms; - background: #fff; - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); -} -.md-card-list-wrapper .md-card-list > ul > li:before, -.md-card-list-wrapper .md-card-list > ul > li:after { - content: " "; - display: table; -} -.md-card-list-wrapper .md-card-list > ul > li:after { - clear: both; -} -.md-card-list-wrapper .md-card-list > ul > li:before, -.md-card-list-wrapper .md-card-list > ul > li:after { - content: " "; - display: table; -} -.md-card-list-wrapper .md-card-list > ul > li:after { - clear: both; -} -.md-card-list-wrapper .md-card-list > ul > li.item-shown { - background: #fff; - padding: 8px 36px; -} -@media only screen and (max-width: 767px) { - .md-card-list-wrapper .md-card-list > ul > li.item-shown .md-card-list-item-subject { - clear: both; - float: none; - padding-top: 16px; - } - .md-card-list-wrapper .md-card-list > ul > li.item-shown .md-card-list-item-subject > span { - white-space: normal; - } -} -.md-card-list-wrapper .md-card-list > ul > li.item-shown .md-card-list-item-sender { - width: auto; - overflow: hidden; -} -.md-card-list-wrapper .md-card-list > ul > li.item-shown.md-card-list-item-selected { - position: relative; -} -.md-card-list-wrapper .md-card-list > ul > li.item-shown.md-card-list-item-selected:before { - content: ''; - position: absolute; - display: block; - left: 0; - top: 0; - bottom: 0; - width: 8px; - background: #e3f2fd; -} -.md-card-list-wrapper .md-card-list .md-card-list-item-select, -.md-card-list-wrapper .md-card-list .md-card-list-item-avatar-wrapper, -.md-card-list-wrapper .md-card-list .md-card-list-item-sender { - float: left; -} -.md-card-list-wrapper .md-card-list .md-card-list-item-select { - padding: 6px 8px 0 0; -} -.md-card-list-wrapper .md-card-list .md-card-list-item-avatar-wrapper, -.md-card-list-wrapper .md-card-list .md-card-list-item-sender, -.md-card-list-wrapper .md-card-list .md-card-list-item-subject, -.md-card-list-wrapper .md-card-list .md-card-list-item-date { - padding: 0 8px; -} -.md-card-list-wrapper .md-card-list .md-card-list-item-avatar-wrapper .md-card-list-item-avatar { - background: #757575; - color: #fff; - width: 34px; - border-radius: 50%; - display: block; -} -.md-card-list-wrapper .md-card-list .md-card-list-item-avatar-wrapper .md-card-list-item-avatar-large { - width: 82px; - border-radius: 50%; -} -.md-card-list-wrapper .md-card-list .md-card-list-item-avatar-wrapper span.md-card-list-item-avatar { - line-height: 34px; - text-transform: uppercase; - text-align: center; -} -.md-card-list-wrapper .md-card-list .md-card-list-item-sender { - width: 220px; - line-height: 34px; -} -.md-card-list-wrapper .md-card-list .md-card-list-item-sender > span { - text-overflow: ellipsis; - display: inline-block; - vertical-align: top; - white-space: nowrap; - overflow: hidden; - width: 100%; -} -@media only screen and (max-width: 1219px) { - .md-card-list-wrapper .md-card-list .md-card-list-item-sender { - display: none; - } -} -.md-card-list-wrapper .md-card-list .md-card-list-item-subject { - overflow: hidden; - font-weight: 500; -} -.md-card-list-wrapper .md-card-list .md-card-list-item-subject > span { - line-height: 34px; - text-overflow: ellipsis; - display: inline-block; - vertical-align: top; - white-space: nowrap; - overflow: hidden; - width: 100%; -} -.md-card-list-wrapper .md-card-list .md-card-list-item-subject .md-card-list-item-sender-small { - display: none; -} -@media only screen and (max-width: 1219px) { - .md-card-list-wrapper .md-card-list .md-card-list-item-subject .md-card-list-item-sender-small { - display: block; - } - .md-card-list-wrapper .md-card-list .md-card-list-item-subject .md-card-list-item-sender-small + span { - line-height: inherit; - } -} -.md-card-list-wrapper .md-card-list .md-card-list-item-subject .md-card-list-item-sender-small > span { - text-overflow: ellipsis; - display: inline-block; - vertical-align: top; - white-space: nowrap; - overflow: hidden; - width: 100%; - font-size: 12px; - color: #999; -} -.md-card-list-wrapper .md-card-list .md-card-list-item-date { - line-height: 34px; - float: right; - color: #999; -} -@media only screen and (max-width: 479px) { - .md-card-list-wrapper .md-card-list .md-card-list-item-date { - display: none; - } -} -.md-card-list-wrapper .md-card-list .md-card-list-item-menu { - float: right; - margin: 0 0 0 8px; - position: relative; -} -.md-card-list-wrapper .md-card-list .md-card-list-item-menu .uk-dropdown .material-icons { - margin-right: 8px; -} -.md-card-list-wrapper .md-card-list .md-card-list-item-content-wrapper { - display: none; - clear: both; - opacity: 0; -} -.md-card-list-wrapper .md-card-list .md-card-list-item-content { - padding: 16px 16px 0 0; - max-height: 360px; - overflow-x: hidden; - margin: 0 0 40px; - top: 20px; - position: relative; - font-size: 14px; -} -.md-card-list-wrapper .md-card-list .md-card-list-item-content + .md-card-list-item-reply { - padding-top: 10px; -} -.md-card-list-wrapper .md-card-list .md-card-list-item-reply { - padding: 16px 0; -} -.md-card-list-wrapper .md-card-list .md-card-list-item-selected { - background: #e3f2fd; -} -/* forms */ -select, -textarea, -input:not([type]), -input[type="text"], -input[type="password"], -input[type="datetime"], -input[type="datetime-local"], -input[type="date"], -input[type="month"], -input[type="time"], -input[type="week"], -input[type="number"], -input[type="email"], -input[type="url"], -input[type="search"], -input[type="tel"], -input[type="color"] { - outline: none; -} -select.md-input, -textarea.md-input, -input:not([type]).md-input, -input[type="text"].md-input, -input[type="password"].md-input, -input[type="datetime"].md-input, -input[type="datetime-local"].md-input, -input[type="date"].md-input, -input[type="month"].md-input, -input[type="time"].md-input, -input[type="week"].md-input, -input[type="number"].md-input, -input[type="email"].md-input, -input[type="url"].md-input, -input[type="search"].md-input, -input[type="tel"].md-input, -input[type="color"].md-input { - border-radius: 0; - border-width: 0 0 1px; - border-style: solid; - border-color: rgba(0, 0, 0, 0.12); - font: 400 15px / 18px "Roboto", sans-serif; - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0); - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding: 12px 4px; - background: transparent; - width: 100%; - display: block; -} -select.md-input.md-input-danger, -textarea.md-input.md-input-danger, -input:not([type]).md-input.md-input-danger, -input[type="text"].md-input.md-input-danger, -input[type="password"].md-input.md-input-danger, -input[type="datetime"].md-input.md-input-danger, -input[type="datetime-local"].md-input.md-input-danger, -input[type="date"].md-input.md-input-danger, -input[type="month"].md-input.md-input-danger, -input[type="time"].md-input.md-input-danger, -input[type="week"].md-input.md-input-danger, -input[type="number"].md-input.md-input-danger, -input[type="email"].md-input.md-input-danger, -input[type="url"].md-input.md-input-danger, -input[type="search"].md-input.md-input-danger, -input[type="tel"].md-input.md-input-danger, -input[type="color"].md-input.md-input-danger { - border-color: #e53935; -} -select.md-input.md-input-danger:focus, -textarea.md-input.md-input-danger:focus, -input:not([type]).md-input.md-input-danger:focus, -input[type="text"].md-input.md-input-danger:focus, -input[type="password"].md-input.md-input-danger:focus, -input[type="datetime"].md-input.md-input-danger:focus, -input[type="datetime-local"].md-input.md-input-danger:focus, -input[type="date"].md-input.md-input-danger:focus, -input[type="month"].md-input.md-input-danger:focus, -input[type="time"].md-input.md-input-danger:focus, -input[type="week"].md-input.md-input-danger:focus, -input[type="number"].md-input.md-input-danger:focus, -input[type="email"].md-input.md-input-danger:focus, -input[type="url"].md-input.md-input-danger:focus, -input[type="search"].md-input.md-input-danger:focus, -input[type="tel"].md-input.md-input-danger:focus, -input[type="color"].md-input.md-input-danger:focus { - border-bottom-color: #e53935; -} -select.md-input.md-input-success, -textarea.md-input.md-input-success, -input:not([type]).md-input.md-input-success, -input[type="text"].md-input.md-input-success, -input[type="password"].md-input.md-input-success, -input[type="datetime"].md-input.md-input-success, -input[type="datetime-local"].md-input.md-input-success, -input[type="date"].md-input.md-input-success, -input[type="month"].md-input.md-input-success, -input[type="time"].md-input.md-input-success, -input[type="week"].md-input.md-input-success, -input[type="number"].md-input.md-input-success, -input[type="email"].md-input.md-input-success, -input[type="url"].md-input.md-input-success, -input[type="search"].md-input.md-input-success, -input[type="tel"].md-input.md-input-success, -input[type="color"].md-input.md-input-success { - border-color: #7cb342; -} -select.md-input.md-input-success:focus, -textarea.md-input.md-input-success:focus, -input:not([type]).md-input.md-input-success:focus, -input[type="text"].md-input.md-input-success:focus, -input[type="password"].md-input.md-input-success:focus, -input[type="datetime"].md-input.md-input-success:focus, -input[type="datetime-local"].md-input.md-input-success:focus, -input[type="date"].md-input.md-input-success:focus, -input[type="month"].md-input.md-input-success:focus, -input[type="time"].md-input.md-input-success:focus, -input[type="week"].md-input.md-input-success:focus, -input[type="number"].md-input.md-input-success:focus, -input[type="email"].md-input.md-input-success:focus, -input[type="url"].md-input.md-input-success:focus, -input[type="search"].md-input.md-input-success:focus, -input[type="tel"].md-input.md-input-success:focus, -input[type="color"].md-input.md-input-success:focus { - border-bottom-color: #7cb342; -} -select.md-input:focus, -textarea.md-input:focus, -input:not([type]).md-input:focus, -input[type="text"].md-input:focus, -input[type="password"].md-input:focus, -input[type="datetime"].md-input:focus, -input[type="datetime-local"].md-input:focus, -input[type="date"].md-input:focus, -input[type="month"].md-input:focus, -input[type="time"].md-input:focus, -input[type="week"].md-input:focus, -input[type="number"].md-input:focus, -input[type="email"].md-input:focus, -input[type="url"].md-input:focus, -input[type="search"].md-input:focus, -input[type="tel"].md-input:focus, -input[type="color"].md-input:focus { - background: transparent; - border-color: rgba(0, 0, 0, 0.12); -} -select.md-input-small, -textarea.md-input-small, -input:not([type]).md-input-small, -input[type="text"].md-input-small, -input[type="password"].md-input-small, -input[type="datetime"].md-input-small, -input[type="datetime-local"].md-input-small, -input[type="date"].md-input-small, -input[type="month"].md-input-small, -input[type="time"].md-input-small, -input[type="week"].md-input-small, -input[type="number"].md-input-small, -input[type="email"].md-input-small, -input[type="url"].md-input-small, -input[type="search"].md-input-small, -input[type="tel"].md-input-small, -input[type="color"].md-input-small { - padding: 4px; -} -select.md-input.uk-form-width-mini, -textarea.md-input.uk-form-width-mini, -input:not([type]).md-input.uk-form-width-mini, -input[type="text"].md-input.uk-form-width-mini, -input[type="password"].md-input.uk-form-width-mini, -input[type="datetime"].md-input.uk-form-width-mini, -input[type="datetime-local"].md-input.uk-form-width-mini, -input[type="date"].md-input.uk-form-width-mini, -input[type="month"].md-input.uk-form-width-mini, -input[type="time"].md-input.uk-form-width-mini, -input[type="week"].md-input.uk-form-width-mini, -input[type="number"].md-input.uk-form-width-mini, -input[type="email"].md-input.uk-form-width-mini, -input[type="url"].md-input.uk-form-width-mini, -input[type="search"].md-input.uk-form-width-mini, -input[type="tel"].md-input.uk-form-width-mini, -input[type="color"].md-input.uk-form-width-mini { - width: 40px; -} -select.md-input.uk-form-width-small, -textarea.md-input.uk-form-width-small, -input:not([type]).md-input.uk-form-width-small, -input[type="text"].md-input.uk-form-width-small, -input[type="password"].md-input.uk-form-width-small, -input[type="datetime"].md-input.uk-form-width-small, -input[type="datetime-local"].md-input.uk-form-width-small, -input[type="date"].md-input.uk-form-width-small, -input[type="month"].md-input.uk-form-width-small, -input[type="time"].md-input.uk-form-width-small, -input[type="week"].md-input.uk-form-width-small, -input[type="number"].md-input.uk-form-width-small, -input[type="email"].md-input.uk-form-width-small, -input[type="url"].md-input.uk-form-width-small, -input[type="search"].md-input.uk-form-width-small, -input[type="tel"].md-input.uk-form-width-small, -input[type="color"].md-input.uk-form-width-small { - width: 130px; -} -select.md-input.uk-form-width-medium, -textarea.md-input.uk-form-width-medium, -input:not([type]).md-input.uk-form-width-medium, -input[type="text"].md-input.uk-form-width-medium, -input[type="password"].md-input.uk-form-width-medium, -input[type="datetime"].md-input.uk-form-width-medium, -input[type="datetime-local"].md-input.uk-form-width-medium, -input[type="date"].md-input.uk-form-width-medium, -input[type="month"].md-input.uk-form-width-medium, -input[type="time"].md-input.uk-form-width-medium, -input[type="week"].md-input.uk-form-width-medium, -input[type="number"].md-input.uk-form-width-medium, -input[type="email"].md-input.uk-form-width-medium, -input[type="url"].md-input.uk-form-width-medium, -input[type="search"].md-input.uk-form-width-medium, -input[type="tel"].md-input.uk-form-width-medium, -input[type="color"].md-input.uk-form-width-medium { - width: 200px; -} -select.md-input.uk-form-width-large, -textarea.md-input.uk-form-width-large, -input:not([type]).md-input.uk-form-width-large, -input[type="text"].md-input.uk-form-width-large, -input[type="password"].md-input.uk-form-width-large, -input[type="datetime"].md-input.uk-form-width-large, -input[type="datetime-local"].md-input.uk-form-width-large, -input[type="date"].md-input.uk-form-width-large, -input[type="month"].md-input.uk-form-width-large, -input[type="time"].md-input.uk-form-width-large, -input[type="week"].md-input.uk-form-width-large, -input[type="number"].md-input.uk-form-width-large, -input[type="email"].md-input.uk-form-width-large, -input[type="url"].md-input.uk-form-width-large, -input[type="search"].md-input.uk-form-width-large, -input[type="tel"].md-input.uk-form-width-large, -input[type="color"].md-input.uk-form-width-large { - width: 500px; -} -select.md-input.inverted-colors, -textarea.md-input.inverted-colors, -input:not([type]).md-input.inverted-colors, -input[type="text"].md-input.inverted-colors, -input[type="password"].md-input.inverted-colors, -input[type="datetime"].md-input.inverted-colors, -input[type="datetime-local"].md-input.inverted-colors, -input[type="date"].md-input.inverted-colors, -input[type="month"].md-input.inverted-colors, -input[type="time"].md-input.inverted-colors, -input[type="week"].md-input.inverted-colors, -input[type="number"].md-input.inverted-colors, -input[type="email"].md-input.inverted-colors, -input[type="url"].md-input.inverted-colors, -input[type="search"].md-input.inverted-colors, -input[type="tel"].md-input.inverted-colors, -input[type="color"].md-input.inverted-colors { - color: #fff; - border-bottom-color: #fff; -} -select.md-input.inverted-colors::-webkit-input-placeholder, -textarea.md-input.inverted-colors::-webkit-input-placeholder, -input:not([type]).md-input.inverted-colors::-webkit-input-placeholder, -input[type="text"].md-input.inverted-colors::-webkit-input-placeholder, -input[type="password"].md-input.inverted-colors::-webkit-input-placeholder, -input[type="datetime"].md-input.inverted-colors::-webkit-input-placeholder, -input[type="datetime-local"].md-input.inverted-colors::-webkit-input-placeholder, -input[type="date"].md-input.inverted-colors::-webkit-input-placeholder, -input[type="month"].md-input.inverted-colors::-webkit-input-placeholder, -input[type="time"].md-input.inverted-colors::-webkit-input-placeholder, -input[type="week"].md-input.inverted-colors::-webkit-input-placeholder, -input[type="number"].md-input.inverted-colors::-webkit-input-placeholder, -input[type="email"].md-input.inverted-colors::-webkit-input-placeholder, -input[type="url"].md-input.inverted-colors::-webkit-input-placeholder, -input[type="search"].md-input.inverted-colors::-webkit-input-placeholder, -input[type="tel"].md-input.inverted-colors::-webkit-input-placeholder, -input[type="color"].md-input.inverted-colors::-webkit-input-placeholder { - /* Chrome/Opera/Safari */ - color: #fff; -} -select.md-input.inverted-colors::-moz-placeholder, -textarea.md-input.inverted-colors::-moz-placeholder, -input:not([type]).md-input.inverted-colors::-moz-placeholder, -input[type="text"].md-input.inverted-colors::-moz-placeholder, -input[type="password"].md-input.inverted-colors::-moz-placeholder, -input[type="datetime"].md-input.inverted-colors::-moz-placeholder, -input[type="datetime-local"].md-input.inverted-colors::-moz-placeholder, -input[type="date"].md-input.inverted-colors::-moz-placeholder, -input[type="month"].md-input.inverted-colors::-moz-placeholder, -input[type="time"].md-input.inverted-colors::-moz-placeholder, -input[type="week"].md-input.inverted-colors::-moz-placeholder, -input[type="number"].md-input.inverted-colors::-moz-placeholder, -input[type="email"].md-input.inverted-colors::-moz-placeholder, -input[type="url"].md-input.inverted-colors::-moz-placeholder, -input[type="search"].md-input.inverted-colors::-moz-placeholder, -input[type="tel"].md-input.inverted-colors::-moz-placeholder, -input[type="color"].md-input.inverted-colors::-moz-placeholder { - /* Firefox 19+ */ - color: #fff; -} -select.md-input.inverted-colors:-ms-input-placeholder, -textarea.md-input.inverted-colors:-ms-input-placeholder, -input:not([type]).md-input.inverted-colors:-ms-input-placeholder, -input[type="text"].md-input.inverted-colors:-ms-input-placeholder, -input[type="password"].md-input.inverted-colors:-ms-input-placeholder, -input[type="datetime"].md-input.inverted-colors:-ms-input-placeholder, -input[type="datetime-local"].md-input.inverted-colors:-ms-input-placeholder, -input[type="date"].md-input.inverted-colors:-ms-input-placeholder, -input[type="month"].md-input.inverted-colors:-ms-input-placeholder, -input[type="time"].md-input.inverted-colors:-ms-input-placeholder, -input[type="week"].md-input.inverted-colors:-ms-input-placeholder, -input[type="number"].md-input.inverted-colors:-ms-input-placeholder, -input[type="email"].md-input.inverted-colors:-ms-input-placeholder, -input[type="url"].md-input.inverted-colors:-ms-input-placeholder, -input[type="search"].md-input.inverted-colors:-ms-input-placeholder, -input[type="tel"].md-input.inverted-colors:-ms-input-placeholder, -input[type="color"].md-input.inverted-colors:-ms-input-placeholder { - /* IE 10+ */ - color: #fff; -} -select.md-input.inverted-colors:-moz-placeholder, -textarea.md-input.inverted-colors:-moz-placeholder, -input:not([type]).md-input.inverted-colors:-moz-placeholder, -input[type="text"].md-input.inverted-colors:-moz-placeholder, -input[type="password"].md-input.inverted-colors:-moz-placeholder, -input[type="datetime"].md-input.inverted-colors:-moz-placeholder, -input[type="datetime-local"].md-input.inverted-colors:-moz-placeholder, -input[type="date"].md-input.inverted-colors:-moz-placeholder, -input[type="month"].md-input.inverted-colors:-moz-placeholder, -input[type="time"].md-input.inverted-colors:-moz-placeholder, -input[type="week"].md-input.inverted-colors:-moz-placeholder, -input[type="number"].md-input.inverted-colors:-moz-placeholder, -input[type="email"].md-input.inverted-colors:-moz-placeholder, -input[type="url"].md-input.inverted-colors:-moz-placeholder, -input[type="search"].md-input.inverted-colors:-moz-placeholder, -input[type="tel"].md-input.inverted-colors:-moz-placeholder, -input[type="color"].md-input.inverted-colors:-moz-placeholder { - /* Firefox 18- */ - color: #fff; -} -select.md-input.uk-form-width-mini { - width: 65px; -} -.md-input-width-small { - min-width: 80px !important; -} -.md-input-width-medium { - min-width: 160px !important; -} -.md-input-width-large { - min-width: 320px !important; -} -textarea.md-input { - min-height: 80px; - resize: none; - overflow: hidden; - -webkit-transition: height 200ms ease-out; - transition: height 200ms ease-out; - line-height: 24px; -} -textarea.no_autosize { - min-height: inherit; - overflow: auto; - -webkit-transition: none; - transition: none; - resize: both; -} -.md-input-wrapper { - position: relative; - padding-top: 4px; - width: 100%; - display: block; -} -.md-input-wrapper .md-input-bar { - display: block; - position: absolute; - bottom: 0; - left: 0; - width: 100%; -} -.md-input-wrapper .md-input-bar:before, -.md-input-wrapper .md-input-bar:after { - content: ''; - display: block; - position: absolute; - bottom: 0; - width: 0; - height: 2px; - background: #1976d2; - -webkit-transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1); - transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1); -} -.md-input-wrapper .md-input-bar:before { - left: 50%; -} -.md-input-wrapper .md-input-bar:after { - right: 50%; -} -.md-input-wrapper .md-input-bar.uk-form-width-mini { - width: 40px; -} -.md-input-wrapper .md-input-bar.uk-form-width-small { - width: 130px; -} -.md-input-wrapper .md-input-bar.uk-form-width-medium { - width: 200px; -} -.md-input-wrapper .md-input-bar.uk-form-width-large { - width: 500px; -} -.md-input-wrapper > label { - color: #727272; - position: absolute; - top: 16px; - left: 4px; - right: 0; - pointer-events: none; - -webkit-transition: all 150ms ease-out; - transition: all 150ms ease-out; -} -.md-input-wrapper + * { - margin-top: 10px; -} -.md-input-wrapper.md-input-wrapper-disabled > label { - color: rgba(0, 0, 0, 0.26); -} -.md-input-wrapper-count { - padding-bottom: 24px; -} -.md-input-wrapper-count .md-input-bar { - bottom: 24px; -} -.md-input-wrapper-count .text-count-wrapper { - font-size: 12px; - position: absolute; - right: 0; - bottom: 0; - opacity: 0; - -webkit-transition: opacity 200ms ease-in; - transition: opacity 200ms ease-in; -} -.md-input-wrapper-count > .md-input-wrapper-count .text-count-wrapper { - position: absolute; - bottom: 0; - right: 0; -} -.md-input-filled > label, -.md-input-focus > label { - top: -6px; - font-size: 12px; -} -.md-input-filled.md-input-wrapper-count .text-count-wrapper, -.md-input-focus.md-input-wrapper-count .text-count-wrapper { - opacity: 1; -} -.md-input-focus .md-input-bar:before, -.md-input-focus .md-input-bar:after { - width: 50%; -} -.md-input-wrapper-danger .md-input-bar:before, -.md-input-wrapper-danger .md-input-bar:after { - background: #e53935; -} -.md-input-wrapper-danger.md-input-wrapper-count .text-count-wrapper { - color: #e53935; -} -.md-input-wrapper-success .md-input-bar:before, -.md-input-wrapper-success .md-input-bar:after { - background: #7cb342; -} -.md-input-wrapper-success.md-input-wrapper-count .text-count-wrapper { - color: #7cb342; -} -.md-form-group { - position: relative; -} -label.md-label { - color: #999; - padding: 0 6px; - font-size: 11px; -} -.add-clear-span { - display: block; -} -.add-clear-span input { - padding-right: 24px !important; -} -.add-clear-span a { - top: 12px !important; - right: 4px !important; -} -.add-clear-span a .material-icons { - font-size: 20px; -} -@font-face { - font-family: 'Material Icons'; - font-style: normal; - font-weight: 400; - src: url("../icons/material-design-icons/MaterialIcons-Regular.eot"); - /* For IE6-8 */ - src: local('Material Icons'), local('MaterialIcons-Regular'), url("../icons/material-design-icons/MaterialIcons-Regular.woff2") format('woff2'), url("../icons/material-design-icons/MaterialIcons-Regular.woff") format('woff'), url("../icons/material-design-icons/MaterialIcons-Regular.ttf") format('truetype'); -} -.material-icons { - font-family: 'Material Icons'; - font-weight: normal; - font-style: normal; - font-size: 18px; - /* Preferred icon size */ - display: inline-block; - width: 1em; - height: 1em; - line-height: 1; - text-transform: none; - letter-spacing: normal; - /* Support for all WebKit browsers. */ - -webkit-font-smoothing: antialiased; - /* Support for Safari and Chrome. */ - text-rendering: optimizeLegibility; - /* Support for Firefox. */ - -moz-osx-font-smoothing: grayscale; - /* Support for IE. */ - -webkit-font-feature-settings: 'liga'; - font-feature-settings: 'liga'; - vertical-align: -4px; - color: rgba(0, 0, 0, 0.54); -} -.material-icons.md-inactive { - color: rgba(0, 0, 0, 0.26); -} -.material-icons.md-18 { - font-size: 18px !important; - vertical-align: -4px; -} -.material-icons.md-24 { - font-size: 24px !important; - vertical-align: -8px; -} -.material-icons.md-36 { - font-size: 36px !important; - vertical-align: -16px; -} -.material-icons.md-48 { - font-size: 48px !important; - vertical-align: -24px; -} -.material-icons.md-light { - color: #ffffff; -} -.material-icons.md-light.md-inactive { - color: rgba(255, 255, 255, 0.3); -} -/*** utils ***/ -/* avatar */ -.md-user-image { - width: 34px; - border-radius: 50%; -} -.md-user-image-large { - width: 82px; - border-radius: 50%; -} -.md-user-placeholder { - background-color: rgba(0, 0, 0, 0.085); - width: 34px; - height: 34px; - border-radius: 50%; -} -.md-user-letters { - display: inline-block; - line-height: 35px; - width: 34px; - height: 34px; - border-radius: 50%; - text-align: center; - text-transform: uppercase; - font-weight: 500; - background-color: rgba(0, 0, 0, 0.085); -} -/* icons */ -.md-icon { - font-size: 24px; - line-height: 32px !important; - height: 32px !important; - color: #727272; - border-radius: 50%; - cursor: pointer; - -webkit-transition: background 280ms ease-out, color 280ms ease-out; - transition: background 280ms ease-out, color 280ms ease-out; - width: 32px !important; - text-align: center; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} -.md-icon:hover, -.md-icon:focus, -.md-icon:active, -.md-icon.active { - color: #212121; - background: rgba(0, 0, 0, 0.08); -} -.md-icon-light { - color: #fff; -} -.md-icon-light:hover, -.md-icon-light:focus, -.md-icon-light:active { - color: #fff; - background: rgba(0, 0, 0, 0.2); -} -.md-icon-dark { - color: #212121; -} -.md-icon-dark:hover, -.md-icon-dark:focus, -.md-icon-dark:active { - color: #212121; - background: rgba(255, 255, 255, 0.6); -} -.md-icon + .md-icon { - margin-left: 4px; -} -.md-icon-btn { - display: inline-block; -} -.md-icon-btn.active .md-icon { - color: #212121; - background: rgba(0, 0, 0, 0.08); -} -button.md-icon { - background: none; - border: none; - outline: none; -} -.uk-open > .md-icon { - color: #212121; - background: rgba(0, 0, 0, 0.08); -} -.uk-open > .md-icon-light { - color: #fff; - background: rgba(0, 0, 0, 0.2); -} -.uk-open > .md-icon-dark { - color: #212121; - background: rgba(255, 255, 255, 0.6); -} -/* dropdown list */ -.md-list-inputs { - margin: 0; - padding: 0; - list-style: none; -} -.md-list-inputs > li { - padding: 0; - margin: 0; - list-style: none; -} -.md-list-inputs li + li { - margin-top: 8px; -} -.md-list-inputs li .icheckbox_md { - float: left; -} -.md-list-inputs li label { - overflow: hidden; - padding-left: 8px; - display: block; - cursor: pointer; -} -/* hr */ -.md-hr { - margin: 32px 0; - height: 0; - border-top: 2px solid rgba(0, 0, 0, 0.12); -} -/* animated show */ -@-webkit-keyframes hierarchical_show { - 0% { - opacity: 0; - -webkit-transform: scale3d(0.2, 0.2, 2); - transform: scale3d(0.2, 0.2, 2); - } - 40% { - opacity: 1; - } - 100% { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } -} -@keyframes hierarchical_show { - 0% { - opacity: 0; - -webkit-transform: scale3d(0.2, 0.2, 2); - transform: scale3d(0.2, 0.2, 2); - } - 40% { - opacity: 1; - } - 100% { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } -} -.hierarchical_show { - will-change: transform, opacity; -} -.hierarchical_show > * { - visibility: hidden; -} -.hierarchical_show_inView > * { - -webkit-animation-fill-mode: both; - animation-fill-mode: both; - -webkit-animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - -webkit-animation-duration: 560ms; - animation-duration: 560ms; - -webkit-animation-name: hierarchical_show; - animation-name: hierarchical_show; - visibility: visible; -} -@-webkit-keyframes hierarchical_slide { - 0% { - opacity: 0; - -webkit-transform: translate3d(0, 160%, 0); - transform: translate3d(0, 160%, 0); - } - 33% { - opacity: 1; - } - 100% { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} -@keyframes hierarchical_slide { - 0% { - opacity: 0; - -webkit-transform: translate3d(0, 160%, 0); - transform: translate3d(0, 160%, 0); - } - 33% { - opacity: 1; - } - 100% { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} -.hierarchical_slide { - will-change: transform, opacity; -} -.hierarchical_slide > * { - visibility: hidden; -} -.hierarchical_slide_inView > * { - -webkit-animation-fill-mode: both; - animation-fill-mode: both; - -webkit-animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - -webkit-animation-duration: 560ms; - animation-duration: 560ms; - -webkit-animation-name: hierarchical_slide; - animation-name: hierarchical_slide; - visibility: visible; -} -.fast_animation { - -webkit-animation-duration: 280ms; - animation-duration: 280ms; -} -/** - * Google Material Design Preloader - * - * CSS animated SVG implementation of the Google Material Design preloader - * - * Reference: http://goo.gl/ZfulRH - * License: MIT - * Author: Rudi Theunissen (rudolf.theunissen@gmail.com) - * Version: 1.1.1 - */ -.md-preloader { - font-size: 0; - display: inline-block; - -webkit-animation: outer 6000ms linear infinite; - animation: outer 6000ms linear infinite; -} -.md-preloader svg { - -webkit-animation: inner 1200ms linear infinite; - animation: inner 1200ms linear infinite; -} -.md-preloader svg circle { - fill: none; - stroke: #448aff; - stroke-linecap: round; - -webkit-animation: arc 1200ms cubic-bezier(0.4, 0, 0.2, 1) infinite; - animation: arc 1200ms cubic-bezier(0.4, 0, 0.2, 1) infinite; -} -@-webkit-keyframes outer { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@keyframes outer { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@-webkit-keyframes inner { - 0% { - -webkit-transform: rotate(-64.8deg); - transform: rotate(-64.8deg); - } - 100% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } -} -@keyframes inner { - 0% { - -webkit-transform: rotate(-64.8deg); - transform: rotate(-64.8deg); - } - 100% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } -} -@-webkit-keyframes arc { - 0% { - stroke-dasharray: 1 210.48670779px; - stroke-dashoffset: 0; - } - 40% { - stroke-dasharray: 172.59910039px, 210.48670779px; - stroke-dashoffset: 0; - } - 100% { - stroke-dasharray: 1 210.48670779px; - stroke-dashoffset: -172.59910039px; - } -} -@keyframes arc { - 0% { - stroke-dasharray: 1 210.48670779px; - stroke-dashoffset: 0; - } - 40% { - stroke-dasharray: 172.59910039px, 210.48670779px; - stroke-dashoffset: 0; - } - 100% { - stroke-dasharray: 1 210.48670779px; - stroke-dashoffset: -172.59910039px; - } -} -.md-preloader-success svg circle { - stroke: #7cb342; -} -.md-preloader-danger svg circle { - stroke: #e53935; -} -.md-preloader-warning svg circle { - stroke: #ffa000; -} -/* content preloader */ -.content-preloader { - width: 48px; - height: 48px; - border-radius: 50%; - background: #fff; - left: 50%; - overflow: hidden; - margin-left: -24px; - -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); - box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); - padding: 8px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - -webkit-transform: scale(0); - transform: scale(0); - -webkit-transition: top 400ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, -webkit-transform 400ms cubic-bezier(0.4, 0, 0.2, 1); - transition: top 400ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, -webkit-transform 400ms cubic-bezier(0.4, 0, 0.2, 1); - transition: top 400ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, transform 400ms cubic-bezier(0.4, 0, 0.2, 1); - transition: top 400ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, transform 400ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 400ms cubic-bezier(0.4, 0, 0.2, 1); -} -.content-preloader .regular-preloader { - position: relative; - width: 30px; - height: 30px; -} -.content-preloader .regular-preloader > div { - width: 26px; - height: 26px; -} -.content-preloader.preloader-active { - -webkit-transform: scale(1); - transform: scale(1); - -webkit-transition: top 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 400ms cubic-bezier(0.4, 0, 0.2, 1) 50ms; - transition: top 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 400ms cubic-bezier(0.4, 0, 0.2, 1) 50ms; - transition: top 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 400ms cubic-bezier(0.4, 0, 0.2, 1) 50ms; - transition: top 280ms cubic-bezier(0.4, 0, 0.2, 1), transform 400ms cubic-bezier(0.4, 0, 0.2, 1) 50ms, -webkit-transform 400ms cubic-bezier(0.4, 0, 0.2, 1) 50ms; -} -.content-preloader-success svg circle { - stroke: #7cb342; -} -.content-preloader-danger svg circle { - stroke: #e53935; -} -.content-preloader-warning svg circle { - stroke: #ffa000; -} -.sidebar_main_active > .content-preloader, -.sidebar_main_open > .content-preloader { - margin-left: 96px !important; -} -body > .content-preloader { - position: fixed; - z-index: 1099; - top: -48px; -} -body > .content-preloader.preloader-active { - top: 56px; -} -.sidebar_main_active body > .content-preloader, -.sidebar_main_open body > .content-preloader { - margin-left: 96px; -} -.md-card > .content-preloader { - position: absolute; - z-index: 10; - top: 0; -} -.md-card > .content-preloader.preloader-active { - top: 64px; -} -/* iCheck material design theme ------------------------------------ */ -.icheckbox_md, -.iradio_md { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - border: none; - cursor: pointer; - position: relative; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} -.icheckbox_md:after, -.iradio_md:after { - display: block; - position: absolute; - left: 0; - top: 0; -} -.icheckbox_md > input, -.iradio_md > input { - margin: 0; -} -.icheckbox_md > .iCheck-helper, -.iradio_md > .iCheck-helper { - z-index: 10; -} -.icheckbox_md { - border: 2px solid rgba(0, 0, 0, 0.54); - border-radius: 2px; - width: 18px; - height: 18px; - background: #fff; - -webkit-transition: all 200ms ease-out; - transition: all 200ms ease-out; -} -.icheckbox_md.checked:after, -.icheckbox_md.disabled:after { - content: '\e5ca'; - font-family: "Material Icons"; - font-size: 18px; - color: #fff; - position: absolute; - left: -2px; - top: -6px; - line-height: 1.42857143; -} -.icheckbox_md.hover.checked, -.icheckbox_md.checked { - background: #009688; - border-color: #009688 !important; -} -.icheckbox_md.disabled:after { - display: none; -} -.icheckbox_md.disabled, -.icheckbox_md.disabled.checked { - background: transparent; - background-clip: padding-box; - border-color: rgba(0, 0, 0, 0.26); - cursor: default; -} -.icheckbox_md.disabled.checked { - background: #bdbdbd !important; - border-color: #bdbdbd !important; -} -.icheckbox_md.disabled.checked:after { - display: block !important; -} -.md-input-danger .icheckbox_md { - border-color: #e53935; -} -.icheckbox_md.indeterminate { - background: #009688; - border-color: #009688; -} -.icheckbox_md.indeterminate:after { - content: ''; - background: #fff; - position: absolute; - left: 2px; - top: 2px; - width: 10px; - height: 10px; -} -.iradio_md { - border: 2px solid rgba(0, 0, 0, 0.54); - width: 20px; - height: 20px; - border-radius: 50%; -} -.iradio_md:after { - content: ''; - background: transparent; - position: absolute; - left: 3px; - top: 3px; - width: 10px; - height: 10px; - border-radius: 50%; - -webkit-transform: scale(0.1); - transform: scale(0.1); - -webkit-transition: all 200ms ease-out; - transition: all 200ms ease-out; -} -.iradio_md.checked { - border-color: #009688 !important; -} -.iradio_md.checked:after { - background: #009688; - -webkit-transform: scale(1); - transform: scale(1); -} -.iradio_md.disabled { - border-color: rgba(0, 0, 0, 0.26); - cursor: default; -} -.iradio_md.disabled:after { - background: rgba(0, 0, 0, 0.26); - -webkit-transform: scale(1); - transform: scale(1); -} -.md-input-danger .iradio_md { - border-color: #e53935; -} -.disabled + .inline-label { - color: rgba(0, 0, 0, 0.26); - cursor: default; -} -.icheck-inline { - display: inline-block; - margin: 0 16px 16px 0; -} -.icheck-inline + .parsley-errors-list { - margin-top: -8px; -} -html { - height: 100%; - overflow-x: hidden; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - background: #ececec; -} -body { - min-height: 100%; - font: 400 14px / 1.42857143 "Roboto", sans-serif; - padding-top: 48px; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} -a, -button { - outline: none !important; -} -a { - color: #1e88e5; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} -a:hover, -a:active { - color: #0d47a1; - text-decoration: none; -} -pre, -code, -code[class*="language-"], -pre[class*="language-"] { - font: 400 12px / 18px "Source Code Pro", Consolas, Monaco, 'Andale Mono', monospace !important; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} -pre[class*="language-"] { - -webkit-box-shadow: none; - box-shadow: none; - border: 1px solid rgba(0, 0, 0, 0.12); - padding: 0; -} -pre[class*="language-"]:before, -pre[class*="language-"]:after { - display: none; -} -.line-numbers .line-numbers-rows { - border-right-color: rgba(0, 0, 0, 0.12); -} -:not(pre) > code, -:not(pre) > kbd, -:not(pre) > samp { - font: 400 12px / 18px "Source Code Pro", Consolas, Monaco, 'Andale Mono', monospace !important; - color: #d32f2f; -} -pre.large_code, -code.large_code { - font: 400 14px / 24px "Source Code Pro", Consolas, Monaco, 'Andale Mono', monospace !important; -} -.touchscroll { - overflow-y: auto !important; - -webkit-overflow-scrolling: touch; -} -.transform-origin-50 { - -webkit-transform-origin: 50% 50%; - transform-origin: 50% 50%; -} -blockquote { - border-left: 4px solid rgba(0, 0, 0, 0.085); -} -/* clearfix */ -.clearfix:before, -.clearfix:after { - content: " "; - display: table; -} -.clearfix:after { - clear: both; -} -/* headings */ -h1, -h2, -h3, -h4, -h5, -h6 { - font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif; - font-weight: 500; -} -.heading_a { - margin: 0; - font: 400 18px / 24px "Roboto", sans-serif; -} -.heading_a .sub-heading { - font-weight: 300; - font-size: 14px; - line-height: 18px; - display: block; - color: #727272; -} -.heading_b { - margin: 0; - font: 400 22px / 28px "Roboto", sans-serif; -} -.heading_b .sub-heading { - font-weight: 300; - font-size: 16px; - line-height: 20px; - display: block; - color: #727272; -} -.heading_c { - margin: 0; - font: 400 16px / 20px "Roboto", sans-serif; -} -.heading_c .sub-heading { - font-weight: 300; - font-size: 13px; - line-height: 20px; - display: block; - color: #727272; -} -.heading_list { - color: #727272; - font: 500 13px / 16px "Roboto", sans-serif; - padding: 0 16px; - margin: 0 0 16px; -} -.heading_a + .uk-grid, -.heading_b + .uk-grid, -.heading_c + .uk-grid, -.heading_list + .uk-grid { - margin-top: 24px; -} -.uk-grid + .heading_a, -.uk-grid + .heading_b, -.uk-grid + .heading_c, -.uk-grid + .heading_list { - margin-top: 24px; -} -/* uikit extend */ -.uk-text-large { - font-size: 16px; - font-weight: 400; - margin: 0 0 16px; -} -* > .uk-text-large { - margin-top: 16px; -} -.uk-text-small { - font-size: 12px !important; -} -.uk-text-upper { - text-transform: uppercase; -} -.uk-text-italic { - font-style: italic; -} -.uk-text-del { - text-decoration: line-through; -} -.uk-table.no-border td, -.uk-table .no-border td { - border-bottom: none; -} -.uk-table .row-selected { - background: #fff8e1 !important; -} -.uk-table [data-link] { - cursor: pointer; -} -.uk-text-pre { - white-space: pre; -} -.table_tree { - margin-bottom: 4px !important; -} -.table_tree .table-child-row { - display: none; -} -.table_tree .toggle-childrens { - display: block; - padding-left: 24px; - position: relative; -} -.table_tree .toggle-childrens:before { - content: '\e313'; - font-family: "Material Icons"; - font-size: 28px; - position: absolute; - left: -6px; - top: -10px; - color: #727272; - -webkit-transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1); - transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1); - -webkit-transform: rotate(0deg); - transform: rotate(0deg); -} -.table_tree .table-child-row { - display: table-row; -} -.table_tree .table-child-row .child-row-main-col { - padding-left: 40px; -} -.table_tree .show_child_row .toggle-childrens:before { - -webkit-transform: rotate(-90deg); - transform: rotate(-90deg); -} -/* custom styles */ -address { - margin: 0; -} -address p { - margin: 0; -} -address p + p { - margin-top: 4px; -} -.grid-block { - border-width: 1px 0; - border-style: solid; - border-color: rgba(0, 0, 0, 0.12); - background: rgba(179, 179, 179, 0.085); - padding: 48px 0; -} -.inline-list { - margin: 0; - padding: 0; - list-style: none; - overflow: hidden; -} -.inline-list > li { - padding: 0; - margin: 0; - list-style: none; -} -.inline-list li { - float: left; - margin: 0 8px 8px 0; - height: 32px; - width: 32px; - line-height: 32px; - text-align: center; - background: rgba(102, 102, 102, 0.085); -} -.img_thumb { - width: 80px; - max-width: 100%; - height: auto; -} -.img_thumb.square { - height: 80px; -} -.img_small { - width: 120px; - max-width: 100%; - height: auto; -} -.img_small.square { - height: 120px; -} -.img_medium { - width: 240px; - max-width: 100%; - height: auto; -} -.img_medium.square { - height: 240px; -} -.img_large { - width: 400px; - max-width: 100%; - height: auto; -} -.img_large.square { - height: 400px; -} -/* forms */ -.inline-label { - padding-left: 4px; - cursor: pointer; - vertical-align: -1px; -} -.form_hr { - border-top: 1px dashed rgba(0, 0, 0, 0.12); - margin: 32px 0 16px; -} -/* layout */ -#page_content:before { - content: ''; - position: fixed; - left: 0; - top: 0; - right: 0; - bottom: 0; - background: rgba(0, 0, 0, 0.3); - display: block; - opacity: 0; - -webkit-transition: opacity 400ms; - transition: opacity 400ms; - z-index: -1; -} -#page_content_inner { - padding: 24px 24px 100px; -} -#page_overflow { - min-height: 100%; - overflow-y: auto; -} -@media only screen and (min-width: 1220px) { - .boxed_layout #page_content { - max-width: 1220px; - margin: 0 auto !important; - } - .boxed_layout .uk-width-large-8-10.uk-container-center { - width: 100%; - } - .boxed_layout.sidebar_main_open #page_content, - .boxed_layout.sidebar_main_active #page_content { - padding-left: 240px; - } - .boxed_layout .md-top-bar { - max-width: 1172px; - margin: 0 auto; - } - .boxed_layout #page_heading { - border-width: 0 1px 1px; - border-style: solid; - border-color: rgba(0, 0, 0, 0.12); - -webkit-box-sizing: border-box; - box-sizing: border-box; - } -} -.disable_transitions #sidebar_main, -.disable_transitions #page_content, -.disable_transitions #header_main, -.disable_transitions #top_bar, -.disable_transitions #header_main .sSwitch .sSwitchIcon, -.disable_transitions #header_main .sSwitch .sSwitchIcon:before, -.disable_transitions #header_main .sSwitch .sSwitchIcon:after { - -webkit-transition: none !important; - transition: none !important; -} -body { - font-size: 15px; - overflow-y: auto; - height: auto; - min-height: 100%; -} -@media only screen and (max-width: 767px) { - body { - padding: 24px; - } -} -.login_page { - padding: 64px 24px; -} -@media only screen and (max-width: 767px) { - .login_page { - padding: 16px; - } -} -.login_page_wrapper { - width: 360px; - max-width: 100%; - margin: 0 auto; - -webkit-transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1); - transition: all 280ms cubic-bezier(0.4, 0, 0.2, 1); -} -.login_page .user_avatar { - width: 64px; - height: 64px; - display: inline-block; - text-align: center; - border-radius: 50%; - background-image: url("../img/avatars/user.png"); - background-repeat: no-repeat; - background-color: rgba(0, 0, 0, 0.085); - background-position: 50% 1px; -} -@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2), only screen and (-webkit-min-device-pixel-ratio: 192), only screen and (min-resolution: 192dppx), only screen and (min-resolution: 2dppx) { - .login_page .user_avatar { - background-image: url("../img/avatars/user@2x.png"); - background-size: 64px 64px; - } -} -.login_page .login_heading { - text-align: center; - margin-bottom: 32px; -} -.login_page.login_page_v2 { - padding: 48px 24px; -} -@media only screen and (max-width: 767px) { - .login_page.login_page_v2 { - padding: 16px; - } - .login_page.login_page_v2 > .uk-container { - padding: 0; - } -} -.login_page.login_page_v2 .login_page_forms { - padding: 24px 48px; -} -@media only screen and (max-width: 767px) { - .login_page.login_page_v2 .login_page_forms { - padding: 24px; - } -} -.login_page.login_page_v2 .login_page_info { - background-position: 0 0; - background-size: cover; - position: relative; -} -.login_page.login_page_v2 .login_page_info .info_content { - position: absolute; - background: rgba(0, 0, 0, 0.6); - padding: 24px; - color: #fff; - bottom: 0; - left: 0; - right: 0; -} -.login_page.login_page_v2 .login_page_info .info_content h1, -.login_page.login_page_v2 .login_page_info .info_content h2 { - color: #fff; - margin-bottom: 16px; -} -.login_page.login_page_v2 .login_page_info .info_content p { - margin: 16px 0 0; -} -html.app_theme_dark { - background: #303030; - color: #fff; -} -html.app_theme_dark a:not(.md-btn) { - color: #039be5; -} -html.app_theme_dark a:not(.md-btn):hover, -html.app_theme_dark a:not(.md-btn):active { - color: #0277bd; -} -html.app_theme_dark h1, -html.app_theme_dark h2, -html.app_theme_dark h3, -html.app_theme_dark h4, -html.app_theme_dark h5, -html.app_theme_dark h6 { - color: #fefefe; -} -html.app_theme_dark select.md-input, -html.app_theme_dark textarea.md-input, -html.app_theme_dark input:not([type]).md-input, -html.app_theme_dark input[type="text"].md-input, -html.app_theme_dark input[type="password"].md-input, -html.app_theme_dark input[type="datetime"].md-input, -html.app_theme_dark input[type="datetime-local"].md-input, -html.app_theme_dark input[type="date"].md-input, -html.app_theme_dark input[type="month"].md-input, -html.app_theme_dark input[type="time"].md-input, -html.app_theme_dark input[type="week"].md-input, -html.app_theme_dark input[type="number"].md-input, -html.app_theme_dark input[type="email"].md-input, -html.app_theme_dark input[type="url"].md-input, -html.app_theme_dark input[type="search"].md-input, -html.app_theme_dark input[type="tel"].md-input, -html.app_theme_dark input[type="color"].md-input { - border-color: rgba(255, 255, 255, 0.25); - color: #fefefe; -} -html.app_theme_dark .md-input-wrapper > label { - color: #cbcbcb; -} -html.app_theme_dark .md-card { - background: #424242; -} -html.app_theme_dark .uk-tooltip { - background: #212121; -} -html.app_theme_dark .login_page .user_avatar { - background-color: rgba(255, 255, 255, 0.4); -} - -/*# sourceMappingURL=login_page.css.map */ diff --git a/src/assets/theme-assets/css/login_page.css.map b/src/assets/theme-assets/css/login_page.css.map deleted file mode 100755 index 3454278..0000000 --- a/src/assets/theme-assets/css/login_page.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["login_page.css","../_uikit_custom.less","../md/_md_variables_mixins.less","../_variables_mixins.less","../../../bower_components/uikit/css/components/accordion.almost-flat.css","../../../bower_components/uikit/css/components/dotnav.almost-flat.css","../../../bower_components/uikit/css/components/progress.almost-flat.css","../../../bower_components/uikit/css/components/htmleditor.almost-flat.css","../../../bower_components/uikit/css/components/form-file.almost-flat.css","../../../bower_components/uikit/css/components/upload.almost-flat.css","../../../bower_components/uikit/css/components/form-select.almost-flat.css","../../../bower_components/uikit/css/components/nestable.almost-flat.css","../../../bower_components/uikit/css/components/notify.almost-flat.css","../../../bower_components/uikit/css/components/slideshow.almost-flat.css","../../../bower_components/uikit/css/components/slider.almost-flat.css","../../../bower_components/uikit/css/components/slidenav.almost-flat.css","../../../bower_components/uikit/css/components/tooltip.almost-flat.css","../../../bower_components/uikit/css/components/sortable.almost-flat.css","../md/_md_buttons.less","../md/_md_cards.less","../md/_md_utils.less","../md/_md_forms.less","../md/_md_icons.less","../components/_preloaders.less","../plugins/_icheck.less","../_altair_admin.less","login_page.less"],"names":[],"mappings":"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AA;EACA,qCAAA;EACA,sCAAA;EACA,oCAAA;APolCF;AACA,YAAY;AOllCZ;EACE,sBAAA;EACA,WAAA;EACA,qCAAA;EACA,sCAAA;EACA,oCAAA;APolCF;AACA,WAAW;AOllCX;EACE,yBAAA;EACA,WAAA;EACA,qCAAA;EACA,sCAAA;EACA,oCAAA;APolCF;AACA;6EAC6E;AOllC7E;EACE,YAAA;APolCF;AACA;6EAC6E;AOllC7E;;EAEE,aAAA;APolCF;AACA;6EAC6E;AOllC7E;EACE,2BAAA;EACA,4BAAA;EACA,6BAAA;EACA,gBAAA;EACA,8BAAA;EACA,+BAAA;APolCF;AACA;;EAEE;AOllCF;;EAEE,WAAA;EACA,cAAA;APolCF;AOllCA;EACE,WAAA;APolCF;AACA;6EAC6E;AOllC7E;EACE,eAAA;EACA,MAAA;EACA,OAAA;EACA,QAAA;EACA,SAAA;EACA,YAAA;APolCF;AOllCA;EACE,kBAAA;EACA,SAAA;EACA,OAAA;EACA,QAAA;EACA,SAAA;APolCF;AOllCA;EACE,gBAAA;APolCF;AACA;6EAC6E;AOllC7E;;EAEE,8BAAA;EAAA,sBAAA;APolCF;AOllCA;EACE,aAAA;EACA,kBAAA;EACA,kBAAA;APolCF;AACA;;EAEE;AOllCF;;EAEE,aAAA;APolCF;AACA;;EAEE;AOllCF;;EAEE,WAAA;EACA,UAAA;APolCF;AOllCA;EACE,4BAAA;APolCF;AACA;6EAC6E;AOllC7E;EACE,kBAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,YAAA;APolCF;AACA;6EAC6E;AOllC7E;EACE,aAAA;EACA,8BAAA;EAAA,sBAAA;APolCF;AACA;;MAEM;AOllCN;EACE,2BAAA;APolCF;AACA;;MAEM;AACN,oBAAoB;AOllCpB;EACE,cAAA;EACA,kBAAA;APolCF;AACA,yDAAyD;AOllCzD;EACE,yBAAA;APolCF;AOllCA;EACE,4BAAA;APolCF;AACA;;MAEM;AOllCN;EACE,gBAAA;EACA,iBAAA;EACA,kBAAA;EACA,gBAAA;APolCF;AOllCA;EACE,YAAA;EA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","file":"login_page.css","sourceRoot":"../less/"} \ No newline at end of file diff --git a/src/assets/theme-assets/css/login_page.min.css b/src/assets/theme-assets/css/login_page.min.css deleted file mode 100755 index c794501..0000000 --- a/src/assets/theme-assets/css/login_page.min.css +++ /dev/null @@ -1 +0,0 @@ -[class*=uk-animation-]{-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-duration:560ms;animation-duration:560ms}.uk-alert{border:none;background:#1976d2;color:#fff;text-shadow:none;padding-right:32px;position:relative;display:block}.uk-alert-success{background:#8bc34a!important}.uk-alert-danger{background:#e53935!important}.uk-alert-warning{background:#ffa000!important}.uk-alert-info{background:#0097a7!important}.uk-alert-large{padding:24px 32px 24px 24px}.uk-alert-close{position:absolute;top:10px;right:8px;float:none!important;margin:0!important}.uk-alert-close:after{color:#fff!important}.uk-badge{background:#0097a7;padding:2px 6px;border:none;border-radius:2px;text-shadow:none;font-size:11px;line-height:15px;font-weight:400;white-space:nowrap}.uk-badge a{color:#fff!important}.uk-badge-default{background:#9e9e9e;color:#fff}.uk-badge-primary{background:#2196f3}.uk-badge-danger{background:#e53935}.uk-badge-warning{background:#ffa000}.uk-badge-success{background:#7cb342}.uk-badge-muted{background:#bdbdbd}.uk-badge-notification{border-radius:20px}.uk-badge-large{font-size:13px;line-height:16px;padding:4px 8px}.uk-badge.inline-label{vertical-align:1px;margin-left:4px}.uk-badge-outline{border:1px solid rgba(0,0,0,.12);background:#fff;color:#212121;padding-bottom:0;line-height:16px}.uk-badge-inline{vertical-align:2px}.uk-badge-group{overflow:hidden}.uk-badge-group .uk-badge{float:left;display:block;margin:0 4px 4px 0}.uk-button{font-weight:400;border-radius:2px;-webkit-transition:all .2s cubic-bezier(.4,0,.2,1);transition:all .2s cubic-bezier(.4,0,.2,1)}.uk-comment-list>li+li{border-top:1px dashed rgba(0,0,0,.12);margin-top:16px!important}.uk-comment-list .uk-comment+ul{margin:8px 0 0 0}@media only screen and (min-width:768px){.uk-comment-list .uk-comment+ul{padding-left:48px}}.uk-comment-header{padding:16px 8px 8px;border:none;background:0 0;margin-bottom:0}.uk-comment-title{margin:0;font-size:14px;line-height:20px}.uk-modal{z-index:1304;background:rgba(0,0,0,.5);-webkit-transition:opacity 250ms ease-out;transition:opacity 250ms ease-out;overflow:auto!important}.uk-modal.uk-modal-no-backdrop{background:0 0}.uk-modal-dialog{border-radius:2px;-webkit-box-shadow:0 19px 38px rgba(0,0,0,.3),0 15px 12px rgba(0,0,0,.22);box-shadow:0 19px 38px rgba(0,0,0,.3),0 15px 12px rgba(0,0,0,.22);padding:24px;display:block!important;-webkit-animation:none!important;animation:none!important;-webkit-transition:opacity 280ms ease-in,-webkit-transform 280ms cubic-bezier(.4,0,.2,1);transition:opacity 280ms ease-in,-webkit-transform 280ms cubic-bezier(.4,0,.2,1);transition:transform 280ms cubic-bezier(.4,0,.2,1),opacity 280ms ease-in;transition:transform 280ms cubic-bezier(.4,0,.2,1),opacity 280ms ease-in,-webkit-transform 280ms cubic-bezier(.4,0,.2,1);-webkit-transform:scale(0);transform:scale(0)}.uk-modal-dialog-blank{padding:0;background:0 0;-webkit-box-shadow:none;box-shadow:none}.uk-open .uk-modal-dialog{-webkit-transform:scale(1);transform:scale(1)}.uk-modal-dialog .uk-modal-header{background:0 0;border-bottom:none;margin:0 -24px 24px;padding:0 32px 0 24px;overflow:hidden}.uk-modal-dialog .uk-modal-header .uk-modal-title{margin:0;font:500 18px/28px Roboto,sans-serif}.uk-modal-dialog .uk-modal-header .uk-modal-title span{font-size:16px;display:block;color:#727272}.uk-modal-dialog .uk-modal-header .material-icons{font-size:24px;vertical-align:-4px;cursor:default}.uk-modal-dialog .uk-modal-footer{margin:16px -16px -16px;padding:16px;background:#fff;border-top:none}.uk-modal-dialog .uk-modal-footer:after,.uk-modal-dialog .uk-modal-footer:before{content:" ";display:table}.uk-modal-dialog .uk-modal-footer:after{clear:both}.uk-modal-dialog .uk-modal-footer:after,.uk-modal-dialog .uk-modal-footer:before{content:" ";display:table}.uk-modal-dialog .uk-modal-footer:after{clear:both}.uk-modal-dialog .uk-modal-footer .md-icon-btn{margin-top:2px}.uk-modal-dialog .uk-modal-caption{bottom:16px;margin:0 32px}.uk-modal-dialog>.uk-close:first-child{top:8px;right:8px;position:absolute;float:none;margin:0}.uk-modal-dialog-lightbox{padding:0}.uk-modal-dialog-lightbox>.uk-close:first-child{top:-11px;right:-11px;-webkit-box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);border:none;z-index:10}.uk-modal-dialog .uk-overflow-container{margin:16px 0}.uk-modal-card-fullscreen{overflow:hidden!important}.uk-modal-card-fullscreen .uk-modal-close{float:left;margin:8px 8px 0 0;display:block}.uk-modal-card-fullscreen>.uk-modal-dialog>.md-card>.md-card-toolbar{position:fixed;top:0;left:0;right:0;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);z-index:10}.uk-modal-card-fullscreen>.uk-modal-dialog>.md-card>.md-card-content{position:absolute;top:48px;bottom:0;left:0;right:0;overflow-y:auto}.uk-modal .uk-margin.uk-modal-content{margin-bottom:0}.uk-modal.uk-modal-dialog-replace .uk-modal-content{font-size:18px}.uk-modal-spinner{-webkit-animation:uk-rotate 2s infinite linear;animation:uk-rotate 2s infinite linear;margin-left:-12px;margin-top:-17px;left:50%;right:auto}.uk-modal .uk-modal-aside{padding:16px 32px 32px}.uk-dropdown{-webkit-transform:scale(.25,0);transform:scale(.25,0);opacity:0;-webkit-transition:all 280ms cubic-bezier(.4,0,.2,1);transition:all 280ms cubic-bezier(.4,0,.2,1);-webkit-animation:none!important;animation:none!important;-webkit-transform-origin:50% 0!important;transform-origin:50% 0!important;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);border:none;border-radius:2px}.uk-dropdown.uk-dropdown-xlarge{width:360px}@media only screen and (max-width:479px){.uk-dropdown.uk-dropdown-xlarge{width:260px}}.uk-dropdown.uk-dropdown-large{width:260px}.uk-dropdown.uk-dropdown-small{width:160px}.uk-dropdown>ul>li>a{font-size:14px;color:#212121}.uk-dropdown>ul>li>a:hover{background:rgba(0,0,0,.085)}.uk-dropdown>ul>li.uk-active>a{background:rgba(0,0,0,.085)}.uk-dropdown>ul>li.padding_sm{padding:2px 4px}.uk-dropdown>ul>li.padding_md{padding:4px 8px}.uk-dropdown.dropdown-modal{z-index:1310}.uk-dropdown.dropdown-fs{z-index:9999}.uk-dropdown.uk-dropdown-scrollable{-webkit-overflow-scrolling:touch}[data-uk-dropdown*=top-] .uk-dropdown{-webkit-transform-origin:50% 100%!important;transform-origin:50% 100%!important}[data-uk-dropdown*=left-] .uk-dropdown{-webkit-transform-origin:100% 50%!important;transform-origin:100% 50%!important}[data-uk-dropdown*=right-] .uk-dropdown{-webkit-transform-origin:0 50%!important;transform-origin:0 50%!important}[data-uk-dropdown*=justify]{position:static!important}[data-uk-dropdown*=justify] [class*=uk-dropdown-width]{left:0!important;width:100%!important;min-width:inherit!important;margin-left:0!important}.uk-dropdown-active{display:block!important}.uk-dropdown-shown{-webkit-transform:scale(1,1);transform:scale(1,1);opacity:1}.uk-nav-dropdown>li>a:focus,.uk-nav-dropdown>li>a:hover{text-shadow:none;-webkit-box-shadow:none;box-shadow:none;color:#212121;background:rgba(153,153,153,.2)}fieldset{border:none;margin:0}fieldset+*{margin-top:15px}.uk-form input:not([type]),.uk-form input[type=color],.uk-form input[type=date],.uk-form input[type=datetime-local],.uk-form input[type=email],.uk-form input[type=month],.uk-form input[type=number],.uk-form input[type=password],.uk-form input[type=search],.uk-form input[type=tel],.uk-form input[type=text],.uk-form input[type=time],.uk-form input[type=url],.uk-form input[type=week],.uk-form select,.uk-form textarea{-webkit-box-sizing:border-box;box-sizing:border-box;padding:8px;border:1px solid rgba(0,0,0,.12);-webkit-transition:border .2s ease-in;transition:border .2s ease-in;resize:none}.uk-form input:not([type]):focus,.uk-form input[type=color]:focus,.uk-form input[type=date]:focus,.uk-form input[type=datetime-local]:focus,.uk-form input[type=email]:focus,.uk-form input[type=month]:focus,.uk-form input[type=number]:focus,.uk-form input[type=password]:focus,.uk-form input[type=search]:focus,.uk-form input[type=tel]:focus,.uk-form input[type=text]:focus,.uk-form input[type=time]:focus,.uk-form input[type=url]:focus,.uk-form input[type=week]:focus,.uk-form select:focus,.uk-form textarea:focus{background:0 0;border-color:#2196f3}.uk-form textarea{-webkit-transition:border-color .2s ease-in,height 280ms ease-in;transition:border-color .2s ease-in,height 280ms ease-in}.uk-form-row{-webkit-transition:all .2s ease-out;transition:all .2s ease-out}.uk-form-row+.uk-form-row{margin-top:24px}.uk-form-stacked .uk-form-label{font-weight:500;font-size:13px;display:block;padding-bottom:8px}.uk-form-stacked .uk-form-label+p{margin-top:0}.uk-form-help-block{display:block;font-size:12px;color:#727272;padding:4px 0 0 0;font-style:italic}.uk-form-width-large,.uk-form-width-medium,.uk-form-width-mini,.uk-form-width-small{max-width:100%}.uk-grid+.uk-grid,.uk-grid-margin,.uk-grid>*>.uk-panel+.uk-panel{margin-top:24px}.uk-grid.uk-grid-small+.uk-grid-small,.uk-grid.uk-grid-small>*>.uk-panel+.uk-panel,.uk-grid.uk-grid-small>.uk-grid-margin{margin-top:10px}.uk-height-viewport{min-height:200px}[class*=uk-icon-]{color:#727272}.uk-input-group{position:relative;display:table;border-collapse:separate}.uk-input-group>input[type=text]{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.uk-input-group-addon,.uk-input-group>input[type=text]{display:table-cell}.uk-input-group-addon{width:1%;white-space:nowrap;vertical-align:middle;line-height:1;text-align:center;padding:0 16px;font-size:16px;min-width:22px}.uk-input-group>.md-input-wrapper{display:inline-block}.uk-input-group.uk-input-group-danger .uk-input-group-addon i{color:#e53935!important}.uk-input-group.uk-input-group-danger+.parsley-errors-list{margin-left:58px}.uk-input-group.uk-input-group-success .uk-input-group-addon i{color:#7cb342!important}.uk-list-hover li:hover{background:rgba(0,0,0,.1)}.uk-nav-header{color:#727272;font-weight:400}.uk-nav-divider{-webkit-box-shadow:none;box-shadow:none;border-top-color:rgba(0,0,0,.12)}.uk-nav-divider+.uk-nav-header{margin-top:0}.uk-nav-label{width:12px;height:12px;display:inline-block;vertical-align:-1px;margin-right:8px}.uk-nav-side>li>a{font-weight:500;line-height:22px}.uk-nav-side>li>a>i{font-size:24px;margin-right:10px;vertical-align:-7px}.uk-nav-side>li>a:focus,.uk-nav-side>li>a:hover{background:0 0;-webkit-box-shadow:none;box-shadow:none}.uk-nav-side>li.uk-active>a{background:0 0;-webkit-box-shadow:none;box-shadow:none}.uk-nav-side>li.uk-active>a,.uk-nav-side>li.uk-active>a>i{color:#7cb342}.uk-nav-side>li li a{text-shadow:none;color:#212121}.uk-nav-side ul.uk-nav-sub{padding-top:0;padding-left:24px}.uk-pagination{margin:0}.uk-pagination>li{outline:0!important}.uk-pagination>li>a,.uk-pagination>li>span{border:none;padding:4px 8px;min-width:32px;line-height:24px;height:32px;-webkit-box-sizing:border-box;box-sizing:border-box;text-shadow:none;color:#212121;border-radius:4px}.uk-pagination>li>a [class*=uk-icon-],.uk-pagination>li>span [class*=uk-icon-]{font-size:16px}.uk-pagination>li>a{background:0 0}.uk-pagination>li>a:hover{background:#e1efd2}.uk-pagination>li.uk-active>a,.uk-pagination>li.uk-active>span{background:#7cb342}.uk-pagination>li.uk-active>a,.uk-pagination>li.uk-active>a:hover,.uk-pagination>li.uk-active>span,.uk-pagination>li.uk-active>span:hover{color:#fff}.uk-pagination>li.uk-disabled>a,.uk-pagination>li.uk-disabled>span{border:none;text-shadow:none;background:0 0!important;color:#aaa;cursor:default}.uk-panel-box{border-radius:2px;background:#fff;border-color:rgba(0,0,0,.12)}.uk-panel-box .uk-panel-teaser{border-radius:2px 2px 0 0}.uk-table td{border-bottom-color:rgba(0,0,0,.12)}.uk-table th{border-bottom:1px #444}.uk-table-nowrap td,.uk-table-nowrap th{white-space:nowrap}.uk-table-align-vertical td,.uk-table-align-vertical th{vertical-align:middle}.uk-table tr td.small_col,.uk-table tr th.small_col{width:1%}.uk-table tr.row_checked td{background:#e3f2fd}.uk-table .uk-table{margin-bottom:0}.uk-table .uk-table tr:last-child td{border-bottom:none}.uk-table-no-border td{border-bottom-color:transparent}.uk-sticky-placeholder .uk-active{z-index:1094}.uk-subnav-pill>*>*{color:#212121}.uk-subnav-pill>.uk-active>*{background:#7cb342}.uk-table thead th{border-bottom:2px solid rgba(0,0,0,.12)}.uk-table tfoot td,.uk-table tfoot th,.uk-table thead th{font-style:normal;font-weight:400;color:#727272;font-size:14px}.uk-table td{border-bottom-color:#e0e0e0}.uk-table tfoot td,.uk-table tfoot th{border-top:2px solid rgba(0,0,0,.12);border-bottom:none}.uk-table-striped tbody tr:nth-of-type(odd){background:rgba(0,0,0,.085)}.uk-table-hover tbody tr:hover{background:#e3f2fd}.uk-thumbnail{border-radius:0;border-color:rgba(0,0,0,.12)}.uk-thumbnail-caption{padding:4px 4px 0;line-height:20px;color:#727272;font-size:12px}.uk-text-small{font-size:12px}.uk-text-muted{color:#757575!important}.uk-text-primary{color:#2196f3!important}.uk-text-danger{color:#e53935!important}.uk-text-success{color:#7cb342!important}.uk-text-warning{color:#ffa000!important}.uk-margin-bottom{margin-bottom:16px!important}.uk-margin-small-bottom{margin-bottom:8px!important}.uk-margin-medium-bottom{margin-bottom:32px!important}.uk-margin-large-bottom{margin-bottom:48px!important}.uk-margin-medium-top{margin-top:32px!important}.uk-margin-large-top{margin-top:48px!important}.uk-close{font-size:18px;opacity:1}.uk-close:focus,.uk-close:hover{opacity:1}.uk-close:after{opacity:1!important;color:#727272;content:'\e5cd';font-family:"Material Icons"}.uk-float-none{float:none!important}.uk-accordion-title{margin-top:0;margin-bottom:15px;padding:5px 15px;background:#f5f5f5;font-size:18px;line-height:24px;cursor:pointer;border:1px solid #ddd;border-radius:4px}.uk-accordion-content{padding:0 15px 15px 15px}.uk-accordion-content:after,.uk-accordion-content:before{content:"";display:table}.uk-accordion-content:after{clear:both}.uk-accordion-content>:last-child{margin-bottom:0}.uk-accordion-title{background:rgba(153,153,153,.2);border-radius:0;border:none;margin:0 0 4px;font-size:15px;font-weight:400;padding:8px 24px 8px 16px;position:relative}.uk-accordion-title:after{content:'\e313';font-family:"Material Icons";font-size:18px;position:absolute;top:8px;right:8px;display:block;color:#727272;-webkit-transition:-webkit-transform 280ms;transition:-webkit-transform 280ms;transition:transform 280ms;transition:transform 280ms,-webkit-transform 280ms}.uk-accordion-title.uk-active:after{-webkit-transform:rotate(-180deg);transform:rotate(-180deg)}.uk-accordion-title-primary{background:#2196f3;color:#fff}.uk-accordion-title-primary:after{color:#fff}.uk-accordion-title-danger{background:#e53935;color:#fff}.uk-accordion-title-danger:after{color:#fff}.uk-accordion-title-success{background:#7cb342;color:#fff}.uk-accordion-title-success:after{color:#fff}.uk-accordion-title-warning{background:#ffa000;color:#fff}.uk-accordion-title-warning:after{color:#fff}.uk-accordion-content{padding:16px}.uk-accordion-alt .uk-accordion-title{background:#fff;margin:0;padding:16px 24px 16px 48px;border-top:1px solid rgba(0,0,0,.12)}.uk-accordion-alt .uk-accordion-title:first-child{border-top:none}.uk-accordion-alt .uk-accordion-title:after{color:#2196f3;content:'\e145';right:auto;left:16px;top:16px}.uk-accordion-alt .uk-accordion-title.uk-active:after{-webkit-transform:rotate(-180deg);transform:rotate(-180deg);content:'\e15b'}.uk-accordion-alt .uk-accordion-content{padding:24px}.uk-dotnav{display:-ms-flexbox;display:-webkit-box;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-left:-15px;margin-top:-15px;padding:0;list-style:none}.uk-dotnav>*{-ms-flex:none;-webkit-box-flex:0;flex:none;padding-left:15px;margin-top:15px}.uk-dotnav:after,.uk-dotnav:before{content:"";display:block;overflow:hidden}.uk-dotnav:after{clear:both}.uk-dotnav>*{float:left}.uk-dotnav>*>*{display:block;-webkit-box-sizing:content-box;box-sizing:content-box;width:20px;height:20px;border-radius:50%;background:rgba(50,50,50,.1);text-indent:100%;overflow:hidden;white-space:nowrap;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.uk-dotnav>*>:focus,.uk-dotnav>*>:hover{background:rgba(50,50,50,.4);outline:0}.uk-dotnav>*>:active{background:rgba(50,50,50,.6)}.uk-dotnav>.uk-active>*{background:rgba(50,50,50,.4);-webkit-transform:scale(1.3);transform:scale(1.3)}.uk-dotnav-contrast>*>*{background:rgba(255,255,255,.4)}.uk-dotnav-contrast>*>:focus,.uk-dotnav-contrast>*>:hover{background:rgba(255,255,255,.7)}.uk-dotnav-contrast>*>:active{background:rgba(255,255,255,.9)}.uk-dotnav-contrast>.uk-active>*{background:rgba(255,255,255,.9)}.uk-dotnav-vertical{-ms-flex-direction:column;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.uk-dotnav-vertical>*{float:none}.uk-progress{-webkit-box-sizing:border-box;box-sizing:border-box;height:20px;margin-bottom:15px;background:#f5f5f5;overflow:hidden;line-height:20px;-webkit-box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);border-radius:4px}*+.uk-progress{margin-top:15px}.uk-progress-bar{width:0;height:100%;background:#00a8e6;float:left;-webkit-transition:width .6s ease;transition:width .6s ease;font-size:12px;color:#fff;text-align:center;-webkit-box-shadow:inset 0 0 5px rgba(0,0,0,.05);box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-progress-mini{height:6px}.uk-progress-small{height:12px}.uk-progress-success .uk-progress-bar{background-color:#8cc14c}.uk-progress-warning .uk-progress-bar{background-color:#faa732}.uk-progress-danger .uk-progress-bar{background-color:#da314b}.uk-progress-striped .uk-progress-bar{background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:30px 30px}.uk-progress-striped.uk-active .uk-progress-bar{-webkit-animation:uk-progress-bar-stripes 2s linear infinite;animation:uk-progress-bar-stripes 2s linear infinite}@-webkit-keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}@keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}.uk-progress-mini,.uk-progress-small{border-radius:500px}.uk-progress{-webkit-box-shadow:none;box-shadow:none;border-radius:2px}.uk-progress-bar{background:#009688}.uk-progress-success .uk-progress-bar{background-color:#7cb342}.uk-progress-danger .uk-progress-bar{background-color:#e53935}.uk-progress-warning .uk-progress-bar{background-color:#ffa000}.uk-htmleditor-navbar{background:#f5f5f5;border:1px solid rgba(0,0,0,.06);border-top-left-radius:4px;border-top-right-radius:4px}.uk-htmleditor-navbar:after,.uk-htmleditor-navbar:before{content:"";display:table}.uk-htmleditor-navbar:after{clear:both}.uk-htmleditor-navbar-nav{margin:0;padding:0;list-style:none;float:left}.uk-htmleditor-navbar-nav>li{float:left}.uk-htmleditor-navbar-nav>li>a{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;text-decoration:none;height:41px;padding:0 15px;line-height:40px;color:#444;font-size:11px;cursor:pointer;margin-top:-1px;margin-left:-1px;border:1px solid transparent;border-bottom-width:0;text-shadow:0 1px 0 #fff}.uk-htmleditor-navbar-nav>li:hover>a,.uk-htmleditor-navbar-nav>li>a:focus{background-color:#fafafa;color:#444;outline:0;position:relative;z-index:1;border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-top-color:rgba(0,0,0,.1)}.uk-htmleditor-navbar-nav>li>a:active{background-color:#eee;color:#444;border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-top-color:rgba(0,0,0,.2)}.uk-htmleditor-navbar-nav>li.uk-active>a{background-color:#fafafa;color:#444;border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-top-color:rgba(0,0,0,.1)}.uk-htmleditor-navbar-flip{float:right}[data-mode=split] .uk-htmleditor-button-code,[data-mode=split] .uk-htmleditor-button-preview{display:none}.uk-htmleditor-content{border-left:1px solid #ddd;border-right:1px solid #ddd;border-bottom:1px solid #ddd;background:#fff;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.uk-htmleditor-content:after,.uk-htmleditor-content:before{content:"";display:table}.uk-htmleditor-content:after{clear:both}.uk-htmleditor-fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;z-index:990}.uk-htmleditor-fullscreen .uk-htmleditor-content{position:absolute;top:41px;left:0;right:0;bottom:0}.uk-htmleditor-fullscreen .uk-icon-expand:before{content:"\f066"}.uk-htmleditor-code,.uk-htmleditor-preview{-webkit-box-sizing:border-box;box-sizing:border-box}.uk-htmleditor-preview{padding:20px;overflow-y:scroll;position:relative}[data-mode=tab][data-active-tab=code] .uk-htmleditor-preview,[data-mode=tab][data-active-tab=preview] .uk-htmleditor-code{display:none}[data-mode=split] .uk-htmleditor-code,[data-mode=split] .uk-htmleditor-preview{float:left;width:50%}[data-mode=split] .uk-htmleditor-code{border-right:1px solid #eee}.uk-htmleditor-iframe{position:absolute;top:0;left:0;width:100%;height:100%}.uk-htmleditor .CodeMirror{padding:10px;-webkit-box-sizing:border-box;box-sizing:border-box}.uk-htmleditor-navbar-nav:first-child>li:first-child>a{border-top-left-radius:4px}.uk-htmleditor-navbar-flip .uk-htmleditor-navbar-nav>li>a{margin-left:0;margin-right:-1px}.uk-htmleditor-navbar-flip .uk-htmleditor-navbar-nav:first-child>li:first-child>a{border-top-left-radius:0}.uk-htmleditor-navbar-flip .uk-htmleditor-navbar-nav:last-child>li:last-child>a{border-top-right-radius:4px}.uk-htmleditor-fullscreen .uk-htmleditor-navbar{border-top:none;border-left:none;border-right:none;border-radius:0}.uk-htmleditor-fullscreen .uk-htmleditor-content{border:none;border-radius:0}.uk-htmleditor-fullscreen .uk-htmleditor-navbar-nav>li>a{border-radius:0!important}.uk-htmleditor-navbar{border-radius:0;background:#f9f9f9;border-width:1px 1px 0;border-style:solid;border-color:rgba(0,0,0,.12);overflow:hidden}.uk-htmleditor-navbar-nav>li>a{border:none;border-radius:0!important;height:38px}.uk-htmleditor-navbar-nav>li.uk-active>a{background:#ebebeb}.uk-htmleditor-navbar-nav>li:hover>a,.uk-htmleditor-navbar-nav>li>a:focus{background:#ebebeb}.uk-htmleditor-content{border-radius:0;border:1px solid rgba(0,0,0,.12)}.uk-htmleditor-fullscreen{z-index:1154}.uk-htmleditor-fullscreen .uk-htmleditor-navbar{border-bottom:1px solid rgba(0,0,0,.12)}.uk-htmleditor-fullscreen .uk-htmleditor-content{top:38px}.uk-form-file{display:inline-block;vertical-align:middle;position:relative;overflow:hidden}.uk-form-file input[type=file]{position:absolute;top:0;z-index:1;width:100%;opacity:0;cursor:pointer;left:0;font-size:500px}.uk-dragover{-webkit-box-shadow:0 0 20px rgba(100,100,100,.3);box-shadow:0 0 20px rgba(100,100,100,.3)}.uk-file-upload{width:100%;padding:32px 16px;-webkit-box-sizing:border-box;box-sizing:border-box;background:#f5f5f5;text-align:center;-webkit-transition:all .2s ease-in;transition:all .2s ease-in}.uk-file-upload p{margin:0}.uk-file-upload.uk-dragover{-webkit-box-shadow:0 0 6px rgba(0,0,0,.3);box-shadow:0 0 6px rgba(0,0,0,.3)}div.uk-form-file{padding:3px 2px}div.uk-form-file.md-btn{padding:2px 12px}.uk-form-file input[type=file]{position:absolute;top:0;z-index:1;width:100%;opacity:0;cursor:pointer;left:0;font-size:500px}.uk-form-file input[type=file]::-webkit-file-upload-button{cursor:pointer}.uk-form-select{display:inline-block;vertical-align:middle;position:relative;overflow:hidden}.uk-form-select select{position:absolute;top:0;z-index:1;width:100%;height:100%;opacity:0;cursor:pointer;left:0;-webkit-appearance:none}.uk-datepicker{z-index:1094;width:auto;padding:0}.uk-datepicker-nav{margin-bottom:15px;text-align:center;line-height:20px;background:#009688;padding:10px 0}.uk-datepicker-nav a,.uk-datepicker-nav a:hover{text-decoration:none;color:#fff}.uk-datepicker-nav .uk-form-select{font:400 16px/22px Roboto,sans-serif;color:#fff;text-transform:uppercase;border-bottom:1px solid rgba(255,255,255,.5);padding:0 4px}.uk-datepicker-nav .uk-form-select+.uk-form-select{margin-left:2px}.uk-datepicker-previous{float:left;margin-left:8px}.uk-datepicker-previous:after{content:"\f053"}.uk-datepicker-next{float:right;margin-right:8px}.uk-datepicker-next:after{content:"\f054"}.uk-datepicker-next:after,.uk-datepicker-previous:after{width:20px;font-family:FontAwesome}.uk-datepicker.dp-top{-webkit-transform-origin:50% 100%!important;transform-origin:50% 100%!important}.uk-datepicker-table{width:100%}.uk-datepicker-table td,.uk-datepicker-table th{padding:2px;font:400 13px/15px Roboto,sans-serif}.uk-datepicker-table th{color:#727272;font-size:12px;text-transform:uppercase}.uk-datepicker-table a{display:block;width:30px;line-height:30px;height:30px;text-align:center;text-decoration:none;border-radius:50%;color:#212121}.uk-datepicker-table a:hover{background-color:rgba(0,0,0,.085);color:#212121;outline:0}.uk-datepicker-table a.uk-active{background-color:#009688;color:#fff}a.uk-datepicker-table-muted{color:#999}.uk-autocomplete .uk-dropdown{display:block;max-height:0;padding:0;overflow-x:hidden;overflow-y:auto;border-radius:0;border:none;-webkit-transform:scale(.25,0);transform:scale(.25,0);opacity:0;-webkit-transition:all 280ms cubic-bezier(.4,0,.2,1);transition:all 280ms cubic-bezier(.4,0,.2,1);-webkit-animation:none!important;animation:none!important;-webkit-transform-origin:0 0;transform-origin:0 0}.uk-autocomplete.uk-open .uk-dropdown{-webkit-transform:scale(1);transform:scale(1);opacity:1;max-height:210px}[data-uk-autocomplete] .uk-dropdown{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}[data-uk-autocomplete] .uk-dropdown .uk-nav{margin:0}.uk-form-password-toggle{position:absolute;right:8px;top:16px;color:#727272}.uk-form-password-toggle:hover{color:#727272}.uk-nestable{padding:0;list-style:none}.uk-nestable a,.uk-nestable img{-webkit-touch-callout:none}.uk-nestable-list{margin:0;padding-left:40px;list-style:none}.uk-nestable-item{-ms-touch-action:none;touch-action:none}.uk-nestable-item+.uk-nestable-item{margin-top:10px}.uk-nestable-list:not(.uk-nestable-dragged)>.uk-nestable-item:first-child{margin-top:10px}.uk-nestable-dragged{position:absolute;z-index:1050;pointer-events:none;padding-left:0}.uk-nestable-placeholder{position:relative}.uk-nestable-placeholder>*{opacity:0}.uk-nestable-placeholder:after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border:1px dashed #ddd;opacity:1}.uk-nestable-empty{min-height:30px}.uk-nestable-handle{-ms-touch-action:none;touch-action:none}.uk-nestable-handle:hover{cursor:move}.uk-nestable-moving,.uk-nestable-moving *{cursor:move}.uk-nestable-moving iframe{pointer-events:none}[data-nestable-action=toggle]{cursor:pointer;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.uk-nestable-toggle{display:inline-block;visibility:hidden}.uk-nestable-toggle:after{content:"\f147";font-family:FontAwesome}.uk-parent>:not(.uk-nestable-list) .uk-nestable-toggle{visibility:visible}.uk-collapsed .uk-nestable-list{display:none}.uk-collapsed .uk-nestable-toggle:after{content:"\f196"}.uk-nestable-panel{padding:5px;background:#f5f5f5;border-radius:4px;border:1px solid rgba(0,0,0,.06);text-shadow:0 1px 0 #fff}.uk-nestable-handle{margin-right:16px}.uk-nestable-panel{padding:8px 16px;background:#fff;border-radius:4px;border:none;text-shadow:none;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24)}.uk-nestable-placeholder:after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border:none;background:rgba(0,0,0,.085);opacity:1}.uk-nestable-toggle{font-size:18px;height:18px;width:18px;line-height:18px;overflow:hidden;vertical-align:middle;margin-right:8px;display:none}.uk-nestable-toggle:after{vertical-align:top;content:'\e316';font-family:"Material Icons"}.uk-parent>.uk-nestable-panel .uk-nestable-toggle{display:inline-block}.uk-collapsed .uk-nestable-toggle:after{content:"\e313"}.uk-notify{position:fixed;top:10px;left:10px;z-index:1040;-webkit-box-sizing:border-box;box-sizing:border-box;width:350px}.uk-notify-bottom-right,.uk-notify-top-right{left:auto;right:10px}.uk-notify-bottom-center,.uk-notify-top-center{left:50%;margin-left:-175px}.uk-notify-bottom-center,.uk-notify-bottom-left,.uk-notify-bottom-right{top:auto;bottom:10px}@media (max-width:479px){.uk-notify{left:10px;right:10px;width:auto;margin:0}}.uk-notify-message{position:relative;margin-bottom:10px;padding:15px;background:#444;color:#fff;font-size:16px;line-height:22px;cursor:pointer;border:1px solid #444;border-radius:4px}.uk-notify-message>.uk-close{visibility:hidden;float:right}.uk-notify-message:hover>.uk-close{visibility:visible}.uk-notify-message-primary{background:#ebf7fd;color:#2d7091;border-color:rgba(45,112,145,.3)}.uk-notify-message-success{background:#f2fae3;color:#659f13;border-color:rgba(101,159,19,.3)}.uk-notify-message-warning{background:#fffceb;color:#e28327;border-color:rgba(226,131,39,.3)}.uk-notify-message-danger{background:#fff1f0;color:#d85030;border-color:rgba(216,80,48,.3)}.uk-notify{z-index:1114;width:400px;top:56px;max-width:100%}.uk-notify-bottom-center,.uk-notify-top-center{margin-left:-200px}.uk-notify-top-left{left:24px}.uk-notify-top-right{right:24px}.uk-notify-bottom-left{left:24px}.uk-notify-bottom-right{right:24px}.uk-notify-bottom-center,.uk-notify-bottom-left,.uk-notify-bottom-right{top:auto;bottom:8px}.uk-notify-message{background:#323232;border-radius:4px;padding:12px 16px;font-size:14px;line-height:18px;border:none}.uk-notify .uk-close{display:none}.uk-notify .notify-action{float:right;text-transform:uppercase;color:#8bc34a;margin-left:16px}.uk-notify .notify-action:hover{color:#689f38}.uk-notify .notify-content{overflow:hidden}.uk-notify-message-info{background:#1976d2;color:#fff}.uk-notify-message-success{background:#7cb342}.uk-notify-message-warning{background:#ffa000}.uk-notify-message-danger{background:#e53935}.uk-notify-message-danger,.uk-notify-message-info,.uk-notify-message-success,.uk-notify-message-warning{color:#fff}.uk-notify-message-danger .notify-action,.uk-notify-message-info .notify-action,.uk-notify-message-success .notify-action,.uk-notify-message-warning .notify-action{color:#fff}.uk-notify-message-danger .notify-action:hover,.uk-notify-message-info .notify-action:hover,.uk-notify-message-success .notify-action:hover,.uk-notify-message-warning .notify-action:hover{color:#fff;text-decoration:underline}@media only screen and (max-width:767px){.uk-notify-bottom-center,.uk-notify-bottom-left,.uk-notify-bottom-right,.uk-notify-top-center,.uk-notify-top-left,.uk-notify-top-right{width:100%;margin:0;left:0;right:0}.uk-notify-bottom-center>.uk-notify-message,.uk-notify-bottom-left>.uk-notify-message,.uk-notify-bottom-right>.uk-notify-message,.uk-notify-top-center>.uk-notify-message,.uk-notify-top-left>.uk-notify-message,.uk-notify-top-right>.uk-notify-message{border-radius:0;padding:16px 32px}.uk-notify-top-center,.uk-notify-top-left,.uk-notify-top-right{top:0;bottom:auto}.uk-notify-bottom-center,.uk-notify-bottom-left,.uk-notify-bottom-right{top:auto;bottom:-10px}}@media only screen and (min-width:960px){.sidebar_main_active .uk-notify-top-left,.sidebar_main_open .uk-notify-top-left{left:256px}.sidebar_main_active .uk-notify-top-center,.sidebar_main_open .uk-notify-top-center{margin-left:-80px}.sidebar_main_active .uk-notify-bottom-left,.sidebar_main_open .uk-notify-bottom-left{left:256px}.sidebar_main_active .uk-notify-bottom-center,.sidebar_main_open .uk-notify-bottom-center{margin-left:-80px}}.uk-slideshow{position:relative;z-index:0;width:100%;margin:0;padding:0;list-style:none;overflow:hidden;-ms-touch-action:pan-y;touch-action:pan-y}.uk-slideshow>li{position:absolute;top:0;left:0;width:100%;opacity:0}.uk-slideshow>.uk-active{z-index:10;opacity:1}.uk-slideshow>li>img{visibility:hidden}[data-uk-slideshow-slide]{cursor:pointer}.uk-slideshow-fullscreen,.uk-slideshow-fullscreen>li{height:100vh}.uk-slideshow-fade-in{-webkit-animation:uk-fade .5s linear;animation:uk-fade .5s linear}.uk-slideshow-fade-out{-webkit-animation:uk-fade .5s linear reverse;animation:uk-fade .5s linear reverse}.uk-slideshow-scroll-forward-in{-webkit-animation:uk-slide-right .5s ease-in-out;animation:uk-slide-right .5s ease-in-out}.uk-slideshow-scroll-forward-out{-webkit-animation:uk-slide-left .5s ease-in-out reverse;animation:uk-slide-left .5s ease-in-out reverse}.uk-slideshow-scroll-backward-in{-webkit-animation:uk-slide-left .5s ease-in-out;animation:uk-slide-left .5s ease-in-out}.uk-slideshow-scroll-backward-out{-webkit-animation:uk-slide-right .5s ease-in-out reverse;animation:uk-slide-right .5s ease-in-out reverse}.uk-slideshow-scale-out{-webkit-animation:uk-fade-scale-15 .5s ease-in-out reverse;animation:uk-fade-scale-15 .5s ease-in-out reverse}.uk-slideshow-swipe-forward-in{-webkit-animation:uk-slide-left-33 .5s ease-in-out;animation:uk-slide-left-33 .5s ease-in-out}.uk-slideshow-swipe-forward-out{-webkit-animation:uk-slide-left .5s ease-in-out reverse;animation:uk-slide-left .5s ease-in-out reverse}.uk-slideshow-swipe-backward-in{-webkit-animation:uk-slide-right-33 .5s ease-in-out;animation:uk-slide-right-33 .5s ease-in-out}.uk-slideshow-swipe-backward-out{-webkit-animation:uk-slide-right .5s ease-in-out reverse;animation:uk-slide-right .5s ease-in-out reverse}.uk-slideshow-swipe-backward-in:before,.uk-slideshow-swipe-forward-in:before{content:'';position:absolute;top:0;bottom:0;left:0;right:0;z-index:1;background:rgba(0,0,0,.6);-webkit-animation:uk-fade .5s ease-in-out reverse;animation:uk-fade .5s ease-in-out reverse}[data-uk-slider]{direction:ltr}html[dir=rtl] .uk-slider>*{direction:rtl}.uk-slider{position:relative;z-index:0;-ms-touch-action:pan-y;touch-action:pan-y}.uk-slider:not(.uk-grid){margin:0;padding:0;list-style:none}.uk-slider>*{position:absolute;top:0;left:0}.uk-slider-container{overflow:hidden}.uk-slider:not(.uk-drag){-webkit-transition:-webkit-transform .2s linear;transition:-webkit-transform .2s linear;transition:transform .2s linear;transition:transform .2s linear,-webkit-transform .2s linear}.uk-slider.uk-drag{cursor:col-resize;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.uk-slider a,.uk-slider img{-webkit-user-drag:none;user-drag:none;-webkit-touch-callout:none}.uk-slider img{pointer-events:none}.uk-slider-fullscreen,.uk-slider-fullscreen>li{height:100vh}.uk-slider .uk-active .md-card{-webkit-box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.uk-slider-center li{opacity:.4}.uk-slider-center li.uk-active{opacity:1}.uk-slidenav{display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;width:60px;height:60px;line-height:60px;color:rgba(50,50,50,.4);font-size:60px;text-align:center}.uk-slidenav:focus,.uk-slidenav:hover{outline:0;text-decoration:none;color:rgba(50,50,50,.7);cursor:pointer}.uk-slidenav:active{color:rgba(50,50,50,.9)}.uk-slidenav-previous:before{content:"\f104";font-family:FontAwesome}.uk-slidenav-next:before{content:"\f105";font-family:FontAwesome}.uk-slidenav-position{position:relative}.uk-slidenav-position .uk-slidenav{display:none;position:absolute;top:50%;z-index:1;margin-top:-30px}.uk-slidenav-position:hover .uk-slidenav{display:block}.uk-slidenav-position .uk-slidenav-previous{left:20px}.uk-slidenav-position .uk-slidenav-next{right:20px}.uk-slidenav-contrast{color:rgba(255,255,255,.5)}.uk-slidenav-contrast:focus,.uk-slidenav-contrast:hover{color:rgba(255,255,255,.7)}.uk-slidenav-contrast:active{color:rgba(255,255,255,.9)}.uk-tooltip{display:none;position:absolute;z-index:1030;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:200px;padding:5px 8px;background:#333;color:rgba(255,255,255,.7);font-size:12px;line-height:18px;border-radius:3px;text-shadow:0 1px 0 rgba(0,0,0,.5)}.uk-tooltip:after{content:"";display:block;position:absolute;width:0;height:0;border:5px dashed #333}.uk-tooltip-top-left:after,.uk-tooltip-top-right:after,.uk-tooltip-top:after{bottom:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent;border-top-color:#333}.uk-tooltip-bottom-left:after,.uk-tooltip-bottom-right:after,.uk-tooltip-bottom:after{top:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent;border-bottom-color:#333}.uk-tooltip-bottom:after,.uk-tooltip-top:after{left:50%;margin-left:-5px}.uk-tooltip-bottom-left:after,.uk-tooltip-top-left:after{left:10px}.uk-tooltip-bottom-right:after,.uk-tooltip-top-right:after{right:10px}.uk-tooltip-left:after{right:-5px;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent;border-left-color:#333}.uk-tooltip-right:after{left:-5px;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent;border-right-color:#333}.uk-tooltip{background:#424242;color:#fff;font-size:13px;padding:3px 16px;line-height:22px;text-shadow:none;min-width:80px;text-align:center;z-index:1304;opacity:0}.uk-tooltip .uk-tooltip-inner{text-overflow:ellipsis;display:inline-block;vertical-align:top;white-space:nowrap;overflow:hidden;width:100%}.uk-tooltip:after{display:none!important}.uk-tooltip.long-text{text-align:left}.uk-tooltip.long-text .uk-tooltip-inner{white-space:normal;overflow:visible;line-height:18px;padding:4px 0}.uk-tooltip-small{-webkit-transform:scale(.85);transform:scale(.85)}.uk-tooltip-top{z-index:9999}.touch .uk-tooltip{opacity:1}.uk-tab{border-bottom-color:rgba(0,0,0,.12)}.uk-sticky-placeholder .uk-tab{background:#fff;padding-top:8px}.uk-tab>li{margin-bottom:0;margin-top:0;z-index:1}.uk-tab>li>a{font-size:13px;text-transform:uppercase;color:#212121;border:none;border-bottom:2px solid transparent;border-radius:0!important;font-weight:500;min-width:100px;max-width:100%;text-align:center;-webkit-transition:all 220ms cubic-bezier(.4,0,.2,1);transition:all 220ms cubic-bezier(.4,0,.2,1);padding:8px!important;margin:0!important;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;top:1px;text-shadow:none}.uk-tab>li>a:focus,.uk-tab>li>a:hover{background:0 0;color:#212121;border-bottom-color:#b2dbfb}.uk-tab>li.uk-active>a{background:0 0!important;border-bottom-color:#2196f3}.uk-tab>li.uk-disabled>a,.uk-tab>li.uk-disabled>a:focus,.uk-tab>li.uk-disabled>a:hover{color:#aaa}.uk-tab-bottom li{margin-top:0}.uk-tab-bottom li>a{border-top:2px solid transparent;border-bottom:none;top:auto;bottom:1px}.uk-tab-bottom li>a:focus,.uk-tab-bottom li>a:hover{border-top-color:#b2dbfb}.uk-tab-bottom li.uk-active>a{border-top-color:#2196f3}.uk-tab-left{border-bottom:none}.uk-tab-left li>a{border-right:2px solid transparent;border-bottom:none;text-align:right;top:auto;bottom:auto}.uk-tab-left li>a:focus,.uk-tab-left li>a:hover{border-right-color:#b2dbfb}.uk-tab-left li.uk-active>a{border-right-color:#2196f3}.uk-tab-right{border-bottom:none}.uk-tab-right li>a{border-left:2px solid transparent;border-bottom:none;text-align:left;top:auto;bottom:auto}.uk-tab-right li>a:focus,.uk-tab-right li>a:hover{border-left-color:#b2dbfb}.uk-tab-right li.uk-active>a{border-left-color:#2196f3}.uk-tab-responsive li a{border:none!important}.uk-tab-responsive>a:before{content:'\e5d2';font-family:"Material Icons";color:#727272;margin-right:8px;vertical-align:-4px;font-size:18px}.uk-tab-icons>li>a{min-width:64px}.uk-tab-icons>li>a>.material-icons{font-size:24px}.uk-tab-double-header{margin:10px 24px 0!important}.uk-tab-double-header>li>a{color:#fff;border-bottom:4px solid transparent}.uk-tab-double-header>li>a:focus,.uk-tab-double-header>li>a:hover{color:#fff;border-bottom-color:#39a1f4}.uk-tab-double-header>li.uk-active>a{color:#fff;border-bottom-color:#7cb342}.uk-tab-double-header>li.uk-tab-responsive>a{border-bottom:none;padding-bottom:5px!important}.uk-tab-double-header>li.uk-tab-responsive>a:before{color:#fff}.uk-text-truncate{display:block}.uk-sortable{position:relative}.uk-sortable>*{-ms-touch-action:none;touch-action:none}.uk-sortable a,.uk-sortable img{-webkit-touch-callout:none}.uk-sortable>:last-child{margin-bottom:0}.uk-sortable-dragged{position:absolute;z-index:1050;pointer-events:none}.uk-sortable-placeholder{opacity:0}.uk-sortable-empty{min-height:30px}.uk-sortable-handle{-ms-touch-action:none;touch-action:none}.uk-sortable-handle:hover{cursor:move}.uk-sortable-moving,.uk-sortable-moving *{cursor:move}.uk-sortable-moving iframe{pointer-events:none}.uk-sortable>*{-ms-touch-action:auto;touch-action:auto}.uk-sortable.sortable-handler>*{cursor:move}.uk-sortable .sortable-handler{cursor:move}.uk-sortable-single{min-height:0}.uk-switcher{overflow:hidden}@media (min-width:1480px){.uk-grid-width-xLarge-1-1>*,.uk-width-xLarge-1-1{width:100%}.uk-grid-width-xLarge-1-2>*,.uk-grid-width-xLarge-2-4>*,.uk-grid-width-xLarge-3-6>*,.uk-grid-width-xLarge-5-10>*,.uk-width-xLarge-1-2,.uk-width-xLarge-2-4,.uk-width-xLarge-3-6,.uk-width-xLarge-5-10{width:50%}.uk-grid-width-xLarge-1-3>*,.uk-grid-width-xLarge-2-6>*,.uk-width-xLarge-1-3,.uk-width-xLarge-2-6{width:33.333%}.uk-grid-width-xLarge-2-3>*,.uk-grid-width-xLarge-4-6>*,.uk-width-xLarge-2-3,.uk-width-xLarge-4-6{width:66.666%}.uk-grid-width-xLarge-1-4>*,.uk-width-xLarge-1-4{width:25%}.uk-grid-width-xLarge-3-4>*,.uk-width-xLarge-3-4{width:75%}.uk-grid-width-xLarge-1-5>*,.uk-grid-width-xLarge-2-10>*,.uk-width-xLarge-1-5,.uk-width-xLarge-2-10{width:20%}.uk-grid-width-xLarge-2-5>*,.uk-grid-width-xLarge-4-10>*,.uk-width-xLarge-2-5,.uk-width-xLarge-4-10{width:40%}.uk-grid-width-xLarge-3-5>*,.uk-grid-width-xLarge-6-10>*,.uk-width-xLarge-3-5,.uk-width-xLarge-6-10{width:60%}.uk-grid-width-xLarge-4-5>*,.uk-grid-width-xLarge-8-10>*,.uk-width-xLarge-4-5,.uk-width-xLarge-8-10{width:80%}.uk-grid-width-xLarge-1-6>*,.uk-width-xLarge-1-6{width:16.666%}.uk-grid-width-xLarge-5-6>*,.uk-width-xLarge-5-6{width:83.333%}.uk-grid-width-xLarge-1-10>*,.uk-width-xLarge-1-10{width:10%}.uk-grid-width-xLarge-3-10>*,.uk-width-xLarge-3-10{width:30%}.uk-grid-width-xLarge-7-10>*,.uk-width-xLarge-7-10{width:70%}.uk-grid-width-xLarge-9-10>*,.uk-width-xLarge-9-10{width:90%}}.lte-ie9 [class*=uk-animation-]{opacity:1!important}.md-bg-cyan{background-color:#00acc1!important;color:#fff}.md-bg-light-green{background-color:#7cb342!important;color:#fff}.md-bg-grey{background-color:#616161!important;color:#fff}.md-bg-red{background-color:#d32f2f!important;color:#fff}.md-bg-light-blue{background-color:#0288d1!important;color:#fff}.md-bg-teal{background-color:#00897b!important;color:#fff}.md-bg-purple{background-color:#8e24aa!important;color:#fff}.md-btn{background:#fff;border:none;border-radius:2px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);min-height:31px;min-width:70px;padding:2px 16px;text-align:center;text-shadow:none;text-transform:uppercase;-webkit-transition:all 280ms ease;transition:all 280ms ease;color:#212121;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;-webkit-appearance:none;display:inline-block;vertical-align:middle;font:500 14px/31px Roboto,sans-serif!important}.md-btn:active,.md-btn:focus,.md-btn:hover,.uk-button-dropdown.uk-open>.md-btn{background:#fff;outline:0;text-decoration:none;color:#212121;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.md-btn.uk-active,.md-btn:active,.uk-button-dropdown.uk-open>.md-btn{-webkit-box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}.md-btn.uk-active{position:relative}.md-btn.uk-active:after{position:absolute;top:0;left:0;right:0;bottom:0;display:block;content:'';border:2px solid rgba(0,0,0,.4);border-radius:2px}.md-btn-flat{-webkit-box-shadow:none!important;box-shadow:none!important;background:0 0}.md-btn-flat:focus,.md-btn-flat:hover{background:rgba(153,153,153,.2)}.md-btn-flat.uk-active,.md-btn-flat:active{background:rgba(153,153,153,.4)}.md-btn-flat-danger,.md-btn-flat-danger .uk-active,.md-btn-flat-danger:active,.md-btn-flat-danger:focus,.md-btn-flat-danger:hover{color:#e53935}.md-btn-flat-danger:active,.md-btn-flat-danger:focus,.md-btn-flat-danger:hover{background:#fceaea}.md-btn-flat-danger.uk-active{color:#cd1e1a;background:#f6bebd}.md-btn-flat-primary,.md-btn-flat-primary.uk-active,.md-btn-flat-primary:active,.md-btn-flat-primary:focus,.md-btn-flat-primary:hover{color:#1976d2}.md-btn-flat-primary:active,.md-btn-flat-primary:focus,.md-btn-flat-primary:hover{background:#e3f2fd}.md-btn-flat-primary.uk-active{color:#0c7cd5;background:#b2dbfb}.md-btn-flat-success,.md-btn-flat-success.uk-active,.md-btn-flat-success:active,.md-btn-flat-success:focus,.md-btn-flat-success:hover{color:#7cb342}.md-btn-flat-success:active,.md-btn-flat-success:focus,.md-btn-flat-success:hover{background:#e1efd2}.md-btn-flat-success.uk-active{color:#628e34;background:#c8e1ad}.md-btn-flat-warning,.md-btn-flat-warning.uk-active,.md-btn-flat-warning:active,.md-btn-flat-warning:focus,.md-btn-flat-warning:hover{color:#ffa000}.md-btn-flat-warning:active,.md-btn-flat-warning:focus,.md-btn-flat-warning:hover{background:#ffeccc}.md-btn-flat-warning.uk-active{color:#cc8000;background:#ffd999}.md-btn-flat.disabled{background:0 0!important}.md-btn-danger,.md-btn-danger.uk-active,.md-btn-danger:active,.md-btn-danger:focus,.md-btn-danger:hover{background:#e53935}.md-btn-primary,.md-btn-primary.uk-active,.md-btn-primary:active,.md-btn-primary:focus,.md-btn-primary:hover{background:#2196f3}.md-btn-success,.md-btn-success.uk-active,.md-btn-success:active,.md-btn-success:focus,.md-btn-success:hover{background:#7cb342}.md-btn-warning,.md-btn-warning.uk-active,.md-btn-warning:active,.md-btn-warning:focus,.md-btn-warning:hover{background:#ffa000}.md-btn-danger,.md-btn-danger.uk-active,.md-btn-danger:active,.md-btn-danger:focus,.md-btn-danger:hover,.md-btn-danger>i,.md-btn-primary,.md-btn-primary.uk-active,.md-btn-primary:active,.md-btn-primary:focus,.md-btn-primary:hover,.md-btn-primary>i,.md-btn-success,.md-btn-success.uk-active,.md-btn-success:active,.md-btn-success:focus,.md-btn-success:hover,.md-btn-success>i,.md-btn-warning,.md-btn-warning.uk-active,.md-btn-warning:active,.md-btn-warning:focus,.md-btn-warning:hover,.md-btn-warning>i{color:#fff}.md-btn.disabled,.md-btn.disabled.uk-active,.md-btn.disabled:active,.md-btn.disabled:focus,.md-btn.disabled:hover{color:#a8a8a8;background:#eaeaea;-webkit-box-shadow:none!important;box-shadow:none!important;cursor:default;pointer-events:none}.md-btn>i.material-icons{margin-top:5px;font-size:18px}.md-btn-mini{line-height:21px!important;min-width:12px;font-size:10px!important;min-height:24px}.md-btn-small{line-height:27px!important;min-width:14px;font-size:11px!important}.md-btn-large{line-height:42px!important;font-size:16px!important}.md-btn::-moz-focus-inner{border:0;padding:0}.md-btn+.md-btn{margin-left:8px}.md-btn-block{width:100%}.md-btn-block+.md-btn-block{margin-left:0;margin-top:12px}.md-btn+.md-btn-group{margin-left:16px}.md-btn-facebook{background:#3b5998!important}.md-btn-twitter{background:#00aced!important}.md-btn-gplus{background:#dd4b39!important}.md-btn-facebook,.md-btn-facebook>i,.md-btn-gplus,.md-btn-gplus>i,.md-btn-twitter,.md-btn-twitter>i{color:#fff!important}.md-btn-icon>i.no_margin{margin-right:0!important;margin-left:0!important}.md-btn-icon-large,.md-btn-icon.md-btn-large{min-width:72px}.md-btn-icon-large>i,.md-btn-icon.md-btn-large>i{font-size:24px;margin-right:12px;vertical-align:-3px}.md-btn-icon,.md-btn-icon-default{min-width:64px}.md-btn-icon-default>i,.md-btn-icon>i{font-size:18px;margin-right:8px;vertical-align:-2px}.md-btn-icon-small,.md-btn-icon.md-btn-small{min-width:48px}.md-btn-icon-small>i,.md-btn-icon.md-btn-small>i{font-size:16px;margin-right:6px;vertical-align:-2px}.md-btn-icon-mini,.md-btn-icon.md-btn-mini{min-width:36px}.md-btn-icon-mini>i,.md-btn-icon.md-btn-mini>i{font-size:16px;margin-right:4px;vertical-align:-2px}.md-fab{-webkit-box-sizing:border-box;box-sizing:border-box;width:64px;height:64px;border-radius:50%;background:#fff;color:#727272;display:block;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);-webkit-transition:-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1);transition:-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1);border:none;position:relative;text-align:center;cursor:pointer}.md-fab:active,.md-fab:focus,.md-fab:hover{-webkit-box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}.md-fab>i{font-size:36px;line-height:64px;height:inherit;width:inherit;position:absolute;left:0;top:0;color:#727272}.md-fab.md-fab-accent{background:#7cb342}.md-fab.md-fab-accent>i{color:#fff}.md-fab.md-fab-success{background:#7cb342}.md-fab.md-fab-success>i{color:#fff}.md-fab.md-fab-danger{background:#e53935}.md-fab.md-fab-danger>i{color:#fff}.md-fab.md-fab-primary{background:#2196f3}.md-fab.md-fab-primary>i{color:#fff}.md-fab.md-fab-warning{background:#ffa000}.md-fab.md-fab-warning>i{color:#fff}.md-fab.md-fab-small{width:48px;height:48px;border-radius:50%}.md-fab.md-fab-small>i{line-height:48px;height:inherit;width:inherit;font-size:24px}.md-fab-speed-dial .md-fab-action-close{display:none}.md-fab-wrapper{position:fixed;bottom:24px;right:24px;z-index:1004;-webkit-transition:margin 280ms cubic-bezier(.4,0,.2,1);transition:margin 280ms cubic-bezier(.4,0,.2,1)}@media only screen and (max-width:767px){.md-fab-wrapper{bottom:20px;right:20px}}.md-fab-wrapper>.md-fab+.md-fab{margin-top:16px}.md-fab-wrapper.md-fab-in-card{position:absolute}.md-fab-speed-dial .md-fab-wrapper-small{position:absolute;bottom:80px;right:8px;min-height:48px;width:48px;z-index:-1}.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small{-webkit-transform:scale(0);transform:scale(0);opacity:0;position:absolute;right:0}.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-child(1){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) 50ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 50ms;transition:opacity .1s cubic-bezier(.4,0,.2,1) 50ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 50ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 50ms,opacity .1s cubic-bezier(.4,0,.2,1) 50ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 50ms,opacity .1s cubic-bezier(.4,0,.2,1) 50ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 50ms}.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-last-child(2){bottom:64px}.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-child(2){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) .1s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .1s;transition:opacity .1s cubic-bezier(.4,0,.2,1) .1s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .1s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .1s,opacity .1s cubic-bezier(.4,0,.2,1) .1s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .1s,opacity .1s cubic-bezier(.4,0,.2,1) .1s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .1s}.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-last-child(3){bottom:128px}.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-child(3){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) 150ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 150ms;transition:opacity .1s cubic-bezier(.4,0,.2,1) 150ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 150ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 150ms,opacity .1s cubic-bezier(.4,0,.2,1) 150ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 150ms,opacity .1s cubic-bezier(.4,0,.2,1) 150ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 150ms}.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-last-child(4){bottom:192px}.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-child(4){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) .2s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .2s;transition:opacity .1s cubic-bezier(.4,0,.2,1) .2s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .2s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .2s,opacity .1s cubic-bezier(.4,0,.2,1) .2s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .2s,opacity .1s cubic-bezier(.4,0,.2,1) .2s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .2s}.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-last-child(5){bottom:256px}.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-child(5){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) 250ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 250ms;transition:opacity .1s cubic-bezier(.4,0,.2,1) 250ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 250ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 250ms,opacity .1s cubic-bezier(.4,0,.2,1) 250ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 250ms,opacity .1s cubic-bezier(.4,0,.2,1) 250ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 250ms}.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-last-child(6){bottom:320px}.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-child(6){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) .3s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .3s;transition:opacity .1s cubic-bezier(.4,0,.2,1) .3s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .3s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .3s,opacity .1s cubic-bezier(.4,0,.2,1) .3s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .3s,opacity .1s cubic-bezier(.4,0,.2,1) .3s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .3s}.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-last-child(7){bottom:384px}.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-child(7){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) 350ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 350ms;transition:opacity .1s cubic-bezier(.4,0,.2,1) 350ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 350ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 350ms,opacity .1s cubic-bezier(.4,0,.2,1) 350ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 350ms,opacity .1s cubic-bezier(.4,0,.2,1) 350ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 350ms}.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-last-child(8){bottom:448px}.md-fab-speed-dial .md-fab-wrapper-small .md-fab-small:nth-child(8){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) .4s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .4s;transition:opacity .1s cubic-bezier(.4,0,.2,1) .4s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .4s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .4s,opacity .1s cubic-bezier(.4,0,.2,1) .4s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .4s,opacity .1s cubic-bezier(.4,0,.2,1) .4s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .4s}.md-fab-speed-dial.md-fab-active .md-fab-small{-webkit-transform:scale(1);transform:scale(1);opacity:1;z-index:10}.md-fab-speed-dial.md-fab-active .md-fab-small:nth-last-child(1){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) 50ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 50ms;transition:opacity .1s cubic-bezier(.4,0,.2,1) 50ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 50ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 50ms,opacity .1s cubic-bezier(.4,0,.2,1) 50ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 50ms,opacity .1s cubic-bezier(.4,0,.2,1) 50ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 50ms}.md-fab-speed-dial.md-fab-active .md-fab-small:nth-last-child(2){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) .1s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .1s;transition:opacity .1s cubic-bezier(.4,0,.2,1) .1s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .1s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .1s,opacity .1s cubic-bezier(.4,0,.2,1) .1s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .1s,opacity .1s cubic-bezier(.4,0,.2,1) .1s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .1s}.md-fab-speed-dial.md-fab-active .md-fab-small:nth-last-child(3){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) 150ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 150ms;transition:opacity .1s cubic-bezier(.4,0,.2,1) 150ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 150ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 150ms,opacity .1s cubic-bezier(.4,0,.2,1) 150ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 150ms,opacity .1s cubic-bezier(.4,0,.2,1) 150ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 150ms}.md-fab-speed-dial.md-fab-active .md-fab-small:nth-last-child(4){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) .2s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .2s;transition:opacity .1s cubic-bezier(.4,0,.2,1) .2s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .2s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .2s,opacity .1s cubic-bezier(.4,0,.2,1) .2s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .2s,opacity .1s cubic-bezier(.4,0,.2,1) .2s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .2s}.md-fab-speed-dial.md-fab-active .md-fab-small:nth-last-child(5){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) 250ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 250ms;transition:opacity .1s cubic-bezier(.4,0,.2,1) 250ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 250ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 250ms,opacity .1s cubic-bezier(.4,0,.2,1) 250ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 250ms,opacity .1s cubic-bezier(.4,0,.2,1) 250ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 250ms}.md-fab-speed-dial.md-fab-active .md-fab-small:nth-last-child(6){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) .3s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .3s;transition:opacity .1s cubic-bezier(.4,0,.2,1) .3s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .3s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .3s,opacity .1s cubic-bezier(.4,0,.2,1) .3s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .3s,opacity .1s cubic-bezier(.4,0,.2,1) .3s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .3s}.md-fab-speed-dial.md-fab-active .md-fab-small:nth-last-child(7){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) 350ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 350ms;transition:opacity .1s cubic-bezier(.4,0,.2,1) 350ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 350ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 350ms,opacity .1s cubic-bezier(.4,0,.2,1) 350ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 350ms,opacity .1s cubic-bezier(.4,0,.2,1) 350ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 350ms}.md-fab-speed-dial.md-fab-active .md-fab-small:nth-last-child(8){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) .4s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .4s;transition:opacity .1s cubic-bezier(.4,0,.2,1) .4s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .4s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .4s,opacity .1s cubic-bezier(.4,0,.2,1) .4s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .4s,opacity .1s cubic-bezier(.4,0,.2,1) .4s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .4s}.md-fab-speed-dial-horizontal .md-fab-wrapper-small{position:absolute;right:80px;bottom:8px;min-height:48px;width:48px;z-index:-1}.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small{-webkit-transform:scale(0);transform:scale(0);opacity:0;position:absolute;right:0}.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-child(1){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) 50ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 50ms;transition:opacity .1s cubic-bezier(.4,0,.2,1) 50ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 50ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 50ms,opacity .1s cubic-bezier(.4,0,.2,1) 50ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 50ms,opacity .1s cubic-bezier(.4,0,.2,1) 50ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 50ms}.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-last-child(2){right:64px}.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-child(2){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) .1s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .1s;transition:opacity .1s cubic-bezier(.4,0,.2,1) .1s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .1s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .1s,opacity .1s cubic-bezier(.4,0,.2,1) .1s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .1s,opacity .1s cubic-bezier(.4,0,.2,1) .1s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .1s}.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-last-child(3){right:128px}.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-child(3){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) 150ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 150ms;transition:opacity .1s cubic-bezier(.4,0,.2,1) 150ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 150ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 150ms,opacity .1s cubic-bezier(.4,0,.2,1) 150ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 150ms,opacity .1s cubic-bezier(.4,0,.2,1) 150ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 150ms}.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-last-child(4){right:192px}.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-child(4){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) .2s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .2s;transition:opacity .1s cubic-bezier(.4,0,.2,1) .2s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .2s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .2s,opacity .1s cubic-bezier(.4,0,.2,1) .2s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .2s,opacity .1s cubic-bezier(.4,0,.2,1) .2s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .2s}.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-last-child(5){right:256px}.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-child(5){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) 250ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 250ms;transition:opacity .1s cubic-bezier(.4,0,.2,1) 250ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 250ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 250ms,opacity .1s cubic-bezier(.4,0,.2,1) 250ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 250ms,opacity .1s cubic-bezier(.4,0,.2,1) 250ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 250ms}.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-last-child(6){right:320px}.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-child(6){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) .3s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .3s;transition:opacity .1s cubic-bezier(.4,0,.2,1) .3s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .3s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .3s,opacity .1s cubic-bezier(.4,0,.2,1) .3s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .3s,opacity .1s cubic-bezier(.4,0,.2,1) .3s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .3s}.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-last-child(7){right:384px}.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-child(7){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) 350ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 350ms;transition:opacity .1s cubic-bezier(.4,0,.2,1) 350ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 350ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 350ms,opacity .1s cubic-bezier(.4,0,.2,1) 350ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 350ms,opacity .1s cubic-bezier(.4,0,.2,1) 350ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 350ms}.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-last-child(8){right:448px}.md-fab-speed-dial-horizontal .md-fab-wrapper-small .md-fab-small:nth-child(8){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) .4s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .4s;transition:opacity .1s cubic-bezier(.4,0,.2,1) .4s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .4s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .4s,opacity .1s cubic-bezier(.4,0,.2,1) .4s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .4s,opacity .1s cubic-bezier(.4,0,.2,1) .4s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .4s}.md-fab-speed-dial-horizontal.md-fab-active .md-fab-small{-webkit-transform:scale(1);transform:scale(1);opacity:1;z-index:10}.md-fab-speed-dial-horizontal.md-fab-active .md-fab-small:nth-last-child(1){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) 50ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 50ms;transition:opacity .1s cubic-bezier(.4,0,.2,1) 50ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 50ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 50ms,opacity .1s cubic-bezier(.4,0,.2,1) 50ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 50ms,opacity .1s cubic-bezier(.4,0,.2,1) 50ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 50ms}.md-fab-speed-dial-horizontal.md-fab-active .md-fab-small:nth-last-child(2){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) .1s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .1s;transition:opacity .1s cubic-bezier(.4,0,.2,1) .1s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .1s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .1s,opacity .1s cubic-bezier(.4,0,.2,1) .1s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .1s,opacity .1s cubic-bezier(.4,0,.2,1) .1s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .1s}.md-fab-speed-dial-horizontal.md-fab-active .md-fab-small:nth-last-child(3){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) 150ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 150ms;transition:opacity .1s cubic-bezier(.4,0,.2,1) 150ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 150ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 150ms,opacity .1s cubic-bezier(.4,0,.2,1) 150ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 150ms,opacity .1s cubic-bezier(.4,0,.2,1) 150ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 150ms}.md-fab-speed-dial-horizontal.md-fab-active .md-fab-small:nth-last-child(4){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) .2s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .2s;transition:opacity .1s cubic-bezier(.4,0,.2,1) .2s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .2s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .2s,opacity .1s cubic-bezier(.4,0,.2,1) .2s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .2s,opacity .1s cubic-bezier(.4,0,.2,1) .2s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .2s}.md-fab-speed-dial-horizontal.md-fab-active .md-fab-small:nth-last-child(5){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) 250ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 250ms;transition:opacity .1s cubic-bezier(.4,0,.2,1) 250ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 250ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 250ms,opacity .1s cubic-bezier(.4,0,.2,1) 250ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 250ms,opacity .1s cubic-bezier(.4,0,.2,1) 250ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 250ms}.md-fab-speed-dial-horizontal.md-fab-active .md-fab-small:nth-last-child(6){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) .3s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .3s;transition:opacity .1s cubic-bezier(.4,0,.2,1) .3s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .3s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .3s,opacity .1s cubic-bezier(.4,0,.2,1) .3s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .3s,opacity .1s cubic-bezier(.4,0,.2,1) .3s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .3s}.md-fab-speed-dial-horizontal.md-fab-active .md-fab-small:nth-last-child(7){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) 350ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 350ms;transition:opacity .1s cubic-bezier(.4,0,.2,1) 350ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 350ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 350ms,opacity .1s cubic-bezier(.4,0,.2,1) 350ms;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) 350ms,opacity .1s cubic-bezier(.4,0,.2,1) 350ms,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) 350ms}.md-fab-speed-dial-horizontal.md-fab-active .md-fab-small:nth-last-child(8){-webkit-transition:opacity .1s cubic-bezier(.4,0,.2,1) .4s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .4s;transition:opacity .1s cubic-bezier(.4,0,.2,1) .4s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .4s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .4s,opacity .1s cubic-bezier(.4,0,.2,1) .4s;transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),transform .1s cubic-bezier(.4,0,.2,1) .4s,opacity .1s cubic-bezier(.4,0,.2,1) .4s,-webkit-box-shadow 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .1s cubic-bezier(.4,0,.2,1) .4s}.md-fab-speed-dial-horizontal[data-fab-hover] .md-fab{display:inline-block;vertical-align:bottom}.md-fab-speed-dial-horizontal[data-fab-hover] .md-fab-wrapper-small{display:none;min-height:48px;width:auto;z-index:-1;white-space:nowrap;padding-bottom:8px;vertical-align:bottom;position:static;right:auto;bottom:auto}.md-fab-speed-dial-horizontal[data-fab-hover] .md-fab-wrapper-small .md-fab-small{position:static;right:auto;display:inline-block;vertical-align:bottom}.md-fab-speed-dial-horizontal[data-fab-hover] .md-fab-wrapper-small .md-fab-small+.md-fab-small{margin-left:16px}.md-fab-speed-dial-horizontal[data-fab-hover] .md-fab-wrapper-small .md-fab-small:last-child{margin-right:16px}.md-fab-speed-dial-horizontal[data-fab-hover].md-fab-over .md-fab-wrapper-small{display:inline-block}.md-fab-speed-dial[data-fab-hover] .md-fab-wrapper-small{margin-left:8px;position:static;display:none;bottom:auto;right:auto}.md-fab-speed-dial[data-fab-hover] .md-fab-wrapper-small .md-fab-small{position:static;bottom:auto}.md-fab-speed-dial[data-fab-hover] .md-fab-wrapper-small .md-fab-small+.md-fab-small{margin-top:16px}.md-fab-speed-dial[data-fab-hover] .md-fab-wrapper-small .md-fab-small:last-child{margin-bottom:16px}.md-fab-speed-dial[data-fab-hover].md-fab-over .md-fab-wrapper-small{display:block}.md-fab-toolbar{-webkit-transition:all 280ms cubic-bezier(.4,0,.2,1);transition:all 280ms cubic-bezier(.4,0,.2,1);cursor:default}.md-fab-toolbar>i{cursor:pointer}.md-fab-toolbar-actions{visibility:hidden;white-space:nowrap;padding:0 16px;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box}.md-fab-toolbar-actions>a,.md-fab-toolbar-actions>button{display:block;float:left;opacity:0;margin:0 0 0 16px;height:64px;width:48px;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition:opacity 280ms cubic-bezier(.4,0,.2,1);transition:opacity 280ms cubic-bezier(.4,0,.2,1);background:0 0;border:none;outline:0;cursor:pointer}.md-fab-toolbar-actions>a:first-child,.md-fab-toolbar-actions>button:first-child{margin-left:0}.md-fab-toolbar-actions .material-icons{font-size:36px;line-height:64px}.md-fab-toolbar.md-fab-animated{-webkit-box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);border-radius:4px}.md-fab-toolbar.md-fab-animated>i{display:none}.md-fab-toolbar.md-fab-active .md-fab-toolbar-actions{visibility:visible}.md-fab-toolbar.md-fab-active .md-fab-toolbar-actions>a,.md-fab-toolbar.md-fab-active .md-fab-toolbar-actions>button{opacity:1}.md-fab-toolbar.md-fab-small .md-fab-toolbar-actions>a,.md-fab-toolbar.md-fab-small .md-fab-toolbar-actions>button{height:48px;width:36px;padding:0;margin:0 0 0 8px}.md-fab-toolbar.md-fab-small .md-fab-toolbar-actions>a:first-child,.md-fab-toolbar.md-fab-small .md-fab-toolbar-actions>button:first-child{margin-left:0}.md-fab-toolbar.md-fab-small .md-fab-toolbar-actions .material-icons{font-size:24px;line-height:48px;height:inherit}.md-fab-sheet{-webkit-transition:all 280ms cubic-bezier(.4,0,.2,1);transition:all 280ms cubic-bezier(.4,0,.2,1);cursor:default}.md-fab-sheet>i{cursor:pointer}.md-fab-sheet-actions{visibility:hidden;white-space:nowrap;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;padding:4px 0}.md-fab-sheet-actions>a{display:block;opacity:0;padding:4px 16px;-webkit-box-sizing:border-box;box-sizing:border-box;font:400 16px/32px Roboto,sans-serif;text-align:left}.md-fab-sheet-actions>a,.md-fab-sheet-actions>a:hover{color:#212121}.md-fab-sheet-actions .material-icons{font-size:24px;margin-right:8px;vertical-align:-6px}.md-fab-sheet.md-fab-animated{-webkit-box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);border-radius:4px}.md-fab-sheet.md-fab-animated>i{display:none}.md-fab-sheet.md-fab-active .md-fab-sheet-actions{visibility:visible}.md-fab-sheet.md-fab-active .md-fab-sheet-actions>a{opacity:1}.sidebar_secondary_active .md-fab-wrapper{margin-right:264px}@media only screen and (max-width:767px){.sidebar_secondary_active .md-fab-wrapper{margin-right:280px}}.md-toggle-group .md-toggle-button{border-width:0 0 2px;border-style:solid;border-color:transparent;background:0 0;line-height:30px;min-width:42px;text-align:center;padding:0 8px;vertical-align:middle;cursor:pointer}.md-toggle-group .md-toggle-button.md-toggle-active{border-bottom-color:#212121}.md-toggle-group.md-toggle-group-small .md-toggle-button{font-size:11px;line-height:24px;min-width:16px;padding:0 6px}.md-btn-group{display:inline-block;vertical-align:top;position:relative;font-size:0;white-space:nowrap}.md-btn-group .md-btn{vertical-align:top;margin-left:0!important}.md-btn-group .md-btn:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.md-btn-group .md-btn:not(:first-child):not(:last-child){border-radius:0}.md-btn-group .md-btn:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.md-card{background:#fff;position:relative;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);border:none}.md-card+.md-card,.md-card+.uk-grid,.uk-grid+.md-card{margin-top:25px}.md-card .full_width_in_card{padding:16px 24px;background:rgba(0,0,0,.085)}.md-card .md-card-toolbar{height:48px;padding:0 16px;border-bottom:1px solid rgba(0,0,0,.12);background:#fff}.md-card .md-card-toolbar:after,.md-card .md-card-toolbar:before{content:" ";display:table}.md-card .md-card-toolbar:after{clear:both}.md-card .md-card-toolbar:after,.md-card .md-card-toolbar:before{content:" ";display:table}.md-card .md-card-toolbar:after{clear:both}.md-card .md-card-toolbar-heading-text{font:500 14px/50px Roboto,sans-serif;color:#212121;margin:0;float:left;overflow:hidden;height:48px}.md-card .md-card-toolbar-heading-text.large{font-size:18px;font-weight:400}.md-card .md-card-toolbar .md-toggle-group{float:left;margin:8px 0 0 16px}.md-card .md-card-toolbar .md-toggle-group.md-toggle-group-small{margin-top:10px}.md-card .md-card-toolbar .md-card-toolbar-actions{float:right;padding-top:10px}.md-card .md-card-toolbar .md-card-toolbar-actions .uk-open .md-card-toolbar-icon{background:rgba(0,0,0,.085);color:#212121}.md-card .md-card-toolbar .md-card-toolbar-actions .md-card-dropdown{display:inline-block;position:relative}.md-card .md-card-toolbar .md-card-toolbar-actions .selectize-control{min-width:220px;margin-top:-3px}.md-card .md-card-toolbar .md-card-toolbar-actions .selectize-control .selectize-input{min-height:30px;padding:4px 8px}.md-card .md-card-toolbar .md-card-toolbar-actions .selectize-control .selectize-dropdown{margin-top:-34px}.md-card .md-card-toolbar .md-icon+.md-card-dropdown{margin-left:4px}.md-card .md-card-toolbar .md-card-fullscreen-deactivate{margin:9px 8px 0 0}.md-card .md-card-toolbar-input{border:none;font:400 18px/24px Roboto,sans-serif;height:auto;background:0 0!important;padding:12px 0;width:50%;-webkit-box-sizing:border-box;box-sizing:border-box}.md-card .md-card-toolbar .uk-tab{margin-top:-2px;border-bottom:none}.md-card .md-card-toolbar .uk-tab li>a{padding:10px 8px!important}.md-card .md-card-head{height:160px;position:relative;border-bottom:1px solid rgba(0,0,0,.12)}.md-card .md-card-head-menu{position:absolute;right:8px;top:8px}.md-card .md-card-head-avatar{width:82px;height:82px;border-radius:50%;margin-top:16px;border:2px solid #fff;display:inline-block}.md-card .md-card-head-text{padding:8px 16px 16px;font:500 16px/22px Roboto,sans-serif;color:#212121;margin:0}.md-card .md-card-head-text span:not(.listNavSelector){display:block;font:400 12px/18px Roboto,sans-serif;margin-top:-2px}.md-card .md-card-head-text.text_dark{color:#212121!important}.md-card .md-card-head-text-over{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.65)),to(rgba(0,0,0,0)));background-image:linear-gradient(to bottom,rgba(0,0,0,.65) 0,rgba(0,0,0,0) 100%)}.md-card .md-card-head-subtext{position:absolute;bottom:10px;left:0;right:0;padding:0 16px;text-align:right;color:#fff}.md-card .md-card-head-subtext span{font-size:26px}.md-card .md-card-head-icon{font-size:48px;color:#fff;vertical-align:middle}.md-card .md-card-head.head_background{background-repeat:no-repeat;background-position:center center;background-size:cover;border-bottom-color:transparent}.md-card .md-card-head.head_background .md-card-head-text{color:#fff}.md-card .md-card-head.head_background_top{background-repeat:no-repeat;background-position:center top}.md-card .md-card-head.head_background_bottom{background-repeat:no-repeat;background-position:center bottom}.md-card .md-card-head .head_chart{height:100px;width:100%;position:absolute!important;left:0;top:40px}.md-card .md-card-head .fitVid_player{width:100%;height:160px;overflow:hidden}.md-card .md-card-head-img{height:100%;width:auto}.md-card .md-card-head iframe{height:160px}.md-card .md-card-content{padding:16px}.md-card .md-card-content.padding-reset{padding:0}.md-card .md-card-content.large-padding{padding:24px 35px}.md-card .md-card-content.small-padding{padding:8px}.md-card.md-card-fullscreen-activate{cursor:pointer}.md-card.md-card-fullscreen{position:fixed;z-index:9998;overflow-x:hidden;cursor:default}.md-card.md-card-fullscreen .md-card-fullscreen-activate{display:none}.md-card.md-card-fullscreen .md-card-fullscreen-hide{display:none}.md-card .md-card-fullscreen-content{display:none;padding:16px}.md-card-fullscreen-content-hidden .md-card .md-card-fullscreen-content{display:block;visibility:hidden;padding:0}.md-card.mdToolbar_fixed{overflow-y:hidden}.md-card.mdToolbar_fixed>.md-card-toolbar{position:fixed;left:0;right:0;top:0;z-index:9999;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.md-card.mdToolbar_fixed>.md-card-content{overflow-y:scroll;-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;width:100%;top:48px;bottom:0}.md-card.mdToolbar_fixed>.md-card-content .md-card-fullscreen-content{padding:16px 0}.md-card.md-card-overlay{overflow:hidden;padding-bottom:54px}.md-card.md-card-overlay .md-card-content{height:142px;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box}.md-card.md-card-overlay .md-card-content.no_truncate{position:relative}.md-card.md-card-overlay .md-card-content.no_truncate:after{position:absolute;bottom:0;left:0;right:0;height:8px;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(50%,#fff),to(rgba(255,255,255,0)));background-image:linear-gradient(to top,#fff 50%,rgba(255,255,255,0) 100%);display:block;content:'';z-index:10}.md-card.md-card-overlay .md-card-content>pre{margin-top:0;max-height:110px}.md-card.md-card-overlay .md-card-content>pre>code{overflow:hidden}.md-card.md-card-overlay .md-card-overlay-content{position:absolute;top:100%;left:0;right:0;padding:0 16px;margin-top:-54px;border-top:1px solid rgba(0,0,0,.12);text-align:left;bottom:0;background:#fff;z-index:10;-webkit-transition:all 280ms cubic-bezier(.4,0,.2,1);transition:all 280ms cubic-bezier(.4,0,.2,1)}.md-card.md-card-overlay .md-card-overlay-content p{margin:0}.md-card.md-card-overlay .md-card-overlay-content p+*{margin-top:16px}.md-card.md-card-overlay .md-card-overlay-content p+p{margin-top:4px}.md-card.md-card-overlay .md-card-overlay-header{padding:12px 0}.md-card.md-card-overlay .md-card-overlay-header:after,.md-card.md-card-overlay .md-card-overlay-header:before{content:" ";display:table}.md-card.md-card-overlay .md-card-overlay-header:after{clear:both}.md-card.md-card-overlay .md-card-overlay-header:after,.md-card.md-card-overlay .md-card-overlay-header:before{content:" ";display:table}.md-card.md-card-overlay .md-card-overlay-header:after{clear:both}.md-card.md-card-overlay .md-card-overlay-header h3,.md-card.md-card-overlay .md-card-overlay-header h4{margin:0;text-overflow:ellipsis;display:inline-block;vertical-align:top;white-space:nowrap;overflow:hidden;width:100%;padding-right:32px;-webkit-box-sizing:border-box;box-sizing:border-box}.md-card.md-card-overlay .md-card-overlay-header h3{font:400 16px/30px Roboto,sans-serif}.md-card.md-card-overlay .md-card-overlay-header h4{font:500 14px/30px Roboto,sans-serif}.md-card.md-card-overlay .md-card-overlay-header .md-icon{position:absolute;right:12px;top:11px}.md-card.md-card-overlay-active .md-card-overlay-content{top:-1px;margin-top:0}.md-card.md-card-hover{-webkit-transition:all 280ms cubic-bezier(.4,0,.2,1);transition:all 280ms cubic-bezier(.4,0,.2,1);will-change:box-shadow}.md-card.md-card-hover:hover{-webkit-box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}.uk-sortable-dragged .md-card{-webkit-box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}.uk-sortable-dragged .md-card canvas{margin:0 auto;display:block}.md-card .heading_list{padding:0}.md-card-danger,.md-card-primary,.md-card-success,.md-card-warning{border-left:4px solid transparent}.md-card-primary{border-left-color:#2196f3}.md-card-success{border-left-color:#7cb342}.md-card-danger{border-left-color:#e53935}.md-card-warning{border-left-color:#ffa000}.md-card-horizontal{position:relative;min-height:200px}.md-card-horizontal:after,.md-card-horizontal:before{content:" ";display:table}.md-card-horizontal:after{clear:both}.md-card-horizontal:after,.md-card-horizontal:before{content:" ";display:table}.md-card-horizontal:after{clear:both}.md-card-horizontal-grid{min-height:auto}.md-card-horizontal .md-card-head{border-right:1px solid rgba(0,0,0,.12);border-bottom:none;width:200px;height:100%;position:absolute;left:0;top:0;bottom:0}@media only screen and (max-width:767px){.md-card-horizontal .md-card-head{width:140px}}.md-card-horizontal .md-card-head-grid{border-right:1px solid rgba(0,0,0,.12)}.md-card-horizontal .md-card-head-menu{right:auto;left:8px}.md-card-horizontal .md-card-content{margin-left:200px}@media only screen and (max-width:767px){.md-card-horizontal .md-card-content{margin-left:140px}}.md-card-horizontal .md-card-content-grid{padding:16px}.md-expand,.md-expand-group>*{opacity:0}.md-card-placeholder{min-width:100%}.md-card-list-wrapper,.md-card-list-wrapper *,.md-card-list-wrapper :after,.md-card-list-wrapper :before,.md-card-list-wrapper:after,.md-card-list-wrapper:before{-webkit-box-sizing:border-box;box-sizing:border-box}.md-card-list-wrapper .md-card-list-header{position:absolute;top:-24px;left:0}.md-card-list-wrapper .md-card-list{margin:48px 0 0 0;position:relative}.md-card-list-wrapper .md-card-list:first-child{margin-top:24px}.md-card-list-wrapper .md-card-list>ul{margin:0;padding:0;list-style:none}.md-card-list-wrapper .md-card-list>ul>li{padding:0;margin:0;list-style:none}.md-card-list-wrapper .md-card-list>ul>li{min-height:34px;padding:8px 16px;font-size:13px;-webkit-transition:background 150ms,padding .2s;transition:background 150ms,padding .2s;background:#fff;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24)}.md-card-list-wrapper .md-card-list>ul>li:after,.md-card-list-wrapper .md-card-list>ul>li:before{content:" ";display:table}.md-card-list-wrapper .md-card-list>ul>li:after{clear:both}.md-card-list-wrapper .md-card-list>ul>li:after,.md-card-list-wrapper .md-card-list>ul>li:before{content:" ";display:table}.md-card-list-wrapper .md-card-list>ul>li:after{clear:both}.md-card-list-wrapper .md-card-list>ul>li.item-shown{background:#fff;padding:8px 36px}@media only screen and (max-width:767px){.md-card-list-wrapper .md-card-list>ul>li.item-shown .md-card-list-item-subject{clear:both;float:none;padding-top:16px}.md-card-list-wrapper .md-card-list>ul>li.item-shown .md-card-list-item-subject>span{white-space:normal}}.md-card-list-wrapper .md-card-list>ul>li.item-shown .md-card-list-item-sender{width:auto;overflow:hidden}.md-card-list-wrapper .md-card-list>ul>li.item-shown.md-card-list-item-selected{position:relative}.md-card-list-wrapper .md-card-list>ul>li.item-shown.md-card-list-item-selected:before{content:'';position:absolute;display:block;left:0;top:0;bottom:0;width:8px;background:#e3f2fd}.md-card-list-wrapper .md-card-list .md-card-list-item-avatar-wrapper,.md-card-list-wrapper .md-card-list .md-card-list-item-select,.md-card-list-wrapper .md-card-list .md-card-list-item-sender{float:left}.md-card-list-wrapper .md-card-list .md-card-list-item-select{padding:6px 8px 0 0}.md-card-list-wrapper .md-card-list .md-card-list-item-avatar-wrapper,.md-card-list-wrapper .md-card-list .md-card-list-item-date,.md-card-list-wrapper .md-card-list .md-card-list-item-sender,.md-card-list-wrapper .md-card-list .md-card-list-item-subject{padding:0 8px}.md-card-list-wrapper .md-card-list .md-card-list-item-avatar-wrapper .md-card-list-item-avatar{background:#757575;color:#fff;width:34px;border-radius:50%;display:block}.md-card-list-wrapper .md-card-list .md-card-list-item-avatar-wrapper .md-card-list-item-avatar-large{width:82px;border-radius:50%}.md-card-list-wrapper .md-card-list .md-card-list-item-avatar-wrapper span.md-card-list-item-avatar{line-height:34px;text-transform:uppercase;text-align:center}.md-card-list-wrapper .md-card-list .md-card-list-item-sender{width:220px;line-height:34px}.md-card-list-wrapper .md-card-list .md-card-list-item-sender>span{text-overflow:ellipsis;display:inline-block;vertical-align:top;white-space:nowrap;overflow:hidden;width:100%}@media only screen and (max-width:1219px){.md-card-list-wrapper .md-card-list .md-card-list-item-sender{display:none}}.md-card-list-wrapper .md-card-list .md-card-list-item-subject{overflow:hidden;font-weight:500}.md-card-list-wrapper .md-card-list .md-card-list-item-subject>span{line-height:34px;text-overflow:ellipsis;display:inline-block;vertical-align:top;white-space:nowrap;overflow:hidden;width:100%}.md-card-list-wrapper .md-card-list .md-card-list-item-subject .md-card-list-item-sender-small{display:none}@media only screen and (max-width:1219px){.md-card-list-wrapper .md-card-list .md-card-list-item-subject .md-card-list-item-sender-small{display:block}.md-card-list-wrapper .md-card-list .md-card-list-item-subject .md-card-list-item-sender-small+span{line-height:inherit}}.md-card-list-wrapper .md-card-list .md-card-list-item-subject .md-card-list-item-sender-small>span{text-overflow:ellipsis;display:inline-block;vertical-align:top;white-space:nowrap;overflow:hidden;width:100%;font-size:12px;color:#999}.md-card-list-wrapper .md-card-list .md-card-list-item-date{line-height:34px;float:right;color:#999}@media only screen and (max-width:479px){.md-card-list-wrapper .md-card-list .md-card-list-item-date{display:none}}.md-card-list-wrapper .md-card-list .md-card-list-item-menu{float:right;margin:0 0 0 8px;position:relative}.md-card-list-wrapper .md-card-list .md-card-list-item-menu .uk-dropdown .material-icons{margin-right:8px}.md-card-list-wrapper .md-card-list .md-card-list-item-content-wrapper{display:none;clear:both;opacity:0}.md-card-list-wrapper .md-card-list .md-card-list-item-content{padding:16px 16px 0 0;max-height:360px;overflow-x:hidden;margin:0 0 40px;top:20px;position:relative;font-size:14px}.md-card-list-wrapper .md-card-list .md-card-list-item-content+.md-card-list-item-reply{padding-top:10px}.md-card-list-wrapper .md-card-list .md-card-list-item-reply{padding:16px 0}.md-card-list-wrapper .md-card-list .md-card-list-item-selected{background:#e3f2fd}input:not([type]),input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{outline:0}input:not([type]).md-input,input[type=color].md-input,input[type=date].md-input,input[type=datetime-local].md-input,input[type=datetime].md-input,input[type=email].md-input,input[type=month].md-input,input[type=number].md-input,input[type=password].md-input,input[type=search].md-input,input[type=tel].md-input,input[type=text].md-input,input[type=time].md-input,input[type=url].md-input,input[type=week].md-input,select.md-input,textarea.md-input{border-radius:0;border-width:0 0 1px;border-style:solid;border-color:rgba(0,0,0,.12);font:400 15px/18px Roboto,sans-serif;-webkit-box-shadow:inset 0 -1px 0 transparent;box-shadow:inset 0 -1px 0 transparent;-webkit-box-sizing:border-box;box-sizing:border-box;padding:12px 4px;background:0 0;width:100%;display:block}input:not([type]).md-input.md-input-danger,input[type=color].md-input.md-input-danger,input[type=date].md-input.md-input-danger,input[type=datetime-local].md-input.md-input-danger,input[type=datetime].md-input.md-input-danger,input[type=email].md-input.md-input-danger,input[type=month].md-input.md-input-danger,input[type=number].md-input.md-input-danger,input[type=password].md-input.md-input-danger,input[type=search].md-input.md-input-danger,input[type=tel].md-input.md-input-danger,input[type=text].md-input.md-input-danger,input[type=time].md-input.md-input-danger,input[type=url].md-input.md-input-danger,input[type=week].md-input.md-input-danger,select.md-input.md-input-danger,textarea.md-input.md-input-danger{border-color:#e53935}input:not([type]).md-input.md-input-danger:focus,input[type=color].md-input.md-input-danger:focus,input[type=date].md-input.md-input-danger:focus,input[type=datetime-local].md-input.md-input-danger:focus,input[type=datetime].md-input.md-input-danger:focus,input[type=email].md-input.md-input-danger:focus,input[type=month].md-input.md-input-danger:focus,input[type=number].md-input.md-input-danger:focus,input[type=password].md-input.md-input-danger:focus,input[type=search].md-input.md-input-danger:focus,input[type=tel].md-input.md-input-danger:focus,input[type=text].md-input.md-input-danger:focus,input[type=time].md-input.md-input-danger:focus,input[type=url].md-input.md-input-danger:focus,input[type=week].md-input.md-input-danger:focus,select.md-input.md-input-danger:focus,textarea.md-input.md-input-danger:focus{border-bottom-color:#e53935}input:not([type]).md-input.md-input-success,input[type=color].md-input.md-input-success,input[type=date].md-input.md-input-success,input[type=datetime-local].md-input.md-input-success,input[type=datetime].md-input.md-input-success,input[type=email].md-input.md-input-success,input[type=month].md-input.md-input-success,input[type=number].md-input.md-input-success,input[type=password].md-input.md-input-success,input[type=search].md-input.md-input-success,input[type=tel].md-input.md-input-success,input[type=text].md-input.md-input-success,input[type=time].md-input.md-input-success,input[type=url].md-input.md-input-success,input[type=week].md-input.md-input-success,select.md-input.md-input-success,textarea.md-input.md-input-success{border-color:#7cb342}input:not([type]).md-input.md-input-success:focus,input[type=color].md-input.md-input-success:focus,input[type=date].md-input.md-input-success:focus,input[type=datetime-local].md-input.md-input-success:focus,input[type=datetime].md-input.md-input-success:focus,input[type=email].md-input.md-input-success:focus,input[type=month].md-input.md-input-success:focus,input[type=number].md-input.md-input-success:focus,input[type=password].md-input.md-input-success:focus,input[type=search].md-input.md-input-success:focus,input[type=tel].md-input.md-input-success:focus,input[type=text].md-input.md-input-success:focus,input[type=time].md-input.md-input-success:focus,input[type=url].md-input.md-input-success:focus,input[type=week].md-input.md-input-success:focus,select.md-input.md-input-success:focus,textarea.md-input.md-input-success:focus{border-bottom-color:#7cb342}input:not([type]).md-input:focus,input[type=color].md-input:focus,input[type=date].md-input:focus,input[type=datetime-local].md-input:focus,input[type=datetime].md-input:focus,input[type=email].md-input:focus,input[type=month].md-input:focus,input[type=number].md-input:focus,input[type=password].md-input:focus,input[type=search].md-input:focus,input[type=tel].md-input:focus,input[type=text].md-input:focus,input[type=time].md-input:focus,input[type=url].md-input:focus,input[type=week].md-input:focus,select.md-input:focus,textarea.md-input:focus{background:0 0;border-color:rgba(0,0,0,.12)}input:not([type]).md-input-small,input[type=color].md-input-small,input[type=date].md-input-small,input[type=datetime-local].md-input-small,input[type=datetime].md-input-small,input[type=email].md-input-small,input[type=month].md-input-small,input[type=number].md-input-small,input[type=password].md-input-small,input[type=search].md-input-small,input[type=tel].md-input-small,input[type=text].md-input-small,input[type=time].md-input-small,input[type=url].md-input-small,input[type=week].md-input-small,select.md-input-small,textarea.md-input-small{padding:4px}input:not([type]).md-input.uk-form-width-mini,input[type=color].md-input.uk-form-width-mini,input[type=date].md-input.uk-form-width-mini,input[type=datetime-local].md-input.uk-form-width-mini,input[type=datetime].md-input.uk-form-width-mini,input[type=email].md-input.uk-form-width-mini,input[type=month].md-input.uk-form-width-mini,input[type=number].md-input.uk-form-width-mini,input[type=password].md-input.uk-form-width-mini,input[type=search].md-input.uk-form-width-mini,input[type=tel].md-input.uk-form-width-mini,input[type=text].md-input.uk-form-width-mini,input[type=time].md-input.uk-form-width-mini,input[type=url].md-input.uk-form-width-mini,input[type=week].md-input.uk-form-width-mini,select.md-input.uk-form-width-mini,textarea.md-input.uk-form-width-mini{width:40px}input:not([type]).md-input.uk-form-width-small,input[type=color].md-input.uk-form-width-small,input[type=date].md-input.uk-form-width-small,input[type=datetime-local].md-input.uk-form-width-small,input[type=datetime].md-input.uk-form-width-small,input[type=email].md-input.uk-form-width-small,input[type=month].md-input.uk-form-width-small,input[type=number].md-input.uk-form-width-small,input[type=password].md-input.uk-form-width-small,input[type=search].md-input.uk-form-width-small,input[type=tel].md-input.uk-form-width-small,input[type=text].md-input.uk-form-width-small,input[type=time].md-input.uk-form-width-small,input[type=url].md-input.uk-form-width-small,input[type=week].md-input.uk-form-width-small,select.md-input.uk-form-width-small,textarea.md-input.uk-form-width-small{width:130px}input:not([type]).md-input.uk-form-width-medium,input[type=color].md-input.uk-form-width-medium,input[type=date].md-input.uk-form-width-medium,input[type=datetime-local].md-input.uk-form-width-medium,input[type=datetime].md-input.uk-form-width-medium,input[type=email].md-input.uk-form-width-medium,input[type=month].md-input.uk-form-width-medium,input[type=number].md-input.uk-form-width-medium,input[type=password].md-input.uk-form-width-medium,input[type=search].md-input.uk-form-width-medium,input[type=tel].md-input.uk-form-width-medium,input[type=text].md-input.uk-form-width-medium,input[type=time].md-input.uk-form-width-medium,input[type=url].md-input.uk-form-width-medium,input[type=week].md-input.uk-form-width-medium,select.md-input.uk-form-width-medium,textarea.md-input.uk-form-width-medium{width:200px}input:not([type]).md-input.uk-form-width-large,input[type=color].md-input.uk-form-width-large,input[type=date].md-input.uk-form-width-large,input[type=datetime-local].md-input.uk-form-width-large,input[type=datetime].md-input.uk-form-width-large,input[type=email].md-input.uk-form-width-large,input[type=month].md-input.uk-form-width-large,input[type=number].md-input.uk-form-width-large,input[type=password].md-input.uk-form-width-large,input[type=search].md-input.uk-form-width-large,input[type=tel].md-input.uk-form-width-large,input[type=text].md-input.uk-form-width-large,input[type=time].md-input.uk-form-width-large,input[type=url].md-input.uk-form-width-large,input[type=week].md-input.uk-form-width-large,select.md-input.uk-form-width-large,textarea.md-input.uk-form-width-large{width:500px}input:not([type]).md-input.inverted-colors,input[type=color].md-input.inverted-colors,input[type=date].md-input.inverted-colors,input[type=datetime-local].md-input.inverted-colors,input[type=datetime].md-input.inverted-colors,input[type=email].md-input.inverted-colors,input[type=month].md-input.inverted-colors,input[type=number].md-input.inverted-colors,input[type=password].md-input.inverted-colors,input[type=search].md-input.inverted-colors,input[type=tel].md-input.inverted-colors,input[type=text].md-input.inverted-colors,input[type=time].md-input.inverted-colors,input[type=url].md-input.inverted-colors,input[type=week].md-input.inverted-colors,select.md-input.inverted-colors,textarea.md-input.inverted-colors{color:#fff;border-bottom-color:#fff}input:not([type]).md-input.inverted-colors::-webkit-input-placeholder,input[type=color].md-input.inverted-colors::-webkit-input-placeholder,input[type=date].md-input.inverted-colors::-webkit-input-placeholder,input[type=datetime-local].md-input.inverted-colors::-webkit-input-placeholder,input[type=datetime].md-input.inverted-colors::-webkit-input-placeholder,input[type=email].md-input.inverted-colors::-webkit-input-placeholder,input[type=month].md-input.inverted-colors::-webkit-input-placeholder,input[type=number].md-input.inverted-colors::-webkit-input-placeholder,input[type=password].md-input.inverted-colors::-webkit-input-placeholder,input[type=search].md-input.inverted-colors::-webkit-input-placeholder,input[type=tel].md-input.inverted-colors::-webkit-input-placeholder,input[type=text].md-input.inverted-colors::-webkit-input-placeholder,input[type=time].md-input.inverted-colors::-webkit-input-placeholder,input[type=url].md-input.inverted-colors::-webkit-input-placeholder,input[type=week].md-input.inverted-colors::-webkit-input-placeholder,select.md-input.inverted-colors::-webkit-input-placeholder,textarea.md-input.inverted-colors::-webkit-input-placeholder{color:#fff}input:not([type]).md-input.inverted-colors::-moz-placeholder,input[type=color].md-input.inverted-colors::-moz-placeholder,input[type=date].md-input.inverted-colors::-moz-placeholder,input[type=datetime-local].md-input.inverted-colors::-moz-placeholder,input[type=datetime].md-input.inverted-colors::-moz-placeholder,input[type=email].md-input.inverted-colors::-moz-placeholder,input[type=month].md-input.inverted-colors::-moz-placeholder,input[type=number].md-input.inverted-colors::-moz-placeholder,input[type=password].md-input.inverted-colors::-moz-placeholder,input[type=search].md-input.inverted-colors::-moz-placeholder,input[type=tel].md-input.inverted-colors::-moz-placeholder,input[type=text].md-input.inverted-colors::-moz-placeholder,input[type=time].md-input.inverted-colors::-moz-placeholder,input[type=url].md-input.inverted-colors::-moz-placeholder,input[type=week].md-input.inverted-colors::-moz-placeholder,select.md-input.inverted-colors::-moz-placeholder,textarea.md-input.inverted-colors::-moz-placeholder{color:#fff}input:not([type]).md-input.inverted-colors:-ms-input-placeholder,input[type=color].md-input.inverted-colors:-ms-input-placeholder,input[type=date].md-input.inverted-colors:-ms-input-placeholder,input[type=datetime-local].md-input.inverted-colors:-ms-input-placeholder,input[type=datetime].md-input.inverted-colors:-ms-input-placeholder,input[type=email].md-input.inverted-colors:-ms-input-placeholder,input[type=month].md-input.inverted-colors:-ms-input-placeholder,input[type=number].md-input.inverted-colors:-ms-input-placeholder,input[type=password].md-input.inverted-colors:-ms-input-placeholder,input[type=search].md-input.inverted-colors:-ms-input-placeholder,input[type=tel].md-input.inverted-colors:-ms-input-placeholder,input[type=text].md-input.inverted-colors:-ms-input-placeholder,input[type=time].md-input.inverted-colors:-ms-input-placeholder,input[type=url].md-input.inverted-colors:-ms-input-placeholder,input[type=week].md-input.inverted-colors:-ms-input-placeholder,select.md-input.inverted-colors:-ms-input-placeholder,textarea.md-input.inverted-colors:-ms-input-placeholder{color:#fff}input:not([type]).md-input.inverted-colors:-moz-placeholder,input[type=color].md-input.inverted-colors:-moz-placeholder,input[type=date].md-input.inverted-colors:-moz-placeholder,input[type=datetime-local].md-input.inverted-colors:-moz-placeholder,input[type=datetime].md-input.inverted-colors:-moz-placeholder,input[type=email].md-input.inverted-colors:-moz-placeholder,input[type=month].md-input.inverted-colors:-moz-placeholder,input[type=number].md-input.inverted-colors:-moz-placeholder,input[type=password].md-input.inverted-colors:-moz-placeholder,input[type=search].md-input.inverted-colors:-moz-placeholder,input[type=tel].md-input.inverted-colors:-moz-placeholder,input[type=text].md-input.inverted-colors:-moz-placeholder,input[type=time].md-input.inverted-colors:-moz-placeholder,input[type=url].md-input.inverted-colors:-moz-placeholder,input[type=week].md-input.inverted-colors:-moz-placeholder,select.md-input.inverted-colors:-moz-placeholder,textarea.md-input.inverted-colors:-moz-placeholder{color:#fff}select.md-input.uk-form-width-mini{width:65px}.md-input-width-small{min-width:80px!important}.md-input-width-medium{min-width:160px!important}.md-input-width-large{min-width:320px!important}textarea.md-input{min-height:80px;resize:none;overflow:hidden;-webkit-transition:height .2s ease-out;transition:height .2s ease-out;line-height:24px}textarea.no_autosize{min-height:inherit;overflow:auto;-webkit-transition:none;transition:none;resize:both}.md-input-wrapper{position:relative;padding-top:4px;width:100%;display:block}.md-input-wrapper .md-input-bar{display:block;position:absolute;bottom:0;left:0;width:100%}.md-input-wrapper .md-input-bar:after,.md-input-wrapper .md-input-bar:before{content:'';display:block;position:absolute;bottom:0;width:0;height:2px;background:#1976d2;-webkit-transition:width .3s cubic-bezier(.4,0,.2,1);transition:width .3s cubic-bezier(.4,0,.2,1)}.md-input-wrapper .md-input-bar:before{left:50%}.md-input-wrapper .md-input-bar:after{right:50%}.md-input-wrapper .md-input-bar.uk-form-width-mini{width:40px}.md-input-wrapper .md-input-bar.uk-form-width-small{width:130px}.md-input-wrapper .md-input-bar.uk-form-width-medium{width:200px}.md-input-wrapper .md-input-bar.uk-form-width-large{width:500px}.md-input-wrapper>label{color:#727272;position:absolute;top:16px;left:4px;right:0;pointer-events:none;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out}.md-input-wrapper+*{margin-top:10px}.md-input-wrapper.md-input-wrapper-disabled>label{color:rgba(0,0,0,.26)}.md-input-wrapper-count{padding-bottom:24px}.md-input-wrapper-count .md-input-bar{bottom:24px}.md-input-wrapper-count .text-count-wrapper{font-size:12px;position:absolute;right:0;bottom:0;opacity:0;-webkit-transition:opacity .2s ease-in;transition:opacity .2s ease-in}.md-input-wrapper-count>.md-input-wrapper-count .text-count-wrapper{position:absolute;bottom:0;right:0}.md-input-filled>label,.md-input-focus>label{top:-6px;font-size:12px}.md-input-filled.md-input-wrapper-count .text-count-wrapper,.md-input-focus.md-input-wrapper-count .text-count-wrapper{opacity:1}.md-input-focus .md-input-bar:after,.md-input-focus .md-input-bar:before{width:50%}.md-input-wrapper-danger .md-input-bar:after,.md-input-wrapper-danger .md-input-bar:before{background:#e53935}.md-input-wrapper-danger.md-input-wrapper-count .text-count-wrapper{color:#e53935}.md-input-wrapper-success .md-input-bar:after,.md-input-wrapper-success .md-input-bar:before{background:#7cb342}.md-input-wrapper-success.md-input-wrapper-count .text-count-wrapper{color:#7cb342}.md-form-group{position:relative}label.md-label{color:#999;padding:0 6px;font-size:11px}.add-clear-span{display:block}.add-clear-span input{padding-right:24px!important}.add-clear-span a{top:12px!important;right:4px!important}.add-clear-span a .material-icons{font-size:20px}@font-face{font-family:'Material Icons';font-style:normal;font-weight:400;src:url(../icons/material-design-icons/MaterialIcons-Regular.eot);src:local('Material Icons'),local('MaterialIcons-Regular'),url(../icons/material-design-icons/MaterialIcons-Regular.woff2) format('woff2'),url(../icons/material-design-icons/MaterialIcons-Regular.woff) format('woff'),url(../icons/material-design-icons/MaterialIcons-Regular.ttf) format('truetype')}.material-icons{font-family:'Material Icons';font-weight:400;font-style:normal;font-size:18px;display:inline-block;width:1em;height:1em;line-height:1;text-transform:none;letter-spacing:normal;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;-webkit-font-feature-settings:'liga';font-feature-settings:'liga';vertical-align:-4px;color:rgba(0,0,0,.54)}.material-icons.md-inactive{color:rgba(0,0,0,.26)}.material-icons.md-18{font-size:18px!important;vertical-align:-4px}.material-icons.md-24{font-size:24px!important;vertical-align:-8px}.material-icons.md-36{font-size:36px!important;vertical-align:-16px}.material-icons.md-48{font-size:48px!important;vertical-align:-24px}.material-icons.md-light{color:#fff}.material-icons.md-light.md-inactive{color:rgba(255,255,255,.3)}.md-user-image{width:34px;border-radius:50%}.md-user-image-large{width:82px;border-radius:50%}.md-user-placeholder{background-color:rgba(0,0,0,.085);width:34px;height:34px;border-radius:50%}.md-user-letters{display:inline-block;line-height:35px;width:34px;height:34px;border-radius:50%;text-align:center;text-transform:uppercase;font-weight:500;background-color:rgba(0,0,0,.085)}.md-icon{font-size:24px;line-height:32px!important;height:32px!important;color:#727272;border-radius:50%;cursor:pointer;-webkit-transition:background 280ms ease-out,color 280ms ease-out;transition:background 280ms ease-out,color 280ms ease-out;width:32px!important;text-align:center;-webkit-tap-highlight-color:transparent}.md-icon.active,.md-icon:active,.md-icon:focus,.md-icon:hover{color:#212121;background:rgba(0,0,0,.08)}.md-icon-light{color:#fff}.md-icon-light:active,.md-icon-light:focus,.md-icon-light:hover{color:#fff;background:rgba(0,0,0,.2)}.md-icon-dark{color:#212121}.md-icon-dark:active,.md-icon-dark:focus,.md-icon-dark:hover{color:#212121;background:rgba(255,255,255,.6)}.md-icon+.md-icon{margin-left:4px}.md-icon-btn{display:inline-block}.md-icon-btn.active .md-icon{color:#212121;background:rgba(0,0,0,.08)}button.md-icon{background:0 0;border:none;outline:0}.uk-open>.md-icon{color:#212121;background:rgba(0,0,0,.08)}.uk-open>.md-icon-light{color:#fff;background:rgba(0,0,0,.2)}.uk-open>.md-icon-dark{color:#212121;background:rgba(255,255,255,.6)}.md-list-inputs{margin:0;padding:0;list-style:none}.md-list-inputs>li{padding:0;margin:0;list-style:none}.md-list-inputs li+li{margin-top:8px}.md-list-inputs li .icheckbox_md{float:left}.md-list-inputs li label{overflow:hidden;padding-left:8px;display:block;cursor:pointer}.md-hr{margin:32px 0;height:0;border-top:2px solid rgba(0,0,0,.12)}@-webkit-keyframes hierarchical_show{0%{opacity:0;-webkit-transform:scale3d(.2,.2,2);transform:scale3d(.2,.2,2)}40%{opacity:1}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes hierarchical_show{0%{opacity:0;-webkit-transform:scale3d(.2,.2,2);transform:scale3d(.2,.2,2)}40%{opacity:1}100%{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.hierarchical_show{will-change:transform,opacity}.hierarchical_show>*{visibility:hidden}.hierarchical_show_inView>*{-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-duration:560ms;animation-duration:560ms;-webkit-animation-name:hierarchical_show;animation-name:hierarchical_show;visibility:visible}@-webkit-keyframes hierarchical_slide{0%{opacity:0;-webkit-transform:translate3d(0,160%,0);transform:translate3d(0,160%,0)}33%{opacity:1}100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes hierarchical_slide{0%{opacity:0;-webkit-transform:translate3d(0,160%,0);transform:translate3d(0,160%,0)}33%{opacity:1}100%{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.hierarchical_slide{will-change:transform,opacity}.hierarchical_slide>*{visibility:hidden}.hierarchical_slide_inView>*{-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-duration:560ms;animation-duration:560ms;-webkit-animation-name:hierarchical_slide;animation-name:hierarchical_slide;visibility:visible}.fast_animation{-webkit-animation-duration:280ms;animation-duration:280ms}.md-preloader{font-size:0;display:inline-block;-webkit-animation:outer 6s linear infinite;animation:outer 6s linear infinite}.md-preloader svg{-webkit-animation:inner 1.2s linear infinite;animation:inner 1.2s linear infinite}.md-preloader svg circle{fill:none;stroke:#448aff;stroke-linecap:round;-webkit-animation:arc 1.2s cubic-bezier(.4,0,.2,1) infinite;animation:arc 1.2s cubic-bezier(.4,0,.2,1) infinite}@-webkit-keyframes outer{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes outer{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes inner{0%{-webkit-transform:rotate(-64.8deg);transform:rotate(-64.8deg)}100%{-webkit-transform:rotate(0);transform:rotate(0)}}@keyframes inner{0%{-webkit-transform:rotate(-64.8deg);transform:rotate(-64.8deg)}100%{-webkit-transform:rotate(0);transform:rotate(0)}}@-webkit-keyframes arc{0%{stroke-dasharray:1 210.48670779px;stroke-dashoffset:0}40%{stroke-dasharray:172.59910039px,210.48670779px;stroke-dashoffset:0}100%{stroke-dasharray:1 210.48670779px;stroke-dashoffset:-172.59910039px}}@keyframes arc{0%{stroke-dasharray:1 210.48670779px;stroke-dashoffset:0}40%{stroke-dasharray:172.59910039px,210.48670779px;stroke-dashoffset:0}100%{stroke-dasharray:1 210.48670779px;stroke-dashoffset:-172.59910039px}}.md-preloader-success svg circle{stroke:#7cb342}.md-preloader-danger svg circle{stroke:#e53935}.md-preloader-warning svg circle{stroke:#ffa000}.content-preloader{width:48px;height:48px;border-radius:50%;background:#fff;left:50%;overflow:hidden;margin-left:-24px;-webkit-box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);padding:8px;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform:scale(0);transform:scale(0);-webkit-transition:top .4s cubic-bezier(.4,0,.2,1) 50ms,-webkit-transform .4s cubic-bezier(.4,0,.2,1);transition:top .4s cubic-bezier(.4,0,.2,1) 50ms,-webkit-transform .4s cubic-bezier(.4,0,.2,1);transition:top .4s cubic-bezier(.4,0,.2,1) 50ms,transform .4s cubic-bezier(.4,0,.2,1);transition:top .4s cubic-bezier(.4,0,.2,1) 50ms,transform .4s cubic-bezier(.4,0,.2,1),-webkit-transform .4s cubic-bezier(.4,0,.2,1)}.content-preloader .regular-preloader{position:relative;width:30px;height:30px}.content-preloader .regular-preloader>div{width:26px;height:26px}.content-preloader.preloader-active{-webkit-transform:scale(1);transform:scale(1);-webkit-transition:top 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .4s cubic-bezier(.4,0,.2,1) 50ms;transition:top 280ms cubic-bezier(.4,0,.2,1),-webkit-transform .4s cubic-bezier(.4,0,.2,1) 50ms;transition:top 280ms cubic-bezier(.4,0,.2,1),transform .4s cubic-bezier(.4,0,.2,1) 50ms;transition:top 280ms cubic-bezier(.4,0,.2,1),transform .4s cubic-bezier(.4,0,.2,1) 50ms,-webkit-transform .4s cubic-bezier(.4,0,.2,1) 50ms}.content-preloader-success svg circle{stroke:#7cb342}.content-preloader-danger svg circle{stroke:#e53935}.content-preloader-warning svg circle{stroke:#ffa000}.sidebar_main_active>.content-preloader,.sidebar_main_open>.content-preloader{margin-left:96px!important}body>.content-preloader{position:fixed;z-index:1099;top:-48px}body>.content-preloader.preloader-active{top:56px}.sidebar_main_active body>.content-preloader,.sidebar_main_open body>.content-preloader{margin-left:96px}.md-card>.content-preloader{position:absolute;z-index:10;top:0}.md-card>.content-preloader.preloader-active{top:64px}.icheckbox_md,.iradio_md{display:inline-block;vertical-align:middle;margin:0;padding:0;border:none;cursor:pointer;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}.icheckbox_md:after,.iradio_md:after{display:block;position:absolute;left:0;top:0}.icheckbox_md>input,.iradio_md>input{margin:0}.icheckbox_md>.iCheck-helper,.iradio_md>.iCheck-helper{z-index:10}.icheckbox_md{border:2px solid rgba(0,0,0,.54);border-radius:2px;width:18px;height:18px;background:#fff;-webkit-transition:all .2s ease-out;transition:all .2s ease-out}.icheckbox_md.checked:after,.icheckbox_md.disabled:after{content:'\e5ca';font-family:"Material Icons";font-size:18px;color:#fff;position:absolute;left:-2px;top:-6px;line-height:1.42857143}.icheckbox_md.checked,.icheckbox_md.hover.checked{background:#009688;border-color:#009688!important}.icheckbox_md.disabled:after{display:none}.icheckbox_md.disabled,.icheckbox_md.disabled.checked{background:0 0;background-clip:padding-box;border-color:rgba(0,0,0,.26);cursor:default}.icheckbox_md.disabled.checked{background:#bdbdbd!important;border-color:#bdbdbd!important}.icheckbox_md.disabled.checked:after{display:block!important}.md-input-danger .icheckbox_md{border-color:#e53935}.icheckbox_md.indeterminate{background:#009688;border-color:#009688}.icheckbox_md.indeterminate:after{content:'';background:#fff;position:absolute;left:2px;top:2px;width:10px;height:10px}.iradio_md{border:2px solid rgba(0,0,0,.54);width:20px;height:20px;border-radius:50%}.iradio_md:after{content:'';background:0 0;position:absolute;left:3px;top:3px;width:10px;height:10px;border-radius:50%;-webkit-transform:scale(.1);transform:scale(.1);-webkit-transition:all .2s ease-out;transition:all .2s ease-out}.iradio_md.checked{border-color:#009688!important}.iradio_md.checked:after{background:#009688;-webkit-transform:scale(1);transform:scale(1)}.iradio_md.disabled{border-color:rgba(0,0,0,.26);cursor:default}.iradio_md.disabled:after{background:rgba(0,0,0,.26);-webkit-transform:scale(1);transform:scale(1)}.md-input-danger .iradio_md{border-color:#e53935}.disabled+.inline-label{color:rgba(0,0,0,.26);cursor:default}.icheck-inline{display:inline-block;margin:0 16px 16px 0}.icheck-inline+.parsley-errors-list{margin-top:-8px}html{height:100%;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;background:#ececec}body{min-height:100%;font:400 14px/1.42857143 Roboto,sans-serif;padding-top:48px;-webkit-box-sizing:border-box;box-sizing:border-box}a,button{outline:0!important}a{color:#1e88e5;-webkit-tap-highlight-color:transparent}a:active,a:hover{color:#0d47a1;text-decoration:none}code,code[class*=language-],pre,pre[class*=language-]{font:400 12px/18px "Source Code Pro",Consolas,Monaco,'Andale Mono',monospace!important;-webkit-box-sizing:border-box;box-sizing:border-box}pre[class*=language-]{-webkit-box-shadow:none;box-shadow:none;border:1px solid rgba(0,0,0,.12);padding:0}pre[class*=language-]:after,pre[class*=language-]:before{display:none}.line-numbers .line-numbers-rows{border-right-color:rgba(0,0,0,.12)}:not(pre)>code,:not(pre)>kbd,:not(pre)>samp{font:400 12px/18px "Source Code Pro",Consolas,Monaco,'Andale Mono',monospace!important;color:#d32f2f}code.large_code,pre.large_code{font:400 14px/24px "Source Code Pro",Consolas,Monaco,'Andale Mono',monospace!important}.touchscroll{overflow-y:auto!important;-webkit-overflow-scrolling:touch}.transform-origin-50{-webkit-transform-origin:50% 50%;transform-origin:50% 50%}blockquote{border-left:4px solid rgba(0,0,0,.085)}.clearfix:after,.clearfix:before{content:" ";display:table}.clearfix:after{clear:both}h1,h2,h3,h4,h5,h6{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:500}.heading_a{margin:0;font:400 18px/24px Roboto,sans-serif}.heading_a .sub-heading{font-weight:300;font-size:14px;line-height:18px;display:block;color:#727272}.heading_b{margin:0;font:400 22px/28px Roboto,sans-serif}.heading_b .sub-heading{font-weight:300;font-size:16px;line-height:20px;display:block;color:#727272}.heading_c{margin:0;font:400 16px/20px Roboto,sans-serif}.heading_c .sub-heading{font-weight:300;font-size:13px;line-height:20px;display:block;color:#727272}.heading_list{color:#727272;font:500 13px/16px Roboto,sans-serif;padding:0 16px;margin:0 0 16px}.heading_a+.uk-grid,.heading_b+.uk-grid,.heading_c+.uk-grid,.heading_list+.uk-grid{margin-top:24px}.uk-grid+.heading_a,.uk-grid+.heading_b,.uk-grid+.heading_c,.uk-grid+.heading_list{margin-top:24px}.uk-text-large{font-size:16px;font-weight:400;margin:0 0 16px}*>.uk-text-large{margin-top:16px}.uk-text-small{font-size:12px!important}.uk-text-upper{text-transform:uppercase}.uk-text-italic{font-style:italic}.uk-text-del{text-decoration:line-through}.uk-table .no-border td,.uk-table.no-border td{border-bottom:none}.uk-table .row-selected{background:#fff8e1!important}.uk-table [data-link]{cursor:pointer}.uk-text-pre{white-space:pre}.table_tree{margin-bottom:4px!important}.table_tree .table-child-row{display:none}.table_tree .toggle-childrens{display:block;padding-left:24px;position:relative}.table_tree .toggle-childrens:before{content:'\e313';font-family:"Material Icons";font-size:28px;position:absolute;left:-6px;top:-10px;color:#727272;-webkit-transition:all 280ms cubic-bezier(.4,0,.2,1);transition:all 280ms cubic-bezier(.4,0,.2,1);-webkit-transform:rotate(0);transform:rotate(0)}.table_tree .table-child-row{display:table-row}.table_tree .table-child-row .child-row-main-col{padding-left:40px}.table_tree .show_child_row .toggle-childrens:before{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}address{margin:0}address p{margin:0}address p+p{margin-top:4px}.grid-block{border-width:1px 0;border-style:solid;border-color:rgba(0,0,0,.12);background:rgba(179,179,179,.085);padding:48px 0}.inline-list{margin:0;padding:0;list-style:none;overflow:hidden}.inline-list>li{padding:0;margin:0;list-style:none}.inline-list li{float:left;margin:0 8px 8px 0;height:32px;width:32px;line-height:32px;text-align:center;background:rgba(102,102,102,.085)}.img_thumb{width:80px;max-width:100%;height:auto}.img_thumb.square{height:80px}.img_small{width:120px;max-width:100%;height:auto}.img_small.square{height:120px}.img_medium{width:240px;max-width:100%;height:auto}.img_medium.square{height:240px}.img_large{width:400px;max-width:100%;height:auto}.img_large.square{height:400px}.inline-label{padding-left:4px;cursor:pointer;vertical-align:-1px}.form_hr{border-top:1px dashed rgba(0,0,0,.12);margin:32px 0 16px}#page_content:before{content:'';position:fixed;left:0;top:0;right:0;bottom:0;background:rgba(0,0,0,.3);display:block;opacity:0;-webkit-transition:opacity .4s;transition:opacity .4s;z-index:-1}#page_content_inner{padding:24px 24px 100px}#page_overflow{min-height:100%;overflow-y:auto}@media only screen and (min-width:1220px){.boxed_layout #page_content{max-width:1220px;margin:0 auto!important}.boxed_layout .uk-width-large-8-10.uk-container-center{width:100%}.boxed_layout.sidebar_main_active #page_content,.boxed_layout.sidebar_main_open #page_content{padding-left:240px}.boxed_layout .md-top-bar{max-width:1172px;margin:0 auto}.boxed_layout #page_heading{border-width:0 1px 1px;border-style:solid;border-color:rgba(0,0,0,.12);-webkit-box-sizing:border-box;box-sizing:border-box}}.disable_transitions #header_main,.disable_transitions #header_main .sSwitch .sSwitchIcon,.disable_transitions #header_main .sSwitch .sSwitchIcon:after,.disable_transitions #header_main .sSwitch .sSwitchIcon:before,.disable_transitions #page_content,.disable_transitions #sidebar_main,.disable_transitions #top_bar{-webkit-transition:none!important;transition:none!important}body{font-size:15px;overflow-y:auto;height:auto;min-height:100%}@media only screen and (max-width:767px){body{padding:24px}}.login_page{padding:64px 24px}@media only screen and (max-width:767px){.login_page{padding:16px}}.login_page_wrapper{width:360px;max-width:100%;margin:0 auto;-webkit-transition:all 280ms cubic-bezier(.4,0,.2,1);transition:all 280ms cubic-bezier(.4,0,.2,1)}.login_page .user_avatar{width:64px;height:64px;display:inline-block;text-align:center;border-radius:50%;background-image:url(../img/avatars/user.png);background-repeat:no-repeat;background-color:rgba(0,0,0,.085);background-position:50% 1px}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2),only screen and (-webkit-min-device-pixel-ratio:192),only screen and (min-resolution:192dppx),only screen and (min-resolution:2dppx){.login_page .user_avatar{background-image:url(../img/avatars/user@2x.png);background-size:64px 64px}}.login_page .login_heading{text-align:center;margin-bottom:32px}.login_page.login_page_v2{padding:48px 24px}@media only screen and (max-width:767px){.login_page.login_page_v2{padding:16px}.login_page.login_page_v2>.uk-container{padding:0}}.login_page.login_page_v2 .login_page_forms{padding:24px 48px}@media only screen and (max-width:767px){.login_page.login_page_v2 .login_page_forms{padding:24px}}.login_page.login_page_v2 .login_page_info{background-position:0 0;background-size:cover;position:relative}.login_page.login_page_v2 .login_page_info .info_content{position:absolute;background:rgba(0,0,0,.6);padding:24px;color:#fff;bottom:0;left:0;right:0}.login_page.login_page_v2 .login_page_info .info_content h1,.login_page.login_page_v2 .login_page_info .info_content h2{color:#fff;margin-bottom:16px}.login_page.login_page_v2 .login_page_info .info_content p{margin:16px 0 0}html.app_theme_dark{background:#303030;color:#fff}html.app_theme_dark a:not(.md-btn){color:#039be5}html.app_theme_dark a:not(.md-btn):active,html.app_theme_dark a:not(.md-btn):hover{color:#0277bd}html.app_theme_dark h1,html.app_theme_dark h2,html.app_theme_dark h3,html.app_theme_dark h4,html.app_theme_dark h5,html.app_theme_dark h6{color:#fefefe}html.app_theme_dark input:not([type]).md-input,html.app_theme_dark input[type=color].md-input,html.app_theme_dark input[type=date].md-input,html.app_theme_dark input[type=datetime-local].md-input,html.app_theme_dark input[type=datetime].md-input,html.app_theme_dark input[type=email].md-input,html.app_theme_dark input[type=month].md-input,html.app_theme_dark input[type=number].md-input,html.app_theme_dark input[type=password].md-input,html.app_theme_dark input[type=search].md-input,html.app_theme_dark input[type=tel].md-input,html.app_theme_dark input[type=text].md-input,html.app_theme_dark input[type=time].md-input,html.app_theme_dark input[type=url].md-input,html.app_theme_dark input[type=week].md-input,html.app_theme_dark select.md-input,html.app_theme_dark textarea.md-input{border-color:rgba(255,255,255,.25);color:#fefefe}html.app_theme_dark .md-input-wrapper>label{color:#cbcbcb}html.app_theme_dark .md-card{background:#424242}html.app_theme_dark .uk-tooltip{background:#212121}html.app_theme_dark .login_page .user_avatar{background-color:rgba(255,255,255,.4)} \ No newline at end of file diff --git a/src/assets/theme-assets/css/main.css b/src/assets/theme-assets/css/main.css index 44a7bcc..4459c73 100755 --- a/src/assets/theme-assets/css/main.css +++ b/src/assets/theme-assets/css/main.css @@ -17,13 +17,6 @@ */ /* 1. altair variables/mixins ======================== */ /* 2. UIkit custom styles ============================ */ -/* animations */ -[class*="uk-animation-"] { - -webkit-animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - -webkit-animation-duration: 560ms; - animation-duration: 560ms; -} /* alerts */ .uk-alert { border: none; @@ -2445,168 +2438,6 @@ html[dir="rtl"] .uk-slider > * { .uk-slidenav-contrast:active { color: rgba(255, 255, 255, 0.9); } -/* tooltips */ -/*! UIkit 2.27.5 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ -/* ======================================================================== - Component: Tooltip - ========================================================================== */ -/* - * 1. Hide by default - * 2. Set fixed position - * 3. Set dimensions - * 4. Set style - */ -.uk-tooltip { - /* 1 */ - display: none; - /* 2 */ - position: absolute; - z-index: 1030; - /* 3 */ - -webkit-box-sizing: border-box; - box-sizing: border-box; - max-width: 200px; - padding: 5px 8px; - /* 4 */ - background: #333; - color: rgba(255, 255, 255, 0.7); - font-size: 12px; - line-height: 18px; - border-radius: 3px; - text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5); -} -/* Triangle - ========================================================================== */ -/* - * 1. Dashed is less antialised than solid - */ -.uk-tooltip:after { - content: ""; - display: block; - position: absolute; - width: 0; - height: 0; - /* 1 */ - border: 5px dashed #333; -} -/* Direction modifiers - ========================================================================== */ -/* - * Top - */ -.uk-tooltip-top:after, -.uk-tooltip-top-left:after, -.uk-tooltip-top-right:after { - bottom: -5px; - border-top-style: solid; - border-bottom: none; - border-left-color: transparent; - border-right-color: transparent; - border-top-color: #333; -} -/* - * Bottom - */ -.uk-tooltip-bottom:after, -.uk-tooltip-bottom-left:after, -.uk-tooltip-bottom-right:after { - top: -5px; - border-bottom-style: solid; - border-top: none; - border-left-color: transparent; - border-right-color: transparent; - border-bottom-color: #333; -} -/* - * Top/Bottom center - */ -.uk-tooltip-top:after, -.uk-tooltip-bottom:after { - left: 50%; - margin-left: -5px; -} -/* - * Top/Bottom left - */ -.uk-tooltip-top-left:after, -.uk-tooltip-bottom-left:after { - left: 10px; -} -/* - * Top/Bottom right - */ -.uk-tooltip-top-right:after, -.uk-tooltip-bottom-right:after { - right: 10px; -} -/* - * Left - */ -.uk-tooltip-left:after { - right: -5px; - top: 50%; - margin-top: -5px; - border-left-style: solid; - border-right: none; - border-top-color: transparent; - border-bottom-color: transparent; - border-left-color: #333; -} -/* - * Right - */ -.uk-tooltip-right:after { - left: -5px; - top: 50%; - margin-top: -5px; - border-right-style: solid; - border-left: none; - border-top-color: transparent; - border-bottom-color: transparent; - border-right-color: #333; -} -.uk-tooltip { - background: #424242; - color: #fff; - font-size: 13px; - padding: 3px 16px; - line-height: 22px; - text-shadow: none; - min-width: 80px; - text-align: center; - z-index: 1304; - opacity: 0; -} -.uk-tooltip .uk-tooltip-inner { - text-overflow: ellipsis; - display: inline-block; - vertical-align: top; - white-space: nowrap; - overflow: hidden; - width: 100%; -} -.uk-tooltip:after { - display: none !important; -} -.uk-tooltip.long-text { - text-align: left; -} -.uk-tooltip.long-text .uk-tooltip-inner { - white-space: normal; - overflow: visible; - line-height: 18px; - padding: 4px 0; -} -.uk-tooltip-small { - -webkit-transform: scale(0.85); - transform: scale(0.85); -} -.uk-tooltip-top { - z-index: 9999; -} -.touch .uk-tooltip { - opacity: 1; -} /* tabs */ .uk-tab { border-bottom-color: rgba(0, 0, 0, 0.12); diff --git a/src/assets/theme-assets/js/altair_admin_common.js b/src/assets/theme-assets/js/altair_admin_common.js index f9bb204..46d14a0 100755 --- a/src/assets/theme-assets/js/altair_admin_common.js +++ b/src/assets/theme-assets/js/altair_admin_common.js @@ -953,7 +953,7 @@ } } else { $(this).attr({ - 'data-uk-tooltip': "{pos:'right'}" + 'uk-tooltip': "{pos:'right'}" }); } }); diff --git a/src/assets/theme-assets/js/custom/ckeditor_config.js b/src/assets/theme-assets/js/custom/ckeditor_config.js deleted file mode 100755 index b27ae27..0000000 --- a/src/assets/theme-assets/js/custom/ckeditor_config.js +++ /dev/null @@ -1,45 +0,0 @@ -/* -* Altair Admin -* Configuration file for ckeditor (wysiwyg editor) -*/ - -CKEDITOR.editorConfig = function( config ) { - // Define changes to default configuration here. - // For complete reference see: - // http://docs.ckeditor.com/#!/api/CKEDITOR.config - - config.skin = 'material_design,../../assets/skins/ckeditor/material_design/'; - - // The toolbar groups arrangement, optimized for two toolbar rows. - config.toolbarGroups = [ - { name: 'clipboard', groups: [ 'clipboard'] }, - { name: 'document', groups: [ 'undo', 'mode', 'document', 'doctools', 'tools', 'about' ] }, - { name: 'others', groups: [ 'others' ] }, - '/', - { name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing' ] }, - { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] }, - { name: 'styles', groups: [ 'styles' ] }, - { name: 'colors', groups: [ 'colors' ] }, - { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi', 'paragraph' ] }, - { name: 'insert', groups: [ 'insert' ] }, - { name: 'links', groups: [ 'links' ] }, - { name: 'forms', groups: [ 'forms' ] } - ]; - config.removeButtons = 'Scayt'; - - config.extraPlugins = 'autogrow,colorbutton,colordialog'; - - // Set the most common block elements. - config.format_tags = 'p;h1;h2;h3;pre'; - - config.height = 300; - - config.autoGrow_minHeight = 300; - config.autoGrow_maxHeight = 520; - config.removePlugins = 'resize'; - - config.filebrowserWindowWidth = 800; - config.filebrowserWindowHeight = 420; - config.filebrowserBrowseUrl = 'file_manager/fm_ckeditor.html'; - -}; diff --git a/src/assets/theme-assets/js/custom/ckeditor_config.min.js b/src/assets/theme-assets/js/custom/ckeditor_config.min.js deleted file mode 100755 index 544294f..0000000 --- a/src/assets/theme-assets/js/custom/ckeditor_config.min.js +++ /dev/null @@ -1 +0,0 @@ -CKEDITOR.editorConfig=function(o){o.skin="material_design,../../assets/skins/ckeditor/material_design/",o.toolbarGroups=[{name:"clipboard",groups:["clipboard"]},{name:"document",groups:["undo","mode","document","doctools","tools","about"]},{name:"others",groups:["others"]},"/",{name:"editing",groups:["find","selection","spellchecker","editing"]},{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"styles",groups:["styles"]},{name:"colors",groups:["colors"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi","paragraph"]},{name:"insert",groups:["insert"]},{name:"links",groups:["links"]},{name:"forms",groups:["forms"]}],o.removeButtons="Scayt",o.extraPlugins="autogrow,colorbutton,colordialog",o.format_tags="p;h1;h2;h3;pre",o.height=300,o.autoGrow_minHeight=300,o.autoGrow_maxHeight=520,o.removePlugins="resize",o.filebrowserWindowWidth=800,o.filebrowserWindowHeight=420,o.filebrowserBrowseUrl="file_manager/fm_ckeditor.html"}; \ No newline at end of file diff --git a/src/assets/theme-assets/js/custom/codemirror_fullscreen.js b/src/assets/theme-assets/js/custom/codemirror_fullscreen.js deleted file mode 100755 index 5fcfe6e..0000000 --- a/src/assets/theme-assets/js/custom/codemirror_fullscreen.js +++ /dev/null @@ -1,48 +0,0 @@ -/* -* Altair Admin -* Codemirror addon (fullscreen) -*/ - -// CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE - -(function(mod) { - if (typeof exports == "object" && typeof module == "object") // CommonJS - mod(require("../../lib/codemirror")); - else if (typeof define == "function" && define.amd) // AMD - define(["../../lib/codemirror"], mod); - else // Plain browser env - mod(CodeMirror); -})(function(CodeMirror) { - "use strict"; - - CodeMirror.defineOption("fullScreen", false, function(cm, val, old) { - if (old == CodeMirror.Init) old = false; - if (!old == !val) return; - if (val) setFullscreen(cm); - else setNormal(cm); - }); - - function setFullscreen(cm) { - var wrap = cm.getWrapperElement(); - cm.state.fullScreenRestore = {scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset, - width: wrap.style.width, height: wrap.style.height}; - wrap.style.width = ""; - wrap.style.height = "auto"; - wrap.className += " CodeMirror-fullscreen"; - document.body.className += " CodeMirror-fullscreen-active"; - document.documentElement.style.overflow = "hidden"; - cm.refresh(); - } - - function setNormal(cm) { - var wrap = cm.getWrapperElement(); - wrap.className = wrap.className.replace(/\s*CodeMirror-fullscreen\b/, ""); - document.documentElement.style.overflow = ""; - document.body.className = document.body.className.replace(" CodeMirror-fullscreen-active",""); - var info = cm.state.fullScreenRestore; - wrap.style.width = info.width; wrap.style.height = info.height; - window.scrollTo(info.scrollLeft, info.scrollTop); - cm.refresh(); - } -}); \ No newline at end of file diff --git a/src/assets/theme-assets/js/custom/codemirror_fullscreen.min.js b/src/assets/theme-assets/js/custom/codemirror_fullscreen.min.js deleted file mode 100755 index 1a55480..0000000 --- a/src/assets/theme-assets/js/custom/codemirror_fullscreen.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(s){"use strict";s.defineOption("fullScreen",!1,function(e,t,o){var r,l;(o==s.Init&&(o=!1),!o!=!t)&&(t?(l=(r=e).getWrapperElement(),r.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:l.style.width,height:l.style.height},l.style.width="",l.style.height="auto",l.className+=" CodeMirror-fullscreen",document.body.className+=" CodeMirror-fullscreen-active",document.documentElement.style.overflow="hidden",r.refresh()):function(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="",document.body.className=document.body.className.replace(" CodeMirror-fullscreen-active","");var o=e.state.fullScreenRestore;t.style.width=o.width,t.style.height=o.height,window.scrollTo(o.scrollLeft,o.scrollTop),e.refresh()}(e))})}); \ No newline at end of file diff --git a/src/assets/theme-assets/js/custom/datatables/buttons.uikit.js b/src/assets/theme-assets/js/custom/datatables/buttons.uikit.js deleted file mode 100755 index b323547..0000000 --- a/src/assets/theme-assets/js/custom/datatables/buttons.uikit.js +++ /dev/null @@ -1,68 +0,0 @@ -/*! UIKit integration for DataTables' Buttons - * ©2016 SpryMedia Ltd - datatables.net/license - */ - -(function( factory ){ - if ( typeof define === 'function' && define.amd ) { - // AMD - define( ['jquery', 'datatables.net-bs', 'datatables.net-buttons'], function ( $ ) { - return factory( $, window, document ); - } ); - } - else if ( typeof exports === 'object' ) { - // CommonJS - module.exports = function (root, $) { - if ( ! root ) { - root = window; - } - - if ( ! $ || ! $.fn.dataTable ) { - $ = require('datatables.net-bs')(root, $).$; - } - - if ( ! $.fn.dataTable.Buttons ) { - require('datatables.net-buttons')(root, $); - } - - return factory( $, root, root.document ); - }; - } - else { - // Browser - factory( jQuery, window, document ); - } -}(function( $, window, document, undefined ) { -'use strict'; -var DataTable = $.fn.dataTable; - - -$.extend( true, DataTable.Buttons.defaults, { - dom: { - container: { - className: 'dt-buttons btn-group' - }, - button: { - className: 'md-btn' - }, - collection: { - tag: 'ul', - className: 'dt-button-collection uk-dropdown uk-nav', - button: { - tag: 'li', - className: 'dt-button' - }, - buttonLiner: { - tag: 'a', - className: '' - } - } - } -} ); - -DataTable.ext.buttons.collection.text = function ( dt ) { - return dt.i18n('buttons.collection', 'Collection '); -}; - - -return DataTable.Buttons; -})); diff --git a/src/assets/theme-assets/js/custom/datatables/datatables.uikit.js b/src/assets/theme-assets/js/custom/datatables/datatables.uikit.js deleted file mode 100755 index 6857059..0000000 --- a/src/assets/theme-assets/js/custom/datatables/datatables.uikit.js +++ /dev/null @@ -1,198 +0,0 @@ -/*! -* DataTables UIKit integration -* author: tzd -*/ - -(function(window, document, undefined){ - - var factory = function( $, DataTable ) { - "use strict"; - - - /* Set the defaults for DataTables initialisation */ - $.extend( true, DataTable.defaults, { - dom: - "<'dt-uikit-header'<'uk-grid'<'uk-width-medium-2-3'l><'uk-width-medium-1-3'f>>>" + - "<'uk-overflow-container'tr>" + - "<'dt-uikit-footer'<'uk-grid'<'uk-width-medium-3-10'i><'uk-width-medium-7-10'p>>>", - renderer: 'uikit', - "order": [] - } ); - - - /* Default class modification */ - $.extend( DataTable.ext.classes, { - sWrapper: "dataTables_wrapper form-inline dt-uikit", - sFilterInput: "md-input", - sLengthSelect: "dt-selectize", - "sPaging": "" - } ); - - /* Bootstrap paging button renderer */ - DataTable.ext.renderer.pageButton.uikit = function ( settings, host, idx, buttons, page, pages ) { - var api = new DataTable.Api( settings ); - var classes = settings.oClasses; - var lang = settings.oLanguage.oPaginate; - var btnDisplay, btnClass, counter=0; - - var attach = function( container, buttons ) { - var i, ien, node, button; - var clickHandler = function ( e ) { - e.preventDefault(); - if ( !$(e.currentTarget).hasClass('disabled') ) { - api.page( e.data.action ).draw( false ); - } - }; - - for ( i=0, ien=buttons.length ; i 0 ? - '' : ' uk-disabled'); - break; - - case 'previous': - btnDisplay = lang.sPrevious; - btnClass = button + (page > 0 ? - '' : ' uk-disabled'); - break; - - case 'next': - btnDisplay = lang.sNext; - btnClass = button + (page < pages-1 ? - '' : ' uk-disabled'); - break; - - case 'last': - btnDisplay = ''; - btnClass = button + (page < pages-1 ? - '' : ' uk-disabled'); - break; - - default: - btnDisplay = button + 1; - btnClass = page === button ? - 'uk-active' : ''; - break; - } - - if ( btnDisplay ) { - node = $('
  • ', { - 'class': classes.sPageButton+' '+btnClass, - 'id': idx === 0 && typeof button === 'string' ? - settings.sTableId +'_'+ button : - null - } ) - .append( $('', { - 'href': '#', - 'aria-controls': settings.sTableId, - 'data-dt-idx': counter, - 'tabindex': settings.iTabIndex - } ) - .html( btnDisplay ) - ) - .appendTo( container ); - - settings.oApi._fnBindAction( - node, {action: button}, clickHandler - ); - - counter++; - } - } - } - }; - - var activeEl; - - try { - activeEl = $(document.activeElement).data('dt-idx'); - } - catch (e) {} - - attach( - $(host).empty().html('").addClass(this.options.listClass+" "+this.options.dragClass).append(i.clone()),this.dragEl.css("width",i.width()),this.placeEl.addClass(this.options.placeholderClass),r=this.dragEl,this.tmpDragOnSiblings=[i[0].previousSibling,i[0].nextSibling],k.$body.append(this.dragEl),this.dragEl.css({left:o.left,top:o.top});var n,s,a=this.dragEl.find(this.options._listItemClass);for(n=0;nthis.dragDepth&&(this.dragDepth=s);l.addClass(this.options.movingClass)},dragStop:function(t){var e=k.$(this.placeEl),i=this.placeEl.parents(this.options._listBaseClass+":first");this.placeEl.removeClass(this.options.placeholderClass),this.dragEl.remove(),this.element[0]!==i[0]?(i.trigger("change.uk.nestable",[i.data("nestable"),e,"added"]),this.element.trigger("change.uk.nestable",[this,e,"removed"])):this.element.trigger("change.uk.nestable",[this,e,"moved"]),this.trigger("stop.uk.nestable",[this,e]),this.reset(),l.removeClass(this.options.movingClass)},dragMove:function(t){var e,i,o,n=this.options,s=this.mouse,a=this.dragRootEl?this.dragRootEl.data("nestable").options.maxDepth:n.maxDepth;this.dragEl.css({left:t.pageX-s.offsetX,top:t.pageY-s.offsetY}),s.lastX=s.nowX,s.lastY=s.nowY,s.nowX=t.pageX,s.nowY=t.pageY,s.distX=s.nowX-s.lastX,s.distY=s.nowY-s.lastY,s.lastDirX=s.dirX,s.lastDirY=s.dirY,s.dirX=0===s.distX?0:0Math.abs(s.distY)?1:0;if(!s.moving)return s.dirAx=r,void(s.moving=!0);if(s.dirAx!==r?(s.distAxX=0,s.distAxY=0):(s.distAxX+=Math.abs(s.distX),0!==s.dirX&&s.dirX!==s.lastDirX&&(s.distAxX=0),s.distAxY+=Math.abs(s.distY),0!==s.dirY&&s.dirY!==s.lastDirY&&(s.distAxY=0)),s.dirAx=r,s.dirAx&&s.distAxX>=n.threshold&&(s.distAxX=0,o=this.placeEl.prev("li"),0").addClass(n.listClass)).append(this.placeEl),o.append(e),this.setParent(o)))),s.distX<0&&!this.placeEl.next(n._listItemClass).length)){var l=this.placeEl.closest([n._listBaseClass,n._listClass].join(",")),d=l.closest(n._listItemClass);d.length&&(d.after(this.placeEl),l.children().length||this.unsetParent(d))}var h=!1,c=t.pageX-(window.pageXOffset||document.scrollLeft||0),u=t.pageY-(window.pageYOffset||document.documentElement.scrollTop);if(this.pointEl=k.$(document.elementFromPoint(c,u)),n.handleClass&&this.pointEl.hasClass(n.handleClass))this.pointEl=this.pointEl.closest(n._listItemClass);else{var p=this.pointEl.closest(n._listItemClass);p.length&&(this.pointEl=p)}if(!this.placeEl.find(this.pointEl).length){if(this.pointEl.data("nestable")&&!this.pointEl.children().length)h=!0,this.checkEmptyList(this.pointEl);else if(!this.pointEl.length||!this.pointEl.hasClass(n.listItemClass))return;var f=this.element,m=this.pointEl.closest(this.options._listBaseClass),g=f[0]!=m[0];if(!s.dirAx||g||h){if(g&&n.group!==m.data("nestable-group"))return;if(w.push(f),a','',"
    ",""].join("")).data("notifyMessage",this),this.content(this.options.message),this.options.status&&(this.element.addClass("uk-notify-message-"+this.options.status),this.currentstatus=this.options.status),this.group=this.options.group,n[this.uuid]=this,o[this.options.pos]||(o[this.options.pos]=e.$('
    ').appendTo("body").on("click",".uk-notify-message",function(){var t=e.$(this).data("notifyMessage");t.element.trigger("manualclose.uk.notify",[t]),t.close()}))};return e.$.extend(i.prototype,{uuid:!1,element:!1,timout:!1,currentstatus:"",group:!1,show:function(){if(!this.element.is(":visible")){var e=this;o[this.options.pos].show().prepend(this.element);var t=parseInt(this.element.css("margin-bottom"),10);return this.element.css({opacity:0,marginTop:-1*this.element.outerHeight(),marginBottom:0}).animate({opacity:1,marginTop:0,marginBottom:t},function(){if(e.options.timeout){var t=function(){e.close()};e.timeout=setTimeout(t,e.options.timeout),e.element.hover(function(){clearTimeout(e.timeout)},function(){e.timeout=setTimeout(t,e.options.timeout)})}}),this}},close:function(t){var e=this,i=function(){e.element.remove(),o[e.options.pos].children().length||o[e.options.pos].hide(),e.options.onClose.apply(e,[]),e.element.trigger("close.uk.notify",[e]),delete n[e.uuid]};this.timeout&&clearTimeout(this.timeout),t?i():this.element.animate({opacity:0,marginTop:-1*this.element.outerHeight(),marginBottom:0},function(){i()})},content:function(t){var e=this.element.find(">div");return t?(e.html(t),this):e.html()},status:function(t){return t?(this.element.removeClass("uk-notify-message-"+this.currentstatus).addClass("uk-notify-message-"+t),this.currentstatus=t,this):this.currentstatus}}),i.defaults={message:"",status:"",timeout:5e3,group:null,pos:"top-center",onClose:function(){}},e.notify=t,e.notify.message=i,e.notify.closeAll=function(t,e){var i;if(t)for(i in n)t===n[i].group&&n[i].close(e);else for(i in n)n[i].close(e)},t}),function(t){var e;window.UIkit2&&(e=t(UIkit2)),"function"==typeof define&&define.amd&&define("uikit-slideshow",["uikit"],function(){return e||t(UIkit2)})}(function(u){"use strict";var d,p=0;u.component("slideshow",{defaults:{animation:"fade",duration:500,height:"auto",start:0,autoplay:!1,autoplayInterval:7e3,videoautoplay:!0,videomute:!0,slices:15,pauseOnHover:!0,kenburns:!1,kenburnsanimations:["uk-animation-middle-left","uk-animation-top-right","uk-animation-bottom-left","uk-animation-top-center","","uk-animation-bottom-right"]},current:!1,interval:null,hovering:!1,boot:function(){u.ready(function(t){u.$("[data-uk-slideshow]",t).each(function(){var t=u.$(this);t.data("slideshow")||u.slideshow(t,u.Utils.options(t.attr("data-uk-slideshow")))})})},init:function(){var i=this;this.container=this.element.hasClass("uk-slideshow")?this.element:u.$(this.find(".uk-slideshow:first")),this.current=this.options.start,this.animating=!1,this.fixFullscreen=navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&this.container.hasClass("uk-slideshow-fullscreen"),this.options.kenburns&&(this.kbanimduration=!0===this.options.kenburns?"15s":this.options.kenburns,String(this.kbanimduration).match(/(ms|s)$/)||(this.kbanimduration+="ms"),"string"==typeof this.options.kenburnsanimations&&(this.options.kenburnsanimations=this.options.kenburnsanimations.split(","))),this.update(),this.on("click.uk.slideshow","[data-uk-slideshow-item]",function(t){t.preventDefault();var e=u.$(this).attr("data-uk-slideshow-item");if(i.current!=e){switch(e){case"next":case"previous":i["next"==e?"next":"previous"]();break;default:i.show(parseInt(e,10))}i.stop()}}),u.$win.on("resize load",u.Utils.debounce(function(){i.resize(),i.fixFullscreen&&(i.container.css("height",window.innerHeight),i.slides.css("height",window.innerHeight))},100)),setTimeout(function(){i.resize()},80),this.options.autoplay&&this.start(),this.options.videoautoplay&&this.slides.eq(this.current).data("media")&&this.playmedia(this.slides.eq(this.current).data("media")),this.options.kenburns&&this.applyKenBurns(this.slides.eq(this.current)),this.container.on({mouseenter:function(){i.options.pauseOnHover&&(i.hovering=!0)},mouseleave:function(){i.hovering=!1}}),this.on("swipeRight swipeLeft",function(t){i["swipeLeft"==t.type?"next":"previous"]()}),this.on("display.uk.check",function(){i.element.is(":visible")&&(i.resize(),i.fixFullscreen&&(i.container.css("height",window.innerHeight),i.slides.css("height",window.innerHeight)))}),u.domObserve(this.element,function(t){i.container.children(":not([data-slideshow-slide])").not(".uk-slideshow-ghost").length&&i.update(!0)})},update:function(t){var d,h=this,c=0;this.slides=this.container.children(),this.slidesCount=this.slides.length,this.slides.eq(this.current).length||(this.current=0),this.slides.each(function(i){var t=u.$(this);if(!t.data("processed")){var o=t.children("img,video,iframe").eq(0),e="html";if(t.data("media",o),t.data("sizer",o),o.length){var n;switch(e=o[0].nodeName.toLowerCase(),o[0].nodeName){case"IMG":var s=u.$('
    ').css({"background-image":"url("+o.attr("src")+")"});o.attr("width")&&o.attr("height")&&(n=u.$("").attr({width:o.attr("width"),height:o.attr("height")}),o.replaceWith(n),o=n,n=void 0),o.css({width:"100%",height:"auto",opacity:0}),t.prepend(s).data("cover",s);break;case"IFRAME":var a=o[0].src,r="sw-"+ ++p;o.attr("src","").on("load",function(){if((i!==h.current||i==h.current&&!h.options.videoautoplay)&&h.pausemedia(o),h.options.videomute){h.mutemedia(o);var t=setInterval((e=0,function(){h.mutemedia(o),4<=++e&&clearInterval(t)}),250)}var e}).data("slideshow",h).attr("data-player-id",r).attr("src",[a,-1").attr({width:o[0].width,height:o[0].height});var l=u.$('').attr("src",d[0].toDataURL());t.prepend(l),t.data("sizer",l)}}else t.data("sizer",t);h.hasKenBurns(t)&&t.data("cover").css({"-webkit-animation-duration":h.kbanimduration,"animation-duration":h.kbanimduration}),t.data("processed",++c),t.attr("data-slideshow-slide",e)}}),c&&(this.triggers=this.find("[data-uk-slideshow-item]"),this.slides.attr("aria-hidden","true").removeClass("uk-active").eq(this.current).addClass("uk-active").attr("aria-hidden","false"),this.triggers.filter('[data-uk-slideshow-item="'+this.current+'"]').addClass("uk-active")),t&&c&&this.resize()},resize:function(){if(!this.container.hasClass("uk-slideshow-fullscreen")){var t=this.options.height;"auto"===this.options.height&&(t=0,this.slides.css("height","").each(function(){t=Math.max(t,u.$(this).height())})),this.container.css("height",t),this.slides.css("height",t)}},show:function(t,e){if(!this.animating&&this.current!=t){this.animating=!0;var i=this,o=this.slides.eq(this.current),n=this.slides.eq(t),s=e||(this.current=this.vp,this.container.css({"-ms-transform":"","-webkit-transform":"",transform:""}),t&&this.updateFocus(this.focus)},updatePos:function(t){this.pos=t,this.container.css({"-ms-transform":"translateX("+t+"px)","-webkit-transform":"translateX("+t+"px)",transform:"translateX("+t+"px)"})},updateFocus:function(e,t){if(this.active){t=t||(e>this.focus?1:-1);var i,o,n=this.items.eq(e);if(this.options.infinite&&this.infinite(e,t),this.options.center)this.updatePos(-1*n.data("center")),this.items.filter("."+this.options.activecls).removeClass(this.options.activecls),n.addClass(this.options.activecls);else if(this.options.infinite)this.updatePos(-1*n.data("left"));else{for(i=0,o=e;othis.vp)this.updatePos(-1*n.data("left"));else if(1==t){for(i=0,o=this.items.length-1;0<=o;o--){if((i+=this.items.eq(o).data("width"))==this.vp){e=o;break}if(i>this.vp){e=othis.vp?this.updatePos(-1*(this.container.width()-this.vp)):this.updatePos(-1*this.items.eq(e).data("left"))}}var s=this.items.eq(e).data("left");this.items.removeClass("uk-slide-before uk-slide-after").each(function(t){t!==e&&l.$(this).addClass(l.$(this).data("left")this.vp));i++)s=s+1==this.items.length?0:s+1;a.length&&a.forEach(function(t){var e=n.data("area");t.css({left:e}).data({left:e,area:e+t.data("width"),center:e-(o.vp/2-t.data("cwidth")/2)}),n=t})}else{for(i=this.items.length-1;-1this.vp));i--)s=s-1==-1?this.items.length-1:s-1;a.length&&a.forEach(function(t){var e=n.data("left")-t.data("width");t.css({left:e}).data({left:e,area:e+t.data("width"),center:e-(o.vp/2-t.data("cwidth")/2)}),n=t})}}}),l.$doc.on("mousemove.uk.slider touchmove.uk.slider",function(t){if(t.originalEvent&&t.originalEvent.touches&&(t=t.originalEvent.touches[0]),u&&Math.abs(t.pageX-u.x)>u.threshold&&(window.getSelection().toString()?c=u=!1:u(t)),c){var e,i,o,n,s,a,r,l,d,h;if(t.clientX||t.clientY?e=t.clientX:(t.pageX||t.pageY)&&(e=t.pageX-document.body.scrollLeft-document.documentElement.scrollLeft),s=p.focus,i=e-c.element.data("pointer-start").x,o=c.element.data("pointer-pos-start")+i,n=e>c.element.data("pointer-start").x?-1:1,a=c.items.eq(p.focus),1==n)for(r=a.data("left")+Math.abs(i),l=0,d=p.focus;lr){s=d;break}d=d+1==c.items.length?0:d+1}else for(r=a.data("left")-Math.abs(i),l=0,d=p.focus;lp.diff){n=o;break}o=o+1==c.items.length?0:o+1}c.options.infinite||n||(n=c.items.length)}else{for(i=0,o=p.focus;iu.threshold||Math.abs(e.pageY-u.pos.y)>u.threshold)&&u.apply(e)}if(d){c||(c=!0,d.show(),d.$current.addClass(d.$sortable.options.placeholderClass),d.$sortable.element.children().addClass(d.$sortable.options.childClass),l.$html.addClass(d.$sortable.options.dragMovingClass));var i=d.data("mouse-offset"),o=t.originalEvent.touches&&t.originalEvent.touches[0]||t.originalEvent,n=parseInt(o.pageX,10)+i.left,s=parseInt(o.pageY,10)+i.top;if(d.css({left:n,top:s}),s+d.height()/3>document.body.offsetHeight)return;swindow.innerHeight+l.$win.scrollTop()&&l.$win.scrollTop(l.$win.scrollTop()+Math.ceil(d.height()/3))}}),l.$html.on(b,function(t){if(u=!1,h&&d){var e=function(t){t=l.$(t);do{if(t.data("sortable"))return t;t=l.$(t).parent()}while(t.length);return t}(h),i=d.$sortable,o={type:t.type};e[0]&&i.dragDrop(o,i.element),i.dragEnd(o,i.element)}else h=d=null})},init:function(){var a=this,r=this.element[0];p=[],this.checkEmptyList(),this.element.data("sortable-group",this.options.group?this.options.group:l.Utils.uid("sortable-group"));var t=n(function(t){if(!t.data||!t.data.sortable){var e=l.$(t.target),i=e.is("a[href]")?e:e.parents("a[href]");if(!e.is(":input")){if(a.options.handleClass)if(!(e.hasClass(a.options.handleClass)?e:e.closest("."+a.options.handleClass,a.element)).length)return;return t.preventDefault(),i.length&&i.one("click",function(t){t.preventDefault()}).one(b,function(){f||(i.trigger("click"),v&&i.attr("href").trim()&&(location.href=i.attr("href")))}),t.data=t.data||{},t.data.sortable=r,a.dragStart(t,this)}}}),e=n(l.Utils.debounce(function(t){return a.dragEnter(t,this)})),i=n(function(t){var e=a.dragenterData(this);a.dragenterData(this,e-1),a.dragenterData(this)||(l.$(this).removeClass(a.options.overClass),a.dragenterData(this,!1))}),o=n(function(t){return!h||h===this||s===this||(a.element.children().removeClass(a.options.overClass),s=this,a.moveElementNextTo(h,this),function(t){t.stopPropagation&&t.stopPropagation();t.preventDefault&&t.preventDefault();t.returnValue=!1}(t))});function n(s){return function(t){var e,i,o;if(g=t){if(i=(e=t.touches&&t.touches[0]||t).target||t.target,v&&document.elementFromPoint){var n=document.elementFromPoint(e.pageX-document.body.scrollLeft,e.pageY-document.body.scrollTop);n&&(i=n)}m=l.$(i)}l.$(i).hasClass("."+a.options.childClass)?s.apply(i,[t]):i!==r&&(o=function(t,e){var i=e;if(i==t)return null;for(;i;){if(i.parentNode===t)return i;if(!(i=i.parentNode)||!i.ownerDocument||11===i.nodeType)break}return null}(r,i))&&s.apply(o,[t])}}this.addDragHandlers=function(){v&&g.touches&&g.touches.length?r.addEventListener(w,o,!1):(r.addEventListener("mouseover",e,!1),r.addEventListener("mouseout",i,!1))},this.removeDragHandlers=function(){v&&g.touches&&g.touches.length?r.removeEventListener(w,o,!1):(r.removeEventListener("mouseover",e,!1),r.removeEventListener("mouseout",i,!1))},window.addEventListener(w,function(t){h&&a.dragMove(t,a)},!1),r.addEventListener(k,t,!1)},dragStart:function(t,e){c=f=!1;var i=this,o=l.$(t.target);if((v||2!=t.button)&&!o.is("."+i.options.noDragClass)){var n=o.closest("."+i.options.noDragClass);if(!(n.length&&this.element.find(n[0]).length||o.is(":input"))){h=e,d&&d.remove();var s=l.$(h),a=s.offset(),r=t.touches&&t.touches[0]||t;u={pos:{x:r.pageX,y:r.pageY},threshold:i.options.handleClass?1:i.options.threshold,apply:function(t){(d=l.$('
    ').css({display:"none",top:a.top,left:a.left,width:s.width(),height:s.height(),padding:s.css("padding")}).data({"mouse-offset":{left:a.left-parseInt(r.pageX,10),top:a.top-parseInt(r.pageY,10)},origin:i.element,index:s.index()}).append(s.html()).appendTo("body")).$current=s,d.$sortable=i,s.data({"start-list":s.parent(),"start-index":s.index(),"sortable-group":i.options.group}),i.addDragHandlers(),i.options.start(this,h),i.trigger("start.uk.sortable",[i,h,d]),u=!(f=!0)}}}}},dragMove:function(t,e){var i,o=(m=l.$(document.elementFromPoint(t.pageX-(document.body.scrollLeft||document.scrollLeft||0),t.pageY-(document.body.scrollTop||document.documentElement.scrollTop||0)))).closest("."+this.options.baseClass),n=o.data("sortable-group"),s=l.$(h),a=s.parent(),r=s.data("sortable-group");o[0]!==a[0]&&void 0!==r&&n===r&&(o.data("sortable").addDragHandlers(),p.push(o),o.children().addClass(this.options.childClass),0a-o-(s.top<0?0:s.top)?a-o-(r+n):i}if(s.currentTop!=i){if(s.element.css({position:"fixed",top:i,width:s.getWidthFrom.length?s.getWidthFrom.width():s.element.width()}),!s.init&&(s.element.addClass(s.options.clsinit),location.hash&&0').parent(),this.computeWrapper(),this.wrapper.css({"margin-top":this.element.css("margin-top"),"margin-bottom":this.element.css("margin-bottom"),"margin-left":this.element.css("margin-left"),"margin-right":this.element.css("margin-right")}),this.element.css("margin",0),e&&(!0===e||"!"===e[0]?(e=!0===e?this.wrapper.parent():this.wrapper.closest(e.substr(1)),t=!0):"string"==typeof e&&(e=p.$(e))),this.sticky={self:this,options:this.options,element:this.element,currentTop:null,wrapper:this.wrapper,init:!1,getWidthFrom:p.$(this.options.getWidthFrom||this.wrapper),boundary:e,boundtoparent:t,top:0,calcTop:function(){var t=this.options.top;if(this.options.top&&"string"==typeof this.options.top)if(this.options.top.match(/^(-|)(\d+)vh$/))t=window.innerHeight*parseInt(this.options.top,10)/100;else{var e=p.$(this.options.top).first();e.length&&e.is(":visible")&&(t=-1*(e.offset().top+e.outerHeight()-this.wrapper.offset().top))}this.top=t},reset:function(t){this.calcTop();var e=function(){this.element.css({position:"",top:"",width:"",left:"",margin:"0"}),this.element.removeClass([this.options.animation,"uk-animation-reverse",this.options.clsactive].join(" ")),this.element.addClass(this.options.clsinactive),this.element.trigger("inactive.uk.sticky"),this.currentTop=null,this.animate=!1}.bind(this);!t&&this.options.animation&&p.support.animation&&!p.Utils.isInView(this.wrapper)?(this.animate=!0,this.element.removeClass(this.options.animation).one(p.support.animation.end,function(){e()}).width(),this.element.addClass(this.options.animation+" uk-animation-reverse")):e()},check:function(){if(this.options.disabled)return!1;if(this.options.media)switch(typeof this.options.media){case"number":if(window.innerWidth').appendTo("body")),this.on({focus:function(t){e.show()},blur:function(t){e.hide()},mouseenter:function(t){e.show()},mouseleave:function(t){e.hide()}})},show:function(){if(this.tip="function"==typeof this.options.src?this.options.src(this.element):this.options.src,g&&clearTimeout(g),v&&clearInterval(v),"string"==typeof this.tip&&this.tip.length){m.stop().css({top:-2e3,visibility:"hidden"}).removeClass(this.options.activeClass).show(),m.html('
    '+this.tip+"
    ");var t=this,e=f.$.extend({},this.element.offset(),{width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}),i=m[0].offsetWidth,o=m[0].offsetHeight,n="function"==typeof this.options.offset?this.options.offset.call(this.element):this.options.offset,s="function"==typeof this.options.pos?this.options.pos.call(this.element):this.options.pos,a=s.split("-"),r={display:"none",visibility:"visible",top:e.top+e.height+o,left:e.left};if("fixed"==f.$html.css("position")||"fixed"==f.$body.css("position")){var l=f.$("body").offset(),d=f.$("html").offset(),h=d.top+l.top,c=d.left+l.left;e.left-=c,e.top-=h}"left"!=a[0]&&"right"!=a[0]||"right"!=f.langdirection||(a[0]="left"==a[0]?"right":"left");var u={bottom:{top:e.top+e.height+n,left:e.left+e.width/2-i/2},top:{top:e.top-o-n,left:e.left+e.width/2-i/2},left:{top:e.top+e.height/2-o/2,left:e.left-i-n},right:{top:e.top+e.height/2-o/2,left:e.left+e.width+n}};f.$.extend(r,u[a[0]]),2==a.length&&(r.left="left"==a[1]?e.left:e.left+e.width-i);var p=this.checkBoundary(r.left,r.top,i,o);if(p){switch(p){case"x":s=2==a.length?a[0]+"-"+(r.left<0?"left":"right"):r.left<0?"right":"left";break;case"y":s=2==a.length?(r.top<0?"bottom":"top")+"-"+a[1]:r.top<0?"bottom":"top";break;case"xy":s=2==a.length?(r.top<0?"bottom":"top")+"-"+(r.left<0?"left":"right"):r.left<0?"right":"left"}a=s.split("-"),f.$.extend(r,u[a[0]]),2==a.length&&(r.left="left"==a[1]?e.left:e.left+e.width-i)}r.left-=f.$body.position().left,g=setTimeout(function(){m.css(r).attr("class",["uk-tooltip","uk-tooltip-"+s,t.options.cls].join(" ")),t.options.animation?m.css({opacity:0,display:"block"}).addClass(t.options.activeClass).animate({opacity:1},parseInt(t.options.animation,10)||400):m.show().addClass(t.options.activeClass),g=!1,v=setInterval(function(){t.element.is(":visible")||t.hide()},150)},parseInt(this.options.delay,10)||0)}},hide:function(){if(!this.element.is("input")||this.element[0]!==document.activeElement)if(g&&clearTimeout(g),v&&clearInterval(v),m.stop(),this.options.animation){var t=this;m.fadeOut(parseInt(this.options.animation,10)||400,function(){m.removeClass(t.options.activeClass)})}else m.hide().removeClass(this.options.activeClass)},content:function(){return this.tip},checkBoundary:function(t,e,i,o){var n="";return(t<0||t-f.$win.scrollLeft()+i>window.innerWidth)&&(n+="x"),(e<0||e-f.$win.scrollTop()+o>window.innerHeight)&&(n+="y"),n}}),f.tooltip}),function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-timepicker",["uikit"],function(){return e||t(UIkit)})}(function(o){"use strict";o.component("timepicker",{defaults:{format:"24h",delay:0,start:0,end:24},boot:function(){o.$html.on("focus.timepicker.uikit","[data-uk-timepicker]",function(t){var e=o.$(this);if(!e.data("timepicker")){var i=o.timepicker(e,o.Utils.options(e.attr("data-uk-timepicker")));setTimeout(function(){i.autocomplete.input.focus()},40)}})},init:function(){var t,e=this,i=function(t,e){e=e||24;var i,o,n={"12h":[],"24h":[]};for(i=t=t||0,o="";i{{~items}}
  • {{$item.value}}
  • {{/items}}',this.options.source=function(t){t(i[e.options.format]||i["12h"])},t=this.element.is("input")?(this.element.wrap('
    '),this.element.parent()):this.element.addClass("uk-autocomplete"),this.autocomplete=o.autocomplete(t,this.options),this.autocomplete.dropdown.addClass("uk-dropdown-small uk-dropdown-scrollable"),this.autocomplete.on("show.uk.autocomplete",function(){var t=e.autocomplete.dropdown.find('[data-value="'+e.autocomplete.input.val()+'"]');setTimeout(function(){e.autocomplete.pick(t,!0)},10)}),this.autocomplete.input.on("focus",function(){e.autocomplete.value=Math.random(),e.autocomplete.triggercomplete()}).on("blur",o.Utils.debounce(function(){e.checkTime()},100)),this.element.data("timepicker",this)},checkTime:function(){var t,e,i,o,n="AM",s=this.autocomplete.input.val();"12h"==this.options.format?(e=(t=s.split(" "))[0].split(":"),n=t[1]):e=s.split(":"),i=parseInt(e[0],10),o=parseInt(e[1],10),isNaN(i)&&(i=0),isNaN(o)&&(o=0),"12h"==this.options.format?(12=o.filelimit&&(r=!1),r&&a
    ',$body.on("show.uk.modal",".uk-modal-dialog-replace",function(){setTimeout(function(){var t=$(".uk-modal-dialog-replace");if(t.find(".uk-button-primary").length){var e=t.find(".uk-button-primary").toggleClass("uk-button-primary md-btn-flat-primary");e.next("button")&&e.next("button").after(e)}t.find(".uk-button").length&&t.find(".uk-button").toggleClass("uk-button md-btn md-btn-flat"),t.find(".uk-margin-small-top").length&&t.find(".uk-margin-small-top").toggleClass("uk-margin-small-top uk-margin-top"),t.find("input.uk-width-1-1").length&&(t.find("input.uk-width-1-1").toggleClass("uk-width-1-1 md-input"),altair_md.inputs()),t.find(".uk-form").length&&t.find(".uk-form").removeClass("uk-form")},50)})),void 0!==UIkit.components.tab&&$.extend(UIkit.components.tab.prototype.defaults,{swiping:!1}),void 0!==UIkit.components.tooltip&&$.extend(UIkit.components.tooltip.prototype.defaults,{animation:!UIkit.support.touch&&280,offset:8}),void 0!==UIkit.components.sortable&&Modernizr.touch&&$("[data-uk-sortable]").children().addClass("needsclick")})} \ No newline at end of file diff --git a/src/assets/theme-assets/js/uikit_htmleditor_custom.js b/src/assets/theme-assets/js/uikit_htmleditor_custom.js deleted file mode 100644 index 3e40f4a..0000000 --- a/src/assets/theme-assets/js/uikit_htmleditor_custom.js +++ /dev/null @@ -1,14776 +0,0 @@ -// CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: https://codemirror.net/LICENSE - -// This is CodeMirror (https://codemirror.net), a code editor -// implemented in JavaScript on top of the browser's DOM. -// -// You can find some technical background for some of the code below -// at http://marijnhaverbeke.nl/blog/#cm-internals . - -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global.CodeMirror = factory()); -}(this, (function () { 'use strict'; - - // Kludges for bugs and behavior differences that can't be feature - // detected are enabled based on userAgent etc sniffing. - var userAgent = navigator.userAgent; - var platform = navigator.platform; - - var gecko = /gecko\/\d/i.test(userAgent); - var ie_upto10 = /MSIE \d/.test(userAgent); - var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(userAgent); - var edge = /Edge\/(\d+)/.exec(userAgent); - var ie = ie_upto10 || ie_11up || edge; - var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]); - var webkit = !edge && /WebKit\//.test(userAgent); - var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(userAgent); - var chrome = !edge && /Chrome\//.test(userAgent); - var presto = /Opera\//.test(userAgent); - var safari = /Apple Computer/.test(navigator.vendor); - var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent); - var phantom = /PhantomJS/.test(userAgent); - - var ios = !edge && /AppleWebKit/.test(userAgent) && /Mobile\/\w+/.test(userAgent); - var android = /Android/.test(userAgent); - // This is woefully incomplete. Suggestions for alternative methods welcome. - var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent); - var mac = ios || /Mac/.test(platform); - var chromeOS = /\bCrOS\b/.test(userAgent); - var windows = /win/i.test(platform); - - var presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/); - if (presto_version) { presto_version = Number(presto_version[1]); } - if (presto_version && presto_version >= 15) { presto = false; webkit = true; } - // Some browsers use the wrong event properties to signal cmd/ctrl on OS X - var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11)); - var captureRightClick = gecko || (ie && ie_version >= 9); - - function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*") } - - var rmClass = function(node, cls) { - var current = node.className; - var match = classTest(cls).exec(current); - if (match) { - var after = current.slice(match.index + match[0].length); - node.className = current.slice(0, match.index) + (after ? match[1] + after : ""); - } - }; - - function removeChildren(e) { - for (var count = e.childNodes.length; count > 0; --count) - { e.removeChild(e.firstChild); } - return e - } - - function removeChildrenAndAdd(parent, e) { - return removeChildren(parent).appendChild(e) - } - - function elt(tag, content, className, style) { - var e = document.createElement(tag); - if (className) { e.className = className; } - if (style) { e.style.cssText = style; } - if (typeof content == "string") { e.appendChild(document.createTextNode(content)); } - else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]); } } - return e - } - // wrapper for elt, which removes the elt from the accessibility tree - function eltP(tag, content, className, style) { - var e = elt(tag, content, className, style); - e.setAttribute("role", "presentation"); - return e - } - - var range; - if (document.createRange) { range = function(node, start, end, endNode) { - var r = document.createRange(); - r.setEnd(endNode || node, end); - r.setStart(node, start); - return r - }; } - else { range = function(node, start, end) { - var r = document.body.createTextRange(); - try { r.moveToElementText(node.parentNode); } - catch(e) { return r } - r.collapse(true); - r.moveEnd("character", end); - r.moveStart("character", start); - return r - }; } - - function contains(parent, child) { - if (child.nodeType == 3) // Android browser always returns false when child is a textnode - { child = child.parentNode; } - if (parent.contains) - { return parent.contains(child) } - do { - if (child.nodeType == 11) { child = child.host; } - if (child == parent) { return true } - } while (child = child.parentNode) - } - - function activeElt() { - // IE and Edge may throw an "Unspecified Error" when accessing document.activeElement. - // IE < 10 will throw when accessed while the page is loading or in an iframe. - // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable. - var activeElement; - try { - activeElement = document.activeElement; - } catch(e) { - activeElement = document.body || null; - } - while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement) - { activeElement = activeElement.shadowRoot.activeElement; } - return activeElement - } - - function addClass(node, cls) { - var current = node.className; - if (!classTest(cls).test(current)) { node.className += (current ? " " : "") + cls; } - } - function joinClasses(a, b) { - var as = a.split(" "); - for (var i = 0; i < as.length; i++) - { if (as[i] && !classTest(as[i]).test(b)) { b += " " + as[i]; } } - return b - } - - var selectInput = function(node) { node.select(); }; - if (ios) // Mobile Safari apparently has a bug where select() is broken. - { selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; } - else if (ie) // Suppress mysterious IE10 errors - { selectInput = function(node) { try { node.select(); } catch(_e) {} }; } - - function bind(f) { - var args = Array.prototype.slice.call(arguments, 1); - return function(){return f.apply(null, args)} - } - - function copyObj(obj, target, overwrite) { - if (!target) { target = {}; } - for (var prop in obj) - { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop))) - { target[prop] = obj[prop]; } } - return target - } - - // Counts the column offset in a string, taking tabs into account. - // Used mostly to find indentation. - function countColumn(string, end, tabSize, startIndex, startValue) { - if (end == null) { - end = string.search(/[^\s\u00a0]/); - if (end == -1) { end = string.length; } - } - for (var i = startIndex || 0, n = startValue || 0;;) { - var nextTab = string.indexOf("\t", i); - if (nextTab < 0 || nextTab >= end) - { return n + (end - i) } - n += nextTab - i; - n += tabSize - (n % tabSize); - i = nextTab + 1; - } - } - - var Delayed = function() {this.id = null;}; - Delayed.prototype.set = function (ms, f) { - clearTimeout(this.id); - this.id = setTimeout(f, ms); - }; - - function indexOf(array, elt) { - for (var i = 0; i < array.length; ++i) - { if (array[i] == elt) { return i } } - return -1 - } - - // Number of pixels added to scroller and sizer to hide scrollbar - var scrollerGap = 30; - - // Returned or thrown by various protocols to signal 'I'm not - // handling this'. - var Pass = {toString: function(){return "CodeMirror.Pass"}}; - - // Reused option objects for setSelection & friends - var sel_dontScroll = {scroll: false}, sel_mouse = {origin: "*mouse"}, sel_move = {origin: "+move"}; - - // The inverse of countColumn -- find the offset that corresponds to - // a particular column. - function findColumn(string, goal, tabSize) { - for (var pos = 0, col = 0;;) { - var nextTab = string.indexOf("\t", pos); - if (nextTab == -1) { nextTab = string.length; } - var skipped = nextTab - pos; - if (nextTab == string.length || col + skipped >= goal) - { return pos + Math.min(skipped, goal - col) } - col += nextTab - pos; - col += tabSize - (col % tabSize); - pos = nextTab + 1; - if (col >= goal) { return pos } - } - } - - var spaceStrs = [""]; - function spaceStr(n) { - while (spaceStrs.length <= n) - { spaceStrs.push(lst(spaceStrs) + " "); } - return spaceStrs[n] - } - - function lst(arr) { return arr[arr.length-1] } - - function map(array, f) { - var out = []; - for (var i = 0; i < array.length; i++) { out[i] = f(array[i], i); } - return out - } - - function insertSorted(array, value, score) { - var pos = 0, priority = score(value); - while (pos < array.length && score(array[pos]) <= priority) { pos++; } - array.splice(pos, 0, value); - } - - function nothing() {} - - function createObj(base, props) { - var inst; - if (Object.create) { - inst = Object.create(base); - } else { - nothing.prototype = base; - inst = new nothing(); - } - if (props) { copyObj(props, inst); } - return inst - } - - var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; - function isWordCharBasic(ch) { - return /\w/.test(ch) || ch > "\x80" && - (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch)) - } - function isWordChar(ch, helper) { - if (!helper) { return isWordCharBasic(ch) } - if (helper.source.indexOf("\\w") > -1 && isWordCharBasic(ch)) { return true } - return helper.test(ch) - } - - function isEmpty(obj) { - for (var n in obj) { if (obj.hasOwnProperty(n) && obj[n]) { return false } } - return true - } - - // Extending unicode characters. A series of a non-extending char + - // any number of extending chars is treated as a single unit as far - // as editing and measuring is concerned. This is not fully correct, - // since some scripts/fonts/browsers also treat other configurations - // of code points as a group. - var extendingChars = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/; - function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) } - - // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range. - function skipExtendingChars(str, pos, dir) { - while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; } - return pos - } - - // Returns the value from the range [`from`; `to`] that satisfies - // `pred` and is closest to `from`. Assumes that at least `to` - // satisfies `pred`. Supports `from` being greater than `to`. - function findFirst(pred, from, to) { - // At any point we are certain `to` satisfies `pred`, don't know - // whether `from` does. - var dir = from > to ? -1 : 1; - for (;;) { - if (from == to) { return from } - var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF); - if (mid == from) { return pred(mid) ? from : to } - if (pred(mid)) { to = mid; } - else { from = mid + dir; } - } - } - - // The display handles the DOM integration, both for input reading - // and content drawing. It holds references to DOM nodes and - // display-related state. - - function Display(place, doc, input) { - var d = this; - this.input = input; - - // Covers bottom-right square when both scrollbars are present. - d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler"); - d.scrollbarFiller.setAttribute("cm-not-content", "true"); - // Covers bottom of gutter when coverGutterNextToScrollbar is on - // and h scrollbar is present. - d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler"); - d.gutterFiller.setAttribute("cm-not-content", "true"); - // Will contain the actual code, positioned to cover the viewport. - d.lineDiv = eltP("div", null, "CodeMirror-code"); - // Elements are added to these to represent selection and cursors. - d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1"); - d.cursorDiv = elt("div", null, "CodeMirror-cursors"); - // A visibility: hidden element used to find the size of things. - d.measure = elt("div", null, "CodeMirror-measure"); - // When lines outside of the viewport are measured, they are drawn in this. - d.lineMeasure = elt("div", null, "CodeMirror-measure"); - // Wraps everything that needs to exist inside the vertically-padded coordinate system - d.lineSpace = eltP("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv], - null, "position: relative; outline: none"); - var lines = eltP("div", [d.lineSpace], "CodeMirror-lines"); - // Moved around its parent to cover visible view. - d.mover = elt("div", [lines], null, "position: relative"); - // Set to the height of the document, allowing scrolling. - d.sizer = elt("div", [d.mover], "CodeMirror-sizer"); - d.sizerWidth = null; - // Behavior of elts with overflow: auto and padding is - // inconsistent across browsers. This is used to ensure the - // scrollable area is big enough. - d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerGap + "px; width: 1px;"); - // Will contain the gutters, if any. - d.gutters = elt("div", null, "CodeMirror-gutters"); - d.lineGutter = null; - // Actual scrollable element. - d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll"); - d.scroller.setAttribute("tabIndex", "-1"); - // The element in which the editor lives. - d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror"); - - // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported) - if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; } - if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; } - - if (place) { - if (place.appendChild) { place.appendChild(d.wrapper); } - else { place(d.wrapper); } - } - - // Current rendered range (may be bigger than the view window). - d.viewFrom = d.viewTo = doc.first; - d.reportedViewFrom = d.reportedViewTo = doc.first; - // Information about the rendered lines. - d.view = []; - d.renderedView = null; - // Holds info about a single rendered line when it was rendered - // for measurement, while not in view. - d.externalMeasured = null; - // Empty space (in pixels) above the view - d.viewOffset = 0; - d.lastWrapHeight = d.lastWrapWidth = 0; - d.updateLineNumbers = null; - - d.nativeBarWidth = d.barHeight = d.barWidth = 0; - d.scrollbarsClipped = false; - - // Used to only resize the line number gutter when necessary (when - // the amount of lines crosses a boundary that makes its width change) - d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null; - // Set to true when a non-horizontal-scrolling line widget is - // added. As an optimization, line widget aligning is skipped when - // this is false. - d.alignWidgets = false; - - d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null; - - // Tracks the maximum line length so that the horizontal scrollbar - // can be kept static when scrolling. - d.maxLine = null; - d.maxLineLength = 0; - d.maxLineChanged = false; - - // Used for measuring wheel scrolling granularity - d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null; - - // True when shift is held down. - d.shift = false; - - // Used to track whether anything happened since the context menu - // was opened. - d.selForContextMenu = null; - - d.activeTouch = null; - - input.init(d); - } - - // Find the line object corresponding to the given line number. - function getLine(doc, n) { - n -= doc.first; - if (n < 0 || n >= doc.size) { throw new Error("There is no line " + (n + doc.first) + " in the document.") } - var chunk = doc; - while (!chunk.lines) { - for (var i = 0;; ++i) { - var child = chunk.children[i], sz = child.chunkSize(); - if (n < sz) { chunk = child; break } - n -= sz; - } - } - return chunk.lines[n] - } - - // Get the part of a document between two positions, as an array of - // strings. - function getBetween(doc, start, end) { - var out = [], n = start.line; - doc.iter(start.line, end.line + 1, function (line) { - var text = line.text; - if (n == end.line) { text = text.slice(0, end.ch); } - if (n == start.line) { text = text.slice(start.ch); } - out.push(text); - ++n; - }); - return out - } - // Get the lines between from and to, as array of strings. - function getLines(doc, from, to) { - var out = []; - doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value - return out - } - - // Update the height of a line, propagating the height change - // upwards to parent nodes. - function updateLineHeight(line, height) { - var diff = height - line.height; - if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } } - } - - // Given a line object, find its line number by walking up through - // its parent links. - function lineNo(line) { - if (line.parent == null) { return null } - var cur = line.parent, no = indexOf(cur.lines, line); - for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) { - for (var i = 0;; ++i) { - if (chunk.children[i] == cur) { break } - no += chunk.children[i].chunkSize(); - } - } - return no + cur.first - } - - // Find the line at the given vertical position, using the height - // information in the document tree. - function lineAtHeight(chunk, h) { - var n = chunk.first; - outer: do { - for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) { - var child = chunk.children[i$1], ch = child.height; - if (h < ch) { chunk = child; continue outer } - h -= ch; - n += child.chunkSize(); - } - return n - } while (!chunk.lines) - var i = 0; - for (; i < chunk.lines.length; ++i) { - var line = chunk.lines[i], lh = line.height; - if (h < lh) { break } - h -= lh; - } - return n + i - } - - function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size} - - function lineNumberFor(options, i) { - return String(options.lineNumberFormatter(i + options.firstLineNumber)) - } - - // A Pos instance represents a position within the text. - function Pos(line, ch, sticky) { - if ( sticky === void 0 ) sticky = null; - - if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) } - this.line = line; - this.ch = ch; - this.sticky = sticky; - } - - // Compare two positions, return 0 if they are the same, a negative - // number when a is less, and a positive number otherwise. - function cmp(a, b) { return a.line - b.line || a.ch - b.ch } - - function equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b) == 0 } - - function copyPos(x) {return Pos(x.line, x.ch)} - function maxPos(a, b) { return cmp(a, b) < 0 ? b : a } - function minPos(a, b) { return cmp(a, b) < 0 ? a : b } - - // Most of the external API clips given positions to make sure they - // actually exist within the document. - function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))} - function clipPos(doc, pos) { - if (pos.line < doc.first) { return Pos(doc.first, 0) } - var last = doc.first + doc.size - 1; - if (pos.line > last) { return Pos(last, getLine(doc, last).text.length) } - return clipToLen(pos, getLine(doc, pos.line).text.length) - } - function clipToLen(pos, linelen) { - var ch = pos.ch; - if (ch == null || ch > linelen) { return Pos(pos.line, linelen) } - else if (ch < 0) { return Pos(pos.line, 0) } - else { return pos } - } - function clipPosArray(doc, array) { - var out = []; - for (var i = 0; i < array.length; i++) { out[i] = clipPos(doc, array[i]); } - return out - } - - // Optimize some code when these features are not used. - var sawReadOnlySpans = false, sawCollapsedSpans = false; - - function seeReadOnlySpans() { - sawReadOnlySpans = true; - } - - function seeCollapsedSpans() { - sawCollapsedSpans = true; - } - - // TEXTMARKER SPANS - - function MarkedSpan(marker, from, to) { - this.marker = marker; - this.from = from; this.to = to; - } - - // Search an array of spans for a span matching the given marker. - function getMarkedSpanFor(spans, marker) { - if (spans) { for (var i = 0; i < spans.length; ++i) { - var span = spans[i]; - if (span.marker == marker) { return span } - } } - } - // Remove a span from an array, returning undefined if no spans are - // left (we don't store arrays for lines without spans). - function removeMarkedSpan(spans, span) { - var r; - for (var i = 0; i < spans.length; ++i) - { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } } - return r - } - // Add a span to a line. - function addMarkedSpan(line, span) { - line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]; - span.marker.attachLine(line); - } - - // Used for the algorithm that adjusts markers for a change in the - // document. These functions cut an array of spans at a given - // character position, returning an array of remaining chunks (or - // undefined if nothing remains). - function markedSpansBefore(old, startCh, isInsert) { - var nw; - if (old) { for (var i = 0; i < old.length; ++i) { - var span = old[i], marker = span.marker; - var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh); - if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) { - var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh) - ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to)); - } - } } - return nw - } - function markedSpansAfter(old, endCh, isInsert) { - var nw; - if (old) { for (var i = 0; i < old.length; ++i) { - var span = old[i], marker = span.marker; - var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh); - if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) { - var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh) - ;(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh, - span.to == null ? null : span.to - endCh)); - } - } } - return nw - } - - // Given a change object, compute the new set of marker spans that - // cover the line in which the change took place. Removes spans - // entirely within the change, reconnects spans belonging to the - // same marker that appear on both sides of the change, and cuts off - // spans partially within the change. Returns an array of span - // arrays with one element for each line in (after) the change. - function stretchSpansOverChange(doc, change) { - if (change.full) { return null } - var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans; - var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans; - if (!oldFirst && !oldLast) { return null } - - var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0; - // Get the spans that 'stick out' on both sides - var first = markedSpansBefore(oldFirst, startCh, isInsert); - var last = markedSpansAfter(oldLast, endCh, isInsert); - - // Next, merge those two ends - var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0); - if (first) { - // Fix up .to properties of first - for (var i = 0; i < first.length; ++i) { - var span = first[i]; - if (span.to == null) { - var found = getMarkedSpanFor(last, span.marker); - if (!found) { span.to = startCh; } - else if (sameLine) { span.to = found.to == null ? null : found.to + offset; } - } - } - } - if (last) { - // Fix up .from in last (or move them into first in case of sameLine) - for (var i$1 = 0; i$1 < last.length; ++i$1) { - var span$1 = last[i$1]; - if (span$1.to != null) { span$1.to += offset; } - if (span$1.from == null) { - var found$1 = getMarkedSpanFor(first, span$1.marker); - if (!found$1) { - span$1.from = offset; - if (sameLine) { (first || (first = [])).push(span$1); } - } - } else { - span$1.from += offset; - if (sameLine) { (first || (first = [])).push(span$1); } - } - } - } - // Make sure we didn't create any zero-length spans - if (first) { first = clearEmptySpans(first); } - if (last && last != first) { last = clearEmptySpans(last); } - - var newMarkers = [first]; - if (!sameLine) { - // Fill gap with whole-line-spans - var gap = change.text.length - 2, gapMarkers; - if (gap > 0 && first) - { for (var i$2 = 0; i$2 < first.length; ++i$2) - { if (first[i$2].to == null) - { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } } - for (var i$3 = 0; i$3 < gap; ++i$3) - { newMarkers.push(gapMarkers); } - newMarkers.push(last); - } - return newMarkers - } - - // Remove spans that are empty and don't have a clearWhenEmpty - // option of false. - function clearEmptySpans(spans) { - for (var i = 0; i < spans.length; ++i) { - var span = spans[i]; - if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false) - { spans.splice(i--, 1); } - } - if (!spans.length) { return null } - return spans - } - - // Used to 'clip' out readOnly ranges when making a change. - function removeReadOnlyRanges(doc, from, to) { - var markers = null; - doc.iter(from.line, to.line + 1, function (line) { - if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) { - var mark = line.markedSpans[i].marker; - if (mark.readOnly && (!markers || indexOf(markers, mark) == -1)) - { (markers || (markers = [])).push(mark); } - } } - }); - if (!markers) { return null } - var parts = [{from: from, to: to}]; - for (var i = 0; i < markers.length; ++i) { - var mk = markers[i], m = mk.find(0); - for (var j = 0; j < parts.length; ++j) { - var p = parts[j]; - if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue } - var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to); - if (dfrom < 0 || !mk.inclusiveLeft && !dfrom) - { newParts.push({from: p.from, to: m.from}); } - if (dto > 0 || !mk.inclusiveRight && !dto) - { newParts.push({from: m.to, to: p.to}); } - parts.splice.apply(parts, newParts); - j += newParts.length - 3; - } - } - return parts - } - - // Connect or disconnect spans from a line. - function detachMarkedSpans(line) { - var spans = line.markedSpans; - if (!spans) { return } - for (var i = 0; i < spans.length; ++i) - { spans[i].marker.detachLine(line); } - line.markedSpans = null; - } - function attachMarkedSpans(line, spans) { - if (!spans) { return } - for (var i = 0; i < spans.length; ++i) - { spans[i].marker.attachLine(line); } - line.markedSpans = spans; - } - - // Helpers used when computing which overlapping collapsed span - // counts as the larger one. - function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 } - function extraRight(marker) { return marker.inclusiveRight ? 1 : 0 } - - // Returns a number indicating which of two overlapping collapsed - // spans is larger (and thus includes the other). Falls back to - // comparing ids when the spans cover exactly the same range. - function compareCollapsedMarkers(a, b) { - var lenDiff = a.lines.length - b.lines.length; - if (lenDiff != 0) { return lenDiff } - var aPos = a.find(), bPos = b.find(); - var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b); - if (fromCmp) { return -fromCmp } - var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b); - if (toCmp) { return toCmp } - return b.id - a.id - } - - // Find out whether a line ends or starts in a collapsed span. If - // so, return the marker for that span. - function collapsedSpanAtSide(line, start) { - var sps = sawCollapsedSpans && line.markedSpans, found; - if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) { - sp = sps[i]; - if (sp.marker.collapsed && (start ? sp.from : sp.to) == null && - (!found || compareCollapsedMarkers(found, sp.marker) < 0)) - { found = sp.marker; } - } } - return found - } - function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) } - function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) } - - function collapsedSpanAround(line, ch) { - var sps = sawCollapsedSpans && line.markedSpans, found; - if (sps) { for (var i = 0; i < sps.length; ++i) { - var sp = sps[i]; - if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) && - (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; } - } } - return found - } - - // Test whether there exists a collapsed span that partially - // overlaps (covers the start or end, but not both) of a new span. - // Such overlap is not allowed. - function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) { - var line = getLine(doc, lineNo$$1); - var sps = sawCollapsedSpans && line.markedSpans; - if (sps) { for (var i = 0; i < sps.length; ++i) { - var sp = sps[i]; - if (!sp.marker.collapsed) { continue } - var found = sp.marker.find(0); - var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker); - var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker); - if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue } - if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) || - fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0)) - { return true } - } } - } - - // A visual line is a line as drawn on the screen. Folding, for - // example, can cause multiple logical lines to appear on the same - // visual line. This finds the start of the visual line that the - // given line is part of (usually that is the line itself). - function visualLine(line) { - var merged; - while (merged = collapsedSpanAtStart(line)) - { line = merged.find(-1, true).line; } - return line - } - - function visualLineEnd(line) { - var merged; - while (merged = collapsedSpanAtEnd(line)) - { line = merged.find(1, true).line; } - return line - } - - // Returns an array of logical lines that continue the visual line - // started by the argument, or undefined if there are no such lines. - function visualLineContinued(line) { - var merged, lines; - while (merged = collapsedSpanAtEnd(line)) { - line = merged.find(1, true).line - ;(lines || (lines = [])).push(line); - } - return lines - } - - // Get the line number of the start of the visual line that the - // given line number is part of. - function visualLineNo(doc, lineN) { - var line = getLine(doc, lineN), vis = visualLine(line); - if (line == vis) { return lineN } - return lineNo(vis) - } - - // Get the line number of the start of the next visual line after - // the given line. - function visualLineEndNo(doc, lineN) { - if (lineN > doc.lastLine()) { return lineN } - var line = getLine(doc, lineN), merged; - if (!lineIsHidden(doc, line)) { return lineN } - while (merged = collapsedSpanAtEnd(line)) - { line = merged.find(1, true).line; } - return lineNo(line) + 1 - } - - // Compute whether a line is hidden. Lines count as hidden when they - // are part of a visual line that starts with another line, or when - // they are entirely covered by collapsed, non-widget span. - function lineIsHidden(doc, line) { - var sps = sawCollapsedSpans && line.markedSpans; - if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) { - sp = sps[i]; - if (!sp.marker.collapsed) { continue } - if (sp.from == null) { return true } - if (sp.marker.widgetNode) { continue } - if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp)) - { return true } - } } - } - function lineIsHiddenInner(doc, line, span) { - if (span.to == null) { - var end = span.marker.find(1, true); - return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker)) - } - if (span.marker.inclusiveRight && span.to == line.text.length) - { return true } - for (var sp = (void 0), i = 0; i < line.markedSpans.length; ++i) { - sp = line.markedSpans[i]; - if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to && - (sp.to == null || sp.to != span.from) && - (sp.marker.inclusiveLeft || span.marker.inclusiveRight) && - lineIsHiddenInner(doc, line, sp)) { return true } - } - } - - // Find the height above the given line. - function heightAtLine(lineObj) { - lineObj = visualLine(lineObj); - - var h = 0, chunk = lineObj.parent; - for (var i = 0; i < chunk.lines.length; ++i) { - var line = chunk.lines[i]; - if (line == lineObj) { break } - else { h += line.height; } - } - for (var p = chunk.parent; p; chunk = p, p = chunk.parent) { - for (var i$1 = 0; i$1 < p.children.length; ++i$1) { - var cur = p.children[i$1]; - if (cur == chunk) { break } - else { h += cur.height; } - } - } - return h - } - - // Compute the character length of a line, taking into account - // collapsed ranges (see markText) that might hide parts, and join - // other lines onto it. - function lineLength(line) { - if (line.height == 0) { return 0 } - var len = line.text.length, merged, cur = line; - while (merged = collapsedSpanAtStart(cur)) { - var found = merged.find(0, true); - cur = found.from.line; - len += found.from.ch - found.to.ch; - } - cur = line; - while (merged = collapsedSpanAtEnd(cur)) { - var found$1 = merged.find(0, true); - len -= cur.text.length - found$1.from.ch; - cur = found$1.to.line; - len += cur.text.length - found$1.to.ch; - } - return len - } - - // Find the longest line in the document. - function findMaxLine(cm) { - var d = cm.display, doc = cm.doc; - d.maxLine = getLine(doc, doc.first); - d.maxLineLength = lineLength(d.maxLine); - d.maxLineChanged = true; - doc.iter(function (line) { - var len = lineLength(line); - if (len > d.maxLineLength) { - d.maxLineLength = len; - d.maxLine = line; - } - }); - } - - // BIDI HELPERS - - function iterateBidiSections(order, from, to, f) { - if (!order) { return f(from, to, "ltr", 0) } - var found = false; - for (var i = 0; i < order.length; ++i) { - var part = order[i]; - if (part.from < to && part.to > from || from == to && part.to == from) { - f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr", i); - found = true; - } - } - if (!found) { f(from, to, "ltr"); } - } - - var bidiOther = null; - function getBidiPartAt(order, ch, sticky) { - var found; - bidiOther = null; - for (var i = 0; i < order.length; ++i) { - var cur = order[i]; - if (cur.from < ch && cur.to > ch) { return i } - if (cur.to == ch) { - if (cur.from != cur.to && sticky == "before") { found = i; } - else { bidiOther = i; } - } - if (cur.from == ch) { - if (cur.from != cur.to && sticky != "before") { found = i; } - else { bidiOther = i; } - } - } - return found != null ? found : bidiOther - } - - // Bidirectional ordering algorithm - // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm - // that this (partially) implements. - - // One-char codes used for character types: - // L (L): Left-to-Right - // R (R): Right-to-Left - // r (AL): Right-to-Left Arabic - // 1 (EN): European Number - // + (ES): European Number Separator - // % (ET): European Number Terminator - // n (AN): Arabic Number - // , (CS): Common Number Separator - // m (NSM): Non-Spacing Mark - // b (BN): Boundary Neutral - // s (B): Paragraph Separator - // t (S): Segment Separator - // w (WS): Whitespace - // N (ON): Other Neutrals - - // Returns null if characters are ordered as they appear - // (left-to-right), or an array of sections ({from, to, level} - // objects) in the order in which they occur visually. - var bidiOrdering = (function() { - // Character types for codepoints 0 to 0xff - var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN"; - // Character types for codepoints 0x600 to 0x6f9 - var arabicTypes = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111"; - function charType(code) { - if (code <= 0xf7) { return lowTypes.charAt(code) } - else if (0x590 <= code && code <= 0x5f4) { return "R" } - else if (0x600 <= code && code <= 0x6f9) { return arabicTypes.charAt(code - 0x600) } - else if (0x6ee <= code && code <= 0x8ac) { return "r" } - else if (0x2000 <= code && code <= 0x200b) { return "w" } - else if (code == 0x200c) { return "b" } - else { return "L" } - } - - var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/; - var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/; - - function BidiSpan(level, from, to) { - this.level = level; - this.from = from; this.to = to; - } - - return function(str, direction) { - var outerType = direction == "ltr" ? "L" : "R"; - - if (str.length == 0 || direction == "ltr" && !bidiRE.test(str)) { return false } - var len = str.length, types = []; - for (var i = 0; i < len; ++i) - { types.push(charType(str.charCodeAt(i))); } - - // W1. Examine each non-spacing mark (NSM) in the level run, and - // change the type of the NSM to the type of the previous - // character. If the NSM is at the start of the level run, it will - // get the type of sor. - for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) { - var type = types[i$1]; - if (type == "m") { types[i$1] = prev; } - else { prev = type; } - } - - // W2. Search backwards from each instance of a European number - // until the first strong type (R, L, AL, or sor) is found. If an - // AL is found, change the type of the European number to Arabic - // number. - // W3. Change all ALs to R. - for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) { - var type$1 = types[i$2]; - if (type$1 == "1" && cur == "r") { types[i$2] = "n"; } - else if (isStrong.test(type$1)) { cur = type$1; if (type$1 == "r") { types[i$2] = "R"; } } - } - - // W4. A single European separator between two European numbers - // changes to a European number. A single common separator between - // two numbers of the same type changes to that type. - for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) { - var type$2 = types[i$3]; - if (type$2 == "+" && prev$1 == "1" && types[i$3+1] == "1") { types[i$3] = "1"; } - else if (type$2 == "," && prev$1 == types[i$3+1] && - (prev$1 == "1" || prev$1 == "n")) { types[i$3] = prev$1; } - prev$1 = type$2; - } - - // W5. A sequence of European terminators adjacent to European - // numbers changes to all European numbers. - // W6. Otherwise, separators and terminators change to Other - // Neutral. - for (var i$4 = 0; i$4 < len; ++i$4) { - var type$3 = types[i$4]; - if (type$3 == ",") { types[i$4] = "N"; } - else if (type$3 == "%") { - var end = (void 0); - for (end = i$4 + 1; end < len && types[end] == "%"; ++end) {} - var replace = (i$4 && types[i$4-1] == "!") || (end < len && types[end] == "1") ? "1" : "N"; - for (var j = i$4; j < end; ++j) { types[j] = replace; } - i$4 = end - 1; - } - } - - // W7. Search backwards from each instance of a European number - // until the first strong type (R, L, or sor) is found. If an L is - // found, then change the type of the European number to L. - for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) { - var type$4 = types[i$5]; - if (cur$1 == "L" && type$4 == "1") { types[i$5] = "L"; } - else if (isStrong.test(type$4)) { cur$1 = type$4; } - } - - // N1. A sequence of neutrals takes the direction of the - // surrounding strong text if the text on both sides has the same - // direction. European and Arabic numbers act as if they were R in - // terms of their influence on neutrals. Start-of-level-run (sor) - // and end-of-level-run (eor) are used at level run boundaries. - // N2. Any remaining neutrals take the embedding direction. - for (var i$6 = 0; i$6 < len; ++i$6) { - if (isNeutral.test(types[i$6])) { - var end$1 = (void 0); - for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {} - var before = (i$6 ? types[i$6-1] : outerType) == "L"; - var after = (end$1 < len ? types[end$1] : outerType) == "L"; - var replace$1 = before == after ? (before ? "L" : "R") : outerType; - for (var j$1 = i$6; j$1 < end$1; ++j$1) { types[j$1] = replace$1; } - i$6 = end$1 - 1; - } - } - - // Here we depart from the documented algorithm, in order to avoid - // building up an actual levels array. Since there are only three - // levels (0, 1, 2) in an implementation that doesn't take - // explicit embedding into account, we can build up the order on - // the fly, without following the level-based algorithm. - var order = [], m; - for (var i$7 = 0; i$7 < len;) { - if (countsAsLeft.test(types[i$7])) { - var start = i$7; - for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {} - order.push(new BidiSpan(0, start, i$7)); - } else { - var pos = i$7, at = order.length; - for (++i$7; i$7 < len && types[i$7] != "L"; ++i$7) {} - for (var j$2 = pos; j$2 < i$7;) { - if (countsAsNum.test(types[j$2])) { - if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); } - var nstart = j$2; - for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {} - order.splice(at, 0, new BidiSpan(2, nstart, j$2)); - pos = j$2; - } else { ++j$2; } - } - if (pos < i$7) { order.splice(at, 0, new BidiSpan(1, pos, i$7)); } - } - } - if (direction == "ltr") { - if (order[0].level == 1 && (m = str.match(/^\s+/))) { - order[0].from = m[0].length; - order.unshift(new BidiSpan(0, 0, m[0].length)); - } - if (lst(order).level == 1 && (m = str.match(/\s+$/))) { - lst(order).to -= m[0].length; - order.push(new BidiSpan(0, len - m[0].length, len)); - } - } - - return direction == "rtl" ? order.reverse() : order - } - })(); - - // Get the bidi ordering for the given line (and cache it). Returns - // false for lines that are fully left-to-right, and an array of - // BidiSpan objects otherwise. - function getOrder(line, direction) { - var order = line.order; - if (order == null) { order = line.order = bidiOrdering(line.text, direction); } - return order - } - - // EVENT HANDLING - - // Lightweight event framework. on/off also work on DOM nodes, - // registering native DOM handlers. - - var noHandlers = []; - - var on = function(emitter, type, f) { - if (emitter.addEventListener) { - emitter.addEventListener(type, f, false); - } else if (emitter.attachEvent) { - emitter.attachEvent("on" + type, f); - } else { - var map$$1 = emitter._handlers || (emitter._handlers = {}); - map$$1[type] = (map$$1[type] || noHandlers).concat(f); - } - }; - - function getHandlers(emitter, type) { - return emitter._handlers && emitter._handlers[type] || noHandlers - } - - function off(emitter, type, f) { - if (emitter.removeEventListener) { - emitter.removeEventListener(type, f, false); - } else if (emitter.detachEvent) { - emitter.detachEvent("on" + type, f); - } else { - var map$$1 = emitter._handlers, arr = map$$1 && map$$1[type]; - if (arr) { - var index = indexOf(arr, f); - if (index > -1) - { map$$1[type] = arr.slice(0, index).concat(arr.slice(index + 1)); } - } - } - } - - function signal(emitter, type /*, values...*/) { - var handlers = getHandlers(emitter, type); - if (!handlers.length) { return } - var args = Array.prototype.slice.call(arguments, 2); - for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args); } - } - - // The DOM events that CodeMirror handles can be overridden by - // registering a (non-DOM) handler on the editor for the event name, - // and preventDefault-ing the event in that handler. - function signalDOMEvent(cm, e, override) { - if (typeof e == "string") - { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; } - signal(cm, override || e.type, cm, e); - return e_defaultPrevented(e) || e.codemirrorIgnore - } - - function signalCursorActivity(cm) { - var arr = cm._handlers && cm._handlers.cursorActivity; - if (!arr) { return } - var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []); - for (var i = 0; i < arr.length; ++i) { if (indexOf(set, arr[i]) == -1) - { set.push(arr[i]); } } - } - - function hasHandler(emitter, type) { - return getHandlers(emitter, type).length > 0 - } - - // Add on and off methods to a constructor's prototype, to make - // registering events on such objects more convenient. - function eventMixin(ctor) { - ctor.prototype.on = function(type, f) {on(this, type, f);}; - ctor.prototype.off = function(type, f) {off(this, type, f);}; - } - - // Due to the fact that we still support jurassic IE versions, some - // compatibility wrappers are needed. - - function e_preventDefault(e) { - if (e.preventDefault) { e.preventDefault(); } - else { e.returnValue = false; } - } - function e_stopPropagation(e) { - if (e.stopPropagation) { e.stopPropagation(); } - else { e.cancelBubble = true; } - } - function e_defaultPrevented(e) { - return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false - } - function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);} - - function e_target(e) {return e.target || e.srcElement} - function e_button(e) { - var b = e.which; - if (b == null) { - if (e.button & 1) { b = 1; } - else if (e.button & 2) { b = 3; } - else if (e.button & 4) { b = 2; } - } - if (mac && e.ctrlKey && b == 1) { b = 3; } - return b - } - - // Detect drag-and-drop - var dragAndDrop = function() { - // There is *some* kind of drag-and-drop support in IE6-8, but I - // couldn't get it to work yet. - if (ie && ie_version < 9) { return false } - var div = elt('div'); - return "draggable" in div || "dragDrop" in div - }(); - - var zwspSupported; - function zeroWidthElement(measure) { - if (zwspSupported == null) { - var test = elt("span", "\u200b"); - removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")])); - if (measure.firstChild.offsetHeight != 0) - { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); } - } - var node = zwspSupported ? elt("span", "\u200b") : - elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px"); - node.setAttribute("cm-text", ""); - return node - } - - // Feature-detect IE's crummy client rect reporting for bidi text - var badBidiRects; - function hasBadBidiRects(measure) { - if (badBidiRects != null) { return badBidiRects } - var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA")); - var r0 = range(txt, 0, 1).getBoundingClientRect(); - var r1 = range(txt, 1, 2).getBoundingClientRect(); - removeChildren(measure); - if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780) - return badBidiRects = (r1.right - r0.right < 3) - } - - // See if "".split is the broken IE version, if so, provide an - // alternative way to split lines. - var splitLinesAuto = "\n\nb".split(/\n/).length != 3 ? function (string) { - var pos = 0, result = [], l = string.length; - while (pos <= l) { - var nl = string.indexOf("\n", pos); - if (nl == -1) { nl = string.length; } - var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl); - var rt = line.indexOf("\r"); - if (rt != -1) { - result.push(line.slice(0, rt)); - pos += rt + 1; - } else { - result.push(line); - pos = nl + 1; - } - } - return result - } : function (string) { return string.split(/\r\n?|\n/); }; - - var hasSelection = window.getSelection ? function (te) { - try { return te.selectionStart != te.selectionEnd } - catch(e) { return false } - } : function (te) { - var range$$1; - try {range$$1 = te.ownerDocument.selection.createRange();} - catch(e) {} - if (!range$$1 || range$$1.parentElement() != te) { return false } - return range$$1.compareEndPoints("StartToEnd", range$$1) != 0 - }; - - var hasCopyEvent = (function () { - var e = elt("div"); - if ("oncopy" in e) { return true } - e.setAttribute("oncopy", "return;"); - return typeof e.oncopy == "function" - })(); - - var badZoomedRects = null; - function hasBadZoomedRects(measure) { - if (badZoomedRects != null) { return badZoomedRects } - var node = removeChildrenAndAdd(measure, elt("span", "x")); - var normal = node.getBoundingClientRect(); - var fromRange = range(node, 0, 1).getBoundingClientRect(); - return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1 - } - - // Known modes, by name and by MIME - var modes = {}, mimeModes = {}; - - // Extra arguments are stored as the mode's dependencies, which is - // used by (legacy) mechanisms like loadmode.js to automatically - // load a mode. (Preferred mechanism is the require/define calls.) - function defineMode(name, mode) { - if (arguments.length > 2) - { mode.dependencies = Array.prototype.slice.call(arguments, 2); } - modes[name] = mode; - } - - function defineMIME(mime, spec) { - mimeModes[mime] = spec; - } - - // Given a MIME type, a {name, ...options} config object, or a name - // string, return a mode config object. - function resolveMode(spec) { - if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) { - spec = mimeModes[spec]; - } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) { - var found = mimeModes[spec.name]; - if (typeof found == "string") { found = {name: found}; } - spec = createObj(found, spec); - spec.name = found.name; - } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) { - return resolveMode("application/xml") - } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(spec)) { - return resolveMode("application/json") - } - if (typeof spec == "string") { return {name: spec} } - else { return spec || {name: "null"} } - } - - // Given a mode spec (anything that resolveMode accepts), find and - // initialize an actual mode object. - function getMode(options, spec) { - spec = resolveMode(spec); - var mfactory = modes[spec.name]; - if (!mfactory) { return getMode(options, "text/plain") } - var modeObj = mfactory(options, spec); - if (modeExtensions.hasOwnProperty(spec.name)) { - var exts = modeExtensions[spec.name]; - for (var prop in exts) { - if (!exts.hasOwnProperty(prop)) { continue } - if (modeObj.hasOwnProperty(prop)) { modeObj["_" + prop] = modeObj[prop]; } - modeObj[prop] = exts[prop]; - } - } - modeObj.name = spec.name; - if (spec.helperType) { modeObj.helperType = spec.helperType; } - if (spec.modeProps) { for (var prop$1 in spec.modeProps) - { modeObj[prop$1] = spec.modeProps[prop$1]; } } - - return modeObj - } - - // This can be used to attach properties to mode objects from - // outside the actual mode definition. - var modeExtensions = {}; - function extendMode(mode, properties) { - var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {}); - copyObj(properties, exts); - } - - function copyState(mode, state) { - if (state === true) { return state } - if (mode.copyState) { return mode.copyState(state) } - var nstate = {}; - for (var n in state) { - var val = state[n]; - if (val instanceof Array) { val = val.concat([]); } - nstate[n] = val; - } - return nstate - } - - // Given a mode and a state (for that mode), find the inner mode and - // state at the position that the state refers to. - function innerMode(mode, state) { - var info; - while (mode.innerMode) { - info = mode.innerMode(state); - if (!info || info.mode == mode) { break } - state = info.state; - mode = info.mode; - } - return info || {mode: mode, state: state} - } - - function startState(mode, a1, a2) { - return mode.startState ? mode.startState(a1, a2) : true - } - - // STRING STREAM - - // Fed to the mode parsers, provides helper functions to make - // parsers more succinct. - - var StringStream = function(string, tabSize, lineOracle) { - this.pos = this.start = 0; - this.string = string; - this.tabSize = tabSize || 8; - this.lastColumnPos = this.lastColumnValue = 0; - this.lineStart = 0; - this.lineOracle = lineOracle; - }; - - StringStream.prototype.eol = function () {return this.pos >= this.string.length}; - StringStream.prototype.sol = function () {return this.pos == this.lineStart}; - StringStream.prototype.peek = function () {return this.string.charAt(this.pos) || undefined}; - StringStream.prototype.next = function () { - if (this.pos < this.string.length) - { return this.string.charAt(this.pos++) } - }; - StringStream.prototype.eat = function (match) { - var ch = this.string.charAt(this.pos); - var ok; - if (typeof match == "string") { ok = ch == match; } - else { ok = ch && (match.test ? match.test(ch) : match(ch)); } - if (ok) {++this.pos; return ch} - }; - StringStream.prototype.eatWhile = function (match) { - var start = this.pos; - while (this.eat(match)){} - return this.pos > start - }; - StringStream.prototype.eatSpace = function () { - var this$1 = this; - - var start = this.pos; - while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) { ++this$1.pos; } - return this.pos > start - }; - StringStream.prototype.skipToEnd = function () {this.pos = this.string.length;}; - StringStream.prototype.skipTo = function (ch) { - var found = this.string.indexOf(ch, this.pos); - if (found > -1) {this.pos = found; return true} - }; - StringStream.prototype.backUp = function (n) {this.pos -= n;}; - StringStream.prototype.column = function () { - if (this.lastColumnPos < this.start) { - this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue); - this.lastColumnPos = this.start; - } - return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0) - }; - StringStream.prototype.indentation = function () { - return countColumn(this.string, null, this.tabSize) - - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0) - }; - StringStream.prototype.match = function (pattern, consume, caseInsensitive) { - if (typeof pattern == "string") { - var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; }; - var substr = this.string.substr(this.pos, pattern.length); - if (cased(substr) == cased(pattern)) { - if (consume !== false) { this.pos += pattern.length; } - return true - } - } else { - var match = this.string.slice(this.pos).match(pattern); - if (match && match.index > 0) { return null } - if (match && consume !== false) { this.pos += match[0].length; } - return match - } - }; - StringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)}; - StringStream.prototype.hideFirstChars = function (n, inner) { - this.lineStart += n; - try { return inner() } - finally { this.lineStart -= n; } - }; - StringStream.prototype.lookAhead = function (n) { - var oracle = this.lineOracle; - return oracle && oracle.lookAhead(n) - }; - StringStream.prototype.baseToken = function () { - var oracle = this.lineOracle; - return oracle && oracle.baseToken(this.pos) - }; - - var SavedContext = function(state, lookAhead) { - this.state = state; - this.lookAhead = lookAhead; - }; - - var Context = function(doc, state, line, lookAhead) { - this.state = state; - this.doc = doc; - this.line = line; - this.maxLookAhead = lookAhead || 0; - this.baseTokens = null; - this.baseTokenPos = 1; - }; - - Context.prototype.lookAhead = function (n) { - var line = this.doc.getLine(this.line + n); - if (line != null && n > this.maxLookAhead) { this.maxLookAhead = n; } - return line - }; - - Context.prototype.baseToken = function (n) { - var this$1 = this; - - if (!this.baseTokens) { return null } - while (this.baseTokens[this.baseTokenPos] <= n) - { this$1.baseTokenPos += 2; } - var type = this.baseTokens[this.baseTokenPos + 1]; - return {type: type && type.replace(/( |^)overlay .*/, ""), - size: this.baseTokens[this.baseTokenPos] - n} - }; - - Context.prototype.nextLine = function () { - this.line++; - if (this.maxLookAhead > 0) { this.maxLookAhead--; } - }; - - Context.fromSaved = function (doc, saved, line) { - if (saved instanceof SavedContext) - { return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead) } - else - { return new Context(doc, copyState(doc.mode, saved), line) } - }; - - Context.prototype.save = function (copy) { - var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state; - return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state - }; - - - // Compute a style array (an array starting with a mode generation - // -- for invalidation -- followed by pairs of end positions and - // style strings), which is used to highlight the tokens on the - // line. - function highlightLine(cm, line, context, forceToEnd) { - // A styles array always starts with a number identifying the - // mode/overlays that it is based on (for easy invalidation). - var st = [cm.state.modeGen], lineClasses = {}; - // Compute the base array of styles - runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); }, - lineClasses, forceToEnd); - var state = context.state; - - // Run overlays, adjust style array. - var loop = function ( o ) { - context.baseTokens = st; - var overlay = cm.state.overlays[o], i = 1, at = 0; - context.state = true; - runMode(cm, line.text, overlay.mode, context, function (end, style) { - var start = i; - // Ensure there's a token end at the current position, and that i points at it - while (at < end) { - var i_end = st[i]; - if (i_end > end) - { st.splice(i, 1, end, st[i+1], i_end); } - i += 2; - at = Math.min(end, i_end); - } - if (!style) { return } - if (overlay.opaque) { - st.splice(start, i - start, end, "overlay " + style); - i = start + 2; - } else { - for (; start < i; start += 2) { - var cur = st[start+1]; - st[start+1] = (cur ? cur + " " : "") + "overlay " + style; - } - } - }, lineClasses); - context.state = state; - context.baseTokens = null; - context.baseTokenPos = 1; - }; - - for (var o = 0; o < cm.state.overlays.length; ++o) loop( o ); - - return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null} - } - - function getLineStyles(cm, line, updateFrontier) { - if (!line.styles || line.styles[0] != cm.state.modeGen) { - var context = getContextBefore(cm, lineNo(line)); - var resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state); - var result = highlightLine(cm, line, context); - if (resetState) { context.state = resetState; } - line.stateAfter = context.save(!resetState); - line.styles = result.styles; - if (result.classes) { line.styleClasses = result.classes; } - else if (line.styleClasses) { line.styleClasses = null; } - if (updateFrontier === cm.doc.highlightFrontier) - { cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier); } - } - return line.styles - } - - function getContextBefore(cm, n, precise) { - var doc = cm.doc, display = cm.display; - if (!doc.mode.startState) { return new Context(doc, true, n) } - var start = findStartLine(cm, n, precise); - var saved = start > doc.first && getLine(doc, start - 1).stateAfter; - var context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start); - - doc.iter(start, n, function (line) { - processLine(cm, line.text, context); - var pos = context.line; - line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null; - context.nextLine(); - }); - if (precise) { doc.modeFrontier = context.line; } - return context - } - - // Lightweight form of highlight -- proceed over this line and - // update state, but don't save a style array. Used for lines that - // aren't currently visible. - function processLine(cm, text, context, startAt) { - var mode = cm.doc.mode; - var stream = new StringStream(text, cm.options.tabSize, context); - stream.start = stream.pos = startAt || 0; - if (text == "") { callBlankLine(mode, context.state); } - while (!stream.eol()) { - readToken(mode, stream, context.state); - stream.start = stream.pos; - } - } - - function callBlankLine(mode, state) { - if (mode.blankLine) { return mode.blankLine(state) } - if (!mode.innerMode) { return } - var inner = innerMode(mode, state); - if (inner.mode.blankLine) { return inner.mode.blankLine(inner.state) } - } - - function readToken(mode, stream, state, inner) { - for (var i = 0; i < 10; i++) { - if (inner) { inner[0] = innerMode(mode, state).mode; } - var style = mode.token(stream, state); - if (stream.pos > stream.start) { return style } - } - throw new Error("Mode " + mode.name + " failed to advance stream.") - } - - var Token = function(stream, type, state) { - this.start = stream.start; this.end = stream.pos; - this.string = stream.current(); - this.type = type || null; - this.state = state; - }; - - // Utility for getTokenAt and getLineTokens - function takeToken(cm, pos, precise, asArray) { - var doc = cm.doc, mode = doc.mode, style; - pos = clipPos(doc, pos); - var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise); - var stream = new StringStream(line.text, cm.options.tabSize, context), tokens; - if (asArray) { tokens = []; } - while ((asArray || stream.pos < pos.ch) && !stream.eol()) { - stream.start = stream.pos; - style = readToken(mode, stream, context.state); - if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); } - } - return asArray ? tokens : new Token(stream, style, context.state) - } - - function extractLineClasses(type, output) { - if (type) { for (;;) { - var lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/); - if (!lineClass) { break } - type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length); - var prop = lineClass[1] ? "bgClass" : "textClass"; - if (output[prop] == null) - { output[prop] = lineClass[2]; } - else if (!(new RegExp("(?:^|\s)" + lineClass[2] + "(?:$|\s)")).test(output[prop])) - { output[prop] += " " + lineClass[2]; } - } } - return type - } - - // Run the given mode's parser over a line, calling f for each token. - function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) { - var flattenSpans = mode.flattenSpans; - if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; } - var curStart = 0, curStyle = null; - var stream = new StringStream(text, cm.options.tabSize, context), style; - var inner = cm.options.addModeClass && [null]; - if (text == "") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); } - while (!stream.eol()) { - if (stream.pos > cm.options.maxHighlightLength) { - flattenSpans = false; - if (forceToEnd) { processLine(cm, text, context, stream.pos); } - stream.pos = text.length; - style = null; - } else { - style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses); - } - if (inner) { - var mName = inner[0].name; - if (mName) { style = "m-" + (style ? mName + " " + style : mName); } - } - if (!flattenSpans || curStyle != style) { - while (curStart < stream.start) { - curStart = Math.min(stream.start, curStart + 5000); - f(curStart, curStyle); - } - curStyle = style; - } - stream.start = stream.pos; - } - while (curStart < stream.pos) { - // Webkit seems to refuse to render text nodes longer than 57444 - // characters, and returns inaccurate measurements in nodes - // starting around 5000 chars. - var pos = Math.min(stream.pos, curStart + 5000); - f(pos, curStyle); - curStart = pos; - } - } - - // Finds the line to start with when starting a parse. Tries to - // find a line with a stateAfter, so that it can start with a - // valid state. If that fails, it returns the line with the - // smallest indentation, which tends to need the least context to - // parse correctly. - function findStartLine(cm, n, precise) { - var minindent, minline, doc = cm.doc; - var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100); - for (var search = n; search > lim; --search) { - if (search <= doc.first) { return doc.first } - var line = getLine(doc, search - 1), after = line.stateAfter; - if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier)) - { return search } - var indented = countColumn(line.text, null, cm.options.tabSize); - if (minline == null || minindent > indented) { - minline = search - 1; - minindent = indented; - } - } - return minline - } - - function retreatFrontier(doc, n) { - doc.modeFrontier = Math.min(doc.modeFrontier, n); - if (doc.highlightFrontier < n - 10) { return } - var start = doc.first; - for (var line = n - 1; line > start; line--) { - var saved = getLine(doc, line).stateAfter; - // change is on 3 - // state on line 1 looked ahead 2 -- so saw 3 - // test 1 + 2 < 3 should cover this - if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) { - start = line + 1; - break - } - } - doc.highlightFrontier = Math.min(doc.highlightFrontier, start); - } - - // LINE DATA STRUCTURE - - // Line objects. These hold state related to a line, including - // highlighting info (the styles array). - var Line = function(text, markedSpans, estimateHeight) { - this.text = text; - attachMarkedSpans(this, markedSpans); - this.height = estimateHeight ? estimateHeight(this) : 1; - }; - - Line.prototype.lineNo = function () { return lineNo(this) }; - eventMixin(Line); - - // Change the content (text, markers) of a line. Automatically - // invalidates cached information and tries to re-estimate the - // line's height. - function updateLine(line, text, markedSpans, estimateHeight) { - line.text = text; - if (line.stateAfter) { line.stateAfter = null; } - if (line.styles) { line.styles = null; } - if (line.order != null) { line.order = null; } - detachMarkedSpans(line); - attachMarkedSpans(line, markedSpans); - var estHeight = estimateHeight ? estimateHeight(line) : 1; - if (estHeight != line.height) { updateLineHeight(line, estHeight); } - } - - // Detach a line from the document tree and its markers. - function cleanUpLine(line) { - line.parent = null; - detachMarkedSpans(line); - } - - // Convert a style as returned by a mode (either null, or a string - // containing one or more styles) to a CSS style. This is cached, - // and also looks for line-wide styles. - var styleToClassCache = {}, styleToClassCacheWithMode = {}; - function interpretTokenStyle(style, options) { - if (!style || /^\s*$/.test(style)) { return null } - var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache; - return cache[style] || - (cache[style] = style.replace(/\S+/g, "cm-$&")) - } - - // Render the DOM representation of the text of a line. Also builds - // up a 'line map', which points at the DOM nodes that represent - // specific stretches of text, and is used by the measuring code. - // The returned object contains the DOM node, this map, and - // information about line-wide styles that were set by the mode. - function buildLineContent(cm, lineView) { - // The padding-right forces the element to have a 'border', which - // is needed on Webkit to be able to get line-level bounding - // rectangles for it (in measureChar). - var content = eltP("span", null, null, webkit ? "padding-right: .1px" : null); - var builder = {pre: eltP("pre", [content], "CodeMirror-line"), content: content, - col: 0, pos: 0, cm: cm, - trailingSpace: false, - splitSpaces: cm.getOption("lineWrapping")}; - lineView.measure = {}; - - // Iterate over the logical lines that make up this visual line. - for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) { - var line = i ? lineView.rest[i - 1] : lineView.line, order = (void 0); - builder.pos = 0; - builder.addToken = buildToken; - // Optionally wire in some hacks into the token-rendering - // algorithm, to deal with browser quirks. - if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction))) - { builder.addToken = buildTokenBadBidi(builder.addToken, order); } - builder.map = []; - var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line); - insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate)); - if (line.styleClasses) { - if (line.styleClasses.bgClass) - { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || ""); } - if (line.styleClasses.textClass) - { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || ""); } - } - - // Ensure at least a single node is present, for measuring. - if (builder.map.length == 0) - { builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); } - - // Store the map and a cache object for the current logical line - if (i == 0) { - lineView.measure.map = builder.map; - lineView.measure.cache = {}; - } else { - (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map) - ;(lineView.measure.caches || (lineView.measure.caches = [])).push({}); - } - } - - // See issue #2901 - if (webkit) { - var last = builder.content.lastChild; - if (/\bcm-tab\b/.test(last.className) || (last.querySelector && last.querySelector(".cm-tab"))) - { builder.content.className = "cm-tab-wrap-hack"; } - } - - signal(cm, "renderLine", cm, lineView.line, builder.pre); - if (builder.pre.className) - { builder.textClass = joinClasses(builder.pre.className, builder.textClass || ""); } - - return builder - } - - function defaultSpecialCharPlaceholder(ch) { - var token = elt("span", "\u2022", "cm-invalidchar"); - token.title = "\\u" + ch.charCodeAt(0).toString(16); - token.setAttribute("aria-label", token.title); - return token - } - - // Build up the DOM representation for a single token, and add it to - // the line map. Takes care to render special characters separately. - function buildToken(builder, text, style, startStyle, endStyle, css, attributes) { - if (!text) { return } - var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text; - var special = builder.cm.state.specialChars, mustWrap = false; - var content; - if (!special.test(text)) { - builder.col += text.length; - content = document.createTextNode(displayText); - builder.map.push(builder.pos, builder.pos + text.length, content); - if (ie && ie_version < 9) { mustWrap = true; } - builder.pos += text.length; - } else { - content = document.createDocumentFragment(); - var pos = 0; - while (true) { - special.lastIndex = pos; - var m = special.exec(text); - var skipped = m ? m.index - pos : text.length - pos; - if (skipped) { - var txt = document.createTextNode(displayText.slice(pos, pos + skipped)); - if (ie && ie_version < 9) { content.appendChild(elt("span", [txt])); } - else { content.appendChild(txt); } - builder.map.push(builder.pos, builder.pos + skipped, txt); - builder.col += skipped; - builder.pos += skipped; - } - if (!m) { break } - pos += skipped + 1; - var txt$1 = (void 0); - if (m[0] == "\t") { - var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize; - txt$1 = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab")); - txt$1.setAttribute("role", "presentation"); - txt$1.setAttribute("cm-text", "\t"); - builder.col += tabWidth; - } else if (m[0] == "\r" || m[0] == "\n") { - txt$1 = content.appendChild(elt("span", m[0] == "\r" ? "\u240d" : "\u2424", "cm-invalidchar")); - txt$1.setAttribute("cm-text", m[0]); - builder.col += 1; - } else { - txt$1 = builder.cm.options.specialCharPlaceholder(m[0]); - txt$1.setAttribute("cm-text", m[0]); - if (ie && ie_version < 9) { content.appendChild(elt("span", [txt$1])); } - else { content.appendChild(txt$1); } - builder.col += 1; - } - builder.map.push(builder.pos, builder.pos + 1, txt$1); - builder.pos++; - } - } - builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32; - if (style || startStyle || endStyle || mustWrap || css) { - var fullStyle = style || ""; - if (startStyle) { fullStyle += startStyle; } - if (endStyle) { fullStyle += endStyle; } - var token = elt("span", [content], fullStyle, css); - if (attributes) { - for (var attr in attributes) { if (attributes.hasOwnProperty(attr) && attr != "style" && attr != "class") - { token.setAttribute(attr, attributes[attr]); } } - } - return builder.content.appendChild(token) - } - builder.content.appendChild(content); - } - - // Change some spaces to NBSP to prevent the browser from collapsing - // trailing spaces at the end of a line when rendering text (issue #1362). - function splitSpaces(text, trailingBefore) { - if (text.length > 1 && !/ /.test(text)) { return text } - var spaceBefore = trailingBefore, result = ""; - for (var i = 0; i < text.length; i++) { - var ch = text.charAt(i); - if (ch == " " && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32)) - { ch = "\u00a0"; } - result += ch; - spaceBefore = ch == " "; - } - return result - } - - // Work around nonsense dimensions being reported for stretches of - // right-to-left text. - function buildTokenBadBidi(inner, order) { - return function (builder, text, style, startStyle, endStyle, css, attributes) { - style = style ? style + " cm-force-border" : "cm-force-border"; - var start = builder.pos, end = start + text.length; - for (;;) { - // Find the part that overlaps with the start of this text - var part = (void 0); - for (var i = 0; i < order.length; i++) { - part = order[i]; - if (part.to > start && part.from <= start) { break } - } - if (part.to >= end) { return inner(builder, text, style, startStyle, endStyle, css, attributes) } - inner(builder, text.slice(0, part.to - start), style, startStyle, null, css, attributes); - startStyle = null; - text = text.slice(part.to - start); - start = part.to; - } - } - } - - function buildCollapsedSpan(builder, size, marker, ignoreWidget) { - var widget = !ignoreWidget && marker.widgetNode; - if (widget) { builder.map.push(builder.pos, builder.pos + size, widget); } - if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) { - if (!widget) - { widget = builder.content.appendChild(document.createElement("span")); } - widget.setAttribute("cm-marker", marker.id); - } - if (widget) { - builder.cm.display.input.setUneditable(widget); - builder.content.appendChild(widget); - } - builder.pos += size; - builder.trailingSpace = false; - } - - // Outputs a number of spans to make up a line, taking highlighting - // and marked text into account. - function insertLineContent(line, builder, styles) { - var spans = line.markedSpans, allText = line.text, at = 0; - if (!spans) { - for (var i$1 = 1; i$1 < styles.length; i$1+=2) - { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); } - return - } - - var len = allText.length, pos = 0, i = 1, text = "", style, css; - var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes; - for (;;) { - if (nextChange == pos) { // Update current marker set - spanStyle = spanEndStyle = spanStartStyle = css = ""; - attributes = null; - collapsed = null; nextChange = Infinity; - var foundBookmarks = [], endStyles = (void 0); - for (var j = 0; j < spans.length; ++j) { - var sp = spans[j], m = sp.marker; - if (m.type == "bookmark" && sp.from == pos && m.widgetNode) { - foundBookmarks.push(m); - } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) { - if (sp.to != null && sp.to != pos && nextChange > sp.to) { - nextChange = sp.to; - spanEndStyle = ""; - } - if (m.className) { spanStyle += " " + m.className; } - if (m.css) { css = (css ? css + ";" : "") + m.css; } - if (m.startStyle && sp.from == pos) { spanStartStyle += " " + m.startStyle; } - if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); } - // support for the old title property - // https://github.com/codemirror/CodeMirror/pull/5673 - if (m.title) { (attributes || (attributes = {})).title = m.title; } - if (m.attributes) { - for (var attr in m.attributes) - { (attributes || (attributes = {}))[attr] = m.attributes[attr]; } - } - if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0)) - { collapsed = sp; } - } else if (sp.from > pos && nextChange > sp.from) { - nextChange = sp.from; - } - } - if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2) - { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += " " + endStyles[j$1]; } } } - - if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2) - { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } } - if (collapsed && (collapsed.from || 0) == pos) { - buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos, - collapsed.marker, collapsed.from == null); - if (collapsed.to == null) { return } - if (collapsed.to == pos) { collapsed = false; } - } - } - if (pos >= len) { break } - - var upto = Math.min(len, nextChange); - while (true) { - if (text) { - var end = pos + text.length; - if (!collapsed) { - var tokenText = end > upto ? text.slice(0, upto - pos) : text; - builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle, - spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", css, attributes); - } - if (end >= upto) {text = text.slice(upto - pos); pos = upto; break} - pos = end; - spanStartStyle = ""; - } - text = allText.slice(at, at = styles[i++]); - style = interpretTokenStyle(styles[i++], builder.cm.options); - } - } - } - - - // These objects are used to represent the visible (currently drawn) - // part of the document. A LineView may correspond to multiple - // logical lines, if those are connected by collapsed ranges. - function LineView(doc, line, lineN) { - // The starting line - this.line = line; - // Continuing lines, if any - this.rest = visualLineContinued(line); - // Number of logical lines in this visual line - this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1; - this.node = this.text = null; - this.hidden = lineIsHidden(doc, line); - } - - // Create a range of LineView objects for the given lines. - function buildViewArray(cm, from, to) { - var array = [], nextPos; - for (var pos = from; pos < to; pos = nextPos) { - var view = new LineView(cm.doc, getLine(cm.doc, pos), pos); - nextPos = pos + view.size; - array.push(view); - } - return array - } - - var operationGroup = null; - - function pushOperation(op) { - if (operationGroup) { - operationGroup.ops.push(op); - } else { - op.ownsGroup = operationGroup = { - ops: [op], - delayedCallbacks: [] - }; - } - } - - function fireCallbacksForOps(group) { - // Calls delayed callbacks and cursorActivity handlers until no - // new ones appear - var callbacks = group.delayedCallbacks, i = 0; - do { - for (; i < callbacks.length; i++) - { callbacks[i].call(null); } - for (var j = 0; j < group.ops.length; j++) { - var op = group.ops[j]; - if (op.cursorActivityHandlers) - { while (op.cursorActivityCalled < op.cursorActivityHandlers.length) - { op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); } } - } - } while (i < callbacks.length) - } - - function finishOperation(op, endCb) { - var group = op.ownsGroup; - if (!group) { return } - - try { fireCallbacksForOps(group); } - finally { - operationGroup = null; - endCb(group); - } - } - - var orphanDelayedCallbacks = null; - - // Often, we want to signal events at a point where we are in the - // middle of some work, but don't want the handler to start calling - // other methods on the editor, which might be in an inconsistent - // state or simply not expect any other events to happen. - // signalLater looks whether there are any handlers, and schedules - // them to be executed when the last operation ends, or, if no - // operation is active, when a timeout fires. - function signalLater(emitter, type /*, values...*/) { - var arr = getHandlers(emitter, type); - if (!arr.length) { return } - var args = Array.prototype.slice.call(arguments, 2), list; - if (operationGroup) { - list = operationGroup.delayedCallbacks; - } else if (orphanDelayedCallbacks) { - list = orphanDelayedCallbacks; - } else { - list = orphanDelayedCallbacks = []; - setTimeout(fireOrphanDelayed, 0); - } - var loop = function ( i ) { - list.push(function () { return arr[i].apply(null, args); }); - }; - - for (var i = 0; i < arr.length; ++i) - loop( i ); - } - - function fireOrphanDelayed() { - var delayed = orphanDelayedCallbacks; - orphanDelayedCallbacks = null; - for (var i = 0; i < delayed.length; ++i) { delayed[i](); } - } - - // When an aspect of a line changes, a string is added to - // lineView.changes. This updates the relevant part of the line's - // DOM structure. - function updateLineForChanges(cm, lineView, lineN, dims) { - for (var j = 0; j < lineView.changes.length; j++) { - var type = lineView.changes[j]; - if (type == "text") { updateLineText(cm, lineView); } - else if (type == "gutter") { updateLineGutter(cm, lineView, lineN, dims); } - else if (type == "class") { updateLineClasses(cm, lineView); } - else if (type == "widget") { updateLineWidgets(cm, lineView, dims); } - } - lineView.changes = null; - } - - // Lines with gutter elements, widgets or a background class need to - // be wrapped, and have the extra elements added to the wrapper div - function ensureLineWrapped(lineView) { - if (lineView.node == lineView.text) { - lineView.node = elt("div", null, null, "position: relative"); - if (lineView.text.parentNode) - { lineView.text.parentNode.replaceChild(lineView.node, lineView.text); } - lineView.node.appendChild(lineView.text); - if (ie && ie_version < 8) { lineView.node.style.zIndex = 2; } - } - return lineView.node - } - - function updateLineBackground(cm, lineView) { - var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass; - if (cls) { cls += " CodeMirror-linebackground"; } - if (lineView.background) { - if (cls) { lineView.background.className = cls; } - else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; } - } else if (cls) { - var wrap = ensureLineWrapped(lineView); - lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild); - cm.display.input.setUneditable(lineView.background); - } - } - - // Wrapper around buildLineContent which will reuse the structure - // in display.externalMeasured when possible. - function getLineContent(cm, lineView) { - var ext = cm.display.externalMeasured; - if (ext && ext.line == lineView.line) { - cm.display.externalMeasured = null; - lineView.measure = ext.measure; - return ext.built - } - return buildLineContent(cm, lineView) - } - - // Redraw the line's text. Interacts with the background and text - // classes because the mode may output tokens that influence these - // classes. - function updateLineText(cm, lineView) { - var cls = lineView.text.className; - var built = getLineContent(cm, lineView); - if (lineView.text == lineView.node) { lineView.node = built.pre; } - lineView.text.parentNode.replaceChild(built.pre, lineView.text); - lineView.text = built.pre; - if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) { - lineView.bgClass = built.bgClass; - lineView.textClass = built.textClass; - updateLineClasses(cm, lineView); - } else if (cls) { - lineView.text.className = cls; - } - } - - function updateLineClasses(cm, lineView) { - updateLineBackground(cm, lineView); - if (lineView.line.wrapClass) - { ensureLineWrapped(lineView).className = lineView.line.wrapClass; } - else if (lineView.node != lineView.text) - { lineView.node.className = ""; } - var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass; - lineView.text.className = textClass || ""; - } - - function updateLineGutter(cm, lineView, lineN, dims) { - if (lineView.gutter) { - lineView.node.removeChild(lineView.gutter); - lineView.gutter = null; - } - if (lineView.gutterBackground) { - lineView.node.removeChild(lineView.gutterBackground); - lineView.gutterBackground = null; - } - if (lineView.line.gutterClass) { - var wrap = ensureLineWrapped(lineView); - lineView.gutterBackground = elt("div", null, "CodeMirror-gutter-background " + lineView.line.gutterClass, - ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px; width: " + (dims.gutterTotalWidth) + "px")); - cm.display.input.setUneditable(lineView.gutterBackground); - wrap.insertBefore(lineView.gutterBackground, lineView.text); - } - var markers = lineView.line.gutterMarkers; - if (cm.options.lineNumbers || markers) { - var wrap$1 = ensureLineWrapped(lineView); - var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px")); - cm.display.input.setUneditable(gutterWrap); - wrap$1.insertBefore(gutterWrap, lineView.text); - if (lineView.line.gutterClass) - { gutterWrap.className += " " + lineView.line.gutterClass; } - if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"])) - { lineView.lineNumber = gutterWrap.appendChild( - elt("div", lineNumberFor(cm.options, lineN), - "CodeMirror-linenumber CodeMirror-gutter-elt", - ("left: " + (dims.gutterLeft["CodeMirror-linenumbers"]) + "px; width: " + (cm.display.lineNumInnerWidth) + "px"))); } - if (markers) { for (var k = 0; k < cm.options.gutters.length; ++k) { - var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id]; - if (found) - { gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", - ("left: " + (dims.gutterLeft[id]) + "px; width: " + (dims.gutterWidth[id]) + "px"))); } - } } - } - } - - function updateLineWidgets(cm, lineView, dims) { - if (lineView.alignable) { lineView.alignable = null; } - for (var node = lineView.node.firstChild, next = (void 0); node; node = next) { - next = node.nextSibling; - if (node.className == "CodeMirror-linewidget") - { lineView.node.removeChild(node); } - } - insertLineWidgets(cm, lineView, dims); - } - - // Build a line's DOM representation from scratch - function buildLineElement(cm, lineView, lineN, dims) { - var built = getLineContent(cm, lineView); - lineView.text = lineView.node = built.pre; - if (built.bgClass) { lineView.bgClass = built.bgClass; } - if (built.textClass) { lineView.textClass = built.textClass; } - - updateLineClasses(cm, lineView); - updateLineGutter(cm, lineView, lineN, dims); - insertLineWidgets(cm, lineView, dims); - return lineView.node - } - - // A lineView may contain multiple logical lines (when merged by - // collapsed spans). The widgets for all of them need to be drawn. - function insertLineWidgets(cm, lineView, dims) { - insertLineWidgetsFor(cm, lineView.line, lineView, dims, true); - if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++) - { insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); } } - } - - function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) { - if (!line.widgets) { return } - var wrap = ensureLineWrapped(lineView); - for (var i = 0, ws = line.widgets; i < ws.length; ++i) { - var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget"); - if (!widget.handleMouseEvents) { node.setAttribute("cm-ignore-events", "true"); } - positionLineWidget(widget, node, lineView, dims); - cm.display.input.setUneditable(node); - if (allowAbove && widget.above) - { wrap.insertBefore(node, lineView.gutter || lineView.text); } - else - { wrap.appendChild(node); } - signalLater(widget, "redraw"); - } - } - - function positionLineWidget(widget, node, lineView, dims) { - if (widget.noHScroll) { - (lineView.alignable || (lineView.alignable = [])).push(node); - var width = dims.wrapperWidth; - node.style.left = dims.fixedPos + "px"; - if (!widget.coverGutter) { - width -= dims.gutterTotalWidth; - node.style.paddingLeft = dims.gutterTotalWidth + "px"; - } - node.style.width = width + "px"; - } - if (widget.coverGutter) { - node.style.zIndex = 5; - node.style.position = "relative"; - if (!widget.noHScroll) { node.style.marginLeft = -dims.gutterTotalWidth + "px"; } - } - } - - function widgetHeight(widget) { - if (widget.height != null) { return widget.height } - var cm = widget.doc.cm; - if (!cm) { return 0 } - if (!contains(document.body, widget.node)) { - var parentStyle = "position: relative;"; - if (widget.coverGutter) - { parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;"; } - if (widget.noHScroll) - { parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;"; } - removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle)); - } - return widget.height = widget.node.parentNode.offsetHeight - } - - // Return true when the given mouse event happened in a widget - function eventInWidget(display, e) { - for (var n = e_target(e); n != display.wrapper; n = n.parentNode) { - if (!n || (n.nodeType == 1 && n.getAttribute("cm-ignore-events") == "true") || - (n.parentNode == display.sizer && n != display.mover)) - { return true } - } - } - - // POSITION MEASUREMENT - - function paddingTop(display) {return display.lineSpace.offsetTop} - function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight} - function paddingH(display) { - if (display.cachedPaddingH) { return display.cachedPaddingH } - var e = removeChildrenAndAdd(display.measure, elt("pre", "x")); - var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle; - var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)}; - if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data; } - return data - } - - function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth } - function displayWidth(cm) { - return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth - } - function displayHeight(cm) { - return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight - } - - // Ensure the lineView.wrapping.heights array is populated. This is - // an array of bottom offsets for the lines that make up a drawn - // line. When lineWrapping is on, there might be more than one - // height. - function ensureLineHeights(cm, lineView, rect) { - var wrapping = cm.options.lineWrapping; - var curWidth = wrapping && displayWidth(cm); - if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) { - var heights = lineView.measure.heights = []; - if (wrapping) { - lineView.measure.width = curWidth; - var rects = lineView.text.firstChild.getClientRects(); - for (var i = 0; i < rects.length - 1; i++) { - var cur = rects[i], next = rects[i + 1]; - if (Math.abs(cur.bottom - next.bottom) > 2) - { heights.push((cur.bottom + next.top) / 2 - rect.top); } - } - } - heights.push(rect.bottom - rect.top); - } - } - - // Find a line map (mapping character offsets to text nodes) and a - // measurement cache for the given line number. (A line view might - // contain multiple lines when collapsed ranges are present.) - function mapFromLineView(lineView, line, lineN) { - if (lineView.line == line) - { return {map: lineView.measure.map, cache: lineView.measure.cache} } - for (var i = 0; i < lineView.rest.length; i++) - { if (lineView.rest[i] == line) - { return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]} } } - for (var i$1 = 0; i$1 < lineView.rest.length; i$1++) - { if (lineNo(lineView.rest[i$1]) > lineN) - { return {map: lineView.measure.maps[i$1], cache: lineView.measure.caches[i$1], before: true} } } - } - - // Render a line into the hidden node display.externalMeasured. Used - // when measurement is needed for a line that's not in the viewport. - function updateExternalMeasurement(cm, line) { - line = visualLine(line); - var lineN = lineNo(line); - var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN); - view.lineN = lineN; - var built = view.built = buildLineContent(cm, view); - view.text = built.pre; - removeChildrenAndAdd(cm.display.lineMeasure, built.pre); - return view - } - - // Get a {top, bottom, left, right} box (in line-local coordinates) - // for a given character. - function measureChar(cm, line, ch, bias) { - return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias) - } - - // Find a line view that corresponds to the given line number. - function findViewForLine(cm, lineN) { - if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo) - { return cm.display.view[findViewIndex(cm, lineN)] } - var ext = cm.display.externalMeasured; - if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size) - { return ext } - } - - // Measurement can be split in two steps, the set-up work that - // applies to the whole line, and the measurement of the actual - // character. Functions like coordsChar, that need to do a lot of - // measurements in a row, can thus ensure that the set-up work is - // only done once. - function prepareMeasureForLine(cm, line) { - var lineN = lineNo(line); - var view = findViewForLine(cm, lineN); - if (view && !view.text) { - view = null; - } else if (view && view.changes) { - updateLineForChanges(cm, view, lineN, getDimensions(cm)); - cm.curOp.forceUpdate = true; - } - if (!view) - { view = updateExternalMeasurement(cm, line); } - - var info = mapFromLineView(view, line, lineN); - return { - line: line, view: view, rect: null, - map: info.map, cache: info.cache, before: info.before, - hasHeights: false - } - } - - // Given a prepared measurement object, measures the position of an - // actual character (or fetches it from the cache). - function measureCharPrepared(cm, prepared, ch, bias, varHeight) { - if (prepared.before) { ch = -1; } - var key = ch + (bias || ""), found; - if (prepared.cache.hasOwnProperty(key)) { - found = prepared.cache[key]; - } else { - if (!prepared.rect) - { prepared.rect = prepared.view.text.getBoundingClientRect(); } - if (!prepared.hasHeights) { - ensureLineHeights(cm, prepared.view, prepared.rect); - prepared.hasHeights = true; - } - found = measureCharInner(cm, prepared, ch, bias); - if (!found.bogus) { prepared.cache[key] = found; } - } - return {left: found.left, right: found.right, - top: varHeight ? found.rtop : found.top, - bottom: varHeight ? found.rbottom : found.bottom} - } - - var nullRect = {left: 0, right: 0, top: 0, bottom: 0}; - - function nodeAndOffsetInLineMap(map$$1, ch, bias) { - var node, start, end, collapse, mStart, mEnd; - // First, search the line map for the text node corresponding to, - // or closest to, the target character. - for (var i = 0; i < map$$1.length; i += 3) { - mStart = map$$1[i]; - mEnd = map$$1[i + 1]; - if (ch < mStart) { - start = 0; end = 1; - collapse = "left"; - } else if (ch < mEnd) { - start = ch - mStart; - end = start + 1; - } else if (i == map$$1.length - 3 || ch == mEnd && map$$1[i + 3] > ch) { - end = mEnd - mStart; - start = end - 1; - if (ch >= mEnd) { collapse = "right"; } - } - if (start != null) { - node = map$$1[i + 2]; - if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right")) - { collapse = bias; } - if (bias == "left" && start == 0) - { while (i && map$$1[i - 2] == map$$1[i - 3] && map$$1[i - 1].insertLeft) { - node = map$$1[(i -= 3) + 2]; - collapse = "left"; - } } - if (bias == "right" && start == mEnd - mStart) - { while (i < map$$1.length - 3 && map$$1[i + 3] == map$$1[i + 4] && !map$$1[i + 5].insertLeft) { - node = map$$1[(i += 3) + 2]; - collapse = "right"; - } } - break - } - } - return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd} - } - - function getUsefulRect(rects, bias) { - var rect = nullRect; - if (bias == "left") { for (var i = 0; i < rects.length; i++) { - if ((rect = rects[i]).left != rect.right) { break } - } } else { for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) { - if ((rect = rects[i$1]).left != rect.right) { break } - } } - return rect - } - - function measureCharInner(cm, prepared, ch, bias) { - var place = nodeAndOffsetInLineMap(prepared.map, ch, bias); - var node = place.node, start = place.start, end = place.end, collapse = place.collapse; - - var rect; - if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates. - for (var i$1 = 0; i$1 < 4; i$1++) { // Retry a maximum of 4 times when nonsense rectangles are returned - while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) { --start; } - while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) { ++end; } - if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart) - { rect = node.parentNode.getBoundingClientRect(); } - else - { rect = getUsefulRect(range(node, start, end).getClientRects(), bias); } - if (rect.left || rect.right || start == 0) { break } - end = start; - start = start - 1; - collapse = "right"; - } - if (ie && ie_version < 11) { rect = maybeUpdateRectForZooming(cm.display.measure, rect); } - } else { // If it is a widget, simply get the box for the whole widget. - if (start > 0) { collapse = bias = "right"; } - var rects; - if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1) - { rect = rects[bias == "right" ? rects.length - 1 : 0]; } - else - { rect = node.getBoundingClientRect(); } - } - if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) { - var rSpan = node.parentNode.getClientRects()[0]; - if (rSpan) - { rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; } - else - { rect = nullRect; } - } - - var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top; - var mid = (rtop + rbot) / 2; - var heights = prepared.view.measure.heights; - var i = 0; - for (; i < heights.length - 1; i++) - { if (mid < heights[i]) { break } } - var top = i ? heights[i - 1] : 0, bot = heights[i]; - var result = {left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left, - right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left, - top: top, bottom: bot}; - if (!rect.left && !rect.right) { result.bogus = true; } - if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; } - - return result - } - - // Work around problem with bounding client rects on ranges being - // returned incorrectly when zoomed on IE10 and below. - function maybeUpdateRectForZooming(measure, rect) { - if (!window.screen || screen.logicalXDPI == null || - screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure)) - { return rect } - var scaleX = screen.logicalXDPI / screen.deviceXDPI; - var scaleY = screen.logicalYDPI / screen.deviceYDPI; - return {left: rect.left * scaleX, right: rect.right * scaleX, - top: rect.top * scaleY, bottom: rect.bottom * scaleY} - } - - function clearLineMeasurementCacheFor(lineView) { - if (lineView.measure) { - lineView.measure.cache = {}; - lineView.measure.heights = null; - if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++) - { lineView.measure.caches[i] = {}; } } - } - } - - function clearLineMeasurementCache(cm) { - cm.display.externalMeasure = null; - removeChildren(cm.display.lineMeasure); - for (var i = 0; i < cm.display.view.length; i++) - { clearLineMeasurementCacheFor(cm.display.view[i]); } - } - - function clearCaches(cm) { - clearLineMeasurementCache(cm); - cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null; - if (!cm.options.lineWrapping) { cm.display.maxLineChanged = true; } - cm.display.lineNumChars = null; - } - - function pageScrollX() { - // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206 - // which causes page_Offset and bounding client rects to use - // different reference viewports and invalidate our calculations. - if (chrome && android) { return -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft)) } - return window.pageXOffset || (document.documentElement || document.body).scrollLeft - } - function pageScrollY() { - if (chrome && android) { return -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop)) } - return window.pageYOffset || (document.documentElement || document.body).scrollTop - } - - function widgetTopHeight(lineObj) { - var height = 0; - if (lineObj.widgets) { for (var i = 0; i < lineObj.widgets.length; ++i) { if (lineObj.widgets[i].above) - { height += widgetHeight(lineObj.widgets[i]); } } } - return height - } - - // Converts a {top, bottom, left, right} box from line-local - // coordinates into another coordinate system. Context may be one of - // "line", "div" (display.lineDiv), "local"./null (editor), "window", - // or "page". - function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) { - if (!includeWidgets) { - var height = widgetTopHeight(lineObj); - rect.top += height; rect.bottom += height; - } - if (context == "line") { return rect } - if (!context) { context = "local"; } - var yOff = heightAtLine(lineObj); - if (context == "local") { yOff += paddingTop(cm.display); } - else { yOff -= cm.display.viewOffset; } - if (context == "page" || context == "window") { - var lOff = cm.display.lineSpace.getBoundingClientRect(); - yOff += lOff.top + (context == "window" ? 0 : pageScrollY()); - var xOff = lOff.left + (context == "window" ? 0 : pageScrollX()); - rect.left += xOff; rect.right += xOff; - } - rect.top += yOff; rect.bottom += yOff; - return rect - } - - // Coverts a box from "div" coords to another coordinate system. - // Context may be "window", "page", "div", or "local"./null. - function fromCoordSystem(cm, coords, context) { - if (context == "div") { return coords } - var left = coords.left, top = coords.top; - // First move into "page" coordinate system - if (context == "page") { - left -= pageScrollX(); - top -= pageScrollY(); - } else if (context == "local" || !context) { - var localBox = cm.display.sizer.getBoundingClientRect(); - left += localBox.left; - top += localBox.top; - } - - var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect(); - return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top} - } - - function charCoords(cm, pos, context, lineObj, bias) { - if (!lineObj) { lineObj = getLine(cm.doc, pos.line); } - return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context) - } - - // Returns a box for a given cursor position, which may have an - // 'other' property containing the position of the secondary cursor - // on a bidi boundary. - // A cursor Pos(line, char, "before") is on the same visual line as `char - 1` - // and after `char - 1` in writing order of `char - 1` - // A cursor Pos(line, char, "after") is on the same visual line as `char` - // and before `char` in writing order of `char` - // Examples (upper-case letters are RTL, lower-case are LTR): - // Pos(0, 1, ...) - // before after - // ab a|b a|b - // aB a|B aB| - // Ab |Ab A|b - // AB B|A B|A - // Every position after the last character on a line is considered to stick - // to the last character on the line. - function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) { - lineObj = lineObj || getLine(cm.doc, pos.line); - if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); } - function get(ch, right) { - var m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight); - if (right) { m.left = m.right; } else { m.right = m.left; } - return intoCoordSystem(cm, lineObj, m, context) - } - var order = getOrder(lineObj, cm.doc.direction), ch = pos.ch, sticky = pos.sticky; - if (ch >= lineObj.text.length) { - ch = lineObj.text.length; - sticky = "before"; - } else if (ch <= 0) { - ch = 0; - sticky = "after"; - } - if (!order) { return get(sticky == "before" ? ch - 1 : ch, sticky == "before") } - - function getBidi(ch, partPos, invert) { - var part = order[partPos], right = part.level == 1; - return get(invert ? ch - 1 : ch, right != invert) - } - var partPos = getBidiPartAt(order, ch, sticky); - var other = bidiOther; - var val = getBidi(ch, partPos, sticky == "before"); - if (other != null) { val.other = getBidi(ch, other, sticky != "before"); } - return val - } - - // Used to cheaply estimate the coordinates for a position. Used for - // intermediate scroll updates. - function estimateCoords(cm, pos) { - var left = 0; - pos = clipPos(cm.doc, pos); - if (!cm.options.lineWrapping) { left = charWidth(cm.display) * pos.ch; } - var lineObj = getLine(cm.doc, pos.line); - var top = heightAtLine(lineObj) + paddingTop(cm.display); - return {left: left, right: left, top: top, bottom: top + lineObj.height} - } - - // Positions returned by coordsChar contain some extra information. - // xRel is the relative x position of the input coordinates compared - // to the found position (so xRel > 0 means the coordinates are to - // the right of the character position, for example). When outside - // is true, that means the coordinates lie outside the line's - // vertical range. - function PosWithInfo(line, ch, sticky, outside, xRel) { - var pos = Pos(line, ch, sticky); - pos.xRel = xRel; - if (outside) { pos.outside = true; } - return pos - } - - // Compute the character position closest to the given coordinates. - // Input must be lineSpace-local ("div" coordinate system). - function coordsChar(cm, x, y) { - var doc = cm.doc; - y += cm.display.viewOffset; - if (y < 0) { return PosWithInfo(doc.first, 0, null, true, -1) } - var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1; - if (lineN > last) - { return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, true, 1) } - if (x < 0) { x = 0; } - - var lineObj = getLine(doc, lineN); - for (;;) { - var found = coordsCharInner(cm, lineObj, lineN, x, y); - var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 ? 1 : 0)); - if (!collapsed) { return found } - var rangeEnd = collapsed.find(1); - if (rangeEnd.line == lineN) { return rangeEnd } - lineObj = getLine(doc, lineN = rangeEnd.line); - } - } - - function wrappedLineExtent(cm, lineObj, preparedMeasure, y) { - y -= widgetTopHeight(lineObj); - var end = lineObj.text.length; - var begin = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y; }, end, 0); - end = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch).top > y; }, begin, end); - return {begin: begin, end: end} - } - - function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) { - if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); } - var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), "line").top; - return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop) - } - - // Returns true if the given side of a box is after the given - // coordinates, in top-to-bottom, left-to-right order. - function boxIsAfter(box, x, y, left) { - return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x - } - - function coordsCharInner(cm, lineObj, lineNo$$1, x, y) { - // Move y into line-local coordinate space - y -= heightAtLine(lineObj); - var preparedMeasure = prepareMeasureForLine(cm, lineObj); - // When directly calling `measureCharPrepared`, we have to adjust - // for the widgets at this line. - var widgetHeight$$1 = widgetTopHeight(lineObj); - var begin = 0, end = lineObj.text.length, ltr = true; - - var order = getOrder(lineObj, cm.doc.direction); - // If the line isn't plain left-to-right text, first figure out - // which bidi section the coordinates fall into. - if (order) { - var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart) - (cm, lineObj, lineNo$$1, preparedMeasure, order, x, y); - ltr = part.level != 1; - // The awkward -1 offsets are needed because findFirst (called - // on these below) will treat its first bound as inclusive, - // second as exclusive, but we want to actually address the - // characters in the part's range - begin = ltr ? part.from : part.to - 1; - end = ltr ? part.to : part.from - 1; - } - - // A binary search to find the first character whose bounding box - // starts after the coordinates. If we run across any whose box wrap - // the coordinates, store that. - var chAround = null, boxAround = null; - var ch = findFirst(function (ch) { - var box = measureCharPrepared(cm, preparedMeasure, ch); - box.top += widgetHeight$$1; box.bottom += widgetHeight$$1; - if (!boxIsAfter(box, x, y, false)) { return false } - if (box.top <= y && box.left <= x) { - chAround = ch; - boxAround = box; - } - return true - }, begin, end); - - var baseX, sticky, outside = false; - // If a box around the coordinates was found, use that - if (boxAround) { - // Distinguish coordinates nearer to the left or right side of the box - var atLeft = x - boxAround.left < boxAround.right - x, atStart = atLeft == ltr; - ch = chAround + (atStart ? 0 : 1); - sticky = atStart ? "after" : "before"; - baseX = atLeft ? boxAround.left : boxAround.right; - } else { - // (Adjust for extended bound, if necessary.) - if (!ltr && (ch == end || ch == begin)) { ch++; } - // To determine which side to associate with, get the box to the - // left of the character and compare it's vertical position to the - // coordinates - sticky = ch == 0 ? "after" : ch == lineObj.text.length ? "before" : - (measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight$$1 <= y) == ltr ? - "after" : "before"; - // Now get accurate coordinates for this place, in order to get a - // base X position - var coords = cursorCoords(cm, Pos(lineNo$$1, ch, sticky), "line", lineObj, preparedMeasure); - baseX = coords.left; - outside = y < coords.top || y >= coords.bottom; - } - - ch = skipExtendingChars(lineObj.text, ch, 1); - return PosWithInfo(lineNo$$1, ch, sticky, outside, x - baseX) - } - - function coordsBidiPart(cm, lineObj, lineNo$$1, preparedMeasure, order, x, y) { - // Bidi parts are sorted left-to-right, and in a non-line-wrapping - // situation, we can take this ordering to correspond to the visual - // ordering. This finds the first part whose end is after the given - // coordinates. - var index = findFirst(function (i) { - var part = order[i], ltr = part.level != 1; - return boxIsAfter(cursorCoords(cm, Pos(lineNo$$1, ltr ? part.to : part.from, ltr ? "before" : "after"), - "line", lineObj, preparedMeasure), x, y, true) - }, 0, order.length - 1); - var part = order[index]; - // If this isn't the first part, the part's start is also after - // the coordinates, and the coordinates aren't on the same line as - // that start, move one part back. - if (index > 0) { - var ltr = part.level != 1; - var start = cursorCoords(cm, Pos(lineNo$$1, ltr ? part.from : part.to, ltr ? "after" : "before"), - "line", lineObj, preparedMeasure); - if (boxIsAfter(start, x, y, true) && start.top > y) - { part = order[index - 1]; } - } - return part - } - - function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) { - // In a wrapped line, rtl text on wrapping boundaries can do things - // that don't correspond to the ordering in our `order` array at - // all, so a binary search doesn't work, and we want to return a - // part that only spans one line so that the binary search in - // coordsCharInner is safe. As such, we first find the extent of the - // wrapped line, and then do a flat search in which we discard any - // spans that aren't on the line. - var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y); - var begin = ref.begin; - var end = ref.end; - if (/\s/.test(lineObj.text.charAt(end - 1))) { end--; } - var part = null, closestDist = null; - for (var i = 0; i < order.length; i++) { - var p = order[i]; - if (p.from >= end || p.to <= begin) { continue } - var ltr = p.level != 1; - var endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right; - // Weigh against spans ending before this, so that they are only - // picked if nothing ends after - var dist = endX < x ? x - endX + 1e9 : endX - x; - if (!part || closestDist > dist) { - part = p; - closestDist = dist; - } - } - if (!part) { part = order[order.length - 1]; } - // Clip the part to the wrapped line. - if (part.from < begin) { part = {from: begin, to: part.to, level: part.level}; } - if (part.to > end) { part = {from: part.from, to: end, level: part.level}; } - return part - } - - var measureText; - // Compute the default text height. - function textHeight(display) { - if (display.cachedTextHeight != null) { return display.cachedTextHeight } - if (measureText == null) { - measureText = elt("pre"); - // Measure a bunch of lines, for browsers that compute - // fractional heights. - for (var i = 0; i < 49; ++i) { - measureText.appendChild(document.createTextNode("x")); - measureText.appendChild(elt("br")); - } - measureText.appendChild(document.createTextNode("x")); - } - removeChildrenAndAdd(display.measure, measureText); - var height = measureText.offsetHeight / 50; - if (height > 3) { display.cachedTextHeight = height; } - removeChildren(display.measure); - return height || 1 - } - - // Compute the default character width. - function charWidth(display) { - if (display.cachedCharWidth != null) { return display.cachedCharWidth } - var anchor = elt("span", "xxxxxxxxxx"); - var pre = elt("pre", [anchor]); - removeChildrenAndAdd(display.measure, pre); - var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10; - if (width > 2) { display.cachedCharWidth = width; } - return width || 10 - } - - // Do a bulk-read of the DOM positions and sizes needed to draw the - // view, so that we don't interleave reading and writing to the DOM. - function getDimensions(cm) { - var d = cm.display, left = {}, width = {}; - var gutterLeft = d.gutters.clientLeft; - for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) { - left[cm.options.gutters[i]] = n.offsetLeft + n.clientLeft + gutterLeft; - width[cm.options.gutters[i]] = n.clientWidth; - } - return {fixedPos: compensateForHScroll(d), - gutterTotalWidth: d.gutters.offsetWidth, - gutterLeft: left, - gutterWidth: width, - wrapperWidth: d.wrapper.clientWidth} - } - - // Computes display.scroller.scrollLeft + display.gutters.offsetWidth, - // but using getBoundingClientRect to get a sub-pixel-accurate - // result. - function compensateForHScroll(display) { - return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left - } - - // Returns a function that estimates the height of a line, to use as - // first approximation until the line becomes visible (and is thus - // properly measurable). - function estimateHeight(cm) { - var th = textHeight(cm.display), wrapping = cm.options.lineWrapping; - var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3); - return function (line) { - if (lineIsHidden(cm.doc, line)) { return 0 } - - var widgetsHeight = 0; - if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) { - if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; } - } } - - if (wrapping) - { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th } - else - { return widgetsHeight + th } - } - } - - function estimateLineHeights(cm) { - var doc = cm.doc, est = estimateHeight(cm); - doc.iter(function (line) { - var estHeight = est(line); - if (estHeight != line.height) { updateLineHeight(line, estHeight); } - }); - } - - // Given a mouse event, find the corresponding position. If liberal - // is false, it checks whether a gutter or scrollbar was clicked, - // and returns null if it was. forRect is used by rectangular - // selections, and tries to estimate a character position even for - // coordinates beyond the right of the text. - function posFromMouse(cm, e, liberal, forRect) { - var display = cm.display; - if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") { return null } - - var x, y, space = display.lineSpace.getBoundingClientRect(); - // Fails unpredictably on IE[67] when mouse is dragged around quickly. - try { x = e.clientX - space.left; y = e.clientY - space.top; } - catch (e) { return null } - var coords = coordsChar(cm, x, y), line; - if (forRect && coords.xRel == 1 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) { - var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length; - coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff)); - } - return coords - } - - // Find the view element corresponding to a given line. Return null - // when the line isn't visible. - function findViewIndex(cm, n) { - if (n >= cm.display.viewTo) { return null } - n -= cm.display.viewFrom; - if (n < 0) { return null } - var view = cm.display.view; - for (var i = 0; i < view.length; i++) { - n -= view[i].size; - if (n < 0) { return i } - } - } - - function updateSelection(cm) { - cm.display.input.showSelection(cm.display.input.prepareSelection()); - } - - function prepareSelection(cm, primary) { - if ( primary === void 0 ) primary = true; - - var doc = cm.doc, result = {}; - var curFragment = result.cursors = document.createDocumentFragment(); - var selFragment = result.selection = document.createDocumentFragment(); - - for (var i = 0; i < doc.sel.ranges.length; i++) { - if (!primary && i == doc.sel.primIndex) { continue } - var range$$1 = doc.sel.ranges[i]; - if (range$$1.from().line >= cm.display.viewTo || range$$1.to().line < cm.display.viewFrom) { continue } - var collapsed = range$$1.empty(); - if (collapsed || cm.options.showCursorWhenSelecting) - { drawSelectionCursor(cm, range$$1.head, curFragment); } - if (!collapsed) - { drawSelectionRange(cm, range$$1, selFragment); } - } - return result - } - - // Draws a cursor for the given range - function drawSelectionCursor(cm, head, output) { - var pos = cursorCoords(cm, head, "div", null, null, !cm.options.singleCursorHeightPerLine); - - var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor")); - cursor.style.left = pos.left + "px"; - cursor.style.top = pos.top + "px"; - cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px"; - - if (pos.other) { - // Secondary cursor, shown when on a 'jump' in bi-directional text - var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor")); - otherCursor.style.display = ""; - otherCursor.style.left = pos.other.left + "px"; - otherCursor.style.top = pos.other.top + "px"; - otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px"; - } - } - - function cmpCoords(a, b) { return a.top - b.top || a.left - b.left } - - // Draws the given range as a highlighted selection - function drawSelectionRange(cm, range$$1, output) { - var display = cm.display, doc = cm.doc; - var fragment = document.createDocumentFragment(); - var padding = paddingH(cm.display), leftSide = padding.left; - var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right; - var docLTR = doc.direction == "ltr"; - - function add(left, top, width, bottom) { - if (top < 0) { top = 0; } - top = Math.round(top); - bottom = Math.round(bottom); - fragment.appendChild(elt("div", null, "CodeMirror-selected", ("position: absolute; left: " + left + "px;\n top: " + top + "px; width: " + (width == null ? rightSide - left : width) + "px;\n height: " + (bottom - top) + "px"))); - } - - function drawForLine(line, fromArg, toArg) { - var lineObj = getLine(doc, line); - var lineLen = lineObj.text.length; - var start, end; - function coords(ch, bias) { - return charCoords(cm, Pos(line, ch), "div", lineObj, bias) - } - - function wrapX(pos, dir, side) { - var extent = wrappedLineExtentChar(cm, lineObj, null, pos); - var prop = (dir == "ltr") == (side == "after") ? "left" : "right"; - var ch = side == "after" ? extent.begin : extent.end - (/\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1); - return coords(ch, prop)[prop] - } - - var order = getOrder(lineObj, doc.direction); - iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) { - var ltr = dir == "ltr"; - var fromPos = coords(from, ltr ? "left" : "right"); - var toPos = coords(to - 1, ltr ? "right" : "left"); - - var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen; - var first = i == 0, last = !order || i == order.length - 1; - if (toPos.top - fromPos.top <= 3) { // Single line - var openLeft = (docLTR ? openStart : openEnd) && first; - var openRight = (docLTR ? openEnd : openStart) && last; - var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left; - var right = openRight ? rightSide : (ltr ? toPos : fromPos).right; - add(left, fromPos.top, right - left, fromPos.bottom); - } else { // Multiple lines - var topLeft, topRight, botLeft, botRight; - if (ltr) { - topLeft = docLTR && openStart && first ? leftSide : fromPos.left; - topRight = docLTR ? rightSide : wrapX(from, dir, "before"); - botLeft = docLTR ? leftSide : wrapX(to, dir, "after"); - botRight = docLTR && openEnd && last ? rightSide : toPos.right; - } else { - topLeft = !docLTR ? leftSide : wrapX(from, dir, "before"); - topRight = !docLTR && openStart && first ? rightSide : fromPos.right; - botLeft = !docLTR && openEnd && last ? leftSide : toPos.left; - botRight = !docLTR ? rightSide : wrapX(to, dir, "after"); - } - add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom); - if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); } - add(botLeft, toPos.top, botRight - botLeft, toPos.bottom); - } - - if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; } - if (cmpCoords(toPos, start) < 0) { start = toPos; } - if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; } - if (cmpCoords(toPos, end) < 0) { end = toPos; } - }); - return {start: start, end: end} - } - - var sFrom = range$$1.from(), sTo = range$$1.to(); - if (sFrom.line == sTo.line) { - drawForLine(sFrom.line, sFrom.ch, sTo.ch); - } else { - var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line); - var singleVLine = visualLine(fromLine) == visualLine(toLine); - var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end; - var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start; - if (singleVLine) { - if (leftEnd.top < rightStart.top - 2) { - add(leftEnd.right, leftEnd.top, null, leftEnd.bottom); - add(leftSide, rightStart.top, rightStart.left, rightStart.bottom); - } else { - add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom); - } - } - if (leftEnd.bottom < rightStart.top) - { add(leftSide, leftEnd.bottom, null, rightStart.top); } - } - - output.appendChild(fragment); - } - - // Cursor-blinking - function restartBlink(cm) { - if (!cm.state.focused) { return } - var display = cm.display; - clearInterval(display.blinker); - var on = true; - display.cursorDiv.style.visibility = ""; - if (cm.options.cursorBlinkRate > 0) - { display.blinker = setInterval(function () { return display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden"; }, - cm.options.cursorBlinkRate); } - else if (cm.options.cursorBlinkRate < 0) - { display.cursorDiv.style.visibility = "hidden"; } - } - - function ensureFocus(cm) { - if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); } - } - - function delayBlurEvent(cm) { - cm.state.delayingBlurEvent = true; - setTimeout(function () { if (cm.state.delayingBlurEvent) { - cm.state.delayingBlurEvent = false; - onBlur(cm); - } }, 100); - } - - function onFocus(cm, e) { - if (cm.state.delayingBlurEvent) { cm.state.delayingBlurEvent = false; } - - if (cm.options.readOnly == "nocursor") { return } - if (!cm.state.focused) { - signal(cm, "focus", cm, e); - cm.state.focused = true; - addClass(cm.display.wrapper, "CodeMirror-focused"); - // This test prevents this from firing when a context - // menu is closed (since the input reset would kill the - // select-all detection hack) - if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) { - cm.display.input.reset(); - if (webkit) { setTimeout(function () { return cm.display.input.reset(true); }, 20); } // Issue #1730 - } - cm.display.input.receivedFocus(); - } - restartBlink(cm); - } - function onBlur(cm, e) { - if (cm.state.delayingBlurEvent) { return } - - if (cm.state.focused) { - signal(cm, "blur", cm, e); - cm.state.focused = false; - rmClass(cm.display.wrapper, "CodeMirror-focused"); - } - clearInterval(cm.display.blinker); - setTimeout(function () { if (!cm.state.focused) { cm.display.shift = false; } }, 150); - } - - // Read the actual heights of the rendered lines, and update their - // stored heights to match. - function updateHeightsInViewport(cm) { - var display = cm.display; - var prevBottom = display.lineDiv.offsetTop; - for (var i = 0; i < display.view.length; i++) { - var cur = display.view[i], wrapping = cm.options.lineWrapping; - var height = (void 0), width = 0; - if (cur.hidden) { continue } - if (ie && ie_version < 8) { - var bot = cur.node.offsetTop + cur.node.offsetHeight; - height = bot - prevBottom; - prevBottom = bot; - } else { - var box = cur.node.getBoundingClientRect(); - height = box.bottom - box.top; - // Check that lines don't extend past the right of the current - // editor width - if (!wrapping && cur.text.firstChild) - { width = cur.text.firstChild.getBoundingClientRect().right - box.left - 1; } - } - var diff = cur.line.height - height; - if (diff > .005 || diff < -.005) { - updateLineHeight(cur.line, height); - updateWidgetHeight(cur.line); - if (cur.rest) { for (var j = 0; j < cur.rest.length; j++) - { updateWidgetHeight(cur.rest[j]); } } - } - if (width > cm.display.sizerWidth) { - var chWidth = Math.ceil(width / charWidth(cm.display)); - if (chWidth > cm.display.maxLineLength) { - cm.display.maxLineLength = chWidth; - cm.display.maxLine = cur.line; - cm.display.maxLineChanged = true; - } - } - } - } - - // Read and store the height of line widgets associated with the - // given line. - function updateWidgetHeight(line) { - if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) { - var w = line.widgets[i], parent = w.node.parentNode; - if (parent) { w.height = parent.offsetHeight; } - } } - } - - // Compute the lines that are visible in a given viewport (defaults - // the the current scroll position). viewport may contain top, - // height, and ensure (see op.scrollToPos) properties. - function visibleLines(display, doc, viewport) { - var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop; - top = Math.floor(top - paddingTop(display)); - var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight; - - var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom); - // Ensure is a {from: {line, ch}, to: {line, ch}} object, and - // forces those lines into the viewport (if possible). - if (viewport && viewport.ensure) { - var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line; - if (ensureFrom < from) { - from = ensureFrom; - to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight); - } else if (Math.min(ensureTo, doc.lastLine()) >= to) { - from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight); - to = ensureTo; - } - } - return {from: from, to: Math.max(to, from + 1)} - } - - // Re-align line numbers and gutter marks to compensate for - // horizontal scrolling. - function alignHorizontally(cm) { - var display = cm.display, view = display.view; - if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return } - var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft; - var gutterW = display.gutters.offsetWidth, left = comp + "px"; - for (var i = 0; i < view.length; i++) { if (!view[i].hidden) { - if (cm.options.fixedGutter) { - if (view[i].gutter) - { view[i].gutter.style.left = left; } - if (view[i].gutterBackground) - { view[i].gutterBackground.style.left = left; } - } - var align = view[i].alignable; - if (align) { for (var j = 0; j < align.length; j++) - { align[j].style.left = left; } } - } } - if (cm.options.fixedGutter) - { display.gutters.style.left = (comp + gutterW) + "px"; } - } - - // Used to ensure that the line number gutter is still the right - // size for the current document size. Returns true when an update - // is needed. - function maybeUpdateLineNumberWidth(cm) { - if (!cm.options.lineNumbers) { return false } - var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display; - if (last.length != display.lineNumChars) { - var test = display.measure.appendChild(elt("div", [elt("div", last)], - "CodeMirror-linenumber CodeMirror-gutter-elt")); - var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW; - display.lineGutter.style.width = ""; - display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1; - display.lineNumWidth = display.lineNumInnerWidth + padding; - display.lineNumChars = display.lineNumInnerWidth ? last.length : -1; - display.lineGutter.style.width = display.lineNumWidth + "px"; - updateGutterSpace(cm); - return true - } - return false - } - - // SCROLLING THINGS INTO VIEW - - // If an editor sits on the top or bottom of the window, partially - // scrolled out of view, this ensures that the cursor is visible. - function maybeScrollWindow(cm, rect) { - if (signalDOMEvent(cm, "scrollCursorIntoView")) { return } - - var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null; - if (rect.top + box.top < 0) { doScroll = true; } - else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) { doScroll = false; } - if (doScroll != null && !phantom) { - var scrollNode = elt("div", "\u200b", null, ("position: absolute;\n top: " + (rect.top - display.viewOffset - paddingTop(cm.display)) + "px;\n height: " + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + "px;\n left: " + (rect.left) + "px; width: " + (Math.max(2, rect.right - rect.left)) + "px;")); - cm.display.lineSpace.appendChild(scrollNode); - scrollNode.scrollIntoView(doScroll); - cm.display.lineSpace.removeChild(scrollNode); - } - } - - // Scroll a given position into view (immediately), verifying that - // it actually became visible (as line heights are accurately - // measured, the position of something may 'drift' during drawing). - function scrollPosIntoView(cm, pos, end, margin) { - if (margin == null) { margin = 0; } - var rect; - if (!cm.options.lineWrapping && pos == end) { - // Set pos and end to the cursor positions around the character pos sticks to - // If pos.sticky == "before", that is around pos.ch - 1, otherwise around pos.ch - // If pos == Pos(_, 0, "before"), pos and end are unchanged - pos = pos.ch ? Pos(pos.line, pos.sticky == "before" ? pos.ch - 1 : pos.ch, "after") : pos; - end = pos.sticky == "before" ? Pos(pos.line, pos.ch + 1, "before") : pos; - } - for (var limit = 0; limit < 5; limit++) { - var changed = false; - var coords = cursorCoords(cm, pos); - var endCoords = !end || end == pos ? coords : cursorCoords(cm, end); - rect = {left: Math.min(coords.left, endCoords.left), - top: Math.min(coords.top, endCoords.top) - margin, - right: Math.max(coords.left, endCoords.left), - bottom: Math.max(coords.bottom, endCoords.bottom) + margin}; - var scrollPos = calculateScrollPos(cm, rect); - var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft; - if (scrollPos.scrollTop != null) { - updateScrollTop(cm, scrollPos.scrollTop); - if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true; } - } - if (scrollPos.scrollLeft != null) { - setScrollLeft(cm, scrollPos.scrollLeft); - if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true; } - } - if (!changed) { break } - } - return rect - } - - // Scroll a given set of coordinates into view (immediately). - function scrollIntoView(cm, rect) { - var scrollPos = calculateScrollPos(cm, rect); - if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); } - if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); } - } - - // Calculate a new scroll position needed to scroll the given - // rectangle into view. Returns an object with scrollTop and - // scrollLeft properties. When these are undefined, the - // vertical/horizontal position does not need to be adjusted. - function calculateScrollPos(cm, rect) { - var display = cm.display, snapMargin = textHeight(cm.display); - if (rect.top < 0) { rect.top = 0; } - var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop; - var screen = displayHeight(cm), result = {}; - if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; } - var docBottom = cm.doc.height + paddingVert(display); - var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin; - if (rect.top < screentop) { - result.scrollTop = atTop ? 0 : rect.top; - } else if (rect.bottom > screentop + screen) { - var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen); - if (newTop != screentop) { result.scrollTop = newTop; } - } - - var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft; - var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0); - var tooWide = rect.right - rect.left > screenw; - if (tooWide) { rect.right = rect.left + screenw; } - if (rect.left < 10) - { result.scrollLeft = 0; } - else if (rect.left < screenleft) - { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); } - else if (rect.right > screenw + screenleft - 3) - { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; } - return result - } - - // Store a relative adjustment to the scroll position in the current - // operation (to be applied when the operation finishes). - function addToScrollTop(cm, top) { - if (top == null) { return } - resolveScrollToPos(cm); - cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top; - } - - // Make sure that at the end of the operation the current cursor is - // shown. - function ensureCursorVisible(cm) { - resolveScrollToPos(cm); - var cur = cm.getCursor(); - cm.curOp.scrollToPos = {from: cur, to: cur, margin: cm.options.cursorScrollMargin}; - } - - function scrollToCoords(cm, x, y) { - if (x != null || y != null) { resolveScrollToPos(cm); } - if (x != null) { cm.curOp.scrollLeft = x; } - if (y != null) { cm.curOp.scrollTop = y; } - } - - function scrollToRange(cm, range$$1) { - resolveScrollToPos(cm); - cm.curOp.scrollToPos = range$$1; - } - - // When an operation has its scrollToPos property set, and another - // scroll action is applied before the end of the operation, this - // 'simulates' scrolling that position into view in a cheap way, so - // that the effect of intermediate scroll commands is not ignored. - function resolveScrollToPos(cm) { - var range$$1 = cm.curOp.scrollToPos; - if (range$$1) { - cm.curOp.scrollToPos = null; - var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to); - scrollToCoordsRange(cm, from, to, range$$1.margin); - } - } - - function scrollToCoordsRange(cm, from, to, margin) { - var sPos = calculateScrollPos(cm, { - left: Math.min(from.left, to.left), - top: Math.min(from.top, to.top) - margin, - right: Math.max(from.right, to.right), - bottom: Math.max(from.bottom, to.bottom) + margin - }); - scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop); - } - - // Sync the scrollable area and scrollbars, ensure the viewport - // covers the visible area. - function updateScrollTop(cm, val) { - if (Math.abs(cm.doc.scrollTop - val) < 2) { return } - if (!gecko) { updateDisplaySimple(cm, {top: val}); } - setScrollTop(cm, val, true); - if (gecko) { updateDisplaySimple(cm); } - startWorker(cm, 100); - } - - function setScrollTop(cm, val, forceScroll) { - val = Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val); - if (cm.display.scroller.scrollTop == val && !forceScroll) { return } - cm.doc.scrollTop = val; - cm.display.scrollbars.setScrollTop(val); - if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val; } - } - - // Sync scroller and scrollbar, ensure the gutter elements are - // aligned. - function setScrollLeft(cm, val, isScroller, forceScroll) { - val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth); - if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) { return } - cm.doc.scrollLeft = val; - alignHorizontally(cm); - if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val; } - cm.display.scrollbars.setScrollLeft(val); - } - - // SCROLLBARS - - // Prepare DOM reads needed to update the scrollbars. Done in one - // shot to minimize update/measure roundtrips. - function measureForScrollbars(cm) { - var d = cm.display, gutterW = d.gutters.offsetWidth; - var docH = Math.round(cm.doc.height + paddingVert(cm.display)); - return { - clientHeight: d.scroller.clientHeight, - viewHeight: d.wrapper.clientHeight, - scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth, - viewWidth: d.wrapper.clientWidth, - barLeft: cm.options.fixedGutter ? gutterW : 0, - docHeight: docH, - scrollHeight: docH + scrollGap(cm) + d.barHeight, - nativeBarWidth: d.nativeBarWidth, - gutterWidth: gutterW - } - } - - var NativeScrollbars = function(place, scroll, cm) { - this.cm = cm; - var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar"); - var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar"); - vert.tabIndex = horiz.tabIndex = -1; - place(vert); place(horiz); - - on(vert, "scroll", function () { - if (vert.clientHeight) { scroll(vert.scrollTop, "vertical"); } - }); - on(horiz, "scroll", function () { - if (horiz.clientWidth) { scroll(horiz.scrollLeft, "horizontal"); } - }); - - this.checkedZeroWidth = false; - // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8). - if (ie && ie_version < 8) { this.horiz.style.minHeight = this.vert.style.minWidth = "18px"; } - }; - - NativeScrollbars.prototype.update = function (measure) { - var needsH = measure.scrollWidth > measure.clientWidth + 1; - var needsV = measure.scrollHeight > measure.clientHeight + 1; - var sWidth = measure.nativeBarWidth; - - if (needsV) { - this.vert.style.display = "block"; - this.vert.style.bottom = needsH ? sWidth + "px" : "0"; - var totalHeight = measure.viewHeight - (needsH ? sWidth : 0); - // A bug in IE8 can cause this value to be negative, so guard it. - this.vert.firstChild.style.height = - Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px"; - } else { - this.vert.style.display = ""; - this.vert.firstChild.style.height = "0"; - } - - if (needsH) { - this.horiz.style.display = "block"; - this.horiz.style.right = needsV ? sWidth + "px" : "0"; - this.horiz.style.left = measure.barLeft + "px"; - var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0); - this.horiz.firstChild.style.width = - Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + "px"; - } else { - this.horiz.style.display = ""; - this.horiz.firstChild.style.width = "0"; - } - - if (!this.checkedZeroWidth && measure.clientHeight > 0) { - if (sWidth == 0) { this.zeroWidthHack(); } - this.checkedZeroWidth = true; - } - - return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0} - }; - - NativeScrollbars.prototype.setScrollLeft = function (pos) { - if (this.horiz.scrollLeft != pos) { this.horiz.scrollLeft = pos; } - if (this.disableHoriz) { this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz"); } - }; - - NativeScrollbars.prototype.setScrollTop = function (pos) { - if (this.vert.scrollTop != pos) { this.vert.scrollTop = pos; } - if (this.disableVert) { this.enableZeroWidthBar(this.vert, this.disableVert, "vert"); } - }; - - NativeScrollbars.prototype.zeroWidthHack = function () { - var w = mac && !mac_geMountainLion ? "12px" : "18px"; - this.horiz.style.height = this.vert.style.width = w; - this.horiz.style.pointerEvents = this.vert.style.pointerEvents = "none"; - this.disableHoriz = new Delayed; - this.disableVert = new Delayed; - }; - - NativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay, type) { - bar.style.pointerEvents = "auto"; - function maybeDisable() { - // To find out whether the scrollbar is still visible, we - // check whether the element under the pixel in the bottom - // right corner of the scrollbar box is the scrollbar box - // itself (when the bar is still visible) or its filler child - // (when the bar is hidden). If it is still visible, we keep - // it enabled, if it's hidden, we disable pointer events. - var box = bar.getBoundingClientRect(); - var elt$$1 = type == "vert" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2) - : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1); - if (elt$$1 != bar) { bar.style.pointerEvents = "none"; } - else { delay.set(1000, maybeDisable); } - } - delay.set(1000, maybeDisable); - }; - - NativeScrollbars.prototype.clear = function () { - var parent = this.horiz.parentNode; - parent.removeChild(this.horiz); - parent.removeChild(this.vert); - }; - - var NullScrollbars = function () {}; - - NullScrollbars.prototype.update = function () { return {bottom: 0, right: 0} }; - NullScrollbars.prototype.setScrollLeft = function () {}; - NullScrollbars.prototype.setScrollTop = function () {}; - NullScrollbars.prototype.clear = function () {}; - - function updateScrollbars(cm, measure) { - if (!measure) { measure = measureForScrollbars(cm); } - var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight; - updateScrollbarsInner(cm, measure); - for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) { - if (startWidth != cm.display.barWidth && cm.options.lineWrapping) - { updateHeightsInViewport(cm); } - updateScrollbarsInner(cm, measureForScrollbars(cm)); - startWidth = cm.display.barWidth; startHeight = cm.display.barHeight; - } - } - - // Re-synchronize the fake scrollbars with the actual size of the - // content. - function updateScrollbarsInner(cm, measure) { - var d = cm.display; - var sizes = d.scrollbars.update(measure); - - d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px"; - d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px"; - d.heightForcer.style.borderBottom = sizes.bottom + "px solid transparent"; - - if (sizes.right && sizes.bottom) { - d.scrollbarFiller.style.display = "block"; - d.scrollbarFiller.style.height = sizes.bottom + "px"; - d.scrollbarFiller.style.width = sizes.right + "px"; - } else { d.scrollbarFiller.style.display = ""; } - if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) { - d.gutterFiller.style.display = "block"; - d.gutterFiller.style.height = sizes.bottom + "px"; - d.gutterFiller.style.width = measure.gutterWidth + "px"; - } else { d.gutterFiller.style.display = ""; } - } - - var scrollbarModel = {"native": NativeScrollbars, "null": NullScrollbars}; - - function initScrollbars(cm) { - if (cm.display.scrollbars) { - cm.display.scrollbars.clear(); - if (cm.display.scrollbars.addClass) - { rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); } - } - - cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) { - cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller); - // Prevent clicks in the scrollbars from killing focus - on(node, "mousedown", function () { - if (cm.state.focused) { setTimeout(function () { return cm.display.input.focus(); }, 0); } - }); - node.setAttribute("cm-not-content", "true"); - }, function (pos, axis) { - if (axis == "horizontal") { setScrollLeft(cm, pos); } - else { updateScrollTop(cm, pos); } - }, cm); - if (cm.display.scrollbars.addClass) - { addClass(cm.display.wrapper, cm.display.scrollbars.addClass); } - } - - // Operations are used to wrap a series of changes to the editor - // state in such a way that each change won't have to update the - // cursor and display (which would be awkward, slow, and - // error-prone). Instead, display updates are batched and then all - // combined and executed at once. - - var nextOpId = 0; - // Start a new operation. - function startOperation(cm) { - cm.curOp = { - cm: cm, - viewChanged: false, // Flag that indicates that lines might need to be redrawn - startHeight: cm.doc.height, // Used to detect need to update scrollbar - forceUpdate: false, // Used to force a redraw - updateInput: 0, // Whether to reset the input textarea - typing: false, // Whether this reset should be careful to leave existing text (for compositing) - changeObjs: null, // Accumulated changes, for firing change events - cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on - cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already - selectionChanged: false, // Whether the selection needs to be redrawn - updateMaxLine: false, // Set when the widest line needs to be determined anew - scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet - scrollToPos: null, // Used to scroll to a specific position - focus: false, - id: ++nextOpId // Unique ID - }; - pushOperation(cm.curOp); - } - - // Finish an operation, updating the display and signalling delayed events - function endOperation(cm) { - var op = cm.curOp; - if (op) { finishOperation(op, function (group) { - for (var i = 0; i < group.ops.length; i++) - { group.ops[i].cm.curOp = null; } - endOperations(group); - }); } - } - - // The DOM updates done when an operation finishes are batched so - // that the minimum number of relayouts are required. - function endOperations(group) { - var ops = group.ops; - for (var i = 0; i < ops.length; i++) // Read DOM - { endOperation_R1(ops[i]); } - for (var i$1 = 0; i$1 < ops.length; i$1++) // Write DOM (maybe) - { endOperation_W1(ops[i$1]); } - for (var i$2 = 0; i$2 < ops.length; i$2++) // Read DOM - { endOperation_R2(ops[i$2]); } - for (var i$3 = 0; i$3 < ops.length; i$3++) // Write DOM (maybe) - { endOperation_W2(ops[i$3]); } - for (var i$4 = 0; i$4 < ops.length; i$4++) // Read DOM - { endOperation_finish(ops[i$4]); } - } - - function endOperation_R1(op) { - var cm = op.cm, display = cm.display; - maybeClipScrollbars(cm); - if (op.updateMaxLine) { findMaxLine(cm); } - - op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null || - op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom || - op.scrollToPos.to.line >= display.viewTo) || - display.maxLineChanged && cm.options.lineWrapping; - op.update = op.mustUpdate && - new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate); - } - - function endOperation_W1(op) { - op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update); - } - - function endOperation_R2(op) { - var cm = op.cm, display = cm.display; - if (op.updatedDisplay) { updateHeightsInViewport(cm); } - - op.barMeasure = measureForScrollbars(cm); - - // If the max line changed since it was last measured, measure it, - // and ensure the document's width matches it. - // updateDisplay_W2 will use these properties to do the actual resizing - if (display.maxLineChanged && !cm.options.lineWrapping) { - op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3; - cm.display.sizerWidth = op.adjustWidthTo; - op.barMeasure.scrollWidth = - Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth); - op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm)); - } - - if (op.updatedDisplay || op.selectionChanged) - { op.preparedSelection = display.input.prepareSelection(); } - } - - function endOperation_W2(op) { - var cm = op.cm; - - if (op.adjustWidthTo != null) { - cm.display.sizer.style.minWidth = op.adjustWidthTo + "px"; - if (op.maxScrollLeft < cm.doc.scrollLeft) - { setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); } - cm.display.maxLineChanged = false; - } - - var takeFocus = op.focus && op.focus == activeElt(); - if (op.preparedSelection) - { cm.display.input.showSelection(op.preparedSelection, takeFocus); } - if (op.updatedDisplay || op.startHeight != cm.doc.height) - { updateScrollbars(cm, op.barMeasure); } - if (op.updatedDisplay) - { setDocumentHeight(cm, op.barMeasure); } - - if (op.selectionChanged) { restartBlink(cm); } - - if (cm.state.focused && op.updateInput) - { cm.display.input.reset(op.typing); } - if (takeFocus) { ensureFocus(op.cm); } - } - - function endOperation_finish(op) { - var cm = op.cm, display = cm.display, doc = cm.doc; - - if (op.updatedDisplay) { postUpdateDisplay(cm, op.update); } - - // Abort mouse wheel delta measurement, when scrolling explicitly - if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos)) - { display.wheelStartX = display.wheelStartY = null; } - - // Propagate the scroll position to the actual DOM scroller - if (op.scrollTop != null) { setScrollTop(cm, op.scrollTop, op.forceScroll); } - - if (op.scrollLeft != null) { setScrollLeft(cm, op.scrollLeft, true, true); } - // If we need to scroll a specific position into view, do so. - if (op.scrollToPos) { - var rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from), - clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin); - maybeScrollWindow(cm, rect); - } - - // Fire events for markers that are hidden/unidden by editing or - // undoing - var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers; - if (hidden) { for (var i = 0; i < hidden.length; ++i) - { if (!hidden[i].lines.length) { signal(hidden[i], "hide"); } } } - if (unhidden) { for (var i$1 = 0; i$1 < unhidden.length; ++i$1) - { if (unhidden[i$1].lines.length) { signal(unhidden[i$1], "unhide"); } } } - - if (display.wrapper.offsetHeight) - { doc.scrollTop = cm.display.scroller.scrollTop; } - - // Fire change events, and delayed event handlers - if (op.changeObjs) - { signal(cm, "changes", cm, op.changeObjs); } - if (op.update) - { op.update.finish(); } - } - - // Run the given function in an operation - function runInOp(cm, f) { - if (cm.curOp) { return f() } - startOperation(cm); - try { return f() } - finally { endOperation(cm); } - } - // Wraps a function in an operation. Returns the wrapped function. - function operation(cm, f) { - return function() { - if (cm.curOp) { return f.apply(cm, arguments) } - startOperation(cm); - try { return f.apply(cm, arguments) } - finally { endOperation(cm); } - } - } - // Used to add methods to editor and doc instances, wrapping them in - // operations. - function methodOp(f) { - return function() { - if (this.curOp) { return f.apply(this, arguments) } - startOperation(this); - try { return f.apply(this, arguments) } - finally { endOperation(this); } - } - } - function docMethodOp(f) { - return function() { - var cm = this.cm; - if (!cm || cm.curOp) { return f.apply(this, arguments) } - startOperation(cm); - try { return f.apply(this, arguments) } - finally { endOperation(cm); } - } - } - - // Updates the display.view data structure for a given change to the - // document. From and to are in pre-change coordinates. Lendiff is - // the amount of lines added or subtracted by the change. This is - // used for changes that span multiple lines, or change the way - // lines are divided into visual lines. regLineChange (below) - // registers single-line changes. - function regChange(cm, from, to, lendiff) { - if (from == null) { from = cm.doc.first; } - if (to == null) { to = cm.doc.first + cm.doc.size; } - if (!lendiff) { lendiff = 0; } - - var display = cm.display; - if (lendiff && to < display.viewTo && - (display.updateLineNumbers == null || display.updateLineNumbers > from)) - { display.updateLineNumbers = from; } - - cm.curOp.viewChanged = true; - - if (from >= display.viewTo) { // Change after - if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo) - { resetView(cm); } - } else if (to <= display.viewFrom) { // Change before - if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) { - resetView(cm); - } else { - display.viewFrom += lendiff; - display.viewTo += lendiff; - } - } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap - resetView(cm); - } else if (from <= display.viewFrom) { // Top overlap - var cut = viewCuttingPoint(cm, to, to + lendiff, 1); - if (cut) { - display.view = display.view.slice(cut.index); - display.viewFrom = cut.lineN; - display.viewTo += lendiff; - } else { - resetView(cm); - } - } else if (to >= display.viewTo) { // Bottom overlap - var cut$1 = viewCuttingPoint(cm, from, from, -1); - if (cut$1) { - display.view = display.view.slice(0, cut$1.index); - display.viewTo = cut$1.lineN; - } else { - resetView(cm); - } - } else { // Gap in the middle - var cutTop = viewCuttingPoint(cm, from, from, -1); - var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1); - if (cutTop && cutBot) { - display.view = display.view.slice(0, cutTop.index) - .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN)) - .concat(display.view.slice(cutBot.index)); - display.viewTo += lendiff; - } else { - resetView(cm); - } - } - - var ext = display.externalMeasured; - if (ext) { - if (to < ext.lineN) - { ext.lineN += lendiff; } - else if (from < ext.lineN + ext.size) - { display.externalMeasured = null; } - } - } - - // Register a change to a single line. Type must be one of "text", - // "gutter", "class", "widget" - function regLineChange(cm, line, type) { - cm.curOp.viewChanged = true; - var display = cm.display, ext = cm.display.externalMeasured; - if (ext && line >= ext.lineN && line < ext.lineN + ext.size) - { display.externalMeasured = null; } - - if (line < display.viewFrom || line >= display.viewTo) { return } - var lineView = display.view[findViewIndex(cm, line)]; - if (lineView.node == null) { return } - var arr = lineView.changes || (lineView.changes = []); - if (indexOf(arr, type) == -1) { arr.push(type); } - } - - // Clear the view. - function resetView(cm) { - cm.display.viewFrom = cm.display.viewTo = cm.doc.first; - cm.display.view = []; - cm.display.viewOffset = 0; - } - - function viewCuttingPoint(cm, oldN, newN, dir) { - var index = findViewIndex(cm, oldN), diff, view = cm.display.view; - if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size) - { return {index: index, lineN: newN} } - var n = cm.display.viewFrom; - for (var i = 0; i < index; i++) - { n += view[i].size; } - if (n != oldN) { - if (dir > 0) { - if (index == view.length - 1) { return null } - diff = (n + view[index].size) - oldN; - index++; - } else { - diff = n - oldN; - } - oldN += diff; newN += diff; - } - while (visualLineNo(cm.doc, newN) != newN) { - if (index == (dir < 0 ? 0 : view.length - 1)) { return null } - newN += dir * view[index - (dir < 0 ? 1 : 0)].size; - index += dir; - } - return {index: index, lineN: newN} - } - - // Force the view to cover a given range, adding empty view element - // or clipping off existing ones as needed. - function adjustView(cm, from, to) { - var display = cm.display, view = display.view; - if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) { - display.view = buildViewArray(cm, from, to); - display.viewFrom = from; - } else { - if (display.viewFrom > from) - { display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); } - else if (display.viewFrom < from) - { display.view = display.view.slice(findViewIndex(cm, from)); } - display.viewFrom = from; - if (display.viewTo < to) - { display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); } - else if (display.viewTo > to) - { display.view = display.view.slice(0, findViewIndex(cm, to)); } - } - display.viewTo = to; - } - - // Count the number of lines in the view whose DOM representation is - // out of date (or nonexistent). - function countDirtyView(cm) { - var view = cm.display.view, dirty = 0; - for (var i = 0; i < view.length; i++) { - var lineView = view[i]; - if (!lineView.hidden && (!lineView.node || lineView.changes)) { ++dirty; } - } - return dirty - } - - // HIGHLIGHT WORKER - - function startWorker(cm, time) { - if (cm.doc.highlightFrontier < cm.display.viewTo) - { cm.state.highlight.set(time, bind(highlightWorker, cm)); } - } - - function highlightWorker(cm) { - var doc = cm.doc; - if (doc.highlightFrontier >= cm.display.viewTo) { return } - var end = +new Date + cm.options.workTime; - var context = getContextBefore(cm, doc.highlightFrontier); - var changedLines = []; - - doc.iter(context.line, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function (line) { - if (context.line >= cm.display.viewFrom) { // Visible - var oldStyles = line.styles; - var resetState = line.text.length > cm.options.maxHighlightLength ? copyState(doc.mode, context.state) : null; - var highlighted = highlightLine(cm, line, context, true); - if (resetState) { context.state = resetState; } - line.styles = highlighted.styles; - var oldCls = line.styleClasses, newCls = highlighted.classes; - if (newCls) { line.styleClasses = newCls; } - else if (oldCls) { line.styleClasses = null; } - var ischange = !oldStyles || oldStyles.length != line.styles.length || - oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass); - for (var i = 0; !ischange && i < oldStyles.length; ++i) { ischange = oldStyles[i] != line.styles[i]; } - if (ischange) { changedLines.push(context.line); } - line.stateAfter = context.save(); - context.nextLine(); - } else { - if (line.text.length <= cm.options.maxHighlightLength) - { processLine(cm, line.text, context); } - line.stateAfter = context.line % 5 == 0 ? context.save() : null; - context.nextLine(); - } - if (+new Date > end) { - startWorker(cm, cm.options.workDelay); - return true - } - }); - doc.highlightFrontier = context.line; - doc.modeFrontier = Math.max(doc.modeFrontier, context.line); - if (changedLines.length) { runInOp(cm, function () { - for (var i = 0; i < changedLines.length; i++) - { regLineChange(cm, changedLines[i], "text"); } - }); } - } - - // DISPLAY DRAWING - - var DisplayUpdate = function(cm, viewport, force) { - var display = cm.display; - - this.viewport = viewport; - // Store some values that we'll need later (but don't want to force a relayout for) - this.visible = visibleLines(display, cm.doc, viewport); - this.editorIsHidden = !display.wrapper.offsetWidth; - this.wrapperHeight = display.wrapper.clientHeight; - this.wrapperWidth = display.wrapper.clientWidth; - this.oldDisplayWidth = displayWidth(cm); - this.force = force; - this.dims = getDimensions(cm); - this.events = []; - }; - - DisplayUpdate.prototype.signal = function (emitter, type) { - if (hasHandler(emitter, type)) - { this.events.push(arguments); } - }; - DisplayUpdate.prototype.finish = function () { - var this$1 = this; - - for (var i = 0; i < this.events.length; i++) - { signal.apply(null, this$1.events[i]); } - }; - - function maybeClipScrollbars(cm) { - var display = cm.display; - if (!display.scrollbarsClipped && display.scroller.offsetWidth) { - display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth; - display.heightForcer.style.height = scrollGap(cm) + "px"; - display.sizer.style.marginBottom = -display.nativeBarWidth + "px"; - display.sizer.style.borderRightWidth = scrollGap(cm) + "px"; - display.scrollbarsClipped = true; - } - } - - function selectionSnapshot(cm) { - if (cm.hasFocus()) { return null } - var active = activeElt(); - if (!active || !contains(cm.display.lineDiv, active)) { return null } - var result = {activeElt: active}; - if (window.getSelection) { - var sel = window.getSelection(); - if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) { - result.anchorNode = sel.anchorNode; - result.anchorOffset = sel.anchorOffset; - result.focusNode = sel.focusNode; - result.focusOffset = sel.focusOffset; - } - } - return result - } - - function restoreSelection(snapshot) { - if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt()) { return } - snapshot.activeElt.focus(); - if (snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) { - var sel = window.getSelection(), range$$1 = document.createRange(); - range$$1.setEnd(snapshot.anchorNode, snapshot.anchorOffset); - range$$1.collapse(false); - sel.removeAllRanges(); - sel.addRange(range$$1); - sel.extend(snapshot.focusNode, snapshot.focusOffset); - } - } - - // Does the actual updating of the line display. Bails out - // (returning false) when there is nothing to be done and forced is - // false. - function updateDisplayIfNeeded(cm, update) { - var display = cm.display, doc = cm.doc; - - if (update.editorIsHidden) { - resetView(cm); - return false - } - - // Bail out if the visible area is already rendered and nothing changed. - if (!update.force && - update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo && - (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) && - display.renderedView == display.view && countDirtyView(cm) == 0) - { return false } - - if (maybeUpdateLineNumberWidth(cm)) { - resetView(cm); - update.dims = getDimensions(cm); - } - - // Compute a suitable new viewport (from & to) - var end = doc.first + doc.size; - var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first); - var to = Math.min(end, update.visible.to + cm.options.viewportMargin); - if (display.viewFrom < from && from - display.viewFrom < 20) { from = Math.max(doc.first, display.viewFrom); } - if (display.viewTo > to && display.viewTo - to < 20) { to = Math.min(end, display.viewTo); } - if (sawCollapsedSpans) { - from = visualLineNo(cm.doc, from); - to = visualLineEndNo(cm.doc, to); - } - - var different = from != display.viewFrom || to != display.viewTo || - display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth; - adjustView(cm, from, to); - - display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom)); - // Position the mover div to align with the current scroll position - cm.display.mover.style.top = display.viewOffset + "px"; - - var toUpdate = countDirtyView(cm); - if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view && - (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo)) - { return false } - - // For big changes, we hide the enclosing element during the - // update, since that speeds up the operations on most browsers. - var selSnapshot = selectionSnapshot(cm); - if (toUpdate > 4) { display.lineDiv.style.display = "none"; } - patchDisplay(cm, display.updateLineNumbers, update.dims); - if (toUpdate > 4) { display.lineDiv.style.display = ""; } - display.renderedView = display.view; - // There might have been a widget with a focused element that got - // hidden or updated, if so re-focus it. - restoreSelection(selSnapshot); - - // Prevent selection and cursors from interfering with the scroll - // width and height. - removeChildren(display.cursorDiv); - removeChildren(display.selectionDiv); - display.gutters.style.height = display.sizer.style.minHeight = 0; - - if (different) { - display.lastWrapHeight = update.wrapperHeight; - display.lastWrapWidth = update.wrapperWidth; - startWorker(cm, 400); - } - - display.updateLineNumbers = null; - - return true - } - - function postUpdateDisplay(cm, update) { - var viewport = update.viewport; - - for (var first = true;; first = false) { - if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) { - // Clip forced viewport to actual scrollable area. - if (viewport && viewport.top != null) - { viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; } - // Updated line heights might result in the drawn area not - // actually covering the viewport. Keep looping until it does. - update.visible = visibleLines(cm.display, cm.doc, viewport); - if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo) - { break } - } - if (!updateDisplayIfNeeded(cm, update)) { break } - updateHeightsInViewport(cm); - var barMeasure = measureForScrollbars(cm); - updateSelection(cm); - updateScrollbars(cm, barMeasure); - setDocumentHeight(cm, barMeasure); - update.force = false; - } - - update.signal(cm, "update", cm); - if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) { - update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo); - cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo; - } - } - - function updateDisplaySimple(cm, viewport) { - var update = new DisplayUpdate(cm, viewport); - if (updateDisplayIfNeeded(cm, update)) { - updateHeightsInViewport(cm); - postUpdateDisplay(cm, update); - var barMeasure = measureForScrollbars(cm); - updateSelection(cm); - updateScrollbars(cm, barMeasure); - setDocumentHeight(cm, barMeasure); - update.finish(); - } - } - - // Sync the actual display DOM structure with display.view, removing - // nodes for lines that are no longer in view, and creating the ones - // that are not there yet, and updating the ones that are out of - // date. - function patchDisplay(cm, updateNumbersFrom, dims) { - var display = cm.display, lineNumbers = cm.options.lineNumbers; - var container = display.lineDiv, cur = container.firstChild; - - function rm(node) { - var next = node.nextSibling; - // Works around a throw-scroll bug in OS X Webkit - if (webkit && mac && cm.display.currentWheelTarget == node) - { node.style.display = "none"; } - else - { node.parentNode.removeChild(node); } - return next - } - - var view = display.view, lineN = display.viewFrom; - // Loop over the elements in the view, syncing cur (the DOM nodes - // in display.lineDiv) with the view as we go. - for (var i = 0; i < view.length; i++) { - var lineView = view[i]; - if (lineView.hidden) ; else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet - var node = buildLineElement(cm, lineView, lineN, dims); - container.insertBefore(node, cur); - } else { // Already drawn - while (cur != lineView.node) { cur = rm(cur); } - var updateNumber = lineNumbers && updateNumbersFrom != null && - updateNumbersFrom <= lineN && lineView.lineNumber; - if (lineView.changes) { - if (indexOf(lineView.changes, "gutter") > -1) { updateNumber = false; } - updateLineForChanges(cm, lineView, lineN, dims); - } - if (updateNumber) { - removeChildren(lineView.lineNumber); - lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN))); - } - cur = lineView.node.nextSibling; - } - lineN += lineView.size; - } - while (cur) { cur = rm(cur); } - } - - function updateGutterSpace(cm) { - var width = cm.display.gutters.offsetWidth; - cm.display.sizer.style.marginLeft = width + "px"; - } - - function setDocumentHeight(cm, measure) { - cm.display.sizer.style.minHeight = measure.docHeight + "px"; - cm.display.heightForcer.style.top = measure.docHeight + "px"; - cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + "px"; - } - - // Rebuild the gutter elements, ensure the margin to the left of the - // code matches their width. - function updateGutters(cm) { - var gutters = cm.display.gutters, specs = cm.options.gutters; - removeChildren(gutters); - var i = 0; - for (; i < specs.length; ++i) { - var gutterClass = specs[i]; - var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + gutterClass)); - if (gutterClass == "CodeMirror-linenumbers") { - cm.display.lineGutter = gElt; - gElt.style.width = (cm.display.lineNumWidth || 1) + "px"; - } - } - gutters.style.display = i ? "" : "none"; - updateGutterSpace(cm); - } - - // Make sure the gutters options contains the element - // "CodeMirror-linenumbers" when the lineNumbers option is true. - function setGuttersForLineNumbers(options) { - var found = indexOf(options.gutters, "CodeMirror-linenumbers"); - if (found == -1 && options.lineNumbers) { - options.gutters = options.gutters.concat(["CodeMirror-linenumbers"]); - } else if (found > -1 && !options.lineNumbers) { - options.gutters = options.gutters.slice(0); - options.gutters.splice(found, 1); - } - } - - // Since the delta values reported on mouse wheel events are - // unstandardized between browsers and even browser versions, and - // generally horribly unpredictable, this code starts by measuring - // the scroll effect that the first few mouse wheel events have, - // and, from that, detects the way it can convert deltas to pixel - // offsets afterwards. - // - // The reason we want to know the amount a wheel event will scroll - // is that it gives us a chance to update the display before the - // actual scrolling happens, reducing flickering. - - var wheelSamples = 0, wheelPixelsPerUnit = null; - // Fill in a browser-detected starting value on browsers where we - // know one. These don't have to be accurate -- the result of them - // being wrong would just be a slight flicker on the first wheel - // scroll (if it is large enough). - if (ie) { wheelPixelsPerUnit = -.53; } - else if (gecko) { wheelPixelsPerUnit = 15; } - else if (chrome) { wheelPixelsPerUnit = -.7; } - else if (safari) { wheelPixelsPerUnit = -1/3; } - - function wheelEventDelta(e) { - var dx = e.wheelDeltaX, dy = e.wheelDeltaY; - if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { dx = e.detail; } - if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { dy = e.detail; } - else if (dy == null) { dy = e.wheelDelta; } - return {x: dx, y: dy} - } - function wheelEventPixels(e) { - var delta = wheelEventDelta(e); - delta.x *= wheelPixelsPerUnit; - delta.y *= wheelPixelsPerUnit; - return delta - } - - function onScrollWheel(cm, e) { - var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y; - - var display = cm.display, scroll = display.scroller; - // Quit if there's nothing to scroll here - var canScrollX = scroll.scrollWidth > scroll.clientWidth; - var canScrollY = scroll.scrollHeight > scroll.clientHeight; - if (!(dx && canScrollX || dy && canScrollY)) { return } - - // Webkit browsers on OS X abort momentum scrolls when the target - // of the scroll event is removed from the scrollable element. - // This hack (see related code in patchDisplay) makes sure the - // element is kept around. - if (dy && mac && webkit) { - outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) { - for (var i = 0; i < view.length; i++) { - if (view[i].node == cur) { - cm.display.currentWheelTarget = cur; - break outer - } - } - } - } - - // On some browsers, horizontal scrolling will cause redraws to - // happen before the gutter has been realigned, causing it to - // wriggle around in a most unseemly way. When we have an - // estimated pixels/delta value, we just handle horizontal - // scrolling entirely here. It'll be slightly off from native, but - // better than glitching out. - if (dx && !gecko && !presto && wheelPixelsPerUnit != null) { - if (dy && canScrollY) - { updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * wheelPixelsPerUnit)); } - setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * wheelPixelsPerUnit)); - // Only prevent default scrolling if vertical scrolling is - // actually possible. Otherwise, it causes vertical scroll - // jitter on OSX trackpads when deltaX is small and deltaY - // is large (issue #3579) - if (!dy || (dy && canScrollY)) - { e_preventDefault(e); } - display.wheelStartX = null; // Abort measurement, if in progress - return - } - - // 'Project' the visible viewport to cover the area that is being - // scrolled into view (if we know enough to estimate it). - if (dy && wheelPixelsPerUnit != null) { - var pixels = dy * wheelPixelsPerUnit; - var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight; - if (pixels < 0) { top = Math.max(0, top + pixels - 50); } - else { bot = Math.min(cm.doc.height, bot + pixels + 50); } - updateDisplaySimple(cm, {top: top, bottom: bot}); - } - - if (wheelSamples < 20) { - if (display.wheelStartX == null) { - display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop; - display.wheelDX = dx; display.wheelDY = dy; - setTimeout(function () { - if (display.wheelStartX == null) { return } - var movedX = scroll.scrollLeft - display.wheelStartX; - var movedY = scroll.scrollTop - display.wheelStartY; - var sample = (movedY && display.wheelDY && movedY / display.wheelDY) || - (movedX && display.wheelDX && movedX / display.wheelDX); - display.wheelStartX = display.wheelStartY = null; - if (!sample) { return } - wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1); - ++wheelSamples; - }, 200); - } else { - display.wheelDX += dx; display.wheelDY += dy; - } - } - } - - // Selection objects are immutable. A new one is created every time - // the selection changes. A selection is one or more non-overlapping - // (and non-touching) ranges, sorted, and an integer that indicates - // which one is the primary selection (the one that's scrolled into - // view, that getCursor returns, etc). - var Selection = function(ranges, primIndex) { - this.ranges = ranges; - this.primIndex = primIndex; - }; - - Selection.prototype.primary = function () { return this.ranges[this.primIndex] }; - - Selection.prototype.equals = function (other) { - var this$1 = this; - - if (other == this) { return true } - if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) { return false } - for (var i = 0; i < this.ranges.length; i++) { - var here = this$1.ranges[i], there = other.ranges[i]; - if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) { return false } - } - return true - }; - - Selection.prototype.deepCopy = function () { - var this$1 = this; - - var out = []; - for (var i = 0; i < this.ranges.length; i++) - { out[i] = new Range(copyPos(this$1.ranges[i].anchor), copyPos(this$1.ranges[i].head)); } - return new Selection(out, this.primIndex) - }; - - Selection.prototype.somethingSelected = function () { - var this$1 = this; - - for (var i = 0; i < this.ranges.length; i++) - { if (!this$1.ranges[i].empty()) { return true } } - return false - }; - - Selection.prototype.contains = function (pos, end) { - var this$1 = this; - - if (!end) { end = pos; } - for (var i = 0; i < this.ranges.length; i++) { - var range = this$1.ranges[i]; - if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0) - { return i } - } - return -1 - }; - - var Range = function(anchor, head) { - this.anchor = anchor; this.head = head; - }; - - Range.prototype.from = function () { return minPos(this.anchor, this.head) }; - Range.prototype.to = function () { return maxPos(this.anchor, this.head) }; - Range.prototype.empty = function () { return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch }; - - // Take an unsorted, potentially overlapping set of ranges, and - // build a selection out of it. 'Consumes' ranges array (modifying - // it). - function normalizeSelection(cm, ranges, primIndex) { - var mayTouch = cm && cm.options.selectionsMayTouch; - var prim = ranges[primIndex]; - ranges.sort(function (a, b) { return cmp(a.from(), b.from()); }); - primIndex = indexOf(ranges, prim); - for (var i = 1; i < ranges.length; i++) { - var cur = ranges[i], prev = ranges[i - 1]; - var diff = cmp(prev.to(), cur.from()); - if (mayTouch && !cur.empty() ? diff > 0 : diff >= 0) { - var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to()); - var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head; - if (i <= primIndex) { --primIndex; } - ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to)); - } - } - return new Selection(ranges, primIndex) - } - - function simpleSelection(anchor, head) { - return new Selection([new Range(anchor, head || anchor)], 0) - } - - // Compute the position of the end of a change (its 'to' property - // refers to the pre-change end). - function changeEnd(change) { - if (!change.text) { return change.to } - return Pos(change.from.line + change.text.length - 1, - lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0)) - } - - // Adjust a position to refer to the post-change position of the - // same text, or the end of the change if the change covers it. - function adjustForChange(pos, change) { - if (cmp(pos, change.from) < 0) { return pos } - if (cmp(pos, change.to) <= 0) { return changeEnd(change) } - - var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch; - if (pos.line == change.to.line) { ch += changeEnd(change).ch - change.to.ch; } - return Pos(line, ch) - } - - function computeSelAfterChange(doc, change) { - var out = []; - for (var i = 0; i < doc.sel.ranges.length; i++) { - var range = doc.sel.ranges[i]; - out.push(new Range(adjustForChange(range.anchor, change), - adjustForChange(range.head, change))); - } - return normalizeSelection(doc.cm, out, doc.sel.primIndex) - } - - function offsetPos(pos, old, nw) { - if (pos.line == old.line) - { return Pos(nw.line, pos.ch - old.ch + nw.ch) } - else - { return Pos(nw.line + (pos.line - old.line), pos.ch) } - } - - // Used by replaceSelections to allow moving the selection to the - // start or around the replaced test. Hint may be "start" or "around". - function computeReplacedSel(doc, changes, hint) { - var out = []; - var oldPrev = Pos(doc.first, 0), newPrev = oldPrev; - for (var i = 0; i < changes.length; i++) { - var change = changes[i]; - var from = offsetPos(change.from, oldPrev, newPrev); - var to = offsetPos(changeEnd(change), oldPrev, newPrev); - oldPrev = change.to; - newPrev = to; - if (hint == "around") { - var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0; - out[i] = new Range(inv ? to : from, inv ? from : to); - } else { - out[i] = new Range(from, from); - } - } - return new Selection(out, doc.sel.primIndex) - } - - // Used to get the editor into a consistent state again when options change. - - function loadMode(cm) { - cm.doc.mode = getMode(cm.options, cm.doc.modeOption); - resetModeState(cm); - } - - function resetModeState(cm) { - cm.doc.iter(function (line) { - if (line.stateAfter) { line.stateAfter = null; } - if (line.styles) { line.styles = null; } - }); - cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first; - startWorker(cm, 100); - cm.state.modeGen++; - if (cm.curOp) { regChange(cm); } - } - - // DOCUMENT DATA STRUCTURE - - // By default, updates that start and end at the beginning of a line - // are treated specially, in order to make the association of line - // widgets and marker elements with the text behave more intuitive. - function isWholeLineUpdate(doc, change) { - return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == "" && - (!doc.cm || doc.cm.options.wholeLineUpdateBefore) - } - - // Perform a change on the document data structure. - function updateDoc(doc, change, markedSpans, estimateHeight$$1) { - function spansFor(n) {return markedSpans ? markedSpans[n] : null} - function update(line, text, spans) { - updateLine(line, text, spans, estimateHeight$$1); - signalLater(line, "change", line, change); - } - function linesFor(start, end) { - var result = []; - for (var i = start; i < end; ++i) - { result.push(new Line(text[i], spansFor(i), estimateHeight$$1)); } - return result - } - - var from = change.from, to = change.to, text = change.text; - var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line); - var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line; - - // Adjust the line structure - if (change.full) { - doc.insert(0, linesFor(0, text.length)); - doc.remove(text.length, doc.size - text.length); - } else if (isWholeLineUpdate(doc, change)) { - // This is a whole-line replace. Treated specially to make - // sure line objects move the way they are supposed to. - var added = linesFor(0, text.length - 1); - update(lastLine, lastLine.text, lastSpans); - if (nlines) { doc.remove(from.line, nlines); } - if (added.length) { doc.insert(from.line, added); } - } else if (firstLine == lastLine) { - if (text.length == 1) { - update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans); - } else { - var added$1 = linesFor(1, text.length - 1); - added$1.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight$$1)); - update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)); - doc.insert(from.line + 1, added$1); - } - } else if (text.length == 1) { - update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0)); - doc.remove(from.line + 1, nlines); - } else { - update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)); - update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans); - var added$2 = linesFor(1, text.length - 1); - if (nlines > 1) { doc.remove(from.line + 1, nlines - 1); } - doc.insert(from.line + 1, added$2); - } - - signalLater(doc, "change", doc, change); - } - - // Call f for all linked documents. - function linkedDocs(doc, f, sharedHistOnly) { - function propagate(doc, skip, sharedHist) { - if (doc.linked) { for (var i = 0; i < doc.linked.length; ++i) { - var rel = doc.linked[i]; - if (rel.doc == skip) { continue } - var shared = sharedHist && rel.sharedHist; - if (sharedHistOnly && !shared) { continue } - f(rel.doc, shared); - propagate(rel.doc, doc, shared); - } } - } - propagate(doc, null, true); - } - - // Attach a document to an editor. - function attachDoc(cm, doc) { - if (doc.cm) { throw new Error("This document is already in use.") } - cm.doc = doc; - doc.cm = cm; - estimateLineHeights(cm); - loadMode(cm); - setDirectionClass(cm); - if (!cm.options.lineWrapping) { findMaxLine(cm); } - cm.options.mode = doc.modeOption; - regChange(cm); - } - - function setDirectionClass(cm) { - (cm.doc.direction == "rtl" ? addClass : rmClass)(cm.display.lineDiv, "CodeMirror-rtl"); - } - - function directionChanged(cm) { - runInOp(cm, function () { - setDirectionClass(cm); - regChange(cm); - }); - } - - function History(startGen) { - // Arrays of change events and selections. Doing something adds an - // event to done and clears undo. Undoing moves events from done - // to undone, redoing moves them in the other direction. - this.done = []; this.undone = []; - this.undoDepth = Infinity; - // Used to track when changes can be merged into a single undo - // event - this.lastModTime = this.lastSelTime = 0; - this.lastOp = this.lastSelOp = null; - this.lastOrigin = this.lastSelOrigin = null; - // Used by the isClean() method - this.generation = this.maxGeneration = startGen || 1; - } - - // Create a history change event from an updateDoc-style change - // object. - function historyChangeFromChange(doc, change) { - var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)}; - attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); - linkedDocs(doc, function (doc) { return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); }, true); - return histChange - } - - // Pop all selection events off the end of a history array. Stop at - // a change event. - function clearSelectionEvents(array) { - while (array.length) { - var last = lst(array); - if (last.ranges) { array.pop(); } - else { break } - } - } - - // Find the top change event in the history. Pop off selection - // events that are in the way. - function lastChangeEvent(hist, force) { - if (force) { - clearSelectionEvents(hist.done); - return lst(hist.done) - } else if (hist.done.length && !lst(hist.done).ranges) { - return lst(hist.done) - } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) { - hist.done.pop(); - return lst(hist.done) - } - } - - // Register a change in the history. Merges changes that are within - // a single operation, or are close together with an origin that - // allows merging (starting with "+") into a single event. - function addChangeToHistory(doc, change, selAfter, opId) { - var hist = doc.history; - hist.undone.length = 0; - var time = +new Date, cur; - var last; - - if ((hist.lastOp == opId || - hist.lastOrigin == change.origin && change.origin && - ((change.origin.charAt(0) == "+" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) || - change.origin.charAt(0) == "*")) && - (cur = lastChangeEvent(hist, hist.lastOp == opId))) { - // Merge this change into the last event - last = lst(cur.changes); - if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) { - // Optimized case for simple insertion -- don't want to add - // new changesets for every character typed - last.to = changeEnd(change); - } else { - // Add new sub-event - cur.changes.push(historyChangeFromChange(doc, change)); - } - } else { - // Can not be merged, start a new event. - var before = lst(hist.done); - if (!before || !before.ranges) - { pushSelectionToHistory(doc.sel, hist.done); } - cur = {changes: [historyChangeFromChange(doc, change)], - generation: hist.generation}; - hist.done.push(cur); - while (hist.done.length > hist.undoDepth) { - hist.done.shift(); - if (!hist.done[0].ranges) { hist.done.shift(); } - } - } - hist.done.push(selAfter); - hist.generation = ++hist.maxGeneration; - hist.lastModTime = hist.lastSelTime = time; - hist.lastOp = hist.lastSelOp = opId; - hist.lastOrigin = hist.lastSelOrigin = change.origin; - - if (!last) { signal(doc, "historyAdded"); } - } - - function selectionEventCanBeMerged(doc, origin, prev, sel) { - var ch = origin.charAt(0); - return ch == "*" || - ch == "+" && - prev.ranges.length == sel.ranges.length && - prev.somethingSelected() == sel.somethingSelected() && - new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500) - } - - // Called whenever the selection changes, sets the new selection as - // the pending selection in the history, and pushes the old pending - // selection into the 'done' array when it was significantly - // different (in number of selected ranges, emptiness, or time). - function addSelectionToHistory(doc, sel, opId, options) { - var hist = doc.history, origin = options && options.origin; - - // A new event is started when the previous origin does not match - // the current, or the origins don't allow matching. Origins - // starting with * are always merged, those starting with + are - // merged when similar and close together in time. - if (opId == hist.lastSelOp || - (origin && hist.lastSelOrigin == origin && - (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin || - selectionEventCanBeMerged(doc, origin, lst(hist.done), sel)))) - { hist.done[hist.done.length - 1] = sel; } - else - { pushSelectionToHistory(sel, hist.done); } - - hist.lastSelTime = +new Date; - hist.lastSelOrigin = origin; - hist.lastSelOp = opId; - if (options && options.clearRedo !== false) - { clearSelectionEvents(hist.undone); } - } - - function pushSelectionToHistory(sel, dest) { - var top = lst(dest); - if (!(top && top.ranges && top.equals(sel))) - { dest.push(sel); } - } - - // Used to store marked span information in the history. - function attachLocalSpans(doc, change, from, to) { - var existing = change["spans_" + doc.id], n = 0; - doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) { - if (line.markedSpans) - { (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans; } - ++n; - }); - } - - // When un/re-doing restores text containing marked spans, those - // that have been explicitly cleared should not be restored. - function removeClearedSpans(spans) { - if (!spans) { return null } - var out; - for (var i = 0; i < spans.length; ++i) { - if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } } - else if (out) { out.push(spans[i]); } - } - return !out ? spans : out.length ? out : null - } - - // Retrieve and filter the old marked spans stored in a change event. - function getOldSpans(doc, change) { - var found = change["spans_" + doc.id]; - if (!found) { return null } - var nw = []; - for (var i = 0; i < change.text.length; ++i) - { nw.push(removeClearedSpans(found[i])); } - return nw - } - - // Used for un/re-doing changes from the history. Combines the - // result of computing the existing spans with the set of spans that - // existed in the history (so that deleting around a span and then - // undoing brings back the span). - function mergeOldSpans(doc, change) { - var old = getOldSpans(doc, change); - var stretched = stretchSpansOverChange(doc, change); - if (!old) { return stretched } - if (!stretched) { return old } - - for (var i = 0; i < old.length; ++i) { - var oldCur = old[i], stretchCur = stretched[i]; - if (oldCur && stretchCur) { - spans: for (var j = 0; j < stretchCur.length; ++j) { - var span = stretchCur[j]; - for (var k = 0; k < oldCur.length; ++k) - { if (oldCur[k].marker == span.marker) { continue spans } } - oldCur.push(span); - } - } else if (stretchCur) { - old[i] = stretchCur; - } - } - return old - } - - // Used both to provide a JSON-safe object in .getHistory, and, when - // detaching a document, to split the history in two - function copyHistoryArray(events, newGroup, instantiateSel) { - var copy = []; - for (var i = 0; i < events.length; ++i) { - var event = events[i]; - if (event.ranges) { - copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event); - continue - } - var changes = event.changes, newChanges = []; - copy.push({changes: newChanges}); - for (var j = 0; j < changes.length; ++j) { - var change = changes[j], m = (void 0); - newChanges.push({from: change.from, to: change.to, text: change.text}); - if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\d+)$/)) { - if (indexOf(newGroup, Number(m[1])) > -1) { - lst(newChanges)[prop] = change[prop]; - delete change[prop]; - } - } } } - } - } - return copy - } - - // The 'scroll' parameter given to many of these indicated whether - // the new cursor position should be scrolled into view after - // modifying the selection. - - // If shift is held or the extend flag is set, extends a range to - // include a given position (and optionally a second position). - // Otherwise, simply returns the range between the given positions. - // Used for cursor motion and such. - function extendRange(range, head, other, extend) { - if (extend) { - var anchor = range.anchor; - if (other) { - var posBefore = cmp(head, anchor) < 0; - if (posBefore != (cmp(other, anchor) < 0)) { - anchor = head; - head = other; - } else if (posBefore != (cmp(head, other) < 0)) { - head = other; - } - } - return new Range(anchor, head) - } else { - return new Range(other || head, head) - } - } - - // Extend the primary selection range, discard the rest. - function extendSelection(doc, head, other, options, extend) { - if (extend == null) { extend = doc.cm && (doc.cm.display.shift || doc.extend); } - setSelection(doc, new Selection([extendRange(doc.sel.primary(), head, other, extend)], 0), options); - } - - // Extend all selections (pos is an array of selections with length - // equal the number of selections) - function extendSelections(doc, heads, options) { - var out = []; - var extend = doc.cm && (doc.cm.display.shift || doc.extend); - for (var i = 0; i < doc.sel.ranges.length; i++) - { out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend); } - var newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex); - setSelection(doc, newSel, options); - } - - // Updates a single range in the selection. - function replaceOneSelection(doc, i, range, options) { - var ranges = doc.sel.ranges.slice(0); - ranges[i] = range; - setSelection(doc, normalizeSelection(doc.cm, ranges, doc.sel.primIndex), options); - } - - // Reset the selection to a single range. - function setSimpleSelection(doc, anchor, head, options) { - setSelection(doc, simpleSelection(anchor, head), options); - } - - // Give beforeSelectionChange handlers a change to influence a - // selection update. - function filterSelectionChange(doc, sel, options) { - var obj = { - ranges: sel.ranges, - update: function(ranges) { - var this$1 = this; - - this.ranges = []; - for (var i = 0; i < ranges.length; i++) - { this$1.ranges[i] = new Range(clipPos(doc, ranges[i].anchor), - clipPos(doc, ranges[i].head)); } - }, - origin: options && options.origin - }; - signal(doc, "beforeSelectionChange", doc, obj); - if (doc.cm) { signal(doc.cm, "beforeSelectionChange", doc.cm, obj); } - if (obj.ranges != sel.ranges) { return normalizeSelection(doc.cm, obj.ranges, obj.ranges.length - 1) } - else { return sel } - } - - function setSelectionReplaceHistory(doc, sel, options) { - var done = doc.history.done, last = lst(done); - if (last && last.ranges) { - done[done.length - 1] = sel; - setSelectionNoUndo(doc, sel, options); - } else { - setSelection(doc, sel, options); - } - } - - // Set a new selection. - function setSelection(doc, sel, options) { - setSelectionNoUndo(doc, sel, options); - addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options); - } - - function setSelectionNoUndo(doc, sel, options) { - if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange")) - { sel = filterSelectionChange(doc, sel, options); } - - var bias = options && options.bias || - (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1); - setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true)); - - if (!(options && options.scroll === false) && doc.cm) - { ensureCursorVisible(doc.cm); } - } - - function setSelectionInner(doc, sel) { - if (sel.equals(doc.sel)) { return } - - doc.sel = sel; - - if (doc.cm) { - doc.cm.curOp.updateInput = 1; - doc.cm.curOp.selectionChanged = true; - signalCursorActivity(doc.cm); - } - signalLater(doc, "cursorActivity", doc); - } - - // Verify that the selection does not partially select any atomic - // marked ranges. - function reCheckSelection(doc) { - setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false)); - } - - // Return a selection that does not partially select any atomic - // ranges. - function skipAtomicInSelection(doc, sel, bias, mayClear) { - var out; - for (var i = 0; i < sel.ranges.length; i++) { - var range = sel.ranges[i]; - var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i]; - var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear); - var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear); - if (out || newAnchor != range.anchor || newHead != range.head) { - if (!out) { out = sel.ranges.slice(0, i); } - out[i] = new Range(newAnchor, newHead); - } - } - return out ? normalizeSelection(doc.cm, out, sel.primIndex) : sel - } - - function skipAtomicInner(doc, pos, oldPos, dir, mayClear) { - var line = getLine(doc, pos.line); - if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) { - var sp = line.markedSpans[i], m = sp.marker; - if ((sp.from == null || (m.inclusiveLeft ? sp.from <= pos.ch : sp.from < pos.ch)) && - (sp.to == null || (m.inclusiveRight ? sp.to >= pos.ch : sp.to > pos.ch))) { - if (mayClear) { - signal(m, "beforeCursorEnter"); - if (m.explicitlyCleared) { - if (!line.markedSpans) { break } - else {--i; continue} - } - } - if (!m.atomic) { continue } - - if (oldPos) { - var near = m.find(dir < 0 ? 1 : -1), diff = (void 0); - if (dir < 0 ? m.inclusiveRight : m.inclusiveLeft) - { near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null); } - if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0)) - { return skipAtomicInner(doc, near, pos, dir, mayClear) } - } - - var far = m.find(dir < 0 ? -1 : 1); - if (dir < 0 ? m.inclusiveLeft : m.inclusiveRight) - { far = movePos(doc, far, dir, far.line == pos.line ? line : null); } - return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null - } - } } - return pos - } - - // Ensure a given position is not inside an atomic range. - function skipAtomic(doc, pos, oldPos, bias, mayClear) { - var dir = bias || 1; - var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) || - (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) || - skipAtomicInner(doc, pos, oldPos, -dir, mayClear) || - (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true)); - if (!found) { - doc.cantEdit = true; - return Pos(doc.first, 0) - } - return found - } - - function movePos(doc, pos, dir, line) { - if (dir < 0 && pos.ch == 0) { - if (pos.line > doc.first) { return clipPos(doc, Pos(pos.line - 1)) } - else { return null } - } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) { - if (pos.line < doc.first + doc.size - 1) { return Pos(pos.line + 1, 0) } - else { return null } - } else { - return new Pos(pos.line, pos.ch + dir) - } - } - - function selectAll(cm) { - cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll); - } - - // UPDATING - - // Allow "beforeChange" event handlers to influence a change - function filterChange(doc, change, update) { - var obj = { - canceled: false, - from: change.from, - to: change.to, - text: change.text, - origin: change.origin, - cancel: function () { return obj.canceled = true; } - }; - if (update) { obj.update = function (from, to, text, origin) { - if (from) { obj.from = clipPos(doc, from); } - if (to) { obj.to = clipPos(doc, to); } - if (text) { obj.text = text; } - if (origin !== undefined) { obj.origin = origin; } - }; } - signal(doc, "beforeChange", doc, obj); - if (doc.cm) { signal(doc.cm, "beforeChange", doc.cm, obj); } - - if (obj.canceled) { - if (doc.cm) { doc.cm.curOp.updateInput = 2; } - return null - } - return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin} - } - - // Apply a change to a document, and add it to the document's - // history, and propagating it to all linked documents. - function makeChange(doc, change, ignoreReadOnly) { - if (doc.cm) { - if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) } - if (doc.cm.state.suppressEdits) { return } - } - - if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) { - change = filterChange(doc, change, true); - if (!change) { return } - } - - // Possibly split or suppress the update based on the presence - // of read-only spans in its range. - var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to); - if (split) { - for (var i = split.length - 1; i >= 0; --i) - { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [""] : change.text, origin: change.origin}); } - } else { - makeChangeInner(doc, change); - } - } - - function makeChangeInner(doc, change) { - if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) { return } - var selAfter = computeSelAfterChange(doc, change); - addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN); - - makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change)); - var rebased = []; - - linkedDocs(doc, function (doc, sharedHist) { - if (!sharedHist && indexOf(rebased, doc.history) == -1) { - rebaseHist(doc.history, change); - rebased.push(doc.history); - } - makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change)); - }); - } - - // Revert a change stored in a document's history. - function makeChangeFromHistory(doc, type, allowSelectionOnly) { - var suppress = doc.cm && doc.cm.state.suppressEdits; - if (suppress && !allowSelectionOnly) { return } - - var hist = doc.history, event, selAfter = doc.sel; - var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done; - - // Verify that there is a useable event (so that ctrl-z won't - // needlessly clear selection events) - var i = 0; - for (; i < source.length; i++) { - event = source[i]; - if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges) - { break } - } - if (i == source.length) { return } - hist.lastOrigin = hist.lastSelOrigin = null; - - for (;;) { - event = source.pop(); - if (event.ranges) { - pushSelectionToHistory(event, dest); - if (allowSelectionOnly && !event.equals(doc.sel)) { - setSelection(doc, event, {clearRedo: false}); - return - } - selAfter = event; - } else if (suppress) { - source.push(event); - return - } else { break } - } - - // Build up a reverse change object to add to the opposite history - // stack (redo when undoing, and vice versa). - var antiChanges = []; - pushSelectionToHistory(selAfter, dest); - dest.push({changes: antiChanges, generation: hist.generation}); - hist.generation = event.generation || ++hist.maxGeneration; - - var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange"); - - var loop = function ( i ) { - var change = event.changes[i]; - change.origin = type; - if (filter && !filterChange(doc, change, false)) { - source.length = 0; - return {} - } - - antiChanges.push(historyChangeFromChange(doc, change)); - - var after = i ? computeSelAfterChange(doc, change) : lst(source); - makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change)); - if (!i && doc.cm) { doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); } - var rebased = []; - - // Propagate to the linked documents - linkedDocs(doc, function (doc, sharedHist) { - if (!sharedHist && indexOf(rebased, doc.history) == -1) { - rebaseHist(doc.history, change); - rebased.push(doc.history); - } - makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change)); - }); - }; - - for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) { - var returned = loop( i$1 ); - - if ( returned ) return returned.v; - } - } - - // Sub-views need their line numbers shifted when text is added - // above or below them in the parent document. - function shiftDoc(doc, distance) { - if (distance == 0) { return } - doc.first += distance; - doc.sel = new Selection(map(doc.sel.ranges, function (range) { return new Range( - Pos(range.anchor.line + distance, range.anchor.ch), - Pos(range.head.line + distance, range.head.ch) - ); }), doc.sel.primIndex); - if (doc.cm) { - regChange(doc.cm, doc.first, doc.first - distance, distance); - for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++) - { regLineChange(doc.cm, l, "gutter"); } - } - } - - // More lower-level change function, handling only a single document - // (not linked ones). - function makeChangeSingleDoc(doc, change, selAfter, spans) { - if (doc.cm && !doc.cm.curOp) - { return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) } - - if (change.to.line < doc.first) { - shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line)); - return - } - if (change.from.line > doc.lastLine()) { return } - - // Clip the change to the size of this doc - if (change.from.line < doc.first) { - var shift = change.text.length - 1 - (doc.first - change.from.line); - shiftDoc(doc, shift); - change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch), - text: [lst(change.text)], origin: change.origin}; - } - var last = doc.lastLine(); - if (change.to.line > last) { - change = {from: change.from, to: Pos(last, getLine(doc, last).text.length), - text: [change.text[0]], origin: change.origin}; - } - - change.removed = getBetween(doc, change.from, change.to); - - if (!selAfter) { selAfter = computeSelAfterChange(doc, change); } - if (doc.cm) { makeChangeSingleDocInEditor(doc.cm, change, spans); } - else { updateDoc(doc, change, spans); } - setSelectionNoUndo(doc, selAfter, sel_dontScroll); - } - - // Handle the interaction of a change to a document with the editor - // that this document is part of. - function makeChangeSingleDocInEditor(cm, change, spans) { - var doc = cm.doc, display = cm.display, from = change.from, to = change.to; - - var recomputeMaxLength = false, checkWidthStart = from.line; - if (!cm.options.lineWrapping) { - checkWidthStart = lineNo(visualLine(getLine(doc, from.line))); - doc.iter(checkWidthStart, to.line + 1, function (line) { - if (line == display.maxLine) { - recomputeMaxLength = true; - return true - } - }); - } - - if (doc.sel.contains(change.from, change.to) > -1) - { signalCursorActivity(cm); } - - updateDoc(doc, change, spans, estimateHeight(cm)); - - if (!cm.options.lineWrapping) { - doc.iter(checkWidthStart, from.line + change.text.length, function (line) { - var len = lineLength(line); - if (len > display.maxLineLength) { - display.maxLine = line; - display.maxLineLength = len; - display.maxLineChanged = true; - recomputeMaxLength = false; - } - }); - if (recomputeMaxLength) { cm.curOp.updateMaxLine = true; } - } - - retreatFrontier(doc, from.line); - startWorker(cm, 400); - - var lendiff = change.text.length - (to.line - from.line) - 1; - // Remember that these lines changed, for updating the display - if (change.full) - { regChange(cm); } - else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change)) - { regLineChange(cm, from.line, "text"); } - else - { regChange(cm, from.line, to.line + 1, lendiff); } - - var changesHandler = hasHandler(cm, "changes"), changeHandler = hasHandler(cm, "change"); - if (changeHandler || changesHandler) { - var obj = { - from: from, to: to, - text: change.text, - removed: change.removed, - origin: change.origin - }; - if (changeHandler) { signalLater(cm, "change", cm, obj); } - if (changesHandler) { (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); } - } - cm.display.selForContextMenu = null; - } - - function replaceRange(doc, code, from, to, origin) { - var assign; - - if (!to) { to = from; } - if (cmp(to, from) < 0) { (assign = [to, from], from = assign[0], to = assign[1]); } - if (typeof code == "string") { code = doc.splitLines(code); } - makeChange(doc, {from: from, to: to, text: code, origin: origin}); - } - - // Rebasing/resetting history to deal with externally-sourced changes - - function rebaseHistSelSingle(pos, from, to, diff) { - if (to < pos.line) { - pos.line += diff; - } else if (from < pos.line) { - pos.line = from; - pos.ch = 0; - } - } - - // Tries to rebase an array of history events given a change in the - // document. If the change touches the same lines as the event, the - // event, and everything 'behind' it, is discarded. If the change is - // before the event, the event's positions are updated. Uses a - // copy-on-write scheme for the positions, to avoid having to - // reallocate them all on every rebase, but also avoid problems with - // shared position objects being unsafely updated. - function rebaseHistArray(array, from, to, diff) { - for (var i = 0; i < array.length; ++i) { - var sub = array[i], ok = true; - if (sub.ranges) { - if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; } - for (var j = 0; j < sub.ranges.length; j++) { - rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff); - rebaseHistSelSingle(sub.ranges[j].head, from, to, diff); - } - continue - } - for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) { - var cur = sub.changes[j$1]; - if (to < cur.from.line) { - cur.from = Pos(cur.from.line + diff, cur.from.ch); - cur.to = Pos(cur.to.line + diff, cur.to.ch); - } else if (from <= cur.to.line) { - ok = false; - break - } - } - if (!ok) { - array.splice(0, i + 1); - i = 0; - } - } - } - - function rebaseHist(hist, change) { - var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1; - rebaseHistArray(hist.done, from, to, diff); - rebaseHistArray(hist.undone, from, to, diff); - } - - // Utility for applying a change to a line by handle or number, - // returning the number and optionally registering the line as - // changed. - function changeLine(doc, handle, changeType, op) { - var no = handle, line = handle; - if (typeof handle == "number") { line = getLine(doc, clipLine(doc, handle)); } - else { no = lineNo(handle); } - if (no == null) { return null } - if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); } - return line - } - - // The document is represented as a BTree consisting of leaves, with - // chunk of lines in them, and branches, with up to ten leaves or - // other branch nodes below them. The top node is always a branch - // node, and is the document object itself (meaning it has - // additional methods and properties). - // - // All nodes have parent links. The tree is used both to go from - // line numbers to line objects, and to go from objects to numbers. - // It also indexes by height, and is used to convert between height - // and line object, and to find the total height of the document. - // - // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html - - function LeafChunk(lines) { - var this$1 = this; - - this.lines = lines; - this.parent = null; - var height = 0; - for (var i = 0; i < lines.length; ++i) { - lines[i].parent = this$1; - height += lines[i].height; - } - this.height = height; - } - - LeafChunk.prototype = { - chunkSize: function() { return this.lines.length }, - - // Remove the n lines at offset 'at'. - removeInner: function(at, n) { - var this$1 = this; - - for (var i = at, e = at + n; i < e; ++i) { - var line = this$1.lines[i]; - this$1.height -= line.height; - cleanUpLine(line); - signalLater(line, "delete"); - } - this.lines.splice(at, n); - }, - - // Helper used to collapse a small branch into a single leaf. - collapse: function(lines) { - lines.push.apply(lines, this.lines); - }, - - // Insert the given array of lines at offset 'at', count them as - // having the given height. - insertInner: function(at, lines, height) { - var this$1 = this; - - this.height += height; - this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at)); - for (var i = 0; i < lines.length; ++i) { lines[i].parent = this$1; } - }, - - // Used to iterate over a part of the tree. - iterN: function(at, n, op) { - var this$1 = this; - - for (var e = at + n; at < e; ++at) - { if (op(this$1.lines[at])) { return true } } - } - }; - - function BranchChunk(children) { - var this$1 = this; - - this.children = children; - var size = 0, height = 0; - for (var i = 0; i < children.length; ++i) { - var ch = children[i]; - size += ch.chunkSize(); height += ch.height; - ch.parent = this$1; - } - this.size = size; - this.height = height; - this.parent = null; - } - - BranchChunk.prototype = { - chunkSize: function() { return this.size }, - - removeInner: function(at, n) { - var this$1 = this; - - this.size -= n; - for (var i = 0; i < this.children.length; ++i) { - var child = this$1.children[i], sz = child.chunkSize(); - if (at < sz) { - var rm = Math.min(n, sz - at), oldHeight = child.height; - child.removeInner(at, rm); - this$1.height -= oldHeight - child.height; - if (sz == rm) { this$1.children.splice(i--, 1); child.parent = null; } - if ((n -= rm) == 0) { break } - at = 0; - } else { at -= sz; } - } - // If the result is smaller than 25 lines, ensure that it is a - // single leaf node. - if (this.size - n < 25 && - (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) { - var lines = []; - this.collapse(lines); - this.children = [new LeafChunk(lines)]; - this.children[0].parent = this; - } - }, - - collapse: function(lines) { - var this$1 = this; - - for (var i = 0; i < this.children.length; ++i) { this$1.children[i].collapse(lines); } - }, - - insertInner: function(at, lines, height) { - var this$1 = this; - - this.size += lines.length; - this.height += height; - for (var i = 0; i < this.children.length; ++i) { - var child = this$1.children[i], sz = child.chunkSize(); - if (at <= sz) { - child.insertInner(at, lines, height); - if (child.lines && child.lines.length > 50) { - // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced. - // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest. - var remaining = child.lines.length % 25 + 25; - for (var pos = remaining; pos < child.lines.length;) { - var leaf = new LeafChunk(child.lines.slice(pos, pos += 25)); - child.height -= leaf.height; - this$1.children.splice(++i, 0, leaf); - leaf.parent = this$1; - } - child.lines = child.lines.slice(0, remaining); - this$1.maybeSpill(); - } - break - } - at -= sz; - } - }, - - // When a node has grown, check whether it should be split. - maybeSpill: function() { - if (this.children.length <= 10) { return } - var me = this; - do { - var spilled = me.children.splice(me.children.length - 5, 5); - var sibling = new BranchChunk(spilled); - if (!me.parent) { // Become the parent node - var copy = new BranchChunk(me.children); - copy.parent = me; - me.children = [copy, sibling]; - me = copy; - } else { - me.size -= sibling.size; - me.height -= sibling.height; - var myIndex = indexOf(me.parent.children, me); - me.parent.children.splice(myIndex + 1, 0, sibling); - } - sibling.parent = me.parent; - } while (me.children.length > 10) - me.parent.maybeSpill(); - }, - - iterN: function(at, n, op) { - var this$1 = this; - - for (var i = 0; i < this.children.length; ++i) { - var child = this$1.children[i], sz = child.chunkSize(); - if (at < sz) { - var used = Math.min(n, sz - at); - if (child.iterN(at, used, op)) { return true } - if ((n -= used) == 0) { break } - at = 0; - } else { at -= sz; } - } - } - }; - - // Line widgets are block elements displayed above or below a line. - - var LineWidget = function(doc, node, options) { - var this$1 = this; - - if (options) { for (var opt in options) { if (options.hasOwnProperty(opt)) - { this$1[opt] = options[opt]; } } } - this.doc = doc; - this.node = node; - }; - - LineWidget.prototype.clear = function () { - var this$1 = this; - - var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line); - if (no == null || !ws) { return } - for (var i = 0; i < ws.length; ++i) { if (ws[i] == this$1) { ws.splice(i--, 1); } } - if (!ws.length) { line.widgets = null; } - var height = widgetHeight(this); - updateLineHeight(line, Math.max(0, line.height - height)); - if (cm) { - runInOp(cm, function () { - adjustScrollWhenAboveVisible(cm, line, -height); - regLineChange(cm, no, "widget"); - }); - signalLater(cm, "lineWidgetCleared", cm, this, no); - } - }; - - LineWidget.prototype.changed = function () { - var this$1 = this; - - var oldH = this.height, cm = this.doc.cm, line = this.line; - this.height = null; - var diff = widgetHeight(this) - oldH; - if (!diff) { return } - if (!lineIsHidden(this.doc, line)) { updateLineHeight(line, line.height + diff); } - if (cm) { - runInOp(cm, function () { - cm.curOp.forceUpdate = true; - adjustScrollWhenAboveVisible(cm, line, diff); - signalLater(cm, "lineWidgetChanged", cm, this$1, lineNo(line)); - }); - } - }; - eventMixin(LineWidget); - - function adjustScrollWhenAboveVisible(cm, line, diff) { - if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop)) - { addToScrollTop(cm, diff); } - } - - function addLineWidget(doc, handle, node, options) { - var widget = new LineWidget(doc, node, options); - var cm = doc.cm; - if (cm && widget.noHScroll) { cm.display.alignWidgets = true; } - changeLine(doc, handle, "widget", function (line) { - var widgets = line.widgets || (line.widgets = []); - if (widget.insertAt == null) { widgets.push(widget); } - else { widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget); } - widget.line = line; - if (cm && !lineIsHidden(doc, line)) { - var aboveVisible = heightAtLine(line) < doc.scrollTop; - updateLineHeight(line, line.height + widgetHeight(widget)); - if (aboveVisible) { addToScrollTop(cm, widget.height); } - cm.curOp.forceUpdate = true; - } - return true - }); - if (cm) { signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle)); } - return widget - } - - // TEXTMARKERS - - // Created with markText and setBookmark methods. A TextMarker is a - // handle that can be used to clear or find a marked position in the - // document. Line objects hold arrays (markedSpans) containing - // {from, to, marker} object pointing to such marker objects, and - // indicating that such a marker is present on that line. Multiple - // lines may point to the same marker when it spans across lines. - // The spans will have null for their from/to properties when the - // marker continues beyond the start/end of the line. Markers have - // links back to the lines they currently touch. - - // Collapsed markers have unique ids, in order to be able to order - // them, which is needed for uniquely determining an outer marker - // when they overlap (they may nest, but not partially overlap). - var nextMarkerId = 0; - - var TextMarker = function(doc, type) { - this.lines = []; - this.type = type; - this.doc = doc; - this.id = ++nextMarkerId; - }; - - // Clear the marker. - TextMarker.prototype.clear = function () { - var this$1 = this; - - if (this.explicitlyCleared) { return } - var cm = this.doc.cm, withOp = cm && !cm.curOp; - if (withOp) { startOperation(cm); } - if (hasHandler(this, "clear")) { - var found = this.find(); - if (found) { signalLater(this, "clear", found.from, found.to); } - } - var min = null, max = null; - for (var i = 0; i < this.lines.length; ++i) { - var line = this$1.lines[i]; - var span = getMarkedSpanFor(line.markedSpans, this$1); - if (cm && !this$1.collapsed) { regLineChange(cm, lineNo(line), "text"); } - else if (cm) { - if (span.to != null) { max = lineNo(line); } - if (span.from != null) { min = lineNo(line); } - } - line.markedSpans = removeMarkedSpan(line.markedSpans, span); - if (span.from == null && this$1.collapsed && !lineIsHidden(this$1.doc, line) && cm) - { updateLineHeight(line, textHeight(cm.display)); } - } - if (cm && this.collapsed && !cm.options.lineWrapping) { for (var i$1 = 0; i$1 < this.lines.length; ++i$1) { - var visual = visualLine(this$1.lines[i$1]), len = lineLength(visual); - if (len > cm.display.maxLineLength) { - cm.display.maxLine = visual; - cm.display.maxLineLength = len; - cm.display.maxLineChanged = true; - } - } } - - if (min != null && cm && this.collapsed) { regChange(cm, min, max + 1); } - this.lines.length = 0; - this.explicitlyCleared = true; - if (this.atomic && this.doc.cantEdit) { - this.doc.cantEdit = false; - if (cm) { reCheckSelection(cm.doc); } - } - if (cm) { signalLater(cm, "markerCleared", cm, this, min, max); } - if (withOp) { endOperation(cm); } - if (this.parent) { this.parent.clear(); } - }; - - // Find the position of the marker in the document. Returns a {from, - // to} object by default. Side can be passed to get a specific side - // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the - // Pos objects returned contain a line object, rather than a line - // number (used to prevent looking up the same line twice). - TextMarker.prototype.find = function (side, lineObj) { - var this$1 = this; - - if (side == null && this.type == "bookmark") { side = 1; } - var from, to; - for (var i = 0; i < this.lines.length; ++i) { - var line = this$1.lines[i]; - var span = getMarkedSpanFor(line.markedSpans, this$1); - if (span.from != null) { - from = Pos(lineObj ? line : lineNo(line), span.from); - if (side == -1) { return from } - } - if (span.to != null) { - to = Pos(lineObj ? line : lineNo(line), span.to); - if (side == 1) { return to } - } - } - return from && {from: from, to: to} - }; - - // Signals that the marker's widget changed, and surrounding layout - // should be recomputed. - TextMarker.prototype.changed = function () { - var this$1 = this; - - var pos = this.find(-1, true), widget = this, cm = this.doc.cm; - if (!pos || !cm) { return } - runInOp(cm, function () { - var line = pos.line, lineN = lineNo(pos.line); - var view = findViewForLine(cm, lineN); - if (view) { - clearLineMeasurementCacheFor(view); - cm.curOp.selectionChanged = cm.curOp.forceUpdate = true; - } - cm.curOp.updateMaxLine = true; - if (!lineIsHidden(widget.doc, line) && widget.height != null) { - var oldHeight = widget.height; - widget.height = null; - var dHeight = widgetHeight(widget) - oldHeight; - if (dHeight) - { updateLineHeight(line, line.height + dHeight); } - } - signalLater(cm, "markerChanged", cm, this$1); - }); - }; - - TextMarker.prototype.attachLine = function (line) { - if (!this.lines.length && this.doc.cm) { - var op = this.doc.cm.curOp; - if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1) - { (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); } - } - this.lines.push(line); - }; - - TextMarker.prototype.detachLine = function (line) { - this.lines.splice(indexOf(this.lines, line), 1); - if (!this.lines.length && this.doc.cm) { - var op = this.doc.cm.curOp - ;(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this); - } - }; - eventMixin(TextMarker); - - // Create a marker, wire it up to the right lines, and - function markText(doc, from, to, options, type) { - // Shared markers (across linked documents) are handled separately - // (markTextShared will call out to this again, once per - // document). - if (options && options.shared) { return markTextShared(doc, from, to, options, type) } - // Ensure we are in an operation. - if (doc.cm && !doc.cm.curOp) { return operation(doc.cm, markText)(doc, from, to, options, type) } - - var marker = new TextMarker(doc, type), diff = cmp(from, to); - if (options) { copyObj(options, marker, false); } - // Don't connect empty markers unless clearWhenEmpty is false - if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false) - { return marker } - if (marker.replacedWith) { - // Showing up as a widget implies collapsed (widget replaces text) - marker.collapsed = true; - marker.widgetNode = eltP("span", [marker.replacedWith], "CodeMirror-widget"); - if (!options.handleMouseEvents) { marker.widgetNode.setAttribute("cm-ignore-events", "true"); } - if (options.insertLeft) { marker.widgetNode.insertLeft = true; } - } - if (marker.collapsed) { - if (conflictingCollapsedRange(doc, from.line, from, to, marker) || - from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker)) - { throw new Error("Inserting collapsed marker partially overlapping an existing one") } - seeCollapsedSpans(); - } - - if (marker.addToHistory) - { addChangeToHistory(doc, {from: from, to: to, origin: "markText"}, doc.sel, NaN); } - - var curLine = from.line, cm = doc.cm, updateMaxLine; - doc.iter(curLine, to.line + 1, function (line) { - if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine) - { updateMaxLine = true; } - if (marker.collapsed && curLine != from.line) { updateLineHeight(line, 0); } - addMarkedSpan(line, new MarkedSpan(marker, - curLine == from.line ? from.ch : null, - curLine == to.line ? to.ch : null)); - ++curLine; - }); - // lineIsHidden depends on the presence of the spans, so needs a second pass - if (marker.collapsed) { doc.iter(from.line, to.line + 1, function (line) { - if (lineIsHidden(doc, line)) { updateLineHeight(line, 0); } - }); } - - if (marker.clearOnEnter) { on(marker, "beforeCursorEnter", function () { return marker.clear(); }); } - - if (marker.readOnly) { - seeReadOnlySpans(); - if (doc.history.done.length || doc.history.undone.length) - { doc.clearHistory(); } - } - if (marker.collapsed) { - marker.id = ++nextMarkerId; - marker.atomic = true; - } - if (cm) { - // Sync editor state - if (updateMaxLine) { cm.curOp.updateMaxLine = true; } - if (marker.collapsed) - { regChange(cm, from.line, to.line + 1); } - else if (marker.className || marker.startStyle || marker.endStyle || marker.css || - marker.attributes || marker.title) - { for (var i = from.line; i <= to.line; i++) { regLineChange(cm, i, "text"); } } - if (marker.atomic) { reCheckSelection(cm.doc); } - signalLater(cm, "markerAdded", cm, marker); - } - return marker - } - - // SHARED TEXTMARKERS - - // A shared marker spans multiple linked documents. It is - // implemented as a meta-marker-object controlling multiple normal - // markers. - var SharedTextMarker = function(markers, primary) { - var this$1 = this; - - this.markers = markers; - this.primary = primary; - for (var i = 0; i < markers.length; ++i) - { markers[i].parent = this$1; } - }; - - SharedTextMarker.prototype.clear = function () { - var this$1 = this; - - if (this.explicitlyCleared) { return } - this.explicitlyCleared = true; - for (var i = 0; i < this.markers.length; ++i) - { this$1.markers[i].clear(); } - signalLater(this, "clear"); - }; - - SharedTextMarker.prototype.find = function (side, lineObj) { - return this.primary.find(side, lineObj) - }; - eventMixin(SharedTextMarker); - - function markTextShared(doc, from, to, options, type) { - options = copyObj(options); - options.shared = false; - var markers = [markText(doc, from, to, options, type)], primary = markers[0]; - var widget = options.widgetNode; - linkedDocs(doc, function (doc) { - if (widget) { options.widgetNode = widget.cloneNode(true); } - markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type)); - for (var i = 0; i < doc.linked.length; ++i) - { if (doc.linked[i].isParent) { return } } - primary = lst(markers); - }); - return new SharedTextMarker(markers, primary) - } - - function findSharedMarkers(doc) { - return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), function (m) { return m.parent; }) - } - - function copySharedMarkers(doc, markers) { - for (var i = 0; i < markers.length; i++) { - var marker = markers[i], pos = marker.find(); - var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to); - if (cmp(mFrom, mTo)) { - var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type); - marker.markers.push(subMark); - subMark.parent = marker; - } - } - } - - function detachSharedMarkers(markers) { - var loop = function ( i ) { - var marker = markers[i], linked = [marker.primary.doc]; - linkedDocs(marker.primary.doc, function (d) { return linked.push(d); }); - for (var j = 0; j < marker.markers.length; j++) { - var subMarker = marker.markers[j]; - if (indexOf(linked, subMarker.doc) == -1) { - subMarker.parent = null; - marker.markers.splice(j--, 1); - } - } - }; - - for (var i = 0; i < markers.length; i++) loop( i ); - } - - var nextDocId = 0; - var Doc = function(text, mode, firstLine, lineSep, direction) { - if (!(this instanceof Doc)) { return new Doc(text, mode, firstLine, lineSep, direction) } - if (firstLine == null) { firstLine = 0; } - - BranchChunk.call(this, [new LeafChunk([new Line("", null)])]); - this.first = firstLine; - this.scrollTop = this.scrollLeft = 0; - this.cantEdit = false; - this.cleanGeneration = 1; - this.modeFrontier = this.highlightFrontier = firstLine; - var start = Pos(firstLine, 0); - this.sel = simpleSelection(start); - this.history = new History(null); - this.id = ++nextDocId; - this.modeOption = mode; - this.lineSep = lineSep; - this.direction = (direction == "rtl") ? "rtl" : "ltr"; - this.extend = false; - - if (typeof text == "string") { text = this.splitLines(text); } - updateDoc(this, {from: start, to: start, text: text}); - setSelection(this, simpleSelection(start), sel_dontScroll); - }; - - Doc.prototype = createObj(BranchChunk.prototype, { - constructor: Doc, - // Iterate over the document. Supports two forms -- with only one - // argument, it calls that for each line in the document. With - // three, it iterates over the range given by the first two (with - // the second being non-inclusive). - iter: function(from, to, op) { - if (op) { this.iterN(from - this.first, to - from, op); } - else { this.iterN(this.first, this.first + this.size, from); } - }, - - // Non-public interface for adding and removing lines. - insert: function(at, lines) { - var height = 0; - for (var i = 0; i < lines.length; ++i) { height += lines[i].height; } - this.insertInner(at - this.first, lines, height); - }, - remove: function(at, n) { this.removeInner(at - this.first, n); }, - - // From here, the methods are part of the public interface. Most - // are also available from CodeMirror (editor) instances. - - getValue: function(lineSep) { - var lines = getLines(this, this.first, this.first + this.size); - if (lineSep === false) { return lines } - return lines.join(lineSep || this.lineSeparator()) - }, - setValue: docMethodOp(function(code) { - var top = Pos(this.first, 0), last = this.first + this.size - 1; - makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length), - text: this.splitLines(code), origin: "setValue", full: true}, true); - if (this.cm) { scrollToCoords(this.cm, 0, 0); } - setSelection(this, simpleSelection(top), sel_dontScroll); - }), - replaceRange: function(code, from, to, origin) { - from = clipPos(this, from); - to = to ? clipPos(this, to) : from; - replaceRange(this, code, from, to, origin); - }, - getRange: function(from, to, lineSep) { - var lines = getBetween(this, clipPos(this, from), clipPos(this, to)); - if (lineSep === false) { return lines } - return lines.join(lineSep || this.lineSeparator()) - }, - - getLine: function(line) {var l = this.getLineHandle(line); return l && l.text}, - - getLineHandle: function(line) {if (isLine(this, line)) { return getLine(this, line) }}, - getLineNumber: function(line) {return lineNo(line)}, - - getLineHandleVisualStart: function(line) { - if (typeof line == "number") { line = getLine(this, line); } - return visualLine(line) - }, - - lineCount: function() {return this.size}, - firstLine: function() {return this.first}, - lastLine: function() {return this.first + this.size - 1}, - - clipPos: function(pos) {return clipPos(this, pos)}, - - getCursor: function(start) { - var range$$1 = this.sel.primary(), pos; - if (start == null || start == "head") { pos = range$$1.head; } - else if (start == "anchor") { pos = range$$1.anchor; } - else if (start == "end" || start == "to" || start === false) { pos = range$$1.to(); } - else { pos = range$$1.from(); } - return pos - }, - listSelections: function() { return this.sel.ranges }, - somethingSelected: function() {return this.sel.somethingSelected()}, - - setCursor: docMethodOp(function(line, ch, options) { - setSimpleSelection(this, clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line), null, options); - }), - setSelection: docMethodOp(function(anchor, head, options) { - setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options); - }), - extendSelection: docMethodOp(function(head, other, options) { - extendSelection(this, clipPos(this, head), other && clipPos(this, other), options); - }), - extendSelections: docMethodOp(function(heads, options) { - extendSelections(this, clipPosArray(this, heads), options); - }), - extendSelectionsBy: docMethodOp(function(f, options) { - var heads = map(this.sel.ranges, f); - extendSelections(this, clipPosArray(this, heads), options); - }), - setSelections: docMethodOp(function(ranges, primary, options) { - var this$1 = this; - - if (!ranges.length) { return } - var out = []; - for (var i = 0; i < ranges.length; i++) - { out[i] = new Range(clipPos(this$1, ranges[i].anchor), - clipPos(this$1, ranges[i].head)); } - if (primary == null) { primary = Math.min(ranges.length - 1, this.sel.primIndex); } - setSelection(this, normalizeSelection(this.cm, out, primary), options); - }), - addSelection: docMethodOp(function(anchor, head, options) { - var ranges = this.sel.ranges.slice(0); - ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor))); - setSelection(this, normalizeSelection(this.cm, ranges, ranges.length - 1), options); - }), - - getSelection: function(lineSep) { - var this$1 = this; - - var ranges = this.sel.ranges, lines; - for (var i = 0; i < ranges.length; i++) { - var sel = getBetween(this$1, ranges[i].from(), ranges[i].to()); - lines = lines ? lines.concat(sel) : sel; - } - if (lineSep === false) { return lines } - else { return lines.join(lineSep || this.lineSeparator()) } - }, - getSelections: function(lineSep) { - var this$1 = this; - - var parts = [], ranges = this.sel.ranges; - for (var i = 0; i < ranges.length; i++) { - var sel = getBetween(this$1, ranges[i].from(), ranges[i].to()); - if (lineSep !== false) { sel = sel.join(lineSep || this$1.lineSeparator()); } - parts[i] = sel; - } - return parts - }, - replaceSelection: function(code, collapse, origin) { - var dup = []; - for (var i = 0; i < this.sel.ranges.length; i++) - { dup[i] = code; } - this.replaceSelections(dup, collapse, origin || "+input"); - }, - replaceSelections: docMethodOp(function(code, collapse, origin) { - var this$1 = this; - - var changes = [], sel = this.sel; - for (var i = 0; i < sel.ranges.length; i++) { - var range$$1 = sel.ranges[i]; - changes[i] = {from: range$$1.from(), to: range$$1.to(), text: this$1.splitLines(code[i]), origin: origin}; - } - var newSel = collapse && collapse != "end" && computeReplacedSel(this, changes, collapse); - for (var i$1 = changes.length - 1; i$1 >= 0; i$1--) - { makeChange(this$1, changes[i$1]); } - if (newSel) { setSelectionReplaceHistory(this, newSel); } - else if (this.cm) { ensureCursorVisible(this.cm); } - }), - undo: docMethodOp(function() {makeChangeFromHistory(this, "undo");}), - redo: docMethodOp(function() {makeChangeFromHistory(this, "redo");}), - undoSelection: docMethodOp(function() {makeChangeFromHistory(this, "undo", true);}), - redoSelection: docMethodOp(function() {makeChangeFromHistory(this, "redo", true);}), - - setExtending: function(val) {this.extend = val;}, - getExtending: function() {return this.extend}, - - historySize: function() { - var hist = this.history, done = 0, undone = 0; - for (var i = 0; i < hist.done.length; i++) { if (!hist.done[i].ranges) { ++done; } } - for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { if (!hist.undone[i$1].ranges) { ++undone; } } - return {undo: done, redo: undone} - }, - clearHistory: function() {this.history = new History(this.history.maxGeneration);}, - - markClean: function() { - this.cleanGeneration = this.changeGeneration(true); - }, - changeGeneration: function(forceSplit) { - if (forceSplit) - { this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; } - return this.history.generation - }, - isClean: function (gen) { - return this.history.generation == (gen || this.cleanGeneration) - }, - - getHistory: function() { - return {done: copyHistoryArray(this.history.done), - undone: copyHistoryArray(this.history.undone)} - }, - setHistory: function(histData) { - var hist = this.history = new History(this.history.maxGeneration); - hist.done = copyHistoryArray(histData.done.slice(0), null, true); - hist.undone = copyHistoryArray(histData.undone.slice(0), null, true); - }, - - setGutterMarker: docMethodOp(function(line, gutterID, value) { - return changeLine(this, line, "gutter", function (line) { - var markers = line.gutterMarkers || (line.gutterMarkers = {}); - markers[gutterID] = value; - if (!value && isEmpty(markers)) { line.gutterMarkers = null; } - return true - }) - }), - - clearGutter: docMethodOp(function(gutterID) { - var this$1 = this; - - this.iter(function (line) { - if (line.gutterMarkers && line.gutterMarkers[gutterID]) { - changeLine(this$1, line, "gutter", function () { - line.gutterMarkers[gutterID] = null; - if (isEmpty(line.gutterMarkers)) { line.gutterMarkers = null; } - return true - }); - } - }); - }), - - lineInfo: function(line) { - var n; - if (typeof line == "number") { - if (!isLine(this, line)) { return null } - n = line; - line = getLine(this, line); - if (!line) { return null } - } else { - n = lineNo(line); - if (n == null) { return null } - } - return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers, - textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass, - widgets: line.widgets} - }, - - addLineClass: docMethodOp(function(handle, where, cls) { - return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) { - var prop = where == "text" ? "textClass" - : where == "background" ? "bgClass" - : where == "gutter" ? "gutterClass" : "wrapClass"; - if (!line[prop]) { line[prop] = cls; } - else if (classTest(cls).test(line[prop])) { return false } - else { line[prop] += " " + cls; } - return true - }) - }), - removeLineClass: docMethodOp(function(handle, where, cls) { - return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) { - var prop = where == "text" ? "textClass" - : where == "background" ? "bgClass" - : where == "gutter" ? "gutterClass" : "wrapClass"; - var cur = line[prop]; - if (!cur) { return false } - else if (cls == null) { line[prop] = null; } - else { - var found = cur.match(classTest(cls)); - if (!found) { return false } - var end = found.index + found[0].length; - line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null; - } - return true - }) - }), - - addLineWidget: docMethodOp(function(handle, node, options) { - return addLineWidget(this, handle, node, options) - }), - removeLineWidget: function(widget) { widget.clear(); }, - - markText: function(from, to, options) { - return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || "range") - }, - setBookmark: function(pos, options) { - var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options), - insertLeft: options && options.insertLeft, - clearWhenEmpty: false, shared: options && options.shared, - handleMouseEvents: options && options.handleMouseEvents}; - pos = clipPos(this, pos); - return markText(this, pos, pos, realOpts, "bookmark") - }, - findMarksAt: function(pos) { - pos = clipPos(this, pos); - var markers = [], spans = getLine(this, pos.line).markedSpans; - if (spans) { for (var i = 0; i < spans.length; ++i) { - var span = spans[i]; - if ((span.from == null || span.from <= pos.ch) && - (span.to == null || span.to >= pos.ch)) - { markers.push(span.marker.parent || span.marker); } - } } - return markers - }, - findMarks: function(from, to, filter) { - from = clipPos(this, from); to = clipPos(this, to); - var found = [], lineNo$$1 = from.line; - this.iter(from.line, to.line + 1, function (line) { - var spans = line.markedSpans; - if (spans) { for (var i = 0; i < spans.length; i++) { - var span = spans[i]; - if (!(span.to != null && lineNo$$1 == from.line && from.ch >= span.to || - span.from == null && lineNo$$1 != from.line || - span.from != null && lineNo$$1 == to.line && span.from >= to.ch) && - (!filter || filter(span.marker))) - { found.push(span.marker.parent || span.marker); } - } } - ++lineNo$$1; - }); - return found - }, - getAllMarks: function() { - var markers = []; - this.iter(function (line) { - var sps = line.markedSpans; - if (sps) { for (var i = 0; i < sps.length; ++i) - { if (sps[i].from != null) { markers.push(sps[i].marker); } } } - }); - return markers - }, - - posFromIndex: function(off) { - var ch, lineNo$$1 = this.first, sepSize = this.lineSeparator().length; - this.iter(function (line) { - var sz = line.text.length + sepSize; - if (sz > off) { ch = off; return true } - off -= sz; - ++lineNo$$1; - }); - return clipPos(this, Pos(lineNo$$1, ch)) - }, - indexFromPos: function (coords) { - coords = clipPos(this, coords); - var index = coords.ch; - if (coords.line < this.first || coords.ch < 0) { return 0 } - var sepSize = this.lineSeparator().length; - this.iter(this.first, coords.line, function (line) { // iter aborts when callback returns a truthy value - index += line.text.length + sepSize; - }); - return index - }, - - copy: function(copyHistory) { - var doc = new Doc(getLines(this, this.first, this.first + this.size), - this.modeOption, this.first, this.lineSep, this.direction); - doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft; - doc.sel = this.sel; - doc.extend = false; - if (copyHistory) { - doc.history.undoDepth = this.history.undoDepth; - doc.setHistory(this.getHistory()); - } - return doc - }, - - linkedDoc: function(options) { - if (!options) { options = {}; } - var from = this.first, to = this.first + this.size; - if (options.from != null && options.from > from) { from = options.from; } - if (options.to != null && options.to < to) { to = options.to; } - var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep, this.direction); - if (options.sharedHist) { copy.history = this.history - ; }(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist}); - copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}]; - copySharedMarkers(copy, findSharedMarkers(this)); - return copy - }, - unlinkDoc: function(other) { - var this$1 = this; - - if (other instanceof CodeMirror) { other = other.doc; } - if (this.linked) { for (var i = 0; i < this.linked.length; ++i) { - var link = this$1.linked[i]; - if (link.doc != other) { continue } - this$1.linked.splice(i, 1); - other.unlinkDoc(this$1); - detachSharedMarkers(findSharedMarkers(this$1)); - break - } } - // If the histories were shared, split them again - if (other.history == this.history) { - var splitIds = [other.id]; - linkedDocs(other, function (doc) { return splitIds.push(doc.id); }, true); - other.history = new History(null); - other.history.done = copyHistoryArray(this.history.done, splitIds); - other.history.undone = copyHistoryArray(this.history.undone, splitIds); - } - }, - iterLinkedDocs: function(f) {linkedDocs(this, f);}, - - getMode: function() {return this.mode}, - getEditor: function() {return this.cm}, - - splitLines: function(str) { - if (this.lineSep) { return str.split(this.lineSep) } - return splitLinesAuto(str) - }, - lineSeparator: function() { return this.lineSep || "\n" }, - - setDirection: docMethodOp(function (dir) { - if (dir != "rtl") { dir = "ltr"; } - if (dir == this.direction) { return } - this.direction = dir; - this.iter(function (line) { return line.order = null; }); - if (this.cm) { directionChanged(this.cm); } - }) - }); - - // Public alias. - Doc.prototype.eachLine = Doc.prototype.iter; - - // Kludge to work around strange IE behavior where it'll sometimes - // re-fire a series of drag-related events right after the drop (#1551) - var lastDrop = 0; - - function onDrop(e) { - var cm = this; - clearDragCursor(cm); - if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) - { return } - e_preventDefault(e); - if (ie) { lastDrop = +new Date; } - var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files; - if (!pos || cm.isReadOnly()) { return } - // Might be a file drop, in which case we simply extract the text - // and insert it. - if (files && files.length && window.FileReader && window.File) { - var n = files.length, text = Array(n), read = 0; - var loadFile = function (file, i) { - if (cm.options.allowDropFileTypes && - indexOf(cm.options.allowDropFileTypes, file.type) == -1) - { return } - - var reader = new FileReader; - reader.onload = operation(cm, function () { - var content = reader.result; - if (/[\x00-\x08\x0e-\x1f]{2}/.test(content)) { content = ""; } - text[i] = content; - if (++read == n) { - pos = clipPos(cm.doc, pos); - var change = {from: pos, to: pos, - text: cm.doc.splitLines(text.join(cm.doc.lineSeparator())), - origin: "paste"}; - makeChange(cm.doc, change); - setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change))); - } - }); - reader.readAsText(file); - }; - for (var i = 0; i < n; ++i) { loadFile(files[i], i); } - } else { // Normal drop - // Don't do a replace if the drop happened inside of the selected text. - if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) { - cm.state.draggingText(e); - // Ensure the editor is re-focused - setTimeout(function () { return cm.display.input.focus(); }, 20); - return - } - try { - var text$1 = e.dataTransfer.getData("Text"); - if (text$1) { - var selected; - if (cm.state.draggingText && !cm.state.draggingText.copy) - { selected = cm.listSelections(); } - setSelectionNoUndo(cm.doc, simpleSelection(pos, pos)); - if (selected) { for (var i$1 = 0; i$1 < selected.length; ++i$1) - { replaceRange(cm.doc, "", selected[i$1].anchor, selected[i$1].head, "drag"); } } - cm.replaceSelection(text$1, "around", "paste"); - cm.display.input.focus(); - } - } - catch(e){} - } - } - - function onDragStart(cm, e) { - if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return } - if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { return } - - e.dataTransfer.setData("Text", cm.getSelection()); - e.dataTransfer.effectAllowed = "copyMove"; - - // Use dummy image instead of default browsers image. - // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there. - if (e.dataTransfer.setDragImage && !safari) { - var img = elt("img", null, null, "position: fixed; left: 0; top: 0;"); - img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; - if (presto) { - img.width = img.height = 1; - cm.display.wrapper.appendChild(img); - // Force a relayout, or Opera won't use our image for some obscure reason - img._top = img.offsetTop; - } - e.dataTransfer.setDragImage(img, 0, 0); - if (presto) { img.parentNode.removeChild(img); } - } - } - - function onDragOver(cm, e) { - var pos = posFromMouse(cm, e); - if (!pos) { return } - var frag = document.createDocumentFragment(); - drawSelectionCursor(cm, pos, frag); - if (!cm.display.dragCursor) { - cm.display.dragCursor = elt("div", null, "CodeMirror-cursors CodeMirror-dragcursors"); - cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv); - } - removeChildrenAndAdd(cm.display.dragCursor, frag); - } - - function clearDragCursor(cm) { - if (cm.display.dragCursor) { - cm.display.lineSpace.removeChild(cm.display.dragCursor); - cm.display.dragCursor = null; - } - } - - // These must be handled carefully, because naively registering a - // handler for each editor will cause the editors to never be - // garbage collected. - - function forEachCodeMirror(f) { - if (!document.getElementsByClassName) { return } - var byClass = document.getElementsByClassName("CodeMirror"), editors = []; - for (var i = 0; i < byClass.length; i++) { - var cm = byClass[i].CodeMirror; - if (cm) { editors.push(cm); } - } - if (editors.length) { editors[0].operation(function () { - for (var i = 0; i < editors.length; i++) { f(editors[i]); } - }); } - } - - var globalsRegistered = false; - function ensureGlobalHandlers() { - if (globalsRegistered) { return } - registerGlobalHandlers(); - globalsRegistered = true; - } - function registerGlobalHandlers() { - // When the window resizes, we need to refresh active editors. - var resizeTimer; - on(window, "resize", function () { - if (resizeTimer == null) { resizeTimer = setTimeout(function () { - resizeTimer = null; - forEachCodeMirror(onResize); - }, 100); } - }); - // When the window loses focus, we want to show the editor as blurred - on(window, "blur", function () { return forEachCodeMirror(onBlur); }); - } - // Called when the window resizes - function onResize(cm) { - var d = cm.display; - // Might be a text scaling operation, clear size caches. - d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null; - d.scrollbarsClipped = false; - cm.setSize(); - } - - var keyNames = { - 3: "Pause", 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: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod", - 106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 127: "Delete", 145: "ScrollLock", - 173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", - 221: "]", 222: "'", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete", - 63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert" - }; - - // Number keys - for (var i = 0; i < 10; i++) { keyNames[i + 48] = keyNames[i + 96] = String(i); } - // Alphabetic keys - for (var i$1 = 65; i$1 <= 90; i$1++) { keyNames[i$1] = String.fromCharCode(i$1); } - // Function keys - for (var i$2 = 1; i$2 <= 12; i$2++) { keyNames[i$2 + 111] = keyNames[i$2 + 63235] = "F" + i$2; } - - var keyMap = {}; - - keyMap.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", - "Esc": "singleSelection" - }; - // Note that the save and find-related commands aren't defined by - // default. User code or addons can define them. Unknown commands - // are simply ignored. - keyMap.pcDefault = { - "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo", - "Ctrl-Home": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Up": "goLineUp", "Ctrl-Down": "goLineDown", - "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", - "Ctrl-U": "undoSelection", "Shift-Ctrl-U": "redoSelection", "Alt-U": "redoSelection", - "fallthrough": "basic" - }; - // Very basic readline/emacs-style bindings, which are standard on Mac. - keyMap.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", - "Ctrl-O": "openLine" - }; - keyMap.macDefault = { - "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo", - "Cmd-Home": "goDocStart", "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft", - "Alt-Right": "goGroupRight", "Cmd-Left": "goLineLeft", "Cmd-Right": "goLineRight", "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": "delWrappedLineLeft", "Cmd-Delete": "delWrappedLineRight", - "Cmd-U": "undoSelection", "Shift-Cmd-U": "redoSelection", "Ctrl-Up": "goDocStart", "Ctrl-Down": "goDocEnd", - "fallthrough": ["basic", "emacsy"] - }; - keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault; - - // KEYMAP DISPATCH - - function normalizeKeyName(name) { - var parts = name.split(/-(?!$)/); - name = parts[parts.length - 1]; - var alt, ctrl, shift, cmd; - for (var i = 0; i < parts.length - 1; i++) { - var mod = parts[i]; - if (/^(cmd|meta|m)$/i.test(mod)) { cmd = true; } - else if (/^a(lt)?$/i.test(mod)) { alt = true; } - else if (/^(c|ctrl|control)$/i.test(mod)) { ctrl = true; } - else if (/^s(hift)?$/i.test(mod)) { shift = true; } - else { throw new Error("Unrecognized modifier name: " + mod) } - } - if (alt) { name = "Alt-" + name; } - if (ctrl) { name = "Ctrl-" + name; } - if (cmd) { name = "Cmd-" + name; } - if (shift) { name = "Shift-" + name; } - return name - } - - // This is a kludge to keep keymaps mostly working as raw objects - // (backwards compatibility) while at the same time support features - // like normalization and multi-stroke key bindings. It compiles a - // new normalized keymap, and then updates the old object to reflect - // this. - function normalizeKeyMap(keymap) { - var copy = {}; - for (var keyname in keymap) { if (keymap.hasOwnProperty(keyname)) { - var value = keymap[keyname]; - if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { continue } - if (value == "...") { delete keymap[keyname]; continue } - - var keys = map(keyname.split(" "), normalizeKeyName); - for (var i = 0; i < keys.length; i++) { - var val = (void 0), name = (void 0); - if (i == keys.length - 1) { - name = keys.join(" "); - val = value; - } else { - name = keys.slice(0, i + 1).join(" "); - val = "..."; - } - var prev = copy[name]; - if (!prev) { copy[name] = val; } - else if (prev != val) { throw new Error("Inconsistent bindings for " + name) } - } - delete keymap[keyname]; - } } - for (var prop in copy) { keymap[prop] = copy[prop]; } - return keymap - } - - function lookupKey(key, map$$1, handle, context) { - map$$1 = getKeyMap(map$$1); - var found = map$$1.call ? map$$1.call(key, context) : map$$1[key]; - if (found === false) { return "nothing" } - if (found === "...") { return "multi" } - if (found != null && handle(found)) { return "handled" } - - if (map$$1.fallthrough) { - if (Object.prototype.toString.call(map$$1.fallthrough) != "[object Array]") - { return lookupKey(key, map$$1.fallthrough, handle, context) } - for (var i = 0; i < map$$1.fallthrough.length; i++) { - var result = lookupKey(key, map$$1.fallthrough[i], handle, context); - if (result) { return result } - } - } - } - - // Modifier key presses don't count as 'real' key presses for the - // purpose of keymap fallthrough. - function isModifierKey(value) { - var name = typeof value == "string" ? value : keyNames[value.keyCode]; - return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod" - } - - function addModifierNames(name, event, noShift) { - var base = name; - if (event.altKey && base != "Alt") { name = "Alt-" + name; } - if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") { name = "Ctrl-" + name; } - if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Cmd") { name = "Cmd-" + name; } - if (!noShift && event.shiftKey && base != "Shift") { name = "Shift-" + name; } - return name - } - - // Look up the name of a key as indicated by an event object. - function keyName(event, noShift) { - if (presto && event.keyCode == 34 && event["char"]) { return false } - var name = keyNames[event.keyCode]; - if (name == null || event.altGraphKey) { return false } - // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause, - // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+) - if (event.keyCode == 3 && event.code) { name = event.code; } - return addModifierNames(name, event, noShift) - } - - function getKeyMap(val) { - return typeof val == "string" ? keyMap[val] : val - } - - // Helper for deleting text near the selection(s), used to implement - // backspace, delete, and similar functionality. - function deleteNearSelection(cm, compute) { - var ranges = cm.doc.sel.ranges, kill = []; - // Build up a set of ranges to kill first, merging overlapping - // ranges. - for (var i = 0; i < ranges.length; i++) { - var toKill = compute(ranges[i]); - while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) { - var replaced = kill.pop(); - if (cmp(replaced.from, toKill.from) < 0) { - toKill.from = replaced.from; - break - } - } - kill.push(toKill); - } - // Next, remove those actual ranges. - runInOp(cm, function () { - for (var i = kill.length - 1; i >= 0; i--) - { replaceRange(cm.doc, "", kill[i].from, kill[i].to, "+delete"); } - ensureCursorVisible(cm); - }); - } - - function moveCharLogically(line, ch, dir) { - var target = skipExtendingChars(line.text, ch + dir, dir); - return target < 0 || target > line.text.length ? null : target - } - - function moveLogically(line, start, dir) { - var ch = moveCharLogically(line, start.ch, dir); - return ch == null ? null : new Pos(start.line, ch, dir < 0 ? "after" : "before") - } - - function endOfLine(visually, cm, lineObj, lineNo, dir) { - if (visually) { - var order = getOrder(lineObj, cm.doc.direction); - if (order) { - var part = dir < 0 ? lst(order) : order[0]; - var moveInStorageOrder = (dir < 0) == (part.level == 1); - var sticky = moveInStorageOrder ? "after" : "before"; - var ch; - // With a wrapped rtl chunk (possibly spanning multiple bidi parts), - // it could be that the last bidi part is not on the last visual line, - // since visual lines contain content order-consecutive chunks. - // Thus, in rtl, we are looking for the first (content-order) character - // in the rtl chunk that is on the last line (that is, the same line - // as the last (content-order) character). - if (part.level > 0 || cm.doc.direction == "rtl") { - var prep = prepareMeasureForLine(cm, lineObj); - ch = dir < 0 ? lineObj.text.length - 1 : 0; - var targetTop = measureCharPrepared(cm, prep, ch).top; - ch = findFirst(function (ch) { return measureCharPrepared(cm, prep, ch).top == targetTop; }, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch); - if (sticky == "before") { ch = moveCharLogically(lineObj, ch, 1); } - } else { ch = dir < 0 ? part.to : part.from; } - return new Pos(lineNo, ch, sticky) - } - } - return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? "before" : "after") - } - - function moveVisually(cm, line, start, dir) { - var bidi = getOrder(line, cm.doc.direction); - if (!bidi) { return moveLogically(line, start, dir) } - if (start.ch >= line.text.length) { - start.ch = line.text.length; - start.sticky = "before"; - } else if (start.ch <= 0) { - start.ch = 0; - start.sticky = "after"; - } - var partPos = getBidiPartAt(bidi, start.ch, start.sticky), part = bidi[partPos]; - if (cm.doc.direction == "ltr" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) { - // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines, - // nothing interesting happens. - return moveLogically(line, start, dir) - } - - var mv = function (pos, dir) { return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir); }; - var prep; - var getWrappedLineExtent = function (ch) { - if (!cm.options.lineWrapping) { return {begin: 0, end: line.text.length} } - prep = prep || prepareMeasureForLine(cm, line); - return wrappedLineExtentChar(cm, line, prep, ch) - }; - var wrappedLineExtent = getWrappedLineExtent(start.sticky == "before" ? mv(start, -1) : start.ch); - - if (cm.doc.direction == "rtl" || part.level == 1) { - var moveInStorageOrder = (part.level == 1) == (dir < 0); - var ch = mv(start, moveInStorageOrder ? 1 : -1); - if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) { - // Case 2: We move within an rtl part or in an rtl editor on the same visual line - var sticky = moveInStorageOrder ? "before" : "after"; - return new Pos(start.line, ch, sticky) - } - } - - // Case 3: Could not move within this bidi part in this visual line, so leave - // the current bidi part - - var searchInVisualLine = function (partPos, dir, wrappedLineExtent) { - var getRes = function (ch, moveInStorageOrder) { return moveInStorageOrder - ? new Pos(start.line, mv(ch, 1), "before") - : new Pos(start.line, ch, "after"); }; - - for (; partPos >= 0 && partPos < bidi.length; partPos += dir) { - var part = bidi[partPos]; - var moveInStorageOrder = (dir > 0) == (part.level != 1); - var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1); - if (part.from <= ch && ch < part.to) { return getRes(ch, moveInStorageOrder) } - ch = moveInStorageOrder ? part.from : mv(part.to, -1); - if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) { return getRes(ch, moveInStorageOrder) } - } - }; - - // Case 3a: Look for other bidi parts on the same visual line - var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent); - if (res) { return res } - - // Case 3b: Look for other bidi parts on the next visual line - var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1); - if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) { - res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh)); - if (res) { return res } - } - - // Case 4: Nowhere to move - return null - } - - // Commands are parameter-less actions that can be performed on an - // editor, mostly used for keybindings. - var commands = { - selectAll: selectAll, - singleSelection: function (cm) { return cm.setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll); }, - killLine: function (cm) { return deleteNearSelection(cm, function (range) { - if (range.empty()) { - var len = getLine(cm.doc, range.head.line).text.length; - if (range.head.ch == len && range.head.line < cm.lastLine()) - { return {from: range.head, to: Pos(range.head.line + 1, 0)} } - else - { return {from: range.head, to: Pos(range.head.line, len)} } - } else { - return {from: range.from(), to: range.to()} - } - }); }, - deleteLine: function (cm) { return deleteNearSelection(cm, function (range) { return ({ - from: Pos(range.from().line, 0), - to: clipPos(cm.doc, Pos(range.to().line + 1, 0)) - }); }); }, - delLineLeft: function (cm) { return deleteNearSelection(cm, function (range) { return ({ - from: Pos(range.from().line, 0), to: range.from() - }); }); }, - delWrappedLineLeft: function (cm) { return deleteNearSelection(cm, function (range) { - var top = cm.charCoords(range.head, "div").top + 5; - var leftPos = cm.coordsChar({left: 0, top: top}, "div"); - return {from: leftPos, to: range.from()} - }); }, - delWrappedLineRight: function (cm) { return deleteNearSelection(cm, function (range) { - var top = cm.charCoords(range.head, "div").top + 5; - var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div"); - return {from: range.from(), to: rightPos } - }); }, - undo: function (cm) { return cm.undo(); }, - redo: function (cm) { return cm.redo(); }, - undoSelection: function (cm) { return cm.undoSelection(); }, - redoSelection: function (cm) { return cm.redoSelection(); }, - goDocStart: function (cm) { return cm.extendSelection(Pos(cm.firstLine(), 0)); }, - goDocEnd: function (cm) { return cm.extendSelection(Pos(cm.lastLine())); }, - goLineStart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStart(cm, range.head.line); }, - {origin: "+move", bias: 1} - ); }, - goLineStartSmart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStartSmart(cm, range.head); }, - {origin: "+move", bias: 1} - ); }, - goLineEnd: function (cm) { return cm.extendSelectionsBy(function (range) { return lineEnd(cm, range.head.line); }, - {origin: "+move", bias: -1} - ); }, - goLineRight: function (cm) { return cm.extendSelectionsBy(function (range) { - var top = cm.cursorCoords(range.head, "div").top + 5; - return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div") - }, sel_move); }, - goLineLeft: function (cm) { return cm.extendSelectionsBy(function (range) { - var top = cm.cursorCoords(range.head, "div").top + 5; - return cm.coordsChar({left: 0, top: top}, "div") - }, sel_move); }, - goLineLeftSmart: function (cm) { return cm.extendSelectionsBy(function (range) { - var top = cm.cursorCoords(range.head, "div").top + 5; - var pos = cm.coordsChar({left: 0, top: top}, "div"); - if (pos.ch < cm.getLine(pos.line).search(/\S/)) { return lineStartSmart(cm, range.head) } - return pos - }, sel_move); }, - goLineUp: function (cm) { return cm.moveV(-1, "line"); }, - goLineDown: function (cm) { return cm.moveV(1, "line"); }, - goPageUp: function (cm) { return cm.moveV(-1, "page"); }, - goPageDown: function (cm) { return cm.moveV(1, "page"); }, - goCharLeft: function (cm) { return cm.moveH(-1, "char"); }, - goCharRight: function (cm) { return cm.moveH(1, "char"); }, - goColumnLeft: function (cm) { return cm.moveH(-1, "column"); }, - goColumnRight: function (cm) { return cm.moveH(1, "column"); }, - goWordLeft: function (cm) { return cm.moveH(-1, "word"); }, - goGroupRight: function (cm) { return cm.moveH(1, "group"); }, - goGroupLeft: function (cm) { return cm.moveH(-1, "group"); }, - goWordRight: function (cm) { return cm.moveH(1, "word"); }, - delCharBefore: function (cm) { return cm.deleteH(-1, "char"); }, - delCharAfter: function (cm) { return cm.deleteH(1, "char"); }, - delWordBefore: function (cm) { return cm.deleteH(-1, "word"); }, - delWordAfter: function (cm) { return cm.deleteH(1, "word"); }, - delGroupBefore: function (cm) { return cm.deleteH(-1, "group"); }, - delGroupAfter: function (cm) { return cm.deleteH(1, "group"); }, - indentAuto: function (cm) { return cm.indentSelection("smart"); }, - indentMore: function (cm) { return cm.indentSelection("add"); }, - indentLess: function (cm) { return cm.indentSelection("subtract"); }, - insertTab: function (cm) { return cm.replaceSelection("\t"); }, - insertSoftTab: function (cm) { - var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize; - for (var i = 0; i < ranges.length; i++) { - var pos = ranges[i].from(); - var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize); - spaces.push(spaceStr(tabSize - col % tabSize)); - } - cm.replaceSelections(spaces); - }, - defaultTab: function (cm) { - if (cm.somethingSelected()) { cm.indentSelection("add"); } - else { cm.execCommand("insertTab"); } - }, - // Swap the two chars left and right of each selection's head. - // Move cursor behind the two swapped characters afterwards. - // - // Doesn't consider line feeds a character. - // Doesn't scan more than one line above to find a character. - // Doesn't do anything on an empty line. - // Doesn't do anything with non-empty selections. - transposeChars: function (cm) { return runInOp(cm, function () { - var ranges = cm.listSelections(), newSel = []; - for (var i = 0; i < ranges.length; i++) { - if (!ranges[i].empty()) { continue } - var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text; - if (line) { - if (cur.ch == line.length) { cur = new Pos(cur.line, cur.ch - 1); } - if (cur.ch > 0) { - cur = new Pos(cur.line, cur.ch + 1); - cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2), - Pos(cur.line, cur.ch - 2), cur, "+transpose"); - } else if (cur.line > cm.doc.first) { - var prev = getLine(cm.doc, cur.line - 1).text; - if (prev) { - cur = new Pos(cur.line, 1); - cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() + - prev.charAt(prev.length - 1), - Pos(cur.line - 1, prev.length - 1), cur, "+transpose"); - } - } - } - newSel.push(new Range(cur, cur)); - } - cm.setSelections(newSel); - }); }, - newlineAndIndent: function (cm) { return runInOp(cm, function () { - var sels = cm.listSelections(); - for (var i = sels.length - 1; i >= 0; i--) - { cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, "+input"); } - sels = cm.listSelections(); - for (var i$1 = 0; i$1 < sels.length; i$1++) - { cm.indentLine(sels[i$1].from().line, null, true); } - ensureCursorVisible(cm); - }); }, - openLine: function (cm) { return cm.replaceSelection("\n", "start"); }, - toggleOverwrite: function (cm) { return cm.toggleOverwrite(); } - }; - - - function lineStart(cm, lineN) { - var line = getLine(cm.doc, lineN); - var visual = visualLine(line); - if (visual != line) { lineN = lineNo(visual); } - return endOfLine(true, cm, visual, lineN, 1) - } - function lineEnd(cm, lineN) { - var line = getLine(cm.doc, lineN); - var visual = visualLineEnd(line); - if (visual != line) { lineN = lineNo(visual); } - return endOfLine(true, cm, line, lineN, -1) - } - function lineStartSmart(cm, pos) { - var start = lineStart(cm, pos.line); - var line = getLine(cm.doc, start.line); - var order = getOrder(line, cm.doc.direction); - if (!order || order[0].level == 0) { - var firstNonWS = Math.max(0, line.text.search(/\S/)); - var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch; - return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky) - } - return start - } - - // Run a handler that was bound to a key. - function doHandleBinding(cm, bound, dropShift) { - if (typeof bound == "string") { - bound = commands[bound]; - if (!bound) { return false } - } - // Ensure previous input has been read, so that the handler sees a - // consistent view of the document - cm.display.input.ensurePolled(); - var prevShift = cm.display.shift, done = false; - try { - if (cm.isReadOnly()) { cm.state.suppressEdits = true; } - if (dropShift) { cm.display.shift = false; } - done = bound(cm) != Pass; - } finally { - cm.display.shift = prevShift; - cm.state.suppressEdits = false; - } - return done - } - - function lookupKeyForEditor(cm, name, handle) { - for (var i = 0; i < cm.state.keyMaps.length; i++) { - var result = lookupKey(name, cm.state.keyMaps[i], handle, cm); - if (result) { return result } - } - return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm)) - || lookupKey(name, cm.options.keyMap, handle, cm) - } - - // Note that, despite the name, this function is also used to check - // for bound mouse clicks. - - var stopSeq = new Delayed; - - function dispatchKey(cm, name, e, handle) { - var seq = cm.state.keySeq; - if (seq) { - if (isModifierKey(name)) { return "handled" } - if (/\'$/.test(name)) - { cm.state.keySeq = null; } - else - { stopSeq.set(50, function () { - if (cm.state.keySeq == seq) { - cm.state.keySeq = null; - cm.display.input.reset(); - } - }); } - if (dispatchKeyInner(cm, seq + " " + name, e, handle)) { return true } - } - return dispatchKeyInner(cm, name, e, handle) - } - - function dispatchKeyInner(cm, name, e, handle) { - var result = lookupKeyForEditor(cm, name, handle); - - if (result == "multi") - { cm.state.keySeq = name; } - if (result == "handled") - { signalLater(cm, "keyHandled", cm, name, e); } - - if (result == "handled" || result == "multi") { - e_preventDefault(e); - restartBlink(cm); - } - - return !!result - } - - // Handle a key from the keydown event. - function handleKeyBinding(cm, e) { - var name = keyName(e, true); - if (!name) { return false } - - if (e.shiftKey && !cm.state.keySeq) { - // First try to resolve full name (including 'Shift-'). Failing - // that, see if there is a cursor-motion command (starting with - // 'go') bound to the keyname without 'Shift-'. - return dispatchKey(cm, "Shift-" + name, e, function (b) { return doHandleBinding(cm, b, true); }) - || dispatchKey(cm, name, e, function (b) { - if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion) - { return doHandleBinding(cm, b) } - }) - } else { - return dispatchKey(cm, name, e, function (b) { return doHandleBinding(cm, b); }) - } - } - - // Handle a key from the keypress event - function handleCharBinding(cm, e, ch) { - return dispatchKey(cm, "'" + ch + "'", e, function (b) { return doHandleBinding(cm, b, true); }) - } - - var lastStoppedKey = null; - function onKeyDown(e) { - var cm = this; - cm.curOp.focus = activeElt(); - if (signalDOMEvent(cm, e)) { return } - // IE does strange things with escape. - if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false; } - var code = e.keyCode; - cm.display.shift = code == 16 || e.shiftKey; - var handled = handleKeyBinding(cm, e); - if (presto) { - lastStoppedKey = handled ? code : null; - // Opera has no cut event... we try to at least catch the key combo - if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey)) - { cm.replaceSelection("", null, "cut"); } - } - - // Turn mouse into crosshair when Alt is held on Mac. - if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className)) - { showCrossHair(cm); } - } - - function showCrossHair(cm) { - var lineDiv = cm.display.lineDiv; - addClass(lineDiv, "CodeMirror-crosshair"); - - function up(e) { - if (e.keyCode == 18 || !e.altKey) { - rmClass(lineDiv, "CodeMirror-crosshair"); - off(document, "keyup", up); - off(document, "mouseover", up); - } - } - on(document, "keyup", up); - on(document, "mouseover", up); - } - - function onKeyUp(e) { - if (e.keyCode == 16) { this.doc.sel.shift = false; } - signalDOMEvent(this, e); - } - - function onKeyPress(e) { - var cm = this; - if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return } - var keyCode = e.keyCode, charCode = e.charCode; - if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return} - if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) { return } - var ch = String.fromCharCode(charCode == null ? keyCode : charCode); - // Some browsers fire keypress events for backspace - if (ch == "\x08") { return } - if (handleCharBinding(cm, e, ch)) { return } - cm.display.input.onKeyPress(e); - } - - var DOUBLECLICK_DELAY = 400; - - var PastClick = function(time, pos, button) { - this.time = time; - this.pos = pos; - this.button = button; - }; - - PastClick.prototype.compare = function (time, pos, button) { - return this.time + DOUBLECLICK_DELAY > time && - cmp(pos, this.pos) == 0 && button == this.button - }; - - var lastClick, lastDoubleClick; - function clickRepeat(pos, button) { - var now = +new Date; - if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) { - lastClick = lastDoubleClick = null; - return "triple" - } else if (lastClick && lastClick.compare(now, pos, button)) { - lastDoubleClick = new PastClick(now, pos, button); - lastClick = null; - return "double" - } else { - lastClick = new PastClick(now, pos, button); - lastDoubleClick = null; - return "single" - } - } - - // A mouse down can be a single click, double click, triple click, - // start of selection drag, start of text drag, new cursor - // (ctrl-click), rectangle drag (alt-drag), or xwin - // middle-click-paste. Or it might be a click on something we should - // not interfere with, such as a scrollbar or widget. - function onMouseDown(e) { - var cm = this, display = cm.display; - if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return } - display.input.ensurePolled(); - display.shift = e.shiftKey; - - if (eventInWidget(display, e)) { - if (!webkit) { - // Briefly turn off draggability, to allow widgets to do - // normal dragging things. - display.scroller.draggable = false; - setTimeout(function () { return display.scroller.draggable = true; }, 100); - } - return - } - if (clickInGutter(cm, e)) { return } - var pos = posFromMouse(cm, e), button = e_button(e), repeat = pos ? clickRepeat(pos, button) : "single"; - window.focus(); - - // #3261: make sure, that we're not starting a second selection - if (button == 1 && cm.state.selectingText) - { cm.state.selectingText(e); } - - if (pos && handleMappedButton(cm, button, pos, repeat, e)) { return } - - if (button == 1) { - if (pos) { leftButtonDown(cm, pos, repeat, e); } - else if (e_target(e) == display.scroller) { e_preventDefault(e); } - } else if (button == 2) { - if (pos) { extendSelection(cm.doc, pos); } - setTimeout(function () { return display.input.focus(); }, 20); - } else if (button == 3) { - if (captureRightClick) { cm.display.input.onContextMenu(e); } - else { delayBlurEvent(cm); } - } - } - - function handleMappedButton(cm, button, pos, repeat, event) { - var name = "Click"; - if (repeat == "double") { name = "Double" + name; } - else if (repeat == "triple") { name = "Triple" + name; } - name = (button == 1 ? "Left" : button == 2 ? "Middle" : "Right") + name; - - return dispatchKey(cm, addModifierNames(name, event), event, function (bound) { - if (typeof bound == "string") { bound = commands[bound]; } - if (!bound) { return false } - var done = false; - try { - if (cm.isReadOnly()) { cm.state.suppressEdits = true; } - done = bound(cm, pos) != Pass; - } finally { - cm.state.suppressEdits = false; - } - return done - }) - } - - function configureMouse(cm, repeat, event) { - var option = cm.getOption("configureMouse"); - var value = option ? option(cm, repeat, event) : {}; - if (value.unit == null) { - var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey; - value.unit = rect ? "rectangle" : repeat == "single" ? "char" : repeat == "double" ? "word" : "line"; - } - if (value.extend == null || cm.doc.extend) { value.extend = cm.doc.extend || event.shiftKey; } - if (value.addNew == null) { value.addNew = mac ? event.metaKey : event.ctrlKey; } - if (value.moveOnDrag == null) { value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey); } - return value - } - - function leftButtonDown(cm, pos, repeat, event) { - if (ie) { setTimeout(bind(ensureFocus, cm), 0); } - else { cm.curOp.focus = activeElt(); } - - var behavior = configureMouse(cm, repeat, event); - - var sel = cm.doc.sel, contained; - if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() && - repeat == "single" && (contained = sel.contains(pos)) > -1 && - (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) && - (cmp(contained.to(), pos) > 0 || pos.xRel < 0)) - { leftButtonStartDrag(cm, event, pos, behavior); } - else - { leftButtonSelect(cm, event, pos, behavior); } - } - - // Start a text drag. When it ends, see if any dragging actually - // happen, and treat as a click if it didn't. - function leftButtonStartDrag(cm, event, pos, behavior) { - var display = cm.display, moved = false; - var dragEnd = operation(cm, function (e) { - if (webkit) { display.scroller.draggable = false; } - cm.state.draggingText = false; - off(display.wrapper.ownerDocument, "mouseup", dragEnd); - off(display.wrapper.ownerDocument, "mousemove", mouseMove); - off(display.scroller, "dragstart", dragStart); - off(display.scroller, "drop", dragEnd); - if (!moved) { - e_preventDefault(e); - if (!behavior.addNew) - { extendSelection(cm.doc, pos, null, null, behavior.extend); } - // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081) - if (webkit || ie && ie_version == 9) - { setTimeout(function () {display.wrapper.ownerDocument.body.focus(); display.input.focus();}, 20); } - else - { display.input.focus(); } - } - }); - var mouseMove = function(e2) { - moved = moved || Math.abs(event.clientX - e2.clientX) + Math.abs(event.clientY - e2.clientY) >= 10; - }; - var dragStart = function () { return moved = true; }; - // Let the drag handler handle this. - if (webkit) { display.scroller.draggable = true; } - cm.state.draggingText = dragEnd; - dragEnd.copy = !behavior.moveOnDrag; - // IE's approach to draggable - if (display.scroller.dragDrop) { display.scroller.dragDrop(); } - on(display.wrapper.ownerDocument, "mouseup", dragEnd); - on(display.wrapper.ownerDocument, "mousemove", mouseMove); - on(display.scroller, "dragstart", dragStart); - on(display.scroller, "drop", dragEnd); - - delayBlurEvent(cm); - setTimeout(function () { return display.input.focus(); }, 20); - } - - function rangeForUnit(cm, pos, unit) { - if (unit == "char") { return new Range(pos, pos) } - if (unit == "word") { return cm.findWordAt(pos) } - if (unit == "line") { return new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) } - var result = unit(cm, pos); - return new Range(result.from, result.to) - } - - // Normal selection, as opposed to text dragging. - function leftButtonSelect(cm, event, start, behavior) { - var display = cm.display, doc = cm.doc; - e_preventDefault(event); - - var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges; - if (behavior.addNew && !behavior.extend) { - ourIndex = doc.sel.contains(start); - if (ourIndex > -1) - { ourRange = ranges[ourIndex]; } - else - { ourRange = new Range(start, start); } - } else { - ourRange = doc.sel.primary(); - ourIndex = doc.sel.primIndex; - } - - if (behavior.unit == "rectangle") { - if (!behavior.addNew) { ourRange = new Range(start, start); } - start = posFromMouse(cm, event, true, true); - ourIndex = -1; - } else { - var range$$1 = rangeForUnit(cm, start, behavior.unit); - if (behavior.extend) - { ourRange = extendRange(ourRange, range$$1.anchor, range$$1.head, behavior.extend); } - else - { ourRange = range$$1; } - } - - if (!behavior.addNew) { - ourIndex = 0; - setSelection(doc, new Selection([ourRange], 0), sel_mouse); - startSel = doc.sel; - } else if (ourIndex == -1) { - ourIndex = ranges.length; - setSelection(doc, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex), - {scroll: false, origin: "*mouse"}); - } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == "char" && !behavior.extend) { - setSelection(doc, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0), - {scroll: false, origin: "*mouse"}); - startSel = doc.sel; - } else { - replaceOneSelection(doc, ourIndex, ourRange, sel_mouse); - } - - var lastPos = start; - function extendTo(pos) { - if (cmp(lastPos, pos) == 0) { return } - lastPos = pos; - - if (behavior.unit == "rectangle") { - var ranges = [], tabSize = cm.options.tabSize; - var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize); - var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize); - var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol); - for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line)); - line <= end; line++) { - var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize); - if (left == right) - { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); } - else if (text.length > leftPos) - { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); } - } - if (!ranges.length) { ranges.push(new Range(start, start)); } - setSelection(doc, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex), - {origin: "*mouse", scroll: false}); - cm.scrollIntoView(pos); - } else { - var oldRange = ourRange; - var range$$1 = rangeForUnit(cm, pos, behavior.unit); - var anchor = oldRange.anchor, head; - if (cmp(range$$1.anchor, anchor) > 0) { - head = range$$1.head; - anchor = minPos(oldRange.from(), range$$1.anchor); - } else { - head = range$$1.anchor; - anchor = maxPos(oldRange.to(), range$$1.head); - } - var ranges$1 = startSel.ranges.slice(0); - ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head)); - setSelection(doc, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse); - } - } - - var editorSize = display.wrapper.getBoundingClientRect(); - // Used to ensure timeout re-tries don't fire when another extend - // happened in the meantime (clearTimeout isn't reliable -- at - // least on Chrome, the timeouts still happen even when cleared, - // if the clear happens after their scheduled firing time). - var counter = 0; - - function extend(e) { - var curCount = ++counter; - var cur = posFromMouse(cm, e, true, behavior.unit == "rectangle"); - if (!cur) { return } - if (cmp(cur, lastPos) != 0) { - cm.curOp.focus = activeElt(); - extendTo(cur); - var visible = visibleLines(display, doc); - if (cur.line >= visible.to || cur.line < visible.from) - { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); } - } else { - var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0; - if (outside) { setTimeout(operation(cm, function () { - if (counter != curCount) { return } - display.scroller.scrollTop += outside; - extend(e); - }), 50); } - } - } - - function done(e) { - cm.state.selectingText = false; - counter = Infinity; - e_preventDefault(e); - display.input.focus(); - off(display.wrapper.ownerDocument, "mousemove", move); - off(display.wrapper.ownerDocument, "mouseup", up); - doc.history.lastSelOrigin = null; - } - - var move = operation(cm, function (e) { - if (e.buttons === 0 || !e_button(e)) { done(e); } - else { extend(e); } - }); - var up = operation(cm, done); - cm.state.selectingText = up; - on(display.wrapper.ownerDocument, "mousemove", move); - on(display.wrapper.ownerDocument, "mouseup", up); - } - - // Used when mouse-selecting to adjust the anchor to the proper side - // of a bidi jump depending on the visual position of the head. - function bidiSimplify(cm, range$$1) { - var anchor = range$$1.anchor; - var head = range$$1.head; - var anchorLine = getLine(cm.doc, anchor.line); - if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 } - var order = getOrder(anchorLine); - if (!order) { return range$$1 } - var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index]; - if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 } - var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1); - if (boundary == 0 || boundary == order.length) { return range$$1 } - - // Compute the relative visual position of the head compared to the - // anchor (<0 is to the left, >0 to the right) - var leftSide; - if (head.line != anchor.line) { - leftSide = (head.line - anchor.line) * (cm.doc.direction == "ltr" ? 1 : -1) > 0; - } else { - var headIndex = getBidiPartAt(order, head.ch, head.sticky); - var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1); - if (headIndex == boundary - 1 || headIndex == boundary) - { leftSide = dir < 0; } - else - { leftSide = dir > 0; } - } - - var usePart = order[boundary + (leftSide ? -1 : 0)]; - var from = leftSide == (usePart.level == 1); - var ch = from ? usePart.from : usePart.to, sticky = from ? "after" : "before"; - return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head) - } - - - // Determines whether an event happened in the gutter, and fires the - // handlers for the corresponding event. - function gutterEvent(cm, e, type, prevent) { - var mX, mY; - if (e.touches) { - mX = e.touches[0].clientX; - mY = e.touches[0].clientY; - } else { - try { mX = e.clientX; mY = e.clientY; } - catch(e) { return false } - } - if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false } - if (prevent) { e_preventDefault(e); } - - var display = cm.display; - var lineBox = display.lineDiv.getBoundingClientRect(); - - if (mY > lineBox.bottom || !hasHandler(cm, type)) { return e_defaultPrevented(e) } - mY -= lineBox.top - display.viewOffset; - - for (var i = 0; i < cm.options.gutters.length; ++i) { - var g = display.gutters.childNodes[i]; - if (g && g.getBoundingClientRect().right >= mX) { - var line = lineAtHeight(cm.doc, mY); - var gutter = cm.options.gutters[i]; - signal(cm, type, cm, line, gutter, e); - return e_defaultPrevented(e) - } - } - } - - function clickInGutter(cm, e) { - return gutterEvent(cm, e, "gutterClick", true) - } - - // CONTEXT MENU HANDLING - - // To make the context menu work, we need to briefly unhide the - // textarea (making it as unobtrusive as possible) to let the - // right-click take effect on it. - function onContextMenu(cm, e) { - if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return } - if (signalDOMEvent(cm, e, "contextmenu")) { return } - if (!captureRightClick) { cm.display.input.onContextMenu(e); } - } - - function contextMenuInGutter(cm, e) { - if (!hasHandler(cm, "gutterContextMenu")) { return false } - return gutterEvent(cm, e, "gutterContextMenu", false) - } - - function themeChanged(cm) { - cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + - cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-"); - clearCaches(cm); - } - - var Init = {toString: function(){return "CodeMirror.Init"}}; - - var defaults = {}; - var optionHandlers = {}; - - function defineOptions(CodeMirror) { - var optionHandlers = CodeMirror.optionHandlers; - - function option(name, deflt, handle, notOnInit) { - CodeMirror.defaults[name] = deflt; - if (handle) { optionHandlers[name] = - notOnInit ? function (cm, val, old) {if (old != Init) { handle(cm, val, old); }} : handle; } - } - - CodeMirror.defineOption = option; - - // Passed to option handlers when there is no old value. - CodeMirror.Init = Init; - - // These two are, on init, called from the constructor because they - // have to be initialized before the editor can start at all. - option("value", "", function (cm, val) { return cm.setValue(val); }, true); - option("mode", null, function (cm, val) { - cm.doc.modeOption = val; - loadMode(cm); - }, true); - - option("indentUnit", 2, loadMode, true); - option("indentWithTabs", false); - option("smartIndent", true); - option("tabSize", 4, function (cm) { - resetModeState(cm); - clearCaches(cm); - regChange(cm); - }, true); - - option("lineSeparator", null, function (cm, val) { - cm.doc.lineSep = val; - if (!val) { return } - var newBreaks = [], lineNo = cm.doc.first; - cm.doc.iter(function (line) { - for (var pos = 0;;) { - var found = line.text.indexOf(val, pos); - if (found == -1) { break } - pos = found + val.length; - newBreaks.push(Pos(lineNo, found)); - } - lineNo++; - }); - for (var i = newBreaks.length - 1; i >= 0; i--) - { replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); } - }); - option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g, function (cm, val, old) { - cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g"); - if (old != Init) { cm.refresh(); } - }); - option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function (cm) { return cm.refresh(); }, true); - option("electricChars", true); - option("inputStyle", mobile ? "contenteditable" : "textarea", function () { - throw new Error("inputStyle can not (yet) be changed in a running editor") // FIXME - }, true); - option("spellcheck", false, function (cm, val) { return cm.getInputField().spellcheck = val; }, true); - option("autocorrect", false, function (cm, val) { return cm.getInputField().autocorrect = val; }, true); - option("autocapitalize", false, function (cm, val) { return cm.getInputField().autocapitalize = val; }, true); - option("rtlMoveVisually", !windows); - option("wholeLineUpdateBefore", true); - - option("theme", "default", function (cm) { - themeChanged(cm); - guttersChanged(cm); - }, true); - option("keyMap", "default", function (cm, val, old) { - var next = getKeyMap(val); - var prev = old != Init && getKeyMap(old); - if (prev && prev.detach) { prev.detach(cm, next); } - if (next.attach) { next.attach(cm, prev || null); } - }); - option("extraKeys", null); - option("configureMouse", null); - - option("lineWrapping", false, wrappingChanged, true); - option("gutters", [], function (cm) { - setGuttersForLineNumbers(cm.options); - guttersChanged(cm); - }, true); - option("fixedGutter", true, function (cm, val) { - cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0"; - cm.refresh(); - }, true); - option("coverGutterNextToScrollbar", false, function (cm) { return updateScrollbars(cm); }, true); - option("scrollbarStyle", "native", function (cm) { - initScrollbars(cm); - updateScrollbars(cm); - cm.display.scrollbars.setScrollTop(cm.doc.scrollTop); - cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft); - }, true); - option("lineNumbers", false, function (cm) { - setGuttersForLineNumbers(cm.options); - guttersChanged(cm); - }, true); - option("firstLineNumber", 1, guttersChanged, true); - option("lineNumberFormatter", function (integer) { return integer; }, guttersChanged, true); - option("showCursorWhenSelecting", false, updateSelection, true); - - option("resetSelectionOnContextMenu", true); - option("lineWiseCopyCut", true); - option("pasteLinesPerSelection", true); - option("selectionsMayTouch", false); - - option("readOnly", false, function (cm, val) { - if (val == "nocursor") { - onBlur(cm); - cm.display.input.blur(); - } - cm.display.input.readOnlyChanged(val); - }); - option("disableInput", false, function (cm, val) {if (!val) { cm.display.input.reset(); }}, true); - option("dragDrop", true, dragDropChanged); - option("allowDropFileTypes", null); - - option("cursorBlinkRate", 530); - option("cursorScrollMargin", 0); - option("cursorHeight", 1, updateSelection, true); - option("singleCursorHeightPerLine", true, updateSelection, true); - option("workTime", 100); - option("workDelay", 100); - option("flattenSpans", true, resetModeState, true); - option("addModeClass", false, resetModeState, true); - option("pollInterval", 100); - option("undoDepth", 200, function (cm, val) { return cm.doc.history.undoDepth = val; }); - option("historyEventDelay", 1250); - option("viewportMargin", 10, function (cm) { return cm.refresh(); }, true); - option("maxHighlightLength", 10000, resetModeState, true); - option("moveInputWithCursor", true, function (cm, val) { - if (!val) { cm.display.input.resetPosition(); } - }); - - option("tabindex", null, function (cm, val) { return cm.display.input.getField().tabIndex = val || ""; }); - option("autofocus", null); - option("direction", "ltr", function (cm, val) { return cm.doc.setDirection(val); }, true); - option("phrases", null); - } - - function guttersChanged(cm) { - updateGutters(cm); - regChange(cm); - alignHorizontally(cm); - } - - function dragDropChanged(cm, value, old) { - var wasOn = old && old != Init; - if (!value != !wasOn) { - var funcs = cm.display.dragFunctions; - var toggle = value ? on : off; - toggle(cm.display.scroller, "dragstart", funcs.start); - toggle(cm.display.scroller, "dragenter", funcs.enter); - toggle(cm.display.scroller, "dragover", funcs.over); - toggle(cm.display.scroller, "dragleave", funcs.leave); - toggle(cm.display.scroller, "drop", funcs.drop); - } - } - - function wrappingChanged(cm) { - if (cm.options.lineWrapping) { - addClass(cm.display.wrapper, "CodeMirror-wrap"); - cm.display.sizer.style.minWidth = ""; - cm.display.sizerWidth = null; - } else { - rmClass(cm.display.wrapper, "CodeMirror-wrap"); - findMaxLine(cm); - } - estimateLineHeights(cm); - regChange(cm); - clearCaches(cm); - setTimeout(function () { return updateScrollbars(cm); }, 100); - } - - // A CodeMirror instance represents an editor. This is the object - // that user code is usually dealing with. - - function CodeMirror(place, options) { - var this$1 = this; - - if (!(this instanceof CodeMirror)) { return new CodeMirror(place, options) } - - this.options = options = options ? copyObj(options) : {}; - // Determine effective options based on given values and defaults. - copyObj(defaults, options, false); - setGuttersForLineNumbers(options); - - var doc = options.value; - if (typeof doc == "string") { doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction); } - else if (options.mode) { doc.modeOption = options.mode; } - this.doc = doc; - - var input = new CodeMirror.inputStyles[options.inputStyle](this); - var display = this.display = new Display(place, doc, input); - display.wrapper.CodeMirror = this; - updateGutters(this); - themeChanged(this); - if (options.lineWrapping) - { this.display.wrapper.className += " CodeMirror-wrap"; } - initScrollbars(this); - - this.state = { - keyMaps: [], // stores maps added by addKeyMap - overlays: [], // highlighting overlays, as added by addOverlay - modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info - overwrite: false, - delayingBlurEvent: false, - focused: false, - suppressEdits: false, // used to disable editing during key handlers when in readOnly mode - pasteIncoming: -1, cutIncoming: -1, // help recognize paste/cut edits in input.poll - selectingText: false, - draggingText: false, - highlight: new Delayed(), // stores highlight worker timeout - keySeq: null, // Unfinished key sequence - specialChars: null - }; - - if (options.autofocus && !mobile) { display.input.focus(); } - - // Override magic textarea content restore that IE sometimes does - // on our hidden textarea on reload - if (ie && ie_version < 11) { setTimeout(function () { return this$1.display.input.reset(true); }, 20); } - - registerEventHandlers(this); - ensureGlobalHandlers(); - - startOperation(this); - this.curOp.forceUpdate = true; - attachDoc(this, doc); - - if ((options.autofocus && !mobile) || this.hasFocus()) - { setTimeout(bind(onFocus, this), 20); } - else - { onBlur(this); } - - for (var opt in optionHandlers) { if (optionHandlers.hasOwnProperty(opt)) - { optionHandlers[opt](this$1, options[opt], Init); } } - maybeUpdateLineNumberWidth(this); - if (options.finishInit) { options.finishInit(this); } - for (var i = 0; i < initHooks.length; ++i) { initHooks[i](this$1); } - endOperation(this); - // Suppress optimizelegibility in Webkit, since it breaks text - // measuring on line wrapping boundaries. - if (webkit && options.lineWrapping && - getComputedStyle(display.lineDiv).textRendering == "optimizelegibility") - { display.lineDiv.style.textRendering = "auto"; } - } - - // The default configuration options. - CodeMirror.defaults = defaults; - // Functions to run when options are changed. - CodeMirror.optionHandlers = optionHandlers; - - // Attach the necessary event handlers when initializing the editor - function registerEventHandlers(cm) { - var d = cm.display; - on(d.scroller, "mousedown", operation(cm, onMouseDown)); - // Older IE's will not fire a second mousedown for a double click - if (ie && ie_version < 11) - { on(d.scroller, "dblclick", operation(cm, function (e) { - if (signalDOMEvent(cm, e)) { return } - var pos = posFromMouse(cm, e); - if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) { return } - e_preventDefault(e); - var word = cm.findWordAt(pos); - extendSelection(cm.doc, word.anchor, word.head); - })); } - else - { on(d.scroller, "dblclick", function (e) { return signalDOMEvent(cm, e) || e_preventDefault(e); }); } - // Some browsers fire contextmenu *after* opening the menu, at - // which point we can't mess with it anymore. Context menu is - // handled in onMouseDown for these browsers. - on(d.scroller, "contextmenu", function (e) { return onContextMenu(cm, e); }); - - // Used to suppress mouse event handling when a touch happens - var touchFinished, prevTouch = {end: 0}; - function finishTouch() { - if (d.activeTouch) { - touchFinished = setTimeout(function () { return d.activeTouch = null; }, 1000); - prevTouch = d.activeTouch; - prevTouch.end = +new Date; - } - } - function isMouseLikeTouchEvent(e) { - if (e.touches.length != 1) { return false } - var touch = e.touches[0]; - return touch.radiusX <= 1 && touch.radiusY <= 1 - } - function farAway(touch, other) { - if (other.left == null) { return true } - var dx = other.left - touch.left, dy = other.top - touch.top; - return dx * dx + dy * dy > 20 * 20 - } - on(d.scroller, "touchstart", function (e) { - if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e) && !clickInGutter(cm, e)) { - d.input.ensurePolled(); - clearTimeout(touchFinished); - var now = +new Date; - d.activeTouch = {start: now, moved: false, - prev: now - prevTouch.end <= 300 ? prevTouch : null}; - if (e.touches.length == 1) { - d.activeTouch.left = e.touches[0].pageX; - d.activeTouch.top = e.touches[0].pageY; - } - } - }); - on(d.scroller, "touchmove", function () { - if (d.activeTouch) { d.activeTouch.moved = true; } - }); - on(d.scroller, "touchend", function (e) { - var touch = d.activeTouch; - if (touch && !eventInWidget(d, e) && touch.left != null && - !touch.moved && new Date - touch.start < 300) { - var pos = cm.coordsChar(d.activeTouch, "page"), range; - if (!touch.prev || farAway(touch, touch.prev)) // Single tap - { range = new Range(pos, pos); } - else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap - { range = cm.findWordAt(pos); } - else // Triple tap - { range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); } - cm.setSelection(range.anchor, range.head); - cm.focus(); - e_preventDefault(e); - } - finishTouch(); - }); - on(d.scroller, "touchcancel", finishTouch); - - // Sync scrolling between fake scrollbars and real scrollable - // area, ensure viewport is updated when scrolling. - on(d.scroller, "scroll", function () { - if (d.scroller.clientHeight) { - updateScrollTop(cm, d.scroller.scrollTop); - setScrollLeft(cm, d.scroller.scrollLeft, true); - signal(cm, "scroll", cm); - } - }); - - // Listen to wheel events in order to try and update the viewport on time. - on(d.scroller, "mousewheel", function (e) { return onScrollWheel(cm, e); }); - on(d.scroller, "DOMMouseScroll", function (e) { return onScrollWheel(cm, e); }); - - // Prevent wrapper from ever scrolling - on(d.wrapper, "scroll", function () { return d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; }); - - d.dragFunctions = { - enter: function (e) {if (!signalDOMEvent(cm, e)) { e_stop(e); }}, - over: function (e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }}, - start: function (e) { return onDragStart(cm, e); }, - drop: operation(cm, onDrop), - leave: function (e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }} - }; - - var inp = d.input.getField(); - on(inp, "keyup", function (e) { return onKeyUp.call(cm, e); }); - on(inp, "keydown", operation(cm, onKeyDown)); - on(inp, "keypress", operation(cm, onKeyPress)); - on(inp, "focus", function (e) { return onFocus(cm, e); }); - on(inp, "blur", function (e) { return onBlur(cm, e); }); - } - - var initHooks = []; - CodeMirror.defineInitHook = function (f) { return initHooks.push(f); }; - - // Indent the given line. The how parameter can be "smart", - // "add"/null, "subtract", or "prev". When aggressive is false - // (typically set to true for forced single-line indents), empty - // lines are not indented, and places where the mode returns Pass - // are left alone. - function indentLine(cm, n, how, aggressive) { - var doc = cm.doc, state; - if (how == null) { how = "add"; } - if (how == "smart") { - // Fall back to "prev" when the mode doesn't have an indentation - // method. - if (!doc.mode.indent) { how = "prev"; } - else { state = getContextBefore(cm, n).state; } - } - - var tabSize = cm.options.tabSize; - var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize); - if (line.stateAfter) { line.stateAfter = null; } - var curSpaceString = line.text.match(/^\s*/)[0], indentation; - if (!aggressive && !/\S/.test(line.text)) { - indentation = 0; - how = "not"; - } else if (how == "smart") { - indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text); - if (indentation == Pass || indentation > 150) { - if (!aggressive) { return } - how = "prev"; - } - } - if (how == "prev") { - if (n > doc.first) { indentation = countColumn(getLine(doc, n-1).text, null, tabSize); } - else { indentation = 0; } - } else if (how == "add") { - indentation = curSpace + cm.options.indentUnit; - } else if (how == "subtract") { - indentation = curSpace - cm.options.indentUnit; - } else if (typeof how == "number") { - indentation = curSpace + how; - } - indentation = Math.max(0, indentation); - - var indentString = "", pos = 0; - if (cm.options.indentWithTabs) - { for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";} } - if (pos < indentation) { indentString += spaceStr(indentation - pos); } - - if (indentString != curSpaceString) { - replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input"); - line.stateAfter = null; - return true - } else { - // Ensure that, if the cursor was in the whitespace at the start - // of the line, it is moved to the end of that space. - for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) { - var range = doc.sel.ranges[i$1]; - if (range.head.line == n && range.head.ch < curSpaceString.length) { - var pos$1 = Pos(n, curSpaceString.length); - replaceOneSelection(doc, i$1, new Range(pos$1, pos$1)); - break - } - } - } - } - - // This will be set to a {lineWise: bool, text: [string]} object, so - // that, when pasting, we know what kind of selections the copied - // text was made out of. - var lastCopied = null; - - function setLastCopied(newLastCopied) { - lastCopied = newLastCopied; - } - - function applyTextInput(cm, inserted, deleted, sel, origin) { - var doc = cm.doc; - cm.display.shift = false; - if (!sel) { sel = doc.sel; } - - var recent = +new Date - 200; - var paste = origin == "paste" || cm.state.pasteIncoming > recent; - var textLines = splitLinesAuto(inserted), multiPaste = null; - // When pasting N lines into N selections, insert one line per selection - if (paste && sel.ranges.length > 1) { - if (lastCopied && lastCopied.text.join("\n") == inserted) { - if (sel.ranges.length % lastCopied.text.length == 0) { - multiPaste = []; - for (var i = 0; i < lastCopied.text.length; i++) - { multiPaste.push(doc.splitLines(lastCopied.text[i])); } - } - } else if (textLines.length == sel.ranges.length && cm.options.pasteLinesPerSelection) { - multiPaste = map(textLines, function (l) { return [l]; }); - } - } - - var updateInput = cm.curOp.updateInput; - // Normal behavior is to insert the new text into every selection - for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) { - var range$$1 = sel.ranges[i$1]; - var from = range$$1.from(), to = range$$1.to(); - if (range$$1.empty()) { - if (deleted && deleted > 0) // Handle deletion - { from = Pos(from.line, from.ch - deleted); } - else if (cm.state.overwrite && !paste) // Handle overwrite - { to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); } - else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == inserted) - { from = to = Pos(from.line, 0); } - } - var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines, - origin: origin || (paste ? "paste" : cm.state.cutIncoming > recent ? "cut" : "+input")}; - makeChange(cm.doc, changeEvent); - signalLater(cm, "inputRead", cm, changeEvent); - } - if (inserted && !paste) - { triggerElectric(cm, inserted); } - - ensureCursorVisible(cm); - if (cm.curOp.updateInput < 2) { cm.curOp.updateInput = updateInput; } - cm.curOp.typing = true; - cm.state.pasteIncoming = cm.state.cutIncoming = -1; - } - - function handlePaste(e, cm) { - var pasted = e.clipboardData && e.clipboardData.getData("Text"); - if (pasted) { - e.preventDefault(); - if (!cm.isReadOnly() && !cm.options.disableInput) - { runInOp(cm, function () { return applyTextInput(cm, pasted, 0, null, "paste"); }); } - return true - } - } - - function triggerElectric(cm, inserted) { - // When an 'electric' character is inserted, immediately trigger a reindent - if (!cm.options.electricChars || !cm.options.smartIndent) { return } - var sel = cm.doc.sel; - - for (var i = sel.ranges.length - 1; i >= 0; i--) { - var range$$1 = sel.ranges[i]; - if (range$$1.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range$$1.head.line)) { continue } - var mode = cm.getModeAt(range$$1.head); - var indented = false; - if (mode.electricChars) { - for (var j = 0; j < mode.electricChars.length; j++) - { if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) { - indented = indentLine(cm, range$$1.head.line, "smart"); - break - } } - } else if (mode.electricInput) { - if (mode.electricInput.test(getLine(cm.doc, range$$1.head.line).text.slice(0, range$$1.head.ch))) - { indented = indentLine(cm, range$$1.head.line, "smart"); } - } - if (indented) { signalLater(cm, "electricInput", cm, range$$1.head.line); } - } - } - - function copyableRanges(cm) { - var text = [], ranges = []; - for (var i = 0; i < cm.doc.sel.ranges.length; i++) { - var line = cm.doc.sel.ranges[i].head.line; - var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)}; - ranges.push(lineRange); - text.push(cm.getRange(lineRange.anchor, lineRange.head)); - } - return {text: text, ranges: ranges} - } - - function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) { - field.setAttribute("autocorrect", !!autocorrect); - field.setAttribute("autocapitalize", !!autocapitalize); - field.setAttribute("spellcheck", !!spellcheck); - } - - function hiddenTextarea() { - var te = elt("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"); - var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;"); - // The textarea is kept positioned near the cursor to prevent the - // fact that it'll be scrolled into view on input from scrolling - // our fake cursor out of view. On webkit, when wrap=off, paste is - // very slow. So make the area wide instead. - if (webkit) { te.style.width = "1000px"; } - else { te.setAttribute("wrap", "off"); } - // If border: 0; -- iOS fails to open keyboard (issue #1287) - if (ios) { te.style.border = "1px solid black"; } - disableBrowserMagic(te); - return div - } - - // The publicly visible API. Note that methodOp(f) means - // 'wrap f in an operation, performed on its `this` parameter'. - - // This is not the complete set of editor methods. Most of the - // methods defined on the Doc type are also injected into - // CodeMirror.prototype, for backwards compatibility and - // convenience. - - function addEditorMethods(CodeMirror) { - var optionHandlers = CodeMirror.optionHandlers; - - var helpers = CodeMirror.helpers = {}; - - CodeMirror.prototype = { - constructor: CodeMirror, - focus: function(){window.focus(); this.display.input.focus();}, - - setOption: function(option, value) { - var options = this.options, old = options[option]; - if (options[option] == value && option != "mode") { return } - options[option] = value; - if (optionHandlers.hasOwnProperty(option)) - { operation(this, optionHandlers[option])(this, value, old); } - signal(this, "optionChange", this, option); - }, - - getOption: function(option) {return this.options[option]}, - getDoc: function() {return this.doc}, - - addKeyMap: function(map$$1, bottom) { - this.state.keyMaps[bottom ? "push" : "unshift"](getKeyMap(map$$1)); - }, - removeKeyMap: function(map$$1) { - var maps = this.state.keyMaps; - for (var i = 0; i < maps.length; ++i) - { if (maps[i] == map$$1 || maps[i].name == map$$1) { - maps.splice(i, 1); - return true - } } - }, - - addOverlay: methodOp(function(spec, options) { - var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec); - if (mode.startState) { throw new Error("Overlays may not be stateful.") } - insertSorted(this.state.overlays, - {mode: mode, modeSpec: spec, opaque: options && options.opaque, - priority: (options && options.priority) || 0}, - function (overlay) { return overlay.priority; }); - this.state.modeGen++; - regChange(this); - }), - removeOverlay: methodOp(function(spec) { - var this$1 = this; - - var overlays = this.state.overlays; - for (var i = 0; i < overlays.length; ++i) { - var cur = overlays[i].modeSpec; - if (cur == spec || typeof spec == "string" && cur.name == spec) { - overlays.splice(i, 1); - this$1.state.modeGen++; - regChange(this$1); - return - } - } - }), - - indentLine: methodOp(function(n, dir, aggressive) { - if (typeof dir != "string" && typeof dir != "number") { - if (dir == null) { dir = this.options.smartIndent ? "smart" : "prev"; } - else { dir = dir ? "add" : "subtract"; } - } - if (isLine(this.doc, n)) { indentLine(this, n, dir, aggressive); } - }), - indentSelection: methodOp(function(how) { - var this$1 = this; - - var ranges = this.doc.sel.ranges, end = -1; - for (var i = 0; i < ranges.length; i++) { - var range$$1 = ranges[i]; - if (!range$$1.empty()) { - var from = range$$1.from(), to = range$$1.to(); - var start = Math.max(end, from.line); - end = Math.min(this$1.lastLine(), to.line - (to.ch ? 0 : 1)) + 1; - for (var j = start; j < end; ++j) - { indentLine(this$1, j, how); } - var newRanges = this$1.doc.sel.ranges; - if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0) - { replaceOneSelection(this$1.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); } - } else if (range$$1.head.line > end) { - indentLine(this$1, range$$1.head.line, how, true); - end = range$$1.head.line; - if (i == this$1.doc.sel.primIndex) { ensureCursorVisible(this$1); } - } - } - }), - - // Fetch the parser token for a given character. Useful for hacks - // that want to inspect the mode state (say, for completion). - getTokenAt: function(pos, precise) { - return takeToken(this, pos, precise) - }, - - getLineTokens: function(line, precise) { - return takeToken(this, Pos(line), precise, true) - }, - - getTokenTypeAt: function(pos) { - pos = clipPos(this.doc, pos); - var styles = getLineStyles(this, getLine(this.doc, pos.line)); - var before = 0, after = (styles.length - 1) / 2, ch = pos.ch; - var type; - if (ch == 0) { type = styles[2]; } - else { for (;;) { - var mid = (before + after) >> 1; - if ((mid ? styles[mid * 2 - 1] : 0) >= ch) { after = mid; } - else if (styles[mid * 2 + 1] < ch) { before = mid + 1; } - else { type = styles[mid * 2 + 2]; break } - } } - var cut = type ? type.indexOf("overlay ") : -1; - return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1) - }, - - getModeAt: function(pos) { - var mode = this.doc.mode; - if (!mode.innerMode) { return mode } - return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode - }, - - getHelper: function(pos, type) { - return this.getHelpers(pos, type)[0] - }, - - getHelpers: function(pos, type) { - var this$1 = this; - - var found = []; - if (!helpers.hasOwnProperty(type)) { return found } - var help = helpers[type], mode = this.getModeAt(pos); - if (typeof mode[type] == "string") { - if (help[mode[type]]) { found.push(help[mode[type]]); } - } else if (mode[type]) { - for (var i = 0; i < mode[type].length; i++) { - var val = help[mode[type][i]]; - if (val) { found.push(val); } - } - } else if (mode.helperType && help[mode.helperType]) { - found.push(help[mode.helperType]); - } else if (help[mode.name]) { - found.push(help[mode.name]); - } - for (var i$1 = 0; i$1 < help._global.length; i$1++) { - var cur = help._global[i$1]; - if (cur.pred(mode, this$1) && indexOf(found, cur.val) == -1) - { found.push(cur.val); } - } - return found - }, - - getStateAfter: function(line, precise) { - var doc = this.doc; - line = clipLine(doc, line == null ? doc.first + doc.size - 1: line); - return getContextBefore(this, line + 1, precise).state - }, - - cursorCoords: function(start, mode) { - var pos, range$$1 = this.doc.sel.primary(); - if (start == null) { pos = range$$1.head; } - else if (typeof start == "object") { pos = clipPos(this.doc, start); } - else { pos = start ? range$$1.from() : range$$1.to(); } - return cursorCoords(this, pos, mode || "page") - }, - - charCoords: function(pos, mode) { - return charCoords(this, clipPos(this.doc, pos), mode || "page") - }, - - coordsChar: function(coords, mode) { - coords = fromCoordSystem(this, coords, mode || "page"); - return coordsChar(this, coords.left, coords.top) - }, - - lineAtHeight: function(height, mode) { - height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top; - return lineAtHeight(this.doc, height + this.display.viewOffset) - }, - heightAtLine: function(line, mode, includeWidgets) { - var end = false, lineObj; - if (typeof line == "number") { - var last = this.doc.first + this.doc.size - 1; - if (line < this.doc.first) { line = this.doc.first; } - else if (line > last) { line = last; end = true; } - lineObj = getLine(this.doc, line); - } else { - lineObj = line; - } - return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || "page", includeWidgets || end).top + - (end ? this.doc.height - heightAtLine(lineObj) : 0) - }, - - defaultTextHeight: function() { return textHeight(this.display) }, - defaultCharWidth: function() { return charWidth(this.display) }, - - getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo}}, - - addWidget: function(pos, node, scroll, vert, horiz) { - var display = this.display; - pos = cursorCoords(this, clipPos(this.doc, pos)); - var top = pos.bottom, left = pos.left; - node.style.position = "absolute"; - node.setAttribute("cm-ignore-events", "true"); - this.display.input.setUneditable(node); - display.sizer.appendChild(node); - if (vert == "over") { - top = pos.top; - } else if (vert == "above" || vert == "near") { - var vspace = Math.max(display.wrapper.clientHeight, this.doc.height), - hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth); - // Default to positioning above (if specified and possible); otherwise default to positioning below - if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight) - { top = pos.top - node.offsetHeight; } - else if (pos.bottom + node.offsetHeight <= vspace) - { top = pos.bottom; } - if (left + node.offsetWidth > hspace) - { left = hspace - node.offsetWidth; } - } - node.style.top = top + "px"; - node.style.left = node.style.right = ""; - if (horiz == "right") { - left = display.sizer.clientWidth - node.offsetWidth; - node.style.right = "0px"; - } else { - if (horiz == "left") { left = 0; } - else if (horiz == "middle") { left = (display.sizer.clientWidth - node.offsetWidth) / 2; } - node.style.left = left + "px"; - } - if (scroll) - { scrollIntoView(this, {left: left, top: top, right: left + node.offsetWidth, bottom: top + node.offsetHeight}); } - }, - - triggerOnKeyDown: methodOp(onKeyDown), - triggerOnKeyPress: methodOp(onKeyPress), - triggerOnKeyUp: onKeyUp, - triggerOnMouseDown: methodOp(onMouseDown), - - execCommand: function(cmd) { - if (commands.hasOwnProperty(cmd)) - { return commands[cmd].call(null, this) } - }, - - triggerElectric: methodOp(function(text) { triggerElectric(this, text); }), - - findPosH: function(from, amount, unit, visually) { - var this$1 = this; - - var dir = 1; - if (amount < 0) { dir = -1; amount = -amount; } - var cur = clipPos(this.doc, from); - for (var i = 0; i < amount; ++i) { - cur = findPosH(this$1.doc, cur, dir, unit, visually); - if (cur.hitSide) { break } - } - return cur - }, - - moveH: methodOp(function(dir, unit) { - var this$1 = this; - - this.extendSelectionsBy(function (range$$1) { - if (this$1.display.shift || this$1.doc.extend || range$$1.empty()) - { return findPosH(this$1.doc, range$$1.head, dir, unit, this$1.options.rtlMoveVisually) } - else - { return dir < 0 ? range$$1.from() : range$$1.to() } - }, sel_move); - }), - - deleteH: methodOp(function(dir, unit) { - var sel = this.doc.sel, doc = this.doc; - if (sel.somethingSelected()) - { doc.replaceSelection("", null, "+delete"); } - else - { deleteNearSelection(this, function (range$$1) { - var other = findPosH(doc, range$$1.head, dir, unit, false); - return dir < 0 ? {from: other, to: range$$1.head} : {from: range$$1.head, to: other} - }); } - }), - - findPosV: function(from, amount, unit, goalColumn) { - var this$1 = this; - - var dir = 1, x = goalColumn; - if (amount < 0) { dir = -1; amount = -amount; } - var cur = clipPos(this.doc, from); - for (var i = 0; i < amount; ++i) { - var coords = cursorCoords(this$1, cur, "div"); - if (x == null) { x = coords.left; } - else { coords.left = x; } - cur = findPosV(this$1, coords, dir, unit); - if (cur.hitSide) { break } - } - return cur - }, - - moveV: methodOp(function(dir, unit) { - var this$1 = this; - - var doc = this.doc, goals = []; - var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected(); - doc.extendSelectionsBy(function (range$$1) { - if (collapse) - { return dir < 0 ? range$$1.from() : range$$1.to() } - var headPos = cursorCoords(this$1, range$$1.head, "div"); - if (range$$1.goalColumn != null) { headPos.left = range$$1.goalColumn; } - goals.push(headPos.left); - var pos = findPosV(this$1, headPos, dir, unit); - if (unit == "page" && range$$1 == doc.sel.primary()) - { addToScrollTop(this$1, charCoords(this$1, pos, "div").top - headPos.top); } - return pos - }, sel_move); - if (goals.length) { for (var i = 0; i < doc.sel.ranges.length; i++) - { doc.sel.ranges[i].goalColumn = goals[i]; } } - }), - - // Find the word at the given position (as returned by coordsChar). - findWordAt: function(pos) { - var doc = this.doc, line = getLine(doc, pos.line).text; - var start = pos.ch, end = pos.ch; - if (line) { - var helper = this.getHelper(pos, "wordChars"); - if ((pos.sticky == "before" || end == line.length) && start) { --start; } else { ++end; } - var startChar = line.charAt(start); - var check = isWordChar(startChar, helper) - ? function (ch) { return isWordChar(ch, helper); } - : /\s/.test(startChar) ? function (ch) { return /\s/.test(ch); } - : function (ch) { return (!/\s/.test(ch) && !isWordChar(ch)); }; - while (start > 0 && check(line.charAt(start - 1))) { --start; } - while (end < line.length && check(line.charAt(end))) { ++end; } - } - return new Range(Pos(pos.line, start), Pos(pos.line, end)) - }, - - toggleOverwrite: function(value) { - if (value != null && value == this.state.overwrite) { return } - if (this.state.overwrite = !this.state.overwrite) - { addClass(this.display.cursorDiv, "CodeMirror-overwrite"); } - else - { rmClass(this.display.cursorDiv, "CodeMirror-overwrite"); } - - signal(this, "overwriteToggle", this, this.state.overwrite); - }, - hasFocus: function() { return this.display.input.getField() == activeElt() }, - isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) }, - - scrollTo: methodOp(function (x, y) { scrollToCoords(this, x, y); }), - getScrollInfo: function() { - var scroller = this.display.scroller; - return {left: scroller.scrollLeft, top: scroller.scrollTop, - height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight, - width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth, - clientHeight: displayHeight(this), clientWidth: displayWidth(this)} - }, - - scrollIntoView: methodOp(function(range$$1, margin) { - if (range$$1 == null) { - range$$1 = {from: this.doc.sel.primary().head, to: null}; - if (margin == null) { margin = this.options.cursorScrollMargin; } - } else if (typeof range$$1 == "number") { - range$$1 = {from: Pos(range$$1, 0), to: null}; - } else if (range$$1.from == null) { - range$$1 = {from: range$$1, to: null}; - } - if (!range$$1.to) { range$$1.to = range$$1.from; } - range$$1.margin = margin || 0; - - if (range$$1.from.line != null) { - scrollToRange(this, range$$1); - } else { - scrollToCoordsRange(this, range$$1.from, range$$1.to, range$$1.margin); - } - }), - - setSize: methodOp(function(width, height) { - var this$1 = this; - - var interpret = function (val) { return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val; }; - if (width != null) { this.display.wrapper.style.width = interpret(width); } - if (height != null) { this.display.wrapper.style.height = interpret(height); } - if (this.options.lineWrapping) { clearLineMeasurementCache(this); } - var lineNo$$1 = this.display.viewFrom; - this.doc.iter(lineNo$$1, this.display.viewTo, function (line) { - if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) - { if (line.widgets[i].noHScroll) { regLineChange(this$1, lineNo$$1, "widget"); break } } } - ++lineNo$$1; - }); - this.curOp.forceUpdate = true; - signal(this, "refresh", this); - }), - - operation: function(f){return runInOp(this, f)}, - startOperation: function(){return startOperation(this)}, - endOperation: function(){return endOperation(this)}, - - refresh: methodOp(function() { - var oldHeight = this.display.cachedTextHeight; - regChange(this); - this.curOp.forceUpdate = true; - clearCaches(this); - scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop); - updateGutterSpace(this); - if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5) - { estimateLineHeights(this); } - signal(this, "refresh", this); - }), - - swapDoc: methodOp(function(doc) { - var old = this.doc; - old.cm = null; - attachDoc(this, doc); - clearCaches(this); - this.display.input.reset(); - scrollToCoords(this, doc.scrollLeft, doc.scrollTop); - this.curOp.forceScroll = true; - signalLater(this, "swapDoc", this, old); - return old - }), - - phrase: function(phraseText) { - var phrases = this.options.phrases; - return phrases && Object.prototype.hasOwnProperty.call(phrases, phraseText) ? phrases[phraseText] : phraseText - }, - - getInputField: function(){return this.display.input.getField()}, - getWrapperElement: function(){return this.display.wrapper}, - getScrollerElement: function(){return this.display.scroller}, - getGutterElement: function(){return this.display.gutters} - }; - eventMixin(CodeMirror); - - CodeMirror.registerHelper = function(type, name, value) { - if (!helpers.hasOwnProperty(type)) { helpers[type] = CodeMirror[type] = {_global: []}; } - helpers[type][name] = value; - }; - CodeMirror.registerGlobalHelper = function(type, name, predicate, value) { - CodeMirror.registerHelper(type, name, value); - helpers[type]._global.push({pred: predicate, val: value}); - }; - } - - // Used for horizontal relative motion. Dir is -1 or 1 (left or - // right), unit can be "char", "column" (like char, but doesn't - // cross line boundaries), "word" (across next word), or "group" (to - // the start of next group of word or non-word-non-whitespace - // chars). The visually param controls whether, in right-to-left - // text, direction 1 means to move towards the next index in the - // string, or towards the character to the right of the current - // position. The resulting position will have a hitSide=true - // property if it reached the end of the document. - function findPosH(doc, pos, dir, unit, visually) { - var oldPos = pos; - var origDir = dir; - var lineObj = getLine(doc, pos.line); - function findNextLine() { - var l = pos.line + dir; - if (l < doc.first || l >= doc.first + doc.size) { return false } - pos = new Pos(l, pos.ch, pos.sticky); - return lineObj = getLine(doc, l) - } - function moveOnce(boundToLine) { - var next; - if (visually) { - next = moveVisually(doc.cm, lineObj, pos, dir); - } else { - next = moveLogically(lineObj, pos, dir); - } - if (next == null) { - if (!boundToLine && findNextLine()) - { pos = endOfLine(visually, doc.cm, lineObj, pos.line, dir); } - else - { return false } - } else { - pos = next; - } - return true - } - - if (unit == "char") { - moveOnce(); - } else if (unit == "column") { - moveOnce(true); - } else if (unit == "word" || unit == "group") { - var sawType = null, group = unit == "group"; - var helper = doc.cm && doc.cm.getHelper(pos, "wordChars"); - for (var first = true;; first = false) { - if (dir < 0 && !moveOnce(!first)) { break } - var cur = lineObj.text.charAt(pos.ch) || "\n"; - var type = isWordChar(cur, helper) ? "w" - : group && cur == "\n" ? "n" - : !group || /\s/.test(cur) ? null - : "p"; - if (group && !first && !type) { type = "s"; } - if (sawType && sawType != type) { - if (dir < 0) {dir = 1; moveOnce(); pos.sticky = "after";} - break - } - - if (type) { sawType = type; } - if (dir > 0 && !moveOnce(!first)) { break } - } - } - var result = skipAtomic(doc, pos, oldPos, origDir, true); - if (equalCursorPos(oldPos, result)) { result.hitSide = true; } - return result - } - - // For relative vertical movement. Dir may be -1 or 1. Unit can be - // "page" or "line". The resulting position will have a hitSide=true - // property if it reached the end of the document. - function findPosV(cm, pos, dir, unit) { - var doc = cm.doc, x = pos.left, y; - if (unit == "page") { - var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight); - var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3); - y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount; - - } else if (unit == "line") { - y = dir > 0 ? pos.bottom + 3 : pos.top - 3; - } - var target; - for (;;) { - target = coordsChar(cm, x, y); - if (!target.outside) { break } - if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break } - y += dir * 5; - } - return target - } - - // CONTENTEDITABLE INPUT STYLE - - var ContentEditableInput = function(cm) { - this.cm = cm; - this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null; - this.polling = new Delayed(); - this.composing = null; - this.gracePeriod = false; - this.readDOMTimeout = null; - }; - - ContentEditableInput.prototype.init = function (display) { - var this$1 = this; - - var input = this, cm = input.cm; - var div = input.div = display.lineDiv; - disableBrowserMagic(div, cm.options.spellcheck, cm.options.autocorrect, cm.options.autocapitalize); - - on(div, "paste", function (e) { - if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return } - // IE doesn't fire input events, so we schedule a read for the pasted content in this way - if (ie_version <= 11) { setTimeout(operation(cm, function () { return this$1.updateFromDOM(); }), 20); } - }); - - on(div, "compositionstart", function (e) { - this$1.composing = {data: e.data, done: false}; - }); - on(div, "compositionupdate", function (e) { - if (!this$1.composing) { this$1.composing = {data: e.data, done: false}; } - }); - on(div, "compositionend", function (e) { - if (this$1.composing) { - if (e.data != this$1.composing.data) { this$1.readFromDOMSoon(); } - this$1.composing.done = true; - } - }); - - on(div, "touchstart", function () { return input.forceCompositionEnd(); }); - - on(div, "input", function () { - if (!this$1.composing) { this$1.readFromDOMSoon(); } - }); - - function onCopyCut(e) { - if (signalDOMEvent(cm, e)) { return } - if (cm.somethingSelected()) { - setLastCopied({lineWise: false, text: cm.getSelections()}); - if (e.type == "cut") { cm.replaceSelection("", null, "cut"); } - } else if (!cm.options.lineWiseCopyCut) { - return - } else { - var ranges = copyableRanges(cm); - setLastCopied({lineWise: true, text: ranges.text}); - if (e.type == "cut") { - cm.operation(function () { - cm.setSelections(ranges.ranges, 0, sel_dontScroll); - cm.replaceSelection("", null, "cut"); - }); - } - } - if (e.clipboardData) { - e.clipboardData.clearData(); - var content = lastCopied.text.join("\n"); - // iOS exposes the clipboard API, but seems to discard content inserted into it - e.clipboardData.setData("Text", content); - if (e.clipboardData.getData("Text") == content) { - e.preventDefault(); - return - } - } - // Old-fashioned briefly-focus-a-textarea hack - var kludge = hiddenTextarea(), te = kludge.firstChild; - cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild); - te.value = lastCopied.text.join("\n"); - var hadFocus = document.activeElement; - selectInput(te); - setTimeout(function () { - cm.display.lineSpace.removeChild(kludge); - hadFocus.focus(); - if (hadFocus == div) { input.showPrimarySelection(); } - }, 50); - } - on(div, "copy", onCopyCut); - on(div, "cut", onCopyCut); - }; - - ContentEditableInput.prototype.prepareSelection = function () { - var result = prepareSelection(this.cm, false); - result.focus = this.cm.state.focused; - return result - }; - - ContentEditableInput.prototype.showSelection = function (info, takeFocus) { - if (!info || !this.cm.display.view.length) { return } - if (info.focus || takeFocus) { this.showPrimarySelection(); } - this.showMultipleSelections(info); - }; - - ContentEditableInput.prototype.getSelection = function () { - return this.cm.display.wrapper.ownerDocument.getSelection() - }; - - ContentEditableInput.prototype.showPrimarySelection = function () { - var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary(); - var from = prim.from(), to = prim.to(); - - if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) { - sel.removeAllRanges(); - return - } - - var curAnchor = domToPos(cm, sel.anchorNode, sel.anchorOffset); - var curFocus = domToPos(cm, sel.focusNode, sel.focusOffset); - if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad && - cmp(minPos(curAnchor, curFocus), from) == 0 && - cmp(maxPos(curAnchor, curFocus), to) == 0) - { return } - - var view = cm.display.view; - var start = (from.line >= cm.display.viewFrom && posToDOM(cm, from)) || - {node: view[0].measure.map[2], offset: 0}; - var end = to.line < cm.display.viewTo && posToDOM(cm, to); - if (!end) { - var measure = view[view.length - 1].measure; - var map$$1 = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map; - end = {node: map$$1[map$$1.length - 1], offset: map$$1[map$$1.length - 2] - map$$1[map$$1.length - 3]}; - } - - if (!start || !end) { - sel.removeAllRanges(); - return - } - - var old = sel.rangeCount && sel.getRangeAt(0), rng; - try { rng = range(start.node, start.offset, end.offset, end.node); } - catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible - if (rng) { - if (!gecko && cm.state.focused) { - sel.collapse(start.node, start.offset); - if (!rng.collapsed) { - sel.removeAllRanges(); - sel.addRange(rng); - } - } else { - sel.removeAllRanges(); - sel.addRange(rng); - } - if (old && sel.anchorNode == null) { sel.addRange(old); } - else if (gecko) { this.startGracePeriod(); } - } - this.rememberSelection(); - }; - - ContentEditableInput.prototype.startGracePeriod = function () { - var this$1 = this; - - clearTimeout(this.gracePeriod); - this.gracePeriod = setTimeout(function () { - this$1.gracePeriod = false; - if (this$1.selectionChanged()) - { this$1.cm.operation(function () { return this$1.cm.curOp.selectionChanged = true; }); } - }, 20); - }; - - ContentEditableInput.prototype.showMultipleSelections = function (info) { - removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors); - removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection); - }; - - ContentEditableInput.prototype.rememberSelection = function () { - var sel = this.getSelection(); - this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset; - this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset; - }; - - ContentEditableInput.prototype.selectionInEditor = function () { - var sel = this.getSelection(); - if (!sel.rangeCount) { return false } - var node = sel.getRangeAt(0).commonAncestorContainer; - return contains(this.div, node) - }; - - ContentEditableInput.prototype.focus = function () { - if (this.cm.options.readOnly != "nocursor") { - if (!this.selectionInEditor()) - { this.showSelection(this.prepareSelection(), true); } - this.div.focus(); - } - }; - ContentEditableInput.prototype.blur = function () { this.div.blur(); }; - ContentEditableInput.prototype.getField = function () { return this.div }; - - ContentEditableInput.prototype.supportsTouch = function () { return true }; - - ContentEditableInput.prototype.receivedFocus = function () { - var input = this; - if (this.selectionInEditor()) - { this.pollSelection(); } - else - { runInOp(this.cm, function () { return input.cm.curOp.selectionChanged = true; }); } - - function poll() { - if (input.cm.state.focused) { - input.pollSelection(); - input.polling.set(input.cm.options.pollInterval, poll); - } - } - this.polling.set(this.cm.options.pollInterval, poll); - }; - - ContentEditableInput.prototype.selectionChanged = function () { - var sel = this.getSelection(); - return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset || - sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset - }; - - ContentEditableInput.prototype.pollSelection = function () { - if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return } - var sel = this.getSelection(), cm = this.cm; - // On Android Chrome (version 56, at least), backspacing into an - // uneditable block element will put the cursor in that element, - // and then, because it's not editable, hide the virtual keyboard. - // Because Android doesn't allow us to actually detect backspace - // presses in a sane way, this code checks for when that happens - // and simulates a backspace press in this case. - if (android && chrome && this.cm.options.gutters.length && isInGutter(sel.anchorNode)) { - this.cm.triggerOnKeyDown({type: "keydown", keyCode: 8, preventDefault: Math.abs}); - this.blur(); - this.focus(); - return - } - if (this.composing) { return } - this.rememberSelection(); - var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset); - var head = domToPos(cm, sel.focusNode, sel.focusOffset); - if (anchor && head) { runInOp(cm, function () { - setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll); - if (anchor.bad || head.bad) { cm.curOp.selectionChanged = true; } - }); } - }; - - ContentEditableInput.prototype.pollContent = function () { - if (this.readDOMTimeout != null) { - clearTimeout(this.readDOMTimeout); - this.readDOMTimeout = null; - } - - var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary(); - var from = sel.from(), to = sel.to(); - if (from.ch == 0 && from.line > cm.firstLine()) - { from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length); } - if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine()) - { to = Pos(to.line + 1, 0); } - if (from.line < display.viewFrom || to.line > display.viewTo - 1) { return false } - - var fromIndex, fromLine, fromNode; - if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) { - fromLine = lineNo(display.view[0].line); - fromNode = display.view[0].node; - } else { - fromLine = lineNo(display.view[fromIndex].line); - fromNode = display.view[fromIndex - 1].node.nextSibling; - } - var toIndex = findViewIndex(cm, to.line); - var toLine, toNode; - if (toIndex == display.view.length - 1) { - toLine = display.viewTo - 1; - toNode = display.lineDiv.lastChild; - } else { - toLine = lineNo(display.view[toIndex + 1].line) - 1; - toNode = display.view[toIndex + 1].node.previousSibling; - } - - if (!fromNode) { return false } - var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine)); - var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length)); - while (newText.length > 1 && oldText.length > 1) { - if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; } - else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; } - else { break } - } - - var cutFront = 0, cutEnd = 0; - var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length); - while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront)) - { ++cutFront; } - var newBot = lst(newText), oldBot = lst(oldText); - var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0), - oldBot.length - (oldText.length == 1 ? cutFront : 0)); - while (cutEnd < maxCutEnd && - newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) - { ++cutEnd; } - // Try to move start of change to start of selection if ambiguous - if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) { - while (cutFront && cutFront > from.ch && - newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) { - cutFront--; - cutEnd++; - } - } - - newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\u200b+/, ""); - newText[0] = newText[0].slice(cutFront).replace(/\u200b+$/, ""); - - var chFrom = Pos(fromLine, cutFront); - var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0); - if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) { - replaceRange(cm.doc, newText, chFrom, chTo, "+input"); - return true - } - }; - - ContentEditableInput.prototype.ensurePolled = function () { - this.forceCompositionEnd(); - }; - ContentEditableInput.prototype.reset = function () { - this.forceCompositionEnd(); - }; - ContentEditableInput.prototype.forceCompositionEnd = function () { - if (!this.composing) { return } - clearTimeout(this.readDOMTimeout); - this.composing = null; - this.updateFromDOM(); - this.div.blur(); - this.div.focus(); - }; - ContentEditableInput.prototype.readFromDOMSoon = function () { - var this$1 = this; - - if (this.readDOMTimeout != null) { return } - this.readDOMTimeout = setTimeout(function () { - this$1.readDOMTimeout = null; - if (this$1.composing) { - if (this$1.composing.done) { this$1.composing = null; } - else { return } - } - this$1.updateFromDOM(); - }, 80); - }; - - ContentEditableInput.prototype.updateFromDOM = function () { - var this$1 = this; - - if (this.cm.isReadOnly() || !this.pollContent()) - { runInOp(this.cm, function () { return regChange(this$1.cm); }); } - }; - - ContentEditableInput.prototype.setUneditable = function (node) { - node.contentEditable = "false"; - }; - - ContentEditableInput.prototype.onKeyPress = function (e) { - if (e.charCode == 0 || this.composing) { return } - e.preventDefault(); - if (!this.cm.isReadOnly()) - { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); } - }; - - ContentEditableInput.prototype.readOnlyChanged = function (val) { - this.div.contentEditable = String(val != "nocursor"); - }; - - ContentEditableInput.prototype.onContextMenu = function () {}; - ContentEditableInput.prototype.resetPosition = function () {}; - - ContentEditableInput.prototype.needsContentAttribute = true; - - function posToDOM(cm, pos) { - var view = findViewForLine(cm, pos.line); - if (!view || view.hidden) { return null } - var line = getLine(cm.doc, pos.line); - var info = mapFromLineView(view, line, pos.line); - - var order = getOrder(line, cm.doc.direction), side = "left"; - if (order) { - var partPos = getBidiPartAt(order, pos.ch); - side = partPos % 2 ? "right" : "left"; - } - var result = nodeAndOffsetInLineMap(info.map, pos.ch, side); - result.offset = result.collapse == "right" ? result.end : result.start; - return result - } - - function isInGutter(node) { - for (var scan = node; scan; scan = scan.parentNode) - { if (/CodeMirror-gutter-wrapper/.test(scan.className)) { return true } } - return false - } - - function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos } - - function domTextBetween(cm, from, to, fromLine, toLine) { - var text = "", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false; - function recognizeMarker(id) { return function (marker) { return marker.id == id; } } - function close() { - if (closing) { - text += lineSep; - if (extraLinebreak) { text += lineSep; } - closing = extraLinebreak = false; - } - } - function addText(str) { - if (str) { - close(); - text += str; - } - } - function walk(node) { - if (node.nodeType == 1) { - var cmText = node.getAttribute("cm-text"); - if (cmText) { - addText(cmText); - return - } - var markerID = node.getAttribute("cm-marker"), range$$1; - if (markerID) { - var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID)); - if (found.length && (range$$1 = found[0].find(0))) - { addText(getBetween(cm.doc, range$$1.from, range$$1.to).join(lineSep)); } - return - } - if (node.getAttribute("contenteditable") == "false") { return } - var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName); - if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return } - - if (isBlock) { close(); } - for (var i = 0; i < node.childNodes.length; i++) - { walk(node.childNodes[i]); } - - if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; } - if (isBlock) { closing = true; } - } else if (node.nodeType == 3) { - addText(node.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " ")); - } - } - for (;;) { - walk(from); - if (from == to) { break } - from = from.nextSibling; - extraLinebreak = false; - } - return text - } - - function domToPos(cm, node, offset) { - var lineNode; - if (node == cm.display.lineDiv) { - lineNode = cm.display.lineDiv.childNodes[offset]; - if (!lineNode) { return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true) } - node = null; offset = 0; - } else { - for (lineNode = node;; lineNode = lineNode.parentNode) { - if (!lineNode || lineNode == cm.display.lineDiv) { return null } - if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) { break } - } - } - for (var i = 0; i < cm.display.view.length; i++) { - var lineView = cm.display.view[i]; - if (lineView.node == lineNode) - { return locateNodeInLineView(lineView, node, offset) } - } - } - - function locateNodeInLineView(lineView, node, offset) { - var wrapper = lineView.text.firstChild, bad = false; - if (!node || !contains(wrapper, node)) { return badPos(Pos(lineNo(lineView.line), 0), true) } - if (node == wrapper) { - bad = true; - node = wrapper.childNodes[offset]; - offset = 0; - if (!node) { - var line = lineView.rest ? lst(lineView.rest) : lineView.line; - return badPos(Pos(lineNo(line), line.text.length), bad) - } - } - - var textNode = node.nodeType == 3 ? node : null, topNode = node; - if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) { - textNode = node.firstChild; - if (offset) { offset = textNode.nodeValue.length; } - } - while (topNode.parentNode != wrapper) { topNode = topNode.parentNode; } - var measure = lineView.measure, maps = measure.maps; - - function find(textNode, topNode, offset) { - for (var i = -1; i < (maps ? maps.length : 0); i++) { - var map$$1 = i < 0 ? measure.map : maps[i]; - for (var j = 0; j < map$$1.length; j += 3) { - var curNode = map$$1[j + 2]; - if (curNode == textNode || curNode == topNode) { - var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]); - var ch = map$$1[j] + offset; - if (offset < 0 || curNode != textNode) { ch = map$$1[j + (offset ? 1 : 0)]; } - return Pos(line, ch) - } - } - } - } - var found = find(textNode, topNode, offset); - if (found) { return badPos(found, bad) } - - // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems - for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) { - found = find(after, after.firstChild, 0); - if (found) - { return badPos(Pos(found.line, found.ch - dist), bad) } - else - { dist += after.textContent.length; } - } - for (var before = topNode.previousSibling, dist$1 = offset; before; before = before.previousSibling) { - found = find(before, before.firstChild, -1); - if (found) - { return badPos(Pos(found.line, found.ch + dist$1), bad) } - else - { dist$1 += before.textContent.length; } - } - } - - // TEXTAREA INPUT STYLE - - var TextareaInput = function(cm) { - this.cm = cm; - // See input.poll and input.reset - this.prevInput = ""; - - // Flag that indicates whether we expect input to appear real soon - // now (after some event like 'keypress' or 'input') and are - // polling intensively. - this.pollingFast = false; - // Self-resetting timeout for the poller - this.polling = new Delayed(); - // Used to work around IE issue with selection being forgotten when focus moves away from textarea - this.hasSelection = false; - this.composing = null; - }; - - TextareaInput.prototype.init = function (display) { - var this$1 = this; - - var input = this, cm = this.cm; - this.createField(display); - var te = this.textarea; - - display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild); - - // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore) - if (ios) { te.style.width = "0px"; } - - on(te, "input", function () { - if (ie && ie_version >= 9 && this$1.hasSelection) { this$1.hasSelection = null; } - input.poll(); - }); - - on(te, "paste", function (e) { - if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return } - - cm.state.pasteIncoming = +new Date; - input.fastPoll(); - }); - - function prepareCopyCut(e) { - if (signalDOMEvent(cm, e)) { return } - if (cm.somethingSelected()) { - setLastCopied({lineWise: false, text: cm.getSelections()}); - } else if (!cm.options.lineWiseCopyCut) { - return - } else { - var ranges = copyableRanges(cm); - setLastCopied({lineWise: true, text: ranges.text}); - if (e.type == "cut") { - cm.setSelections(ranges.ranges, null, sel_dontScroll); - } else { - input.prevInput = ""; - te.value = ranges.text.join("\n"); - selectInput(te); - } - } - if (e.type == "cut") { cm.state.cutIncoming = +new Date; } - } - on(te, "cut", prepareCopyCut); - on(te, "copy", prepareCopyCut); - - on(display.scroller, "paste", function (e) { - if (eventInWidget(display, e) || signalDOMEvent(cm, e)) { return } - if (!te.dispatchEvent) { - cm.state.pasteIncoming = +new Date; - input.focus(); - return - } - - // Pass the `paste` event to the textarea so it's handled by its event listener. - var event = new Event("paste"); - event.clipboardData = e.clipboardData; - te.dispatchEvent(event); - }); - - // Prevent normal selection in the editor (we handle our own) - on(display.lineSpace, "selectstart", function (e) { - if (!eventInWidget(display, e)) { e_preventDefault(e); } - }); - - on(te, "compositionstart", function () { - var start = cm.getCursor("from"); - if (input.composing) { input.composing.range.clear(); } - input.composing = { - start: start, - range: cm.markText(start, cm.getCursor("to"), {className: "CodeMirror-composing"}) - }; - }); - on(te, "compositionend", function () { - if (input.composing) { - input.poll(); - input.composing.range.clear(); - input.composing = null; - } - }); - }; - - TextareaInput.prototype.createField = function (_display) { - // Wraps and hides input textarea - this.wrapper = hiddenTextarea(); - // The semihidden textarea that is focused when the editor is - // focused, and receives input. - this.textarea = this.wrapper.firstChild; - }; - - TextareaInput.prototype.prepareSelection = function () { - // Redraw the selection and/or cursor - var cm = this.cm, display = cm.display, doc = cm.doc; - var result = prepareSelection(cm); - - // Move the hidden textarea near the cursor to prevent scrolling artifacts - if (cm.options.moveInputWithCursor) { - var headPos = cursorCoords(cm, doc.sel.primary().head, "div"); - var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect(); - result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10, - headPos.top + lineOff.top - wrapOff.top)); - result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10, - headPos.left + lineOff.left - wrapOff.left)); - } - - return result - }; - - TextareaInput.prototype.showSelection = function (drawn) { - var cm = this.cm, display = cm.display; - removeChildrenAndAdd(display.cursorDiv, drawn.cursors); - removeChildrenAndAdd(display.selectionDiv, drawn.selection); - if (drawn.teTop != null) { - this.wrapper.style.top = drawn.teTop + "px"; - this.wrapper.style.left = drawn.teLeft + "px"; - } - }; - - // Reset the input to correspond to the selection (or to be empty, - // when not typing and nothing is selected) - TextareaInput.prototype.reset = function (typing) { - if (this.contextMenuPending || this.composing) { return } - var cm = this.cm; - if (cm.somethingSelected()) { - this.prevInput = ""; - var content = cm.getSelection(); - this.textarea.value = content; - if (cm.state.focused) { selectInput(this.textarea); } - if (ie && ie_version >= 9) { this.hasSelection = content; } - } else if (!typing) { - this.prevInput = this.textarea.value = ""; - if (ie && ie_version >= 9) { this.hasSelection = null; } - } - }; - - TextareaInput.prototype.getField = function () { return this.textarea }; - - TextareaInput.prototype.supportsTouch = function () { return false }; - - TextareaInput.prototype.focus = function () { - if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt() != this.textarea)) { - try { this.textarea.focus(); } - catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM - } - }; - - TextareaInput.prototype.blur = function () { this.textarea.blur(); }; - - TextareaInput.prototype.resetPosition = function () { - this.wrapper.style.top = this.wrapper.style.left = 0; - }; - - TextareaInput.prototype.receivedFocus = function () { this.slowPoll(); }; - - // Poll for input changes, using the normal rate of polling. This - // runs as long as the editor is focused. - TextareaInput.prototype.slowPoll = function () { - var this$1 = this; - - if (this.pollingFast) { return } - this.polling.set(this.cm.options.pollInterval, function () { - this$1.poll(); - if (this$1.cm.state.focused) { this$1.slowPoll(); } - }); - }; - - // When an event has just come in that is likely to add or change - // something in the input textarea, we poll faster, to ensure that - // the change appears on the screen quickly. - TextareaInput.prototype.fastPoll = function () { - var missed = false, input = this; - input.pollingFast = true; - function p() { - var changed = input.poll(); - if (!changed && !missed) {missed = true; input.polling.set(60, p);} - else {input.pollingFast = false; input.slowPoll();} - } - input.polling.set(20, p); - }; - - // Read input from the textarea, and update the document to match. - // When something is selected, it is present in the textarea, and - // selected (unless it is huge, in which case a placeholder is - // used). When nothing is selected, the cursor sits after previously - // seen text (can be empty), which is stored in prevInput (we must - // not reset the textarea when typing, because that breaks IME). - TextareaInput.prototype.poll = function () { - var this$1 = this; - - var cm = this.cm, input = this.textarea, prevInput = this.prevInput; - // Since this is called a *lot*, try to bail out as cheaply as - // possible when it is clear that nothing happened. hasSelection - // will be the case when there is a lot of text in the textarea, - // in which case reading its value would be expensive. - if (this.contextMenuPending || !cm.state.focused || - (hasSelection(input) && !prevInput && !this.composing) || - cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq) - { return false } - - var text = input.value; - // If nothing changed, bail. - if (text == prevInput && !cm.somethingSelected()) { return false } - // Work around nonsensical selection resetting in IE9/10, and - // inexplicable appearance of private area unicode characters on - // some key combos in Mac (#2689). - if (ie && ie_version >= 9 && this.hasSelection === text || - mac && /[\uf700-\uf7ff]/.test(text)) { - cm.display.input.reset(); - return false - } - - if (cm.doc.sel == cm.display.selForContextMenu) { - var first = text.charCodeAt(0); - if (first == 0x200b && !prevInput) { prevInput = "\u200b"; } - if (first == 0x21da) { this.reset(); return this.cm.execCommand("undo") } - } - // Find the part of the input that is actually new - var same = 0, l = Math.min(prevInput.length, text.length); - while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) { ++same; } - - runInOp(cm, function () { - applyTextInput(cm, text.slice(same), prevInput.length - same, - null, this$1.composing ? "*compose" : null); - - // Don't leave long text in the textarea, since it makes further polling slow - if (text.length > 1000 || text.indexOf("\n") > -1) { input.value = this$1.prevInput = ""; } - else { this$1.prevInput = text; } - - if (this$1.composing) { - this$1.composing.range.clear(); - this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor("to"), - {className: "CodeMirror-composing"}); - } - }); - return true - }; - - TextareaInput.prototype.ensurePolled = function () { - if (this.pollingFast && this.poll()) { this.pollingFast = false; } - }; - - TextareaInput.prototype.onKeyPress = function () { - if (ie && ie_version >= 9) { this.hasSelection = null; } - this.fastPoll(); - }; - - TextareaInput.prototype.onContextMenu = function (e) { - var input = this, cm = input.cm, display = cm.display, te = input.textarea; - if (input.contextMenuPending) { input.contextMenuPending(); } - var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop; - if (!pos || presto) { return } // Opera is difficult. - - // Reset the current text selection only if the click is done outside of the selection - // and 'resetSelectionOnContextMenu' option is true. - var reset = cm.options.resetSelectionOnContextMenu; - if (reset && cm.doc.sel.contains(pos) == -1) - { operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); } - - var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText; - var wrapperBox = input.wrapper.offsetParent.getBoundingClientRect(); - input.wrapper.style.cssText = "position: static"; - te.style.cssText = "position: absolute; width: 30px; height: 30px;\n top: " + (e.clientY - wrapperBox.top - 5) + "px; left: " + (e.clientX - wrapperBox.left - 5) + "px;\n z-index: 1000; background: " + (ie ? "rgba(255, 255, 255, .05)" : "transparent") + ";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);"; - var oldScrollY; - if (webkit) { oldScrollY = window.scrollY; } // Work around Chrome issue (#2712) - display.input.focus(); - if (webkit) { window.scrollTo(null, oldScrollY); } - display.input.reset(); - // Adds "Select all" to context menu in FF - if (!cm.somethingSelected()) { te.value = input.prevInput = " "; } - input.contextMenuPending = rehide; - display.selForContextMenu = cm.doc.sel; - clearTimeout(display.detectingSelectAll); - - // Select-all will be greyed out if there's nothing to select, so - // this adds a zero-width space so that we can later check whether - // it got selected. - function prepareSelectAllHack() { - if (te.selectionStart != null) { - var selected = cm.somethingSelected(); - var extval = "\u200b" + (selected ? te.value : ""); - te.value = "\u21da"; // Used to catch context-menu undo - te.value = extval; - input.prevInput = selected ? "" : "\u200b"; - te.selectionStart = 1; te.selectionEnd = extval.length; - // Re-set this, in case some other handler touched the - // selection in the meantime. - display.selForContextMenu = cm.doc.sel; - } - } - function rehide() { - if (input.contextMenuPending != rehide) { return } - input.contextMenuPending = false; - input.wrapper.style.cssText = oldWrapperCSS; - te.style.cssText = oldCSS; - if (ie && ie_version < 9) { display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); } - - // Try to detect the user choosing select-all - if (te.selectionStart != null) { - if (!ie || (ie && ie_version < 9)) { prepareSelectAllHack(); } - var i = 0, poll = function () { - if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 && - te.selectionEnd > 0 && input.prevInput == "\u200b") { - operation(cm, selectAll)(cm); - } else if (i++ < 10) { - display.detectingSelectAll = setTimeout(poll, 500); - } else { - display.selForContextMenu = null; - display.input.reset(); - } - }; - display.detectingSelectAll = setTimeout(poll, 200); - } - } - - if (ie && ie_version >= 9) { prepareSelectAllHack(); } - if (captureRightClick) { - e_stop(e); - var mouseup = function () { - off(window, "mouseup", mouseup); - setTimeout(rehide, 20); - }; - on(window, "mouseup", mouseup); - } else { - setTimeout(rehide, 50); - } - }; - - TextareaInput.prototype.readOnlyChanged = function (val) { - if (!val) { this.reset(); } - this.textarea.disabled = val == "nocursor"; - }; - - TextareaInput.prototype.setUneditable = function () {}; - - TextareaInput.prototype.needsContentAttribute = false; - - function fromTextArea(textarea, options) { - options = options ? copyObj(options) : {}; - options.value = textarea.value; - if (!options.tabindex && textarea.tabIndex) - { options.tabindex = textarea.tabIndex; } - if (!options.placeholder && textarea.placeholder) - { options.placeholder = textarea.placeholder; } - // Set autofocus to true if this textarea is focused, or if it has - // autofocus and no other element is focused. - if (options.autofocus == null) { - var hasFocus = activeElt(); - options.autofocus = hasFocus == textarea || - textarea.getAttribute("autofocus") != null && hasFocus == document.body; - } - - function save() {textarea.value = cm.getValue();} - - var realSubmit; - if (textarea.form) { - on(textarea.form, "submit", save); - // Deplorable hack to make the submit method do the right thing. - if (!options.leaveSubmitMethodAlone) { - var form = textarea.form; - realSubmit = form.submit; - try { - var wrappedSubmit = form.submit = function () { - save(); - form.submit = realSubmit; - form.submit(); - form.submit = wrappedSubmit; - }; - } catch(e) {} - } - } - - options.finishInit = function (cm) { - cm.save = save; - cm.getTextArea = function () { return textarea; }; - cm.toTextArea = function () { - cm.toTextArea = isNaN; // Prevent this from being ran twice - save(); - textarea.parentNode.removeChild(cm.getWrapperElement()); - textarea.style.display = ""; - if (textarea.form) { - off(textarea.form, "submit", save); - if (typeof textarea.form.submit == "function") - { textarea.form.submit = realSubmit; } - } - }; - }; - - textarea.style.display = "none"; - var cm = CodeMirror(function (node) { return textarea.parentNode.insertBefore(node, textarea.nextSibling); }, - options); - return cm - } - - function addLegacyProps(CodeMirror) { - CodeMirror.off = off; - CodeMirror.on = on; - CodeMirror.wheelEventPixels = wheelEventPixels; - CodeMirror.Doc = Doc; - CodeMirror.splitLines = splitLinesAuto; - CodeMirror.countColumn = countColumn; - CodeMirror.findColumn = findColumn; - CodeMirror.isWordChar = isWordCharBasic; - CodeMirror.Pass = Pass; - CodeMirror.signal = signal; - CodeMirror.Line = Line; - CodeMirror.changeEnd = changeEnd; - CodeMirror.scrollbarModel = scrollbarModel; - CodeMirror.Pos = Pos; - CodeMirror.cmpPos = cmp; - CodeMirror.modes = modes; - CodeMirror.mimeModes = mimeModes; - CodeMirror.resolveMode = resolveMode; - CodeMirror.getMode = getMode; - CodeMirror.modeExtensions = modeExtensions; - CodeMirror.extendMode = extendMode; - CodeMirror.copyState = copyState; - CodeMirror.startState = startState; - CodeMirror.innerMode = innerMode; - CodeMirror.commands = commands; - CodeMirror.keyMap = keyMap; - CodeMirror.keyName = keyName; - CodeMirror.isModifierKey = isModifierKey; - CodeMirror.lookupKey = lookupKey; - CodeMirror.normalizeKeyMap = normalizeKeyMap; - CodeMirror.StringStream = StringStream; - CodeMirror.SharedTextMarker = SharedTextMarker; - CodeMirror.TextMarker = TextMarker; - CodeMirror.LineWidget = LineWidget; - CodeMirror.e_preventDefault = e_preventDefault; - CodeMirror.e_stopPropagation = e_stopPropagation; - CodeMirror.e_stop = e_stop; - CodeMirror.addClass = addClass; - CodeMirror.contains = contains; - CodeMirror.rmClass = rmClass; - CodeMirror.keyNames = keyNames; - } - - // EDITOR CONSTRUCTOR - - defineOptions(CodeMirror); - - addEditorMethods(CodeMirror); - - // Set up methods on CodeMirror's prototype to redirect to the editor's document. - var dontDelegate = "iter insert remove copy getEditor constructor".split(" "); - for (var prop in Doc.prototype) { if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0) - { CodeMirror.prototype[prop] = (function(method) { - return function() {return method.apply(this.doc, arguments)} - })(Doc.prototype[prop]); } } - - eventMixin(Doc); - CodeMirror.inputStyles = {"textarea": TextareaInput, "contenteditable": ContentEditableInput}; - - // Extra arguments are stored as the mode's dependencies, which is - // used by (legacy) mechanisms like loadmode.js to automatically - // load a mode. (Preferred mechanism is the require/define calls.) - CodeMirror.defineMode = function(name/*, mode, …*/) { - if (!CodeMirror.defaults.mode && name != "null") { CodeMirror.defaults.mode = name; } - defineMode.apply(this, arguments); - }; - - CodeMirror.defineMIME = defineMIME; - - // Minimal default mode. - CodeMirror.defineMode("null", function () { return ({token: function (stream) { return stream.skipToEnd(); }}); }); - CodeMirror.defineMIME("text/plain", "null"); - - // EXTENSIONS - - CodeMirror.defineExtension = function (name, func) { - CodeMirror.prototype[name] = func; - }; - CodeMirror.defineDocExtension = function (name, func) { - Doc.prototype[name] = func; - }; - - CodeMirror.fromTextArea = fromTextArea; - - addLegacyProps(CodeMirror); - - CodeMirror.version = "5.44.0"; - - return CodeMirror; - -}))); - -// CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: https://codemirror.net/LICENSE - -(function(mod) { - if (typeof exports == "object" && typeof module == "object") // CommonJS - mod(require("../../lib/codemirror"), require("../xml/xml"), require("../meta")); - else if (typeof define == "function" && define.amd) // AMD - define(["../../lib/codemirror", "../xml/xml", "../meta"], mod); - else // Plain browser env - mod(CodeMirror); -})(function(CodeMirror) { -"use strict"; - -CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { - - var htmlMode = CodeMirror.getMode(cmCfg, "text/html"); - var htmlModeMissing = htmlMode.name == "null" - - function getMode(name) { - if (CodeMirror.findModeByName) { - var found = CodeMirror.findModeByName(name); - if (found) name = found.mime || found.mimes[0]; - } - var mode = CodeMirror.getMode(cmCfg, name); - return mode.name == "null" ? null : mode; - } - - // Should characters that affect highlighting be highlighted separate? - // Does not include characters that will be output (such as `1.` and `-` for lists) - if (modeCfg.highlightFormatting === undefined) - modeCfg.highlightFormatting = false; - - // Maximum number of nested blockquotes. Set to 0 for infinite nesting. - // Excess `>` will emit `error` token. - if (modeCfg.maxBlockquoteDepth === undefined) - modeCfg.maxBlockquoteDepth = 0; - - // Turn on task lists? ("- [ ] " and "- [x] ") - if (modeCfg.taskLists === undefined) modeCfg.taskLists = false; - - // Turn on strikethrough syntax - if (modeCfg.strikethrough === undefined) - modeCfg.strikethrough = false; - - if (modeCfg.emoji === undefined) - modeCfg.emoji = false; - - if (modeCfg.fencedCodeBlockHighlighting === undefined) - modeCfg.fencedCodeBlockHighlighting = true; - - if (modeCfg.xml === undefined) - modeCfg.xml = true; - - // Allow token types to be overridden by user-provided token types. - if (modeCfg.tokenTypeOverrides === undefined) - modeCfg.tokenTypeOverrides = {}; - - var tokenTypes = { - header: "header", - code: "comment", - quote: "quote", - list1: "variable-2", - list2: "variable-3", - list3: "keyword", - hr: "hr", - image: "image", - imageAltText: "image-alt-text", - imageMarker: "image-marker", - formatting: "formatting", - linkInline: "link", - linkEmail: "link", - linkText: "link", - linkHref: "string", - em: "em", - strong: "strong", - strikethrough: "strikethrough", - emoji: "builtin" - }; - - for (var tokenType in tokenTypes) { - if (tokenTypes.hasOwnProperty(tokenType) && modeCfg.tokenTypeOverrides[tokenType]) { - tokenTypes[tokenType] = modeCfg.tokenTypeOverrides[tokenType]; - } - } - - var hrRE = /^([*\-_])(?:\s*\1){2,}\s*$/ - , listRE = /^(?:[*\-+]|^[0-9]+([.)]))\s+/ - , taskListRE = /^\[(x| )\](?=\s)/i // Must follow listRE - , atxHeaderRE = modeCfg.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/ - , setextHeaderRE = /^ *(?:\={1,}|-{1,})\s*$/ - , textRE = /^[^#!\[\]*_\\<>` "'(~:]+/ - , fencedCodeRE = /^(~~~+|```+)[ \t]*([\w+#-]*)[^\n`]*$/ - , linkDefRE = /^\s*\[[^\]]+?\]:.*$/ // naive link-definition - , punctuation = /[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/ - , expandedTab = " " // CommonMark specifies tab as 4 spaces - - function switchInline(stream, state, f) { - state.f = state.inline = f; - return f(stream, state); - } - - function switchBlock(stream, state, f) { - state.f = state.block = f; - return f(stream, state); - } - - function lineIsEmpty(line) { - return !line || !/\S/.test(line.string) - } - - // Blocks - - function blankLine(state) { - // Reset linkTitle state - state.linkTitle = false; - state.linkHref = false; - state.linkText = false; - // Reset EM state - state.em = false; - // Reset STRONG state - state.strong = false; - // Reset strikethrough state - state.strikethrough = false; - // Reset state.quote - state.quote = 0; - // Reset state.indentedCode - state.indentedCode = false; - if (state.f == htmlBlock) { - var exit = htmlModeMissing - if (!exit) { - var inner = CodeMirror.innerMode(htmlMode, state.htmlState) - exit = inner.mode.name == "xml" && inner.state.tagStart === null && - (!inner.state.context && inner.state.tokenize.isInText) - } - if (exit) { - state.f = inlineNormal; - state.block = blockNormal; - state.htmlState = null; - } - } - // Reset state.trailingSpace - state.trailingSpace = 0; - state.trailingSpaceNewLine = false; - // Mark this line as blank - state.prevLine = state.thisLine - state.thisLine = {stream: null} - return null; - } - - function blockNormal(stream, state) { - var firstTokenOnLine = stream.column() === state.indentation; - var prevLineLineIsEmpty = lineIsEmpty(state.prevLine.stream); - var prevLineIsIndentedCode = state.indentedCode; - var prevLineIsHr = state.prevLine.hr; - var prevLineIsList = state.list !== false; - var maxNonCodeIndentation = (state.listStack[state.listStack.length - 1] || 0) + 3; - - state.indentedCode = false; - - var lineIndentation = state.indentation; - // compute once per line (on first token) - if (state.indentationDiff === null) { - state.indentationDiff = state.indentation; - if (prevLineIsList) { - // Reset inline styles which shouldn't propagate aross list items - state.em = false; - state.strong = false; - state.code = false; - state.strikethrough = false; - - state.list = null; - // While this list item's marker's indentation is less than the deepest - // list item's content's indentation,pop the deepest list item - // indentation off the stack, and update block indentation state - while (lineIndentation < state.listStack[state.listStack.length - 1]) { - state.listStack.pop(); - if (state.listStack.length) { - state.indentation = state.listStack[state.listStack.length - 1]; - // less than the first list's indent -> the line is no longer a list - } else { - state.list = false; - } - } - if (state.list !== false) { - state.indentationDiff = lineIndentation - state.listStack[state.listStack.length - 1] - } - } - } - - // not comprehensive (currently only for setext detection purposes) - var allowsInlineContinuation = ( - !prevLineLineIsEmpty && !prevLineIsHr && !state.prevLine.header && - (!prevLineIsList || !prevLineIsIndentedCode) && - !state.prevLine.fencedCodeEnd - ); - - var isHr = (state.list === false || prevLineIsHr || prevLineLineIsEmpty) && - state.indentation <= maxNonCodeIndentation && stream.match(hrRE); - - var match = null; - if (state.indentationDiff >= 4 && (prevLineIsIndentedCode || state.prevLine.fencedCodeEnd || - state.prevLine.header || prevLineLineIsEmpty)) { - stream.skipToEnd(); - state.indentedCode = true; - return tokenTypes.code; - } else if (stream.eatSpace()) { - return null; - } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(atxHeaderRE)) && match[1].length <= 6) { - state.quote = 0; - state.header = match[1].length; - state.thisLine.header = true; - if (modeCfg.highlightFormatting) state.formatting = "header"; - state.f = state.inline; - return getType(state); - } else if (state.indentation <= maxNonCodeIndentation && stream.eat('>')) { - state.quote = firstTokenOnLine ? 1 : state.quote + 1; - if (modeCfg.highlightFormatting) state.formatting = "quote"; - stream.eatSpace(); - return getType(state); - } else if (!isHr && !state.setext && firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(listRE))) { - var listType = match[1] ? "ol" : "ul"; - - state.indentation = lineIndentation + stream.current().length; - state.list = true; - state.quote = 0; - - // Add this list item's content's indentation to the stack - state.listStack.push(state.indentation); - - if (modeCfg.taskLists && stream.match(taskListRE, false)) { - state.taskList = true; - } - state.f = state.inline; - if (modeCfg.highlightFormatting) state.formatting = ["list", "list-" + listType]; - return getType(state); - } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(fencedCodeRE, true))) { - state.quote = 0; - state.fencedEndRE = new RegExp(match[1] + "+ *$"); - // try switching mode - state.localMode = modeCfg.fencedCodeBlockHighlighting && getMode(match[2]); - if (state.localMode) state.localState = CodeMirror.startState(state.localMode); - state.f = state.block = local; - if (modeCfg.highlightFormatting) state.formatting = "code-block"; - state.code = -1 - return getType(state); - // SETEXT has lowest block-scope precedence after HR, so check it after - // the others (code, blockquote, list...) - } else if ( - // if setext set, indicates line after ---/=== - state.setext || ( - // line before ---/=== - (!allowsInlineContinuation || !prevLineIsList) && !state.quote && state.list === false && - !state.code && !isHr && !linkDefRE.test(stream.string) && - (match = stream.lookAhead(1)) && (match = match.match(setextHeaderRE)) - ) - ) { - if ( !state.setext ) { - state.header = match[0].charAt(0) == '=' ? 1 : 2; - state.setext = state.header; - } else { - state.header = state.setext; - // has no effect on type so we can reset it now - state.setext = 0; - stream.skipToEnd(); - if (modeCfg.highlightFormatting) state.formatting = "header"; - } - state.thisLine.header = true; - state.f = state.inline; - return getType(state); - } else if (isHr) { - stream.skipToEnd(); - state.hr = true; - state.thisLine.hr = true; - return tokenTypes.hr; - } else if (stream.peek() === '[') { - return switchInline(stream, state, footnoteLink); - } - - return switchInline(stream, state, state.inline); - } - - function htmlBlock(stream, state) { - var style = htmlMode.token(stream, state.htmlState); - if (!htmlModeMissing) { - var inner = CodeMirror.innerMode(htmlMode, state.htmlState) - if ((inner.mode.name == "xml" && inner.state.tagStart === null && - (!inner.state.context && inner.state.tokenize.isInText)) || - (state.md_inside && stream.current().indexOf(">") > -1)) { - state.f = inlineNormal; - state.block = blockNormal; - state.htmlState = null; - } - } - return style; - } - - function local(stream, state) { - var currListInd = state.listStack[state.listStack.length - 1] || 0; - var hasExitedList = state.indentation < currListInd; - var maxFencedEndInd = currListInd + 3; - if (state.fencedEndRE && state.indentation <= maxFencedEndInd && (hasExitedList || stream.match(state.fencedEndRE))) { - if (modeCfg.highlightFormatting) state.formatting = "code-block"; - var returnType; - if (!hasExitedList) returnType = getType(state) - state.localMode = state.localState = null; - state.block = blockNormal; - state.f = inlineNormal; - state.fencedEndRE = null; - state.code = 0 - state.thisLine.fencedCodeEnd = true; - if (hasExitedList) return switchBlock(stream, state, state.block); - return returnType; - } else if (state.localMode) { - return state.localMode.token(stream, state.localState); - } else { - stream.skipToEnd(); - return tokenTypes.code; - } - } - - // Inline - function getType(state) { - var styles = []; - - if (state.formatting) { - styles.push(tokenTypes.formatting); - - if (typeof state.formatting === "string") state.formatting = [state.formatting]; - - for (var i = 0; i < state.formatting.length; i++) { - styles.push(tokenTypes.formatting + "-" + state.formatting[i]); - - if (state.formatting[i] === "header") { - styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.header); - } - - // Add `formatting-quote` and `formatting-quote-#` for blockquotes - // Add `error` instead if the maximum blockquote nesting depth is passed - if (state.formatting[i] === "quote") { - if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) { - styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.quote); - } else { - styles.push("error"); - } - } - } - } - - if (state.taskOpen) { - styles.push("meta"); - return styles.length ? styles.join(' ') : null; - } - if (state.taskClosed) { - styles.push("property"); - return styles.length ? styles.join(' ') : null; - } - - if (state.linkHref) { - styles.push(tokenTypes.linkHref, "url"); - } else { // Only apply inline styles to non-url text - if (state.strong) { styles.push(tokenTypes.strong); } - if (state.em) { styles.push(tokenTypes.em); } - if (state.strikethrough) { styles.push(tokenTypes.strikethrough); } - if (state.emoji) { styles.push(tokenTypes.emoji); } - if (state.linkText) { styles.push(tokenTypes.linkText); } - if (state.code) { styles.push(tokenTypes.code); } - if (state.image) { styles.push(tokenTypes.image); } - if (state.imageAltText) { styles.push(tokenTypes.imageAltText, "link"); } - if (state.imageMarker) { styles.push(tokenTypes.imageMarker); } - } - - if (state.header) { styles.push(tokenTypes.header, tokenTypes.header + "-" + state.header); } - - if (state.quote) { - styles.push(tokenTypes.quote); - - // Add `quote-#` where the maximum for `#` is modeCfg.maxBlockquoteDepth - if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) { - styles.push(tokenTypes.quote + "-" + state.quote); - } else { - styles.push(tokenTypes.quote + "-" + modeCfg.maxBlockquoteDepth); - } - } - - if (state.list !== false) { - var listMod = (state.listStack.length - 1) % 3; - if (!listMod) { - styles.push(tokenTypes.list1); - } else if (listMod === 1) { - styles.push(tokenTypes.list2); - } else { - styles.push(tokenTypes.list3); - } - } - - if (state.trailingSpaceNewLine) { - styles.push("trailing-space-new-line"); - } else if (state.trailingSpace) { - styles.push("trailing-space-" + (state.trailingSpace % 2 ? "a" : "b")); - } - - return styles.length ? styles.join(' ') : null; - } - - function handleText(stream, state) { - if (stream.match(textRE, true)) { - return getType(state); - } - return undefined; - } - - function inlineNormal(stream, state) { - var style = state.text(stream, state); - if (typeof style !== 'undefined') - return style; - - if (state.list) { // List marker (*, +, -, 1., etc) - state.list = null; - return getType(state); - } - - if (state.taskList) { - var taskOpen = stream.match(taskListRE, true)[1] === " "; - if (taskOpen) state.taskOpen = true; - else state.taskClosed = true; - if (modeCfg.highlightFormatting) state.formatting = "task"; - state.taskList = false; - return getType(state); - } - - state.taskOpen = false; - state.taskClosed = false; - - if (state.header && stream.match(/^#+$/, true)) { - if (modeCfg.highlightFormatting) state.formatting = "header"; - return getType(state); - } - - var ch = stream.next(); - - // Matches link titles present on next line - if (state.linkTitle) { - state.linkTitle = false; - var matchCh = ch; - if (ch === '(') { - matchCh = ')'; - } - matchCh = (matchCh+'').replace(/([.?*+^\[\]\\(){}|-])/g, "\\$1"); - var regex = '^\\s*(?:[^' + matchCh + '\\\\]+|\\\\\\\\|\\\\.)' + matchCh; - if (stream.match(new RegExp(regex), true)) { - return tokenTypes.linkHref; - } - } - - // If this block is changed, it may need to be updated in GFM mode - if (ch === '`') { - var previousFormatting = state.formatting; - if (modeCfg.highlightFormatting) state.formatting = "code"; - stream.eatWhile('`'); - var count = stream.current().length - if (state.code == 0 && (!state.quote || count == 1)) { - state.code = count - return getType(state) - } else if (count == state.code) { // Must be exact - var t = getType(state) - state.code = 0 - return t - } else { - state.formatting = previousFormatting - return getType(state) - } - } else if (state.code) { - return getType(state); - } - - if (ch === '\\') { - stream.next(); - if (modeCfg.highlightFormatting) { - var type = getType(state); - var formattingEscape = tokenTypes.formatting + "-escape"; - return type ? type + " " + formattingEscape : formattingEscape; - } - } - - if (ch === '!' && stream.match(/\[[^\]]*\] ?(?:\(|\[)/, false)) { - state.imageMarker = true; - state.image = true; - if (modeCfg.highlightFormatting) state.formatting = "image"; - return getType(state); - } - - if (ch === '[' && state.imageMarker && stream.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/, false)) { - state.imageMarker = false; - state.imageAltText = true - if (modeCfg.highlightFormatting) state.formatting = "image"; - return getType(state); - } - - if (ch === ']' && state.imageAltText) { - if (modeCfg.highlightFormatting) state.formatting = "image"; - var type = getType(state); - state.imageAltText = false; - state.image = false; - state.inline = state.f = linkHref; - return type; - } - - if (ch === '[' && !state.image) { - if (state.linkText && stream.match(/^.*?\]/)) return getType(state) - state.linkText = true; - if (modeCfg.highlightFormatting) state.formatting = "link"; - return getType(state); - } - - if (ch === ']' && state.linkText) { - if (modeCfg.highlightFormatting) state.formatting = "link"; - var type = getType(state); - state.linkText = false; - state.inline = state.f = stream.match(/\(.*?\)| ?\[.*?\]/, false) ? linkHref : inlineNormal - return type; - } - - if (ch === '<' && stream.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/, false)) { - state.f = state.inline = linkInline; - if (modeCfg.highlightFormatting) state.formatting = "link"; - var type = getType(state); - if (type){ - type += " "; - } else { - type = ""; - } - return type + tokenTypes.linkInline; - } - - if (ch === '<' && stream.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/, false)) { - state.f = state.inline = linkInline; - if (modeCfg.highlightFormatting) state.formatting = "link"; - var type = getType(state); - if (type){ - type += " "; - } else { - type = ""; - } - return type + tokenTypes.linkEmail; - } - - if (modeCfg.xml && ch === '<' && stream.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i, false)) { - var end = stream.string.indexOf(">", stream.pos); - if (end != -1) { - var atts = stream.string.substring(stream.start, end); - if (/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(atts)) state.md_inside = true; - } - stream.backUp(1); - state.htmlState = CodeMirror.startState(htmlMode); - return switchBlock(stream, state, htmlBlock); - } - - if (modeCfg.xml && ch === '<' && stream.match(/^\/\w*?>/)) { - state.md_inside = false; - return "tag"; - } else if (ch === "*" || ch === "_") { - var len = 1, before = stream.pos == 1 ? " " : stream.string.charAt(stream.pos - 2) - while (len < 3 && stream.eat(ch)) len++ - var after = stream.peek() || " " - // See http://spec.commonmark.org/0.27/#emphasis-and-strong-emphasis - var leftFlanking = !/\s/.test(after) && (!punctuation.test(after) || /\s/.test(before) || punctuation.test(before)) - var rightFlanking = !/\s/.test(before) && (!punctuation.test(before) || /\s/.test(after) || punctuation.test(after)) - var setEm = null, setStrong = null - if (len % 2) { // Em - if (!state.em && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before))) - setEm = true - else if (state.em == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after))) - setEm = false - } - if (len > 1) { // Strong - if (!state.strong && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before))) - setStrong = true - else if (state.strong == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after))) - setStrong = false - } - if (setStrong != null || setEm != null) { - if (modeCfg.highlightFormatting) state.formatting = setEm == null ? "strong" : setStrong == null ? "em" : "strong em" - if (setEm === true) state.em = ch - if (setStrong === true) state.strong = ch - var t = getType(state) - if (setEm === false) state.em = false - if (setStrong === false) state.strong = false - return t - } - } else if (ch === ' ') { - if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces - if (stream.peek() === ' ') { // Surrounded by spaces, ignore - return getType(state); - } else { // Not surrounded by spaces, back up pointer - stream.backUp(1); - } - } - } - - if (modeCfg.strikethrough) { - if (ch === '~' && stream.eatWhile(ch)) { - if (state.strikethrough) {// Remove strikethrough - if (modeCfg.highlightFormatting) state.formatting = "strikethrough"; - var t = getType(state); - state.strikethrough = false; - return t; - } else if (stream.match(/^[^\s]/, false)) {// Add strikethrough - state.strikethrough = true; - if (modeCfg.highlightFormatting) state.formatting = "strikethrough"; - return getType(state); - } - } else if (ch === ' ') { - if (stream.match(/^~~/, true)) { // Probably surrounded by space - if (stream.peek() === ' ') { // Surrounded by spaces, ignore - return getType(state); - } else { // Not surrounded by spaces, back up pointer - stream.backUp(2); - } - } - } - } - - if (modeCfg.emoji && ch === ":" && stream.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)) { - state.emoji = true; - if (modeCfg.highlightFormatting) state.formatting = "emoji"; - var retType = getType(state); - state.emoji = false; - return retType; - } - - if (ch === ' ') { - if (stream.match(/^ +$/, false)) { - state.trailingSpace++; - } else if (state.trailingSpace) { - state.trailingSpaceNewLine = true; - } - } - - return getType(state); - } - - function linkInline(stream, state) { - var ch = stream.next(); - - if (ch === ">") { - state.f = state.inline = inlineNormal; - if (modeCfg.highlightFormatting) state.formatting = "link"; - var type = getType(state); - if (type){ - type += " "; - } else { - type = ""; - } - return type + tokenTypes.linkInline; - } - - stream.match(/^[^>]+/, true); - - return tokenTypes.linkInline; - } - - function linkHref(stream, state) { - // Check if space, and return NULL if so (to avoid marking the space) - if(stream.eatSpace()){ - return null; - } - var ch = stream.next(); - if (ch === '(' || ch === '[') { - state.f = state.inline = getLinkHrefInside(ch === "(" ? ")" : "]"); - if (modeCfg.highlightFormatting) state.formatting = "link-string"; - state.linkHref = true; - return getType(state); - } - return 'error'; - } - - var linkRE = { - ")": /^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/, - "]": /^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/ - } - - function getLinkHrefInside(endChar) { - return function(stream, state) { - var ch = stream.next(); - - if (ch === endChar) { - state.f = state.inline = inlineNormal; - if (modeCfg.highlightFormatting) state.formatting = "link-string"; - var returnState = getType(state); - state.linkHref = false; - return returnState; - } - - stream.match(linkRE[endChar]) - state.linkHref = true; - return getType(state); - }; - } - - function footnoteLink(stream, state) { - if (stream.match(/^([^\]\\]|\\.)*\]:/, false)) { - state.f = footnoteLinkInside; - stream.next(); // Consume [ - if (modeCfg.highlightFormatting) state.formatting = "link"; - state.linkText = true; - return getType(state); - } - return switchInline(stream, state, inlineNormal); - } - - function footnoteLinkInside(stream, state) { - if (stream.match(/^\]:/, true)) { - state.f = state.inline = footnoteUrl; - if (modeCfg.highlightFormatting) state.formatting = "link"; - var returnType = getType(state); - state.linkText = false; - return returnType; - } - - stream.match(/^([^\]\\]|\\.)+/, true); - - return tokenTypes.linkText; - } - - function footnoteUrl(stream, state) { - // Check if space, and return NULL if so (to avoid marking the space) - if(stream.eatSpace()){ - return null; - } - // Match URL - stream.match(/^[^\s]+/, true); - // Check for link title - if (stream.peek() === undefined) { // End of line, set flag to check next line - state.linkTitle = true; - } else { // More content on line, check if link title - stream.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/, true); - } - state.f = state.inline = inlineNormal; - return tokenTypes.linkHref + " url"; - } - - var mode = { - startState: function() { - return { - f: blockNormal, - - prevLine: {stream: null}, - thisLine: {stream: null}, - - block: blockNormal, - htmlState: null, - indentation: 0, - - inline: inlineNormal, - text: handleText, - - formatting: false, - linkText: false, - linkHref: false, - linkTitle: false, - code: 0, - em: false, - strong: false, - header: 0, - setext: 0, - hr: false, - taskList: false, - list: false, - listStack: [], - quote: 0, - trailingSpace: 0, - trailingSpaceNewLine: false, - strikethrough: false, - emoji: false, - fencedEndRE: null - }; - }, - - copyState: function(s) { - return { - f: s.f, - - prevLine: s.prevLine, - thisLine: s.thisLine, - - block: s.block, - htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState), - indentation: s.indentation, - - localMode: s.localMode, - localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null, - - inline: s.inline, - text: s.text, - formatting: false, - linkText: s.linkText, - linkTitle: s.linkTitle, - linkHref: s.linkHref, - code: s.code, - em: s.em, - strong: s.strong, - strikethrough: s.strikethrough, - emoji: s.emoji, - header: s.header, - setext: s.setext, - hr: s.hr, - taskList: s.taskList, - list: s.list, - listStack: s.listStack.slice(0), - quote: s.quote, - indentedCode: s.indentedCode, - trailingSpace: s.trailingSpace, - trailingSpaceNewLine: s.trailingSpaceNewLine, - md_inside: s.md_inside, - fencedEndRE: s.fencedEndRE - }; - }, - - token: function(stream, state) { - - // Reset state.formatting - state.formatting = false; - - if (stream != state.thisLine.stream) { - state.header = 0; - state.hr = false; - - if (stream.match(/^\s*$/, true)) { - blankLine(state); - return null; - } - - state.prevLine = state.thisLine - state.thisLine = {stream: stream} - - // Reset state.taskList - state.taskList = false; - - // Reset state.trailingSpace - state.trailingSpace = 0; - state.trailingSpaceNewLine = false; - - if (!state.localState) { - state.f = state.block; - if (state.f != htmlBlock) { - var indentation = stream.match(/^\s*/, true)[0].replace(/\t/g, expandedTab).length; - state.indentation = indentation; - state.indentationDiff = null; - if (indentation > 0) return null; - } - } - } - return state.f(stream, state); - }, - - innerMode: function(state) { - if (state.block == htmlBlock) return {state: state.htmlState, mode: htmlMode}; - if (state.localState) return {state: state.localState, mode: state.localMode}; - return {state: state, mode: mode}; - }, - - indent: function(state, textAfter, line) { - if (state.block == htmlBlock && htmlMode.indent) return htmlMode.indent(state.htmlState, textAfter, line) - if (state.localState && state.localMode.indent) return state.localMode.indent(state.localState, textAfter, line) - return CodeMirror.Pass - }, - - blankLine: blankLine, - - getType: getType, - - blockCommentStart: "", - closeBrackets: "()[]{}''\"\"``", - fold: "markdown" - }; - return mode; -}, "xml"); - -CodeMirror.defineMIME("text/markdown", "markdown"); - -CodeMirror.defineMIME("text/x-markdown", "markdown"); - -}); - -// CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: https://codemirror.net/LICENSE - -// Utility function that allows modes to be combined. The mode given -// as the base argument takes care of most of the normal mode -// functionality, but a second (typically simple) mode is used, which -// can override the style of text. Both modes get to parse all of the -// text, but when both assign a non-null style to a piece of code, the -// overlay wins, unless the combine argument was true and not overridden, -// or state.overlay.combineTokens was true, in which case the styles are -// combined. - -(function(mod) { - if (typeof exports == "object" && typeof module == "object") // CommonJS - mod(require("../../lib/codemirror")); - else if (typeof define == "function" && define.amd) // AMD - define(["../../lib/codemirror"], mod); - else // Plain browser env - mod(CodeMirror); -})(function(CodeMirror) { -"use strict"; - -CodeMirror.overlayMode = function(base, overlay, combine) { - return { - startState: function() { - return { - base: CodeMirror.startState(base), - overlay: CodeMirror.startState(overlay), - basePos: 0, baseCur: null, - overlayPos: 0, overlayCur: null, - streamSeen: null - }; - }, - copyState: function(state) { - return { - base: CodeMirror.copyState(base, state.base), - overlay: CodeMirror.copyState(overlay, state.overlay), - basePos: state.basePos, baseCur: null, - overlayPos: state.overlayPos, overlayCur: null - }; - }, - - token: function(stream, state) { - if (stream != state.streamSeen || - Math.min(state.basePos, state.overlayPos) < stream.start) { - state.streamSeen = stream; - state.basePos = state.overlayPos = stream.start; - } - - if (stream.start == state.basePos) { - state.baseCur = base.token(stream, state.base); - state.basePos = stream.pos; - } - if (stream.start == state.overlayPos) { - stream.pos = stream.start; - state.overlayCur = overlay.token(stream, state.overlay); - state.overlayPos = stream.pos; - } - stream.pos = Math.min(state.basePos, state.overlayPos); - - // state.overlay.combineTokens always takes precedence over combine, - // unless set to null - if (state.overlayCur == null) return state.baseCur; - else if (state.baseCur != null && - state.overlay.combineTokens || - combine && state.overlay.combineTokens == null) - return state.baseCur + " " + state.overlayCur; - else return state.overlayCur; - }, - - indent: base.indent && function(state, textAfter, line) { - return base.indent(state.base, textAfter, line); - }, - electricChars: base.electricChars, - - innerMode: function(state) { return {state: state.base, mode: base}; }, - - blankLine: function(state) { - var baseToken, overlayToken; - if (base.blankLine) baseToken = base.blankLine(state.base); - if (overlay.blankLine) overlayToken = overlay.blankLine(state.overlay); - - return overlayToken == null ? - baseToken : - (combine && baseToken != null ? baseToken + " " + overlayToken : overlayToken); - } - }; -}; - -}); - -// CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: https://codemirror.net/LICENSE - -(function(mod) { - if (typeof exports == "object" && typeof module == "object") // CommonJS - mod(require("../../lib/codemirror")); - else if (typeof define == "function" && define.amd) // AMD - define(["../../lib/codemirror"], mod); - else // Plain browser env - mod(CodeMirror); -})(function(CodeMirror) { -"use strict"; - -CodeMirror.defineMode("javascript", function(config, parserConfig) { - var indentUnit = config.indentUnit; - var statementIndent = parserConfig.statementIndent; - var jsonldMode = parserConfig.jsonld; - var jsonMode = parserConfig.json || jsonldMode; - var isTS = parserConfig.typescript; - var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/; - - // Tokenizer - - var keywords = function(){ - function kw(type) {return {type: type, style: "keyword"};} - var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d"); - var operator = kw("operator"), atom = {type: "atom", style: "atom"}; - - return { - "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B, - "return": D, "break": D, "continue": D, "new": kw("new"), "delete": C, "void": C, "throw": C, - "debugger": kw("debugger"), "var": kw("var"), "const": kw("var"), "let": kw("var"), - "function": kw("function"), "catch": kw("catch"), - "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"), - "in": operator, "typeof": operator, "instanceof": operator, - "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom, - "this": kw("this"), "class": kw("class"), "super": kw("atom"), - "yield": C, "export": kw("export"), "import": kw("import"), "extends": C, - "await": C - }; - }(); - - var isOperatorChar = /[+\-*&%=<>!?|~^@]/; - var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/; - - function readRegexp(stream) { - var escaped = false, next, inSet = false; - while ((next = stream.next()) != null) { - if (!escaped) { - if (next == "/" && !inSet) return; - if (next == "[") inSet = true; - else if (inSet && next == "]") inSet = false; - } - escaped = !escaped && next == "\\"; - } - } - - // Used as scratch variables to communicate multiple values without - // consing up tons of objects. - var type, content; - function ret(tp, style, cont) { - type = tp; content = cont; - return style; - } - function tokenBase(stream, state) { - var ch = stream.next(); - if (ch == '"' || ch == "'") { - state.tokenize = tokenString(ch); - return state.tokenize(stream, state); - } else if (ch == "." && stream.match(/^\d+(?:[eE][+\-]?\d+)?/)) { - return ret("number", "number"); - } else if (ch == "." && stream.match("..")) { - return ret("spread", "meta"); - } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) { - return ret(ch); - } else if (ch == "=" && stream.eat(">")) { - return ret("=>", "operator"); - } else if (ch == "0" && stream.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i)) { - return ret("number", "number"); - } else if (/\d/.test(ch)) { - stream.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/); - return ret("number", "number"); - } else if (ch == "/") { - if (stream.eat("*")) { - state.tokenize = tokenComment; - return tokenComment(stream, state); - } else if (stream.eat("/")) { - stream.skipToEnd(); - return ret("comment", "comment"); - } else if (expressionAllowed(stream, state, 1)) { - readRegexp(stream); - stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/); - return ret("regexp", "string-2"); - } else { - stream.eat("="); - return ret("operator", "operator", stream.current()); - } - } else if (ch == "`") { - state.tokenize = tokenQuasi; - return tokenQuasi(stream, state); - } else if (ch == "#") { - stream.skipToEnd(); - return ret("error", "error"); - } else if (isOperatorChar.test(ch)) { - if (ch != ">" || !state.lexical || state.lexical.type != ">") { - if (stream.eat("=")) { - if (ch == "!" || ch == "=") stream.eat("=") - } else if (/[<>*+\-]/.test(ch)) { - stream.eat(ch) - if (ch == ">") stream.eat(ch) - } - } - return ret("operator", "operator", stream.current()); - } else if (wordRE.test(ch)) { - stream.eatWhile(wordRE); - var word = stream.current() - if (state.lastType != ".") { - if (keywords.propertyIsEnumerable(word)) { - var kw = keywords[word] - return ret(kw.type, kw.style, word) - } - if (word == "async" && stream.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/, false)) - return ret("async", "keyword", word) - } - return ret("variable", "variable", word) - } - } - - function tokenString(quote) { - return function(stream, state) { - var escaped = false, next; - if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){ - state.tokenize = tokenBase; - return ret("jsonld-keyword", "meta"); - } - while ((next = stream.next()) != null) { - if (next == quote && !escaped) break; - escaped = !escaped && next == "\\"; - } - if (!escaped) state.tokenize = tokenBase; - return ret("string", "string"); - }; - } - - function tokenComment(stream, state) { - var maybeEnd = false, ch; - while (ch = stream.next()) { - if (ch == "/" && maybeEnd) { - state.tokenize = tokenBase; - break; - } - maybeEnd = (ch == "*"); - } - return ret("comment", "comment"); - } - - function tokenQuasi(stream, state) { - var escaped = false, next; - while ((next = stream.next()) != null) { - if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) { - state.tokenize = tokenBase; - break; - } - escaped = !escaped && next == "\\"; - } - return ret("quasi", "string-2", stream.current()); - } - - var brackets = "([{}])"; - // This is a crude lookahead trick to try and notice that we're - // parsing the argument patterns for a fat-arrow function before we - // actually hit the arrow token. It only works if the arrow is on - // the same line as the arguments and there's no strange noise - // (comments) in between. Fallback is to only notice when we hit the - // arrow, and not declare the arguments as locals for the arrow - // body. - function findFatArrow(stream, state) { - if (state.fatArrowAt) state.fatArrowAt = null; - var arrow = stream.string.indexOf("=>", stream.start); - if (arrow < 0) return; - - if (isTS) { // Try to skip TypeScript return type declarations after the arguments - var m = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(stream.string.slice(stream.start, arrow)) - if (m) arrow = m.index - } - - var depth = 0, sawSomething = false; - for (var pos = arrow - 1; pos >= 0; --pos) { - var ch = stream.string.charAt(pos); - var bracket = brackets.indexOf(ch); - if (bracket >= 0 && bracket < 3) { - if (!depth) { ++pos; break; } - if (--depth == 0) { if (ch == "(") sawSomething = true; break; } - } else if (bracket >= 3 && bracket < 6) { - ++depth; - } else if (wordRE.test(ch)) { - sawSomething = true; - } else if (/["'\/]/.test(ch)) { - return; - } else if (sawSomething && !depth) { - ++pos; - break; - } - } - if (sawSomething && !depth) state.fatArrowAt = pos; - } - - // Parser - - var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true, "this": true, "jsonld-keyword": true}; - - function JSLexical(indented, column, type, align, prev, info) { - this.indented = indented; - this.column = column; - this.type = type; - this.prev = prev; - this.info = info; - if (align != null) this.align = align; - } - - function inScope(state, varname) { - for (var v = state.localVars; v; v = v.next) - if (v.name == varname) return true; - for (var cx = state.context; cx; cx = cx.prev) { - for (var v = cx.vars; v; v = v.next) - if (v.name == varname) return true; - } - } - - function parseJS(state, style, type, content, stream) { - var cc = state.cc; - // Communicate our context to the combinators. - // (Less wasteful than consing up a hundred closures on every call.) - cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style; - - if (!state.lexical.hasOwnProperty("align")) - state.lexical.align = true; - - while(true) { - var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement; - if (combinator(type, content)) { - while(cc.length && cc[cc.length - 1].lex) - cc.pop()(); - if (cx.marked) return cx.marked; - if (type == "variable" && inScope(state, content)) return "variable-2"; - return style; - } - } - } - - // Combinator utils - - var cx = {state: null, column: null, marked: null, cc: null}; - function pass() { - for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]); - } - function cont() { - pass.apply(null, arguments); - return true; - } - function inList(name, list) { - for (var v = list; v; v = v.next) if (v.name == name) return true - return false; - } - function register(varname) { - var state = cx.state; - cx.marked = "def"; - if (state.context) { - if (state.lexical.info == "var" && state.context && state.context.block) { - // FIXME function decls are also not block scoped - var newContext = registerVarScoped(varname, state.context) - if (newContext != null) { - state.context = newContext - return - } - } else if (!inList(varname, state.localVars)) { - state.localVars = new Var(varname, state.localVars) - return - } - } - // Fall through means this is global - if (parserConfig.globalVars && !inList(varname, state.globalVars)) - state.globalVars = new Var(varname, state.globalVars) - } - function registerVarScoped(varname, context) { - if (!context) { - return null - } else if (context.block) { - var inner = registerVarScoped(varname, context.prev) - if (!inner) return null - if (inner == context.prev) return context - return new Context(inner, context.vars, true) - } else if (inList(varname, context.vars)) { - return context - } else { - return new Context(context.prev, new Var(varname, context.vars), false) - } - } - - function isModifier(name) { - return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly" - } - - // Combinators - - function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block } - function Var(name, next) { this.name = name; this.next = next } - - var defaultVars = new Var("this", new Var("arguments", null)) - function pushcontext() { - cx.state.context = new Context(cx.state.context, cx.state.localVars, false) - cx.state.localVars = defaultVars - } - function pushblockcontext() { - cx.state.context = new Context(cx.state.context, cx.state.localVars, true) - cx.state.localVars = null - } - function popcontext() { - cx.state.localVars = cx.state.context.vars - cx.state.context = cx.state.context.prev - } - popcontext.lex = true - function pushlex(type, info) { - var result = function() { - var state = cx.state, indent = state.indented; - if (state.lexical.type == "stat") indent = state.lexical.indented; - else for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev) - indent = outer.indented; - state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info); - }; - result.lex = true; - return result; - } - function poplex() { - var state = cx.state; - if (state.lexical.prev) { - if (state.lexical.type == ")") - state.indented = state.lexical.indented; - state.lexical = state.lexical.prev; - } - } - poplex.lex = true; - - function expect(wanted) { - function exp(type) { - if (type == wanted) return cont(); - else if (wanted == ";" || type == "}" || type == ")" || type == "]") return pass(); - else return cont(exp); - }; - return exp; - } - - function statement(type, value) { - if (type == "var") return cont(pushlex("vardef", value), vardef, expect(";"), poplex); - if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex); - if (type == "keyword b") return cont(pushlex("form"), statement, poplex); - if (type == "keyword d") return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex); - if (type == "debugger") return cont(expect(";")); - if (type == "{") return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext); - if (type == ";") return cont(); - if (type == "if") { - if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex) - cx.state.cc.pop()(); - return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse); - } - if (type == "function") return cont(functiondef); - if (type == "for") return cont(pushlex("form"), forspec, statement, poplex); - if (type == "class" || (isTS && value == "interface")) { - cx.marked = "keyword" - return cont(pushlex("form", type == "class" ? type : value), className, poplex) - } - if (type == "variable") { - if (isTS && value == "declare") { - cx.marked = "keyword" - return cont(statement) - } else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) { - cx.marked = "keyword" - if (value == "enum") return cont(enumdef); - else if (value == "type") return cont(typename, expect("operator"), typeexpr, expect(";")); - else return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex) - } else if (isTS && value == "namespace") { - cx.marked = "keyword" - return cont(pushlex("form"), expression, statement, poplex) - } else if (isTS && value == "abstract") { - cx.marked = "keyword" - return cont(statement) - } else { - return cont(pushlex("stat"), maybelabel); - } - } - if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), pushblockcontext, - block, poplex, poplex, popcontext); - if (type == "case") return cont(expression, expect(":")); - if (type == "default") return cont(expect(":")); - if (type == "catch") return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext); - if (type == "export") return cont(pushlex("stat"), afterExport, poplex); - if (type == "import") return cont(pushlex("stat"), afterImport, poplex); - if (type == "async") return cont(statement) - if (value == "@") return cont(expression, statement) - return pass(pushlex("stat"), expression, expect(";"), poplex); - } - function maybeCatchBinding(type) { - if (type == "(") return cont(funarg, expect(")")) - } - function expression(type, value) { - return expressionInner(type, value, false); - } - function expressionNoComma(type, value) { - return expressionInner(type, value, true); - } - function parenExpr(type) { - if (type != "(") return pass() - return cont(pushlex(")"), expression, expect(")"), poplex) - } - function expressionInner(type, value, noComma) { - if (cx.state.fatArrowAt == cx.stream.start) { - var body = noComma ? arrowBodyNoComma : arrowBody; - if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext); - else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext); - } - - var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma; - if (atomicTypes.hasOwnProperty(type)) return cont(maybeop); - if (type == "function") return cont(functiondef, maybeop); - if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), classExpression, poplex); } - if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression); - if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop); - if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression); - if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop); - if (type == "{") return contCommasep(objprop, "}", null, maybeop); - if (type == "quasi") return pass(quasi, maybeop); - if (type == "new") return cont(maybeTarget(noComma)); - if (type == "import") return cont(expression); - return cont(); - } - function maybeexpression(type) { - if (type.match(/[;\}\)\],]/)) return pass(); - return pass(expression); - } - - function maybeoperatorComma(type, value) { - if (type == ",") return cont(expression); - return maybeoperatorNoComma(type, value, false); - } - function maybeoperatorNoComma(type, value, noComma) { - var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma; - var expr = noComma == false ? expression : expressionNoComma; - if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext); - if (type == "operator") { - if (/\+\+|--/.test(value) || isTS && value == "!") return cont(me); - if (isTS && value == "<" && cx.stream.match(/^([^>]|<.*?>)*>\s*\(/, false)) - return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me); - if (value == "?") return cont(expression, expect(":"), expr); - return cont(expr); - } - if (type == "quasi") { return pass(quasi, me); } - if (type == ";") return; - if (type == "(") return contCommasep(expressionNoComma, ")", "call", me); - if (type == ".") return cont(property, me); - if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me); - if (isTS && value == "as") { cx.marked = "keyword"; return cont(typeexpr, me) } - if (type == "regexp") { - cx.state.lastType = cx.marked = "operator" - cx.stream.backUp(cx.stream.pos - cx.stream.start - 1) - return cont(expr) - } - } - function quasi(type, value) { - if (type != "quasi") return pass(); - if (value.slice(value.length - 2) != "${") return cont(quasi); - return cont(expression, continueQuasi); - } - function continueQuasi(type) { - if (type == "}") { - cx.marked = "string-2"; - cx.state.tokenize = tokenQuasi; - return cont(quasi); - } - } - function arrowBody(type) { - findFatArrow(cx.stream, cx.state); - return pass(type == "{" ? statement : expression); - } - function arrowBodyNoComma(type) { - findFatArrow(cx.stream, cx.state); - return pass(type == "{" ? statement : expressionNoComma); - } - function maybeTarget(noComma) { - return function(type) { - if (type == ".") return cont(noComma ? targetNoComma : target); - else if (type == "variable" && isTS) return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma) - else return pass(noComma ? expressionNoComma : expression); - }; - } - function target(_, value) { - if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorComma); } - } - function targetNoComma(_, value) { - if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorNoComma); } - } - function maybelabel(type) { - if (type == ":") return cont(poplex, statement); - return pass(maybeoperatorComma, expect(";"), poplex); - } - function property(type) { - if (type == "variable") {cx.marked = "property"; return cont();} - } - function objprop(type, value) { - if (type == "async") { - cx.marked = "property"; - return cont(objprop); - } else if (type == "variable" || cx.style == "keyword") { - cx.marked = "property"; - if (value == "get" || value == "set") return cont(getterSetter); - var m // Work around fat-arrow-detection complication for detecting typescript typed arrow params - if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\s*:\s*/, false))) - cx.state.fatArrowAt = cx.stream.pos + m[0].length - return cont(afterprop); - } else if (type == "number" || type == "string") { - cx.marked = jsonldMode ? "property" : (cx.style + " property"); - return cont(afterprop); - } else if (type == "jsonld-keyword") { - return cont(afterprop); - } else if (isTS && isModifier(value)) { - cx.marked = "keyword" - return cont(objprop) - } else if (type == "[") { - return cont(expression, maybetype, expect("]"), afterprop); - } else if (type == "spread") { - return cont(expressionNoComma, afterprop); - } else if (value == "*") { - cx.marked = "keyword"; - return cont(objprop); - } else if (type == ":") { - return pass(afterprop) - } - } - function getterSetter(type) { - if (type != "variable") return pass(afterprop); - cx.marked = "property"; - return cont(functiondef); - } - function afterprop(type) { - if (type == ":") return cont(expressionNoComma); - if (type == "(") return pass(functiondef); - } - function commasep(what, end, sep) { - function proceed(type, value) { - if (sep ? sep.indexOf(type) > -1 : type == ",") { - var lex = cx.state.lexical; - if (lex.info == "call") lex.pos = (lex.pos || 0) + 1; - return cont(function(type, value) { - if (type == end || value == end) return pass() - return pass(what) - }, proceed); - } - if (type == end || value == end) return cont(); - if (sep && sep.indexOf(";") > -1) return pass(what) - return cont(expect(end)); - } - return function(type, value) { - if (type == end || value == end) return cont(); - return pass(what, proceed); - }; - } - function contCommasep(what, end, info) { - for (var i = 3; i < arguments.length; i++) - cx.cc.push(arguments[i]); - return cont(pushlex(end, info), commasep(what, end), poplex); - } - function block(type) { - if (type == "}") return cont(); - return pass(statement, block); - } - function maybetype(type, value) { - if (isTS) { - if (type == ":" || value == "in") return cont(typeexpr); - if (value == "?") return cont(maybetype); - } - } - function mayberettype(type) { - if (isTS && type == ":") { - if (cx.stream.match(/^\s*\w+\s+is\b/, false)) return cont(expression, isKW, typeexpr) - else return cont(typeexpr) - } - } - function isKW(_, value) { - if (value == "is") { - cx.marked = "keyword" - return cont() - } - } - function typeexpr(type, value) { - if (value == "keyof" || value == "typeof" || value == "infer") { - cx.marked = "keyword" - return cont(value == "typeof" ? expressionNoComma : typeexpr) - } - if (type == "variable" || value == "void") { - cx.marked = "type" - return cont(afterType) - } - if (value == "|" || value == "&") return cont(typeexpr) - if (type == "string" || type == "number" || type == "atom") return cont(afterType); - if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType) - if (type == "{") return cont(pushlex("}"), commasep(typeprop, "}", ",;"), poplex, afterType) - if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType, afterType) - if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr) - } - function maybeReturnType(type) { - if (type == "=>") return cont(typeexpr) - } - function typeprop(type, value) { - if (type == "variable" || cx.style == "keyword") { - cx.marked = "property" - return cont(typeprop) - } else if (value == "?" || type == "number" || type == "string") { - return cont(typeprop) - } else if (type == ":") { - return cont(typeexpr) - } else if (type == "[") { - return cont(expect("variable"), maybetype, expect("]"), typeprop) - } else if (type == "(") { - return pass(functiondecl, typeprop) - } - } - function typearg(type, value) { - if (type == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?") return cont(typearg) - if (type == ":") return cont(typeexpr) - if (type == "spread") return cont(typearg) - return pass(typeexpr) - } - function afterType(type, value) { - if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType) - if (value == "|" || type == "." || value == "&") return cont(typeexpr) - if (type == "[") return cont(typeexpr, expect("]"), afterType) - if (value == "extends" || value == "implements") { cx.marked = "keyword"; return cont(typeexpr) } - if (value == "?") return cont(typeexpr, expect(":"), typeexpr) - } - function maybeTypeArgs(_, value) { - if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType) - } - function typeparam() { - return pass(typeexpr, maybeTypeDefault) - } - function maybeTypeDefault(_, value) { - if (value == "=") return cont(typeexpr) - } - function vardef(_, value) { - if (value == "enum") {cx.marked = "keyword"; return cont(enumdef)} - return pass(pattern, maybetype, maybeAssign, vardefCont); - } - function pattern(type, value) { - if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(pattern) } - if (type == "variable") { register(value); return cont(); } - if (type == "spread") return cont(pattern); - if (type == "[") return contCommasep(eltpattern, "]"); - if (type == "{") return contCommasep(proppattern, "}"); - } - function proppattern(type, value) { - if (type == "variable" && !cx.stream.match(/^\s*:/, false)) { - register(value); - return cont(maybeAssign); - } - if (type == "variable") cx.marked = "property"; - if (type == "spread") return cont(pattern); - if (type == "}") return pass(); - if (type == "[") return cont(expression, expect(']'), expect(':'), proppattern); - return cont(expect(":"), pattern, maybeAssign); - } - function eltpattern() { - return pass(pattern, maybeAssign) - } - function maybeAssign(_type, value) { - if (value == "=") return cont(expressionNoComma); - } - function vardefCont(type) { - if (type == ",") return cont(vardef); - } - function maybeelse(type, value) { - if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex); - } - function forspec(type, value) { - if (value == "await") return cont(forspec); - if (type == "(") return cont(pushlex(")"), forspec1, poplex); - } - function forspec1(type) { - if (type == "var") return cont(vardef, forspec2); - if (type == "variable") return cont(forspec2); - return pass(forspec2) - } - function forspec2(type, value) { - if (type == ")") return cont() - if (type == ";") return cont(forspec2) - if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression, forspec2) } - return pass(expression, forspec2) - } - function functiondef(type, value) { - if (value == "*") {cx.marked = "keyword"; return cont(functiondef);} - if (type == "variable") {register(value); return cont(functiondef);} - if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext); - if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef) - } - function functiondecl(type, value) { - if (value == "*") {cx.marked = "keyword"; return cont(functiondecl);} - if (type == "variable") {register(value); return cont(functiondecl);} - if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, popcontext); - if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondecl) - } - function typename(type, value) { - if (type == "keyword" || type == "variable") { - cx.marked = "type" - return cont(typename) - } else if (value == "<") { - return cont(pushlex(">"), commasep(typeparam, ">"), poplex) - } - } - function funarg(type, value) { - if (value == "@") cont(expression, funarg) - if (type == "spread") return cont(funarg); - if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(funarg); } - if (isTS && type == "this") return cont(maybetype, maybeAssign) - return pass(pattern, maybetype, maybeAssign); - } - function classExpression(type, value) { - // Class expressions may have an optional name. - if (type == "variable") return className(type, value); - return classNameAfter(type, value); - } - function className(type, value) { - if (type == "variable") {register(value); return cont(classNameAfter);} - } - function classNameAfter(type, value) { - if (value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter) - if (value == "extends" || value == "implements" || (isTS && type == ",")) { - if (value == "implements") cx.marked = "keyword"; - return cont(isTS ? typeexpr : expression, classNameAfter); - } - if (type == "{") return cont(pushlex("}"), classBody, poplex); - } - function classBody(type, value) { - if (type == "async" || - (type == "variable" && - (value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) && - cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) { - cx.marked = "keyword"; - return cont(classBody); - } - if (type == "variable" || cx.style == "keyword") { - cx.marked = "property"; - return cont(isTS ? classfield : functiondef, classBody); - } - if (type == "number" || type == "string") return cont(isTS ? classfield : functiondef, classBody); - if (type == "[") - return cont(expression, maybetype, expect("]"), isTS ? classfield : functiondef, classBody) - if (value == "*") { - cx.marked = "keyword"; - return cont(classBody); - } - if (isTS && type == "(") return pass(functiondecl, classBody) - if (type == ";" || type == ",") return cont(classBody); - if (type == "}") return cont(); - if (value == "@") return cont(expression, classBody) - } - function classfield(type, value) { - if (value == "?") return cont(classfield) - if (type == ":") return cont(typeexpr, maybeAssign) - if (value == "=") return cont(expressionNoComma) - var context = cx.state.lexical.prev, isInterface = context && context.info == "interface" - return pass(isInterface ? functiondecl : functiondef) - } - function afterExport(type, value) { - if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); } - if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); } - if (type == "{") return cont(commasep(exportField, "}"), maybeFrom, expect(";")); - return pass(statement); - } - function exportField(type, value) { - if (value == "as") { cx.marked = "keyword"; return cont(expect("variable")); } - if (type == "variable") return pass(expressionNoComma, exportField); - } - function afterImport(type) { - if (type == "string") return cont(); - if (type == "(") return pass(expression); - return pass(importSpec, maybeMoreImports, maybeFrom); - } - function importSpec(type, value) { - if (type == "{") return contCommasep(importSpec, "}"); - if (type == "variable") register(value); - if (value == "*") cx.marked = "keyword"; - return cont(maybeAs); - } - function maybeMoreImports(type) { - if (type == ",") return cont(importSpec, maybeMoreImports) - } - function maybeAs(_type, value) { - if (value == "as") { cx.marked = "keyword"; return cont(importSpec); } - } - function maybeFrom(_type, value) { - if (value == "from") { cx.marked = "keyword"; return cont(expression); } - } - function arrayLiteral(type) { - if (type == "]") return cont(); - return pass(commasep(expressionNoComma, "]")); - } - function enumdef() { - return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex) - } - function enummember() { - return pass(pattern, maybeAssign); - } - - function isContinuedStatement(state, textAfter) { - return state.lastType == "operator" || state.lastType == "," || - isOperatorChar.test(textAfter.charAt(0)) || - /[,.]/.test(textAfter.charAt(0)); - } - - function expressionAllowed(stream, state, backUp) { - return state.tokenize == tokenBase && - /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(state.lastType) || - (state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0)))) - } - - // Interface - - return { - startState: function(basecolumn) { - var state = { - tokenize: tokenBase, - lastType: "sof", - cc: [], - lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false), - localVars: parserConfig.localVars, - context: parserConfig.localVars && new Context(null, null, false), - indented: basecolumn || 0 - }; - if (parserConfig.globalVars && typeof parserConfig.globalVars == "object") - state.globalVars = parserConfig.globalVars; - return state; - }, - - token: function(stream, state) { - if (stream.sol()) { - if (!state.lexical.hasOwnProperty("align")) - state.lexical.align = false; - state.indented = stream.indentation(); - findFatArrow(stream, state); - } - if (state.tokenize != tokenComment && stream.eatSpace()) return null; - var style = state.tokenize(stream, state); - if (type == "comment") return style; - state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type; - return parseJS(state, style, type, content, stream); - }, - - indent: function(state, textAfter) { - if (state.tokenize == tokenComment) return CodeMirror.Pass; - if (state.tokenize != tokenBase) return 0; - var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top - // Kludge to prevent 'maybelse' from blocking lexical scope pops - if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) { - var c = state.cc[i]; - if (c == poplex) lexical = lexical.prev; - else if (c != maybeelse) break; - } - while ((lexical.type == "stat" || lexical.type == "form") && - (firstChar == "}" || ((top = state.cc[state.cc.length - 1]) && - (top == maybeoperatorComma || top == maybeoperatorNoComma) && - !/^[,\.=+\-*:?[\(]/.test(textAfter)))) - lexical = lexical.prev; - if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat") - lexical = lexical.prev; - var type = lexical.type, closing = firstChar == type; - - if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0); - else if (type == "form" && firstChar == "{") return lexical.indented; - else if (type == "form") return lexical.indented + indentUnit; - else if (type == "stat") - return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0); - else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false) - return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit); - else if (lexical.align) return lexical.column + (closing ? 0 : 1); - else return lexical.indented + (closing ? 0 : indentUnit); - }, - - electricInput: /^\s*(?:case .*?:|default:|\{|\})$/, - blockCommentStart: jsonMode ? null : "/*", - blockCommentEnd: jsonMode ? null : "*/", - blockCommentContinue: jsonMode ? null : " * ", - lineComment: jsonMode ? null : "//", - fold: "brace", - closeBrackets: "()[]{}''\"\"``", - - helperType: jsonMode ? "json" : "javascript", - jsonldMode: jsonldMode, - jsonMode: jsonMode, - - expressionAllowed: expressionAllowed, - - skipExpression: function(state) { - var top = state.cc[state.cc.length - 1] - if (top == expression || top == expressionNoComma) state.cc.pop() - } - }; -}); - -CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/); - -CodeMirror.defineMIME("text/javascript", "javascript"); -CodeMirror.defineMIME("text/ecmascript", "javascript"); -CodeMirror.defineMIME("application/javascript", "javascript"); -CodeMirror.defineMIME("application/x-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("application/ld+json", {name: "javascript", jsonld: true}); -CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true }); -CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true }); - -}); - -// CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: https://codemirror.net/LICENSE - -(function(mod) { - if (typeof exports == "object" && typeof module == "object") // CommonJS - mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"), require("../clike/clike")); - else if (typeof define == "function" && define.amd) // AMD - define(["../../lib/codemirror", "../htmlmixed/htmlmixed", "../clike/clike"], mod); - else // Plain browser env - mod(CodeMirror); -})(function(CodeMirror) { - "use strict"; - - function keywords(str) { - var obj = {}, words = str.split(" "); - for (var i = 0; i < words.length; ++i) obj[words[i]] = true; - return obj; - } - - // Helper for phpString - function matchSequence(list, end, escapes) { - if (list.length == 0) return phpString(end); - return function (stream, state) { - var patterns = list[0]; - for (var i = 0; i < patterns.length; i++) if (stream.match(patterns[i][0])) { - state.tokenize = matchSequence(list.slice(1), end); - return patterns[i][1]; - } - state.tokenize = phpString(end, escapes); - return "string"; - }; - } - function phpString(closing, escapes) { - return function(stream, state) { return phpString_(stream, state, closing, escapes); }; - } - function phpString_(stream, state, closing, escapes) { - // "Complex" syntax - if (escapes !== false && stream.match("${", false) || stream.match("{$", false)) { - state.tokenize = null; - return "string"; - } - - // Simple syntax - if (escapes !== false && stream.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/)) { - // After the variable name there may appear array or object operator. - if (stream.match("[", false)) { - // Match array operator - state.tokenize = matchSequence([ - [["[", null]], - [[/\d[\w\.]*/, "number"], - [/\$[a-zA-Z_][a-zA-Z0-9_]*/, "variable-2"], - [/[\w\$]+/, "variable"]], - [["]", null]] - ], closing, escapes); - } - if (stream.match(/\-\>\w/, false)) { - // Match object operator - state.tokenize = matchSequence([ - [["->", null]], - [[/[\w]+/, "variable"]] - ], closing, escapes); - } - return "variable-2"; - } - - var escaped = false; - // Normal string - while (!stream.eol() && - (escaped || escapes === false || - (!stream.match("{$", false) && - !stream.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/, false)))) { - if (!escaped && stream.match(closing)) { - state.tokenize = null; - state.tokStack.pop(); state.tokStack.pop(); - break; - } - escaped = stream.next() == "\\" && !escaped; - } - return "string"; - } - - var phpKeywords = "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"; - var phpAtoms = "true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__"; - var phpBuiltin = "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 file_put_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 array_intersect_key array_combine array_column 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 json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count"; - CodeMirror.registerHelper("hintWords", "php", [phpKeywords, phpAtoms, phpBuiltin].join(" ").split(" ")); - CodeMirror.registerHelper("wordChars", "php", /[\w$]/); - - var phpConfig = { - name: "clike", - helperType: "php", - keywords: keywords(phpKeywords), - blockKeywords: keywords("catch do else elseif for foreach if switch try while finally"), - defKeywords: keywords("class function interface namespace trait"), - atoms: keywords(phpAtoms), - builtin: keywords(phpBuiltin), - multiLineStrings: true, - hooks: { - "$": function(stream) { - stream.eatWhile(/[\w\$_]/); - return "variable-2"; - }, - "<": function(stream, state) { - var before; - if (before = stream.match(/<<\s*/)) { - var quoted = stream.eat(/['"]/); - stream.eatWhile(/[\w\.]/); - var delim = stream.current().slice(before[0].length + (quoted ? 2 : 1)); - if (quoted) stream.eat(quoted); - if (delim) { - (state.tokStack || (state.tokStack = [])).push(delim, 0); - state.tokenize = phpString(delim, quoted != "'"); - return "string"; - } - } - return false; - }, - "#": function(stream) { - while (!stream.eol() && !stream.match("?>", false)) stream.next(); - return "comment"; - }, - "/": function(stream) { - if (stream.eat("/")) { - while (!stream.eol() && !stream.match("?>", false)) stream.next(); - return "comment"; - } - return false; - }, - '"': function(_stream, state) { - (state.tokStack || (state.tokStack = [])).push('"', 0); - state.tokenize = phpString('"'); - return "string"; - }, - "{": function(_stream, state) { - if (state.tokStack && state.tokStack.length) - state.tokStack[state.tokStack.length - 1]++; - return false; - }, - "}": function(_stream, state) { - if (state.tokStack && state.tokStack.length > 0 && - !--state.tokStack[state.tokStack.length - 1]) { - state.tokenize = phpString(state.tokStack[state.tokStack.length - 2]); - } - return false; - } - } - }; - - CodeMirror.defineMode("php", function(config, parserConfig) { - var htmlMode = CodeMirror.getMode(config, (parserConfig && parserConfig.htmlMode) || "text/html"); - var phpMode = CodeMirror.getMode(config, phpConfig); - - function dispatch(stream, state) { - var isPHP = state.curMode == phpMode; - if (stream.sol() && state.pending && state.pending != '"' && state.pending != "'") state.pending = null; - if (!isPHP) { - if (stream.match(/^<\?\w*/)) { - state.curMode = phpMode; - if (!state.php) state.php = CodeMirror.startState(phpMode, htmlMode.indent(state.html, "", "")) - state.curState = state.php; - return "meta"; - } - if (state.pending == '"' || state.pending == "'") { - while (!stream.eol() && stream.next() != state.pending) {} - var style = "string"; - } else if (state.pending && stream.pos < state.pending.end) { - stream.pos = state.pending.end; - var style = state.pending.style; - } else { - var style = htmlMode.token(stream, state.curState); - } - if (state.pending) state.pending = null; - var cur = stream.current(), openPHP = cur.search(/<\?/), m; - if (openPHP != -1) { - if (style == "string" && (m = cur.match(/[\'\"]$/)) && !/\?>/.test(cur)) state.pending = m[0]; - else state.pending = {end: stream.pos, style: style}; - stream.backUp(cur.length - openPHP); - } - return style; - } else if (isPHP && state.php.tokenize == null && stream.match("?>")) { - state.curMode = htmlMode; - state.curState = state.html; - if (!state.php.context.prev) state.php = null; - return "meta"; - } else { - return phpMode.token(stream, state.curState); - } - } - - return { - startState: function() { - var html = CodeMirror.startState(htmlMode) - var php = parserConfig.startOpen ? CodeMirror.startState(phpMode) : null - return {html: html, - php: php, - curMode: parserConfig.startOpen ? phpMode : htmlMode, - curState: parserConfig.startOpen ? php : html, - pending: null}; - }, - - copyState: function(state) { - var html = state.html, htmlNew = CodeMirror.copyState(htmlMode, html), - php = state.php, phpNew = php && CodeMirror.copyState(phpMode, php), cur; - if (state.curMode == htmlMode) cur = htmlNew; - else cur = phpNew; - return {html: htmlNew, php: phpNew, curMode: state.curMode, curState: cur, - pending: state.pending}; - }, - - token: dispatch, - - indent: function(state, textAfter, line) { - if ((state.curMode != phpMode && /^\s*<\//.test(textAfter)) || - (state.curMode == phpMode && /^\?>/.test(textAfter))) - return htmlMode.indent(state.html, textAfter, line); - return state.curMode.indent(state.curState, textAfter, line); - }, - - blockCommentStart: "/*", - blockCommentEnd: "*/", - lineComment: "//", - - innerMode: function(state) { return {state: state.curState, mode: state.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", phpConfig); -}); - -// CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: https://codemirror.net/LICENSE - -(function(mod) { - if (typeof exports == "object" && typeof module == "object") // CommonJS - mod(require("../../lib/codemirror"), require("../markdown/markdown"), require("../../addon/mode/overlay")); - else if (typeof define == "function" && define.amd) // AMD - define(["../../lib/codemirror", "../markdown/markdown", "../../addon/mode/overlay"], mod); - else // Plain browser env - mod(CodeMirror); -})(function(CodeMirror) { -"use strict"; - -var urlRE = /^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i - -CodeMirror.defineMode("gfm", function(config, modeConfig) { - var codeDepth = 0; - function blankLine(state) { - state.code = false; - return null; - } - var gfmOverlay = { - startState: function() { - return { - code: false, - codeBlock: false, - ateSpace: false - }; - }, - copyState: function(s) { - return { - code: s.code, - codeBlock: s.codeBlock, - ateSpace: s.ateSpace - }; - }, - token: function(stream, state) { - state.combineTokens = null; - - // Hack to prevent formatting override inside code blocks (block and inline) - if (state.codeBlock) { - if (stream.match(/^```+/)) { - state.codeBlock = false; - return null; - } - stream.skipToEnd(); - return null; - } - if (stream.sol()) { - state.code = false; - } - if (stream.sol() && stream.match(/^```+/)) { - stream.skipToEnd(); - state.codeBlock = true; - return null; - } - // If this block is changed, it may need to be updated in Markdown mode - if (stream.peek() === '`') { - stream.next(); - var before = stream.pos; - stream.eatWhile('`'); - var difference = 1 + stream.pos - before; - if (!state.code) { - codeDepth = difference; - state.code = true; - } else { - if (difference === codeDepth) { // Must be exact - state.code = false; - } - } - return null; - } else if (state.code) { - stream.next(); - return null; - } - // Check if space. If so, links can be formatted later on - if (stream.eatSpace()) { - state.ateSpace = true; - return null; - } - if (stream.sol() || state.ateSpace) { - state.ateSpace = false; - if (modeConfig.gitHubSpice !== false) { - if(stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/)) { - // User/Project@SHA - // User@SHA - // SHA - state.combineTokens = true; - return "link"; - } else if (stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/)) { - // User/Project#Num - // User#Num - // #Num - state.combineTokens = true; - return "link"; - } - } - } - if (stream.match(urlRE) && - stream.string.slice(stream.start - 2, stream.start) != "](" && - (stream.start == 0 || /\W/.test(stream.string.charAt(stream.start - 1)))) { - // URLs - // Taken from http://daringfireball.net/2010/07/improved_regex_for_matching_urls - // And then (issue #1160) simplified to make it not crash the Chrome Regexp engine - // And then limited url schemes to the CommonMark list, so foo:bar isn't matched as a URL - state.combineTokens = true; - return "link"; - } - stream.next(); - return null; - }, - blankLine: blankLine - }; - - var markdownConfig = { - taskLists: true, - strikethrough: true, - emoji: true - }; - for (var attr in modeConfig) { - markdownConfig[attr] = modeConfig[attr]; - } - markdownConfig.name = "markdown"; - return CodeMirror.overlayMode(CodeMirror.getMode(config, markdownConfig), gfmOverlay); - -}, "markdown"); - - CodeMirror.defineMIME("text/x-gfm", "gfm"); -}); - -// CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: https://codemirror.net/LICENSE - -(function(mod) { - if (typeof exports == "object" && typeof module == "object") // CommonJS - mod(require("../../lib/codemirror")); - else if (typeof define == "function" && define.amd) // AMD - define(["../../lib/codemirror"], mod); - else // Plain browser env - mod(CodeMirror); -})(function(CodeMirror) { -"use strict"; - -var htmlConfig = { - 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, 'menuitem': 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, - caseFold: true -} - -var xmlConfig = { - autoSelfClosers: {}, - implicitlyClosed: {}, - contextGrabbers: {}, - doNotIndent: {}, - allowUnquoted: false, - allowMissing: false, - allowMissingTagName: false, - caseFold: false -} - -CodeMirror.defineMode("xml", function(editorConf, config_) { - var indentUnit = editorConf.indentUnit - var config = {} - var defaults = config_.htmlMode ? htmlConfig : xmlConfig - for (var prop in defaults) config[prop] = defaults[prop] - for (var prop in config_) config[prop] = config_[prop] - - // Return variables for tokenizers - var type, setStyle; - - function inText(stream, state) { - function chain(parser) { - state.tokenize = parser; - return parser(stream, state); - } - - var ch = stream.next(); - if (ch == "<") { - if (stream.eat("!")) { - if (stream.eat("[")) { - if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>")); - else return null; - } else if (stream.match("--")) { - return chain(inBlock("comment", "-->")); - } else if (stream.match("DOCTYPE", true, true)) { - stream.eatWhile(/[\w\._\-]/); - return chain(doctype(1)); - } else { - return null; - } - } else if (stream.eat("?")) { - stream.eatWhile(/[\w\._\-]/); - state.tokenize = inBlock("meta", "?>"); - return "meta"; - } else { - type = stream.eat("/") ? "closeTag" : "openTag"; - state.tokenize = inTag; - return "tag bracket"; - } - } else if (ch == "&") { - var ok; - if (stream.eat("#")) { - if (stream.eat("x")) { - ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";"); - } else { - ok = stream.eatWhile(/[\d]/) && stream.eat(";"); - } - } else { - ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";"); - } - return ok ? "atom" : "error"; - } else { - stream.eatWhile(/[^&<]/); - return null; - } - } - inText.isInText = true; - - function inTag(stream, state) { - var ch = stream.next(); - if (ch == ">" || (ch == "/" && stream.eat(">"))) { - state.tokenize = inText; - type = ch == ">" ? "endTag" : "selfcloseTag"; - return "tag bracket"; - } else if (ch == "=") { - type = "equals"; - return null; - } else if (ch == "<") { - state.tokenize = inText; - state.state = baseState; - state.tagName = state.tagStart = null; - var next = state.tokenize(stream, state); - return next ? next + " tag error" : "tag error"; - } else if (/[\'\"]/.test(ch)) { - state.tokenize = inAttribute(ch); - state.stringStartCol = stream.column(); - return state.tokenize(stream, state); - } else { - stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/); - return "word"; - } - } - - function inAttribute(quote) { - var closure = function(stream, state) { - while (!stream.eol()) { - if (stream.next() == quote) { - state.tokenize = inTag; - break; - } - } - return "string"; - }; - closure.isInAttribute = true; - return closure; - } - - function inBlock(style, terminator) { - return function(stream, state) { - while (!stream.eol()) { - if (stream.match(terminator)) { - state.tokenize = inText; - break; - } - stream.next(); - } - return style; - } - } - - function doctype(depth) { - return function(stream, state) { - var ch; - while ((ch = stream.next()) != null) { - if (ch == "<") { - state.tokenize = doctype(depth + 1); - return state.tokenize(stream, state); - } else if (ch == ">") { - if (depth == 1) { - state.tokenize = inText; - break; - } else { - state.tokenize = doctype(depth - 1); - return state.tokenize(stream, state); - } - } - } - return "meta"; - }; - } - - function Context(state, tagName, startOfLine) { - this.prev = state.context; - this.tagName = tagName; - this.indent = state.indented; - this.startOfLine = startOfLine; - if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent)) - this.noIndent = true; - } - function popContext(state) { - if (state.context) state.context = state.context.prev; - } - function maybePopContext(state, nextTagName) { - var parentTagName; - while (true) { - if (!state.context) { - return; - } - parentTagName = state.context.tagName; - if (!config.contextGrabbers.hasOwnProperty(parentTagName) || - !config.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) { - return; - } - popContext(state); - } - } - - function baseState(type, stream, state) { - if (type == "openTag") { - state.tagStart = stream.column(); - return tagNameState; - } else if (type == "closeTag") { - return closeTagNameState; - } else { - return baseState; - } - } - function tagNameState(type, stream, state) { - if (type == "word") { - state.tagName = stream.current(); - setStyle = "tag"; - return attrState; - } else if (config.allowMissingTagName && type == "endTag") { - setStyle = "tag bracket"; - return attrState(type, stream, state); - } else { - setStyle = "error"; - return tagNameState; - } - } - function closeTagNameState(type, stream, state) { - if (type == "word") { - var tagName = stream.current(); - if (state.context && state.context.tagName != tagName && - config.implicitlyClosed.hasOwnProperty(state.context.tagName)) - popContext(state); - if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) { - setStyle = "tag"; - return closeState; - } else { - setStyle = "tag error"; - return closeStateErr; - } - } else if (config.allowMissingTagName && type == "endTag") { - setStyle = "tag bracket"; - return closeState(type, stream, state); - } else { - setStyle = "error"; - return closeStateErr; - } - } - - function closeState(type, _stream, state) { - if (type != "endTag") { - setStyle = "error"; - return closeState; - } - popContext(state); - return baseState; - } - function closeStateErr(type, stream, state) { - setStyle = "error"; - return closeState(type, stream, state); - } - - function attrState(type, _stream, state) { - if (type == "word") { - setStyle = "attribute"; - return attrEqState; - } else if (type == "endTag" || type == "selfcloseTag") { - var tagName = state.tagName, tagStart = state.tagStart; - state.tagName = state.tagStart = null; - if (type == "selfcloseTag" || - config.autoSelfClosers.hasOwnProperty(tagName)) { - maybePopContext(state, tagName); - } else { - maybePopContext(state, tagName); - state.context = new Context(state, tagName, tagStart == state.indented); - } - return baseState; - } - setStyle = "error"; - return attrState; - } - function attrEqState(type, stream, state) { - if (type == "equals") return attrValueState; - if (!config.allowMissing) setStyle = "error"; - return attrState(type, stream, state); - } - function attrValueState(type, stream, state) { - if (type == "string") return attrContinuedState; - if (type == "word" && config.allowUnquoted) {setStyle = "string"; return attrState;} - setStyle = "error"; - return attrState(type, stream, state); - } - function attrContinuedState(type, stream, state) { - if (type == "string") return attrContinuedState; - return attrState(type, stream, state); - } - - return { - startState: function(baseIndent) { - var state = {tokenize: inText, - state: baseState, - indented: baseIndent || 0, - tagName: null, tagStart: null, - context: null} - if (baseIndent != null) state.baseIndent = baseIndent - return state - }, - - token: function(stream, state) { - if (!state.tagName && stream.sol()) - state.indented = stream.indentation(); - - if (stream.eatSpace()) return null; - type = null; - var style = state.tokenize(stream, state); - if ((style || type) && style != "comment") { - setStyle = null; - state.state = state.state(type || style, stream, state); - if (setStyle) - style = setStyle == "error" ? style + " error" : setStyle; - } - return style; - }, - - indent: function(state, textAfter, fullLine) { - var context = state.context; - // Indent multi-line strings (e.g. css). - if (state.tokenize.isInAttribute) { - if (state.tagStart == state.indented) - return state.stringStartCol + 1; - else - return state.indented + indentUnit; - } - if (context && context.noIndent) return CodeMirror.Pass; - if (state.tokenize != inTag && state.tokenize != inText) - return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0; - // Indent the starts of attribute names. - if (state.tagName) { - if (config.multilineTagIndentPastTag !== false) - return state.tagStart + state.tagName.length + 2; - else - return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1); - } - if (config.alignCDATA && /$/, - blockCommentStart: "", - - configuration: config.htmlMode ? "html" : "xml", - helperType: config.htmlMode ? "html" : "xml", - - skipAttribute: function(state) { - if (state.state == attrValueState) - state.state = attrState - } - }; -}); - -CodeMirror.defineMIME("text/xml", "xml"); -CodeMirror.defineMIME("application/xml", "xml"); -if (!CodeMirror.mimeModes.hasOwnProperty("text/html")) - CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true}); - -}); - -/** - * marked - a markdown parser - * Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed) - * https://github.com/markedjs/marked - */ - -;(function(root) { -'use strict'; - -/** - * Block-Level Grammar - */ - -var block = { - newline: /^\n+/, - code: /^( {4}[^\n]+\n*)+/, - fences: noop, - hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/, - heading: /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/, - nptable: noop, - blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/, - list: /^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/, - html: '^ {0,3}(?:' // optional indentation - + '<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)' // (1) - + '|comment[^\\n]*(\\n+|$)' // (2) - + '|<\\?[\\s\\S]*?\\?>\\n*' // (3) - + '|\\n*' // (4) - + '|\\n*' // (5) - + '|)[\\s\\S]*?(?:\\n{2,}|$)' // (6) - + '|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)' // (7) open tag - + '|(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)' // (7) closing tag - + ')', - def: /^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/, - table: noop, - lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/, - paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/, - text: /^[^\n]+/ -}; - -block._label = /(?!\s*\])(?:\\[\[\]]|[^\[\]])+/; -block._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/; -block.def = edit(block.def) - .replace('label', block._label) - .replace('title', block._title) - .getRegex(); - -block.bullet = /(?:[*+-]|\d{1,9}\.)/; -block.item = /^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/; -block.item = edit(block.item, 'gm') - .replace(/bull/g, block.bullet) - .getRegex(); - -block.list = edit(block.list) - .replace(/bull/g, block.bullet) - .replace('hr', '\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))') - .replace('def', '\\n+(?=' + block.def.source + ')') - .getRegex(); - -block._tag = 'address|article|aside|base|basefont|blockquote|body|caption' - + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption' - + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe' - + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option' - + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr' - + '|track|ul'; -block._comment = //; -block.html = edit(block.html, 'i') - .replace('comment', block._comment) - .replace('tag', block._tag) - .replace('attribute', / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/) - .getRegex(); - -block.paragraph = edit(block.paragraph) - .replace('hr', block.hr) - .replace('heading', block.heading) - .replace('lheading', block.lheading) - .replace('tag', block._tag) // pars can be interrupted by type (6) html blocks - .getRegex(); - -block.blockquote = edit(block.blockquote) - .replace('paragraph', block.paragraph) - .getRegex(); - -/** - * Normal Block Grammar - */ - -block.normal = merge({}, block); - -/** - * GFM Block Grammar - */ - -block.gfm = merge({}, block.normal, { - fences: /^ {0,3}(`{3,}|~{3,})([^`\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/, - paragraph: /^/, - heading: /^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/ -}); - -block.gfm.paragraph = edit(block.paragraph) - .replace('(?!', '(?!' - + block.gfm.fences.source.replace('\\1', '\\2') + '|' - + block.list.source.replace('\\1', '\\3') + '|') - .getRegex(); - -/** - * GFM + Tables Block Grammar - */ - -block.tables = merge({}, block.gfm, { - nptable: /^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/, - table: /^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/ -}); - -/** - * Pedantic grammar - */ - -block.pedantic = merge({}, block.normal, { - html: edit( - '^ *(?:comment *(?:\\n|\\s*$)' - + '|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)' // closed tag - + '|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))') - .replace('comment', block._comment) - .replace(/tag/g, '(?!(?:' - + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub' - + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)' - + '\\b)\\w+(?!:|[^\\w\\s@]*@)\\b') - .getRegex(), - def: /^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/ -}); - -/** - * Block Lexer - */ - -function Lexer(options) { - this.tokens = []; - this.tokens.links = Object.create(null); - this.options = options || marked.defaults; - this.rules = block.normal; - - if (this.options.pedantic) { - this.rules = block.pedantic; - } else if (this.options.gfm) { - if (this.options.tables) { - this.rules = block.tables; - } else { - this.rules = block.gfm; - } - } -} - -/** - * Expose Block Rules - */ - -Lexer.rules = block; - -/** - * Static Lex Method - */ - -Lexer.lex = function(src, options) { - var lexer = new Lexer(options); - return lexer.lex(src); -}; - -/** - * Preprocessing - */ - -Lexer.prototype.lex = function(src) { - src = src - .replace(/\r\n|\r/g, '\n') - .replace(/\t/g, ' ') - .replace(/\u00a0/g, ' ') - .replace(/\u2424/g, '\n'); - - return this.token(src, true); -}; - -/** - * Lexing - */ - -Lexer.prototype.token = function(src, top) { - src = src.replace(/^ +$/gm, ''); - var next, - loose, - cap, - bull, - b, - item, - listStart, - listItems, - t, - space, - i, - tag, - l, - isordered, - istask, - ischecked; - - while (src) { - // newline - if (cap = this.rules.newline.exec(src)) { - src = src.substring(cap[0].length); - if (cap[0].length > 1) { - this.tokens.push({ - type: 'space' - }); - } - } - - // code - if (cap = this.rules.code.exec(src)) { - src = src.substring(cap[0].length); - cap = cap[0].replace(/^ {4}/gm, ''); - this.tokens.push({ - type: 'code', - text: !this.options.pedantic - ? rtrim(cap, '\n') - : cap - }); - continue; - } - - // fences (gfm) - if (cap = this.rules.fences.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'code', - lang: cap[2] ? cap[2].trim() : cap[2], - text: cap[3] || '' - }); - continue; - } - - // heading - if (cap = this.rules.heading.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'heading', - depth: cap[1].length, - text: cap[2] - }); - continue; - } - - // table no leading pipe (gfm) - if (top && (cap = this.rules.nptable.exec(src))) { - item = { - type: 'table', - header: splitCells(cap[1].replace(/^ *| *\| *$/g, '')), - align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), - cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : [] - }; - - if (item.header.length === item.align.length) { - src = src.substring(cap[0].length); - - for (i = 0; i < item.align.length; i++) { - if (/^ *-+: *$/.test(item.align[i])) { - item.align[i] = 'right'; - } else if (/^ *:-+: *$/.test(item.align[i])) { - item.align[i] = 'center'; - } else if (/^ *:-+ *$/.test(item.align[i])) { - item.align[i] = 'left'; - } else { - item.align[i] = null; - } - } - - for (i = 0; i < item.cells.length; i++) { - item.cells[i] = splitCells(item.cells[i], item.header.length); - } - - this.tokens.push(item); - - continue; - } - } - - // hr - if (cap = this.rules.hr.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'hr' - }); - continue; - } - - // blockquote - if (cap = this.rules.blockquote.exec(src)) { - src = src.substring(cap[0].length); - - this.tokens.push({ - type: 'blockquote_start' - }); - - cap = cap[0].replace(/^ *> ?/gm, ''); - - // Pass `top` to keep the current - // "toplevel" state. This is exactly - // how markdown.pl works. - this.token(cap, top); - - this.tokens.push({ - type: 'blockquote_end' - }); - - continue; - } - - // list - if (cap = this.rules.list.exec(src)) { - src = src.substring(cap[0].length); - bull = cap[2]; - isordered = bull.length > 1; - - listStart = { - type: 'list_start', - ordered: isordered, - start: isordered ? +bull : '', - loose: false - }; - - this.tokens.push(listStart); - - // Get each top-level item. - cap = cap[0].match(this.rules.item); - - listItems = []; - next = false; - l = cap.length; - i = 0; - - for (; i < l; i++) { - item = cap[i]; - - // Remove the list item's bullet - // so it is seen as the next token. - space = item.length; - item = item.replace(/^ *([*+-]|\d+\.) */, ''); - - // Outdent whatever the - // list item contains. Hacky. - if (~item.indexOf('\n ')) { - space -= item.length; - item = !this.options.pedantic - ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') - : item.replace(/^ {1,4}/gm, ''); - } - - // Determine whether the next list item belongs here. - // Backpedal if it does not belong in this list. - if (i !== l - 1) { - b = block.bullet.exec(cap[i + 1])[0]; - if (bull.length > 1 ? b.length === 1 - : (b.length > 1 || (this.options.smartLists && b !== bull))) { - src = cap.slice(i + 1).join('\n') + src; - i = l - 1; - } - } - - // Determine whether item is loose or not. - // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/ - // for discount behavior. - loose = next || /\n\n(?!\s*$)/.test(item); - if (i !== l - 1) { - next = item.charAt(item.length - 1) === '\n'; - if (!loose) loose = next; - } - - if (loose) { - listStart.loose = true; - } - - // Check for task list items - istask = /^\[[ xX]\] /.test(item); - ischecked = undefined; - if (istask) { - ischecked = item[1] !== ' '; - item = item.replace(/^\[[ xX]\] +/, ''); - } - - t = { - type: 'list_item_start', - task: istask, - checked: ischecked, - loose: loose - }; - - listItems.push(t); - this.tokens.push(t); - - // Recurse. - this.token(item, false); - - this.tokens.push({ - type: 'list_item_end' - }); - } - - if (listStart.loose) { - l = listItems.length; - i = 0; - for (; i < l; i++) { - listItems[i].loose = true; - } - } - - this.tokens.push({ - type: 'list_end' - }); - - continue; - } - - // html - if (cap = this.rules.html.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: this.options.sanitize - ? 'paragraph' - : 'html', - pre: !this.options.sanitizer - && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'), - text: cap[0] - }); - continue; - } - - // def - if (top && (cap = this.rules.def.exec(src))) { - src = src.substring(cap[0].length); - if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1); - tag = cap[1].toLowerCase().replace(/\s+/g, ' '); - if (!this.tokens.links[tag]) { - this.tokens.links[tag] = { - href: cap[2], - title: cap[3] - }; - } - continue; - } - - // table (gfm) - if (top && (cap = this.rules.table.exec(src))) { - item = { - type: 'table', - header: splitCells(cap[1].replace(/^ *| *\| *$/g, '')), - align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), - cells: cap[3] ? cap[3].replace(/(?: *\| *)?\n$/, '').split('\n') : [] - }; - - if (item.header.length === item.align.length) { - src = src.substring(cap[0].length); - - for (i = 0; i < item.align.length; i++) { - if (/^ *-+: *$/.test(item.align[i])) { - item.align[i] = 'right'; - } else if (/^ *:-+: *$/.test(item.align[i])) { - item.align[i] = 'center'; - } else if (/^ *:-+ *$/.test(item.align[i])) { - item.align[i] = 'left'; - } else { - item.align[i] = null; - } - } - - for (i = 0; i < item.cells.length; i++) { - item.cells[i] = splitCells( - item.cells[i].replace(/^ *\| *| *\| *$/g, ''), - item.header.length); - } - - this.tokens.push(item); - - continue; - } - } - - // lheading - if (cap = this.rules.lheading.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'heading', - depth: cap[2] === '=' ? 1 : 2, - text: cap[1] - }); - continue; - } - - // top-level paragraph - if (top && (cap = this.rules.paragraph.exec(src))) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'paragraph', - text: cap[1].charAt(cap[1].length - 1) === '\n' - ? cap[1].slice(0, -1) - : cap[1] - }); - continue; - } - - // text - if (cap = this.rules.text.exec(src)) { - // Top-level should never reach here. - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'text', - text: cap[0] - }); - continue; - } - - if (src) { - throw new Error('Infinite loop on byte: ' + src.charCodeAt(0)); - } - } - - return this.tokens; -}; - -/** - * Inline-Level Grammar - */ - -var inline = { - escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, - autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/, - url: noop, - tag: '^comment' - + '|^' // self-closing tag - + '|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>' // open tag - + '|^<\\?[\\s\\S]*?\\?>' // processing instruction, e.g. - + '|^' // declaration, e.g. - + '|^', // CDATA section - link: /^!?\[(label)\]\(href(?:\s+(title))?\s*\)/, - reflink: /^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/, - nolink: /^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/, - strong: /^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/, - em: /^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s"<\[][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/, - code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, - br: /^( {2,}|\\)\n(?!\s*$)/, - del: noop, - text: /^(`+|[^`])[\s\S]*?(?=[\\?@\\[^_{|}~'; -inline.em = edit(inline.em).replace(/punctuation/g, inline._punctuation).getRegex(); - -inline._escapes = /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g; - -inline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/; -inline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/; -inline.autolink = edit(inline.autolink) - .replace('scheme', inline._scheme) - .replace('email', inline._email) - .getRegex(); - -inline._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/; - -inline.tag = edit(inline.tag) - .replace('comment', block._comment) - .replace('attribute', inline._attribute) - .getRegex(); - -inline._label = /(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/; -inline._href = /\s*(<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*)/; -inline._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/; - -inline.link = edit(inline.link) - .replace('label', inline._label) - .replace('href', inline._href) - .replace('title', inline._title) - .getRegex(); - -inline.reflink = edit(inline.reflink) - .replace('label', inline._label) - .getRegex(); - -/** - * Normal Inline Grammar - */ - -inline.normal = merge({}, inline); - -/** - * Pedantic Inline Grammar - */ - -inline.pedantic = merge({}, inline.normal, { - strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, - em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/, - link: edit(/^!?\[(label)\]\((.*?)\)/) - .replace('label', inline._label) - .getRegex(), - reflink: edit(/^!?\[(label)\]\s*\[([^\]]*)\]/) - .replace('label', inline._label) - .getRegex() -}); - -/** - * GFM Inline Grammar - */ - -inline.gfm = merge({}, inline.normal, { - escape: edit(inline.escape).replace('])', '~|])').getRegex(), - _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/, - url: /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, - _backpedal: /(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/, - del: /^~+(?=\S)([\s\S]*?\S)~+/, - text: edit(inline.text) - .replace(']|', '~]|') - .replace('|$', '|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&\'*+/=?^_`{\\|}~-]+@|$') - .getRegex() -}); - -inline.gfm.url = edit(inline.gfm.url, 'i') - .replace('email', inline.gfm._extended_email) - .getRegex(); -/** - * GFM + Line Breaks Inline Grammar - */ - -inline.breaks = merge({}, inline.gfm, { - br: edit(inline.br).replace('{2,}', '*').getRegex(), - text: edit(inline.gfm.text).replace('{2,}', '*').getRegex() -}); - -/** - * Inline Lexer & Compiler - */ - -function InlineLexer(links, options) { - this.options = options || marked.defaults; - this.links = links; - this.rules = inline.normal; - this.renderer = this.options.renderer || new Renderer(); - this.renderer.options = this.options; - - if (!this.links) { - throw new Error('Tokens array requires a `links` property.'); - } - - if (this.options.pedantic) { - this.rules = inline.pedantic; - } else if (this.options.gfm) { - if (this.options.breaks) { - this.rules = inline.breaks; - } else { - this.rules = inline.gfm; - } - } -} - -/** - * Expose Inline Rules - */ - -InlineLexer.rules = inline; - -/** - * Static Lexing/Compiling Method - */ - -InlineLexer.output = function(src, links, options) { - var inline = new InlineLexer(links, options); - return inline.output(src); -}; - -/** - * Lexing/Compiling - */ - -InlineLexer.prototype.output = function(src) { - var out = '', - link, - text, - href, - title, - cap, - prevCapZero; - - while (src) { - // escape - if (cap = this.rules.escape.exec(src)) { - src = src.substring(cap[0].length); - out += escape(cap[1]); - continue; - } - - // tag - if (cap = this.rules.tag.exec(src)) { - if (!this.inLink && /^/i.test(cap[0])) { - this.inLink = false; - } - if (!this.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(cap[0])) { - this.inRawBlock = true; - } else if (this.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(cap[0])) { - this.inRawBlock = false; - } - - src = src.substring(cap[0].length); - out += this.options.sanitize - ? this.options.sanitizer - ? this.options.sanitizer(cap[0]) - : escape(cap[0]) - : cap[0]; - continue; - } - - // link - if (cap = this.rules.link.exec(src)) { - var lastParenIndex = findClosingBracket(cap[2], '()'); - if (lastParenIndex > -1) { - var removeChars = cap[2].length - lastParenIndex; - cap[2] = cap[2].substring(0, lastParenIndex); - cap[0] = cap[0].substring(0, cap[0].length - removeChars); - } - src = src.substring(cap[0].length); - this.inLink = true; - href = cap[2]; - if (this.options.pedantic) { - link = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(href); - - if (link) { - href = link[1]; - title = link[3]; - } else { - title = ''; - } - } else { - title = cap[3] ? cap[3].slice(1, -1) : ''; - } - href = href.trim().replace(/^<([\s\S]*)>$/, '$1'); - out += this.outputLink(cap, { - href: InlineLexer.escapes(href), - title: InlineLexer.escapes(title) - }); - this.inLink = false; - continue; - } - - // reflink, nolink - if ((cap = this.rules.reflink.exec(src)) - || (cap = this.rules.nolink.exec(src))) { - src = src.substring(cap[0].length); - link = (cap[2] || cap[1]).replace(/\s+/g, ' '); - link = this.links[link.toLowerCase()]; - if (!link || !link.href) { - out += cap[0].charAt(0); - src = cap[0].substring(1) + src; - continue; - } - this.inLink = true; - out += this.outputLink(cap, link); - this.inLink = false; - continue; - } - - // strong - if (cap = this.rules.strong.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.strong(this.output(cap[4] || cap[3] || cap[2] || cap[1])); - continue; - } - - // em - if (cap = this.rules.em.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.em(this.output(cap[6] || cap[5] || cap[4] || cap[3] || cap[2] || cap[1])); - continue; - } - - // code - if (cap = this.rules.code.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.codespan(escape(cap[2].trim(), true)); - continue; - } - - // br - if (cap = this.rules.br.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.br(); - continue; - } - - // del (gfm) - if (cap = this.rules.del.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.del(this.output(cap[1])); - continue; - } - - // autolink - if (cap = this.rules.autolink.exec(src)) { - src = src.substring(cap[0].length); - if (cap[2] === '@') { - text = escape(this.mangle(cap[1])); - href = 'mailto:' + text; - } else { - text = escape(cap[1]); - href = text; - } - out += this.renderer.link(href, null, text); - continue; - } - - // url (gfm) - if (!this.inLink && (cap = this.rules.url.exec(src))) { - if (cap[2] === '@') { - text = escape(cap[0]); - href = 'mailto:' + text; - } else { - // do extended autolink path validation - do { - prevCapZero = cap[0]; - cap[0] = this.rules._backpedal.exec(cap[0])[0]; - } while (prevCapZero !== cap[0]); - text = escape(cap[0]); - if (cap[1] === 'www.') { - href = 'http://' + text; - } else { - href = text; - } - } - src = src.substring(cap[0].length); - out += this.renderer.link(href, null, text); - continue; - } - - // text - if (cap = this.rules.text.exec(src)) { - src = src.substring(cap[0].length); - if (this.inRawBlock) { - out += this.renderer.text(cap[0]); - } else { - out += this.renderer.text(escape(this.smartypants(cap[0]))); - } - continue; - } - - if (src) { - throw new Error('Infinite loop on byte: ' + src.charCodeAt(0)); - } - } - - return out; -}; - -InlineLexer.escapes = function(text) { - return text ? text.replace(InlineLexer.rules._escapes, '$1') : text; -}; - -/** - * Compile Link - */ - -InlineLexer.prototype.outputLink = function(cap, link) { - var href = link.href, - title = link.title ? escape(link.title) : null; - - return cap[0].charAt(0) !== '!' - ? this.renderer.link(href, title, this.output(cap[1])) - : this.renderer.image(href, title, escape(cap[1])); -}; - -/** - * Smartypants Transformations - */ - -InlineLexer.prototype.smartypants = function(text) { - if (!this.options.smartypants) return text; - return text - // em-dashes - .replace(/---/g, '\u2014') - // en-dashes - .replace(/--/g, '\u2013') - // opening singles - .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') - // closing singles & apostrophes - .replace(/'/g, '\u2019') - // opening doubles - .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c') - // closing doubles - .replace(/"/g, '\u201d') - // ellipses - .replace(/\.{3}/g, '\u2026'); -}; - -/** - * Mangle Links - */ - -InlineLexer.prototype.mangle = function(text) { - if (!this.options.mangle) return text; - var out = '', - l = text.length, - i = 0, - ch; - - for (; i < l; i++) { - ch = text.charCodeAt(i); - if (Math.random() > 0.5) { - ch = 'x' + ch.toString(16); - } - out += '&#' + ch + ';'; - } - - return out; -}; - -/** - * Renderer - */ - -function Renderer(options) { - this.options = options || marked.defaults; -} - -Renderer.prototype.code = function(code, infostring, escaped) { - var lang = (infostring || '').match(/\S*/)[0]; - if (this.options.highlight) { - var out = this.options.highlight(code, lang); - if (out != null && out !== code) { - escaped = true; - code = out; - } - } - - if (!lang) { - return '
    '
    -      + (escaped ? code : escape(code, true))
    -      + '
    '; - } - - return '
    '
    -    + (escaped ? code : escape(code, true))
    -    + '
    \n'; -}; - -Renderer.prototype.blockquote = function(quote) { - return '
    \n' + quote + '
    \n'; -}; - -Renderer.prototype.html = function(html) { - return html; -}; - -Renderer.prototype.heading = function(text, level, raw, slugger) { - if (this.options.headerIds) { - return '' - + text - + '\n'; - } - // ignore IDs - return '' + text + '\n'; -}; - -Renderer.prototype.hr = function() { - return this.options.xhtml ? '
    \n' : '
    \n'; -}; - -Renderer.prototype.list = function(body, ordered, start) { - var type = ordered ? 'ol' : 'ul', - startatt = (ordered && start !== 1) ? (' start="' + start + '"') : ''; - return '<' + type + startatt + '>\n' + body + '\n'; -}; - -Renderer.prototype.listitem = function(text) { - return '
  • ' + text + '
  • \n'; -}; - -Renderer.prototype.checkbox = function(checked) { - return ' '; -}; - -Renderer.prototype.paragraph = function(text) { - return '

    ' + text + '

    \n'; -}; - -Renderer.prototype.table = function(header, body) { - if (body) body = '' + body + ''; - - return '\n' - + '\n' - + header - + '\n' - + body - + '
    \n'; -}; - -Renderer.prototype.tablerow = function(content) { - return '\n' + content + '\n'; -}; - -Renderer.prototype.tablecell = function(content, flags) { - var type = flags.header ? 'th' : 'td'; - var tag = flags.align - ? '<' + type + ' align="' + flags.align + '">' - : '<' + type + '>'; - return tag + content + '\n'; -}; - -// span level renderer -Renderer.prototype.strong = function(text) { - return '' + text + ''; -}; - -Renderer.prototype.em = function(text) { - return '' + text + ''; -}; - -Renderer.prototype.codespan = function(text) { - return '' + text + ''; -}; - -Renderer.prototype.br = function() { - return this.options.xhtml ? '
    ' : '
    '; -}; - -Renderer.prototype.del = function(text) { - return '' + text + ''; -}; - -Renderer.prototype.link = function(href, title, text) { - href = cleanUrl(this.options.sanitize, this.options.baseUrl, href); - if (href === null) { - return text; - } - var out = '
    '; - return out; -}; - -Renderer.prototype.image = function(href, title, text) { - href = cleanUrl(this.options.sanitize, this.options.baseUrl, href); - if (href === null) { - return text; - } - - var out = '' + text + '' : '>'; - return out; -}; - -Renderer.prototype.text = function(text) { - return text; -}; - -/** - * TextRenderer - * returns only the textual part of the token - */ - -function TextRenderer() {} - -// no need for block level renderers - -TextRenderer.prototype.strong = -TextRenderer.prototype.em = -TextRenderer.prototype.codespan = -TextRenderer.prototype.del = -TextRenderer.prototype.text = function (text) { - return text; -}; - -TextRenderer.prototype.link = -TextRenderer.prototype.image = function(href, title, text) { - return '' + text; -}; - -TextRenderer.prototype.br = function() { - return ''; -}; - -/** - * Parsing & Compiling - */ - -function Parser(options) { - this.tokens = []; - this.token = null; - this.options = options || marked.defaults; - this.options.renderer = this.options.renderer || new Renderer(); - this.renderer = this.options.renderer; - this.renderer.options = this.options; - this.slugger = new Slugger(); -} - -/** - * Static Parse Method - */ - -Parser.parse = function(src, options) { - var parser = new Parser(options); - return parser.parse(src); -}; - -/** - * Parse Loop - */ - -Parser.prototype.parse = function(src) { - this.inline = new InlineLexer(src.links, this.options); - // use an InlineLexer with a TextRenderer to extract pure text - this.inlineText = new InlineLexer( - src.links, - merge({}, this.options, {renderer: new TextRenderer()}) - ); - this.tokens = src.reverse(); - - var out = ''; - while (this.next()) { - out += this.tok(); - } - - return out; -}; - -/** - * Next Token - */ - -Parser.prototype.next = function() { - return this.token = this.tokens.pop(); -}; - -/** - * Preview Next Token - */ - -Parser.prototype.peek = function() { - return this.tokens[this.tokens.length - 1] || 0; -}; - -/** - * Parse Text Tokens - */ - -Parser.prototype.parseText = function() { - var body = this.token.text; - - while (this.peek().type === 'text') { - body += '\n' + this.next().text; - } - - return this.inline.output(body); -}; - -/** - * Parse Current Token - */ - -Parser.prototype.tok = function() { - switch (this.token.type) { - case 'space': { - return ''; - } - case 'hr': { - return this.renderer.hr(); - } - case 'heading': { - return this.renderer.heading( - this.inline.output(this.token.text), - this.token.depth, - unescape(this.inlineText.output(this.token.text)), - this.slugger); - } - case 'code': { - return this.renderer.code(this.token.text, - this.token.lang, - this.token.escaped); - } - case 'table': { - var header = '', - body = '', - i, - row, - cell, - j; - - // header - cell = ''; - for (i = 0; i < this.token.header.length; i++) { - cell += this.renderer.tablecell( - this.inline.output(this.token.header[i]), - { header: true, align: this.token.align[i] } - ); - } - header += this.renderer.tablerow(cell); - - for (i = 0; i < this.token.cells.length; i++) { - row = this.token.cells[i]; - - cell = ''; - for (j = 0; j < row.length; j++) { - cell += this.renderer.tablecell( - this.inline.output(row[j]), - { header: false, align: this.token.align[j] } - ); - } - - body += this.renderer.tablerow(cell); - } - return this.renderer.table(header, body); - } - case 'blockquote_start': { - body = ''; - - while (this.next().type !== 'blockquote_end') { - body += this.tok(); - } - - return this.renderer.blockquote(body); - } - case 'list_start': { - body = ''; - var ordered = this.token.ordered, - start = this.token.start; - - while (this.next().type !== 'list_end') { - body += this.tok(); - } - - return this.renderer.list(body, ordered, start); - } - case 'list_item_start': { - body = ''; - var loose = this.token.loose; - - if (this.token.task) { - body += this.renderer.checkbox(this.token.checked); - } - - while (this.next().type !== 'list_item_end') { - body += !loose && this.token.type === 'text' - ? this.parseText() - : this.tok(); - } - - return this.renderer.listitem(body); - } - case 'html': { - // TODO parse inline content if parameter markdown=1 - return this.renderer.html(this.token.text); - } - case 'paragraph': { - return this.renderer.paragraph(this.inline.output(this.token.text)); - } - case 'text': { - return this.renderer.paragraph(this.parseText()); - } - default: { - var errMsg = 'Token with "' + this.token.type + '" type was not found.'; - if (this.options.silent) { - console.log(errMsg); - } else { - throw new Error(errMsg); - } - } - } -}; - -/** - * Slugger generates header id - */ - -function Slugger () { - this.seen = {}; -} - -/** - * Convert string to unique id - */ - -Slugger.prototype.slug = function (value) { - var slug = value - .toLowerCase() - .trim() - .replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '') - .replace(/\s/g, '-'); - - if (this.seen.hasOwnProperty(slug)) { - var originalSlug = slug; - do { - this.seen[originalSlug]++; - slug = originalSlug + '-' + this.seen[originalSlug]; - } while (this.seen.hasOwnProperty(slug)); - } - this.seen[slug] = 0; - - return slug; -}; - -/** - * Helpers - */ - -function escape(html, encode) { - if (encode) { - if (escape.escapeTest.test(html)) { - return html.replace(escape.escapeReplace, function (ch) { return escape.replacements[ch]; }); - } - } else { - if (escape.escapeTestNoEncode.test(html)) { - return html.replace(escape.escapeReplaceNoEncode, function (ch) { return escape.replacements[ch]; }); - } - } - - return html; -} - -escape.escapeTest = /[&<>"']/; -escape.escapeReplace = /[&<>"']/g; -escape.replacements = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' -}; - -escape.escapeTestNoEncode = /[<>"']|&(?!#?\w+;)/; -escape.escapeReplaceNoEncode = /[<>"']|&(?!#?\w+;)/g; - -function unescape(html) { - // explicitly match decimal, hex, and named HTML entities - return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, function(_, n) { - n = n.toLowerCase(); - if (n === 'colon') return ':'; - if (n.charAt(0) === '#') { - return n.charAt(1) === 'x' - ? String.fromCharCode(parseInt(n.substring(2), 16)) - : String.fromCharCode(+n.substring(1)); - } - return ''; - }); -} - -function edit(regex, opt) { - regex = regex.source || regex; - opt = opt || ''; - return { - replace: function(name, val) { - val = val.source || val; - val = val.replace(/(^|[^\[])\^/g, '$1'); - regex = regex.replace(name, val); - return this; - }, - getRegex: function() { - return new RegExp(regex, opt); - } - }; -} - -function cleanUrl(sanitize, base, href) { - if (sanitize) { - try { - var prot = decodeURIComponent(unescape(href)) - .replace(/[^\w:]/g, '') - .toLowerCase(); - } catch (e) { - return null; - } - if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) { - return null; - } - } - if (base && !originIndependentUrl.test(href)) { - href = resolveUrl(base, href); - } - try { - href = encodeURI(href).replace(/%25/g, '%'); - } catch (e) { - return null; - } - return href; -} - -function resolveUrl(base, href) { - if (!baseUrls[' ' + base]) { - // we can ignore everything in base after the last slash of its path component, - // but we might need to add _that_ - // https://tools.ietf.org/html/rfc3986#section-3 - if (/^[^:]+:\/*[^/]*$/.test(base)) { - baseUrls[' ' + base] = base + '/'; - } else { - baseUrls[' ' + base] = rtrim(base, '/', true); - } - } - base = baseUrls[' ' + base]; - - if (href.slice(0, 2) === '//') { - return base.replace(/:[\s\S]*/, ':') + href; - } else if (href.charAt(0) === '/') { - return base.replace(/(:\/*[^/]*)[\s\S]*/, '$1') + href; - } else { - return base + href; - } -} -var baseUrls = {}; -var originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i; - -function noop() {} -noop.exec = noop; - -function merge(obj) { - var i = 1, - target, - key; - - for (; i < arguments.length; i++) { - target = arguments[i]; - for (key in target) { - if (Object.prototype.hasOwnProperty.call(target, key)) { - obj[key] = target[key]; - } - } - } - - return obj; -} - -function splitCells(tableRow, count) { - // ensure that every cell-delimiting pipe has a space - // before it to distinguish it from an escaped pipe - var row = tableRow.replace(/\|/g, function (match, offset, str) { - var escaped = false, - curr = offset; - while (--curr >= 0 && str[curr] === '\\') escaped = !escaped; - if (escaped) { - // odd number of slashes means | is escaped - // so we leave it alone - return '|'; - } else { - // add space before unescaped | - return ' |'; - } - }), - cells = row.split(/ \|/), - i = 0; - - if (cells.length > count) { - cells.splice(count); - } else { - while (cells.length < count) cells.push(''); - } - - for (; i < cells.length; i++) { - // leading or trailing whitespace is ignored per the gfm spec - cells[i] = cells[i].trim().replace(/\\\|/g, '|'); - } - return cells; -} - -// Remove trailing 'c's. Equivalent to str.replace(/c*$/, ''). -// /c*$/ is vulnerable to REDOS. -// invert: Remove suffix of non-c chars instead. Default falsey. -function rtrim(str, c, invert) { - if (str.length === 0) { - return ''; - } - - // Length of suffix matching the invert condition. - var suffLen = 0; - - // Step left until we fail to match the invert condition. - while (suffLen < str.length) { - var currChar = str.charAt(str.length - suffLen - 1); - if (currChar === c && !invert) { - suffLen++; - } else if (currChar !== c && invert) { - suffLen++; - } else { - break; - } - } - - return str.substr(0, str.length - suffLen); -} - -function findClosingBracket(str, b) { - if (str.indexOf(b[1]) === -1) { - return -1; - } - var level = 0; - for (var i = 0; i < str.length; i++) { - if (str[i] === '\\') { - i++; - } else if (str[i] === b[0]) { - level++; - } else if (str[i] === b[1]) { - level--; - if (level < 0) { - return i; - } - } - } - return -1; -} - -/** - * Marked - */ - -function marked(src, opt, callback) { - // throw error in case of non string input - if (typeof src === 'undefined' || src === null) { - throw new Error('marked(): input parameter is undefined or null'); - } - if (typeof src !== 'string') { - throw new Error('marked(): input parameter is of type ' - + Object.prototype.toString.call(src) + ', string expected'); - } - - if (callback || typeof opt === 'function') { - if (!callback) { - callback = opt; - opt = null; - } - - opt = merge({}, marked.defaults, opt || {}); - - var highlight = opt.highlight, - tokens, - pending, - i = 0; - - try { - tokens = Lexer.lex(src, opt); - } catch (e) { - return callback(e); - } - - pending = tokens.length; - - var done = function(err) { - if (err) { - opt.highlight = highlight; - return callback(err); - } - - var out; - - try { - out = Parser.parse(tokens, opt); - } catch (e) { - err = e; - } - - opt.highlight = highlight; - - return err - ? callback(err) - : callback(null, out); - }; - - if (!highlight || highlight.length < 3) { - return done(); - } - - delete opt.highlight; - - if (!pending) return done(); - - for (; i < tokens.length; i++) { - (function(token) { - if (token.type !== 'code') { - return --pending || done(); - } - return highlight(token.text, token.lang, function(err, code) { - if (err) return done(err); - if (code == null || code === token.text) { - return --pending || done(); - } - token.text = code; - token.escaped = true; - --pending || done(); - }); - })(tokens[i]); - } - - return; - } - try { - if (opt) opt = merge({}, marked.defaults, opt); - return Parser.parse(Lexer.lex(src, opt), opt); - } catch (e) { - e.message += '\nPlease report this to https://github.com/markedjs/marked.'; - if ((opt || marked.defaults).silent) { - return '

    An error occurred:

    '
    -        + escape(e.message + '', true)
    -        + '
    '; - } - throw e; - } -} - -/** - * Options - */ - -marked.options = -marked.setOptions = function(opt) { - merge(marked.defaults, opt); - return marked; -}; - -marked.getDefaults = function () { - return { - baseUrl: null, - breaks: false, - gfm: true, - headerIds: true, - headerPrefix: '', - highlight: null, - langPrefix: 'language-', - mangle: true, - pedantic: false, - renderer: new Renderer(), - sanitize: false, - sanitizer: null, - silent: false, - smartLists: false, - smartypants: false, - tables: true, - xhtml: false - }; -}; - -marked.defaults = marked.getDefaults(); - -/** - * Expose - */ - -marked.Parser = Parser; -marked.parser = Parser.parse; - -marked.Renderer = Renderer; -marked.TextRenderer = TextRenderer; - -marked.Lexer = Lexer; -marked.lexer = Lexer.lex; - -marked.InlineLexer = InlineLexer; -marked.inlineLexer = InlineLexer.output; - -marked.Slugger = Slugger; - -marked.parse = marked; - -if (typeof module !== 'undefined' && typeof exports === 'object') { - module.exports = marked; -} else if (typeof define === 'function' && define.amd) { - define(function() { return marked; }); -} else { - root.marked = marked; -} -})(this || (typeof window !== 'undefined' ? window : global)); - -/*! UIkit 2.27.5 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ -(function(addon) { - - var component; - - if (window.UIkit2) { - component = addon(UIkit2); - } - - if (typeof define == 'function' && define.amd) { - define('uikit-htmleditor', ['uikit'], function(){ - return component || addon(UIkit2); - }); - } - -})(function(UI) { - - "use strict"; - - var editors = []; - - UI.component('htmleditor', { - - defaults: { - iframe : false, - mode : 'split', - markdown : false, - autocomplete : true, - enablescripts: false, - height : 500, - maxsplitsize : 1000, - codemirror : { mode: 'htmlmixed', lineWrapping: true, dragDrop: false, autoCloseTags: true, matchTags: true, autoCloseBrackets: true, matchBrackets: true, indentUnit: 4, indentWithTabs: false, tabSize: 4, hintOptions: {completionSingle:false} }, - toolbar : [ 'bold', 'italic', 'strike', 'link', 'image', 'blockquote', 'listUl', 'listOl' ], - lblPreview : 'Preview', - lblCodeview : 'HTML', - lblMarkedview: 'Markdown' - }, - - boot: function() { - - // init code - UI.ready(function(context) { - - UI.$('textarea[data-uk-htmleditor]', context).each(function() { - - var editor = UI.$(this); - - if (!editor.data('htmleditor')) { - UI.htmleditor(editor, UI.Utils.options(editor.attr('data-uk-htmleditor'))); - } - }); - }); - }, - - init: function() { - - var $this = this, tpl = UI.components.htmleditor.template; - - this.CodeMirror = this.options.CodeMirror || CodeMirror; - this.buttons = {}; - - tpl = tpl.replace(/\{:lblPreview}/g, this.options.lblPreview); - tpl = tpl.replace(/\{:lblCodeview}/g, this.options.lblCodeview); - - this.htmleditor = UI.$(tpl); - this.content = this.htmleditor.find('.uk-htmleditor-content'); - this.toolbar = this.htmleditor.find('.uk-htmleditor-toolbar'); - this.preview = this.htmleditor.find('.uk-htmleditor-preview').children().eq(0); - this.code = this.htmleditor.find('.uk-htmleditor-code'); - - this.element.before(this.htmleditor).appendTo(this.code); - this.editor = this.CodeMirror.fromTextArea(this.element[0], this.options.codemirror); - this.editor.htmleditor = this; - this.editor.on('change', UI.Utils.debounce(function() { $this.render(); }, 150)); - this.editor.on('change', function() { - $this.editor.save(); - $this.element.trigger('input'); - }); - this.code.find('.CodeMirror').css('height', this.options.height); - - // iframe mode? - if (this.options.iframe) { - - this.iframe = UI.$(''); - this.preview.append(this.iframe); - - // must open and close document object to start using it! - this.iframe[0].contentWindow.document.open(); - this.iframe[0].contentWindow.document.close(); - - this.preview.container = UI.$(this.iframe[0].contentWindow.document).find('body'); - - // append custom stylesheet - if (typeof(this.options.iframe) === 'string') { - this.preview.container.parent().append(''); - } - - } else { - this.preview.container = this.preview; - } - - UI.$win.on('resize load', UI.Utils.debounce(function() { $this.fit(); }, 200)); - - var previewContainer = this.iframe ? this.preview.container:$this.preview.parent(), - codeContent = this.code.find('.CodeMirror-sizer'), - codeScroll = this.code.find('.CodeMirror-scroll').on('scroll', UI.Utils.debounce(function() { - - if ($this.htmleditor.attr('data-mode') == 'tab') return; - - // calc position - var codeHeight = codeContent.height() - codeScroll.height(), - previewHeight = previewContainer[0].scrollHeight - ($this.iframe ? $this.iframe.height() : previewContainer.height()), - ratio = previewHeight / codeHeight, - previewPosition = codeScroll.scrollTop() * ratio; - - // apply new scroll - previewContainer.scrollTop(previewPosition); - - }, 10)); - - this.htmleditor.on('click', '.uk-htmleditor-button-code, .uk-htmleditor-button-preview', function(e) { - - e.preventDefault(); - - if ($this.htmleditor.attr('data-mode') == 'tab') { - - $this.htmleditor.find('.uk-htmleditor-button-code, .uk-htmleditor-button-preview').removeClass('uk-active').filter(this).addClass('uk-active'); - - $this.activetab = UI.$(this).hasClass('uk-htmleditor-button-code') ? 'code' : 'preview'; - $this.htmleditor.attr('data-active-tab', $this.activetab); - $this.editor.refresh(); - } - }); - - // toolbar actions - this.htmleditor.on('click', 'a[data-htmleditor-button]', function() { - - if (!$this.code.is(':visible')) return; - - $this.trigger('action.' + UI.$(this).data('htmleditor-button'), [$this.editor]); - }); - - this.preview.parent().css('height', this.code.height()); - - // autocomplete - if (this.options.autocomplete && this.CodeMirror.showHint && this.CodeMirror.hint && this.CodeMirror.hint.html) { - - this.editor.on('inputRead', UI.Utils.debounce(function() { - var doc = $this.editor.getDoc(), POS = doc.getCursor(), mode = $this.CodeMirror.innerMode($this.editor.getMode(), $this.editor.getTokenAt(POS).state).mode.name; - - if (mode == 'xml') { //html depends on xml - - var cur = $this.editor.getCursor(), token = $this.editor.getTokenAt(cur); - - if (token.string.charAt(0) == '<' || token.type == 'attribute') { - $this.CodeMirror.showHint($this.editor, $this.CodeMirror.hint.html, { completeSingle: false }); - } - } - }, 100)); - } - - this.debouncedRedraw = UI.Utils.debounce(function () { $this.redraw(); }, 5); - - this.on('init.uk.component', function() { - $this.debouncedRedraw(); - }); - - this.element.attr('data-uk-check-display', 1).on('display.uk.check', function(e) { - if (this.htmleditor.is(":visible")) this.fit(); - }.bind(this)); - - editors.push(this); - }, - - addButton: function(name, button) { - this.buttons[name] = button; - }, - - addButtons: function(buttons) { - UI.$.extend(this.buttons, buttons); - }, - - replaceInPreview: function(regexp, callback) { - - var editor = this.editor, results = [], value = editor.getValue(), offset = -1, index = 0; - - this.currentvalue = this.currentvalue.replace(regexp, function() { - - offset = value.indexOf(arguments[0], ++offset); - - var match = { - matches: arguments, - from : translateOffset(offset), - to : translateOffset(offset + arguments[0].length), - replace: function(value) { - editor.replaceRange(value, match.from, match.to); - }, - inRange: function(cursor) { - - if (cursor.line === match.from.line && cursor.line === match.to.line) { - return cursor.ch >= match.from.ch && cursor.ch < match.to.ch; - } - - return (cursor.line === match.from.line && cursor.ch >= match.from.ch) || - (cursor.line > match.from.line && cursor.line < match.to.line) || - (cursor.line === match.to.line && cursor.ch < match.to.ch); - } - }; - - var result = typeof(callback) === 'string' ? callback : callback(match, index); - - if (!result && result !== '') { - return arguments[0]; - } - - index++; - - results.push(match); - return result; - }); - - function translateOffset(offset) { - var result = editor.getValue().substring(0, offset).split('\n'); - return { line: result.length - 1, ch: result[result.length - 1].length } - } - - return results; - }, - - _buildtoolbar: function() { - - if (!(this.options.toolbar && this.options.toolbar.length)) return; - - var $this = this, bar = []; - - this.toolbar.empty(); - - this.options.toolbar.forEach(function(button) { - if (!$this.buttons[button]) return; - - var title = $this.buttons[button].title ? $this.buttons[button].title : button; - - bar.push('
  • '+$this.buttons[button].label+'
  • '); - }); - - this.toolbar.html(bar.join('\n')); - }, - - fit: function() { - - var mode = this.options.mode; - - if (mode == 'split' && this.htmleditor.width() < this.options.maxsplitsize) { - mode = 'tab'; - } - - if (mode == 'tab') { - if (!this.activetab) { - this.activetab = 'code'; - this.htmleditor.attr('data-active-tab', this.activetab); - } - - this.htmleditor.find('.uk-htmleditor-button-code, .uk-htmleditor-button-preview').removeClass('uk-active') - .filter(this.activetab == 'code' ? '.uk-htmleditor-button-code' : '.uk-htmleditor-button-preview') - .addClass('uk-active'); - } - - this.editor.refresh(); - this.preview.parent().css('height', this.code.height()); - - this.htmleditor.attr('data-mode', mode); - }, - - redraw: function() { - this._buildtoolbar(); - this.render(); - this.fit(); - }, - - getMode: function() { - return this.editor.getOption('mode'); - }, - - getCursorMode: function() { - var param = { mode: 'html'}; - this.trigger('cursorMode', [param]); - return param.mode; - }, - - render: function() { - - this.currentvalue = this.editor.getValue(); - - if (!this.options.enablescripts) { - this.currentvalue = this.currentvalue.replace(/<(script|style)\b[^<]*(?:(?!<\/(script|style)>)<[^<]*)*<\/(script|style)>/img, ''); - } - - // empty code - if (!this.currentvalue) { - - this.element.val(''); - this.preview.container.html(''); - - return; - } - - this.trigger('render', [this]); - this.trigger('renderLate', [this]); - - this.preview.container.html(this.currentvalue); - }, - - addShortcut: function(name, callback) { - var map = {}; - if (!UI.$.isArray(name)) { - name = [name]; - } - - name.forEach(function(key) { - map[key] = callback; - }); - - this.editor.addKeyMap(map); - - return map; - }, - - addShortcutAction: function(action, shortcuts) { - var editor = this; - this.addShortcut(shortcuts, function() { - editor.element.trigger('action.' + action, [editor.editor]); - }); - }, - - replaceSelection: function(replace) { - - var text = this.editor.getSelection(); - - if (!text.length) { - - var cur = this.editor.getCursor(), - curLine = this.editor.getLine(cur.line), - start = cur.ch, - end = start; - - while (end < curLine.length && /[\w$]+/.test(curLine.charAt(end))) ++end; - while (start && /[\w$]+/.test(curLine.charAt(start - 1))) --start; - - var curWord = start != end && curLine.slice(start, end); - - if (curWord) { - this.editor.setSelection({ line: cur.line, ch: start}, { line: cur.line, ch: end }); - text = curWord; - } - } - - var html = replace.replace('$1', text); - - this.editor.replaceSelection(html, 'end'); - this.editor.focus(); - }, - - replaceLine: function(replace) { - var pos = this.editor.getDoc().getCursor(), - text = this.editor.getLine(pos.line), - html = replace.replace('$1', text); - - this.editor.replaceRange(html , { line: pos.line, ch: 0 }, { line: pos.line, ch: text.length }); - this.editor.setCursor({ line: pos.line, ch: html.length }); - this.editor.focus(); - }, - - save: function() { - this.editor.save(); - } - }); - - - UI.components.htmleditor.template = [ - '
    ', - '
    ', - '
      ', - '
      ', - '', - '
      ', - '
      ', - '
      ', - '
      ', - '
      ', - '
      ', - '
      ' - ].join(''); - - - UI.plugin('htmleditor', 'base', { - - init: function(editor) { - - editor.addButtons({ - - fullscreen: { - title : 'Fullscreen', - label : '' - }, - bold : { - title : 'Bold', - label : '' - }, - italic : { - title : 'Italic', - label : '' - }, - strike : { - title : 'Strikethrough', - label : '' - }, - blockquote : { - title : 'Blockquote', - label : '' - }, - link : { - title : 'Link', - label : '' - }, - image : { - title : 'Image', - label : '' - }, - listUl : { - title : 'Unordered List', - label : '' - }, - listOl : { - title : 'Ordered List', - label : '' - } - - }); - - addAction('bold', '$1'); - addAction('italic', '$1'); - addAction('strike', '$1'); - addAction('blockquote', '

      $1

      ', 'replaceLine'); - addAction('link', '$1'); - addAction('image', '$1'); - - var listfn = function(tag) { - if (editor.getCursorMode() == 'html') { - - tag = tag || 'ul'; - - var cm = editor.editor, - doc = cm.getDoc(), - pos = doc.getCursor(true), - posend = doc.getCursor(false), - im = CodeMirror.innerMode(cm.getMode(), cm.getTokenAt(cm.getCursor()).state), - inList = im && im.state && im.state.context && ['ul','ol'].indexOf(im.state.context.tagName) != -1; - - for (var i=pos.line; i<(posend.line+1);i++) { - cm.replaceRange('
    • '+cm.getLine(i)+'
    • ', { line: i, ch: 0 }, { line: i, ch: cm.getLine(i).length }); - } - - if (!inList) { - cm.replaceRange('<'+tag+'>'+"\n"+cm.getLine(pos.line), { line: pos.line, ch: 0 }, { line: pos.line, ch: cm.getLine(pos.line).length }); - cm.replaceRange(cm.getLine((posend.line+1))+"\n"+'', { line: (posend.line+1), ch: 0 }, { line: (posend.line+1), ch: cm.getLine((posend.line+1)).length }); - cm.setCursor({ line: posend.line+1, ch: cm.getLine(posend.line+1).length }); - } else { - cm.setCursor({ line: posend.line, ch: cm.getLine(posend.line).length }); - } - - cm.focus(); - } - }; - - editor.on('action.listUl', function() { - listfn('ul'); - }); - - editor.on('action.listOl', function() { - listfn('ol'); - }); - - editor.htmleditor.on('click', 'a[data-htmleditor-button="fullscreen"]', function() { - - editor.htmleditor.toggleClass('uk-htmleditor-fullscreen'); - - var wrap = editor.editor.getWrapperElement(); - - if (editor.htmleditor.hasClass('uk-htmleditor-fullscreen')) { - - var fixedParent = false, parents = editor.htmleditor.parents().each(function(){ - if (UI.$(this).css('position')=='fixed' && !UI.$(this).is('html')) { - fixedParent = UI.$(this); - } - }); - - editor.htmleditor.data('fixedParents', false); - - if (fixedParent) { - - var transformed = []; - - fixedParent = fixedParent.parent().find(parents).each(function(){ - - if (UI.$(this).css('transform') != 'none') { - transformed.push(UI.$(this).data('transform-reset', { - 'transform': this.style.transform, - '-webkit-transform': this.style.webkitTransform, - '-webkit-transition':this.style.webkitTransition, - 'transition':this.style.transition - }).css({ - 'transform': 'none', - '-webkit-transform': 'none', - '-webkit-transition':'none', - 'transition':'none' - })); - } - }); - - editor.htmleditor.data('fixedParents', transformed); - } - - editor.editor.state.fullScreenRestore = {scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset, width: wrap.style.width, height: wrap.style.height}; - wrap.style.width = ''; - wrap.style.height = editor.content.height()+'px'; - document.documentElement.style.overflow = 'hidden'; - - } else { - - document.documentElement.style.overflow = ''; - var info = editor.editor.state.fullScreenRestore; - wrap.style.width = info.width; wrap.style.height = info.height; - window.scrollTo(info.scrollLeft, info.scrollTop); - - if (editor.htmleditor.data('fixedParents')) { - editor.htmleditor.data('fixedParents').forEach(function(parent){ - parent.css(parent.data('transform-reset')); - }); - } - } - - setTimeout(function() { - editor.fit(); - UI.$win.trigger('resize'); - }, 50); - }); - - editor.addShortcut(['Ctrl-S', 'Cmd-S'], function() { editor.element.trigger('htmleditor-save', [editor]); }); - editor.addShortcutAction('bold', ['Ctrl-B', 'Cmd-B']); - - function addAction(name, replace, mode) { - editor.on('action.'+name, function() { - if (editor.getCursorMode() == 'html') { - editor[mode == 'replaceLine' ? 'replaceLine' : 'replaceSelection'](replace); - } - }); - } - } - }); - - UI.plugin('htmleditor', 'markdown', { - - init: function(editor) { - - var parser = editor.options.mdparser || window.marked || null; - - if (!parser) return; - - if (editor.options.markdown) { - enableMarkdown(); - } - - addAction('bold', '**$1**'); - addAction('italic', '*$1*'); - addAction('strike', '~~$1~~'); - addAction('blockquote', '> $1', 'replaceLine'); - addAction('link', '[$1](http://)'); - addAction('image', '![$1](http://)'); - - editor.on('action.listUl', function() { - - if (editor.getCursorMode() == 'markdown') { - - var cm = editor.editor, - pos = cm.getDoc().getCursor(true), - posend = cm.getDoc().getCursor(false); - - for (var i=pos.line; i<(posend.line+1);i++) { - cm.replaceRange('* '+cm.getLine(i), { line: i, ch: 0 }, { line: i, ch: cm.getLine(i).length }); - } - - cm.setCursor({ line: posend.line, ch: cm.getLine(posend.line).length }); - cm.focus(); - } - }); - - editor.on('action.listOl', function() { - - if (editor.getCursorMode() == 'markdown') { - - var cm = editor.editor, - pos = cm.getDoc().getCursor(true), - posend = cm.getDoc().getCursor(false), - prefix = 1; - - if (pos.line > 0) { - var prevline = cm.getLine(pos.line-1), matches; - - if(matches = prevline.match(/^(\d+)\./)) { - prefix = Number(matches[1])+1; - } - } - - for (var i=pos.line; i<(posend.line+1);i++) { - cm.replaceRange(prefix+'. '+cm.getLine(i), { line: i, ch: 0 }, { line: i, ch: cm.getLine(i).length }); - prefix++; - } - - cm.setCursor({ line: posend.line, ch: cm.getLine(posend.line).length }); - cm.focus(); - } - }); - - editor.on('renderLate', function() { - if (editor.editor.options.mode == 'gfm') { - editor.currentvalue = parser(editor.currentvalue); - } - }); - - editor.on('cursorMode', function(e, param) { - if (editor.editor.options.mode == 'gfm') { - var pos = editor.editor.getDoc().getCursor(); - if (!editor.editor.getTokenAt(pos).state.base.htmlState) { - param.mode = 'markdown'; - } - } - }); - - UI.$.extend(editor, { - - enableMarkdown: function() { - enableMarkdown(); - this.render(); - }, - disableMarkdown: function() { - this.editor.setOption('mode', 'htmlmixed'); - this.htmleditor.find('.uk-htmleditor-button-code a').html(this.options.lblCodeview); - this.render(); - } - - }); - - // switch markdown mode on event - editor.on({ - enableMarkdown : function() { editor.enableMarkdown(); }, - disableMarkdown : function() { editor.disableMarkdown(); } - }); - - function enableMarkdown() { - editor.editor.setOption('mode', 'gfm'); - editor.htmleditor.find('.uk-htmleditor-button-code a').html(editor.options.lblMarkedview); - } - - function addAction(name, replace, mode) { - editor.on('action.'+name, function() { - if (editor.getCursorMode() == 'markdown') { - editor[mode == 'replaceLine' ? 'replaceLine' : 'replaceSelection'](replace); - } - }); - } - } - }); - - return UI.htmleditor; -}); diff --git a/src/assets/theme-assets/js/uikit_htmleditor_custom.min.js b/src/assets/theme-assets/js/uikit_htmleditor_custom.min.js deleted file mode 100644 index b6282f1..0000000 --- a/src/assets/theme-assets/js/uikit_htmleditor_custom.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.CodeMirror=t()}(this,function(){"use strict";var e=navigator.userAgent,t=navigator.platform,g=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),n=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),i=/Edge\/(\d+)/.exec(e),x=r||n||i,w=x&&(r?document.documentMode||6:+(i||n)[1]),b=!i&&/WebKit\//.test(e),o=b&&/Qt\/\d+\.\d+/.test(e),l=!i&&/Chrome\//.test(e),m=/Opera\//.test(e),a=/Apple Computer/.test(navigator.vendor),s=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),u=/PhantomJS/.test(e),c=!i&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),h=/Android/.test(e),d=c||h||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),k=c||/Mac/.test(t),f=/\bCrOS\b/.test(e),p=/win/i.test(t),v=m&&e.match(/Version\/(\d*\.\d*)/);v&&(v=Number(v[1])),v&&15<=v&&(b=!(m=!1));var y=k&&(o||m&&(null==v||v<12.11)),_=g||x&&9<=w;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,L=function(e,t){var r=e.className,n=C(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function M(e){for(var t=e.childNodes.length;0=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t=e.first&&to?me(o,ae(e,o).text.length):(n=ae(e,(r=t).line).text.length,null==(i=r.ch)||n=t:o.to>t);(n||(n=[])).push(new Me(l,o.from,s?null:o.to))}}return n}(r,i,l),a=function(e,t,r){var n;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(l.inclusiveLeft?o.from<=t:o.fromt)&&(!r||ze(r,o.marker)<0)&&(r=o.marker)}return r}function Re(e,t,r,n,i){var o=ae(e,t),l=Le&&o.markedSpans;if(l)for(var s=0;se.lastLine())return t;var r,n=ae(e,t);if(!Ue(e,n))return t;for(;r=He(n);)n=r.find(1,!0).line;return de(n)+1}function Ue(e,t){var r=Le&&t.markedSpans;if(r)for(var n=void 0,i=0;ir.maxLineLength&&(r.maxLineLength=t,r.maxLine=e)})}var Xe=null;function Ye(e,t,r){var n;Xe=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:Xe=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:Xe=i)}return null!=n?n:Xe}var Qe=function(){var W="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",P="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var H=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,I=/[stwN]/,R=/[LRr]/,B=/[Lb1n]/,$=/[1n]/;function j(e,t,r){this.level=e,this.from=t,this.to=r}return function(e,t){var r="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!H.test(e))return!1;for(var n,i=e.length,o=[],l=0;l=this.string.length},Et.prototype.sol=function(){return this.pos==this.lineStart},Et.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Et.prototype.next=function(){if(this.post},Et.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Et.prototype.skipToEnd=function(){this.pos=this.string.length},Et.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(-1e.options.maxHighlightLength&&Ft(e.doc.mode,n.state),o=Wt(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Ht(r,n,e){var t=r.doc,i=r.display;if(!t.mode.startState)return new zt(t,!0,n);var o=function(e,t,r){for(var n,i,o=e.doc,l=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;lt.first&&ae(t,o-1).stateAfter,s=l?zt.fromSaved(t,l,o):new zt(t,Nt(t.mode),o);return t.iter(o,n,function(e){It(r,e.text,s);var t=s.line;e.stateAfter=t==n-1||t%5==0||t>=i.viewFrom&&tt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}zt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},zt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},zt.prototype.nextLine=function(){this.line++,0e.options.maxHighlightLength?(s=!1,l&&It(e,t,n,h.pos),h.pos=t.length,null):Ut(Bt(r,h,n.state,d),o),d){var f=d[0].name;f&&(a="m-"+(a?f+" "+a:f))}if(!s||c!=a){for(;us&&u.from<=s);c++);if(u.to>=a)return h(e,t,r,n,i,o,l);h(e,t.slice(0,u.to-s),r,n,null,o,l),n=null,t=t.slice(u.to-s),s=u.to}}}function tr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function rr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,h,d,f=i.length,p=0,g=1,m="",v=0;;){if(v==p){a=u=c=s="",h=d=null,v=1/0;for(var y=[],b=void 0,k=0;kp||w.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,u=""),w.className&&(a+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&x.from==p&&(c+=" "+w.startStyle),w.endStyle&&x.to==v&&(b||(b=[])).push(w.endStyle,x.to),w.title&&((d||(d={})).title=w.title),w.attributes)for(var _ in w.attributes)(d||(d={}))[_]=w.attributes[_];w.collapsed&&(!h||ze(h.marker,w)<0)&&(h=x)}else x.from>p&&v>x.from&&(v=x.from)}if(b)for(var C=0;Cr)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Tr(e,t,r,n){return Fr(e,Dr(e,t),r,n)}function Ar(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&tt)&&(i=(o=a-s)-1,a<=t&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==a-s)for(;u=o.text.length?(t=o.text.length,r="before"):t<=0&&(t=0,r="after"),!u)return a("before"==r?t-1:t,"before"==r);function c(e,t,r){return a(r?e-1:e,1==u[t].level!=r)}var h=Ye(u,t,r),d=Xe,f=c(t,h,"before"==r);return null!=d&&(f.other=c(t,d,"before"!=r)),f}function Vr(e,t){var r=0;t=_e(e.doc,t),e.options.lineWrapping||(r=en(e.display)*t.ch);var n=ae(e.doc,t.line),i=Ge(n)+xr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Gr(e,t,r,n,i){var o=me(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function Kr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return Gr(n.first,0,null,!0,-1);var i=fe(n,r),o=n.first+n.size-1;if(on},o,i)}}function Xr(e,t,r,n){return r||(r=Dr(e,t)),Zr(e,t,r,Br(e,t,Fr(e,r,n),"line").top)}function Yr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Qr(r,e,t,n,i){i-=Ge(e);var o=Dr(r,e),l=Rr(e),s=0,a=e.text.length,u=!0,c=Je(e,r.doc.direction);if(c){var h=(r.options.lineWrapping?function(e,t,r,n,i,o,l){var s=Zr(e,t,n,l),a=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,h=null,d=0;d=u||f.to<=a)){var p=1!=f.level,g=Fr(e,n,p?Math.min(u,f.to)-1:Math.max(a,f.from)).right,m=gu&&(c={from:c.from,to:u,level:c.level});return c}:function(n,i,o,l,s,a,u){var e=le(function(e){var t=s[e],r=1!=t.level;return Yr(Ur(n,me(o,r?t.to:t.from,r?"before":"after"),"line",i,l),a,u,!0)},0,s.length-1),t=s[e];if(0u&&(t=s[e-1])}return t})(r,e,t,o,c,n,i);s=(u=1!=h.level)?h.from:h.to-1,a=u?h.to:h.from-1}var d,f,p=null,g=null,m=le(function(e){var t=Fr(r,o,e);return t.top+=l,t.bottom+=l,!!Yr(t,n,i,!1)&&(t.top<=i&&t.left<=n&&(p=e,g=t),!0)},s,a),v=!1;if(g){var y=n-g.left=k.bottom}return Gr(t,m=oe(e.text,m,1),f,v,n-d)}function Jr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Or){Or=D("pre");for(var t=0;t<49;++t)Or.appendChild(document.createTextNode("x")),Or.appendChild(D("br"));Or.appendChild(document.createTextNode("x"))}T(e.measure,Or);var r=Or.offsetHeight/50;return 3=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n=e.display.viewTo||s.to().linet||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}(S,y||0,null==b?w:b,function(e,t,r,n){var i="ltr"==r,o=_(e,i?"left":"right"),l=_(t-1,i?"right":"left"),s=null==y&&0==e,a=null==b&&t==w,u=0==n,c=!S||n==S.length-1;if(l.top-o.top<=3){var h=(T?a:s)&&c,d=(T?s:a)&&u?L:(i?o:l).left,f=h?M:(i?l:o).right;A(d,o.top,f-d,o.bottom)}else{var p,g,m,v;v=i?(p=T&&s&&u?L:o.left,g=T?M:C(e,r,"before"),m=T?L:C(t,r,"after"),T&&a&&c?M:l.right):(p=T?C(e,r,"before"):L,g=!T&&s&&u?M:o.right,m=!T&&a&&c?L:l.left,T?C(t,r,"after"):M),A(p,o.top,g-p,o.bottom),o.bottome.display.sizerWidth){var d=Math.ceil(s/en(e.display));d>e.display.maxLineLength&&(e.display.maxLineLength=d,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function bn(e){if(e.widgets)for(var t=0;t=l&&(o=fe(t,Ge(ae(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function xn(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=rn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;lo&&(t.bottom=t.top+o);var s=e.doc.height+wr(r),a=t.tops-n;if(t.topi+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,d=Sr(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),f=t.right-t.left>d;return f&&(t.right=t.left+d),t.left<10?l.scrollLeft=0:t.leftd+h-3&&(l.scrollLeft=t.right+(f?0:10)-d),l}function Cn(e,t){null!=t&&(Mn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Sn(e){Mn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ln(e,t,r){null==t&&null==r||Mn(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function Mn(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Tn(e,Vr(e,t.from),Vr(e,t.to),t.margin))}function Tn(e,t,r,n){var i=_n(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Ln(e,i.scrollLeft,i.scrollTop)}function An(e,t){Math.abs(e.doc.scrollTop-t)<2||(g||li(e,{top:t}),Dn(e,t,!0),g&&li(e),ti(e,100))}function Dn(e,t,r){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Fn(e,t,r,n){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,xn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function On(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+wr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Cr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Nn=function(e,t,r){this.cm=r;var n=this.vert=D("div",[D("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=D("div",[D("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),tt(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),tt(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,x&&w<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Nn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&0=i.viewTo)||i.maxLineChanged&&n.options.lineWrapping,e.update=e.mustUpdate&&new ni(n,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function $n(e){var t=e.cm,r=t.display;e.updatedDisplay&&yn(t),e.barMeasure=On(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Tr(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Cr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Sr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function jn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!u){var o=D("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-xr(e.display))+"px;\n height: "+(t.bottom-t.top+Cr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==(t=t.ch?me(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?me(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var l=!1,s=Ur(e,t),a=r&&r!=t?Ur(e,r):s,u=_n(e,i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-n,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+n}),c=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=u.scrollTop&&(An(e,u.scrollTop),1t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Le&&$e(e.doc,t)i.viewFrom?Qn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Qn(e);else if(t<=i.viewFrom){var o=Jn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Qn(e)}else if(r>=i.viewTo){var l=Jn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):Qn(e)}else{var s=Jn(e,t,t,-1),a=Jn(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(ir(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):Qn(e)}var u=i.externalMeasured;u&&(r=i.lineN&&t=n.viewTo)){var o=n.view[sn(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==I(l,r)&&l.push(r)}}}function Qn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Jn(e,t,r,n){var i,o=sn(e,t),l=e.display.view;if(!Le||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a=a.display.viewTo)){var c=+new Date+a.options.workTime,h=Ht(a,u.highlightFrontier),d=[];u.iter(h.line,Math.min(u.first+u.size,a.display.viewTo+500),function(e){if(h.line>=a.display.viewFrom){var t=e.styles,r=e.text.length>a.options.maxHighlightLength?Ft(u.mode,h.state):null,n=Wt(a,e,h,!0);r&&(h.state=r),e.styles=n.styles;var i=e.styleClasses,o=n.classes;o?e.styleClasses=o:i&&(e.styleClasses=null);for(var l=!t||t.length!=e.styles.length||i!=o&&(!i||!o||i.bgClass!=o.bgClass||i.textClass!=o.textClass),s=0;!l&&sc)return ti(a,a.options.workDelay),!0}),u.highlightFrontier=h.line,u.modeFrontier=Math.max(u.modeFrontier,h.line),d.length&&Vn(a,function(){for(var e=0;e=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==ei(e))return!1;wn(e)&&(Qn(e),t.dims=tn(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFroml&&r.viewTo-l<20&&(l=Math.min(i,r.viewTo)),Le&&(o=$e(e.doc,o),l=je(e.doc,l));var s,a,u,c,h=o!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;a=o,u=l,0==(c=(s=e).display).view.length||a>=c.viewTo||u<=c.viewFrom?(c.view=ir(s,a,u),c.viewFrom=a):(c.viewFrom>a?c.view=ir(s,a,c.viewFrom).concat(c.view):c.viewFromu&&(c.view=c.view.slice(0,sn(s,u)))),c.viewTo=u,r.viewOffset=Ge(ae(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var d=ei(e);if(!h&&0==d&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var f=function(e){if(e.hasFocus())return null;var t=O();if(!t||!F(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&F(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return 4=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&ii(e,t);n=!1){yn(e);var i=On(e);an(e),qn(e,i),ai(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function li(e,t){var r=new ni(e,t);if(ii(e,r)){yn(e),oi(e,r);var n=On(e);an(e),qn(e,n),ai(e,n),r.finish()}}function si(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function ai(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Cr(e)+"px"}function ui(e){var t=e.display.gutters,r=e.options.gutters;M(t);for(var n=0;nl.clientWidth,a=l.scrollHeight>l.clientHeight;if(n&&s||i&&a){if(i&&k&&b)e:for(var u=t.target,c=o.view;u!=l;u=u.parentNode)for(var h=0;ha-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=(s=i).lastOp==n?(Ni(s.done),Z(s.done)):s.done.length&&!Z(s.done).ranges?Z(s.done):1i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||it(e,"historyAdded")}function qi(e,t,r,n){var i,o,l,s,a,u=e.history,c=n&&n.origin;r==u.lastSelOp||c&&u.lastSelOrigin==c&&(u.lastModTime==u.lastSelTime&&u.lastOrigin==c||(i=e,o=c,l=Z(u.done),s=t,"*"==(a=o.charAt(0))||"+"==a&&l.ranges.length==s.ranges.length&&l.somethingSelected()==s.somethingSelected()&&new Date-i.history.lastSelTime<=(i.cm?i.cm.options.historyEventDelay:500)))?u.done[u.done.length-1]=t:zi(t,u.done),u.lastSelTime=+new Date,u.lastSelOrigin=c,u.lastSelOp=r,n&&!1!==n.clearRedo&&Ni(u.undone)}function zi(e,t){var r=Z(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Wi(t,r,e,n){var i=r["spans_"+t.id],o=0;t.iter(Math.max(t.first,e),Math.min(t.first+t.size,n),function(e){e.markedSpans&&((i||(i=r["spans_"+t.id]={}))[o]=e.markedSpans),++o})}function Pi(e){if(!e)return null;for(var t,r=0;r=t.ch:s.to>t.ch))){if(i&&(it(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var u=a.find(n<0?1:-1),c=void 0;if((n<0?a.inclusiveRight:a.inclusiveLeft)&&(u=eo(e,u,-n,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=ve(u,r))&&(n<0?c<0:0e.first?_e(e,me(t.line-1)):null:0e.lastLine())){if(t.from.lineo&&(t={from:t.from,to:me(o,ae(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ue(e,t.from,t.to),r||(r=wi(e,t)),e.cm?function(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=de(Be(ae(n,o.line))),n.iter(a,l.line+1,function(e){if(e==i.maxLine)return s=!0}));-1i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiert.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=h,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&Xn(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Xi(t.doc)),t&&sr(t,"markerCleared",t,this,i,o),r&&Rn(t),this.parent&&this.parent.clear()}},bo.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(i,o,l){i=_e(this,i),o=_e(this,o);var s=[],a=i.line;return this.iter(i.line,o.line+1,function(e){var t=e.markedSpans;if(t)for(var r=0;r=n.to||null==n.from&&a!=i.line||null!=n.from&&a==o.line&&n.from>=o.ch||l&&!l(n.marker)||s.push(n.marker.parent||n.marker)}++a}),s},getAllMarks:function(){var n=[];return this.iter(function(e){var t=e.markedSpans;if(t)for(var r=0;rt&&(t=e.from),null!=e.to&&e.toe.text.length?null:n}function Go(e,t,r){var n=Vo(e,t.ch,r);return null==n?null:new me(t.line,n,r<0?"after":"before")}function Ko(e,t,r,n,i){if(e){var o=Je(r,t.doc.direction);if(o){var l,s=i<0?Z(o):o[0],a=i<0==(1==s.level)?"after":"before";if(0l.doc.first){var o=ae(l.doc,n.line-1).text;o&&(n=new me(n.line,1),l.replaceRange(i.charAt(0)+l.doc.lineSeparator()+o.charAt(o.length-1),me(n.line-1,o.length-1),n,"+transpose"))}t.push(new vi(n,n))}l.setSelections(t)})},newlineAndIndent:function(n){return Vn(n,function(){for(var e=n.listSelections(),t=e.length-1;0<=t;t--)n.replaceRange(n.doc.lineSeparator(),e[t].anchor,e[t].head,"+input");e=n.listSelections();for(var r=0;rc&&t.push(new vi(me(s,c),me(s,V(u,l,r))))}t.length||t.push(new vi(v,v)),Gi(b,yi(m,w.ranges.slice(0,x).concat(t),x),{origin:"*mouse",scroll:!1}),m.scrollIntoView(e)}else{var h,d=k,f=hl(m,e,y.unit),p=d.anchor;p=0=i.to||n.linea.bottom?20:0;o&&setTimeout(Gn(m,function(){u==r&&(l.scroller.scrollTop+=o,e(t))}),50)}}(e):n(e)}),o=Gn(m,n);m.state.selectingText=o,tt(l.wrapper.ownerDocument,"mousemove",i),tt(l.wrapper.ownerDocument,"mouseup",o)}(e,n,t,o)}(t,l,a,e):ft(e)==r.scroller&&ut(e):2==s?(l&&Bi(t.doc,l),setTimeout(function(){return r.input.focus()},20)):3==s&&(_?t.display.input.onContextMenu(e):gn(t)))}}function hl(e,t,r){if("char"==r)return new vi(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new vi(me(t.line,0),_e(e.doc,me(t.line+1,0)));var n=r(e,t);return new vi(n.from,n.to)}function dl(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&ut(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!st(e,r))return ht(t);o-=s.top-l.viewOffset;for(var a=0;a=i)return it(e,r,e,fe(e.doc,o),e.options.gutters[a],t),ht(t)}}function fl(e,t){return dl(e,t,"gutterClick",!0)}function pl(e,t){var r,n;kr(e.display,t)||(n=t,st(r=e,"gutterContextMenu")&&dl(r,n,"gutterContextMenu",!1))||(ot(e,t,"contextmenu")||_||e.display.input.onContextMenu(t))}function gl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Pr(e)}ul.prototype.compare=function(e,t,r){return this.time+400>e&&0==ve(t,this.pos)&&r==this.button};var ml={toString:function(){return"CodeMirror.Init"}},vl={},yl={};function bl(e){ui(e),Xn(e),xn(e)}function kl(e,t,r){if(!t!=!(r&&r!=ml)){var n=e.display.dragFunctions,i=t?tt:nt;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function xl(e){e.options.lineWrapping?(N(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(L(e.display.wrapper,"CodeMirror-wrap"),Ze(e)),on(e),Xn(e),Pr(e),setTimeout(function(){return qn(e)},100)}function wl(e,t){var r=this;if(!(this instanceof wl))return new wl(e,t);this.options=t=t?W(t):{},W(vl,t,!1),ci(t);var n=t.value;"string"==typeof n?n=new So(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new wl.inputStyles[t.inputStyle](this),o=this.display=new se(e,n,i);for(var l in ui(o.wrapper.CodeMirror=this),gl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Pn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new H,keySeq:null,specialChars:null},t.autofocus&&!d&&o.input.focus(),x&&w<11&&setTimeout(function(){return r.display.input.reset(!0)},20),function(i){var o=i.display;tt(o.scroller,"mousedown",Gn(i,cl)),tt(o.scroller,"dblclick",x&&w<11?Gn(i,function(e){if(!ot(i,e)){var t=ln(i,e);if(t&&!fl(i,e)&&!kr(i.display,e)){ut(e);var r=i.findWordAt(t);Bi(i.doc,r.anchor,r.head)}}}):function(e){return ot(i,e)||ut(e)});tt(o.scroller,"contextmenu",function(e){return pl(i,e)});var r,n={end:0};function l(){o.activeTouch&&(r=setTimeout(function(){return o.activeTouch=null},1e3),(n=o.activeTouch).end=+new Date)}function s(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return 400o.first?P(ae(o,t-1).text,null,l):0:"add"==r?u=a+e.options.indentUnit:"subtract"==r?u=a-e.options.indentUnit:"number"==typeof r&&(u=a+r),u=Math.max(0,u);var h="",d=0;if(e.options.indentWithTabs)for(var f=Math.floor(u/l);f;--f)d+=l,h+="\t";if(dl,a=xt(t),u=null;if(s&&1l?"cut":"+input")};no(e.doc,m),sr(e,"inputRead",e,m)}t&&!s&&Al(e,t),Sn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=h),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Tl(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Vn(t,function(){return Ml(t,r,0,null,"paste")}),!0}function Al(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;0<=n;n--){var i=r.ranges[n];if(!(100=r.text.length?(s.ch=r.text.length,s.sticky="before"):s.ch<=0&&(s.ch=0,s.sticky="after");var n=Ye(a,s.ch,s.sticky),i=a[n];if("ltr"==t.doc.direction&&i.level%2==0&&(0s.ch:i.from=i.from&&d>=c.begin)){var f=h?"before":"after";return new me(s.line,d,f)}}var p=function(e,t,r){for(var n=function(e,t){return t?new me(s.line,u(e,1),"before"):new me(s.line,e,"after")};0<=e&&e=n.first+n.size||(i=new me(r,i.ch,i.sticky),!(s=ae(n,r))))return!1;i=Ko(l,n.cm,s,i.line,o)}else i=t;return!0}if("char"==e)a();else if("column"==e)a(!0);else if("word"==e||"group"==e)for(var u=null,c="group"==e,h=n.cm&&n.cm.getHelper(i,"wordChars"),d=!0;!(o<0)||a(!d);d=!1){var f=s.text.charAt(i.ch)||"\n",p=te(f,h)?"w":c&&"\n"==f?"n":!c||/\s/.test(f)?null:"p";if(!c||d||p||(p="s"),u&&u!=p){o<0&&(o=1,a(),i.sticky="after");break}if(p&&(u=p),0=l.height){o.hitSide=!0;break}i+=5*r}return o}var ql=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new H,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function zl(e,t){var r=Ar(e,t.line);if(!r||r.hidden)return null;var n=ae(e.doc,t.line),i=Mr(r,n,t.line),o=Je(n,e.doc.direction),l="left";o&&(l=Ye(o,t.ch)%2?"right":"left");var s=Er(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function Wl(e,t){return t&&(e.bad=!0),e}function Pl(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return Wl(e.clipPos(me(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||i.line=t.display.viewFrom&&zl(t,n)||{node:s[0].measure.map[2],offset:0},u=i.linen.firstLine()&&(l=me(l.line-1,ae(n.doc,l.line-1).length)),s.ch==ae(n.doc,s.line).text.length&&s.linei.viewTo-1)return!1;r=l.line==i.viewFrom||0==(e=sn(n,l.line))?(t=de(i.view[0].line),i.view[0].node):(t=de(i.view[e].line),i.view[e-1].node.nextSibling);var a,u,c=sn(n,s.line);if(u=c==i.view.length-1?(a=i.viewTo-1,i.lineDiv.lastChild):(a=de(i.view[c+1].line)-1,i.view[c+1].node.previousSibling),!r)return!1;for(var h=n.doc.splitLines(function(a,e,t,u,c){var r="",h=!1,d=a.doc.lineSeparator(),f=!1;function p(){h&&(r+=d,f&&(r+=d),h=f=!1)}function g(e){e&&(p(),r+=e)}function m(e){if(1==e.nodeType){var t=e.getAttribute("cm-text");if(t)return void g(t);var r,n=e.getAttribute("cm-marker");if(n){var i=a.findMarks(me(u,0),me(c+1,0),(s=+n,function(e){return e.id==s}));return void(i.length&&(r=i[0].find(0))&&g(ue(a.doc,r.from,r.to).join(d)))}if("false"==e.getAttribute("contenteditable"))return;var o=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;o&&p();for(var l=0;ll.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)f--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var x=me(t,f),w=me(a,d.length?Z(d).length-p:0);return 1n&&(Cl(t,o.head.line,e,!0),n=o.head.line,i==t.doc.sel.primIndex&&Sn(t));else{var l=o.from(),s=o.to(),a=Math.max(n,l.line);n=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var u=a;u>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]h)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(u=e.bottom),c+t.offsetWidth>d&&(c=d-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==i?(c=a.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),r&&(o=this,l={left:c,top:u,right:c+t.offsetWidth,bottom:u+t.offsetHeight},null!=(s=_n(o,l)).scrollTop&&An(o,s.scrollTop),null!=s.scrollLeft&&Fn(o,s.scrollLeft))},triggerOnKeyDown:Kn(il),triggerOnKeyPress:Kn(ll),triggerOnKeyUp:ol,triggerOnMouseDown:Kn(cl),execCommand:function(e){if(Zo.hasOwnProperty(e))return Zo[e].call(null,this)},triggerElectric:Kn(function(e){Al(this,e)}),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=_e(this.doc,e),l=0;l` "'(~:]+/,b=/^(~~~+|```+)[ \t]*([\w+#-]*)[^\n`]*$/,k=/^\s*\[[^\]]+?\]:.*$/,S=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/;function L(e,t,r){return t.f=t.inline=r,r(e,t)}function M(e,t,r){return t.f=t.block=r,r(e,t)}function n(e){if(e.linkTitle=!1,e.linkHref=!1,e.linkText=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,e.f==T){var t=i;if(!t){var r=q.innerMode(w,e.htmlState);t="xml"==r.mode.name&&null===r.state.tagStart&&!r.state.context&&r.state.tokenize.isInText}t&&(e.f=F,e.block=l,e.htmlState=null)}return e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine={stream:null},null}function l(e,t){var r,n=e.column()===t.indentation,i=!(r=t.prevLine.stream)||!/\S/.test(r.string),o=t.indentedCode,l=t.prevLine.hr,s=!1!==t.list,a=(t.listStack[t.listStack.length-1]||0)+3;t.indentedCode=!1;var u=t.indentation;if(null===t.indentationDiff&&(t.indentationDiff=t.indentation,s)){for(t.em=!1,t.strong=!1,t.code=!1,t.strikethrough=!1,t.list=null;u"))return t.quote=n?1:t.quote+1,x.highlightFormatting&&(t.formatting="quote"),e.eatSpace(),D(t);if(!h&&!t.setext&&n&&t.indentation<=a&&(d=e.match(m))){var f=d[1]?"ol":"ul";return t.indentation=u+e.current().length,t.list=!0,t.quote=0,t.listStack.push(t.indentation),x.taskLists&&e.match(C,!1)&&(t.taskList=!0),t.f=t.inline,x.highlightFormatting&&(t.formatting=["list","list-"+f]),D(t)}return n&&t.indentation<=a&&(d=e.match(b,!0))?(t.quote=0,t.fencedEndRE=new RegExp(d[1]+"+ *$"),t.localMode=x.fencedCodeBlockHighlighting&&function(e){if(q.findModeByName){var t=q.findModeByName(e);t&&(e=t.mime||t.mimes[0])}var r=q.getMode(p,e);return"null"==r.name?null:r}(d[2]),t.localMode&&(t.localState=q.startState(t.localMode)),t.f=t.block=A,x.highlightFormatting&&(t.formatting="code-block"),t.code=-1,D(t)):t.setext||!(c&&s||t.quote||!1!==t.list||t.code||h||k.test(e.string))&&(d=e.lookAhead(1))&&(d=d.match(y))?(t.setext?(t.header=t.setext,t.setext=0,e.skipToEnd(),x.highlightFormatting&&(t.formatting="header")):(t.header="="==d[0].charAt(0)?1:2,t.setext=t.header),t.thisLine.header=!0,t.f=t.inline,D(t)):h?(e.skipToEnd(),t.hr=!0,t.thisLine.hr=!0,_.hr):"["===e.peek()?L(e,t,E):L(e,t,t.inline)}function T(e,t){var r=w.token(e,t.htmlState);if(!i){var n=q.innerMode(w,t.htmlState);("xml"==n.mode.name&&null===n.state.tagStart&&!n.state.context&&n.state.tokenize.isInText||t.md_inside&&-1"))&&(t.f=F,t.block=l,t.htmlState=null)}return r}function A(e,t){var r,n=t.listStack[t.listStack.length-1]||0,i=t.indentation=e.quote?t.push(_.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(_.linkHref,"url"):(e.strong&&t.push(_.strong),e.em&&t.push(_.em),e.strikethrough&&t.push(_.strikethrough),e.emoji&&t.push(_.emoji),e.linkText&&t.push(_.linkText),e.code&&t.push(_.code),e.image&&t.push(_.image),e.imageAltText&&t.push(_.imageAltText,"link"),e.imageMarker&&t.push(_.imageMarker)),e.header&&t.push(_.header,_.header+"-"+e.header),e.quote&&(t.push(_.quote),!x.maxBlockquoteDepth||x.maxBlockquoteDepth>=e.quote?t.push(_.quote+"-"+e.quote):t.push(_.quote+"-"+x.maxBlockquoteDepth)),!1!==e.list){var n=(e.listStack.length-1)%3;n?1===n?t.push(_.list2):t.push(_.list3):t.push(_.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function t(e,t){if(e.match(r,!0))return D(t)}function F(e,t){var r=t.text(e,t);if(void 0!==r)return r;if(t.list)return t.list=null,D(t);if(t.taskList)return" "===e.match(C,!0)[1]?t.taskOpen=!0:t.taskClosed=!0,x.highlightFormatting&&(t.formatting="task"),t.taskList=!1,D(t);if(t.taskOpen=!1,t.taskClosed=!1,t.header&&e.match(/^#+$/,!0))return x.highlightFormatting&&(t.formatting="header"),D(t);var n=e.next();if(t.linkTitle){t.linkTitle=!1;var i=n;"("===n&&(i=")");var o="^\\s*(?:[^"+(i=(i+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+i;if(e.match(new RegExp(o),!0))return _.linkHref}if("`"===n){var l=t.formatting;x.highlightFormatting&&(t.formatting="code"),e.eatWhile("`");var s=e.current().length;if(0!=t.code||t.quote&&1!=s){if(s!=t.code)return t.formatting=l,D(t);var a=D(t);return t.code=0,a}return t.code=s,D(t)}if(t.code)return D(t);if("\\"===n&&(e.next(),x.highlightFormatting)){var u=D(t),c=_.formatting+"-escape";return u?u+" "+c:c}if("!"===n&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return t.imageMarker=!0,t.image=!0,x.highlightFormatting&&(t.formatting="image"),D(t);if("["===n&&t.imageMarker&&e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return t.imageMarker=!1,t.imageAltText=!0,x.highlightFormatting&&(t.formatting="image"),D(t);if("]"===n&&t.imageAltText){x.highlightFormatting&&(t.formatting="image");var u=D(t);return t.imageAltText=!1,t.image=!1,t.inline=t.f=N,u}if("["===n&&!t.image)return t.linkText&&e.match(/^.*?\]/)||(t.linkText=!0,x.highlightFormatting&&(t.formatting="link")),D(t);if("]"===n&&t.linkText){x.highlightFormatting&&(t.formatting="link");var u=D(t);return t.linkText=!1,t.inline=t.f=e.match(/\(.*?\)| ?\[.*?\]/,!1)?N:F,u}if("<"===n&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return t.f=t.inline=O,x.highlightFormatting&&(t.formatting="link"),(u=D(t))?u+=" ":u="",u+_.linkInline;if("<"===n&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return t.f=t.inline=O,x.highlightFormatting&&(t.formatting="link"),(u=D(t))?u+=" ":u="",u+_.linkEmail;if(x.xml&&"<"===n&&e.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var h=e.string.indexOf(">",e.pos);if(-1!=h){var d=e.string.substring(e.start,h);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(d)&&(t.md_inside=!0)}return e.backUp(1),t.htmlState=q.startState(w),M(e,t,T)}if(x.xml&&"<"===n&&e.match(/^\/\w*?>/))return t.md_inside=!1,"tag";if("*"===n||"_"===n){for(var f=1,p=1==e.pos?" ":e.string.charAt(e.pos-2);f<3&&e.eat(n);)f++;var g=e.peek()||" ",m=!/\s/.test(g)&&(!S.test(g)||/\s/.test(p)||S.test(p)),v=!/\s/.test(p)&&(!S.test(p)||/\s/.test(g)||S.test(g)),y=null,b=null;if(f%2&&(t.em||!m||"*"!==n&&v&&!S.test(p)?t.em!=n||!v||"*"!==n&&m&&!S.test(g)||(y=!1):y=!0),1"!==e.next())return e.match(/^[^>]+/,!0),_.linkInline;t.f=t.inline=F,x.highlightFormatting&&(t.formatting="link");var r=D(t);return r?r+=" ":r="",r+_.linkInline}function N(e,t){if(e.eatSpace())return null;var i,r=e.next();return"("===r||"["===r?(t.f=t.inline=(i="("===r?")":"]",function(e,t){var r=e.next();if(r!==i)return e.match(o[i]),t.linkHref=!0,D(t);t.f=t.inline=F,x.highlightFormatting&&(t.formatting="link-string");var n=D(t);return t.linkHref=!1,n}),x.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,D(t)):"error"}var o={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function E(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=s,e.next(),x.highlightFormatting&&(t.formatting="link"),t.linkText=!0,D(t)):L(e,t,F)}function s(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=a,x.highlightFormatting&&(t.formatting="link");var r=D(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),_.linkText}function a(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=F,_.linkHref+" url")}var u={startState:function(){return{f:l,prevLine:{stream:null},thisLine:{stream:null},block:l,htmlState:null,indentation:0,inline:F,text:t,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&q.copyState(w,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?q.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkText:e.linkText,linkTitle:e.linkTitle,linkHref:e.linkHref,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,emoji:e.emoji,header:e.header,setext:e.setext,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedEndRE:e.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return n(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=T)){var r=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentation=r,t.indentationDiff=null,0!?|~^@]/,g=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function m(e,t,r){return n=e,i=r,t}function v(e,t){var i,r=e.next();if('"'==r||"'"==r)return t.tokenize=(i=r,function(e,t){var r,n=!1;if(l&&"@"==e.peek()&&e.match(g))return t.tokenize=v,m("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=i||n);)n=!n&&"\\"==r;return n||(t.tokenize=v),m("string","string")}),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return m("number","number");if("."==r&&e.match(".."))return m("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return m(r);if("="==r&&e.eat(">"))return m("=>","operator");if("0"==r&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return m("number","number");if(/\d/.test(r))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),m("number","number");if("/"==r)return e.eat("*")?(t.tokenize=y)(e,t):e.eat("/")?(e.skipToEnd(),m("comment","comment")):Ve(e,t,1)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),m("regexp","string-2")):(e.eat("="),m("operator","operator",e.current()));if("`"==r)return(t.tokenize=b)(e,t);if("#"==r)return e.skipToEnd(),m("error","error");if(p.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),m("operator","operator",e.current());if(c.test(r)){e.eatWhile(c);var n=e.current();if("."!=t.lastType){if(a.propertyIsEnumerable(n)){var o=a[n];return m(o.type,o.style,n)}if("async"==n&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return m("async","keyword",n)}return m("variable","variable",n)}}function y(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=v;break}n="*"==r}return m("comment","comment")}function b(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=v;break}n=!n&&"\\"==r}return m("quasi","string-2",e.current())}var k="([{}])";function o(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(u){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,l=r-1;0<=l;--l){var s=e.string.charAt(l),a=k.indexOf(s);if(0<=a&&a<3){if(!i){++l;break}if(0==--i){"("==s&&(o=!0);break}}else if(3<=a&&a<6)++i;else if(c.test(s))o=!0;else{if(/["'\/]/.test(s))return;if(o&&!i){++l;break}}}o&&!i&&(t.fatArrowAt=l)}}var x={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function w(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function _(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}var C={state:null,column:null,marked:null,cc:null};function S(){for(var e=arguments.length-1;0<=e;e--)C.cc.push(arguments[e])}function L(){return S.apply(null,arguments),!0}function M(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function r(e){var t=C.state;if(C.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=function e(t,r){{if(r){if(r.block){var n=e(t,r.prev);return n?n==r.prev?r:new A(n,r.vars,!0):null}return M(t,r.vars)?r:new A(r.prev,new D(t,r.vars),!1)}return null}}(e,t.context);if(null!=r)return void(t.context=r)}else if(!M(e,t.localVars))return void(t.localVars=new D(e,t.localVars));h.globalVars&&!M(e,t.globalVars)&&(t.globalVars=new D(e,t.globalVars))}function T(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function A(e,t,r){this.prev=e,this.vars=t,this.block=r}function D(e,t){this.name=e,this.next=t}var t=new D("this",new D("arguments",null));function F(){C.state.context=new A(C.state.context,C.state.localVars,!1),C.state.localVars=t}function O(){C.state.context=new A(C.state.context,C.state.localVars,!0),C.state.localVars=null}function N(){C.state.localVars=C.state.context.vars,C.state.context=C.state.context.prev}function E(n,i){var e=function(){var e=C.state,t=e.indented;if("stat"==e.lexical.type)t=e.lexical.indented;else for(var r=e.lexical;r&&")"==r.type&&r.align;r=r.prev)t=r.indented;e.lexical=new w(t,C.stream.column(),n,null,e.lexical,i)};return e.lex=!0,e}function q(){var e=C.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function z(r){return function e(t){return t==r?L():";"==r||"}"==t||")"==t||"]"==t?S():L(e)}}function W(e,t){return"var"==e?L(E("vardef",t),ve,z(";"),q):"keyword a"==e?L(E("form"),R,W,q):"keyword b"==e?L(E("form"),W,q):"keyword d"==e?C.stream.match(/^\s*$/,!1)?L():L(E("stat"),$,z(";"),q):"debugger"==e?L(z(";")):"{"==e?L(E("}"),O,oe,q,N):";"==e?L():"if"==e?("else"==C.state.lexical.info&&C.state.cc[C.state.cc.length-1]==q&&C.state.cc.pop()(),L(E("form"),R,W,q,_e)):"function"==e?L(Me):"for"==e?L(E("form"),Ce,W,q):"class"==e||u&&"interface"==t?(C.marked="keyword",L(E("form","class"==e?e:t),Oe,q)):"variable"==e?u&&"declare"==t?(C.marked="keyword",L(W)):u&&("module"==t||"enum"==t||"type"==t)&&C.stream.match(/^\s*\w/,!1)?(C.marked="keyword","enum"==t?L(je):"type"==t?L(Ae,z("operator"),ue,z(";")):L(E("form"),ye,z("{"),E("}"),oe,q,q)):u&&"namespace"==t?(C.marked="keyword",L(E("form"),H,W,q)):u&&"abstract"==t?(C.marked="keyword",L(W)):L(E("stat"),Q):"switch"==e?L(E("form"),R,z("{"),E("}","switch"),O,oe,q,q,N):"case"==e?L(H,z(":")):"default"==e?L(z(":")):"catch"==e?L(E("form"),F,P,W,q,N):"export"==e?L(E("stat"),ze,q):"import"==e?L(E("stat"),Pe,q):"async"==e?L(W):"@"==t?L(H,W):S(E("stat"),H,z(";"),q)}function P(e){if("("==e)return L(De,z(")"))}function H(e,t){return B(e,t,!1)}function I(e,t){return B(e,t,!0)}function R(e){return"("!=e?S():L(E(")"),H,z(")"),q)}function B(e,t,r){if(C.state.fatArrowAt==C.stream.start){var n=r?Z:K;if("("==e)return L(F,E(")"),ne(De,")"),q,z("=>"),n,N);if("variable"==e)return S(F,ye,z("=>"),n,N)}var i,o=r?U:j;return x.hasOwnProperty(e)?L(o):"function"==e?L(Me,o):"class"==e||u&&"interface"==t?(C.marked="keyword",L(E("form"),Fe,q)):"keyword c"==e||"async"==e?L(r?I:H):"("==e?L(E(")"),$,z(")"),q,o):"operator"==e||"spread"==e?L(r?I:H):"["==e?L(E("]"),$e,q,o):"{"==e?ie(ee,"}",null,o):"quasi"==e?S(V,o):"new"==e?L((i=r,function(e){return"."==e?L(i?Y:X):"variable"==e&&u?L(pe,i?U:j):S(i?I:H)})):"import"==e?L(H):L()}function $(e){return e.match(/[;\}\)\],]/)?S():S(H)}function j(e,t){return","==e?L(H):U(e,t,!1)}function U(e,t,r){var n=0==r?j:U,i=0==r?H:I;return"=>"==e?L(F,r?Z:K,N):"operator"==e?/\+\+|--/.test(t)||u&&"!"==t?L(n):u&&"<"==t&&C.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?L(E(">"),ne(ue,">"),q,n):"?"==t?L(H,z(":"),i):L(i):"quasi"==e?S(V,n):";"!=e?"("==e?ie(I,")","call",n):"."==e?L(J,n):"["==e?L(E("]"),$,z("]"),q,n):u&&"as"==t?(C.marked="keyword",L(ue,n)):"regexp"==e?(C.state.lastType=C.marked="operator",C.stream.backUp(C.stream.pos-C.stream.start-1),L(i)):void 0:void 0}function V(e,t){return"quasi"!=e?S():"${"!=t.slice(t.length-2)?L(V):L(H,G)}function G(e){if("}"==e)return C.marked="string-2",C.state.tokenize=b,L(V)}function K(e){return o(C.stream,C.state),S("{"==e?W:H)}function Z(e){return o(C.stream,C.state),S("{"==e?W:I)}function X(e,t){if("target"==t)return C.marked="keyword",L(j)}function Y(e,t){if("target"==t)return C.marked="keyword",L(U)}function Q(e){return":"==e?L(q,W):S(j,z(";"),q)}function J(e){if("variable"==e)return C.marked="property",L()}function ee(e,t){if("async"==e)return C.marked="property",L(ee);if("variable"==e||"keyword"==C.style){return C.marked="property","get"==t||"set"==t?L(te):(u&&C.state.fatArrowAt==C.stream.start&&(r=C.stream.match(/^\s*:\s*/,!1))&&(C.state.fatArrowAt=C.stream.pos+r[0].length),L(re));var r}else{if("number"==e||"string"==e)return C.marked=l?"property":C.style+" property",L(re);if("jsonld-keyword"==e)return L(re);if(u&&T(t))return C.marked="keyword",L(ee);if("["==e)return L(H,le,z("]"),re);if("spread"==e)return L(I,re);if("*"==t)return C.marked="keyword",L(ee);if(":"==e)return S(re)}}function te(e){return"variable"!=e?S(re):(C.marked="property",L(Me))}function re(e){return":"==e?L(I):"("==e?S(Me):void 0}function ne(n,i,o){function l(e,t){if(o?-1"),ue):void 0}function ce(e){if("=>"==e)return L(ue)}function he(e,t){return"variable"==e||"keyword"==C.style?(C.marked="property",L(he)):"?"==t||"number"==e||"string"==e?L(he):":"==e?L(ue):"["==e?L(z("variable"),le,z("]"),he):"("==e?S(Te,he):void 0}function de(e,t){return"variable"==e&&C.stream.match(/^\s*[?:]/,!1)||"?"==t?L(de):":"==e?L(ue):"spread"==e?L(de):S(ue)}function fe(e,t){return"<"==t?L(E(">"),ne(ue,">"),q,fe):"|"==t||"."==e||"&"==t?L(ue):"["==e?L(ue,z("]"),fe):"extends"==t||"implements"==t?(C.marked="keyword",L(ue)):"?"==t?L(ue,z(":"),ue):void 0}function pe(e,t){if("<"==t)return L(E(">"),ne(ue,">"),q,fe)}function ge(){return S(ue,me)}function me(e,t){if("="==t)return L(ue)}function ve(e,t){return"enum"==t?(C.marked="keyword",L(je)):S(ye,le,xe,we)}function ye(e,t){return u&&T(t)?(C.marked="keyword",L(ye)):"variable"==e?(r(t),L()):"spread"==e?L(ye):"["==e?ie(ke,"]"):"{"==e?ie(be,"}"):void 0}function be(e,t){return"variable"!=e||C.stream.match(/^\s*:/,!1)?("variable"==e&&(C.marked="property"),"spread"==e?L(ye):"}"==e?S():"["==e?L(H,z("]"),z(":"),be):L(z(":"),ye,xe)):(r(t),L(xe))}function ke(){return S(ye,xe)}function xe(e,t){if("="==t)return L(I)}function we(e){if(","==e)return L(ve)}function _e(e,t){if("keyword b"==e&&"else"==t)return L(E("form","else"),W,q)}function Ce(e,t){return"await"==t?L(Ce):"("==e?L(E(")"),Se,q):void 0}function Se(e){return"var"==e?L(ve,Le):"variable"==e?L(Le):S(Le)}function Le(e,t){return")"==e?L():";"==e?L(Le):"in"==t||"of"==t?(C.marked="keyword",L(H,Le)):S(H,Le)}function Me(e,t){return"*"==t?(C.marked="keyword",L(Me)):"variable"==e?(r(t),L(Me)):"("==e?L(F,E(")"),ne(De,")"),q,se,W,N):u&&"<"==t?L(E(">"),ne(ge,">"),q,Me):void 0}function Te(e,t){return"*"==t?(C.marked="keyword",L(Te)):"variable"==e?(r(t),L(Te)):"("==e?L(F,E(")"),ne(De,")"),q,se,N):u&&"<"==t?L(E(">"),ne(ge,">"),q,Te):void 0}function Ae(e,t){return"keyword"==e||"variable"==e?(C.marked="type",L(Ae)):"<"==t?L(E(">"),ne(ge,">"),q):void 0}function De(e,t){return"@"==t&&L(H,De),"spread"==e?L(De):u&&T(t)?(C.marked="keyword",L(De)):u&&"this"==e?L(le,xe):S(ye,le,xe)}function Fe(e,t){return"variable"==e?Oe(e,t):Ne(e,t)}function Oe(e,t){if("variable"==e)return r(t),L(Ne)}function Ne(e,t){return"<"==t?L(E(">"),ne(ge,">"),q,Ne):"extends"==t||"implements"==t||u&&","==e?("implements"==t&&(C.marked="keyword"),L(u?ue:H,Ne)):"{"==e?L(E("}"),Ee,q):void 0}function Ee(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||u&&T(t))&&C.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(C.marked="keyword",L(Ee)):"variable"==e||"keyword"==C.style?(C.marked="property",L(u?qe:Me,Ee)):"number"==e||"string"==e?L(u?qe:Me,Ee):"["==e?L(H,le,z("]"),u?qe:Me,Ee):"*"==t?(C.marked="keyword",L(Ee)):u&&"("==e?S(Te,Ee):";"==e||","==e?L(Ee):"}"==e?L():"@"==t?L(H,Ee):void 0}function qe(e,t){if("?"==t)return L(qe);if(":"==e)return L(ue,xe);if("="==t)return L(I);var r=C.state.lexical.prev;return S(r&&"interface"==r.info?Te:Me)}function ze(e,t){return"*"==t?(C.marked="keyword",L(Be,z(";"))):"default"==t?(C.marked="keyword",L(H,z(";"))):"{"==e?L(ne(We,"}"),Be,z(";")):S(W)}function We(e,t){return"as"==t?(C.marked="keyword",L(z("variable"))):"variable"==e?S(I,We):void 0}function Pe(e){return"string"==e?L():"("==e?S(H):S(He,Ie,Be)}function He(e,t){return"{"==e?ie(He,"}"):("variable"==e&&r(t),"*"==t&&(C.marked="keyword"),L(Re))}function Ie(e){if(","==e)return L(He,Ie)}function Re(e,t){if("as"==t)return C.marked="keyword",L(He)}function Be(e,t){if("from"==t)return C.marked="keyword",L(H)}function $e(e){return"]"==e?L():S(ne(I,"]"))}function je(){return S(E("form"),ye,z("{"),E("}"),ne(Ue,"}"),q,q)}function Ue(){return S(ye,xe)}function Ve(e,t,r){return t.tokenize==v&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return q.lex=N.lex=!0,{startState:function(e){var t={tokenize:v,lastType:"sof",cc:[],lexical:new w((e||0)-d,0,"block",!1),localVars:h.localVars,context:h.localVars&&new A(null,null,!1),indented:e||0};return h.globalVars&&"object"==typeof h.globalVars&&(t.globalVars=h.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),o(e,t)),t.tokenize!=y&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=i&&"--"!=i?n:"incdec",function(e,t,r,n,i){var o=e.cc;for(C.state=e,C.stream=i,C.marked=null,C.cc=o,C.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():s?H:W)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return C.marked?C.marked:"variable"==r&&_(e,n)?"variable-2":t}}(t,r,n,i,e))},indent:function(e,t){if(e.tokenize==y)return Ge.Pass;if(e.tokenize!=v)return 0;var r,n=t&&t.charAt(0),i=e.lexical;if(!/^\s*else\b/.test(t))for(var o=e.cc.length-1;0<=o;--o){var l=e.cc[o];if(l==q)i=i.prev;else if(l!=_e)break}for(;("stat"==i.type||"form"==i.type)&&("}"==n||(r=e.cc[e.cc.length-1])&&(r==j||r==U)&&!/^[,\.=+\-*:?[\(]/.test(t));)i=i.prev;f&&")"==i.type&&"stat"==i.prev.type&&(i=i.prev);var s,a,u=i.type,c=n==u;return"vardef"==u?i.indented+("operator"==e.lastType||","==e.lastType?i.info.length+1:0):"form"==u&&"{"==n?i.indented:"form"==u?i.indented+d:"stat"==u?i.indented+(a=t,"operator"==(s=e).lastType||","==s.lastType||p.test(a.charAt(0))||/[,.]/.test(a.charAt(0))?f||d:0):"switch"!=i.info||c||0==h.doubleIndentSwitch?i.align?i.column+(c?0:1):i.indented+(c?0:d):i.indented+(/^(?:case|default)\b/.test(t)?d:2*d)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:l,jsonMode:s,expressionAllowed:Ve,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=H&&t!=I||e.cc.pop()}}}),Ge.registerHelper("wordChars","javascript",/[\w$]/),Ge.defineMIME("text/javascript","javascript"),Ge.defineMIME("text/ecmascript","javascript"),Ge.defineMIME("application/javascript","javascript"),Ge.defineMIME("application/x-javascript","javascript"),Ge.defineMIME("application/ecmascript","javascript"),Ge.defineMIME("application/json",{name:"javascript",json:!0}),Ge.defineMIME("application/x-json",{name:"javascript",json:!0}),Ge.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),Ge.defineMIME("text/typescript",{name:"javascript",typescript:!0}),Ge.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],e):e(CodeMirror)}(function(u){"use strict";function e(e){for(var t={},r=e.split(" "),n=0;n\w/,!1)&&(t.tokenize=s([[["->",null]],[[/[\w]+/,"variable"]]],r,n)),"variable-2";var i=!1;for(;!e.eol()&&(i||!1===n||!e.match("{$",!1)&&!e.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!i&&e.match(r)){t.tokenize=null,t.tokStack.pop(),t.tokStack.pop();break}i="\\"==e.next()&&!i}return"string"}(e,t,r,n)}}var t="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",r="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",n="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 file_put_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 array_intersect_key array_combine array_column 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 json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";u.registerHelper("hintWords","php",[t,r,n].join(" ").split(" ")),u.registerHelper("wordChars","php",/[\w$]/);var i={name:"clike",helperType:"php",keywords:e(t),blockKeywords:e("catch do else elseif for foreach if switch try while finally"),defKeywords:e("class function interface namespace trait"),atoms:e(r),builtin:e(n),multiLineStrings:!0,hooks:{$:function(e){return e.eatWhile(/[\w\$_]/),"variable-2"},"<":function(e,t){var r;if(r=e.match(/<<\s*/)){var n=e.eat(/['"]/);e.eatWhile(/[\w\.]/);var i=e.current().slice(r[0].length+(n?2:1));if(n&&e.eat(n),i)return(t.tokStack||(t.tokStack=[])).push(i,0),t.tokenize=a(i,"'"!=n),"string"}return!1},"#":function(e){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"},"/":function(e){if(e.eat("/")){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"}return!1},'"':function(e,t){return(t.tokStack||(t.tokStack=[])).push('"',0),t.tokenize=a('"'),"string"},"{":function(e,t){return t.tokStack&&t.tokStack.length&&t.tokStack[t.tokStack.length-1]++,!1},"}":function(e,t){return t.tokStack&&0")?(t.curMode=s,t.curState=t.html,t.php.context.prev||(t.php=null),"meta"):a.token(e,t.curState);if(e.match(/^<\?\w*/))return t.curMode=a,t.php||(t.php=u.startState(a,s.indent(t.html,"",""))),t.curState=t.php,"meta";if('"'==t.pending||"'"==t.pending){for(;!e.eol()&&e.next()!=t.pending;);var n="string"}else n=t.pending&&e.pos/.test(o)?t.pending=i[0]:t.pending={end:e.pos,style:n},e.backUp(o.length-l)),n},indent:function(e,t,r){return e.curMode!=a&&/^\s*<\//.test(t)||e.curMode==a&&/^\?>/.test(t)?s.indent(e.html,t,r):e.curMode.indent(e.curState,t,r)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(e){return{state:e.curState,mode:e.curMode}}}},"htmlmixed","clike"),u.defineMIME("application/x-httpd-php","php"),u.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),u.defineMIME("text/x-php",i)}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../markdown/markdown"),require("../../addon/mode/overlay")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../markdown/markdown","../../addon/mode/overlay"],e):e(CodeMirror)}(function(l){"use strict";var s=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;l.defineMode("gfm",function(e,i){var o=0;var t={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,t){if(t.combineTokens=null,t.codeBlock)return e.match(/^```+/)?t.codeBlock=!1:e.skipToEnd(),null;if(e.sol()&&(t.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),t.codeBlock=!0,null;if("`"===e.peek()){e.next();var r=e.pos;e.eatWhile("`");var n=1+e.pos-r;return t.code?n===o&&(t.code=!1):(o=n,t.code=!0),null}if(t.code)return e.next(),null;if(e.eatSpace())return t.ateSpace=!0,null;if((e.sol()||t.ateSpace)&&(t.ateSpace=!1)!==i.gitHubSpice){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return t.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return t.combineTokens=!0,"link"}return e.match(s)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(t.combineTokens=!0,"link"):(e.next(),null)},blankLine:function(e){return e.code=!1,null}},r={taskLists:!0,strikethrough:!0,emoji:!0};for(var n in i)r[n]=i[n];return r.name="markdown",l.overlayMode(l.getMode(e,r),t)},"markdown"),l.defineMIME("text/x-gfm","gfm")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(_){"use strict";var C={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},S={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};_.defineMode("xml",function(e,t){var l,o,s=e.indentUnit,a={},r=t.htmlMode?C:S;for(var n in r)a[n]=r[n];for(var n in t)a[n]=t[n];function u(t,r){function e(e){return(r.tokenize=e)(t,r)}var n=t.next();return"<"==n?t.eat("!")?t.eat("[")?t.match("CDATA[")?e(i("atom","]]>")):null:t.match("--")?e(i("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),e(function n(i){return function(e,t){for(var r;null!=(r=e.next());){if("<"==r)return t.tokenize=n(i+1),t.tokenize(e,t);if(">"==r){if(1!=i)return t.tokenize=n(i-1),t.tokenize(e,t);t.tokenize=u;break}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),r.tokenize=i("meta","?>"),"meta"):(l=t.eat("/")?"closeTag":"openTag",r.tokenize=c,"tag bracket"):"&"!=n?(t.eatWhile(/[^&<]/),null):(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error"}function c(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=u,l=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return l="equals",null;if("<"!=r)return/[\'\"]/.test(r)?(t.tokenize=(n=r,(i=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=c;break}return"string"}).isInAttribute=!0,i),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word");t.tokenize=u,t.state=p,t.tagName=t.tagStart=null;var n,i,o=t.tokenize(e,t);return o?o+" tag error":"tag error"}function i(r,n){return function(e,t){for(;!e.eol();){if(e.match(n)){t.tokenize=u;break}e.next()}return r}}function h(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(a.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function d(e){e.context&&(e.context=e.context.prev)}function f(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!a.contextGrabbers.hasOwnProperty(r)||!a.contextGrabbers[r].hasOwnProperty(t))return;d(e)}}function p(e,t,r){return"openTag"==e?(r.tagStart=t.column(),g):"closeTag"==e?m:p}function g(e,t,r){return"word"==e?(r.tagName=t.current(),o="tag",b):a.allowMissingTagName&&"endTag"==e?(o="tag bracket",b(e,t,r)):(o="error",g)}function m(e,t,r){if("word"!=e)return a.allowMissingTagName&&"endTag"==e?(o="tag bracket",v(e,t,r)):(o="error",y);var n=t.current();return r.context&&r.context.tagName!=n&&a.implicitlyClosed.hasOwnProperty(r.context.tagName)&&d(r),r.context&&r.context.tagName==n||!1===a.matchClosing?(o="tag",v):(o="tag error",y)}function v(e,t,r){return"endTag"!=e?(o="error",v):(d(r),p)}function y(e,t,r){return o="error",v(e,0,r)}function b(e,t,r){if("word"==e)return o="attribute",k;if("endTag"!=e&&"selfcloseTag"!=e)return o="error",b;var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||a.autoSelfClosers.hasOwnProperty(n)?f(r,n):(f(r,n),r.context=new h(r,n,i==r.indented)),p}function k(e,t,r){return"equals"==e?x:(a.allowMissing||(o="error"),b(e,0,r))}function x(e,t,r){return"string"==e?w:"word"==e&&a.allowUnquoted?(o="string",b):(o="error",b(e,0,r))}function w(e,t,r){return"string"==e?w:b(e,0,r)}return u.isInText=!0,{startState:function(e){var t={tokenize:u,state:p,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;l=null;var r=t.tokenize(e,t);return(r||l)&&"comment"!=r&&(o=null,t.state=t.state(l||r,e,t),o&&(r="error"==o?r+" error":o)),r},indent:function(e,t,r){var n=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+s;if(n&&n.noIndent)return _.Pass;if(e.tokenize!=c&&e.tokenize!=u)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==a.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+s*(a.multilineTagIndentFactor||1);if(a.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:a.htmlMode?"html":"xml",helperType:a.htmlMode?"html":"xml",skipAttribute:function(e){e.state==x&&(e.state=b)}}}),_.defineMIME("text/xml","xml"),_.defineMIME("application/xml","xml"),_.mimeModes.hasOwnProperty("text/html")||_.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"use strict";var y={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:p,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,nptable:p,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)|(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:p,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function a(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||v.defaults,this.rules=y.normal,this.options.pedantic?this.rules=y.pedantic:this.options.gfm&&(this.options.tables?this.rules=y.tables:this.rules=y.gfm)}y._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,y._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,y.def=o(y.def).replace("label",y._label).replace("title",y._title).getRegex(),y.bullet=/(?:[*+-]|\d{1,9}\.)/,y.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,y.item=o(y.item,"gm").replace(/bull/g,y.bullet).getRegex(),y.list=o(y.list).replace(/bull/g,y.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+y.def.source+")").getRegex(),y._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",y._comment=//,y.html=o(y.html,"i").replace("comment",y._comment).replace("tag",y._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),y.paragraph=o(y.paragraph).replace("hr",y.hr).replace("heading",y.heading).replace("lheading",y.lheading).replace("tag",y._tag).getRegex(),y.blockquote=o(y.blockquote).replace("paragraph",y.paragraph).getRegex(),y.normal=g({},y),y.gfm=g({},y.normal,{fences:/^ {0,3}(`{3,}|~{3,})([^`\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),y.gfm.paragraph=o(y.paragraph).replace("(?!","(?!"+y.gfm.fences.source.replace("\\1","\\2")+"|"+y.list.source.replace("\\1","\\3")+"|").getRegex(),y.tables=g({},y.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),y.pedantic=g({},y.normal,{html:o("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",y._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),a.rules=y,a.lex=function(e,t){return new a(t).lex(e)},a.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},a.prototype.token=function(e,t){var r,n,i,o,l,s,a,u,c,h,d,f,p,g,m,v;for(e=e.replace(/^ +$/gm,"");e;)if((i=this.rules.newline.exec(e))&&(e=e.substring(i[0].length),1 ?/gm,""),this.token(i,t),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(e)){for(e=e.substring(i[0].length),a={type:"list_start",ordered:g=1<(o=i[2]).length,start:g?+o:"",loose:!1},this.tokens.push(a),r=!(u=[]),p=(i=i[0].match(this.rules.item)).length,d=0;d?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:p,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s"<\[][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:p,text:/^(`+|[^`])[\s\S]*?(?=[\\?@\\[^_{|}~",r.em=o(r.em).replace(/punctuation/g,r._punctuation).getRegex(),r._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,r._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,r._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,r.autolink=o(r.autolink).replace("scheme",r._scheme).replace("email",r._email).getRegex(),r._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,r.tag=o(r.tag).replace("comment",y._comment).replace("attribute",r._attribute).getRegex(),r._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/,r._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*)/,r._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,r.link=o(r.link).replace("label",r._label).replace("href",r._href).replace("title",r._title).getRegex(),r.reflink=o(r.reflink).replace("label",r._label).getRegex(),r.normal=g({},r),r.pedantic=g({},r.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:o(/^!?\[(label)\]\((.*?)\)/).replace("label",r._label).getRegex(),reflink:o(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",r._label).getRegex()}),r.gfm=g({},r.normal,{escape:o(r.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:o(r.text).replace("]|","~]|").replace("|$","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|$").getRegex()}),r.gfm.url=o(r.gfm.url,"i").replace("email",r.gfm._extended_email).getRegex(),r.breaks=g({},r.gfm,{br:o(r.br).replace("{2,}","*").getRegex(),text:o(r.gfm.text).replace("{2,}","*").getRegex()}),c.rules=r,c.output=function(e,t,r){return new c(t,r).output(e)},c.prototype.output=function(e){for(var t,r,n,i,o,l,s="";e;)if(o=this.rules.escape.exec(e))e=e.substring(o[0].length),s+=h(o[1]);else if(o=this.rules.tag.exec(e))!this.inLink&&/^/i.test(o[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(o[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(o[0])&&(this.inRawBlock=!1),e=e.substring(o[0].length),s+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):h(o[0]):o[0];else if(o=this.rules.link.exec(e)){var a=m(o[2],"()");if(-1$/,"$1"),s+=this.outputLink(o,{href:c.escapes(n),title:c.escapes(i)}),this.inLink=!1}else if((o=this.rules.reflink.exec(e))||(o=this.rules.nolink.exec(e))){if(e=e.substring(o[0].length),t=(o[2]||o[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){s+=o[0].charAt(0),e=o[0].substring(1)+e;continue}this.inLink=!0,s+=this.outputLink(o,t),this.inLink=!1}else if(o=this.rules.strong.exec(e))e=e.substring(o[0].length),s+=this.renderer.strong(this.output(o[4]||o[3]||o[2]||o[1]));else if(o=this.rules.em.exec(e))e=e.substring(o[0].length),s+=this.renderer.em(this.output(o[6]||o[5]||o[4]||o[3]||o[2]||o[1]));else if(o=this.rules.code.exec(e))e=e.substring(o[0].length),s+=this.renderer.codespan(h(o[2].trim(),!0));else if(o=this.rules.br.exec(e))e=e.substring(o[0].length),s+=this.renderer.br();else if(o=this.rules.del.exec(e))e=e.substring(o[0].length),s+=this.renderer.del(this.output(o[1]));else if(o=this.rules.autolink.exec(e))e=e.substring(o[0].length),n="@"===o[2]?"mailto:"+(r=h(this.mangle(o[1]))):r=h(o[1]),s+=this.renderer.link(n,null,r);else if(this.inLink||!(o=this.rules.url.exec(e))){if(o=this.rules.text.exec(e))e=e.substring(o[0].length),this.inRawBlock?s+=this.renderer.text(o[0]):s+=this.renderer.text(h(this.smartypants(o[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===o[2])n="mailto:"+(r=h(o[0]));else{for(;l=o[0],o[0]=this.rules._backpedal.exec(o[0])[0],l!==o[0];);r=h(o[0]),n="www."===o[1]?"http://"+r:r}e=e.substring(o[0].length),s+=this.renderer.link(n,null,r)}return s},c.escapes=function(e){return e?e.replace(c.rules._escapes,"$1"):e},c.prototype.outputLink=function(e,t){var r=t.href,n=t.title?h(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(r,n,this.output(e[1])):this.renderer.image(r,n,h(e[1]))},c.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},c.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,r="",n=e.length,i=0;i'+(r?e:h(e,!0))+"\n":"
      "+(r?e:h(e,!0))+"
      "},n.prototype.blockquote=function(e){return"
      \n"+e+"
      \n"},n.prototype.html=function(e){return e},n.prototype.heading=function(e,t,r,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},n.prototype.hr=function(){return this.options.xhtml?"
      \n":"
      \n"},n.prototype.list=function(e,t,r){var n=t?"ol":"ul";return"<"+n+(t&&1!==r?' start="'+r+'"':"")+">\n"+e+"\n"},n.prototype.listitem=function(e){return"
    • "+e+"
    • \n"},n.prototype.checkbox=function(e){return" "},n.prototype.paragraph=function(e){return"

      "+e+"

      \n"},n.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
      \n"},n.prototype.tablerow=function(e){return"\n"+e+"\n"},n.prototype.tablecell=function(e,t){var r=t.header?"th":"td";return(t.align?"<"+r+' align="'+t.align+'">':"<"+r+">")+e+"\n"},n.prototype.strong=function(e){return""+e+""},n.prototype.em=function(e){return""+e+""},n.prototype.codespan=function(e){return""+e+""},n.prototype.br=function(){return this.options.xhtml?"
      ":"
      "},n.prototype.del=function(e){return""+e+""},n.prototype.link=function(e,t,r){if(null===(e=l(this.options.sanitize,this.options.baseUrl,e)))return r;var n='
      "},n.prototype.image=function(e,t,r){if(null===(e=l(this.options.sanitize,this.options.baseUrl,e)))return r;var n=''+r+'":">"},n.prototype.text=function(e){return e},i.prototype.strong=i.prototype.em=i.prototype.codespan=i.prototype.del=i.prototype.text=function(e){return e},i.prototype.link=i.prototype.image=function(e,t,r){return""+r},i.prototype.br=function(){return""},u.parse=function(e,t){return new u(t).parse(e)},u.prototype.parse=function(e){this.inline=new c(e.links,this.options),this.inlineText=new c(e.links,g({},this.options,{renderer:new i})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},u.prototype.next=function(){return this.token=this.tokens.pop()},u.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},u.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},u.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,d(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,r,n,i="",o="";for(r="",e=0;e?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t))for(var r=t;this.seen[r]++,t=r+"-"+this.seen[r],this.seen.hasOwnProperty(t););return this.seen[t]=0,t},h.escapeTest=/[&<>"']/,h.escapeReplace=/[&<>"']/g,h.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"},h.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,h.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var s={},f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function p(){}function g(e){for(var t,r,n=1;nt)r.splice(t);else for(;r.lengthAn error occurred:

      "+h(e.message+"",!0)+"
      ";throw e}}p.exec=p,v.options=v.setOptions=function(e){return g(v.defaults,e),v},v.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new n,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},v.defaults=v.getDefaults(),v.Parser=u,v.parser=u.parse,v.Renderer=n,v.TextRenderer=i,v.Lexer=a,v.lexer=a.lex,v.InlineLexer=c,v.inlineLexer=c.output,v.Slugger=t,v.parse=v,"undefined"!=typeof module&&"object"==typeof exports?module.exports=v:"function"==typeof define&&define.amd?define(function(){return v}):e.marked=v}(this||("undefined"!=typeof window?window:global)),function(e){var t;window.UIkit2&&(t=e(UIkit2)),"function"==typeof define&&define.amd&&define("uikit-htmleditor",["uikit"],function(){return t||e(UIkit2)})}(function(s){"use strict";var t=[];return s.component("htmleditor",{defaults:{iframe:!1,mode:"split",markdown:!1,autocomplete:!0,enablescripts:!1,height:500,maxsplitsize:1e3,codemirror:{mode:"htmlmixed",lineWrapping:!0,dragDrop:!1,autoCloseTags:!0,matchTags:!0,autoCloseBrackets:!0,matchBrackets:!0,indentUnit:4,indentWithTabs:!1,tabSize:4,hintOptions:{completionSingle:!1}},toolbar:["bold","italic","strike","link","image","blockquote","listUl","listOl"],lblPreview:"Preview",lblCodeview:"HTML",lblMarkedview:"Markdown"},boot:function(){s.ready(function(e){s.$("textarea[data-uk-htmleditor]",e).each(function(){var e=s.$(this);e.data("htmleditor")||s.htmleditor(e,s.Utils.options(e.attr("data-uk-htmleditor")))})})},init:function(){var n=this,e=s.components.htmleditor.template;this.CodeMirror=this.options.CodeMirror||CodeMirror,this.buttons={},e=(e=e.replace(/\{:lblPreview}/g,this.options.lblPreview)).replace(/\{:lblCodeview}/g,this.options.lblCodeview),this.htmleditor=s.$(e),this.content=this.htmleditor.find(".uk-htmleditor-content"),this.toolbar=this.htmleditor.find(".uk-htmleditor-toolbar"),this.preview=this.htmleditor.find(".uk-htmleditor-preview").children().eq(0),this.code=this.htmleditor.find(".uk-htmleditor-code"),this.element.before(this.htmleditor).appendTo(this.code),this.editor=this.CodeMirror.fromTextArea(this.element[0],this.options.codemirror),(this.editor.htmleditor=this).editor.on("change",s.Utils.debounce(function(){n.render()},150)),this.editor.on("change",function(){n.editor.save(),n.element.trigger("input")}),this.code.find(".CodeMirror").css("height",this.options.height),this.options.iframe?(this.iframe=s.$(''),this.preview.append(this.iframe),this.iframe[0].contentWindow.document.open(),this.iframe[0].contentWindow.document.close(),this.preview.container=s.$(this.iframe[0].contentWindow.document).find("body"),"string"==typeof this.options.iframe&&this.preview.container.parent().append('')):this.preview.container=this.preview,s.$win.on("resize load",s.Utils.debounce(function(){n.fit()},200));var i=this.iframe?this.preview.container:n.preview.parent(),o=this.code.find(".CodeMirror-sizer"),l=this.code.find(".CodeMirror-scroll").on("scroll",s.Utils.debounce(function(){if("tab"!=n.htmleditor.attr("data-mode")){var e=o.height()-l.height(),t=(i[0].scrollHeight-(n.iframe?n.iframe.height():i.height()))/e,r=l.scrollTop()*t;i.scrollTop(r)}},10));this.htmleditor.on("click",".uk-htmleditor-button-code, .uk-htmleditor-button-preview",function(e){e.preventDefault(),"tab"==n.htmleditor.attr("data-mode")&&(n.htmleditor.find(".uk-htmleditor-button-code, .uk-htmleditor-button-preview").removeClass("uk-active").filter(this).addClass("uk-active"),n.activetab=s.$(this).hasClass("uk-htmleditor-button-code")?"code":"preview",n.htmleditor.attr("data-active-tab",n.activetab),n.editor.refresh())}),this.htmleditor.on("click","a[data-htmleditor-button]",function(){n.code.is(":visible")&&n.trigger("action."+s.$(this).data("htmleditor-button"),[n.editor])}),this.preview.parent().css("height",this.code.height()),this.options.autocomplete&&this.CodeMirror.showHint&&this.CodeMirror.hint&&this.CodeMirror.hint.html&&this.editor.on("inputRead",s.Utils.debounce(function(){var e=n.editor.getDoc().getCursor();if("xml"==n.CodeMirror.innerMode(n.editor.getMode(),n.editor.getTokenAt(e).state).mode.name){var t=n.editor.getCursor(),r=n.editor.getTokenAt(t);"<"!=r.string.charAt(0)&&"attribute"!=r.type||n.CodeMirror.showHint(n.editor,n.CodeMirror.hint.html,{completeSingle:!1})}},100)),this.debouncedRedraw=s.Utils.debounce(function(){n.redraw()},5),this.on("init.uk.component",function(){n.debouncedRedraw()}),this.element.attr("data-uk-check-display",1).on("display.uk.check",function(e){this.htmleditor.is(":visible")&&this.fit()}.bind(this)),t.push(this)},addButton:function(e,t){this.buttons[e]=t},addButtons:function(e){s.$.extend(this.buttons,e)},replaceInPreview:function(e,r){var n=this.editor,i=[],o=n.getValue(),l=-1,s=0;function a(e){var t=n.getValue().substring(0,e).split("\n");return{line:t.length-1,ch:t[t.length-1].length}}return this.currentvalue=this.currentvalue.replace(e,function(){var t={matches:arguments,from:a(l=o.indexOf(arguments[0],++l)),to:a(l+arguments[0].length),replace:function(e){n.replaceRange(e,t.from,t.to)},inRange:function(e){return e.line===t.from.line&&e.line===t.to.line?e.ch>=t.from.ch&&e.ch=t.from.ch||e.line>t.from.line&&e.line
      '+r.buttons[e].label+"")}}),this.toolbar.html(n.join("\n"))}},fit:function(){var e=this.options.mode;"split"==e&&this.htmleditor.width())<[^<]*)*<\/(script|style)>/gim,"")),!this.currentvalue)return this.element.val(""),void this.preview.container.html("");this.trigger("render",[this]),this.trigger("renderLate",[this]),this.preview.container.html(this.currentvalue)},addShortcut:function(e,t){var r={};return s.$.isArray(e)||(e=[e]),e.forEach(function(e){r[e]=t}),this.editor.addKeyMap(r),r},addShortcutAction:function(e,t){var r=this;this.addShortcut(t,function(){r.element.trigger("action."+e,[r.editor])})},replaceSelection:function(e){var t=this.editor.getSelection();if(!t.length){for(var r=this.editor.getCursor(),n=this.editor.getLine(r.line),i=r.ch,o=i;o','
      ','
        ','
        ','","
        ","
        ",'
        ','
        ','
        ',"
        ",""].join(""),s.plugin("htmleditor","base",{init:function(a){a.addButtons({fullscreen:{title:"Fullscreen",label:''},bold:{title:"Bold",label:''},italic:{title:"Italic",label:''},strike:{title:"Strikethrough",label:''},blockquote:{title:"Blockquote",label:''},link:{title:"Link",label:''},image:{title:"Image",label:''},listUl:{title:"Unordered List",label:''},listOl:{title:"Ordered List",label:''}}),t("bold","$1"),t("italic","$1"),t("strike","$1"),t("blockquote","

        $1

        ","replaceLine"),t("link",'$1'),t("image",'$1');var e=function(e){if("html"==a.getCursorMode()){e=e||"ul";for(var t=a.editor,r=t.getDoc(),n=r.getCursor(!0),i=r.getCursor(!1),o=CodeMirror.innerMode(t.getMode(),t.getTokenAt(t.getCursor()).state),l=o&&o.state&&o.state.context&&-1!=["ul","ol"].indexOf(o.state.context.tagName),s=n.line;s"+t.getLine(s)+"",{line:s,ch:0},{line:s,ch:t.getLine(s).length});l?t.setCursor({line:i.line,ch:t.getLine(i.line).length}):(t.replaceRange("<"+e+">\n"+t.getLine(n.line),{line:n.line,ch:0},{line:n.line,ch:t.getLine(n.line).length}),t.replaceRange(t.getLine(i.line+1)+"\n",{line:i.line+1,ch:0},{line:i.line+1,ch:t.getLine(i.line+1).length}),t.setCursor({line:i.line+1,ch:t.getLine(i.line+1).length})),t.focus()}};function t(e,t,r){a.on("action."+e,function(){"html"==a.getCursorMode()&&a["replaceLine"==r?"replaceLine":"replaceSelection"](t)})}a.on("action.listUl",function(){e("ul")}),a.on("action.listOl",function(){e("ol")}),a.htmleditor.on("click",'a[data-htmleditor-button="fullscreen"]',function(){a.htmleditor.toggleClass("uk-htmleditor-fullscreen");var e=a.editor.getWrapperElement();if(a.htmleditor.hasClass("uk-htmleditor-fullscreen")){var t=!1,r=a.htmleditor.parents().each(function(){"fixed"!=s.$(this).css("position")||s.$(this).is("html")||(t=s.$(this))});if(a.htmleditor.data("fixedParents",!1),t){var n=[];t=t.parent().find(r).each(function(){"none"!=s.$(this).css("transform")&&n.push(s.$(this).data("transform-reset",{transform:this.style.transform,"-webkit-transform":this.style.webkitTransform,"-webkit-transition":this.style.webkitTransition,transition:this.style.transition}).css({transform:"none","-webkit-transform":"none","-webkit-transition":"none",transition:"none"}))}),a.htmleditor.data("fixedParents",n)}a.editor.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:e.style.width,height:e.style.height},e.style.width="",e.style.height=a.content.height()+"px",document.documentElement.style.overflow="hidden"}else{document.documentElement.style.overflow="";var i=a.editor.state.fullScreenRestore;e.style.width=i.width,e.style.height=i.height,window.scrollTo(i.scrollLeft,i.scrollTop),a.htmleditor.data("fixedParents")&&a.htmleditor.data("fixedParents").forEach(function(e){e.css(e.data("transform-reset"))})}setTimeout(function(){a.fit(),s.$win.trigger("resize")},50)}),a.addShortcut(["Ctrl-S","Cmd-S"],function(){a.element.trigger("htmleditor-save",[a])}),a.addShortcutAction("bold",["Ctrl-B","Cmd-B"])}}),s.plugin("htmleditor","markdown",{init:function(l){var e=l.options.mdparser||window.marked||null;function t(){l.editor.setOption("mode","gfm"),l.htmleditor.find(".uk-htmleditor-button-code a").html(l.options.lblMarkedview)}function r(e,t,r){l.on("action."+e,function(){"markdown"==l.getCursorMode()&&l["replaceLine"==r?"replaceLine":"replaceSelection"](t)})}e&&(l.options.markdown&&t(),r("bold","**$1**"),r("italic","*$1*"),r("strike","~~$1~~"),r("blockquote","> $1","replaceLine"),r("link","[$1](http://)"),r("image","![$1](http://)"),l.on("action.listUl",function(){if("markdown"==l.getCursorMode()){for(var e=l.editor,t=e.getDoc().getCursor(!0),r=e.getDoc().getCursor(!1),n=t.line;n