j1-template 2023.9.1 → 2023.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/themes/j1/layouts/content_generator_collection.html +1 -1
- data/_includes/themes/j1/layouts/content_generator_news_panel_posts.html +1 -1
- data/_includes/themes/j1/layouts/content_generator_page.html +1 -1
- data/_includes/themes/j1/layouts/content_generator_post.html +1 -1
- data/_includes/themes/j1/layouts/content_generator_raw.html +1 -1
- data/_includes/themes/j1/layouts/layout_metadata_generator.html +1 -1
- data/_includes/themes/j1/layouts/layout_module_generator.html +1 -1
- data/_includes/themes/j1/layouts/layout_resource_generator.html +1 -1
- data/_includes/themes/j1/modules/attics/generator.html +1 -1
- data/_includes/themes/j1/modules/navigator/generator.html +1 -1
- data/_includes/themes/j1/modules/searcher/generator.html +1 -1
- data/_includes/themes/j1/modules/searcher/procedures/topsearch.proc +1 -1
- data/_includes/themes/j1/procedures/blocks/footer/boxes/about_box.proc +1 -1
- data/_includes/themes/j1/procedures/blocks/footer/boxes/contacts_box.proc +1 -1
- data/_includes/themes/j1/procedures/blocks/footer/boxes/issue.proc +1 -1
- data/_includes/themes/j1/procedures/blocks/footer/boxes/legal_statements.proc +1 -1
- data/_includes/themes/j1/procedures/blocks/footer/boxes/links_box.proc +1 -1
- data/_includes/themes/j1/procedures/blocks/footer/boxes/news_box.proc +1 -1
- data/_includes/themes/j1/procedures/blocks/footer/boxes/social_media_icons.proc +1 -1
- data/_includes/themes/j1/procedures/blocks/get_wave.proc +1 -1
- data/_includes/themes/j1/procedures/collections/create_collection_article_preview.proc +1 -1
- data/_includes/themes/j1/procedures/collections/pager.proc +1 -1
- data/_includes/themes/j1/procedures/global/attributes_loader.proc +1 -1
- data/_includes/themes/j1/procedures/global/collect_frontmatter_options.proc +1 -1
- data/_includes/themes/j1/procedures/global/collect_page_options.proc +1 -1
- data/_includes/themes/j1/procedures/global/create_bs_button.proc +1 -1
- data/_includes/themes/j1/procedures/global/create_word_cloud.proc +1 -1
- data/_includes/themes/j1/procedures/global/date-german.proc +1 -1
- data/_includes/themes/j1/procedures/global/get_category.proc +1 -1
- data/_includes/themes/j1/procedures/global/get_category_item.proc +1 -1
- data/_includes/themes/j1/procedures/global/get_documents_dir.proc +1 -1
- data/_includes/themes/j1/procedures/global/get_page_path.proc +1 -1
- data/_includes/themes/j1/procedures/global/get_page_url.proc +1 -1
- data/_includes/themes/j1/procedures/global/select_color.proc +1 -1
- data/_includes/themes/j1/procedures/global/select_font_size.proc +1 -1
- data/_includes/themes/j1/procedures/global/select_icon_size.proc +1 -1
- data/_includes/themes/j1/procedures/global/select_location.proc +1 -1
- data/_includes/themes/j1/procedures/global/set_base_vars_folders.proc +1 -1
- data/_includes/themes/j1/procedures/global/set_env_entry_document.proc +1 -1
- data/_includes/themes/j1/procedures/global/set_image_block.proc +1 -1
- data/_includes/themes/j1/procedures/global/setup.proc +1 -1
- data/_includes/themes/j1/procedures/layouts/content_writer.proc +1 -1
- data/_includes/themes/j1/procedures/layouts/default_writer.proc +1 -1
- data/_includes/themes/j1/procedures/layouts/module_writer.proc +1 -1
- data/_includes/themes/j1/procedures/layouts/resource_writer.proc +1 -1
- data/_includes/themes/j1/procedures/posts/collate_calendar.proc +1 -1
- data/_includes/themes/j1/procedures/posts/collate_list.proc +1 -1
- data/_includes/themes/j1/procedures/posts/collate_timeline.proc +1 -1
- data/_includes/themes/j1/procedures/posts/create_ad_block.proc +1 -1
- data/_includes/themes/j1/procedures/posts/create_series_header.proc +1 -1
- data/_includes/themes/j1/procedures/posts/pager.proc +1 -1
- data/_layouts/_home.html +1 -1
- data/_layouts/autopage_category.html +1 -1
- data/_layouts/autopage_collection.html +1 -1
- data/_layouts/autopage_collections_tags.html +1 -1
- data/_layouts/autopage_tags.html +1 -1
- data/_layouts/collection.html +1 -1
- data/_layouts/compress.html +1 -1
- data/_layouts/default.html +1 -1
- data/_layouts/home.html +1 -1
- data/_layouts/news_panel_posts.html +1 -1
- data/_layouts/page.html +1 -1
- data/_layouts/post.html +1 -1
- data/_layouts/raw.html +1 -1
- data/apps/public/cc/cc.yml +1 -1
- data/assets/data/authclient.html +2 -2
- data/assets/data/banner.html +5 -5
- data/assets/data/carousel.json +1 -1
- data/assets/data/cookieconsent.html +2 -2
- data/assets/data/fab.html +2 -2
- data/assets/data/footer.html +2 -2
- data/assets/data/galeries.html +240 -0
- data/assets/data/gallery_customizer.html +2 -2
- data/assets/data/iso-639-language-codes-flags.json +1 -1
- data/assets/data/iso-639-language-codes.json +1 -1
- data/assets/data/j1_config.json +1 -1
- data/assets/data/masonry.html +99 -86
- data/assets/data/masterslider.html +2 -2
- data/assets/data/mdi_icons.json +1 -1
- data/assets/data/mdil_icons.json +1 -1
- data/assets/data/menu.html +2 -2
- data/assets/data/mmenu.html +2 -2
- data/assets/data/mmenu_sidebar.html +2 -2
- data/assets/data/mmenu_toc.html +2 -2
- data/assets/data/panel.html +2 -2
- data/assets/data/particles.yml +1 -1
- data/assets/data/private.json +1 -1
- data/assets/data/quicklinks.html +2 -2
- data/assets/data/rtext_resizer.html +2 -2
- data/assets/data/slick.html +2 -2
- data/assets/data/speak2me.html +11 -9
- data/assets/data/themes.bootswatch.json +1 -1
- data/assets/data/themes.json +1 -1
- data/assets/data/translator.html +2 -2
- data/assets/error_pages/HTTP204.html +1 -1
- data/assets/error_pages/HTTP400.html +1 -1
- data/assets/error_pages/HTTP401.html +1 -1
- data/assets/error_pages/HTTP403.html +1 -1
- data/assets/error_pages/HTTP404.html +1 -1
- data/assets/error_pages/HTTP444.html +1 -1
- data/assets/error_pages/HTTP445.html +1 -1
- data/assets/error_pages/HTTP446.html +1 -1
- data/assets/error_pages/HTTP447.html +1 -1
- data/assets/error_pages/HTTP448.html +1 -1
- data/assets/error_pages/HTTP500.html +1 -1
- data/assets/error_pages/HTTP501.html +1 -1
- data/assets/error_pages/HTTP502.html +1 -1
- data/assets/error_pages/HTTP503.html +1 -1
- data/assets/themes/j1/adapter/js/advertising.js +2 -2
- data/assets/themes/j1/adapter/js/algolia.js +2 -2
- data/assets/themes/j1/adapter/js/analytics.js +2 -2
- data/assets/themes/j1/adapter/js/asciidoctor.js +2 -2
- data/assets/themes/j1/adapter/js/attic.js +2 -2
- data/assets/themes/j1/adapter/js/bmd.js +2 -2
- data/assets/themes/j1/adapter/js/carousel.js +2 -2
- data/assets/themes/j1/adapter/js/clipboard.js +2 -2
- data/assets/themes/j1/adapter/js/comments.js +2 -2
- data/assets/themes/j1/adapter/js/cookieConsent.js +1 -1
- data/assets/themes/j1/adapter/js/customFunctions.js +2 -2
- data/assets/themes/j1/adapter/js/customModule.js +2 -2
- data/assets/themes/j1/adapter/js/dropdowns.js +2 -2
- data/assets/themes/j1/adapter/js/fab.js +2 -2
- data/assets/themes/j1/adapter/js/framer.js +2 -2
- data/assets/themes/j1/adapter/js/gallery.js +325 -0
- data/assets/themes/j1/adapter/js/iconPicker.js +2 -2
- data/assets/themes/j1/adapter/js/j1.js +2 -2
- data/assets/themes/j1/adapter/js/lazyLoader.js +2 -2
- data/assets/themes/j1/adapter/js/{justifiedGallery.js → lightGallery.js} +54 -48
- data/assets/themes/j1/adapter/js/lightbox.js +2 -2
- data/assets/themes/j1/adapter/js/logger.js +2 -2
- data/assets/themes/j1/adapter/js/lunr.js +2 -2
- data/assets/themes/j1/adapter/js/masonry.js +80 -13
- data/assets/themes/j1/adapter/js/masterslider.js +2 -2
- data/assets/themes/j1/adapter/js/mmenu.js +2 -2
- data/assets/themes/j1/adapter/js/navigator.js +7 -4
- data/assets/themes/j1/adapter/js/particles.js +2 -2
- data/assets/themes/j1/adapter/js/rangeSlider.js +2 -2
- data/assets/themes/j1/adapter/js/rouge.js +2 -2
- data/assets/themes/j1/adapter/js/rtable.js +2 -2
- data/assets/themes/j1/adapter/js/rtextResizer.js +2 -2
- data/assets/themes/j1/adapter/js/scroller.js +2 -2
- data/assets/themes/j1/adapter/js/slick.js +1 -1
- data/assets/themes/j1/adapter/js/speak2me.js +183 -48
- data/assets/themes/j1/adapter/js/themeToggler.js +2 -2
- data/assets/themes/j1/adapter/js/themer.js +2 -2
- data/assets/themes/j1/adapter/js/toccer.js +2 -2
- data/assets/themes/j1/adapter/js/translator.js +1 -1
- data/assets/themes/j1/adapter/js/waves.js +2 -2
- data/assets/themes/j1/core/country-flags/css/theme/uno.css +1 -1
- data/assets/themes/j1/core/country-flags/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/core/css/animate.css +2 -2
- data/assets/themes/j1/core/css/icon-fonts/fontawesome.css +2 -2
- data/assets/themes/j1/core/css/icon-fonts/iconify.css +5 -5
- data/assets/themes/j1/core/css/icon-fonts/mdi.css +9 -9
- data/assets/themes/j1/core/css/icon-fonts/mdib.css +7 -7
- data/assets/themes/j1/core/css/icon-fonts/mdil.css +10 -10
- data/assets/themes/j1/core/css/themes/bootstrap/bootstrap.css +1 -1
- data/assets/themes/j1/core/css/themes/unodark/bootstrap.css +30 -30
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.css +107 -100
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
- data/assets/themes/j1/core/css/vendor.css +10 -10
- data/assets/themes/j1/core/js/template.js +240 -83
- data/assets/themes/j1/core/js/template.min.js +6 -6
- data/assets/themes/j1/core/js/template.min.js.map +1 -1
- data/assets/themes/j1/modules/backstretch/js/backstretch.js +1 -1
- data/assets/themes/j1/modules/backstretch/js/backstretch.min.js +1 -1
- data/assets/themes/j1/modules/bmd/js/bmd.js +1 -1
- data/assets/themes/j1/modules/bmd/js/bmd.min.js +1 -1
- data/assets/themes/j1/modules/bootstrap/js/bootstrap.js +2118 -2696
- data/assets/themes/j1/modules/bootstrap/js/bootstrap.js.map +1 -0
- data/assets/themes/j1/modules/bootstrap/js/bootstrap.min.js +3 -3
- data/assets/themes/j1/modules/bootstrap/js/bootstrap.min.js.map +1 -1
- data/assets/themes/j1/modules/carousel/css/carousel.css +1 -1
- data/assets/themes/j1/modules/carousel/css/carousel.min.css +1 -1
- data/assets/themes/j1/modules/carousel/css/carousel_transitions.css +1 -1
- data/assets/themes/j1/modules/carousel/css/carousel_transitions.min.css +1 -1
- data/assets/themes/j1/modules/carousel/css/theme/uno.css +1 -1
- data/assets/themes/j1/modules/carousel/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/clipboard/css/theme/uno.css +1 -1
- data/assets/themes/j1/modules/clipboard/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/dropdowns/css/theme/uno/dropdowns.css +1 -1
- data/assets/themes/j1/modules/dropdowns/css/theme/uno/dropdowns.min.css +1 -1
- data/assets/themes/j1/modules/dropdowns/js/cash.js +1 -1
- data/assets/themes/j1/modules/dropdowns/js/cash.min.js +1 -1
- data/assets/themes/j1/modules/dropdowns/js/dropdowns.js +1 -1
- data/assets/themes/j1/modules/dropdowns/js/dropdowns.min.js +1 -1
- data/assets/themes/j1/modules/fab/js/cash.js +1 -1
- data/assets/themes/j1/modules/fab/js/cash.min.js +1 -1
- data/assets/themes/j1/modules/fab/js/fab.js +1 -1
- data/assets/themes/j1/modules/fab/js/fab.min.js +1 -1
- data/assets/themes/j1/modules/iconPicker/css/universal-icon-picker.css +1 -1
- data/assets/themes/j1/modules/iconPicker/css/universal-icon-picker.min.css +1 -1
- data/assets/themes/j1/modules/iconPicker/js/universal-icon-picker.js +1 -1
- data/assets/themes/j1/modules/iconPicker/js/universal-icon-picker.min.js +1 -1
- data/assets/themes/j1/modules/iframeResizer/js/client/iframeResizer.contentWindow.min.js +0 -1
- data/assets/themes/j1/modules/iframeResizer/js/resizer.min.js +0 -1
- data/assets/themes/j1/modules/jquery/js/extensions/hasClass.js +1 -1
- data/assets/themes/j1/modules/jquery/js/extensions/hasClass.min.js +1 -1
- data/assets/themes/j1/modules/jquery/js/extensions/removeClass.js +1 -1
- data/assets/themes/j1/modules/jquery/js/extensions/removeClass.min.js +1 -1
- data/assets/themes/j1/modules/justifiedGallery/css/theme/uno.css +1 -1
- data/assets/themes/j1/modules/justifiedGallery/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/lightGallery/css/lg-transitions.css +984 -0
- data/assets/themes/j1/modules/lightGallery/css/lg-transitions.min.css +26 -0
- data/assets/themes/j1/modules/lightGallery/css/lightgallery-bundle.css +1627 -0
- data/assets/themes/j1/modules/lightGallery/css/lightgallery-bundle.min.css +25 -0
- data/assets/themes/j1/modules/lightGallery/css/plugins/lg-autoplay.css +67 -0
- data/assets/themes/j1/modules/lightGallery/css/plugins/lg-comments.css +157 -0
- data/assets/themes/j1/modules/lightGallery/css/plugins/lg-fullscreen.css +32 -0
- data/assets/themes/j1/modules/lightGallery/css/plugins/lg-medium-zoom.css +40 -0
- data/assets/themes/j1/modules/lightGallery/css/plugins/lg-pager.css +115 -0
- data/assets/themes/j1/modules/lightGallery/css/plugins/lg-rotate.css +74 -0
- data/assets/themes/j1/modules/lightGallery/css/plugins/lg-share.css +168 -0
- data/assets/themes/j1/modules/lightGallery/css/plugins/lg-thumbnail.css +133 -0
- data/assets/themes/j1/modules/lightGallery/css/plugins/lg-video.css +169 -0
- data/assets/themes/j1/modules/lightGallery/css/plugins/lg-zoom.css +141 -0
- data/assets/themes/j1/modules/lightGallery/css/themes/uno/uno.css +109 -0
- data/assets/themes/j1/modules/lightGallery/css/themes/uno/uno.min.css +19 -0
- data/assets/themes/j1/modules/lightGallery/{css/fonts → fonts}/lg.svg +35 -28
- data/assets/themes/j1/modules/lightGallery/fonts/lg.ttf +0 -0
- data/assets/themes/j1/modules/lightGallery/fonts/lg.woff +0 -0
- data/assets/themes/j1/modules/lightGallery/fonts/lg.woff2 +0 -0
- data/assets/themes/j1/modules/lightGallery/img/loading.gif +0 -0
- data/assets/themes/j1/modules/lightGallery/js/lightgallery.js +2759 -0
- data/assets/themes/j1/modules/lightGallery/js/lightgallery.min.js +25 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-autoplay.js +275 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-autoplay.min.js +26 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-comment.js +230 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-comment.min.js +26 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-fullscreen.js +160 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-fullscreen.min.js +26 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-hash.js +223 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-hash.min.js +27 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-medium-zoom.js +157 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-medium-zoom.min.js +26 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-pager.js +164 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-pager.min.js +26 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-rotate.js +299 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-rotate.min.js +26 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-share.js +244 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-share.min.js +27 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-thumbnail.js +509 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-thumbnail.min.js +26 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-video.js +585 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-video.min.js +27 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-vimeo-thumbnail.js +207 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-vimeo-thumbnail.min.js +26 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-zoom.js +999 -0
- data/assets/themes/j1/modules/lightGallery/js/plugins/lg-zoom.min.js +26 -0
- data/assets/themes/j1/modules/lightbox/css/lightbox.css +1 -1
- data/assets/themes/j1/modules/lightbox/css/lightbox.min.css +1 -1
- data/assets/themes/j1/modules/lightbox/css/theme/uno.css +1 -1
- data/assets/themes/j1/modules/lightbox/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/lightbox/js/lightbox.js +1 -1
- data/assets/themes/j1/modules/lightbox/js/lightbox.min.js +1 -1
- data/assets/themes/j1/modules/lunr/js/j1.js +1 -1
- data/assets/themes/j1/modules/lunr/js/j1.min.js +1 -1
- data/assets/themes/j1/modules/masonry/js/utils/images_loaded.js +439 -0
- data/assets/themes/j1/modules/masonry/js/utils/images_loaded.min.js +12 -0
- data/assets/themes/j1/modules/masterslider/css/theme/uno.css +1 -1
- data/assets/themes/j1/modules/masterslider/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/mmenuLight/css/theme/uno/mmenu.css +1 -1
- data/assets/themes/j1/modules/mmenuLight/css/theme/uno/mmenu.min.css +1 -1
- data/assets/themes/j1/modules/mmenuLight/js/mmenu.js +1 -1
- data/assets/themes/j1/modules/mmenuLight/js/mmenu.min.js +1 -1
- data/assets/themes/j1/modules/mmenuLight/js/mmenu.polyfills.js +118 -0
- data/assets/themes/j1/modules/particles/skies/cavern1.png +0 -0
- data/assets/themes/j1/modules/particles/skies/cavern2.png +0 -0
- data/assets/themes/j1/modules/particles/skies/chrome.png +0 -0
- data/assets/themes/j1/modules/particles/skies/deep-space.jpg +0 -0
- data/assets/themes/j1/modules/particles/skies/deepblue.png +0 -0
- data/assets/themes/j1/modules/particles/skies/fire.png +0 -0
- data/assets/themes/j1/modules/particles/skies/fog.png +0 -0
- data/assets/themes/j1/modules/particles/skies/sky1.png +0 -0
- data/assets/themes/j1/modules/particles/skies/sky2.png +0 -0
- data/assets/themes/j1/modules/particles/skies/sky3.png +0 -0
- data/assets/themes/j1/modules/particles/skies/sky4.png +0 -0
- data/assets/themes/j1/modules/particles/skies/sky5.png +0 -0
- data/assets/themes/j1/modules/particles/skies/space1.png +0 -0
- data/assets/themes/j1/modules/particles/skies/space2.png +0 -0
- data/assets/themes/j1/modules/particles/skies/space3.png +0 -0
- data/assets/themes/j1/modules/particles/skies/starfield.png +0 -0
- data/assets/themes/j1/modules/particles/skies/sunorbit.png +0 -0
- data/assets/themes/j1/modules/particles/skies/sunset.png +0 -0
- data/assets/themes/j1/modules/particles/skies/toxic.png +0 -0
- data/assets/themes/j1/modules/particles/skies/underwater1.png +0 -0
- data/assets/themes/j1/modules/particles/skies/underwater2.png +0 -0
- data/assets/themes/j1/modules/particles/skies/underwater3.png +0 -0
- data/assets/themes/j1/modules/particles/skies/wtf.png +0 -0
- data/assets/themes/j1/modules/particles/sprites/slime.png +0 -0
- data/assets/themes/j1/modules/particles/sprites/slimeeyes.png +0 -0
- data/assets/themes/j1/modules/particles/sprites/snake.png +0 -0
- data/assets/themes/j1/modules/particles/sprites/snowflakes.png +0 -0
- data/assets/themes/j1/modules/particles/sprites/snowflakes_large.png +0 -0
- data/assets/themes/j1/modules/popper/js/popper.min.js +0 -1
- data/assets/themes/j1/modules/rangeSlider/css/theme/uno/nouislider.css +1 -1
- data/assets/themes/j1/modules/rangeSlider/css/theme/uno/nouislider.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.dark/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.dark/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.light/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.light/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.monokai/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.monokai/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.monokai.dark/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.monokai.dark/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.monokai.light/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.monokai.light/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.solarized/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.solarized/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.solarized.dark/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.solarized.dark/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.solarized.light/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/base16.solarized.light/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/colorful/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/colorful/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/github/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/github/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/gruvbox/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/gruvbox/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/gruvbox.dark/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/gruvbox.dark/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/gruvbox.light/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/gruvbox.light/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/igorpro/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/igorpro/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/molokai/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/molokai/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/monokai/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/monokai/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/monokai.sublime/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/monokai.sublime/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/pastie/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/pastie/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/thankful_eyes/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/thankful_eyes/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/themes.txt +1 -1
- data/assets/themes/j1/modules/rouge/css/tulip/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/tulip/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/uno.dark/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/uno.dark/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/css/uno.light/theme.css +1 -1
- data/assets/themes/j1/modules/rouge/css/uno.light/theme.min.css +1 -1
- data/assets/themes/j1/modules/rouge/js/select.js +1 -1
- data/assets/themes/j1/modules/rtable/css/theme/uno/rtable.css +1 -1
- data/assets/themes/j1/modules/rtable/css/theme/uno/rtable.min.css +1 -1
- data/assets/themes/j1/modules/rtable/js/rtable.js +1 -1
- data/assets/themes/j1/modules/rtable/js/rtable.min.js +1 -1
- data/assets/themes/j1/modules/scroller/css/theme/uno.css +1 -1
- data/assets/themes/j1/modules/scroller/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/scroller/js/scroller.min.js +1 -1
- data/assets/themes/j1/modules/slick/lightbox/css/theme/uno.css +1 -1
- data/assets/themes/j1/modules/slick/lightbox/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/slick/lightbox/js/slick-lightbox.min.js +0 -1
- data/assets/themes/j1/modules/slick/slider/css/theme/uno.css +1 -1
- data/assets/themes/j1/modules/slick/slider/css/theme/uno.min.css +1 -1
- data/assets/themes/j1/modules/spinner/css/spin.css +1 -1
- data/assets/themes/j1/modules/spinner/css/spin.min.css +1 -1
- data/assets/themes/j1/modules/spinner/js/spin.js +1 -1
- data/assets/themes/j1/modules/spinner/js/spin.min.js +1 -1
- data/assets/themes/j1/modules/themeSwitcher/js/switcher.js +1 -1
- data/assets/themes/j1/modules/themeSwitcher/js/switcher.min.js +1 -1
- data/assets/themes/j1/modules/translator/css/translator.css +1 -1
- data/assets/themes/j1/modules/translator/css/translator.min.css +1 -1
- data/assets/themes/j1/modules/videojs/css/themes/city.css +74 -74
- data/assets/themes/j1/modules/videojs/css/themes/city.min.css +3 -4
- data/assets/themes/j1/modules/videojs/css/themes/fantasy.css +3 -3
- data/assets/themes/j1/modules/videojs/css/themes/fantasy.min.css +3 -4
- data/assets/themes/j1/modules/videojs/css/themes/forest.css +4 -3
- data/assets/themes/j1/modules/videojs/css/themes/forest.min.css +3 -4
- data/assets/themes/j1/modules/videojs/css/themes/sea.css +2 -2
- data/assets/themes/j1/modules/videojs/css/themes/sea.min.css +3 -4
- data/assets/themes/j1/modules/videojs/css/themes/uno.css +151 -0
- data/assets/themes/j1/modules/videojs/css/themes/uno.min.css +17 -0
- data/assets/themes/j1/modules/videojs/css/video-js.css +12 -0
- data/assets/themes/j1/modules/videojs/css/video-js.min.css +12 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/LICENSE +19 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/README.md +94 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/api/README.md +7 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/api/dailymotion.min.js +29 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/api/dailymotion.player.min.js +80 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/dailymotion.js +603 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/dailymotion.min.js +16 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/examples/dailymotion-controls.html +18 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/examples/dailymotion-javascript.html +27 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/examples/dailymotion-playlist.html +19 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/examples/global-parameters.html +28 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/examples/simple.html +20 -0
- data/assets/themes/j1/modules/videojs/js/plugins/dm/examples/switch.html +37 -0
- data/assets/themes/j1/modules/videojs/js/plugins/vm/LICENSE +21 -0
- data/assets/themes/j1/modules/videojs/js/plugins/vm/README.md +15 -0
- data/assets/themes/j1/modules/videojs/js/plugins/vm/api/README.md +1818 -0
- data/assets/themes/j1/modules/videojs/js/plugins/vm/api/player.min.js +23 -0
- data/assets/themes/j1/modules/videojs/js/plugins/vm/api/vimeo.js +3562 -0
- data/assets/themes/j1/modules/videojs/js/plugins/vm/api/vimeo.min.js +35 -0
- data/assets/themes/j1/modules/videojs/js/plugins/vm/examples/index.html +33 -0
- data/assets/themes/j1/modules/videojs/js/plugins/vm/examples/player/index.html +37 -0
- data/assets/themes/j1/modules/videojs/js/plugins/vm/vimeo.js +521 -0
- data/assets/themes/j1/modules/videojs/js/plugins/vm/vimeo.min.js +15 -0
- data/assets/themes/j1/modules/videojs/js/plugins/wt/api/Readme.txt +20 -0
- data/assets/themes/j1/modules/videojs/js/plugins/wt/api/WistiaPlayer.ts +1617 -0
- data/assets/themes/j1/modules/videojs/js/plugins/wt/api/wistia.min.js +2 -0
- data/assets/themes/j1/modules/videojs/js/plugins/wt/wistia.js +383 -0
- data/assets/themes/j1/modules/videojs/js/plugins/wt/wistia.min.js +18 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/README.md +115 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/api/youtube.min.js +20 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/global-parameters.html +32 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/simple.html +20 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/switch.html +37 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/youtube-controls.html +18 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/youtube-javascript.html +27 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/youtube-list.html +19 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/examples/youtube-playlist.html +19 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/youtube.js +832 -0
- data/assets/themes/j1/modules/videojs/js/plugins/yt/youtube.min.js +16 -0
- data/assets/themes/j1/modules/videojs/js/video.js +40610 -32915
- data/assets/themes/j1/modules/videojs/js/video.min.js +33 -20
- data/lib/j1/version.rb +1 -1
- data/lib/j1_app/j1_auth_manager/auth_manager.rb +1 -1
- data/lib/j1_app/j1_auth_manager/warden_omniauth.rb +1 -1
- data/lib/j1_app/omniauth/strategies/github.rb +1 -1
- data/lib/starter_web/Gemfile +3 -3
- data/lib/starter_web/README.md +5 -5
- data/lib/starter_web/_config.yml +2 -2
- data/lib/starter_web/_data/_defaults/categories.yml +1 -1
- data/lib/starter_web/_data/_defaults/colors.yml +1 -1
- data/lib/starter_web/_data/_defaults/font_sizes.yml +1 -1
- data/lib/starter_web/_data/_defaults/j1_config.yml +1 -1
- data/lib/starter_web/_data/_defaults/private.yml +1 -1
- data/lib/starter_web/_data/_defaults/resources.yml +1 -1
- data/lib/starter_web/_data/apps/defaults/justifiedGalleryCustomizer.yml +1 -1
- data/lib/starter_web/_data/apps/justifiedGalleryCustomizer.yml +1 -1
- data/lib/starter_web/_data/asciidoc2pdf/themes/j1-theme.yml +1 -1
- data/lib/starter_web/_data/blocks/banner.yml +1 -1
- data/lib/starter_web/_data/blocks/defaults/banner.yml +1 -1
- data/lib/starter_web/_data/blocks/defaults/footer.yml +1 -1
- data/lib/starter_web/_data/blocks/defaults/panel.yml +1 -1
- data/lib/starter_web/_data/blocks/footer.yml +2 -2
- data/lib/starter_web/_data/blocks/panel.yml +1 -1
- data/lib/starter_web/_data/categories.yml +1 -1
- data/lib/starter_web/_data/colors.yml +1 -1
- data/lib/starter_web/_data/font_sizes.yml +1 -1
- data/lib/starter_web/_data/j1_config.yml +1 -1
- data/lib/starter_web/_data/layouts/collection.yml +1 -1
- data/lib/starter_web/_data/layouts/default.yml +1 -1
- data/lib/starter_web/_data/layouts/home.yml +1 -1
- data/lib/starter_web/_data/layouts/news_panel_posts.yml +1 -1
- data/lib/starter_web/_data/layouts/page.yml +1 -1
- data/lib/starter_web/_data/layouts/post.yml +1 -1
- data/lib/starter_web/_data/layouts/raw.yml +1 -1
- data/lib/starter_web/_data/modules/advertising.yml +2 -2
- data/lib/starter_web/_data/modules/analytics.yml +1 -1
- data/lib/starter_web/_data/modules/attics.yml +1 -1
- data/lib/starter_web/_data/modules/authentication.yml +1 -1
- data/lib/starter_web/_data/modules/blog_navigator.yml +1 -1
- data/lib/starter_web/_data/modules/carousel.yml +1 -1
- data/lib/starter_web/_data/modules/comments.yml +1 -1
- data/lib/starter_web/_data/modules/cookieconsent.yml +1 -1
- data/lib/starter_web/_data/modules/cookies.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/advertising.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/analytics.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/attics.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/authentication.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/blog_navigator.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/carousel.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/comments.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/cookieconsent.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/cookies.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/dropdowns.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/fab.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/framer.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/{justifiedGallery.yml → gallery.yml} +18 -28
- data/lib/starter_web/_data/modules/defaults/iconPicker.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/lazyLoader.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/lightGallery.yml +8 -6
- data/lib/starter_web/_data/modules/defaults/lightbox.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/log4javascript.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/log4r.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/lunr.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/masonry.yml +53 -13
- data/lib/starter_web/_data/modules/defaults/masterslider.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/navigator.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/particles.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/rangeSlider.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/rtable.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/scroller.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/slick.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/speak2me.yml +8 -5
- data/lib/starter_web/_data/modules/defaults/theme_toggler.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/themer.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/toccer.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/translator.yml +1 -1
- data/lib/starter_web/_data/modules/defaults/waves.yml +1 -1
- data/lib/starter_web/_data/modules/dropdowns.yml +1 -1
- data/lib/starter_web/_data/modules/fab.yml +1 -1
- data/lib/starter_web/_data/modules/framer.yml +1 -1
- data/lib/starter_web/_data/modules/gallery.yml +874 -0
- data/lib/starter_web/_data/modules/iconPicker.yml +1 -1
- data/lib/starter_web/_data/modules/lazyLoader.yml +1 -1
- data/lib/starter_web/_data/modules/lightGallery.yml +8 -5
- data/lib/starter_web/_data/modules/lightbox.yml +1 -1
- data/lib/starter_web/_data/modules/log4javascript.yml +1 -1
- data/lib/starter_web/_data/modules/log4r.yml +1 -1
- data/lib/starter_web/_data/modules/lunr.yml +1 -1
- data/lib/starter_web/_data/modules/masonry.yml +401 -87
- data/lib/starter_web/_data/modules/masterslider.yml +1 -1
- data/lib/starter_web/_data/modules/navigator.yml +1 -1
- data/lib/starter_web/_data/modules/navigator_menu.yml +18 -4
- data/lib/starter_web/_data/modules/nbinteract.yml +1 -1
- data/lib/starter_web/_data/modules/particles.yml +1 -1
- data/lib/starter_web/_data/modules/rangeSlider.yml +1 -1
- data/lib/starter_web/_data/modules/rtable.yml +1 -1
- data/lib/starter_web/_data/modules/scroller.yml +1 -1
- data/lib/starter_web/_data/modules/slick.yml +1 -1
- data/lib/starter_web/_data/modules/speak2me.yml +1 -1
- data/lib/starter_web/_data/modules/theme_toggler.yml +1 -1
- data/lib/starter_web/_data/modules/themer.yml +1 -1
- data/lib/starter_web/_data/modules/toccer.yml +1 -1
- data/lib/starter_web/_data/modules/translator.yml +1 -1
- data/lib/starter_web/_data/modules/waves.yml +1 -1
- data/lib/starter_web/_data/plugins/defaults/feed.yml +1 -1
- data/lib/starter_web/_data/plugins/defaults/paginator.yml +1 -1
- data/lib/starter_web/_data/plugins/defaults/seo-tags.yml +1 -1
- data/lib/starter_web/_data/plugins/defaults/sitemap.yml +1 -1
- data/lib/starter_web/_data/plugins/feed.yml +1 -1
- data/lib/starter_web/_data/plugins/paginator.yml +1 -1
- data/lib/starter_web/_data/plugins/seo-tags.yml +1 -1
- data/lib/starter_web/_data/plugins/sitemap.yml +1 -1
- data/lib/starter_web/_data/private.yml +1 -1
- data/lib/starter_web/_data/resources.yml +190 -118
- data/lib/starter_web/_data/templates/feed.xml +2 -2
- data/lib/starter_web/_data/templates/robots.txt +1 -1
- data/lib/starter_web/_data/templates/seo-tags.html +1 -1
- data/lib/starter_web/_data/templates/sitemap.xml +1 -1
- data/lib/starter_web/_data/utilities/defaults/util_srv.yml +1 -1
- data/lib/starter_web/_data/utilities/util_srv.yml +1 -1
- data/lib/starter_web/_includes/custom/static/bs5_accordion.html +1 -1
- data/lib/starter_web/_includes/custom/templates/bs5_accordion.html +1 -1
- data/lib/starter_web/_includes/custom/templates/collection_panel.html +1 -1
- data/lib/starter_web/_includes/custom/templates/custom_header.html +1 -1
- data/lib/starter_web/_includes/custom/templates/people_panel.html +1 -1
- data/lib/starter_web/_includes/google/static/google_ad__your-slot-id.html +1 -1
- data/lib/starter_web/_includes/google/templates/google_ads.html +1 -1
- data/lib/starter_web/_plugins/asciidoctor/admonition-block-answer.rb +3 -2
- data/lib/starter_web/_plugins/asciidoctor/admonition-block-question.rb +7 -6
- data/lib/starter_web/_plugins/asciidoctor/banner.rb +8 -5
- data/lib/starter_web/_plugins/asciidoctor/callout.rb +10 -8
- data/lib/starter_web/_plugins/asciidoctor/carousel-block.rb +14 -8
- data/lib/starter_web/_plugins/asciidoctor/conum.rb +3 -1
- data/lib/starter_web/_plugins/asciidoctor/dailymotion-block.rb +83 -0
- data/lib/starter_web/_plugins/asciidoctor/fab-icon-inline.rb +8 -5
- data/lib/starter_web/_plugins/asciidoctor/fas-icon-inline.rb +8 -5
- data/lib/starter_web/_plugins/asciidoctor/flag-icon-inline.rb +8 -5
- data/lib/starter_web/_plugins/asciidoctor/gallery-block.rb +50 -44
- data/lib/starter_web/_plugins/asciidoctor/gist-block.rb +56 -52
- data/lib/starter_web/_plugins/asciidoctor/google-ad-block.rb +52 -47
- data/lib/starter_web/_plugins/asciidoctor/iconify-icon-inline.rb +8 -5
- data/lib/starter_web/_plugins/asciidoctor/lightbox-block.rb +88 -82
- data/lib/starter_web/_plugins/asciidoctor/lorem_inline.rb +5 -4
- data/lib/starter_web/_plugins/asciidoctor/masonry-block.rb +13 -7
- data/lib/starter_web/_plugins/asciidoctor/masterslider-block.rb +54 -48
- data/lib/starter_web/_plugins/asciidoctor/mdi-icon-inline.rb +2 -1
- data/lib/starter_web/_plugins/asciidoctor/mdib-icon-inline.rb +2 -1
- data/lib/starter_web/_plugins/asciidoctor/mdil-icon-inline.rb +2 -1
- data/lib/starter_web/_plugins/asciidoctor/panel.rb +9 -5
- data/lib/starter_web/_plugins/asciidoctor/placeholder-inline.rb +4 -3
- data/lib/starter_web/_plugins/asciidoctor/range-slider-block.rb +49 -44
- data/lib/starter_web/_plugins/asciidoctor/shout-block.rb +6 -7
- data/lib/starter_web/_plugins/asciidoctor/slick-block.rb +12 -6
- data/lib/starter_web/_plugins/asciidoctor/textbook-block.rb +9 -5
- data/lib/starter_web/_plugins/asciidoctor/twitter-emoji-inline.rb +4 -1
- data/lib/starter_web/_plugins/asciidoctor/video-block.rb +65 -0
- data/lib/starter_web/_plugins/asciidoctor/videojs-block.rb +82 -0
- data/lib/starter_web/_plugins/asciidoctor/vimeo-block.rb +82 -0
- data/lib/starter_web/_plugins/asciidoctor/wistia-block.rb +87 -0
- data/lib/starter_web/_plugins/asciidoctor/youtube-block.rb +95 -0
- data/lib/starter_web/_plugins/filter/debug.rb +1 -1
- data/lib/starter_web/_plugins/filter/encodeBase64.rb +1 -1
- data/lib/starter_web/_plugins/filter/encryptAES.rb +1 -1
- data/lib/starter_web/_plugins/filter/filters.rb +1 -1
- data/lib/starter_web/_plugins/filter/liquify.rb +1 -1
- data/lib/starter_web/_plugins/filter/minifyJS.rb +1 -1
- data/lib/starter_web/_plugins/filter/minifyJSON.rb +1 -1
- data/lib/starter_web/_plugins/filter/prettify.rb +1 -1
- data/lib/starter_web/_plugins/filter/xml_prettify.rb +1 -1
- data/lib/starter_web/_plugins/helper/symlink_watcher.rb +1 -1
- data/lib/starter_web/_plugins/i18n/date.rb +1 -1
- data/lib/starter_web/_plugins/index/lunr.rb +2 -2
- data/lib/starter_web/_plugins/seo/j1-feed.rb +1 -1
- data/lib/starter_web/_plugins/seo/j1-seo-tags.rb +1 -1
- data/lib/starter_web/_plugins/seo/j1-sitemap.rb +1 -1
- data/lib/starter_web/assets/images/icons/videojs/videojs-logo.png +0 -0
- data/lib/starter_web/assets/images/icons/videojs/videojs-poster.png +0 -0
- data/lib/starter_web/assets/videos/gallery/_video_james_carpool_caraoke_poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/html5/video1-poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/html5/video1.subtitles.vtt +39 -0
- data/lib/starter_web/assets/videos/gallery/html5/video2-poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/html5/303/237video2-poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/video1-poster.1920..jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/video_adele_last_carpool_caraoke_poster.1920.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/video_adele_last_carpool_caraoke_poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/video_gaga-poster.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/video_james_carpool_caraoke_poster.jpg +0 -0
- data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1.adoc.erb +1 -1
- data/lib/starter_web/config.ru +1 -1
- data/lib/starter_web/dot.gitattributes +1 -1
- data/lib/starter_web/dot.nojekyll +1 -1
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/111_about_the_converter.asciidoc +5 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/112_getting_started.asciidoc +3 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/113_themes.asciidoc +1 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/documentation.adoc +11 -7
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/documents/100_chapter.asciidoc +27 -11
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/documents/200_chapter.asciidoc +3 -0
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +12 -7
- data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +14 -7
- data/lib/starter_web/pages/public/features/general.adoc +12 -1
- data/lib/starter_web/pages/public/features/template.adoc +37 -38
- data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_all_books.adoc +4 -3
- data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_biography.adoc +2 -3
- data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_fantasy.adoc +2 -2
- data/lib/starter_web/pages/public/learn/bookshelf/article_previewer/viewer_romance.adoc +2 -2
- data/lib/starter_web/pages/public/learn/bookshelf/jekyll_collections.adoc +6 -5
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/attributes.asciidoc +1 -0
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/themes_rouge.asciidoc +4 -0
- data/lib/starter_web/pages/public/learn/roundtrip/asciidoc_extensions.adoc +6 -5
- data/lib/starter_web/pages/public/learn/roundtrip/bootstrap_themes.adoc +2 -0
- data/lib/starter_web/pages/public/learn/roundtrip/highlghter_rouge.adoc +7 -2
- data/lib/starter_web/pages/public/learn/roundtrip/icon_fonts.adoc +7 -2
- data/lib/starter_web/pages/public/learn/roundtrip/lunr_search.adoc +12 -3
- data/lib/starter_web/pages/public/learn/roundtrip/modal_extentions.adoc +4 -2
- data/lib/starter_web/pages/public/learn/roundtrip/present_images.adoc +84 -93
- data/lib/starter_web/pages/public/learn/roundtrip/present_videos.adoc +264 -64
- data/lib/starter_web/pages/public/learn/roundtrip/responsive_tables.adoc +5 -2
- data/lib/starter_web/pages/public/learn/roundtrip/typography.adoc +1 -0
- data/lib/starter_web/pages/public/learn/where_to_go.adoc +2 -1
- data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +3 -1
- data/lib/starter_web/pages/public/legal/en/200_impress.adoc +3 -1
- data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +2 -39
- data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +2 -2
- data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +3 -2
- data/lib/starter_web/pages/public/plans/plans.adoc +14 -5
- data/lib/starter_web/pages/public/tools/previewer/_includes/attributes.asciidoc +69 -0
- data/lib/starter_web/pages/public/tools/previewer/_includes/documents/readme +0 -0
- data/lib/starter_web/pages/public/tools/previewer/preview_bootstrap_theme.adoc +3093 -3104
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- data/lib/starter_web/utilsrv/server.js +1 -1
- metadata +170 -94
- data/assets/data/galleries.json +0 -156
- data/assets/themes/j1/adapter/js/justifiedGalleryCustomizer.js +0 -360
- data/assets/themes/j1/modules/backstretch/js/v2.1.16/backstretch.js +0 -1694
- data/assets/themes/j1/modules/backstretch/js/v2.1.16/backstretch.min.js +0 -19
- data/assets/themes/j1/modules/iframeResizer/js/client/iframeResizer.contentWindow.map +0 -1
- data/assets/themes/j1/modules/iframeResizer/js/resizer.map +0 -1
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/css/justifiedGallery.css +0 -110
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/css/justifiedGallery.min.css +0 -110
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/css/theme/uno.css +0 -23
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/js/justifiedGallery.3.7.0.js +0 -1229
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/js/justifiedGallery.js +0 -1229
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/js/justifiedGallery.min.js +0 -8
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/less/.csslintrc +0 -20
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.7.0/less/justifiedGallery.less +0 -113
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/css/justifiedGallery.css +0 -110
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/css/justifiedGallery.min.css +0 -110
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/js/justifiedGallery.js +0 -1245
- data/assets/themes/j1/modules/justifiedGallery/_versions/v3.8.0/js/justifiedGallery.min.js +0 -7
- data/assets/themes/j1/modules/justifiedGallery/css/_archived/justifiedGallery.css +0 -110
- data/assets/themes/j1/modules/justifiedGallery/css/_archived/justifiedGallery.min.css +0 -110
- data/assets/themes/j1/modules/lightGallery/css/core/lg-fb-comment-box.css +0 -58
- data/assets/themes/j1/modules/lightGallery/css/core/lg-fb-comment-box.min.css +0 -5
- data/assets/themes/j1/modules/lightGallery/css/core/lg-transitions.css +0 -778
- data/assets/themes/j1/modules/lightGallery/css/core/lg-transitions.min.css +0 -5
- data/assets/themes/j1/modules/lightGallery/css/core/lightgallery.css +0 -981
- data/assets/themes/j1/modules/lightGallery/css/core/lightgallery.min.css +0 -5
- data/assets/themes/j1/modules/lightGallery/css/fonts/lg.eot +0 -0
- data/assets/themes/j1/modules/lightGallery/css/fonts/lg.ttf +0 -0
- data/assets/themes/j1/modules/lightGallery/css/fonts/lg.woff +0 -0
- data/assets/themes/j1/modules/lightGallery/css/themes/uno.css +0 -262
- data/assets/themes/j1/modules/lightGallery/css/themes/uno.min.css +0 -15
- data/assets/themes/j1/modules/lightGallery/js/core/j1/lightgallery.js +0 -1375
- data/assets/themes/j1/modules/lightGallery/js/core/j1/lightgallery.min.js +0 -5
- data/assets/themes/j1/modules/lightGallery/js/core/lightgallery.js +0 -1362
- data/assets/themes/j1/modules/lightGallery/js/core/lightgallery.min.js +0 -4
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-autoplay.js +0 -206
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-autoplay.min.js +0 -5
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-fullscreen.js +0 -126
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-fullscreen.min.js +0 -5
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-hash.js +0 -101
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-hash.min.js +0 -5
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-pager.js +0 -105
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-pager.min.js +0 -5
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-share.js +0 -107
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-share.min.js +0 -5
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-thumbnail.js +0 -486
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-thumbnail.min.js +0 -7
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-zoom.js +0 -527
- data/assets/themes/j1/modules/lightGallery/js/modules/lg-zoom.min.js +0 -5
- data/assets/themes/j1/modules/msDropdown/js/msDropdown.min.js.map +0 -1
- data/assets/themes/j1/modules/popper/js/popper.min.js.map +0 -1
- data/assets/themes/j1/modules/rangeSlider/js/15.5.1/nouislider.js +0 -2337
- data/assets/themes/j1/modules/rangeSlider/js/15.5.1/nouislider.min.js +0 -1
- data/assets/themes/j1/modules/rangeSlider/js/9.1.0/nouislider.js +0 -2534
- data/assets/themes/j1/modules/slick/lightbox/js/slick-lightbox.min.js.map +0 -1
- data/assets/themes/j1/modules/themeSwitcher/js/_unsued/switcher.1.js +0 -454
- data/assets/themes/j1/modules/vimeo/froogaloop/js/froogaloop2.js +0 -4
- data/assets/themes/j1/modules/vimeo/froogaloop/js/froogaloop2.min.js +0 -4
- data/assets/themes/j1/modules/vimeo/player/js/player.js +0 -2138
- data/assets/themes/j1/modules/vimeo/player/js/player.js.map +0 -1
- data/assets/themes/j1/modules/vimeo/player/js/player.min.js +0 -2
- data/assets/themes/j1/modules/vimeo/player/js/player.min.js.map +0 -1
- data/lib/starter_web/_data/modules/justifiedGallery.yml +0 -556
- data/lib/starter_web/assets/videos/gallery/vk/hai.jpg +0 -0
- data/lib/starter_web/assets/videos/gallery/vk/otter.jpg +0 -0
- /data/assets/themes/j1/modules/backstretch/{LICENSE-MIT → LICENSE} +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/animation-w.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/customize-w.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/dynamic-w.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/facebook-icon.svg +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/googleplus-icon.svg +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/html5-w.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/linked-in.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/module-w.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/play-button.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/responsive-w.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/thumb-w.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/touch-w.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/twitter-icon.svg +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/twitter.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/video1-w.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/zoom-w.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/css/themes/{icons → uno/icons}/zoom.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/{css/img → images}/loading.gif +0 -0
- /data/assets/themes/j1/modules/lightGallery/{css/img → img}/video-play.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/{css/img → img}/vimeo-play.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/{css/img → img}/youtube-play.png +0 -0
- /data/assets/themes/j1/modules/lightGallery/js/{modules → plugins}/j1/j1-video.js +0 -0
- /data/assets/themes/j1/modules/lightGallery/js/{modules → plugins}/j1/j1-video.min.js +0 -0
@@ -1,2337 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Materialize 1.0.0 (http://materializecss.com)
|
3
|
-
* Copyright 2014-2015 Materialize
|
4
|
-
* MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
|
5
|
-
*/
|
6
|
-
|
7
|
-
// wNumb
|
8
|
-
(function() {
|
9
|
-
function r(b) {
|
10
|
-
return b.split("").reverse().join("")
|
11
|
-
}
|
12
|
-
function s(b, f, c) {
|
13
|
-
if ((b[f] || b[c]) && b[f] === b[c])
|
14
|
-
throw Error(f);
|
15
|
-
}
|
16
|
-
function v(b, f, c, d, e, p, q, k, l, h, n, a) {
|
17
|
-
q = a;
|
18
|
-
var m, g = n = "";
|
19
|
-
p && (a = p(a));
|
20
|
-
if ("number" !== typeof a || !isFinite(a))
|
21
|
-
return !1;
|
22
|
-
b && 0 === parseFloat(a.toFixed(b)) && (a = 0);
|
23
|
-
0 > a && (m = !0,
|
24
|
-
a = Math.abs(a));
|
25
|
-
b && (p = Math.pow(10, b),
|
26
|
-
a = (Math.round(a * p) / p).toFixed(b));
|
27
|
-
a = a.toString();
|
28
|
-
-1 !== a.indexOf(".") && (b = a.split("."),
|
29
|
-
a = b[0],
|
30
|
-
c && (n = c + b[1]));
|
31
|
-
f && (a = r(a).match(/.{1,3}/g),
|
32
|
-
a = r(a.join(r(f))));
|
33
|
-
m && k && (g += k);
|
34
|
-
d && (g += d);
|
35
|
-
m && l && (g += l);
|
36
|
-
g = g + a + n;
|
37
|
-
e && (g += e);
|
38
|
-
h && (g = h(g, q));
|
39
|
-
return g
|
40
|
-
}
|
41
|
-
function w(b, f, c, d, e, h, q, k, l, r, n, a) {
|
42
|
-
var m;
|
43
|
-
b = "";
|
44
|
-
n && (a = n(a));
|
45
|
-
if (!a || "string" !== typeof a)
|
46
|
-
return !1;
|
47
|
-
k && a.substring(0, k.length) === k && (a = a.replace(k, ""),
|
48
|
-
m = !0);
|
49
|
-
d && a.substring(0, d.length) === d && (a = a.replace(d, ""));
|
50
|
-
l && a.substring(0, l.length) === l && (a = a.replace(l, ""),
|
51
|
-
m = !0);
|
52
|
-
e && a.slice(-1 * e.length) === e && (a = a.slice(0, -1 * e.length));
|
53
|
-
f && (a = a.split(f).join(""));
|
54
|
-
c && (a = a.replace(c, "."));
|
55
|
-
m && (b += "-");
|
56
|
-
b = Number((b + a).replace(/[^0-9\.\-.]/g, ""));
|
57
|
-
q && (b = q(b));
|
58
|
-
return "number" === typeof b && isFinite(b) ? b : !1
|
59
|
-
}
|
60
|
-
function x(b) {
|
61
|
-
var f, c, d, e = {};
|
62
|
-
for (f = 0; f < h.length; f += 1)
|
63
|
-
c = h[f],
|
64
|
-
d = b[c],
|
65
|
-
void 0 === d ? e[c] = "negative" !== c || e.negativeBefore ? "mark" === c && "." !== e.thousand ? "." : !1 : "-" : "decimals" === c ? 0 < d && 8 > d && (e[c] = d) : "encoder" === c || "decoder" === c || "edit" === c || "undo" === c ? "function" === typeof d && (e[c] = d) : "string" === typeof d && (e[c] = d);
|
66
|
-
s(e, "mark", "thousand");
|
67
|
-
s(e, "prefix", "negative");
|
68
|
-
s(e, "prefix", "negativeBefore");
|
69
|
-
return e
|
70
|
-
}
|
71
|
-
function u(b, f, c) {
|
72
|
-
var d, e = [];
|
73
|
-
for (d = 0; d < h.length; d += 1)
|
74
|
-
e.push(b[h[d]]);
|
75
|
-
e.push(c);
|
76
|
-
return f.apply("", e)
|
77
|
-
}
|
78
|
-
function t(b) {
|
79
|
-
if (!(this instanceof t))
|
80
|
-
return new t(b);
|
81
|
-
"object" === typeof b && (b = x(b),
|
82
|
-
this.to = function(f) {
|
83
|
-
return u(b, v, f)
|
84
|
-
}
|
85
|
-
,
|
86
|
-
this.from = function(f) {
|
87
|
-
return u(b, w, f)
|
88
|
-
}
|
89
|
-
)
|
90
|
-
}
|
91
|
-
var h = "decimals thousand mark prefix postfix encoder decoder negativeBefore negative edit undo".split(" ");
|
92
|
-
window.wNumb = t
|
93
|
-
}
|
94
|
-
)();
|
95
|
-
|
96
|
-
/*! nouislider - 9.1.0 - 2016-12-10 16:00:32 */
|
97
|
-
|
98
|
-
(function (global, factory) {
|
99
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
100
|
-
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
101
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.noUiSlider = {}));
|
102
|
-
})(this, (function (exports) { 'use strict';
|
103
|
-
|
104
|
-
exports.PipsMode = void 0;
|
105
|
-
(function (PipsMode) {
|
106
|
-
PipsMode["Range"] = "range";
|
107
|
-
PipsMode["Steps"] = "steps";
|
108
|
-
PipsMode["Positions"] = "positions";
|
109
|
-
PipsMode["Count"] = "count";
|
110
|
-
PipsMode["Values"] = "values";
|
111
|
-
})(exports.PipsMode || (exports.PipsMode = {}));
|
112
|
-
exports.PipsType = void 0;
|
113
|
-
(function (PipsType) {
|
114
|
-
PipsType[PipsType["None"] = -1] = "None";
|
115
|
-
PipsType[PipsType["NoValue"] = 0] = "NoValue";
|
116
|
-
PipsType[PipsType["LargeValue"] = 1] = "LargeValue";
|
117
|
-
PipsType[PipsType["SmallValue"] = 2] = "SmallValue";
|
118
|
-
})(exports.PipsType || (exports.PipsType = {}));
|
119
|
-
//region Helper Methods
|
120
|
-
function isValidFormatter(entry) {
|
121
|
-
return isValidPartialFormatter(entry) && typeof entry.from === "function";
|
122
|
-
}
|
123
|
-
function isValidPartialFormatter(entry) {
|
124
|
-
// partial formatters only need a to function and not a from function
|
125
|
-
return typeof entry === "object" && typeof entry.to === "function";
|
126
|
-
}
|
127
|
-
function removeElement(el) {
|
128
|
-
el.parentElement.removeChild(el);
|
129
|
-
}
|
130
|
-
function isSet(value) {
|
131
|
-
return value !== null && value !== undefined;
|
132
|
-
}
|
133
|
-
// Bindable version
|
134
|
-
function preventDefault(e) {
|
135
|
-
e.preventDefault();
|
136
|
-
}
|
137
|
-
// Removes duplicates from an array.
|
138
|
-
function unique(array) {
|
139
|
-
return array.filter(function (a) {
|
140
|
-
return !this[a] ? (this[a] = true) : false;
|
141
|
-
}, {});
|
142
|
-
}
|
143
|
-
// Round a value to the closest 'to'.
|
144
|
-
function closest(value, to) {
|
145
|
-
return Math.round(value / to) * to;
|
146
|
-
}
|
147
|
-
// Current position of an element relative to the document.
|
148
|
-
function offset(elem, orientation) {
|
149
|
-
var rect = elem.getBoundingClientRect();
|
150
|
-
var doc = elem.ownerDocument;
|
151
|
-
var docElem = doc.documentElement;
|
152
|
-
var pageOffset = getPageOffset(doc);
|
153
|
-
// getBoundingClientRect contains left scroll in Chrome on Android.
|
154
|
-
// I haven't found a feature detection that proves this. Worst case
|
155
|
-
// scenario on mis-match: the 'tap' feature on horizontal sliders breaks.
|
156
|
-
if (/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)) {
|
157
|
-
pageOffset.x = 0;
|
158
|
-
}
|
159
|
-
return orientation ? rect.top + pageOffset.y - docElem.clientTop : rect.left + pageOffset.x - docElem.clientLeft;
|
160
|
-
}
|
161
|
-
// Checks whether a value is numerical.
|
162
|
-
function isNumeric(a) {
|
163
|
-
return typeof a === "number" && !isNaN(a) && isFinite(a);
|
164
|
-
}
|
165
|
-
// Sets a class and removes it after [duration] ms.
|
166
|
-
function addClassFor(element, className, duration) {
|
167
|
-
if (duration > 0) {
|
168
|
-
addClass(element, className);
|
169
|
-
setTimeout(function () {
|
170
|
-
removeClass(element, className);
|
171
|
-
}, duration);
|
172
|
-
}
|
173
|
-
}
|
174
|
-
// Limits a value to 0 - 100
|
175
|
-
function limit(a) {
|
176
|
-
return Math.max(Math.min(a, 100), 0);
|
177
|
-
}
|
178
|
-
// Wraps a variable as an array, if it isn't one yet.
|
179
|
-
// Note that an input array is returned by reference!
|
180
|
-
function asArray(a) {
|
181
|
-
return Array.isArray(a) ? a : [a];
|
182
|
-
}
|
183
|
-
// Counts decimals
|
184
|
-
function countDecimals(numStr) {
|
185
|
-
numStr = String(numStr);
|
186
|
-
var pieces = numStr.split(".");
|
187
|
-
return pieces.length > 1 ? pieces[1].length : 0;
|
188
|
-
}
|
189
|
-
// http://youmightnotneedjquery.com/#add_class
|
190
|
-
function addClass(el, className) {
|
191
|
-
if (el.classList && !/\s/.test(className)) {
|
192
|
-
el.classList.add(className);
|
193
|
-
}
|
194
|
-
else {
|
195
|
-
el.className += " " + className;
|
196
|
-
}
|
197
|
-
}
|
198
|
-
// http://youmightnotneedjquery.com/#remove_class
|
199
|
-
function removeClass(el, className) {
|
200
|
-
if (el.classList && !/\s/.test(className)) {
|
201
|
-
el.classList.remove(className);
|
202
|
-
}
|
203
|
-
else {
|
204
|
-
el.className = el.className.replace(new RegExp("(^|\\b)" + className.split(" ").join("|") + "(\\b|$)", "gi"), " ");
|
205
|
-
}
|
206
|
-
}
|
207
|
-
// https://plainjs.com/javascript/attributes/adding-removing-and-testing-for-classes-9/
|
208
|
-
function hasClass(el, className) {
|
209
|
-
return el.classList ? el.classList.contains(className) : new RegExp("\\b" + className + "\\b").test(el.className);
|
210
|
-
}
|
211
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY#Notes
|
212
|
-
function getPageOffset(doc) {
|
213
|
-
var supportPageOffset = window.pageXOffset !== undefined;
|
214
|
-
var isCSS1Compat = (doc.compatMode || "") === "CSS1Compat";
|
215
|
-
var x = supportPageOffset
|
216
|
-
? window.pageXOffset
|
217
|
-
: isCSS1Compat
|
218
|
-
? doc.documentElement.scrollLeft
|
219
|
-
: doc.body.scrollLeft;
|
220
|
-
var y = supportPageOffset
|
221
|
-
? window.pageYOffset
|
222
|
-
: isCSS1Compat
|
223
|
-
? doc.documentElement.scrollTop
|
224
|
-
: doc.body.scrollTop;
|
225
|
-
return {
|
226
|
-
x: x,
|
227
|
-
y: y,
|
228
|
-
};
|
229
|
-
}
|
230
|
-
// we provide a function to compute constants instead
|
231
|
-
// of accessing window.* as soon as the module needs it
|
232
|
-
// so that we do not compute anything if not needed
|
233
|
-
function getActions() {
|
234
|
-
// Determine the events to bind. IE11 implements pointerEvents without
|
235
|
-
// a prefix, which breaks compatibility with the IE10 implementation.
|
236
|
-
return window.navigator.pointerEnabled
|
237
|
-
? {
|
238
|
-
start: "pointerdown",
|
239
|
-
move: "pointermove",
|
240
|
-
end: "pointerup",
|
241
|
-
}
|
242
|
-
: window.navigator.msPointerEnabled
|
243
|
-
? {
|
244
|
-
start: "MSPointerDown",
|
245
|
-
move: "MSPointerMove",
|
246
|
-
end: "MSPointerUp",
|
247
|
-
}
|
248
|
-
: {
|
249
|
-
start: "mousedown touchstart",
|
250
|
-
move: "mousemove touchmove",
|
251
|
-
end: "mouseup touchend",
|
252
|
-
};
|
253
|
-
}
|
254
|
-
// https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
|
255
|
-
// Issue #785
|
256
|
-
function getSupportsPassive() {
|
257
|
-
var supportsPassive = false;
|
258
|
-
/* eslint-disable */
|
259
|
-
try {
|
260
|
-
var opts = Object.defineProperty({}, "passive", {
|
261
|
-
get: function () {
|
262
|
-
supportsPassive = true;
|
263
|
-
},
|
264
|
-
});
|
265
|
-
// @ts-ignore
|
266
|
-
window.addEventListener("test", null, opts);
|
267
|
-
}
|
268
|
-
catch (e) { }
|
269
|
-
/* eslint-enable */
|
270
|
-
return supportsPassive;
|
271
|
-
}
|
272
|
-
function getSupportsTouchActionNone() {
|
273
|
-
return window.CSS && CSS.supports && CSS.supports("touch-action", "none");
|
274
|
-
}
|
275
|
-
//endregion
|
276
|
-
//region Range Calculation
|
277
|
-
// Determine the size of a sub-range in relation to a full range.
|
278
|
-
function subRangeRatio(pa, pb) {
|
279
|
-
return 100 / (pb - pa);
|
280
|
-
}
|
281
|
-
// (percentage) How many percent is this value of this range?
|
282
|
-
function fromPercentage(range, value, startRange) {
|
283
|
-
return (value * 100) / (range[startRange + 1] - range[startRange]);
|
284
|
-
}
|
285
|
-
// (percentage) Where is this value on this range?
|
286
|
-
function toPercentage(range, value) {
|
287
|
-
return fromPercentage(range, range[0] < 0 ? value + Math.abs(range[0]) : value - range[0], 0);
|
288
|
-
}
|
289
|
-
// (value) How much is this percentage on this range?
|
290
|
-
function isPercentage(range, value) {
|
291
|
-
return (value * (range[1] - range[0])) / 100 + range[0];
|
292
|
-
}
|
293
|
-
function getJ(value, arr) {
|
294
|
-
var j = 1;
|
295
|
-
while (value >= arr[j]) {
|
296
|
-
j += 1;
|
297
|
-
}
|
298
|
-
return j;
|
299
|
-
}
|
300
|
-
// (percentage) Input a value, find where, on a scale of 0-100, it applies.
|
301
|
-
function toStepping(xVal, xPct, value) {
|
302
|
-
if (value >= xVal.slice(-1)[0]) {
|
303
|
-
return 100;
|
304
|
-
}
|
305
|
-
var j = getJ(value, xVal);
|
306
|
-
var va = xVal[j - 1];
|
307
|
-
var vb = xVal[j];
|
308
|
-
var pa = xPct[j - 1];
|
309
|
-
var pb = xPct[j];
|
310
|
-
return pa + toPercentage([va, vb], value) / subRangeRatio(pa, pb);
|
311
|
-
}
|
312
|
-
// (value) Input a percentage, find where it is on the specified range.
|
313
|
-
function fromStepping(xVal, xPct, value) {
|
314
|
-
// There is no range group that fits 100
|
315
|
-
if (value >= 100) {
|
316
|
-
return xVal.slice(-1)[0];
|
317
|
-
}
|
318
|
-
var j = getJ(value, xPct);
|
319
|
-
var va = xVal[j - 1];
|
320
|
-
var vb = xVal[j];
|
321
|
-
var pa = xPct[j - 1];
|
322
|
-
var pb = xPct[j];
|
323
|
-
return isPercentage([va, vb], (value - pa) * subRangeRatio(pa, pb));
|
324
|
-
}
|
325
|
-
// (percentage) Get the step that applies at a certain value.
|
326
|
-
function getStep(xPct, xSteps, snap, value) {
|
327
|
-
if (value === 100) {
|
328
|
-
return value;
|
329
|
-
}
|
330
|
-
var j = getJ(value, xPct);
|
331
|
-
var a = xPct[j - 1];
|
332
|
-
var b = xPct[j];
|
333
|
-
// If 'snap' is set, steps are used as fixed points on the slider.
|
334
|
-
if (snap) {
|
335
|
-
// Find the closest position, a or b.
|
336
|
-
if (value - a > (b - a) / 2) {
|
337
|
-
return b;
|
338
|
-
}
|
339
|
-
return a;
|
340
|
-
}
|
341
|
-
if (!xSteps[j - 1]) {
|
342
|
-
return value;
|
343
|
-
}
|
344
|
-
return xPct[j - 1] + closest(value - xPct[j - 1], xSteps[j - 1]);
|
345
|
-
}
|
346
|
-
//endregion
|
347
|
-
//region Spectrum
|
348
|
-
var Spectrum = /** @class */ (function () {
|
349
|
-
function Spectrum(entry, snap, singleStep) {
|
350
|
-
this.xPct = [];
|
351
|
-
this.xVal = [];
|
352
|
-
this.xSteps = [];
|
353
|
-
this.xNumSteps = [];
|
354
|
-
this.xHighestCompleteStep = [];
|
355
|
-
this.xSteps = [singleStep || false];
|
356
|
-
this.xNumSteps = [false];
|
357
|
-
this.snap = snap;
|
358
|
-
var index;
|
359
|
-
var ordered = [];
|
360
|
-
// Map the object keys to an array.
|
361
|
-
Object.keys(entry).forEach(function (index) {
|
362
|
-
ordered.push([asArray(entry[index]), index]);
|
363
|
-
});
|
364
|
-
// Sort all entries by value (numeric sort).
|
365
|
-
ordered.sort(function (a, b) {
|
366
|
-
return a[0][0] - b[0][0];
|
367
|
-
});
|
368
|
-
// Convert all entries to subranges.
|
369
|
-
for (index = 0; index < ordered.length; index++) {
|
370
|
-
this.handleEntryPoint(ordered[index][1], ordered[index][0]);
|
371
|
-
}
|
372
|
-
// Store the actual step values.
|
373
|
-
// xSteps is sorted in the same order as xPct and xVal.
|
374
|
-
this.xNumSteps = this.xSteps.slice(0);
|
375
|
-
// Convert all numeric steps to the percentage of the subrange they represent.
|
376
|
-
for (index = 0; index < this.xNumSteps.length; index++) {
|
377
|
-
this.handleStepPoint(index, this.xNumSteps[index]);
|
378
|
-
}
|
379
|
-
}
|
380
|
-
Spectrum.prototype.getDistance = function (value) {
|
381
|
-
var distances = [];
|
382
|
-
for (var index = 0; index < this.xNumSteps.length - 1; index++) {
|
383
|
-
distances[index] = fromPercentage(this.xVal, value, index);
|
384
|
-
}
|
385
|
-
return distances;
|
386
|
-
};
|
387
|
-
// Calculate the percentual distance over the whole scale of ranges.
|
388
|
-
// direction: 0 = backwards / 1 = forwards
|
389
|
-
Spectrum.prototype.getAbsoluteDistance = function (value, distances, direction) {
|
390
|
-
var xPct_index = 0;
|
391
|
-
// Calculate range where to start calculation
|
392
|
-
if (value < this.xPct[this.xPct.length - 1]) {
|
393
|
-
while (value > this.xPct[xPct_index + 1]) {
|
394
|
-
xPct_index++;
|
395
|
-
}
|
396
|
-
}
|
397
|
-
else if (value === this.xPct[this.xPct.length - 1]) {
|
398
|
-
xPct_index = this.xPct.length - 2;
|
399
|
-
}
|
400
|
-
// If looking backwards and the value is exactly at a range separator then look one range further
|
401
|
-
if (!direction && value === this.xPct[xPct_index + 1]) {
|
402
|
-
xPct_index++;
|
403
|
-
}
|
404
|
-
if (distances === null) {
|
405
|
-
distances = [];
|
406
|
-
}
|
407
|
-
var start_factor;
|
408
|
-
var rest_factor = 1;
|
409
|
-
var rest_rel_distance = distances[xPct_index];
|
410
|
-
var range_pct = 0;
|
411
|
-
var rel_range_distance = 0;
|
412
|
-
var abs_distance_counter = 0;
|
413
|
-
var range_counter = 0;
|
414
|
-
// Calculate what part of the start range the value is
|
415
|
-
if (direction) {
|
416
|
-
start_factor = (value - this.xPct[xPct_index]) / (this.xPct[xPct_index + 1] - this.xPct[xPct_index]);
|
417
|
-
}
|
418
|
-
else {
|
419
|
-
start_factor = (this.xPct[xPct_index + 1] - value) / (this.xPct[xPct_index + 1] - this.xPct[xPct_index]);
|
420
|
-
}
|
421
|
-
// Do until the complete distance across ranges is calculated
|
422
|
-
while (rest_rel_distance > 0) {
|
423
|
-
// Calculate the percentage of total range
|
424
|
-
range_pct = this.xPct[xPct_index + 1 + range_counter] - this.xPct[xPct_index + range_counter];
|
425
|
-
// Detect if the margin, padding or limit is larger then the current range and calculate
|
426
|
-
if (distances[xPct_index + range_counter] * rest_factor + 100 - start_factor * 100 > 100) {
|
427
|
-
// If larger then take the percentual distance of the whole range
|
428
|
-
rel_range_distance = range_pct * start_factor;
|
429
|
-
// Rest factor of relative percentual distance still to be calculated
|
430
|
-
rest_factor = (rest_rel_distance - 100 * start_factor) / distances[xPct_index + range_counter];
|
431
|
-
// Set start factor to 1 as for next range it does not apply.
|
432
|
-
start_factor = 1;
|
433
|
-
}
|
434
|
-
else {
|
435
|
-
// If smaller or equal then take the percentual distance of the calculate percentual part of that range
|
436
|
-
rel_range_distance = ((distances[xPct_index + range_counter] * range_pct) / 100) * rest_factor;
|
437
|
-
// No rest left as the rest fits in current range
|
438
|
-
rest_factor = 0;
|
439
|
-
}
|
440
|
-
if (direction) {
|
441
|
-
abs_distance_counter = abs_distance_counter - rel_range_distance;
|
442
|
-
// Limit range to first range when distance becomes outside of minimum range
|
443
|
-
if (this.xPct.length + range_counter >= 1) {
|
444
|
-
range_counter--;
|
445
|
-
}
|
446
|
-
}
|
447
|
-
else {
|
448
|
-
abs_distance_counter = abs_distance_counter + rel_range_distance;
|
449
|
-
// Limit range to last range when distance becomes outside of maximum range
|
450
|
-
if (this.xPct.length - range_counter >= 1) {
|
451
|
-
range_counter++;
|
452
|
-
}
|
453
|
-
}
|
454
|
-
// Rest of relative percentual distance still to be calculated
|
455
|
-
rest_rel_distance = distances[xPct_index + range_counter] * rest_factor;
|
456
|
-
}
|
457
|
-
return value + abs_distance_counter;
|
458
|
-
};
|
459
|
-
Spectrum.prototype.toStepping = function (value) {
|
460
|
-
value = toStepping(this.xVal, this.xPct, value);
|
461
|
-
return value;
|
462
|
-
};
|
463
|
-
Spectrum.prototype.fromStepping = function (value) {
|
464
|
-
return fromStepping(this.xVal, this.xPct, value);
|
465
|
-
};
|
466
|
-
Spectrum.prototype.getStep = function (value) {
|
467
|
-
value = getStep(this.xPct, this.xSteps, this.snap, value);
|
468
|
-
return value;
|
469
|
-
};
|
470
|
-
Spectrum.prototype.getDefaultStep = function (value, isDown, size) {
|
471
|
-
var j = getJ(value, this.xPct);
|
472
|
-
// When at the top or stepping down, look at the previous sub-range
|
473
|
-
if (value === 100 || (isDown && value === this.xPct[j - 1])) {
|
474
|
-
j = Math.max(j - 1, 1);
|
475
|
-
}
|
476
|
-
return (this.xVal[j] - this.xVal[j - 1]) / size;
|
477
|
-
};
|
478
|
-
Spectrum.prototype.getNearbySteps = function (value) {
|
479
|
-
var j = getJ(value, this.xPct);
|
480
|
-
return {
|
481
|
-
stepBefore: {
|
482
|
-
startValue: this.xVal[j - 2],
|
483
|
-
step: this.xNumSteps[j - 2],
|
484
|
-
highestStep: this.xHighestCompleteStep[j - 2],
|
485
|
-
},
|
486
|
-
thisStep: {
|
487
|
-
startValue: this.xVal[j - 1],
|
488
|
-
step: this.xNumSteps[j - 1],
|
489
|
-
highestStep: this.xHighestCompleteStep[j - 1],
|
490
|
-
},
|
491
|
-
stepAfter: {
|
492
|
-
startValue: this.xVal[j],
|
493
|
-
step: this.xNumSteps[j],
|
494
|
-
highestStep: this.xHighestCompleteStep[j],
|
495
|
-
},
|
496
|
-
};
|
497
|
-
};
|
498
|
-
Spectrum.prototype.countStepDecimals = function () {
|
499
|
-
var stepDecimals = this.xNumSteps.map(countDecimals);
|
500
|
-
return Math.max.apply(null, stepDecimals);
|
501
|
-
};
|
502
|
-
Spectrum.prototype.hasNoSize = function () {
|
503
|
-
return this.xVal[0] === this.xVal[this.xVal.length - 1];
|
504
|
-
};
|
505
|
-
// Outside testing
|
506
|
-
Spectrum.prototype.convert = function (value) {
|
507
|
-
return this.getStep(this.toStepping(value));
|
508
|
-
};
|
509
|
-
Spectrum.prototype.handleEntryPoint = function (index, value) {
|
510
|
-
var percentage;
|
511
|
-
// Covert min/max syntax to 0 and 100.
|
512
|
-
if (index === "min") {
|
513
|
-
percentage = 0;
|
514
|
-
}
|
515
|
-
else if (index === "max") {
|
516
|
-
percentage = 100;
|
517
|
-
}
|
518
|
-
else {
|
519
|
-
percentage = parseFloat(index);
|
520
|
-
}
|
521
|
-
// Check for correct input.
|
522
|
-
if (!isNumeric(percentage) || !isNumeric(value[0])) {
|
523
|
-
throw new Error("noUiSlider: 'range' value isn't numeric.");
|
524
|
-
}
|
525
|
-
// Store values.
|
526
|
-
this.xPct.push(percentage);
|
527
|
-
this.xVal.push(value[0]);
|
528
|
-
var value1 = Number(value[1]);
|
529
|
-
// NaN will evaluate to false too, but to keep
|
530
|
-
// logging clear, set step explicitly. Make sure
|
531
|
-
// not to override the 'step' setting with false.
|
532
|
-
if (!percentage) {
|
533
|
-
if (!isNaN(value1)) {
|
534
|
-
this.xSteps[0] = value1;
|
535
|
-
}
|
536
|
-
}
|
537
|
-
else {
|
538
|
-
this.xSteps.push(isNaN(value1) ? false : value1);
|
539
|
-
}
|
540
|
-
this.xHighestCompleteStep.push(0);
|
541
|
-
};
|
542
|
-
Spectrum.prototype.handleStepPoint = function (i, n) {
|
543
|
-
// Ignore 'false' stepping.
|
544
|
-
if (!n) {
|
545
|
-
return;
|
546
|
-
}
|
547
|
-
// Step over zero-length ranges (#948);
|
548
|
-
if (this.xVal[i] === this.xVal[i + 1]) {
|
549
|
-
this.xSteps[i] = this.xHighestCompleteStep[i] = this.xVal[i];
|
550
|
-
return;
|
551
|
-
}
|
552
|
-
// Factor to range ratio
|
553
|
-
this.xSteps[i] =
|
554
|
-
fromPercentage([this.xVal[i], this.xVal[i + 1]], n, 0) / subRangeRatio(this.xPct[i], this.xPct[i + 1]);
|
555
|
-
var totalSteps = (this.xVal[i + 1] - this.xVal[i]) / this.xNumSteps[i];
|
556
|
-
var highestStep = Math.ceil(Number(totalSteps.toFixed(3)) - 1);
|
557
|
-
var step = this.xVal[i] + this.xNumSteps[i] * highestStep;
|
558
|
-
this.xHighestCompleteStep[i] = step;
|
559
|
-
};
|
560
|
-
return Spectrum;
|
561
|
-
}());
|
562
|
-
//endregion
|
563
|
-
//region Options
|
564
|
-
/* Every input option is tested and parsed. This will prevent
|
565
|
-
endless validation in internal methods. These tests are
|
566
|
-
structured with an item for every option available. An
|
567
|
-
option can be marked as required by setting the 'r' flag.
|
568
|
-
The testing function is provided with three arguments:
|
569
|
-
- The provided value for the option;
|
570
|
-
- A reference to the options object;
|
571
|
-
- The name for the option;
|
572
|
-
|
573
|
-
The testing function returns false when an error is detected,
|
574
|
-
or true when everything is OK. It can also modify the option
|
575
|
-
object, to make sure all values can be correctly looped elsewhere. */
|
576
|
-
//region Defaults
|
577
|
-
var defaultFormatter = {
|
578
|
-
to: function (value) {
|
579
|
-
return value === undefined ? "" : value.toFixed(2);
|
580
|
-
},
|
581
|
-
from: Number,
|
582
|
-
};
|
583
|
-
var cssClasses = {
|
584
|
-
target: "target",
|
585
|
-
base: "base",
|
586
|
-
origin: "origin",
|
587
|
-
handle: "handle",
|
588
|
-
handleLower: "handle-lower",
|
589
|
-
handleUpper: "handle-upper",
|
590
|
-
touchArea: "touch-area",
|
591
|
-
horizontal: "horizontal",
|
592
|
-
vertical: "vertical",
|
593
|
-
background: "background",
|
594
|
-
connect: "connect",
|
595
|
-
connects: "connects",
|
596
|
-
ltr: "ltr",
|
597
|
-
rtl: "rtl",
|
598
|
-
textDirectionLtr: "txt-dir-ltr",
|
599
|
-
textDirectionRtl: "txt-dir-rtl",
|
600
|
-
draggable: "draggable",
|
601
|
-
drag: "state-drag",
|
602
|
-
tap: "state-tap",
|
603
|
-
active: "active",
|
604
|
-
tooltip: "tooltip",
|
605
|
-
pips: "pips",
|
606
|
-
pipsHorizontal: "pips-horizontal",
|
607
|
-
pipsVertical: "pips-vertical",
|
608
|
-
marker: "marker",
|
609
|
-
markerHorizontal: "marker-horizontal",
|
610
|
-
markerVertical: "marker-vertical",
|
611
|
-
markerNormal: "marker-normal",
|
612
|
-
markerLarge: "marker-large",
|
613
|
-
markerSub: "marker-sub",
|
614
|
-
value: "value",
|
615
|
-
valueHorizontal: "value-horizontal",
|
616
|
-
valueVertical: "value-vertical",
|
617
|
-
valueNormal: "value-normal",
|
618
|
-
valueLarge: "value-large",
|
619
|
-
valueSub: "value-sub",
|
620
|
-
};
|
621
|
-
// Namespaces of internal event listeners
|
622
|
-
var INTERNAL_EVENT_NS = {
|
623
|
-
tooltips: ".__tooltips",
|
624
|
-
aria: ".__aria",
|
625
|
-
};
|
626
|
-
//endregion
|
627
|
-
function testStep(parsed, entry) {
|
628
|
-
if (!isNumeric(entry)) {
|
629
|
-
throw new Error("noUiSlider: 'step' is not numeric.");
|
630
|
-
}
|
631
|
-
// The step option can still be used to set stepping
|
632
|
-
// for linear sliders. Overwritten if set in 'range'.
|
633
|
-
parsed.singleStep = entry;
|
634
|
-
}
|
635
|
-
function testKeyboardPageMultiplier(parsed, entry) {
|
636
|
-
if (!isNumeric(entry)) {
|
637
|
-
throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");
|
638
|
-
}
|
639
|
-
parsed.keyboardPageMultiplier = entry;
|
640
|
-
}
|
641
|
-
function testKeyboardMultiplier(parsed, entry) {
|
642
|
-
if (!isNumeric(entry)) {
|
643
|
-
throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");
|
644
|
-
}
|
645
|
-
parsed.keyboardMultiplier = entry;
|
646
|
-
}
|
647
|
-
function testKeyboardDefaultStep(parsed, entry) {
|
648
|
-
if (!isNumeric(entry)) {
|
649
|
-
throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");
|
650
|
-
}
|
651
|
-
parsed.keyboardDefaultStep = entry;
|
652
|
-
}
|
653
|
-
function testRange(parsed, entry) {
|
654
|
-
// Filter incorrect input.
|
655
|
-
if (typeof entry !== "object" || Array.isArray(entry)) {
|
656
|
-
throw new Error("noUiSlider: 'range' is not an object.");
|
657
|
-
}
|
658
|
-
// Catch missing start or end.
|
659
|
-
if (entry.min === undefined || entry.max === undefined) {
|
660
|
-
throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");
|
661
|
-
}
|
662
|
-
parsed.spectrum = new Spectrum(entry, parsed.snap || false, parsed.singleStep);
|
663
|
-
}
|
664
|
-
function testStart(parsed, entry) {
|
665
|
-
entry = asArray(entry);
|
666
|
-
// Validate input. Values aren't tested, as the public .val method
|
667
|
-
// will always provide a valid location.
|
668
|
-
if (!Array.isArray(entry) || !entry.length) {
|
669
|
-
throw new Error("noUiSlider: 'start' option is incorrect.");
|
670
|
-
}
|
671
|
-
// Store the number of handles.
|
672
|
-
parsed.handles = entry.length;
|
673
|
-
// When the slider is initialized, the .val method will
|
674
|
-
// be called with the start options.
|
675
|
-
parsed.start = entry;
|
676
|
-
}
|
677
|
-
function testSnap(parsed, entry) {
|
678
|
-
if (typeof entry !== "boolean") {
|
679
|
-
throw new Error("noUiSlider: 'snap' option must be a boolean.");
|
680
|
-
}
|
681
|
-
// Enforce 100% stepping within subranges.
|
682
|
-
parsed.snap = entry;
|
683
|
-
}
|
684
|
-
function testAnimate(parsed, entry) {
|
685
|
-
if (typeof entry !== "boolean") {
|
686
|
-
throw new Error("noUiSlider: 'animate' option must be a boolean.");
|
687
|
-
}
|
688
|
-
// Enforce 100% stepping within subranges.
|
689
|
-
parsed.animate = entry;
|
690
|
-
}
|
691
|
-
function testAnimationDuration(parsed, entry) {
|
692
|
-
if (typeof entry !== "number") {
|
693
|
-
throw new Error("noUiSlider: 'animationDuration' option must be a number.");
|
694
|
-
}
|
695
|
-
parsed.animationDuration = entry;
|
696
|
-
}
|
697
|
-
function testConnect(parsed, entry) {
|
698
|
-
var connect = [false];
|
699
|
-
var i;
|
700
|
-
// Map legacy options
|
701
|
-
if (entry === "lower") {
|
702
|
-
entry = [true, false];
|
703
|
-
}
|
704
|
-
else if (entry === "upper") {
|
705
|
-
entry = [false, true];
|
706
|
-
}
|
707
|
-
// Handle boolean options
|
708
|
-
if (entry === true || entry === false) {
|
709
|
-
for (i = 1; i < parsed.handles; i++) {
|
710
|
-
connect.push(entry);
|
711
|
-
}
|
712
|
-
connect.push(false);
|
713
|
-
}
|
714
|
-
// Reject invalid input
|
715
|
-
else if (!Array.isArray(entry) || !entry.length || entry.length !== parsed.handles + 1) {
|
716
|
-
throw new Error("noUiSlider: 'connect' option doesn't match handle count.");
|
717
|
-
}
|
718
|
-
else {
|
719
|
-
connect = entry;
|
720
|
-
}
|
721
|
-
parsed.connect = connect;
|
722
|
-
}
|
723
|
-
function testOrientation(parsed, entry) {
|
724
|
-
// Set orientation to an a numerical value for easy
|
725
|
-
// array selection.
|
726
|
-
switch (entry) {
|
727
|
-
case "horizontal":
|
728
|
-
parsed.ort = 0;
|
729
|
-
break;
|
730
|
-
case "vertical":
|
731
|
-
parsed.ort = 1;
|
732
|
-
break;
|
733
|
-
default:
|
734
|
-
throw new Error("noUiSlider: 'orientation' option is invalid.");
|
735
|
-
}
|
736
|
-
}
|
737
|
-
function testMargin(parsed, entry) {
|
738
|
-
if (!isNumeric(entry)) {
|
739
|
-
throw new Error("noUiSlider: 'margin' option must be numeric.");
|
740
|
-
}
|
741
|
-
// Issue #582
|
742
|
-
if (entry === 0) {
|
743
|
-
return;
|
744
|
-
}
|
745
|
-
parsed.margin = parsed.spectrum.getDistance(entry);
|
746
|
-
}
|
747
|
-
function testLimit(parsed, entry) {
|
748
|
-
if (!isNumeric(entry)) {
|
749
|
-
throw new Error("noUiSlider: 'limit' option must be numeric.");
|
750
|
-
}
|
751
|
-
parsed.limit = parsed.spectrum.getDistance(entry);
|
752
|
-
if (!parsed.limit || parsed.handles < 2) {
|
753
|
-
throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.");
|
754
|
-
}
|
755
|
-
}
|
756
|
-
function testPadding(parsed, entry) {
|
757
|
-
var index;
|
758
|
-
if (!isNumeric(entry) && !Array.isArray(entry)) {
|
759
|
-
throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");
|
760
|
-
}
|
761
|
-
if (Array.isArray(entry) && !(entry.length === 2 || isNumeric(entry[0]) || isNumeric(entry[1]))) {
|
762
|
-
throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");
|
763
|
-
}
|
764
|
-
if (entry === 0) {
|
765
|
-
return;
|
766
|
-
}
|
767
|
-
if (!Array.isArray(entry)) {
|
768
|
-
entry = [entry, entry];
|
769
|
-
}
|
770
|
-
// 'getDistance' returns false for invalid values.
|
771
|
-
parsed.padding = [parsed.spectrum.getDistance(entry[0]), parsed.spectrum.getDistance(entry[1])];
|
772
|
-
for (index = 0; index < parsed.spectrum.xNumSteps.length - 1; index++) {
|
773
|
-
// last "range" can't contain step size as it is purely an endpoint.
|
774
|
-
if (parsed.padding[0][index] < 0 || parsed.padding[1][index] < 0) {
|
775
|
-
throw new Error("noUiSlider: 'padding' option must be a positive number(s).");
|
776
|
-
}
|
777
|
-
}
|
778
|
-
var totalPadding = entry[0] + entry[1];
|
779
|
-
var firstValue = parsed.spectrum.xVal[0];
|
780
|
-
var lastValue = parsed.spectrum.xVal[parsed.spectrum.xVal.length - 1];
|
781
|
-
if (totalPadding / (lastValue - firstValue) > 1) {
|
782
|
-
throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.");
|
783
|
-
}
|
784
|
-
}
|
785
|
-
function testDirection(parsed, entry) {
|
786
|
-
// Set direction as a numerical value for easy parsing.
|
787
|
-
// Invert connection for RTL sliders, so that the proper
|
788
|
-
// handles get the connect/background classes.
|
789
|
-
switch (entry) {
|
790
|
-
case "ltr":
|
791
|
-
parsed.dir = 0;
|
792
|
-
break;
|
793
|
-
case "rtl":
|
794
|
-
parsed.dir = 1;
|
795
|
-
break;
|
796
|
-
default:
|
797
|
-
throw new Error("noUiSlider: 'direction' option was not recognized.");
|
798
|
-
}
|
799
|
-
}
|
800
|
-
function testBehaviour(parsed, entry) {
|
801
|
-
// Make sure the input is a string.
|
802
|
-
if (typeof entry !== "string") {
|
803
|
-
throw new Error("noUiSlider: 'behaviour' must be a string containing options.");
|
804
|
-
}
|
805
|
-
// Check if the string contains any keywords.
|
806
|
-
// None are required.
|
807
|
-
var tap = entry.indexOf("tap") >= 0;
|
808
|
-
var drag = entry.indexOf("drag") >= 0;
|
809
|
-
var fixed = entry.indexOf("fixed") >= 0;
|
810
|
-
var snap = entry.indexOf("snap") >= 0;
|
811
|
-
var hover = entry.indexOf("hover") >= 0;
|
812
|
-
var unconstrained = entry.indexOf("unconstrained") >= 0;
|
813
|
-
var dragAll = entry.indexOf("drag-all") >= 0;
|
814
|
-
if (fixed) {
|
815
|
-
if (parsed.handles !== 2) {
|
816
|
-
throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");
|
817
|
-
}
|
818
|
-
// Use margin to enforce fixed state
|
819
|
-
testMargin(parsed, parsed.start[1] - parsed.start[0]);
|
820
|
-
}
|
821
|
-
if (unconstrained && (parsed.margin || parsed.limit)) {
|
822
|
-
throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");
|
823
|
-
}
|
824
|
-
parsed.events = {
|
825
|
-
tap: tap || snap,
|
826
|
-
drag: drag,
|
827
|
-
dragAll: dragAll,
|
828
|
-
fixed: fixed,
|
829
|
-
snap: snap,
|
830
|
-
hover: hover,
|
831
|
-
unconstrained: unconstrained,
|
832
|
-
};
|
833
|
-
}
|
834
|
-
function testTooltips(parsed, entry) {
|
835
|
-
if (entry === false) {
|
836
|
-
return;
|
837
|
-
}
|
838
|
-
if (entry === true || isValidPartialFormatter(entry)) {
|
839
|
-
parsed.tooltips = [];
|
840
|
-
for (var i = 0; i < parsed.handles; i++) {
|
841
|
-
parsed.tooltips.push(entry);
|
842
|
-
}
|
843
|
-
}
|
844
|
-
else {
|
845
|
-
entry = asArray(entry);
|
846
|
-
if (entry.length !== parsed.handles) {
|
847
|
-
throw new Error("noUiSlider: must pass a formatter for all handles.");
|
848
|
-
}
|
849
|
-
entry.forEach(function (formatter) {
|
850
|
-
if (typeof formatter !== "boolean" && !isValidPartialFormatter(formatter)) {
|
851
|
-
throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.");
|
852
|
-
}
|
853
|
-
});
|
854
|
-
parsed.tooltips = entry;
|
855
|
-
}
|
856
|
-
}
|
857
|
-
function testHandleAttributes(parsed, entry) {
|
858
|
-
if (entry.length !== parsed.handles) {
|
859
|
-
throw new Error("noUiSlider: must pass a attributes for all handles.");
|
860
|
-
}
|
861
|
-
parsed.handleAttributes = entry;
|
862
|
-
}
|
863
|
-
function testAriaFormat(parsed, entry) {
|
864
|
-
if (!isValidPartialFormatter(entry)) {
|
865
|
-
throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");
|
866
|
-
}
|
867
|
-
parsed.ariaFormat = entry;
|
868
|
-
}
|
869
|
-
function testFormat(parsed, entry) {
|
870
|
-
if (!isValidFormatter(entry)) {
|
871
|
-
throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");
|
872
|
-
}
|
873
|
-
parsed.format = entry;
|
874
|
-
}
|
875
|
-
function testKeyboardSupport(parsed, entry) {
|
876
|
-
if (typeof entry !== "boolean") {
|
877
|
-
throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");
|
878
|
-
}
|
879
|
-
parsed.keyboardSupport = entry;
|
880
|
-
}
|
881
|
-
function testDocumentElement(parsed, entry) {
|
882
|
-
// This is an advanced option. Passed values are used without validation.
|
883
|
-
parsed.documentElement = entry;
|
884
|
-
}
|
885
|
-
function testCssPrefix(parsed, entry) {
|
886
|
-
if (typeof entry !== "string" && entry !== false) {
|
887
|
-
throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");
|
888
|
-
}
|
889
|
-
parsed.cssPrefix = entry;
|
890
|
-
}
|
891
|
-
function testCssClasses(parsed, entry) {
|
892
|
-
if (typeof entry !== "object") {
|
893
|
-
throw new Error("noUiSlider: 'cssClasses' must be an object.");
|
894
|
-
}
|
895
|
-
if (typeof parsed.cssPrefix === "string") {
|
896
|
-
parsed.cssClasses = {};
|
897
|
-
Object.keys(entry).forEach(function (key) {
|
898
|
-
parsed.cssClasses[key] = parsed.cssPrefix + entry[key];
|
899
|
-
});
|
900
|
-
}
|
901
|
-
else {
|
902
|
-
parsed.cssClasses = entry;
|
903
|
-
}
|
904
|
-
}
|
905
|
-
// Test all developer settings and parse to assumption-safe values.
|
906
|
-
function testOptions(options) {
|
907
|
-
// To prove a fix for #537, freeze options here.
|
908
|
-
// If the object is modified, an error will be thrown.
|
909
|
-
// Object.freeze(options);
|
910
|
-
var parsed = {
|
911
|
-
margin: null,
|
912
|
-
limit: null,
|
913
|
-
padding: null,
|
914
|
-
animate: true,
|
915
|
-
animationDuration: 300,
|
916
|
-
ariaFormat: defaultFormatter,
|
917
|
-
format: defaultFormatter,
|
918
|
-
};
|
919
|
-
// Tests are executed in the order they are presented here.
|
920
|
-
var tests = {
|
921
|
-
step: { r: false, t: testStep },
|
922
|
-
keyboardPageMultiplier: { r: false, t: testKeyboardPageMultiplier },
|
923
|
-
keyboardMultiplier: { r: false, t: testKeyboardMultiplier },
|
924
|
-
keyboardDefaultStep: { r: false, t: testKeyboardDefaultStep },
|
925
|
-
start: { r: true, t: testStart },
|
926
|
-
connect: { r: true, t: testConnect },
|
927
|
-
direction: { r: true, t: testDirection },
|
928
|
-
snap: { r: false, t: testSnap },
|
929
|
-
animate: { r: false, t: testAnimate },
|
930
|
-
animationDuration: { r: false, t: testAnimationDuration },
|
931
|
-
range: { r: true, t: testRange },
|
932
|
-
orientation: { r: false, t: testOrientation },
|
933
|
-
margin: { r: false, t: testMargin },
|
934
|
-
limit: { r: false, t: testLimit },
|
935
|
-
padding: { r: false, t: testPadding },
|
936
|
-
behaviour: { r: true, t: testBehaviour },
|
937
|
-
ariaFormat: { r: false, t: testAriaFormat },
|
938
|
-
format: { r: false, t: testFormat },
|
939
|
-
tooltips: { r: false, t: testTooltips },
|
940
|
-
keyboardSupport: { r: true, t: testKeyboardSupport },
|
941
|
-
documentElement: { r: false, t: testDocumentElement },
|
942
|
-
cssPrefix: { r: true, t: testCssPrefix },
|
943
|
-
cssClasses: { r: true, t: testCssClasses },
|
944
|
-
handleAttributes: { r: false, t: testHandleAttributes },
|
945
|
-
};
|
946
|
-
var defaults = {
|
947
|
-
connect: false,
|
948
|
-
direction: "ltr",
|
949
|
-
behaviour: "tap",
|
950
|
-
orientation: "horizontal",
|
951
|
-
keyboardSupport: true,
|
952
|
-
cssPrefix: "noUi-",
|
953
|
-
cssClasses: cssClasses,
|
954
|
-
keyboardPageMultiplier: 5,
|
955
|
-
keyboardMultiplier: 1,
|
956
|
-
keyboardDefaultStep: 10,
|
957
|
-
};
|
958
|
-
// AriaFormat defaults to regular format, if any.
|
959
|
-
if (options.format && !options.ariaFormat) {
|
960
|
-
options.ariaFormat = options.format;
|
961
|
-
}
|
962
|
-
// Run all options through a testing mechanism to ensure correct
|
963
|
-
// input. It should be noted that options might get modified to
|
964
|
-
// be handled properly. E.g. wrapping integers in arrays.
|
965
|
-
Object.keys(tests).forEach(function (name) {
|
966
|
-
// If the option isn't set, but it is required, throw an error.
|
967
|
-
if (!isSet(options[name]) && defaults[name] === undefined) {
|
968
|
-
if (tests[name].r) {
|
969
|
-
throw new Error("noUiSlider: '" + name + "' is required.");
|
970
|
-
}
|
971
|
-
return;
|
972
|
-
}
|
973
|
-
tests[name].t(parsed, !isSet(options[name]) ? defaults[name] : options[name]);
|
974
|
-
});
|
975
|
-
// Forward pips options
|
976
|
-
parsed.pips = options.pips;
|
977
|
-
// All recent browsers accept unprefixed transform.
|
978
|
-
// We need -ms- for IE9 and -webkit- for older Android;
|
979
|
-
// Assume use of -webkit- if unprefixed and -ms- are not supported.
|
980
|
-
// https://caniuse.com/#feat=transforms2d
|
981
|
-
var d = document.createElement("div");
|
982
|
-
var msPrefix = d.style.msTransform !== undefined;
|
983
|
-
var noPrefix = d.style.transform !== undefined;
|
984
|
-
parsed.transformRule = noPrefix ? "transform" : msPrefix ? "msTransform" : "webkitTransform";
|
985
|
-
// Pips don't move, so we can place them using left/top.
|
986
|
-
var styles = [
|
987
|
-
["left", "top"],
|
988
|
-
["right", "bottom"],
|
989
|
-
];
|
990
|
-
parsed.style = styles[parsed.dir][parsed.ort];
|
991
|
-
return parsed;
|
992
|
-
}
|
993
|
-
//endregion
|
994
|
-
function scope(target, options, originalOptions) {
|
995
|
-
var actions = getActions();
|
996
|
-
var supportsTouchActionNone = getSupportsTouchActionNone();
|
997
|
-
var supportsPassive = supportsTouchActionNone && getSupportsPassive();
|
998
|
-
// All variables local to 'scope' are prefixed with 'scope_'
|
999
|
-
// Slider DOM Nodes
|
1000
|
-
var scope_Target = target;
|
1001
|
-
var scope_Base;
|
1002
|
-
var scope_Handles;
|
1003
|
-
var scope_Connects;
|
1004
|
-
var scope_Pips;
|
1005
|
-
var scope_Tooltips;
|
1006
|
-
// Slider state values
|
1007
|
-
var scope_Spectrum = options.spectrum;
|
1008
|
-
var scope_Values = [];
|
1009
|
-
var scope_Locations = [];
|
1010
|
-
var scope_HandleNumbers = [];
|
1011
|
-
var scope_ActiveHandlesCount = 0;
|
1012
|
-
var scope_Events = {};
|
1013
|
-
// Document Nodes
|
1014
|
-
var scope_Document = target.ownerDocument;
|
1015
|
-
var scope_DocumentElement = options.documentElement || scope_Document.documentElement;
|
1016
|
-
var scope_Body = scope_Document.body;
|
1017
|
-
// For horizontal sliders in standard ltr documents,
|
1018
|
-
// make .noUi-origin overflow to the left so the document doesn't scroll.
|
1019
|
-
var scope_DirOffset = scope_Document.dir === "rtl" || options.ort === 1 ? 0 : 100;
|
1020
|
-
// Creates a node, adds it to target, returns the new node.
|
1021
|
-
function addNodeTo(addTarget, className) {
|
1022
|
-
var div = scope_Document.createElement("div");
|
1023
|
-
if (className) {
|
1024
|
-
addClass(div, className);
|
1025
|
-
}
|
1026
|
-
addTarget.appendChild(div);
|
1027
|
-
return div;
|
1028
|
-
}
|
1029
|
-
// Append a origin to the base
|
1030
|
-
function addOrigin(base, handleNumber) {
|
1031
|
-
var origin = addNodeTo(base, options.cssClasses.origin);
|
1032
|
-
var handle = addNodeTo(origin, options.cssClasses.handle);
|
1033
|
-
addNodeTo(handle, options.cssClasses.touchArea);
|
1034
|
-
handle.setAttribute("data-handle", String(handleNumber));
|
1035
|
-
if (options.keyboardSupport) {
|
1036
|
-
// https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
|
1037
|
-
// 0 = focusable and reachable
|
1038
|
-
handle.setAttribute("tabindex", "0");
|
1039
|
-
handle.addEventListener("keydown", function (event) {
|
1040
|
-
return eventKeydown(event, handleNumber);
|
1041
|
-
});
|
1042
|
-
}
|
1043
|
-
if (options.handleAttributes !== undefined) {
|
1044
|
-
var attributes_1 = options.handleAttributes[handleNumber];
|
1045
|
-
Object.keys(attributes_1).forEach(function (attribute) {
|
1046
|
-
handle.setAttribute(attribute, attributes_1[attribute]);
|
1047
|
-
});
|
1048
|
-
}
|
1049
|
-
handle.setAttribute("role", "slider");
|
1050
|
-
handle.setAttribute("aria-orientation", options.ort ? "vertical" : "horizontal");
|
1051
|
-
if (handleNumber === 0) {
|
1052
|
-
addClass(handle, options.cssClasses.handleLower);
|
1053
|
-
}
|
1054
|
-
else if (handleNumber === options.handles - 1) {
|
1055
|
-
addClass(handle, options.cssClasses.handleUpper);
|
1056
|
-
}
|
1057
|
-
return origin;
|
1058
|
-
}
|
1059
|
-
// Insert nodes for connect elements
|
1060
|
-
function addConnect(base, add) {
|
1061
|
-
if (!add) {
|
1062
|
-
return false;
|
1063
|
-
}
|
1064
|
-
return addNodeTo(base, options.cssClasses.connect);
|
1065
|
-
}
|
1066
|
-
// Add handles to the slider base.
|
1067
|
-
function addElements(connectOptions, base) {
|
1068
|
-
var connectBase = addNodeTo(base, options.cssClasses.connects);
|
1069
|
-
scope_Handles = [];
|
1070
|
-
scope_Connects = [];
|
1071
|
-
scope_Connects.push(addConnect(connectBase, connectOptions[0]));
|
1072
|
-
// [::::O====O====O====]
|
1073
|
-
// connectOptions = [0, 1, 1, 1]
|
1074
|
-
for (var i = 0; i < options.handles; i++) {
|
1075
|
-
// Keep a list of all added handles.
|
1076
|
-
scope_Handles.push(addOrigin(base, i));
|
1077
|
-
scope_HandleNumbers[i] = i;
|
1078
|
-
scope_Connects.push(addConnect(connectBase, connectOptions[i + 1]));
|
1079
|
-
}
|
1080
|
-
}
|
1081
|
-
// Initialize a single slider.
|
1082
|
-
function addSlider(addTarget) {
|
1083
|
-
// Apply classes and data to the target.
|
1084
|
-
addClass(addTarget, options.cssClasses.target);
|
1085
|
-
if (options.dir === 0) {
|
1086
|
-
addClass(addTarget, options.cssClasses.ltr);
|
1087
|
-
}
|
1088
|
-
else {
|
1089
|
-
addClass(addTarget, options.cssClasses.rtl);
|
1090
|
-
}
|
1091
|
-
if (options.ort === 0) {
|
1092
|
-
addClass(addTarget, options.cssClasses.horizontal);
|
1093
|
-
}
|
1094
|
-
else {
|
1095
|
-
addClass(addTarget, options.cssClasses.vertical);
|
1096
|
-
}
|
1097
|
-
var textDirection = getComputedStyle(addTarget).direction;
|
1098
|
-
if (textDirection === "rtl") {
|
1099
|
-
addClass(addTarget, options.cssClasses.textDirectionRtl);
|
1100
|
-
}
|
1101
|
-
else {
|
1102
|
-
addClass(addTarget, options.cssClasses.textDirectionLtr);
|
1103
|
-
}
|
1104
|
-
return addNodeTo(addTarget, options.cssClasses.base);
|
1105
|
-
}
|
1106
|
-
function addTooltip(handle, handleNumber) {
|
1107
|
-
if (!options.tooltips || !options.tooltips[handleNumber]) {
|
1108
|
-
return false;
|
1109
|
-
}
|
1110
|
-
return addNodeTo(handle.firstChild, options.cssClasses.tooltip);
|
1111
|
-
}
|
1112
|
-
function isSliderDisabled() {
|
1113
|
-
return scope_Target.hasAttribute("disabled");
|
1114
|
-
}
|
1115
|
-
// Disable the slider dragging if any handle is disabled
|
1116
|
-
function isHandleDisabled(handleNumber) {
|
1117
|
-
var handleOrigin = scope_Handles[handleNumber];
|
1118
|
-
return handleOrigin.hasAttribute("disabled");
|
1119
|
-
}
|
1120
|
-
function removeTooltips() {
|
1121
|
-
if (scope_Tooltips) {
|
1122
|
-
removeEvent("update" + INTERNAL_EVENT_NS.tooltips);
|
1123
|
-
scope_Tooltips.forEach(function (tooltip) {
|
1124
|
-
if (tooltip) {
|
1125
|
-
removeElement(tooltip);
|
1126
|
-
}
|
1127
|
-
});
|
1128
|
-
scope_Tooltips = null;
|
1129
|
-
}
|
1130
|
-
}
|
1131
|
-
// The tooltips option is a shorthand for using the 'update' event.
|
1132
|
-
function tooltips() {
|
1133
|
-
removeTooltips();
|
1134
|
-
// Tooltips are added with options.tooltips in original order.
|
1135
|
-
scope_Tooltips = scope_Handles.map(addTooltip);
|
1136
|
-
bindEvent("update" + INTERNAL_EVENT_NS.tooltips, function (values, handleNumber, unencoded) {
|
1137
|
-
if (!scope_Tooltips || !options.tooltips) {
|
1138
|
-
return;
|
1139
|
-
}
|
1140
|
-
if (scope_Tooltips[handleNumber] === false) {
|
1141
|
-
return;
|
1142
|
-
}
|
1143
|
-
var formattedValue = values[handleNumber];
|
1144
|
-
if (options.tooltips[handleNumber] !== true) {
|
1145
|
-
formattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);
|
1146
|
-
}
|
1147
|
-
scope_Tooltips[handleNumber].innerHTML = formattedValue;
|
1148
|
-
});
|
1149
|
-
}
|
1150
|
-
function aria() {
|
1151
|
-
removeEvent("update" + INTERNAL_EVENT_NS.aria);
|
1152
|
-
bindEvent("update" + INTERNAL_EVENT_NS.aria, function (values, handleNumber, unencoded, tap, positions) {
|
1153
|
-
// Update Aria Values for all handles, as a change in one changes min and max values for the next.
|
1154
|
-
scope_HandleNumbers.forEach(function (index) {
|
1155
|
-
var handle = scope_Handles[index];
|
1156
|
-
var min = checkHandlePosition(scope_Locations, index, 0, true, true, true);
|
1157
|
-
var max = checkHandlePosition(scope_Locations, index, 100, true, true, true);
|
1158
|
-
var now = positions[index];
|
1159
|
-
// Formatted value for display
|
1160
|
-
var text = String(options.ariaFormat.to(unencoded[index]));
|
1161
|
-
// Map to slider range values
|
1162
|
-
min = scope_Spectrum.fromStepping(min).toFixed(1);
|
1163
|
-
max = scope_Spectrum.fromStepping(max).toFixed(1);
|
1164
|
-
now = scope_Spectrum.fromStepping(now).toFixed(1);
|
1165
|
-
handle.children[0].setAttribute("aria-valuemin", min);
|
1166
|
-
handle.children[0].setAttribute("aria-valuemax", max);
|
1167
|
-
handle.children[0].setAttribute("aria-valuenow", now);
|
1168
|
-
handle.children[0].setAttribute("aria-valuetext", text);
|
1169
|
-
});
|
1170
|
-
});
|
1171
|
-
}
|
1172
|
-
function getGroup(pips) {
|
1173
|
-
// Use the range.
|
1174
|
-
if (pips.mode === exports.PipsMode.Range || pips.mode === exports.PipsMode.Steps) {
|
1175
|
-
return scope_Spectrum.xVal;
|
1176
|
-
}
|
1177
|
-
if (pips.mode === exports.PipsMode.Count) {
|
1178
|
-
if (pips.values < 2) {
|
1179
|
-
throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");
|
1180
|
-
}
|
1181
|
-
// Divide 0 - 100 in 'count' parts.
|
1182
|
-
var interval = pips.values - 1;
|
1183
|
-
var spread = 100 / interval;
|
1184
|
-
var values = [];
|
1185
|
-
// List these parts and have them handled as 'positions'.
|
1186
|
-
while (interval--) {
|
1187
|
-
values[interval] = interval * spread;
|
1188
|
-
}
|
1189
|
-
values.push(100);
|
1190
|
-
return mapToRange(values, pips.stepped);
|
1191
|
-
}
|
1192
|
-
if (pips.mode === exports.PipsMode.Positions) {
|
1193
|
-
// Map all percentages to on-range values.
|
1194
|
-
return mapToRange(pips.values, pips.stepped);
|
1195
|
-
}
|
1196
|
-
if (pips.mode === exports.PipsMode.Values) {
|
1197
|
-
// If the value must be stepped, it needs to be converted to a percentage first.
|
1198
|
-
if (pips.stepped) {
|
1199
|
-
return pips.values.map(function (value) {
|
1200
|
-
// Convert to percentage, apply step, return to value.
|
1201
|
-
return scope_Spectrum.fromStepping(scope_Spectrum.getStep(scope_Spectrum.toStepping(value)));
|
1202
|
-
});
|
1203
|
-
}
|
1204
|
-
// Otherwise, we can simply use the values.
|
1205
|
-
return pips.values;
|
1206
|
-
}
|
1207
|
-
return []; // pips.mode = never
|
1208
|
-
}
|
1209
|
-
function mapToRange(values, stepped) {
|
1210
|
-
return values.map(function (value) {
|
1211
|
-
return scope_Spectrum.fromStepping(stepped ? scope_Spectrum.getStep(value) : value);
|
1212
|
-
});
|
1213
|
-
}
|
1214
|
-
function generateSpread(pips) {
|
1215
|
-
function safeIncrement(value, increment) {
|
1216
|
-
// Avoid floating point variance by dropping the smallest decimal places.
|
1217
|
-
return Number((value + increment).toFixed(7));
|
1218
|
-
}
|
1219
|
-
var group = getGroup(pips);
|
1220
|
-
var indexes = {};
|
1221
|
-
var firstInRange = scope_Spectrum.xVal[0];
|
1222
|
-
var lastInRange = scope_Spectrum.xVal[scope_Spectrum.xVal.length - 1];
|
1223
|
-
var ignoreFirst = false;
|
1224
|
-
var ignoreLast = false;
|
1225
|
-
var prevPct = 0;
|
1226
|
-
// Create a copy of the group, sort it and filter away all duplicates.
|
1227
|
-
group = unique(group.slice().sort(function (a, b) {
|
1228
|
-
return a - b;
|
1229
|
-
}));
|
1230
|
-
// Make sure the range starts with the first element.
|
1231
|
-
if (group[0] !== firstInRange) {
|
1232
|
-
group.unshift(firstInRange);
|
1233
|
-
ignoreFirst = true;
|
1234
|
-
}
|
1235
|
-
// Likewise for the last one.
|
1236
|
-
if (group[group.length - 1] !== lastInRange) {
|
1237
|
-
group.push(lastInRange);
|
1238
|
-
ignoreLast = true;
|
1239
|
-
}
|
1240
|
-
group.forEach(function (current, index) {
|
1241
|
-
// Get the current step and the lower + upper positions.
|
1242
|
-
var step;
|
1243
|
-
var i;
|
1244
|
-
var q;
|
1245
|
-
var low = current;
|
1246
|
-
var high = group[index + 1];
|
1247
|
-
var newPct;
|
1248
|
-
var pctDifference;
|
1249
|
-
var pctPos;
|
1250
|
-
var type;
|
1251
|
-
var steps;
|
1252
|
-
var realSteps;
|
1253
|
-
var stepSize;
|
1254
|
-
var isSteps = pips.mode === exports.PipsMode.Steps;
|
1255
|
-
// When using 'steps' mode, use the provided steps.
|
1256
|
-
// Otherwise, we'll step on to the next subrange.
|
1257
|
-
if (isSteps) {
|
1258
|
-
step = scope_Spectrum.xNumSteps[index];
|
1259
|
-
}
|
1260
|
-
// Default to a 'full' step.
|
1261
|
-
if (!step) {
|
1262
|
-
step = high - low;
|
1263
|
-
}
|
1264
|
-
// If high is undefined we are at the last subrange. Make sure it iterates once (#1088)
|
1265
|
-
if (high === undefined) {
|
1266
|
-
high = low;
|
1267
|
-
}
|
1268
|
-
// Make sure step isn't 0, which would cause an infinite loop (#654)
|
1269
|
-
step = Math.max(step, 0.0000001);
|
1270
|
-
// Find all steps in the subrange.
|
1271
|
-
for (i = low; i <= high; i = safeIncrement(i, step)) {
|
1272
|
-
// Get the percentage value for the current step,
|
1273
|
-
// calculate the size for the subrange.
|
1274
|
-
newPct = scope_Spectrum.toStepping(i);
|
1275
|
-
pctDifference = newPct - prevPct;
|
1276
|
-
steps = pctDifference / (pips.density || 1);
|
1277
|
-
realSteps = Math.round(steps);
|
1278
|
-
// This ratio represents the amount of percentage-space a point indicates.
|
1279
|
-
// For a density 1 the points/percentage = 1. For density 2, that percentage needs to be re-divided.
|
1280
|
-
// Round the percentage offset to an even number, then divide by two
|
1281
|
-
// to spread the offset on both sides of the range.
|
1282
|
-
stepSize = pctDifference / realSteps;
|
1283
|
-
// Divide all points evenly, adding the correct number to this subrange.
|
1284
|
-
// Run up to <= so that 100% gets a point, event if ignoreLast is set.
|
1285
|
-
for (q = 1; q <= realSteps; q += 1) {
|
1286
|
-
// The ratio between the rounded value and the actual size might be ~1% off.
|
1287
|
-
// Correct the percentage offset by the number of points
|
1288
|
-
// per subrange. density = 1 will result in 100 points on the
|
1289
|
-
// full range, 2 for 50, 4 for 25, etc.
|
1290
|
-
pctPos = prevPct + q * stepSize;
|
1291
|
-
indexes[pctPos.toFixed(5)] = [scope_Spectrum.fromStepping(pctPos), 0];
|
1292
|
-
}
|
1293
|
-
// Determine the point type.
|
1294
|
-
type = group.indexOf(i) > -1 ? exports.PipsType.LargeValue : isSteps ? exports.PipsType.SmallValue : exports.PipsType.NoValue;
|
1295
|
-
// Enforce the 'ignoreFirst' option by overwriting the type for 0.
|
1296
|
-
if (!index && ignoreFirst && i !== high) {
|
1297
|
-
type = 0;
|
1298
|
-
}
|
1299
|
-
if (!(i === high && ignoreLast)) {
|
1300
|
-
// Mark the 'type' of this point. 0 = plain, 1 = real value, 2 = step value.
|
1301
|
-
indexes[newPct.toFixed(5)] = [i, type];
|
1302
|
-
}
|
1303
|
-
// Update the percentage count.
|
1304
|
-
prevPct = newPct;
|
1305
|
-
}
|
1306
|
-
});
|
1307
|
-
return indexes;
|
1308
|
-
}
|
1309
|
-
function addMarking(spread, filterFunc, formatter) {
|
1310
|
-
var _a, _b;
|
1311
|
-
var element = scope_Document.createElement("div");
|
1312
|
-
var valueSizeClasses = (_a = {},
|
1313
|
-
_a[exports.PipsType.None] = "",
|
1314
|
-
_a[exports.PipsType.NoValue] = options.cssClasses.valueNormal,
|
1315
|
-
_a[exports.PipsType.LargeValue] = options.cssClasses.valueLarge,
|
1316
|
-
_a[exports.PipsType.SmallValue] = options.cssClasses.valueSub,
|
1317
|
-
_a);
|
1318
|
-
var markerSizeClasses = (_b = {},
|
1319
|
-
_b[exports.PipsType.None] = "",
|
1320
|
-
_b[exports.PipsType.NoValue] = options.cssClasses.markerNormal,
|
1321
|
-
_b[exports.PipsType.LargeValue] = options.cssClasses.markerLarge,
|
1322
|
-
_b[exports.PipsType.SmallValue] = options.cssClasses.markerSub,
|
1323
|
-
_b);
|
1324
|
-
var valueOrientationClasses = [options.cssClasses.valueHorizontal, options.cssClasses.valueVertical];
|
1325
|
-
var markerOrientationClasses = [options.cssClasses.markerHorizontal, options.cssClasses.markerVertical];
|
1326
|
-
addClass(element, options.cssClasses.pips);
|
1327
|
-
addClass(element, options.ort === 0 ? options.cssClasses.pipsHorizontal : options.cssClasses.pipsVertical);
|
1328
|
-
function getClasses(type, source) {
|
1329
|
-
var a = source === options.cssClasses.value;
|
1330
|
-
var orientationClasses = a ? valueOrientationClasses : markerOrientationClasses;
|
1331
|
-
var sizeClasses = a ? valueSizeClasses : markerSizeClasses;
|
1332
|
-
return source + " " + orientationClasses[options.ort] + " " + sizeClasses[type];
|
1333
|
-
}
|
1334
|
-
function addSpread(offset, value, type) {
|
1335
|
-
// Apply the filter function, if it is set.
|
1336
|
-
type = filterFunc ? filterFunc(value, type) : type;
|
1337
|
-
if (type === exports.PipsType.None) {
|
1338
|
-
return;
|
1339
|
-
}
|
1340
|
-
// Add a marker for every point
|
1341
|
-
var node = addNodeTo(element, false);
|
1342
|
-
node.className = getClasses(type, options.cssClasses.marker);
|
1343
|
-
node.style[options.style] = offset + "%";
|
1344
|
-
// Values are only appended for points marked '1' or '2'.
|
1345
|
-
if (type > exports.PipsType.NoValue) {
|
1346
|
-
node = addNodeTo(element, false);
|
1347
|
-
node.className = getClasses(type, options.cssClasses.value);
|
1348
|
-
node.setAttribute("data-value", String(value));
|
1349
|
-
node.style[options.style] = offset + "%";
|
1350
|
-
node.innerHTML = String(formatter.to(value));
|
1351
|
-
}
|
1352
|
-
}
|
1353
|
-
// Append all points.
|
1354
|
-
Object.keys(spread).forEach(function (offset) {
|
1355
|
-
addSpread(offset, spread[offset][0], spread[offset][1]);
|
1356
|
-
});
|
1357
|
-
return element;
|
1358
|
-
}
|
1359
|
-
function removePips() {
|
1360
|
-
if (scope_Pips) {
|
1361
|
-
removeElement(scope_Pips);
|
1362
|
-
scope_Pips = null;
|
1363
|
-
}
|
1364
|
-
}
|
1365
|
-
function pips(pips) {
|
1366
|
-
// Fix #669
|
1367
|
-
removePips();
|
1368
|
-
var spread = generateSpread(pips);
|
1369
|
-
var filter = pips.filter;
|
1370
|
-
var format = pips.format || {
|
1371
|
-
to: function (value) {
|
1372
|
-
return String(Math.round(value));
|
1373
|
-
},
|
1374
|
-
};
|
1375
|
-
scope_Pips = scope_Target.appendChild(addMarking(spread, filter, format));
|
1376
|
-
return scope_Pips;
|
1377
|
-
}
|
1378
|
-
// Shorthand for base dimensions.
|
1379
|
-
function baseSize() {
|
1380
|
-
var rect = scope_Base.getBoundingClientRect();
|
1381
|
-
var alt = ("offset" + ["Width", "Height"][options.ort]);
|
1382
|
-
return options.ort === 0 ? rect.width || scope_Base[alt] : rect.height || scope_Base[alt];
|
1383
|
-
}
|
1384
|
-
// Handler for attaching events trough a proxy.
|
1385
|
-
function attachEvent(events, element, callback, data) {
|
1386
|
-
// This function can be used to 'filter' events to the slider.
|
1387
|
-
// element is a node, not a nodeList
|
1388
|
-
var method = function (event) {
|
1389
|
-
var e = fixEvent(event, data.pageOffset, data.target || element);
|
1390
|
-
// fixEvent returns false if this event has a different target
|
1391
|
-
// when handling (multi-) touch events;
|
1392
|
-
if (!e) {
|
1393
|
-
return false;
|
1394
|
-
}
|
1395
|
-
// doNotReject is passed by all end events to make sure released touches
|
1396
|
-
// are not rejected, leaving the slider "stuck" to the cursor;
|
1397
|
-
if (isSliderDisabled() && !data.doNotReject) {
|
1398
|
-
return false;
|
1399
|
-
}
|
1400
|
-
// Stop if an active 'tap' transition is taking place.
|
1401
|
-
if (hasClass(scope_Target, options.cssClasses.tap) && !data.doNotReject) {
|
1402
|
-
return false;
|
1403
|
-
}
|
1404
|
-
// Ignore right or middle clicks on start #454
|
1405
|
-
if (events === actions.start && e.buttons !== undefined && e.buttons > 1) {
|
1406
|
-
return false;
|
1407
|
-
}
|
1408
|
-
// Ignore right or middle clicks on start #454
|
1409
|
-
if (data.hover && e.buttons) {
|
1410
|
-
return false;
|
1411
|
-
}
|
1412
|
-
// 'supportsPassive' is only true if a browser also supports touch-action: none in CSS.
|
1413
|
-
// iOS safari does not, so it doesn't get to benefit from passive scrolling. iOS does support
|
1414
|
-
// touch-action: manipulation, but that allows panning, which breaks
|
1415
|
-
// sliders after zooming/on non-responsive pages.
|
1416
|
-
// See: https://bugs.webkit.org/show_bug.cgi?id=133112
|
1417
|
-
if (!supportsPassive) {
|
1418
|
-
e.preventDefault();
|
1419
|
-
}
|
1420
|
-
e.calcPoint = e.points[options.ort];
|
1421
|
-
// Call the event handler with the event [ and additional data ].
|
1422
|
-
callback(e, data);
|
1423
|
-
return;
|
1424
|
-
};
|
1425
|
-
var methods = [];
|
1426
|
-
// Bind a closure on the target for every event type.
|
1427
|
-
events.split(" ").forEach(function (eventName) {
|
1428
|
-
element.addEventListener(eventName, method, supportsPassive ? { passive: true } : false);
|
1429
|
-
methods.push([eventName, method]);
|
1430
|
-
});
|
1431
|
-
return methods;
|
1432
|
-
}
|
1433
|
-
// Provide a clean event with standardized offset values.
|
1434
|
-
function fixEvent(e, pageOffset, eventTarget) {
|
1435
|
-
// Filter the event to register the type, which can be
|
1436
|
-
// touch, mouse or pointer. Offset changes need to be
|
1437
|
-
// made on an event specific basis.
|
1438
|
-
var touch = e.type.indexOf("touch") === 0;
|
1439
|
-
var mouse = e.type.indexOf("mouse") === 0;
|
1440
|
-
var pointer = e.type.indexOf("pointer") === 0;
|
1441
|
-
var x = 0;
|
1442
|
-
var y = 0;
|
1443
|
-
// IE10 implemented pointer events with a prefix;
|
1444
|
-
if (e.type.indexOf("MSPointer") === 0) {
|
1445
|
-
pointer = true;
|
1446
|
-
}
|
1447
|
-
// Erroneous events seem to be passed in occasionally on iOS/iPadOS after user finishes interacting with
|
1448
|
-
// the slider. They appear to be of type MouseEvent, yet they don't have usual properties set. Ignore
|
1449
|
-
// events that have no touches or buttons associated with them. (#1057, #1079, #1095)
|
1450
|
-
if (e.type === "mousedown" && !e.buttons && !e.touches) {
|
1451
|
-
return false;
|
1452
|
-
}
|
1453
|
-
// The only thing one handle should be concerned about is the touches that originated on top of it.
|
1454
|
-
if (touch) {
|
1455
|
-
// Returns true if a touch originated on the target.
|
1456
|
-
var isTouchOnTarget = function (checkTouch) {
|
1457
|
-
var target = checkTouch.target;
|
1458
|
-
return (target === eventTarget ||
|
1459
|
-
eventTarget.contains(target) ||
|
1460
|
-
(e.composed && e.composedPath().shift() === eventTarget));
|
1461
|
-
};
|
1462
|
-
// In the case of touchstart events, we need to make sure there is still no more than one
|
1463
|
-
// touch on the target so we look amongst all touches.
|
1464
|
-
if (e.type === "touchstart") {
|
1465
|
-
var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);
|
1466
|
-
// Do not support more than one touch per handle.
|
1467
|
-
if (targetTouches.length > 1) {
|
1468
|
-
return false;
|
1469
|
-
}
|
1470
|
-
x = targetTouches[0].pageX;
|
1471
|
-
y = targetTouches[0].pageY;
|
1472
|
-
}
|
1473
|
-
else {
|
1474
|
-
// In the other cases, find on changedTouches is enough.
|
1475
|
-
var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);
|
1476
|
-
// Cancel if the target touch has not moved.
|
1477
|
-
if (!targetTouch) {
|
1478
|
-
return false;
|
1479
|
-
}
|
1480
|
-
x = targetTouch.pageX;
|
1481
|
-
y = targetTouch.pageY;
|
1482
|
-
}
|
1483
|
-
}
|
1484
|
-
pageOffset = pageOffset || getPageOffset(scope_Document);
|
1485
|
-
if (mouse || pointer) {
|
1486
|
-
x = e.clientX + pageOffset.x;
|
1487
|
-
y = e.clientY + pageOffset.y;
|
1488
|
-
}
|
1489
|
-
e.pageOffset = pageOffset;
|
1490
|
-
e.points = [x, y];
|
1491
|
-
e.cursor = mouse || pointer; // Fix #435
|
1492
|
-
return e;
|
1493
|
-
}
|
1494
|
-
// Translate a coordinate in the document to a percentage on the slider
|
1495
|
-
function calcPointToPercentage(calcPoint) {
|
1496
|
-
var location = calcPoint - offset(scope_Base, options.ort);
|
1497
|
-
var proposal = (location * 100) / baseSize();
|
1498
|
-
// Clamp proposal between 0% and 100%
|
1499
|
-
// Out-of-bound coordinates may occur when .noUi-base pseudo-elements
|
1500
|
-
// are used (e.g. contained handles feature)
|
1501
|
-
proposal = limit(proposal);
|
1502
|
-
return options.dir ? 100 - proposal : proposal;
|
1503
|
-
}
|
1504
|
-
// Find handle closest to a certain percentage on the slider
|
1505
|
-
function getClosestHandle(clickedPosition) {
|
1506
|
-
var smallestDifference = 100;
|
1507
|
-
var handleNumber = false;
|
1508
|
-
scope_Handles.forEach(function (handle, index) {
|
1509
|
-
// Disabled handles are ignored
|
1510
|
-
if (isHandleDisabled(index)) {
|
1511
|
-
return;
|
1512
|
-
}
|
1513
|
-
var handlePosition = scope_Locations[index];
|
1514
|
-
var differenceWithThisHandle = Math.abs(handlePosition - clickedPosition);
|
1515
|
-
// Initial state
|
1516
|
-
var clickAtEdge = differenceWithThisHandle === 100 && smallestDifference === 100;
|
1517
|
-
// Difference with this handle is smaller than the previously checked handle
|
1518
|
-
var isCloser = differenceWithThisHandle < smallestDifference;
|
1519
|
-
var isCloserAfter = differenceWithThisHandle <= smallestDifference && clickedPosition > handlePosition;
|
1520
|
-
if (isCloser || isCloserAfter || clickAtEdge) {
|
1521
|
-
handleNumber = index;
|
1522
|
-
smallestDifference = differenceWithThisHandle;
|
1523
|
-
}
|
1524
|
-
});
|
1525
|
-
return handleNumber;
|
1526
|
-
}
|
1527
|
-
// Fire 'end' when a mouse or pen leaves the document.
|
1528
|
-
function documentLeave(event, data) {
|
1529
|
-
if (event.type === "mouseout" &&
|
1530
|
-
event.target.nodeName === "HTML" &&
|
1531
|
-
event.relatedTarget === null) {
|
1532
|
-
eventEnd(event, data);
|
1533
|
-
}
|
1534
|
-
}
|
1535
|
-
// Handle movement on document for handle and range drag.
|
1536
|
-
function eventMove(event, data) {
|
1537
|
-
// Fix #498
|
1538
|
-
// Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).
|
1539
|
-
// https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero
|
1540
|
-
// IE9 has .buttons and .which zero on mousemove.
|
1541
|
-
// Firefox breaks the spec MDN defines.
|
1542
|
-
if (navigator.appVersion.indexOf("MSIE 9") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {
|
1543
|
-
return eventEnd(event, data);
|
1544
|
-
}
|
1545
|
-
// Check if we are moving up or down
|
1546
|
-
var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);
|
1547
|
-
// Convert the movement into a percentage of the slider width/height
|
1548
|
-
var proposal = (movement * 100) / data.baseSize;
|
1549
|
-
moveHandles(movement > 0, proposal, data.locations, data.handleNumbers, data.connect);
|
1550
|
-
}
|
1551
|
-
// Unbind move events on document, call callbacks.
|
1552
|
-
function eventEnd(event, data) {
|
1553
|
-
// The handle is no longer active, so remove the class.
|
1554
|
-
if (data.handle) {
|
1555
|
-
removeClass(data.handle, options.cssClasses.active);
|
1556
|
-
scope_ActiveHandlesCount -= 1;
|
1557
|
-
}
|
1558
|
-
// Unbind the move and end events, which are added on 'start'.
|
1559
|
-
data.listeners.forEach(function (c) {
|
1560
|
-
scope_DocumentElement.removeEventListener(c[0], c[1]);
|
1561
|
-
});
|
1562
|
-
if (scope_ActiveHandlesCount === 0) {
|
1563
|
-
// Remove dragging class.
|
1564
|
-
removeClass(scope_Target, options.cssClasses.drag);
|
1565
|
-
setZindex();
|
1566
|
-
// Remove cursor styles and text-selection events bound to the body.
|
1567
|
-
if (event.cursor) {
|
1568
|
-
scope_Body.style.cursor = "";
|
1569
|
-
scope_Body.removeEventListener("selectstart", preventDefault);
|
1570
|
-
}
|
1571
|
-
}
|
1572
|
-
data.handleNumbers.forEach(function (handleNumber) {
|
1573
|
-
fireEvent("change", handleNumber);
|
1574
|
-
fireEvent("set", handleNumber);
|
1575
|
-
fireEvent("end", handleNumber);
|
1576
|
-
});
|
1577
|
-
}
|
1578
|
-
// Bind move events on document.
|
1579
|
-
function eventStart(event, data) {
|
1580
|
-
// Ignore event if any handle is disabled
|
1581
|
-
if (data.handleNumbers.some(isHandleDisabled)) {
|
1582
|
-
return;
|
1583
|
-
}
|
1584
|
-
var handle;
|
1585
|
-
if (data.handleNumbers.length === 1) {
|
1586
|
-
var handleOrigin = scope_Handles[data.handleNumbers[0]];
|
1587
|
-
handle = handleOrigin.children[0];
|
1588
|
-
scope_ActiveHandlesCount += 1;
|
1589
|
-
// Mark the handle as 'active' so it can be styled.
|
1590
|
-
addClass(handle, options.cssClasses.active);
|
1591
|
-
}
|
1592
|
-
// A drag should never propagate up to the 'tap' event.
|
1593
|
-
event.stopPropagation();
|
1594
|
-
// Record the event listeners.
|
1595
|
-
var listeners = [];
|
1596
|
-
// Attach the move and end events.
|
1597
|
-
var moveEvent = attachEvent(actions.move, scope_DocumentElement, eventMove, {
|
1598
|
-
// The event target has changed so we need to propagate the original one so that we keep
|
1599
|
-
// relying on it to extract target touches.
|
1600
|
-
target: event.target,
|
1601
|
-
handle: handle,
|
1602
|
-
connect: data.connect,
|
1603
|
-
listeners: listeners,
|
1604
|
-
startCalcPoint: event.calcPoint,
|
1605
|
-
baseSize: baseSize(),
|
1606
|
-
pageOffset: event.pageOffset,
|
1607
|
-
handleNumbers: data.handleNumbers,
|
1608
|
-
buttonsProperty: event.buttons,
|
1609
|
-
locations: scope_Locations.slice(),
|
1610
|
-
});
|
1611
|
-
var endEvent = attachEvent(actions.end, scope_DocumentElement, eventEnd, {
|
1612
|
-
target: event.target,
|
1613
|
-
handle: handle,
|
1614
|
-
listeners: listeners,
|
1615
|
-
doNotReject: true,
|
1616
|
-
handleNumbers: data.handleNumbers,
|
1617
|
-
});
|
1618
|
-
var outEvent = attachEvent("mouseout", scope_DocumentElement, documentLeave, {
|
1619
|
-
target: event.target,
|
1620
|
-
handle: handle,
|
1621
|
-
listeners: listeners,
|
1622
|
-
doNotReject: true,
|
1623
|
-
handleNumbers: data.handleNumbers,
|
1624
|
-
});
|
1625
|
-
// We want to make sure we pushed the listeners in the listener list rather than creating
|
1626
|
-
// a new one as it has already been passed to the event handlers.
|
1627
|
-
listeners.push.apply(listeners, moveEvent.concat(endEvent, outEvent));
|
1628
|
-
// Text selection isn't an issue on touch devices,
|
1629
|
-
// so adding cursor styles can be skipped.
|
1630
|
-
if (event.cursor) {
|
1631
|
-
// Prevent the 'I' cursor and extend the range-drag cursor.
|
1632
|
-
scope_Body.style.cursor = getComputedStyle(event.target).cursor;
|
1633
|
-
// Mark the target with a dragging state.
|
1634
|
-
if (scope_Handles.length > 1) {
|
1635
|
-
addClass(scope_Target, options.cssClasses.drag);
|
1636
|
-
}
|
1637
|
-
// Prevent text selection when dragging the handles.
|
1638
|
-
// In noUiSlider <= 9.2.0, this was handled by calling preventDefault on mouse/touch start/move,
|
1639
|
-
// which is scroll blocking. The selectstart event is supported by FireFox starting from version 52,
|
1640
|
-
// meaning the only holdout is iOS Safari. This doesn't matter: text selection isn't triggered there.
|
1641
|
-
// The 'cursor' flag is false.
|
1642
|
-
// See: http://caniuse.com/#search=selectstart
|
1643
|
-
scope_Body.addEventListener("selectstart", preventDefault, false);
|
1644
|
-
}
|
1645
|
-
data.handleNumbers.forEach(function (handleNumber) {
|
1646
|
-
fireEvent("start", handleNumber);
|
1647
|
-
});
|
1648
|
-
}
|
1649
|
-
// Move closest handle to tapped location.
|
1650
|
-
function eventTap(event) {
|
1651
|
-
// The tap event shouldn't propagate up
|
1652
|
-
event.stopPropagation();
|
1653
|
-
var proposal = calcPointToPercentage(event.calcPoint);
|
1654
|
-
var handleNumber = getClosestHandle(proposal);
|
1655
|
-
// Tackle the case that all handles are 'disabled'.
|
1656
|
-
if (handleNumber === false) {
|
1657
|
-
return;
|
1658
|
-
}
|
1659
|
-
// Flag the slider as it is now in a transitional state.
|
1660
|
-
// Transition takes a configurable amount of ms (default 300). Re-enable the slider after that.
|
1661
|
-
if (!options.events.snap) {
|
1662
|
-
addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);
|
1663
|
-
}
|
1664
|
-
setHandle(handleNumber, proposal, true, true);
|
1665
|
-
setZindex();
|
1666
|
-
fireEvent("slide", handleNumber, true);
|
1667
|
-
fireEvent("update", handleNumber, true);
|
1668
|
-
if (!options.events.snap) {
|
1669
|
-
fireEvent("change", handleNumber, true);
|
1670
|
-
fireEvent("set", handleNumber, true);
|
1671
|
-
}
|
1672
|
-
else {
|
1673
|
-
eventStart(event, { handleNumbers: [handleNumber] });
|
1674
|
-
}
|
1675
|
-
}
|
1676
|
-
// Fires a 'hover' event for a hovered mouse/pen position.
|
1677
|
-
function eventHover(event) {
|
1678
|
-
var proposal = calcPointToPercentage(event.calcPoint);
|
1679
|
-
var to = scope_Spectrum.getStep(proposal);
|
1680
|
-
var value = scope_Spectrum.fromStepping(to);
|
1681
|
-
Object.keys(scope_Events).forEach(function (targetEvent) {
|
1682
|
-
if ("hover" === targetEvent.split(".")[0]) {
|
1683
|
-
scope_Events[targetEvent].forEach(function (callback) {
|
1684
|
-
callback.call(scope_Self, value);
|
1685
|
-
});
|
1686
|
-
}
|
1687
|
-
});
|
1688
|
-
}
|
1689
|
-
// Handles keydown on focused handles
|
1690
|
-
// Don't move the document when pressing arrow keys on focused handles
|
1691
|
-
function eventKeydown(event, handleNumber) {
|
1692
|
-
if (isSliderDisabled() || isHandleDisabled(handleNumber)) {
|
1693
|
-
return false;
|
1694
|
-
}
|
1695
|
-
var horizontalKeys = ["Left", "Right"];
|
1696
|
-
var verticalKeys = ["Down", "Up"];
|
1697
|
-
var largeStepKeys = ["PageDown", "PageUp"];
|
1698
|
-
var edgeKeys = ["Home", "End"];
|
1699
|
-
if (options.dir && !options.ort) {
|
1700
|
-
// On an right-to-left slider, the left and right keys act inverted
|
1701
|
-
horizontalKeys.reverse();
|
1702
|
-
}
|
1703
|
-
else if (options.ort && !options.dir) {
|
1704
|
-
// On a top-to-bottom slider, the up and down keys act inverted
|
1705
|
-
verticalKeys.reverse();
|
1706
|
-
largeStepKeys.reverse();
|
1707
|
-
}
|
1708
|
-
// Strip "Arrow" for IE compatibility. https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key
|
1709
|
-
var key = event.key.replace("Arrow", "");
|
1710
|
-
var isLargeDown = key === largeStepKeys[0];
|
1711
|
-
var isLargeUp = key === largeStepKeys[1];
|
1712
|
-
var isDown = key === verticalKeys[0] || key === horizontalKeys[0] || isLargeDown;
|
1713
|
-
var isUp = key === verticalKeys[1] || key === horizontalKeys[1] || isLargeUp;
|
1714
|
-
var isMin = key === edgeKeys[0];
|
1715
|
-
var isMax = key === edgeKeys[1];
|
1716
|
-
if (!isDown && !isUp && !isMin && !isMax) {
|
1717
|
-
return true;
|
1718
|
-
}
|
1719
|
-
event.preventDefault();
|
1720
|
-
var to;
|
1721
|
-
if (isUp || isDown) {
|
1722
|
-
var direction = isDown ? 0 : 1;
|
1723
|
-
var steps = getNextStepsForHandle(handleNumber);
|
1724
|
-
var step = steps[direction];
|
1725
|
-
// At the edge of a slider, do nothing
|
1726
|
-
if (step === null) {
|
1727
|
-
return false;
|
1728
|
-
}
|
1729
|
-
// No step set, use the default of 10% of the sub-range
|
1730
|
-
if (step === false) {
|
1731
|
-
step = scope_Spectrum.getDefaultStep(scope_Locations[handleNumber], isDown, options.keyboardDefaultStep);
|
1732
|
-
}
|
1733
|
-
if (isLargeUp || isLargeDown) {
|
1734
|
-
step *= options.keyboardPageMultiplier;
|
1735
|
-
}
|
1736
|
-
else {
|
1737
|
-
step *= options.keyboardMultiplier;
|
1738
|
-
}
|
1739
|
-
// Step over zero-length ranges (#948);
|
1740
|
-
step = Math.max(step, 0.0000001);
|
1741
|
-
// Decrement for down steps
|
1742
|
-
step = (isDown ? -1 : 1) * step;
|
1743
|
-
to = scope_Values[handleNumber] + step;
|
1744
|
-
}
|
1745
|
-
else if (isMax) {
|
1746
|
-
// End key
|
1747
|
-
to = options.spectrum.xVal[options.spectrum.xVal.length - 1];
|
1748
|
-
}
|
1749
|
-
else {
|
1750
|
-
// Home key
|
1751
|
-
to = options.spectrum.xVal[0];
|
1752
|
-
}
|
1753
|
-
setHandle(handleNumber, scope_Spectrum.toStepping(to), true, true);
|
1754
|
-
fireEvent("slide", handleNumber);
|
1755
|
-
fireEvent("update", handleNumber);
|
1756
|
-
fireEvent("change", handleNumber);
|
1757
|
-
fireEvent("set", handleNumber);
|
1758
|
-
return false;
|
1759
|
-
}
|
1760
|
-
// Attach events to several slider parts.
|
1761
|
-
function bindSliderEvents(behaviour) {
|
1762
|
-
// Attach the standard drag event to the handles.
|
1763
|
-
if (!behaviour.fixed) {
|
1764
|
-
scope_Handles.forEach(function (handle, index) {
|
1765
|
-
// These events are only bound to the visual handle
|
1766
|
-
// element, not the 'real' origin element.
|
1767
|
-
attachEvent(actions.start, handle.children[0], eventStart, {
|
1768
|
-
handleNumbers: [index],
|
1769
|
-
});
|
1770
|
-
});
|
1771
|
-
}
|
1772
|
-
// Attach the tap event to the slider base.
|
1773
|
-
if (behaviour.tap) {
|
1774
|
-
attachEvent(actions.start, scope_Base, eventTap, {});
|
1775
|
-
}
|
1776
|
-
// Fire hover events
|
1777
|
-
if (behaviour.hover) {
|
1778
|
-
attachEvent(actions.move, scope_Base, eventHover, {
|
1779
|
-
hover: true,
|
1780
|
-
});
|
1781
|
-
}
|
1782
|
-
// Make the range draggable.
|
1783
|
-
if (behaviour.drag) {
|
1784
|
-
scope_Connects.forEach(function (connect, index) {
|
1785
|
-
if (connect === false || index === 0 || index === scope_Connects.length - 1) {
|
1786
|
-
return;
|
1787
|
-
}
|
1788
|
-
var handleBefore = scope_Handles[index - 1];
|
1789
|
-
var handleAfter = scope_Handles[index];
|
1790
|
-
var eventHolders = [connect];
|
1791
|
-
var handlesToDrag = [handleBefore, handleAfter];
|
1792
|
-
var handleNumbersToDrag = [index - 1, index];
|
1793
|
-
addClass(connect, options.cssClasses.draggable);
|
1794
|
-
// When the range is fixed, the entire range can
|
1795
|
-
// be dragged by the handles. The handle in the first
|
1796
|
-
// origin will propagate the start event upward,
|
1797
|
-
// but it needs to be bound manually on the other.
|
1798
|
-
if (behaviour.fixed) {
|
1799
|
-
eventHolders.push(handleBefore.children[0]);
|
1800
|
-
eventHolders.push(handleAfter.children[0]);
|
1801
|
-
}
|
1802
|
-
if (behaviour.dragAll) {
|
1803
|
-
handlesToDrag = scope_Handles;
|
1804
|
-
handleNumbersToDrag = scope_HandleNumbers;
|
1805
|
-
}
|
1806
|
-
eventHolders.forEach(function (eventHolder) {
|
1807
|
-
attachEvent(actions.start, eventHolder, eventStart, {
|
1808
|
-
handles: handlesToDrag,
|
1809
|
-
handleNumbers: handleNumbersToDrag,
|
1810
|
-
connect: connect,
|
1811
|
-
});
|
1812
|
-
});
|
1813
|
-
});
|
1814
|
-
}
|
1815
|
-
}
|
1816
|
-
// Attach an event to this slider, possibly including a namespace
|
1817
|
-
function bindEvent(namespacedEvent, callback) {
|
1818
|
-
scope_Events[namespacedEvent] = scope_Events[namespacedEvent] || [];
|
1819
|
-
scope_Events[namespacedEvent].push(callback);
|
1820
|
-
// If the event bound is 'update,' fire it immediately for all handles.
|
1821
|
-
if (namespacedEvent.split(".")[0] === "update") {
|
1822
|
-
scope_Handles.forEach(function (a, index) {
|
1823
|
-
fireEvent("update", index);
|
1824
|
-
});
|
1825
|
-
}
|
1826
|
-
}
|
1827
|
-
function isInternalNamespace(namespace) {
|
1828
|
-
return namespace === INTERNAL_EVENT_NS.aria || namespace === INTERNAL_EVENT_NS.tooltips;
|
1829
|
-
}
|
1830
|
-
// Undo attachment of event
|
1831
|
-
function removeEvent(namespacedEvent) {
|
1832
|
-
var event = namespacedEvent && namespacedEvent.split(".")[0];
|
1833
|
-
var namespace = event ? namespacedEvent.substring(event.length) : namespacedEvent;
|
1834
|
-
Object.keys(scope_Events).forEach(function (bind) {
|
1835
|
-
var tEvent = bind.split(".")[0];
|
1836
|
-
var tNamespace = bind.substring(tEvent.length);
|
1837
|
-
if ((!event || event === tEvent) && (!namespace || namespace === tNamespace)) {
|
1838
|
-
// only delete protected internal event if intentional
|
1839
|
-
if (!isInternalNamespace(tNamespace) || namespace === tNamespace) {
|
1840
|
-
delete scope_Events[bind];
|
1841
|
-
}
|
1842
|
-
}
|
1843
|
-
});
|
1844
|
-
}
|
1845
|
-
// External event handling
|
1846
|
-
function fireEvent(eventName, handleNumber, tap) {
|
1847
|
-
Object.keys(scope_Events).forEach(function (targetEvent) {
|
1848
|
-
var eventType = targetEvent.split(".")[0];
|
1849
|
-
if (eventName === eventType) {
|
1850
|
-
scope_Events[targetEvent].forEach(function (callback) {
|
1851
|
-
callback.call(
|
1852
|
-
// Use the slider public API as the scope ('this')
|
1853
|
-
scope_Self,
|
1854
|
-
// Return values as array, so arg_1[arg_2] is always valid.
|
1855
|
-
scope_Values.map(options.format.to),
|
1856
|
-
// Handle index, 0 or 1
|
1857
|
-
handleNumber,
|
1858
|
-
// Un-formatted slider values
|
1859
|
-
scope_Values.slice(),
|
1860
|
-
// Event is fired by tap, true or false
|
1861
|
-
tap || false,
|
1862
|
-
// Left offset of the handle, in relation to the slider
|
1863
|
-
scope_Locations.slice(),
|
1864
|
-
// add the slider public API to an accessible parameter when this is unavailable
|
1865
|
-
scope_Self);
|
1866
|
-
});
|
1867
|
-
}
|
1868
|
-
});
|
1869
|
-
}
|
1870
|
-
// Split out the handle positioning logic so the Move event can use it, too
|
1871
|
-
function checkHandlePosition(reference, handleNumber, to, lookBackward, lookForward, getValue) {
|
1872
|
-
var distance;
|
1873
|
-
// For sliders with multiple handles, limit movement to the other handle.
|
1874
|
-
// Apply the margin option by adding it to the handle positions.
|
1875
|
-
if (scope_Handles.length > 1 && !options.events.unconstrained) {
|
1876
|
-
if (lookBackward && handleNumber > 0) {
|
1877
|
-
distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber - 1], options.margin, false);
|
1878
|
-
to = Math.max(to, distance);
|
1879
|
-
}
|
1880
|
-
if (lookForward && handleNumber < scope_Handles.length - 1) {
|
1881
|
-
distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber + 1], options.margin, true);
|
1882
|
-
to = Math.min(to, distance);
|
1883
|
-
}
|
1884
|
-
}
|
1885
|
-
// The limit option has the opposite effect, limiting handles to a
|
1886
|
-
// maximum distance from another. Limit must be > 0, as otherwise
|
1887
|
-
// handles would be unmovable.
|
1888
|
-
if (scope_Handles.length > 1 && options.limit) {
|
1889
|
-
if (lookBackward && handleNumber > 0) {
|
1890
|
-
distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber - 1], options.limit, false);
|
1891
|
-
to = Math.min(to, distance);
|
1892
|
-
}
|
1893
|
-
if (lookForward && handleNumber < scope_Handles.length - 1) {
|
1894
|
-
distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber + 1], options.limit, true);
|
1895
|
-
to = Math.max(to, distance);
|
1896
|
-
}
|
1897
|
-
}
|
1898
|
-
// The padding option keeps the handles a certain distance from the
|
1899
|
-
// edges of the slider. Padding must be > 0.
|
1900
|
-
if (options.padding) {
|
1901
|
-
if (handleNumber === 0) {
|
1902
|
-
distance = scope_Spectrum.getAbsoluteDistance(0, options.padding[0], false);
|
1903
|
-
to = Math.max(to, distance);
|
1904
|
-
}
|
1905
|
-
if (handleNumber === scope_Handles.length - 1) {
|
1906
|
-
distance = scope_Spectrum.getAbsoluteDistance(100, options.padding[1], true);
|
1907
|
-
to = Math.min(to, distance);
|
1908
|
-
}
|
1909
|
-
}
|
1910
|
-
to = scope_Spectrum.getStep(to);
|
1911
|
-
// Limit percentage to the 0 - 100 range
|
1912
|
-
to = limit(to);
|
1913
|
-
// Return false if handle can't move
|
1914
|
-
if (to === reference[handleNumber] && !getValue) {
|
1915
|
-
return false;
|
1916
|
-
}
|
1917
|
-
return to;
|
1918
|
-
}
|
1919
|
-
// Uses slider orientation to create CSS rules. a = base value;
|
1920
|
-
function inRuleOrder(v, a) {
|
1921
|
-
var o = options.ort;
|
1922
|
-
return (o ? a : v) + ", " + (o ? v : a);
|
1923
|
-
}
|
1924
|
-
// Moves handle(s) by a percentage
|
1925
|
-
// (bool, % to move, [% where handle started, ...], [index in scope_Handles, ...])
|
1926
|
-
function moveHandles(upward, proposal, locations, handleNumbers, connect) {
|
1927
|
-
var proposals = locations.slice();
|
1928
|
-
// Store first handle now, so we still have it in case handleNumbers is reversed
|
1929
|
-
var firstHandle = handleNumbers[0];
|
1930
|
-
var b = [!upward, upward];
|
1931
|
-
var f = [upward, !upward];
|
1932
|
-
// Copy handleNumbers so we don't change the dataset
|
1933
|
-
handleNumbers = handleNumbers.slice();
|
1934
|
-
// Check to see which handle is 'leading'.
|
1935
|
-
// If that one can't move the second can't either.
|
1936
|
-
if (upward) {
|
1937
|
-
handleNumbers.reverse();
|
1938
|
-
}
|
1939
|
-
// Step 1: get the maximum percentage that any of the handles can move
|
1940
|
-
if (handleNumbers.length > 1) {
|
1941
|
-
handleNumbers.forEach(function (handleNumber, o) {
|
1942
|
-
var to = checkHandlePosition(proposals, handleNumber, proposals[handleNumber] + proposal, b[o], f[o], false);
|
1943
|
-
// Stop if one of the handles can't move.
|
1944
|
-
if (to === false) {
|
1945
|
-
proposal = 0;
|
1946
|
-
}
|
1947
|
-
else {
|
1948
|
-
proposal = to - proposals[handleNumber];
|
1949
|
-
proposals[handleNumber] = to;
|
1950
|
-
}
|
1951
|
-
});
|
1952
|
-
}
|
1953
|
-
// If using one handle, check backward AND forward
|
1954
|
-
else {
|
1955
|
-
b = f = [true];
|
1956
|
-
}
|
1957
|
-
var state = false;
|
1958
|
-
// Step 2: Try to set the handles with the found percentage
|
1959
|
-
handleNumbers.forEach(function (handleNumber, o) {
|
1960
|
-
state = setHandle(handleNumber, locations[handleNumber] + proposal, b[o], f[o]) || state;
|
1961
|
-
});
|
1962
|
-
// Step 3: If a handle moved, fire events
|
1963
|
-
if (state) {
|
1964
|
-
handleNumbers.forEach(function (handleNumber) {
|
1965
|
-
fireEvent("update", handleNumber);
|
1966
|
-
fireEvent("slide", handleNumber);
|
1967
|
-
});
|
1968
|
-
// If target is a connect, then fire drag event
|
1969
|
-
if (connect != undefined) {
|
1970
|
-
fireEvent("drag", firstHandle);
|
1971
|
-
}
|
1972
|
-
}
|
1973
|
-
}
|
1974
|
-
// Takes a base value and an offset. This offset is used for the connect bar size.
|
1975
|
-
// In the initial design for this feature, the origin element was 1% wide.
|
1976
|
-
// Unfortunately, a rounding bug in Chrome makes it impossible to implement this feature
|
1977
|
-
// in this manner: https://bugs.chromium.org/p/chromium/issues/detail?id=798223
|
1978
|
-
function transformDirection(a, b) {
|
1979
|
-
return options.dir ? 100 - a - b : a;
|
1980
|
-
}
|
1981
|
-
// Updates scope_Locations and scope_Values, updates visual state
|
1982
|
-
function updateHandlePosition(handleNumber, to) {
|
1983
|
-
// Update locations.
|
1984
|
-
scope_Locations[handleNumber] = to;
|
1985
|
-
// Convert the value to the slider stepping/range.
|
1986
|
-
scope_Values[handleNumber] = scope_Spectrum.fromStepping(to);
|
1987
|
-
var translation = transformDirection(to, 0) - scope_DirOffset;
|
1988
|
-
var translateRule = "translate(" + inRuleOrder(translation + "%", "0") + ")";
|
1989
|
-
scope_Handles[handleNumber].style[options.transformRule] = translateRule;
|
1990
|
-
updateConnect(handleNumber);
|
1991
|
-
updateConnect(handleNumber + 1);
|
1992
|
-
}
|
1993
|
-
// Handles before the slider middle are stacked later = higher,
|
1994
|
-
// Handles after the middle later is lower
|
1995
|
-
// [[7] [8] .......... | .......... [5] [4]
|
1996
|
-
function setZindex() {
|
1997
|
-
scope_HandleNumbers.forEach(function (handleNumber) {
|
1998
|
-
var dir = scope_Locations[handleNumber] > 50 ? -1 : 1;
|
1999
|
-
var zIndex = 3 + (scope_Handles.length + dir * handleNumber);
|
2000
|
-
scope_Handles[handleNumber].style.zIndex = String(zIndex);
|
2001
|
-
});
|
2002
|
-
}
|
2003
|
-
// Test suggested values and apply margin, step.
|
2004
|
-
// if exactInput is true, don't run checkHandlePosition, then the handle can be placed in between steps (#436)
|
2005
|
-
function setHandle(handleNumber, to, lookBackward, lookForward, exactInput) {
|
2006
|
-
if (!exactInput) {
|
2007
|
-
to = checkHandlePosition(scope_Locations, handleNumber, to, lookBackward, lookForward, false);
|
2008
|
-
}
|
2009
|
-
if (to === false) {
|
2010
|
-
return false;
|
2011
|
-
}
|
2012
|
-
updateHandlePosition(handleNumber, to);
|
2013
|
-
return true;
|
2014
|
-
}
|
2015
|
-
// Updates style attribute for connect nodes
|
2016
|
-
function updateConnect(index) {
|
2017
|
-
// Skip connects set to false
|
2018
|
-
if (!scope_Connects[index]) {
|
2019
|
-
return;
|
2020
|
-
}
|
2021
|
-
var l = 0;
|
2022
|
-
var h = 100;
|
2023
|
-
if (index !== 0) {
|
2024
|
-
l = scope_Locations[index - 1];
|
2025
|
-
}
|
2026
|
-
if (index !== scope_Connects.length - 1) {
|
2027
|
-
h = scope_Locations[index];
|
2028
|
-
}
|
2029
|
-
// We use two rules:
|
2030
|
-
// 'translate' to change the left/top offset;
|
2031
|
-
// 'scale' to change the width of the element;
|
2032
|
-
// As the element has a width of 100%, a translation of 100% is equal to 100% of the parent (.noUi-base)
|
2033
|
-
var connectWidth = h - l;
|
2034
|
-
var translateRule = "translate(" + inRuleOrder(transformDirection(l, connectWidth) + "%", "0") + ")";
|
2035
|
-
var scaleRule = "scale(" + inRuleOrder(connectWidth / 100, "1") + ")";
|
2036
|
-
scope_Connects[index].style[options.transformRule] =
|
2037
|
-
translateRule + " " + scaleRule;
|
2038
|
-
}
|
2039
|
-
// Parses value passed to .set method. Returns current value if not parse-able.
|
2040
|
-
function resolveToValue(to, handleNumber) {
|
2041
|
-
// Setting with null indicates an 'ignore'.
|
2042
|
-
// Inputting 'false' is invalid.
|
2043
|
-
if (to === null || to === false || to === undefined) {
|
2044
|
-
return scope_Locations[handleNumber];
|
2045
|
-
}
|
2046
|
-
// If a formatted number was passed, attempt to decode it.
|
2047
|
-
if (typeof to === "number") {
|
2048
|
-
to = String(to);
|
2049
|
-
}
|
2050
|
-
to = options.format.from(to);
|
2051
|
-
if (to !== false) {
|
2052
|
-
to = scope_Spectrum.toStepping(to);
|
2053
|
-
}
|
2054
|
-
// If parsing the number failed, use the current value.
|
2055
|
-
if (to === false || isNaN(to)) {
|
2056
|
-
return scope_Locations[handleNumber];
|
2057
|
-
}
|
2058
|
-
return to;
|
2059
|
-
}
|
2060
|
-
// Set the slider value.
|
2061
|
-
function valueSet(input, fireSetEvent, exactInput) {
|
2062
|
-
var values = asArray(input);
|
2063
|
-
var isInit = scope_Locations[0] === undefined;
|
2064
|
-
// Event fires by default
|
2065
|
-
fireSetEvent = fireSetEvent === undefined ? true : fireSetEvent;
|
2066
|
-
// Animation is optional.
|
2067
|
-
// Make sure the initial values were set before using animated placement.
|
2068
|
-
if (options.animate && !isInit) {
|
2069
|
-
addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);
|
2070
|
-
}
|
2071
|
-
// First pass, without lookAhead but with lookBackward. Values are set from left to right.
|
2072
|
-
scope_HandleNumbers.forEach(function (handleNumber) {
|
2073
|
-
setHandle(handleNumber, resolveToValue(values[handleNumber], handleNumber), true, false, exactInput);
|
2074
|
-
});
|
2075
|
-
var i = scope_HandleNumbers.length === 1 ? 0 : 1;
|
2076
|
-
// Spread handles evenly across the slider if the range has no size (min=max)
|
2077
|
-
if (isInit && scope_Spectrum.hasNoSize()) {
|
2078
|
-
exactInput = true;
|
2079
|
-
scope_Locations[0] = 0;
|
2080
|
-
if (scope_HandleNumbers.length > 1) {
|
2081
|
-
var space_1 = 100 / (scope_HandleNumbers.length - 1);
|
2082
|
-
scope_HandleNumbers.forEach(function (handleNumber) {
|
2083
|
-
scope_Locations[handleNumber] = handleNumber * space_1;
|
2084
|
-
});
|
2085
|
-
}
|
2086
|
-
}
|
2087
|
-
// Secondary passes. Now that all base values are set, apply constraints.
|
2088
|
-
// Iterate all handles to ensure constraints are applied for the entire slider (Issue #1009)
|
2089
|
-
for (; i < scope_HandleNumbers.length; ++i) {
|
2090
|
-
scope_HandleNumbers.forEach(function (handleNumber) {
|
2091
|
-
setHandle(handleNumber, scope_Locations[handleNumber], true, true, exactInput);
|
2092
|
-
});
|
2093
|
-
}
|
2094
|
-
setZindex();
|
2095
|
-
scope_HandleNumbers.forEach(function (handleNumber) {
|
2096
|
-
fireEvent("update", handleNumber);
|
2097
|
-
// Fire the event only for handles that received a new value, as per #579
|
2098
|
-
if (values[handleNumber] !== null && fireSetEvent) {
|
2099
|
-
fireEvent("set", handleNumber);
|
2100
|
-
}
|
2101
|
-
});
|
2102
|
-
}
|
2103
|
-
// Reset slider to initial values
|
2104
|
-
function valueReset(fireSetEvent) {
|
2105
|
-
valueSet(options.start, fireSetEvent);
|
2106
|
-
}
|
2107
|
-
// Set value for a single handle
|
2108
|
-
function valueSetHandle(handleNumber, value, fireSetEvent, exactInput) {
|
2109
|
-
// Ensure numeric input
|
2110
|
-
handleNumber = Number(handleNumber);
|
2111
|
-
if (!(handleNumber >= 0 && handleNumber < scope_HandleNumbers.length)) {
|
2112
|
-
throw new Error("noUiSlider: invalid handle number, got: " + handleNumber);
|
2113
|
-
}
|
2114
|
-
// Look both backward and forward, since we don't want this handle to "push" other handles (#960);
|
2115
|
-
// The exactInput argument can be used to ignore slider stepping (#436)
|
2116
|
-
setHandle(handleNumber, resolveToValue(value, handleNumber), true, true, exactInput);
|
2117
|
-
fireEvent("update", handleNumber);
|
2118
|
-
if (fireSetEvent) {
|
2119
|
-
fireEvent("set", handleNumber);
|
2120
|
-
}
|
2121
|
-
}
|
2122
|
-
// Get the slider value.
|
2123
|
-
function valueGet(unencoded) {
|
2124
|
-
if (unencoded === void 0) { unencoded = false; }
|
2125
|
-
if (unencoded) {
|
2126
|
-
// return a copy of the raw values
|
2127
|
-
return scope_Values.length === 1 ? scope_Values[0] : scope_Values.slice(0);
|
2128
|
-
}
|
2129
|
-
var values = scope_Values.map(options.format.to);
|
2130
|
-
// If only one handle is used, return a single value.
|
2131
|
-
if (values.length === 1) {
|
2132
|
-
return values[0];
|
2133
|
-
}
|
2134
|
-
return values;
|
2135
|
-
}
|
2136
|
-
// Removes classes from the root and empties it.
|
2137
|
-
function destroy() {
|
2138
|
-
// remove protected internal listeners
|
2139
|
-
removeEvent(INTERNAL_EVENT_NS.aria);
|
2140
|
-
removeEvent(INTERNAL_EVENT_NS.tooltips);
|
2141
|
-
Object.keys(options.cssClasses).forEach(function (key) {
|
2142
|
-
removeClass(scope_Target, options.cssClasses[key]);
|
2143
|
-
});
|
2144
|
-
while (scope_Target.firstChild) {
|
2145
|
-
scope_Target.removeChild(scope_Target.firstChild);
|
2146
|
-
}
|
2147
|
-
delete scope_Target.noUiSlider;
|
2148
|
-
}
|
2149
|
-
function getNextStepsForHandle(handleNumber) {
|
2150
|
-
var location = scope_Locations[handleNumber];
|
2151
|
-
var nearbySteps = scope_Spectrum.getNearbySteps(location);
|
2152
|
-
var value = scope_Values[handleNumber];
|
2153
|
-
var increment = nearbySteps.thisStep.step;
|
2154
|
-
var decrement = null;
|
2155
|
-
// If snapped, directly use defined step value
|
2156
|
-
if (options.snap) {
|
2157
|
-
return [
|
2158
|
-
value - nearbySteps.stepBefore.startValue || null,
|
2159
|
-
nearbySteps.stepAfter.startValue - value || null,
|
2160
|
-
];
|
2161
|
-
}
|
2162
|
-
// If the next value in this step moves into the next step,
|
2163
|
-
// the increment is the start of the next step - the current value
|
2164
|
-
if (increment !== false) {
|
2165
|
-
if (value + increment > nearbySteps.stepAfter.startValue) {
|
2166
|
-
increment = nearbySteps.stepAfter.startValue - value;
|
2167
|
-
}
|
2168
|
-
}
|
2169
|
-
// If the value is beyond the starting point
|
2170
|
-
if (value > nearbySteps.thisStep.startValue) {
|
2171
|
-
decrement = nearbySteps.thisStep.step;
|
2172
|
-
}
|
2173
|
-
else if (nearbySteps.stepBefore.step === false) {
|
2174
|
-
decrement = false;
|
2175
|
-
}
|
2176
|
-
// If a handle is at the start of a step, it always steps back into the previous step first
|
2177
|
-
else {
|
2178
|
-
decrement = value - nearbySteps.stepBefore.highestStep;
|
2179
|
-
}
|
2180
|
-
// Now, if at the slider edges, there is no in/decrement
|
2181
|
-
if (location === 100) {
|
2182
|
-
increment = null;
|
2183
|
-
}
|
2184
|
-
else if (location === 0) {
|
2185
|
-
decrement = null;
|
2186
|
-
}
|
2187
|
-
// As per #391, the comparison for the decrement step can have some rounding issues.
|
2188
|
-
var stepDecimals = scope_Spectrum.countStepDecimals();
|
2189
|
-
// Round per #391
|
2190
|
-
if (increment !== null && increment !== false) {
|
2191
|
-
increment = Number(increment.toFixed(stepDecimals));
|
2192
|
-
}
|
2193
|
-
if (decrement !== null && decrement !== false) {
|
2194
|
-
decrement = Number(decrement.toFixed(stepDecimals));
|
2195
|
-
}
|
2196
|
-
return [decrement, increment];
|
2197
|
-
}
|
2198
|
-
// Get the current step size for the slider.
|
2199
|
-
function getNextSteps() {
|
2200
|
-
return scope_HandleNumbers.map(getNextStepsForHandle);
|
2201
|
-
}
|
2202
|
-
// Updatable: margin, limit, padding, step, range, animate, snap
|
2203
|
-
function updateOptions(optionsToUpdate, fireSetEvent) {
|
2204
|
-
// Spectrum is created using the range, snap, direction and step options.
|
2205
|
-
// 'snap' and 'step' can be updated.
|
2206
|
-
// If 'snap' and 'step' are not passed, they should remain unchanged.
|
2207
|
-
var v = valueGet();
|
2208
|
-
var updateAble = [
|
2209
|
-
"margin",
|
2210
|
-
"limit",
|
2211
|
-
"padding",
|
2212
|
-
"range",
|
2213
|
-
"animate",
|
2214
|
-
"snap",
|
2215
|
-
"step",
|
2216
|
-
"format",
|
2217
|
-
"pips",
|
2218
|
-
"tooltips",
|
2219
|
-
];
|
2220
|
-
// Only change options that we're actually passed to update.
|
2221
|
-
updateAble.forEach(function (name) {
|
2222
|
-
// Check for undefined. null removes the value.
|
2223
|
-
if (optionsToUpdate[name] !== undefined) {
|
2224
|
-
originalOptions[name] = optionsToUpdate[name];
|
2225
|
-
}
|
2226
|
-
});
|
2227
|
-
var newOptions = testOptions(originalOptions);
|
2228
|
-
// Load new options into the slider state
|
2229
|
-
updateAble.forEach(function (name) {
|
2230
|
-
if (optionsToUpdate[name] !== undefined) {
|
2231
|
-
options[name] = newOptions[name];
|
2232
|
-
}
|
2233
|
-
});
|
2234
|
-
scope_Spectrum = newOptions.spectrum;
|
2235
|
-
// Limit, margin and padding depend on the spectrum but are stored outside of it. (#677)
|
2236
|
-
options.margin = newOptions.margin;
|
2237
|
-
options.limit = newOptions.limit;
|
2238
|
-
options.padding = newOptions.padding;
|
2239
|
-
// Update pips, removes existing.
|
2240
|
-
if (options.pips) {
|
2241
|
-
pips(options.pips);
|
2242
|
-
}
|
2243
|
-
else {
|
2244
|
-
removePips();
|
2245
|
-
}
|
2246
|
-
// Update tooltips, removes existing.
|
2247
|
-
if (options.tooltips) {
|
2248
|
-
tooltips();
|
2249
|
-
}
|
2250
|
-
else {
|
2251
|
-
removeTooltips();
|
2252
|
-
}
|
2253
|
-
// Invalidate the current positioning so valueSet forces an update.
|
2254
|
-
scope_Locations = [];
|
2255
|
-
valueSet(isSet(optionsToUpdate.start) ? optionsToUpdate.start : v, fireSetEvent);
|
2256
|
-
}
|
2257
|
-
// Initialization steps
|
2258
|
-
function setupSlider() {
|
2259
|
-
// Create the base element, initialize HTML and set classes.
|
2260
|
-
// Add handles and connect elements.
|
2261
|
-
scope_Base = addSlider(scope_Target);
|
2262
|
-
addElements(options.connect, scope_Base);
|
2263
|
-
// Attach user events.
|
2264
|
-
bindSliderEvents(options.events);
|
2265
|
-
// Use the public value method to set the start values.
|
2266
|
-
valueSet(options.start);
|
2267
|
-
if (options.pips) {
|
2268
|
-
pips(options.pips);
|
2269
|
-
}
|
2270
|
-
if (options.tooltips) {
|
2271
|
-
tooltips();
|
2272
|
-
}
|
2273
|
-
aria();
|
2274
|
-
}
|
2275
|
-
setupSlider();
|
2276
|
-
var scope_Self = {
|
2277
|
-
destroy: destroy,
|
2278
|
-
steps: getNextSteps,
|
2279
|
-
on: bindEvent,
|
2280
|
-
off: removeEvent,
|
2281
|
-
get: valueGet,
|
2282
|
-
set: valueSet,
|
2283
|
-
setHandle: valueSetHandle,
|
2284
|
-
reset: valueReset,
|
2285
|
-
// Exposed for unit testing, don't use this in your application.
|
2286
|
-
__moveHandles: function (upward, proposal, handleNumbers) {
|
2287
|
-
moveHandles(upward, proposal, scope_Locations, handleNumbers);
|
2288
|
-
},
|
2289
|
-
options: originalOptions,
|
2290
|
-
updateOptions: updateOptions,
|
2291
|
-
target: scope_Target,
|
2292
|
-
removePips: removePips,
|
2293
|
-
removeTooltips: removeTooltips,
|
2294
|
-
getPositions: function () {
|
2295
|
-
return scope_Locations.slice();
|
2296
|
-
},
|
2297
|
-
getTooltips: function () {
|
2298
|
-
return scope_Tooltips;
|
2299
|
-
},
|
2300
|
-
getOrigins: function () {
|
2301
|
-
return scope_Handles;
|
2302
|
-
},
|
2303
|
-
pips: pips, // Issue #594
|
2304
|
-
};
|
2305
|
-
return scope_Self;
|
2306
|
-
}
|
2307
|
-
// Run the standard initializer
|
2308
|
-
function initialize(target, originalOptions) {
|
2309
|
-
if (!target || !target.nodeName) {
|
2310
|
-
throw new Error("noUiSlider: create requires a single element, got: " + target);
|
2311
|
-
}
|
2312
|
-
// Throw an error if the slider was already initialized.
|
2313
|
-
if (target.noUiSlider) {
|
2314
|
-
throw new Error("noUiSlider: Slider was already initialized.");
|
2315
|
-
}
|
2316
|
-
// Test the options and create the slider environment;
|
2317
|
-
var options = testOptions(originalOptions);
|
2318
|
-
var api = scope(target, options, originalOptions);
|
2319
|
-
target.noUiSlider = api;
|
2320
|
-
return api;
|
2321
|
-
}
|
2322
|
-
var nouislider = {
|
2323
|
-
// Exposed for unit testing, don't use this in your application.
|
2324
|
-
__spectrum: Spectrum,
|
2325
|
-
// A reference to the default classes, allows global changes.
|
2326
|
-
// Use the cssClasses option for changes to one slider.
|
2327
|
-
cssClasses: cssClasses,
|
2328
|
-
create: initialize,
|
2329
|
-
};
|
2330
|
-
|
2331
|
-
exports.create = initialize;
|
2332
|
-
exports.cssClasses = cssClasses;
|
2333
|
-
exports["default"] = nouislider;
|
2334
|
-
|
2335
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
2336
|
-
|
2337
|
-
}));
|