@content-blocks/js 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +4 -0
- package/dist/cjs/BehaviorSubject-771fd78b.js +640 -0
- package/dist/cjs/BehaviorSubject-771fd78b.js.map +1 -0
- package/dist/cjs/Youtube-41424972.js +807 -0
- package/dist/cjs/Youtube-41424972.js.map +1 -0
- package/dist/cjs/content-accordion.cjs.entry.js +114 -0
- package/dist/cjs/content-accordion.cjs.entry.js.map +1 -0
- package/dist/cjs/content-blocks.cjs.js +25 -0
- package/dist/cjs/content-blocks.cjs.js.map +1 -0
- package/dist/cjs/content-button_4.cjs.entry.js +2165 -0
- package/dist/cjs/content-button_4.cjs.entry.js.map +1 -0
- package/dist/cjs/content-carousel-8b0e8962.js +1488 -0
- package/dist/cjs/content-carousel-8b0e8962.js.map +1 -0
- package/dist/cjs/content-carousel.cjs.entry.js +13 -0
- package/dist/cjs/content-carousel.cjs.entry.js.map +1 -0
- package/dist/cjs/content-grid-formatter.cjs.entry.js +50 -0
- package/dist/cjs/content-grid-formatter.cjs.entry.js.map +1 -0
- package/dist/cjs/content-hero-block.cjs.entry.js +46 -0
- package/dist/cjs/content-hero-block.cjs.entry.js.map +1 -0
- package/dist/cjs/content-image.cjs.entry.js +95 -0
- package/dist/cjs/content-image.cjs.entry.js.map +1 -0
- package/dist/cjs/content-navigation-block.cjs.entry.js +62 -0
- package/dist/cjs/content-navigation-block.cjs.entry.js.map +1 -0
- package/dist/cjs/content-split-block.cjs.entry.js +36 -0
- package/dist/cjs/content-split-block.cjs.entry.js.map +1 -0
- package/dist/cjs/content-tabs.cjs.entry.js +219 -0
- package/dist/cjs/content-tabs.cjs.entry.js.map +1 -0
- package/dist/cjs/content-text-block.cjs.entry.js +48 -0
- package/dist/cjs/content-text-block.cjs.entry.js.map +1 -0
- package/dist/cjs/content-tout-block.cjs.entry.js +32 -0
- package/dist/cjs/content-tout-block.cjs.entry.js.map +1 -0
- package/dist/cjs/content-video.cjs.entry.js +114 -0
- package/dist/cjs/content-video.cjs.entry.js.map +1 -0
- package/dist/cjs/index-a42fb1d0.js +2116 -0
- package/dist/cjs/index-a42fb1d0.js.map +1 -0
- package/dist/cjs/index.cjs.js +11 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/swiper-8c9ab198.js +3612 -0
- package/dist/cjs/swiper-8c9ab198.js.map +1 -0
- package/dist/cjs/utils-6c985f2f.js +113 -0
- package/dist/cjs/utils-6c985f2f.js.map +1 -0
- package/dist/cjs/video.es-7d4d33f5.js +64206 -0
- package/dist/cjs/video.es-7d4d33f5.js.map +1 -0
- package/dist/cjs/window-resize-service-c9766178.js +35 -0
- package/dist/cjs/window-resize-service-c9766178.js.map +1 -0
- package/dist/collection/blocks/content-hero-block/content-hero-block.css +39 -0
- package/dist/collection/blocks/content-hero-block/content-hero-block.js +138 -0
- package/dist/collection/blocks/content-hero-block/content-hero-block.js.map +1 -0
- package/dist/collection/blocks/content-hero-block/test/content-hero-block.e2e.js +10 -0
- package/dist/collection/blocks/content-hero-block/test/content-hero-block.e2e.js.map +1 -0
- package/dist/collection/blocks/content-hero-block/test/content-hero-block.spec.js +18 -0
- package/dist/collection/blocks/content-hero-block/test/content-hero-block.spec.js.map +1 -0
- package/dist/collection/blocks/content-split-block/content-split-block.css +18 -0
- package/dist/collection/blocks/content-split-block/content-split-block.js +125 -0
- package/dist/collection/blocks/content-split-block/content-split-block.js.map +1 -0
- package/dist/collection/blocks/content-split-block/test/content-split-block.e2e.js +10 -0
- package/dist/collection/blocks/content-split-block/test/content-split-block.e2e.js.map +1 -0
- package/dist/collection/blocks/content-split-block/test/content-split-block.spec.js +18 -0
- package/dist/collection/blocks/content-split-block/test/content-split-block.spec.js.map +1 -0
- package/dist/collection/blocks/content-text-block/content-text-block.css +47 -0
- package/dist/collection/blocks/content-text-block/content-text-block.js +192 -0
- package/dist/collection/blocks/content-text-block/content-text-block.js.map +1 -0
- package/dist/collection/blocks/content-text-block/test/content-text-block.e2e.js +10 -0
- package/dist/collection/blocks/content-text-block/test/content-text-block.e2e.js.map +1 -0
- package/dist/collection/blocks/content-text-block/test/content-text-block.spec.js +18 -0
- package/dist/collection/blocks/content-text-block/test/content-text-block.spec.js.map +1 -0
- package/dist/collection/blocks/content-tout-block/content-tout-block.css +35 -0
- package/dist/collection/blocks/content-tout-block/content-tout-block.js +74 -0
- package/dist/collection/blocks/content-tout-block/content-tout-block.js.map +1 -0
- package/dist/collection/blocks/content-tout-block/test/content-tout-block.e2e.js +10 -0
- package/dist/collection/blocks/content-tout-block/test/content-tout-block.e2e.js.map +1 -0
- package/dist/collection/blocks/content-tout-block/test/content-tout-block.spec.js +18 -0
- package/dist/collection/blocks/content-tout-block/test/content-tout-block.spec.js.map +1 -0
- package/dist/collection/collection-manifest.json +27 -0
- package/dist/collection/components/content-accordion/content-accordion.css +11 -0
- package/dist/collection/components/content-accordion/content-accordion.js +33 -0
- package/dist/collection/components/content-accordion/content-accordion.js.map +1 -0
- package/dist/collection/components/content-accordion/libraries/w3_disclosure_button.js +87 -0
- package/dist/collection/components/content-accordion/libraries/w3_disclosure_button.js.map +1 -0
- package/dist/collection/components/content-accordion/test/content-accordion.e2e.js +10 -0
- package/dist/collection/components/content-accordion/test/content-accordion.e2e.js.map +1 -0
- package/dist/collection/components/content-accordion/test/content-accordion.spec.js +18 -0
- package/dist/collection/components/content-accordion/test/content-accordion.spec.js.map +1 -0
- package/dist/collection/components/content-carousel/content-carousel.css +21 -0
- package/dist/collection/components/content-carousel/content-carousel.js +152 -0
- package/dist/collection/components/content-carousel/content-carousel.js.map +1 -0
- package/dist/collection/components/content-carousel/test/content-carousel.e2e.js +10 -0
- package/dist/collection/components/content-carousel/test/content-carousel.e2e.js.map +1 -0
- package/dist/collection/components/content-carousel/test/content-carousel.spec.js +18 -0
- package/dist/collection/components/content-carousel/test/content-carousel.spec.js.map +1 -0
- package/dist/collection/components/content-navigation-block/content-navigation-block.css +51 -0
- package/dist/collection/components/content-navigation-block/content-navigation-block.js +146 -0
- package/dist/collection/components/content-navigation-block/content-navigation-block.js.map +1 -0
- package/dist/collection/components/content-navigation-block/test/content-navigation-block.e2e.js +10 -0
- package/dist/collection/components/content-navigation-block/test/content-navigation-block.e2e.js.map +1 -0
- package/dist/collection/components/content-navigation-block/test/content-navigation-block.spec.js +18 -0
- package/dist/collection/components/content-navigation-block/test/content-navigation-block.spec.js.map +1 -0
- package/dist/collection/components/content-overlay/content-overlay.css +103 -0
- package/dist/collection/components/content-overlay/content-overlay.js +384 -0
- package/dist/collection/components/content-overlay/content-overlay.js.map +1 -0
- package/dist/collection/components/content-overlay/libraries/aria-dialog.js +356 -0
- package/dist/collection/components/content-overlay/libraries/aria-dialog.js.map +1 -0
- package/dist/collection/components/content-overlay/libraries/aria-utilities.js +78 -0
- package/dist/collection/components/content-overlay/libraries/aria-utilities.js.map +1 -0
- package/dist/collection/components/content-overlay/test/content-overlay.e2e.js +10 -0
- package/dist/collection/components/content-overlay/test/content-overlay.e2e.js.map +1 -0
- package/dist/collection/components/content-overlay/test/content-overlay.spec.js +18 -0
- package/dist/collection/components/content-overlay/test/content-overlay.spec.js.map +1 -0
- package/dist/collection/components/content-tabs/content-tabs.css +19 -0
- package/dist/collection/components/content-tabs/content-tabs.js +27 -0
- package/dist/collection/components/content-tabs/content-tabs.js.map +1 -0
- package/dist/collection/components/content-tabs/libraries/w3_tabs.js +223 -0
- package/dist/collection/components/content-tabs/libraries/w3_tabs.js.map +1 -0
- package/dist/collection/components/content-tabs/test/content-tabs.e2e.js +10 -0
- package/dist/collection/components/content-tabs/test/content-tabs.e2e.js.map +1 -0
- package/dist/collection/components/content-tabs/test/content-tabs.spec.js +18 -0
- package/dist/collection/components/content-tabs/test/content-tabs.spec.js.map +1 -0
- package/dist/collection/elements/content-button/content-button.css +37 -0
- package/dist/collection/elements/content-button/content-button.js +257 -0
- package/dist/collection/elements/content-button/content-button.js.map +1 -0
- package/dist/collection/elements/content-button/test/content-button.e2e.js +10 -0
- package/dist/collection/elements/content-button/test/content-button.e2e.js.map +1 -0
- package/dist/collection/elements/content-button/test/content-button.spec.js +18 -0
- package/dist/collection/elements/content-button/test/content-button.spec.js.map +1 -0
- package/dist/collection/elements/content-image/content-image.css +53 -0
- package/dist/collection/elements/content-image/content-image.js +305 -0
- package/dist/collection/elements/content-image/content-image.js.map +1 -0
- package/dist/collection/elements/content-image/test/content-image.e2e.js +10 -0
- package/dist/collection/elements/content-image/test/content-image.e2e.js.map +1 -0
- package/dist/collection/elements/content-image/test/content-image.spec.js +18 -0
- package/dist/collection/elements/content-image/test/content-image.spec.js.map +1 -0
- package/dist/collection/elements/content-line/content-line.css +18 -0
- package/dist/collection/elements/content-line/content-line.e2e.js +10 -0
- package/dist/collection/elements/content-line/content-line.e2e.js.map +1 -0
- package/dist/collection/elements/content-line/content-line.js +229 -0
- package/dist/collection/elements/content-line/content-line.js.map +1 -0
- package/dist/collection/elements/content-video/content-video.css +75 -0
- package/dist/collection/elements/content-video/content-video.js +391 -0
- package/dist/collection/elements/content-video/content-video.js.map +1 -0
- package/dist/collection/elements/content-video/test/content-video.e2e.js +10 -0
- package/dist/collection/elements/content-video/test/content-video.e2e.js.map +1 -0
- package/dist/collection/elements/content-video/test/content-video.spec.js +18 -0
- package/dist/collection/elements/content-video/test/content-video.spec.js.map +1 -0
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.css +43 -0
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js +269 -0
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js.map +1 -0
- package/dist/collection/formatters/content-grid-formatter/test/content-grid-formatter.e2e.js +10 -0
- package/dist/collection/formatters/content-grid-formatter/test/content-grid-formatter.e2e.js.map +1 -0
- package/dist/collection/formatters/content-grid-formatter/test/content-grid-formatter.spec.js +18 -0
- package/dist/collection/formatters/content-grid-formatter/test/content-grid-formatter.spec.js.map +1 -0
- package/dist/collection/formatters/content-spacer/content-spacer.css +32 -0
- package/dist/collection/formatters/content-spacer/content-spacer.js +350 -0
- package/dist/collection/formatters/content-spacer/content-spacer.js.map +1 -0
- package/dist/collection/formatters/content-spacer/test/content-spacer.e2e.js +10 -0
- package/dist/collection/formatters/content-spacer/test/content-spacer.e2e.js.map +1 -0
- package/dist/collection/formatters/content-spacer/test/content-spacer.spec.js +18 -0
- package/dist/collection/formatters/content-spacer/test/content-spacer.spec.js.map +1 -0
- package/dist/collection/globalScript.js +15 -0
- package/dist/collection/globalScript.js.map +1 -0
- package/dist/collection/index.js +3 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/sass/_mixins.scss +249 -0
- package/dist/collection/sass/_variables.scss +18 -0
- package/dist/collection/services/content-events-service.js +23 -0
- package/dist/collection/services/content-events-service.js.map +1 -0
- package/dist/collection/services/window-resize-service.js +29 -0
- package/dist/collection/services/window-resize-service.js.map +1 -0
- package/dist/collection/utils/utils.js +88 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/collection/utils/utils.spec.js +1 -0
- package/dist/collection/utils/utils.spec.js.map +1 -0
- package/dist/components/BehaviorSubject.js +637 -0
- package/dist/components/BehaviorSubject.js.map +1 -0
- package/dist/components/Youtube.js +805 -0
- package/dist/components/Youtube.js.map +1 -0
- package/dist/components/content-accordion.d.ts +11 -0
- package/dist/components/content-accordion.js +127 -0
- package/dist/components/content-accordion.js.map +1 -0
- package/dist/components/content-button.d.ts +11 -0
- package/dist/components/content-button.js +88 -0
- package/dist/components/content-button.js.map +1 -0
- package/dist/components/content-carousel.d.ts +11 -0
- package/dist/components/content-carousel.js +1489 -0
- package/dist/components/content-carousel.js.map +1 -0
- package/dist/components/content-grid-formatter.d.ts +11 -0
- package/dist/components/content-grid-formatter.js +8 -0
- package/dist/components/content-grid-formatter.js.map +1 -0
- package/dist/components/content-grid-formatter2.js +68 -0
- package/dist/components/content-grid-formatter2.js.map +1 -0
- package/dist/components/content-hero-block.d.ts +11 -0
- package/dist/components/content-hero-block.js +63 -0
- package/dist/components/content-hero-block.js.map +1 -0
- package/dist/components/content-image.d.ts +11 -0
- package/dist/components/content-image.js +120 -0
- package/dist/components/content-image.js.map +1 -0
- package/dist/components/content-line.d.ts +11 -0
- package/dist/components/content-line.js +70 -0
- package/dist/components/content-line.js.map +1 -0
- package/dist/components/content-navigation-block.d.ts +11 -0
- package/dist/components/content-navigation-block.js +79 -0
- package/dist/components/content-navigation-block.js.map +1 -0
- package/dist/components/content-overlay.d.ts +11 -0
- package/dist/components/content-overlay.js +2048 -0
- package/dist/components/content-overlay.js.map +1 -0
- package/dist/components/content-spacer.d.ts +11 -0
- package/dist/components/content-spacer.js +76 -0
- package/dist/components/content-spacer.js.map +1 -0
- package/dist/components/content-split-block.d.ts +11 -0
- package/dist/components/content-split-block.js +58 -0
- package/dist/components/content-split-block.js.map +1 -0
- package/dist/components/content-tabs.d.ts +11 -0
- package/dist/components/content-tabs.js +232 -0
- package/dist/components/content-tabs.js.map +1 -0
- package/dist/components/content-text-block.d.ts +11 -0
- package/dist/components/content-text-block.js +66 -0
- package/dist/components/content-text-block.js.map +1 -0
- package/dist/components/content-tout-block.d.ts +11 -0
- package/dist/components/content-tout-block.js +46 -0
- package/dist/components/content-tout-block.js.map +1 -0
- package/dist/components/content-video.d.ts +11 -0
- package/dist/components/content-video.js +141 -0
- package/dist/components/content-video.js.map +1 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/index.js +4 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/swiper.js +3608 -0
- package/dist/components/swiper.js.map +1 -0
- package/dist/components/utils.js +106 -0
- package/dist/components/utils.js.map +1 -0
- package/dist/components/video.es.js +64201 -0
- package/dist/components/video.es.js.map +1 -0
- package/dist/components/window-resize-service.js +33 -0
- package/dist/components/window-resize-service.js.map +1 -0
- package/dist/content-blocks/content-blocks.esm.js +2 -0
- package/dist/content-blocks/content-blocks.esm.js.map +1 -0
- package/dist/content-blocks/index.esm.js +2 -0
- package/dist/content-blocks/index.esm.js.map +1 -0
- package/dist/content-blocks/p-03ca48aa.js +2 -0
- package/dist/content-blocks/p-03ca48aa.js.map +1 -0
- package/dist/content-blocks/p-0ee5bbb6.entry.js +2 -0
- package/dist/content-blocks/p-0ee5bbb6.entry.js.map +1 -0
- package/dist/content-blocks/p-193fa2c0.entry.js +2 -0
- package/dist/content-blocks/p-193fa2c0.entry.js.map +1 -0
- package/dist/content-blocks/p-1b699607.js +2 -0
- package/dist/content-blocks/p-1b699607.js.map +1 -0
- package/dist/content-blocks/p-1efe0577.entry.js +2 -0
- package/dist/content-blocks/p-1efe0577.entry.js.map +1 -0
- package/dist/content-blocks/p-2357f07a.entry.js +2 -0
- package/dist/content-blocks/p-2357f07a.entry.js.map +1 -0
- package/dist/content-blocks/p-363e8357.entry.js +2 -0
- package/dist/content-blocks/p-363e8357.entry.js.map +1 -0
- package/dist/content-blocks/p-36793013.entry.js +10 -0
- package/dist/content-blocks/p-36793013.entry.js.map +1 -0
- package/dist/content-blocks/p-3a170c2c.entry.js +2 -0
- package/dist/content-blocks/p-3a170c2c.entry.js.map +1 -0
- package/dist/content-blocks/p-43a91cc7.js +29 -0
- package/dist/content-blocks/p-43a91cc7.js.map +1 -0
- package/dist/content-blocks/p-6d43a03c.js +2 -0
- package/dist/content-blocks/p-6d43a03c.js.map +1 -0
- package/dist/content-blocks/p-89fb0d8f.js +2 -0
- package/dist/content-blocks/p-89fb0d8f.js.map +1 -0
- package/dist/content-blocks/p-a7dfb547.entry.js +2 -0
- package/dist/content-blocks/p-a7dfb547.entry.js.map +1 -0
- package/dist/content-blocks/p-b27d54cb.entry.js +2 -0
- package/dist/content-blocks/p-b27d54cb.entry.js.map +1 -0
- package/dist/content-blocks/p-bf1cfb7b.js +3 -0
- package/dist/content-blocks/p-bf1cfb7b.js.map +1 -0
- package/dist/content-blocks/p-c5891e59.js +2 -0
- package/dist/content-blocks/p-c5891e59.js.map +1 -0
- package/dist/content-blocks/p-cd552ce2.js +2 -0
- package/dist/content-blocks/p-cd552ce2.js.map +1 -0
- package/dist/content-blocks/p-ce179781.entry.js +2 -0
- package/dist/content-blocks/p-ce179781.entry.js.map +1 -0
- package/dist/content-blocks/p-d3503dde.entry.js +2 -0
- package/dist/content-blocks/p-d3503dde.entry.js.map +1 -0
- package/dist/content-blocks/p-dca7ab2c.entry.js +2 -0
- package/dist/content-blocks/p-dca7ab2c.entry.js.map +1 -0
- package/dist/content-blocks/sass/_mixins.scss +249 -0
- package/dist/content-blocks/sass/_variables.scss +18 -0
- package/dist/esm/BehaviorSubject-bc7e0e99.js +637 -0
- package/dist/esm/BehaviorSubject-bc7e0e99.js.map +1 -0
- package/dist/esm/Youtube-6c271d8d.js +805 -0
- package/dist/esm/Youtube-6c271d8d.js.map +1 -0
- package/dist/esm/content-accordion.entry.js +110 -0
- package/dist/esm/content-accordion.entry.js.map +1 -0
- package/dist/esm/content-blocks.js +20 -0
- package/dist/esm/content-blocks.js.map +1 -0
- package/dist/esm/content-button_4.entry.js +2158 -0
- package/dist/esm/content-button_4.entry.js.map +1 -0
- package/dist/esm/content-carousel-cf7daf22.js +1469 -0
- package/dist/esm/content-carousel-cf7daf22.js.map +1 -0
- package/dist/esm/content-carousel.entry.js +5 -0
- package/dist/esm/content-carousel.entry.js.map +1 -0
- package/dist/esm/content-grid-formatter.entry.js +46 -0
- package/dist/esm/content-grid-formatter.entry.js.map +1 -0
- package/dist/esm/content-hero-block.entry.js +42 -0
- package/dist/esm/content-hero-block.entry.js.map +1 -0
- package/dist/esm/content-image.entry.js +91 -0
- package/dist/esm/content-image.entry.js.map +1 -0
- package/dist/esm/content-navigation-block.entry.js +58 -0
- package/dist/esm/content-navigation-block.entry.js.map +1 -0
- package/dist/esm/content-split-block.entry.js +32 -0
- package/dist/esm/content-split-block.entry.js.map +1 -0
- package/dist/esm/content-tabs.entry.js +215 -0
- package/dist/esm/content-tabs.entry.js.map +1 -0
- package/dist/esm/content-text-block.entry.js +44 -0
- package/dist/esm/content-text-block.entry.js.map +1 -0
- package/dist/esm/content-tout-block.entry.js +28 -0
- package/dist/esm/content-tout-block.entry.js.map +1 -0
- package/dist/esm/content-video.entry.js +110 -0
- package/dist/esm/content-video.entry.js.map +1 -0
- package/dist/esm/index-6701e2ba.js +2087 -0
- package/dist/esm/index-6701e2ba.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/swiper-977c310f.js +3610 -0
- package/dist/esm/swiper-977c310f.js.map +1 -0
- package/dist/esm/utils-27374a56.js +106 -0
- package/dist/esm/utils-27374a56.js.map +1 -0
- package/dist/esm/video.es-e4c3f886.js +64201 -0
- package/dist/esm/video.es-e4c3f886.js.map +1 -0
- package/dist/esm/window-resize-service-8a52f08c.js +33 -0
- package/dist/esm/window-resize-service-8a52f08c.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/blocks/content-hero-block/content-hero-block.d.ts +33 -0
- package/dist/types/blocks/content-split-block/content-split-block.d.ts +27 -0
- package/dist/types/blocks/content-text-block/content-text-block.d.ts +44 -0
- package/dist/types/blocks/content-tout-block/content-tout-block.d.ts +22 -0
- package/dist/types/components/content-accordion/content-accordion.d.ts +12 -0
- package/dist/types/components/content-accordion/libraries/w3_disclosure_button.d.ts +4 -0
- package/dist/types/components/content-carousel/content-carousel.d.ts +36 -0
- package/dist/types/components/content-navigation-block/content-navigation-block.d.ts +31 -0
- package/dist/types/components/content-overlay/content-overlay.d.ts +69 -0
- package/dist/types/components/content-overlay/libraries/aria-dialog.d.ts +5 -0
- package/dist/types/components/content-overlay/libraries/aria-utilities.d.ts +5 -0
- package/dist/types/components/content-tabs/content-tabs.d.ts +10 -0
- package/dist/types/components/content-tabs/libraries/w3_tabs.d.ts +4 -0
- package/dist/types/components.d.ts +994 -0
- package/dist/types/elements/content-button/content-button.d.ts +55 -0
- package/dist/types/elements/content-image/content-image.d.ts +56 -0
- package/dist/types/elements/content-line/content-line.d.ts +56 -0
- package/dist/types/elements/content-video/content-video.d.ts +77 -0
- package/dist/types/formatters/content-grid-formatter/content-grid-formatter.d.ts +52 -0
- package/dist/types/formatters/content-spacer/content-spacer.d.ts +73 -0
- package/dist/types/globalScript.d.ts +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/services/content-events-service.d.ts +11 -0
- package/dist/types/services/window-resize-service.d.ts +11 -0
- package/dist/types/stencil-public-runtime.d.ts +1652 -0
- package/dist/types/typings.d.ts +11 -0
- package/dist/types/utils/utils.d.ts +13 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +21 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +11 -0
- package/package.json +65 -0
|
@@ -0,0 +1,1469 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-6701e2ba.js';
|
|
2
|
+
import { B as BehaviorSubject } from './BehaviorSubject-bc7e0e99.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* SSR Window 4.0.2
|
|
6
|
+
* Better handling for window object in SSR environment
|
|
7
|
+
* https://github.com/nolimits4web/ssr-window
|
|
8
|
+
*
|
|
9
|
+
* Copyright 2021, Vladimir Kharlampidi
|
|
10
|
+
*
|
|
11
|
+
* Licensed under MIT
|
|
12
|
+
*
|
|
13
|
+
* Released on: December 13, 2021
|
|
14
|
+
*/
|
|
15
|
+
/* eslint-disable no-param-reassign */
|
|
16
|
+
function isObject$1(obj) {
|
|
17
|
+
return obj !== null && typeof obj === 'object' && 'constructor' in obj && obj.constructor === Object;
|
|
18
|
+
}
|
|
19
|
+
function extend$1(target, src) {
|
|
20
|
+
if (target === void 0) {
|
|
21
|
+
target = {};
|
|
22
|
+
}
|
|
23
|
+
if (src === void 0) {
|
|
24
|
+
src = {};
|
|
25
|
+
}
|
|
26
|
+
Object.keys(src).forEach(key => {
|
|
27
|
+
if (typeof target[key] === 'undefined') target[key] = src[key];else if (isObject$1(src[key]) && isObject$1(target[key]) && Object.keys(src[key]).length > 0) {
|
|
28
|
+
extend$1(target[key], src[key]);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
const ssrDocument = {
|
|
33
|
+
body: {},
|
|
34
|
+
addEventListener() {},
|
|
35
|
+
removeEventListener() {},
|
|
36
|
+
activeElement: {
|
|
37
|
+
blur() {},
|
|
38
|
+
nodeName: ''
|
|
39
|
+
},
|
|
40
|
+
querySelector() {
|
|
41
|
+
return null;
|
|
42
|
+
},
|
|
43
|
+
querySelectorAll() {
|
|
44
|
+
return [];
|
|
45
|
+
},
|
|
46
|
+
getElementById() {
|
|
47
|
+
return null;
|
|
48
|
+
},
|
|
49
|
+
createEvent() {
|
|
50
|
+
return {
|
|
51
|
+
initEvent() {}
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
createElement() {
|
|
55
|
+
return {
|
|
56
|
+
children: [],
|
|
57
|
+
childNodes: [],
|
|
58
|
+
style: {},
|
|
59
|
+
setAttribute() {},
|
|
60
|
+
getElementsByTagName() {
|
|
61
|
+
return [];
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
createElementNS() {
|
|
66
|
+
return {};
|
|
67
|
+
},
|
|
68
|
+
importNode() {
|
|
69
|
+
return null;
|
|
70
|
+
},
|
|
71
|
+
location: {
|
|
72
|
+
hash: '',
|
|
73
|
+
host: '',
|
|
74
|
+
hostname: '',
|
|
75
|
+
href: '',
|
|
76
|
+
origin: '',
|
|
77
|
+
pathname: '',
|
|
78
|
+
protocol: '',
|
|
79
|
+
search: ''
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
function getDocument() {
|
|
83
|
+
const doc = typeof document !== 'undefined' ? document : {};
|
|
84
|
+
extend$1(doc, ssrDocument);
|
|
85
|
+
return doc;
|
|
86
|
+
}
|
|
87
|
+
const ssrWindow = {
|
|
88
|
+
document: ssrDocument,
|
|
89
|
+
navigator: {
|
|
90
|
+
userAgent: ''
|
|
91
|
+
},
|
|
92
|
+
location: {
|
|
93
|
+
hash: '',
|
|
94
|
+
host: '',
|
|
95
|
+
hostname: '',
|
|
96
|
+
href: '',
|
|
97
|
+
origin: '',
|
|
98
|
+
pathname: '',
|
|
99
|
+
protocol: '',
|
|
100
|
+
search: ''
|
|
101
|
+
},
|
|
102
|
+
history: {
|
|
103
|
+
replaceState() {},
|
|
104
|
+
pushState() {},
|
|
105
|
+
go() {},
|
|
106
|
+
back() {}
|
|
107
|
+
},
|
|
108
|
+
CustomEvent: function CustomEvent() {
|
|
109
|
+
return this;
|
|
110
|
+
},
|
|
111
|
+
addEventListener() {},
|
|
112
|
+
removeEventListener() {},
|
|
113
|
+
getComputedStyle() {
|
|
114
|
+
return {
|
|
115
|
+
getPropertyValue() {
|
|
116
|
+
return '';
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
},
|
|
120
|
+
Image() {},
|
|
121
|
+
Date() {},
|
|
122
|
+
screen: {},
|
|
123
|
+
setTimeout() {},
|
|
124
|
+
clearTimeout() {},
|
|
125
|
+
matchMedia() {
|
|
126
|
+
return {};
|
|
127
|
+
},
|
|
128
|
+
requestAnimationFrame(callback) {
|
|
129
|
+
if (typeof setTimeout === 'undefined') {
|
|
130
|
+
callback();
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
return setTimeout(callback, 0);
|
|
134
|
+
},
|
|
135
|
+
cancelAnimationFrame(id) {
|
|
136
|
+
if (typeof setTimeout === 'undefined') {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
clearTimeout(id);
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
function getWindow() {
|
|
143
|
+
const win = typeof window !== 'undefined' ? window : {};
|
|
144
|
+
extend$1(win, ssrWindow);
|
|
145
|
+
return win;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function deleteProps(obj) {
|
|
149
|
+
const object = obj;
|
|
150
|
+
Object.keys(object).forEach(key => {
|
|
151
|
+
try {
|
|
152
|
+
object[key] = null;
|
|
153
|
+
} catch (e) {
|
|
154
|
+
// no getter for object
|
|
155
|
+
}
|
|
156
|
+
try {
|
|
157
|
+
delete object[key];
|
|
158
|
+
} catch (e) {
|
|
159
|
+
// something got wrong
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
function nextTick(callback, delay) {
|
|
164
|
+
if (delay === void 0) {
|
|
165
|
+
delay = 0;
|
|
166
|
+
}
|
|
167
|
+
return setTimeout(callback, delay);
|
|
168
|
+
}
|
|
169
|
+
function now() {
|
|
170
|
+
return Date.now();
|
|
171
|
+
}
|
|
172
|
+
function getComputedStyle(el) {
|
|
173
|
+
const window = getWindow();
|
|
174
|
+
let style;
|
|
175
|
+
if (window.getComputedStyle) {
|
|
176
|
+
style = window.getComputedStyle(el, null);
|
|
177
|
+
}
|
|
178
|
+
if (!style && el.currentStyle) {
|
|
179
|
+
style = el.currentStyle;
|
|
180
|
+
}
|
|
181
|
+
if (!style) {
|
|
182
|
+
style = el.style;
|
|
183
|
+
}
|
|
184
|
+
return style;
|
|
185
|
+
}
|
|
186
|
+
function getTranslate(el, axis) {
|
|
187
|
+
if (axis === void 0) {
|
|
188
|
+
axis = 'x';
|
|
189
|
+
}
|
|
190
|
+
const window = getWindow();
|
|
191
|
+
let matrix;
|
|
192
|
+
let curTransform;
|
|
193
|
+
let transformMatrix;
|
|
194
|
+
const curStyle = getComputedStyle(el);
|
|
195
|
+
if (window.WebKitCSSMatrix) {
|
|
196
|
+
curTransform = curStyle.transform || curStyle.webkitTransform;
|
|
197
|
+
if (curTransform.split(',').length > 6) {
|
|
198
|
+
curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', ');
|
|
199
|
+
}
|
|
200
|
+
// Some old versions of Webkit choke when 'none' is passed; pass
|
|
201
|
+
// empty string instead in this case
|
|
202
|
+
transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);
|
|
203
|
+
} else {
|
|
204
|
+
transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');
|
|
205
|
+
matrix = transformMatrix.toString().split(',');
|
|
206
|
+
}
|
|
207
|
+
if (axis === 'x') {
|
|
208
|
+
// Latest Chrome and webkits Fix
|
|
209
|
+
if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41;
|
|
210
|
+
// Crazy IE10 Matrix
|
|
211
|
+
else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);
|
|
212
|
+
// Normal Browsers
|
|
213
|
+
else curTransform = parseFloat(matrix[4]);
|
|
214
|
+
}
|
|
215
|
+
if (axis === 'y') {
|
|
216
|
+
// Latest Chrome and webkits Fix
|
|
217
|
+
if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42;
|
|
218
|
+
// Crazy IE10 Matrix
|
|
219
|
+
else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);
|
|
220
|
+
// Normal Browsers
|
|
221
|
+
else curTransform = parseFloat(matrix[5]);
|
|
222
|
+
}
|
|
223
|
+
return curTransform || 0;
|
|
224
|
+
}
|
|
225
|
+
function isObject(o) {
|
|
226
|
+
return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object';
|
|
227
|
+
}
|
|
228
|
+
function isNode(node) {
|
|
229
|
+
// eslint-disable-next-line
|
|
230
|
+
if (typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined') {
|
|
231
|
+
return node instanceof HTMLElement;
|
|
232
|
+
}
|
|
233
|
+
return node && (node.nodeType === 1 || node.nodeType === 11);
|
|
234
|
+
}
|
|
235
|
+
function extend() {
|
|
236
|
+
const to = Object(arguments.length <= 0 ? undefined : arguments[0]);
|
|
237
|
+
const noExtend = ['__proto__', 'constructor', 'prototype'];
|
|
238
|
+
for (let i = 1; i < arguments.length; i += 1) {
|
|
239
|
+
const nextSource = i < 0 || arguments.length <= i ? undefined : arguments[i];
|
|
240
|
+
if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) {
|
|
241
|
+
const keysArray = Object.keys(Object(nextSource)).filter(key => noExtend.indexOf(key) < 0);
|
|
242
|
+
for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {
|
|
243
|
+
const nextKey = keysArray[nextIndex];
|
|
244
|
+
const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
|
|
245
|
+
if (desc !== undefined && desc.enumerable) {
|
|
246
|
+
if (isObject(to[nextKey]) && isObject(nextSource[nextKey])) {
|
|
247
|
+
if (nextSource[nextKey].__swiper__) {
|
|
248
|
+
to[nextKey] = nextSource[nextKey];
|
|
249
|
+
} else {
|
|
250
|
+
extend(to[nextKey], nextSource[nextKey]);
|
|
251
|
+
}
|
|
252
|
+
} else if (!isObject(to[nextKey]) && isObject(nextSource[nextKey])) {
|
|
253
|
+
to[nextKey] = {};
|
|
254
|
+
if (nextSource[nextKey].__swiper__) {
|
|
255
|
+
to[nextKey] = nextSource[nextKey];
|
|
256
|
+
} else {
|
|
257
|
+
extend(to[nextKey], nextSource[nextKey]);
|
|
258
|
+
}
|
|
259
|
+
} else {
|
|
260
|
+
to[nextKey] = nextSource[nextKey];
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return to;
|
|
267
|
+
}
|
|
268
|
+
function setCSSProperty(el, varName, varValue) {
|
|
269
|
+
el.style.setProperty(varName, varValue);
|
|
270
|
+
}
|
|
271
|
+
function animateCSSModeScroll(_ref) {
|
|
272
|
+
let {
|
|
273
|
+
swiper,
|
|
274
|
+
targetPosition,
|
|
275
|
+
side
|
|
276
|
+
} = _ref;
|
|
277
|
+
const window = getWindow();
|
|
278
|
+
const startPosition = -swiper.translate;
|
|
279
|
+
let startTime = null;
|
|
280
|
+
let time;
|
|
281
|
+
const duration = swiper.params.speed;
|
|
282
|
+
swiper.wrapperEl.style.scrollSnapType = 'none';
|
|
283
|
+
window.cancelAnimationFrame(swiper.cssModeFrameID);
|
|
284
|
+
const dir = targetPosition > startPosition ? 'next' : 'prev';
|
|
285
|
+
const isOutOfBound = (current, target) => {
|
|
286
|
+
return dir === 'next' && current >= target || dir === 'prev' && current <= target;
|
|
287
|
+
};
|
|
288
|
+
const animate = () => {
|
|
289
|
+
time = new Date().getTime();
|
|
290
|
+
if (startTime === null) {
|
|
291
|
+
startTime = time;
|
|
292
|
+
}
|
|
293
|
+
const progress = Math.max(Math.min((time - startTime) / duration, 1), 0);
|
|
294
|
+
const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2;
|
|
295
|
+
let currentPosition = startPosition + easeProgress * (targetPosition - startPosition);
|
|
296
|
+
if (isOutOfBound(currentPosition, targetPosition)) {
|
|
297
|
+
currentPosition = targetPosition;
|
|
298
|
+
}
|
|
299
|
+
swiper.wrapperEl.scrollTo({
|
|
300
|
+
[side]: currentPosition
|
|
301
|
+
});
|
|
302
|
+
if (isOutOfBound(currentPosition, targetPosition)) {
|
|
303
|
+
swiper.wrapperEl.style.overflow = 'hidden';
|
|
304
|
+
swiper.wrapperEl.style.scrollSnapType = '';
|
|
305
|
+
setTimeout(() => {
|
|
306
|
+
swiper.wrapperEl.style.overflow = '';
|
|
307
|
+
swiper.wrapperEl.scrollTo({
|
|
308
|
+
[side]: currentPosition
|
|
309
|
+
});
|
|
310
|
+
});
|
|
311
|
+
window.cancelAnimationFrame(swiper.cssModeFrameID);
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
swiper.cssModeFrameID = window.requestAnimationFrame(animate);
|
|
315
|
+
};
|
|
316
|
+
animate();
|
|
317
|
+
}
|
|
318
|
+
function elementChildren(element, selector) {
|
|
319
|
+
if (selector === void 0) {
|
|
320
|
+
selector = '';
|
|
321
|
+
}
|
|
322
|
+
return [...element.children].filter(el => el.matches(selector));
|
|
323
|
+
}
|
|
324
|
+
function createElement(tag, classes) {
|
|
325
|
+
if (classes === void 0) {
|
|
326
|
+
classes = [];
|
|
327
|
+
}
|
|
328
|
+
const el = document.createElement(tag);
|
|
329
|
+
el.classList.add(...(Array.isArray(classes) ? classes : [classes]));
|
|
330
|
+
return el;
|
|
331
|
+
}
|
|
332
|
+
function elementPrevAll(el, selector) {
|
|
333
|
+
const prevEls = [];
|
|
334
|
+
while (el.previousElementSibling) {
|
|
335
|
+
const prev = el.previousElementSibling; // eslint-disable-line
|
|
336
|
+
if (selector) {
|
|
337
|
+
if (prev.matches(selector)) prevEls.push(prev);
|
|
338
|
+
} else prevEls.push(prev);
|
|
339
|
+
el = prev;
|
|
340
|
+
}
|
|
341
|
+
return prevEls;
|
|
342
|
+
}
|
|
343
|
+
function elementNextAll(el, selector) {
|
|
344
|
+
const nextEls = [];
|
|
345
|
+
while (el.nextElementSibling) {
|
|
346
|
+
const next = el.nextElementSibling; // eslint-disable-line
|
|
347
|
+
if (selector) {
|
|
348
|
+
if (next.matches(selector)) nextEls.push(next);
|
|
349
|
+
} else nextEls.push(next);
|
|
350
|
+
el = next;
|
|
351
|
+
}
|
|
352
|
+
return nextEls;
|
|
353
|
+
}
|
|
354
|
+
function elementStyle(el, prop) {
|
|
355
|
+
const window = getWindow();
|
|
356
|
+
return window.getComputedStyle(el, null).getPropertyValue(prop);
|
|
357
|
+
}
|
|
358
|
+
function elementIndex(el) {
|
|
359
|
+
let child = el;
|
|
360
|
+
let i;
|
|
361
|
+
if (child) {
|
|
362
|
+
i = 0;
|
|
363
|
+
// eslint-disable-next-line
|
|
364
|
+
while ((child = child.previousSibling) !== null) {
|
|
365
|
+
if (child.nodeType === 1) i += 1;
|
|
366
|
+
}
|
|
367
|
+
return i;
|
|
368
|
+
}
|
|
369
|
+
return undefined;
|
|
370
|
+
}
|
|
371
|
+
function elementParents(el, selector) {
|
|
372
|
+
const parents = []; // eslint-disable-line
|
|
373
|
+
let parent = el.parentElement; // eslint-disable-line
|
|
374
|
+
while (parent) {
|
|
375
|
+
if (selector) {
|
|
376
|
+
if (parent.matches(selector)) parents.push(parent);
|
|
377
|
+
} else {
|
|
378
|
+
parents.push(parent);
|
|
379
|
+
}
|
|
380
|
+
parent = parent.parentElement;
|
|
381
|
+
}
|
|
382
|
+
return parents;
|
|
383
|
+
}
|
|
384
|
+
function elementOuterSize(el, size, includeMargins) {
|
|
385
|
+
const window = getWindow();
|
|
386
|
+
if (includeMargins) {
|
|
387
|
+
return el[size === 'width' ? 'offsetWidth' : 'offsetHeight'] + parseFloat(window.getComputedStyle(el, null).getPropertyValue(size === 'width' ? 'margin-right' : 'margin-top')) + parseFloat(window.getComputedStyle(el, null).getPropertyValue(size === 'width' ? 'margin-left' : 'margin-bottom'));
|
|
388
|
+
}
|
|
389
|
+
return el.offsetWidth;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
function createElementIfNotDefined(swiper, originalParams, params, checkProps) {
|
|
393
|
+
if (swiper.params.createElements) {
|
|
394
|
+
Object.keys(checkProps).forEach(key => {
|
|
395
|
+
if (!params[key] && params.auto === true) {
|
|
396
|
+
let element = elementChildren(swiper.el, `.${checkProps[key]}`)[0];
|
|
397
|
+
if (!element) {
|
|
398
|
+
element = createElement('div', checkProps[key]);
|
|
399
|
+
element.className = checkProps[key];
|
|
400
|
+
swiper.el.append(element);
|
|
401
|
+
}
|
|
402
|
+
params[key] = element;
|
|
403
|
+
originalParams[key] = element;
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
return params;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
function Navigation(_ref) {
|
|
411
|
+
let {
|
|
412
|
+
swiper,
|
|
413
|
+
extendParams,
|
|
414
|
+
on,
|
|
415
|
+
emit
|
|
416
|
+
} = _ref;
|
|
417
|
+
extendParams({
|
|
418
|
+
navigation: {
|
|
419
|
+
nextEl: null,
|
|
420
|
+
prevEl: null,
|
|
421
|
+
hideOnClick: false,
|
|
422
|
+
disabledClass: 'swiper-button-disabled',
|
|
423
|
+
hiddenClass: 'swiper-button-hidden',
|
|
424
|
+
lockClass: 'swiper-button-lock',
|
|
425
|
+
navigationDisabledClass: 'swiper-navigation-disabled'
|
|
426
|
+
}
|
|
427
|
+
});
|
|
428
|
+
swiper.navigation = {
|
|
429
|
+
nextEl: null,
|
|
430
|
+
prevEl: null
|
|
431
|
+
};
|
|
432
|
+
const makeElementsArray = el => (Array.isArray(el) ? el : [el]).filter(e => !!e);
|
|
433
|
+
function getEl(el) {
|
|
434
|
+
let res;
|
|
435
|
+
if (el && typeof el === 'string' && swiper.isElement) {
|
|
436
|
+
res = swiper.el.querySelector(el);
|
|
437
|
+
if (res) return res;
|
|
438
|
+
}
|
|
439
|
+
if (el) {
|
|
440
|
+
if (typeof el === 'string') res = [...document.querySelectorAll(el)];
|
|
441
|
+
if (swiper.params.uniqueNavElements && typeof el === 'string' && res.length > 1 && swiper.el.querySelectorAll(el).length === 1) {
|
|
442
|
+
res = swiper.el.querySelector(el);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
if (el && !res) return el;
|
|
446
|
+
// if (Array.isArray(res) && res.length === 1) res = res[0];
|
|
447
|
+
return res;
|
|
448
|
+
}
|
|
449
|
+
function toggleEl(el, disabled) {
|
|
450
|
+
const params = swiper.params.navigation;
|
|
451
|
+
el = makeElementsArray(el);
|
|
452
|
+
el.forEach(subEl => {
|
|
453
|
+
if (subEl) {
|
|
454
|
+
subEl.classList[disabled ? 'add' : 'remove'](...params.disabledClass.split(' '));
|
|
455
|
+
if (subEl.tagName === 'BUTTON') subEl.disabled = disabled;
|
|
456
|
+
if (swiper.params.watchOverflow && swiper.enabled) {
|
|
457
|
+
subEl.classList[swiper.isLocked ? 'add' : 'remove'](params.lockClass);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
function update() {
|
|
463
|
+
// Update Navigation Buttons
|
|
464
|
+
const {
|
|
465
|
+
nextEl,
|
|
466
|
+
prevEl
|
|
467
|
+
} = swiper.navigation;
|
|
468
|
+
if (swiper.params.loop) {
|
|
469
|
+
toggleEl(prevEl, false);
|
|
470
|
+
toggleEl(nextEl, false);
|
|
471
|
+
return;
|
|
472
|
+
}
|
|
473
|
+
toggleEl(prevEl, swiper.isBeginning && !swiper.params.rewind);
|
|
474
|
+
toggleEl(nextEl, swiper.isEnd && !swiper.params.rewind);
|
|
475
|
+
}
|
|
476
|
+
function onPrevClick(e) {
|
|
477
|
+
e.preventDefault();
|
|
478
|
+
if (swiper.isBeginning && !swiper.params.loop && !swiper.params.rewind) return;
|
|
479
|
+
swiper.slidePrev();
|
|
480
|
+
emit('navigationPrev');
|
|
481
|
+
}
|
|
482
|
+
function onNextClick(e) {
|
|
483
|
+
e.preventDefault();
|
|
484
|
+
if (swiper.isEnd && !swiper.params.loop && !swiper.params.rewind) return;
|
|
485
|
+
swiper.slideNext();
|
|
486
|
+
emit('navigationNext');
|
|
487
|
+
}
|
|
488
|
+
function init() {
|
|
489
|
+
const params = swiper.params.navigation;
|
|
490
|
+
swiper.params.navigation = createElementIfNotDefined(swiper, swiper.originalParams.navigation, swiper.params.navigation, {
|
|
491
|
+
nextEl: 'swiper-button-next',
|
|
492
|
+
prevEl: 'swiper-button-prev'
|
|
493
|
+
});
|
|
494
|
+
if (!(params.nextEl || params.prevEl)) return;
|
|
495
|
+
let nextEl = getEl(params.nextEl);
|
|
496
|
+
let prevEl = getEl(params.prevEl);
|
|
497
|
+
Object.assign(swiper.navigation, {
|
|
498
|
+
nextEl,
|
|
499
|
+
prevEl
|
|
500
|
+
});
|
|
501
|
+
nextEl = makeElementsArray(nextEl);
|
|
502
|
+
prevEl = makeElementsArray(prevEl);
|
|
503
|
+
const initButton = (el, dir) => {
|
|
504
|
+
if (el) {
|
|
505
|
+
el.addEventListener('click', dir === 'next' ? onNextClick : onPrevClick);
|
|
506
|
+
}
|
|
507
|
+
if (!swiper.enabled && el) {
|
|
508
|
+
el.classList.add(...params.lockClass.split(' '));
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
nextEl.forEach(el => initButton(el, 'next'));
|
|
512
|
+
prevEl.forEach(el => initButton(el, 'prev'));
|
|
513
|
+
}
|
|
514
|
+
function destroy() {
|
|
515
|
+
let {
|
|
516
|
+
nextEl,
|
|
517
|
+
prevEl
|
|
518
|
+
} = swiper.navigation;
|
|
519
|
+
nextEl = makeElementsArray(nextEl);
|
|
520
|
+
prevEl = makeElementsArray(prevEl);
|
|
521
|
+
const destroyButton = (el, dir) => {
|
|
522
|
+
el.removeEventListener('click', dir === 'next' ? onNextClick : onPrevClick);
|
|
523
|
+
el.classList.remove(...swiper.params.navigation.disabledClass.split(' '));
|
|
524
|
+
};
|
|
525
|
+
nextEl.forEach(el => destroyButton(el, 'next'));
|
|
526
|
+
prevEl.forEach(el => destroyButton(el, 'prev'));
|
|
527
|
+
}
|
|
528
|
+
on('init', () => {
|
|
529
|
+
if (swiper.params.navigation.enabled === false) {
|
|
530
|
+
// eslint-disable-next-line
|
|
531
|
+
disable();
|
|
532
|
+
} else {
|
|
533
|
+
init();
|
|
534
|
+
update();
|
|
535
|
+
}
|
|
536
|
+
});
|
|
537
|
+
on('toEdge fromEdge lock unlock', () => {
|
|
538
|
+
update();
|
|
539
|
+
});
|
|
540
|
+
on('destroy', () => {
|
|
541
|
+
destroy();
|
|
542
|
+
});
|
|
543
|
+
on('enable disable', () => {
|
|
544
|
+
let {
|
|
545
|
+
nextEl,
|
|
546
|
+
prevEl
|
|
547
|
+
} = swiper.navigation;
|
|
548
|
+
nextEl = makeElementsArray(nextEl);
|
|
549
|
+
prevEl = makeElementsArray(prevEl);
|
|
550
|
+
[...nextEl, ...prevEl].filter(el => !!el).forEach(el => el.classList[swiper.enabled ? 'remove' : 'add'](swiper.params.navigation.lockClass));
|
|
551
|
+
});
|
|
552
|
+
on('click', (_s, e) => {
|
|
553
|
+
let {
|
|
554
|
+
nextEl,
|
|
555
|
+
prevEl
|
|
556
|
+
} = swiper.navigation;
|
|
557
|
+
nextEl = makeElementsArray(nextEl);
|
|
558
|
+
prevEl = makeElementsArray(prevEl);
|
|
559
|
+
const targetEl = e.target;
|
|
560
|
+
if (swiper.params.navigation.hideOnClick && !prevEl.includes(targetEl) && !nextEl.includes(targetEl)) {
|
|
561
|
+
if (swiper.pagination && swiper.params.pagination && swiper.params.pagination.clickable && (swiper.pagination.el === targetEl || swiper.pagination.el.contains(targetEl))) return;
|
|
562
|
+
let isHidden;
|
|
563
|
+
if (nextEl.length) {
|
|
564
|
+
isHidden = nextEl[0].classList.contains(swiper.params.navigation.hiddenClass);
|
|
565
|
+
} else if (prevEl.length) {
|
|
566
|
+
isHidden = prevEl[0].classList.contains(swiper.params.navigation.hiddenClass);
|
|
567
|
+
}
|
|
568
|
+
if (isHidden === true) {
|
|
569
|
+
emit('navigationShow');
|
|
570
|
+
} else {
|
|
571
|
+
emit('navigationHide');
|
|
572
|
+
}
|
|
573
|
+
[...nextEl, ...prevEl].filter(el => !!el).forEach(el => el.classList.toggle(swiper.params.navigation.hiddenClass));
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
const enable = () => {
|
|
577
|
+
swiper.el.classList.remove(...swiper.params.navigation.navigationDisabledClass.split(' '));
|
|
578
|
+
init();
|
|
579
|
+
update();
|
|
580
|
+
};
|
|
581
|
+
const disable = () => {
|
|
582
|
+
swiper.el.classList.add(...swiper.params.navigation.navigationDisabledClass.split(' '));
|
|
583
|
+
destroy();
|
|
584
|
+
};
|
|
585
|
+
Object.assign(swiper.navigation, {
|
|
586
|
+
enable,
|
|
587
|
+
disable,
|
|
588
|
+
update,
|
|
589
|
+
init,
|
|
590
|
+
destroy
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
function classesToSelector(classes) {
|
|
595
|
+
if (classes === void 0) {
|
|
596
|
+
classes = '';
|
|
597
|
+
}
|
|
598
|
+
return `.${classes.trim().replace(/([\.:!+\/])/g, '\\$1') // eslint-disable-line
|
|
599
|
+
.replace(/ /g, '.')}`;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
function Pagination(_ref) {
|
|
603
|
+
let {
|
|
604
|
+
swiper,
|
|
605
|
+
extendParams,
|
|
606
|
+
on,
|
|
607
|
+
emit
|
|
608
|
+
} = _ref;
|
|
609
|
+
const pfx = 'swiper-pagination';
|
|
610
|
+
extendParams({
|
|
611
|
+
pagination: {
|
|
612
|
+
el: null,
|
|
613
|
+
bulletElement: 'span',
|
|
614
|
+
clickable: false,
|
|
615
|
+
hideOnClick: false,
|
|
616
|
+
renderBullet: null,
|
|
617
|
+
renderProgressbar: null,
|
|
618
|
+
renderFraction: null,
|
|
619
|
+
renderCustom: null,
|
|
620
|
+
progressbarOpposite: false,
|
|
621
|
+
type: 'bullets',
|
|
622
|
+
// 'bullets' or 'progressbar' or 'fraction' or 'custom'
|
|
623
|
+
dynamicBullets: false,
|
|
624
|
+
dynamicMainBullets: 1,
|
|
625
|
+
formatFractionCurrent: number => number,
|
|
626
|
+
formatFractionTotal: number => number,
|
|
627
|
+
bulletClass: `${pfx}-bullet`,
|
|
628
|
+
bulletActiveClass: `${pfx}-bullet-active`,
|
|
629
|
+
modifierClass: `${pfx}-`,
|
|
630
|
+
currentClass: `${pfx}-current`,
|
|
631
|
+
totalClass: `${pfx}-total`,
|
|
632
|
+
hiddenClass: `${pfx}-hidden`,
|
|
633
|
+
progressbarFillClass: `${pfx}-progressbar-fill`,
|
|
634
|
+
progressbarOppositeClass: `${pfx}-progressbar-opposite`,
|
|
635
|
+
clickableClass: `${pfx}-clickable`,
|
|
636
|
+
lockClass: `${pfx}-lock`,
|
|
637
|
+
horizontalClass: `${pfx}-horizontal`,
|
|
638
|
+
verticalClass: `${pfx}-vertical`,
|
|
639
|
+
paginationDisabledClass: `${pfx}-disabled`
|
|
640
|
+
}
|
|
641
|
+
});
|
|
642
|
+
swiper.pagination = {
|
|
643
|
+
el: null,
|
|
644
|
+
bullets: []
|
|
645
|
+
};
|
|
646
|
+
let bulletSize;
|
|
647
|
+
let dynamicBulletIndex = 0;
|
|
648
|
+
const makeElementsArray = el => (Array.isArray(el) ? el : [el]).filter(e => !!e);
|
|
649
|
+
function isPaginationDisabled() {
|
|
650
|
+
return !swiper.params.pagination.el || !swiper.pagination.el || Array.isArray(swiper.pagination.el) && swiper.pagination.el.length === 0;
|
|
651
|
+
}
|
|
652
|
+
function setSideBullets(bulletEl, position) {
|
|
653
|
+
const {
|
|
654
|
+
bulletActiveClass
|
|
655
|
+
} = swiper.params.pagination;
|
|
656
|
+
if (!bulletEl) return;
|
|
657
|
+
bulletEl = bulletEl[`${position === 'prev' ? 'previous' : 'next'}ElementSibling`];
|
|
658
|
+
if (bulletEl) {
|
|
659
|
+
bulletEl.classList.add(`${bulletActiveClass}-${position}`);
|
|
660
|
+
bulletEl = bulletEl[`${position === 'prev' ? 'previous' : 'next'}ElementSibling`];
|
|
661
|
+
if (bulletEl) {
|
|
662
|
+
bulletEl.classList.add(`${bulletActiveClass}-${position}-${position}`);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
function onBulletClick(e) {
|
|
667
|
+
const bulletEl = e.target.closest(classesToSelector(swiper.params.pagination.bulletClass));
|
|
668
|
+
if (!bulletEl) {
|
|
669
|
+
return;
|
|
670
|
+
}
|
|
671
|
+
e.preventDefault();
|
|
672
|
+
const index = elementIndex(bulletEl) * swiper.params.slidesPerGroup;
|
|
673
|
+
if (swiper.params.loop) {
|
|
674
|
+
if (swiper.realIndex === index) return;
|
|
675
|
+
const realIndex = swiper.realIndex;
|
|
676
|
+
const newSlideIndex = swiper.getSlideIndexByData(index);
|
|
677
|
+
const currentSlideIndex = swiper.getSlideIndexByData(swiper.realIndex);
|
|
678
|
+
if (newSlideIndex > swiper.slides.length - swiper.loopedSlides) {
|
|
679
|
+
const indexBeforeLoopFix = swiper.activeIndex;
|
|
680
|
+
swiper.loopFix({
|
|
681
|
+
direction: newSlideIndex > currentSlideIndex ? 'next' : 'prev',
|
|
682
|
+
activeSlideIndex: newSlideIndex,
|
|
683
|
+
slideTo: false
|
|
684
|
+
});
|
|
685
|
+
const indexAfterFix = swiper.activeIndex;
|
|
686
|
+
if (indexBeforeLoopFix === indexAfterFix) {
|
|
687
|
+
swiper.slideToLoop(realIndex, 0, false, true);
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
swiper.slideToLoop(index);
|
|
691
|
+
} else {
|
|
692
|
+
swiper.slideTo(index);
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
function update() {
|
|
696
|
+
// Render || Update Pagination bullets/items
|
|
697
|
+
const rtl = swiper.rtl;
|
|
698
|
+
const params = swiper.params.pagination;
|
|
699
|
+
if (isPaginationDisabled()) return;
|
|
700
|
+
let el = swiper.pagination.el;
|
|
701
|
+
el = makeElementsArray(el);
|
|
702
|
+
// Current/Total
|
|
703
|
+
let current;
|
|
704
|
+
let previousIndex;
|
|
705
|
+
const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
|
|
706
|
+
const total = swiper.params.loop ? Math.ceil(slidesLength / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
|
|
707
|
+
if (swiper.params.loop) {
|
|
708
|
+
previousIndex = swiper.previousRealIndex || 0;
|
|
709
|
+
current = swiper.params.slidesPerGroup > 1 ? Math.floor(swiper.realIndex / swiper.params.slidesPerGroup) : swiper.realIndex;
|
|
710
|
+
} else if (typeof swiper.snapIndex !== 'undefined') {
|
|
711
|
+
current = swiper.snapIndex;
|
|
712
|
+
previousIndex = swiper.previousSnapIndex;
|
|
713
|
+
} else {
|
|
714
|
+
previousIndex = swiper.previousIndex || 0;
|
|
715
|
+
current = swiper.activeIndex || 0;
|
|
716
|
+
}
|
|
717
|
+
// Types
|
|
718
|
+
if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {
|
|
719
|
+
const bullets = swiper.pagination.bullets;
|
|
720
|
+
let firstIndex;
|
|
721
|
+
let lastIndex;
|
|
722
|
+
let midIndex;
|
|
723
|
+
if (params.dynamicBullets) {
|
|
724
|
+
bulletSize = elementOuterSize(bullets[0], swiper.isHorizontal() ? 'width' : 'height', true);
|
|
725
|
+
el.forEach(subEl => {
|
|
726
|
+
subEl.style[swiper.isHorizontal() ? 'width' : 'height'] = `${bulletSize * (params.dynamicMainBullets + 4)}px`;
|
|
727
|
+
});
|
|
728
|
+
if (params.dynamicMainBullets > 1 && previousIndex !== undefined) {
|
|
729
|
+
dynamicBulletIndex += current - (previousIndex || 0);
|
|
730
|
+
if (dynamicBulletIndex > params.dynamicMainBullets - 1) {
|
|
731
|
+
dynamicBulletIndex = params.dynamicMainBullets - 1;
|
|
732
|
+
} else if (dynamicBulletIndex < 0) {
|
|
733
|
+
dynamicBulletIndex = 0;
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
firstIndex = Math.max(current - dynamicBulletIndex, 0);
|
|
737
|
+
lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);
|
|
738
|
+
midIndex = (lastIndex + firstIndex) / 2;
|
|
739
|
+
}
|
|
740
|
+
bullets.forEach(bulletEl => {
|
|
741
|
+
const classesToRemove = [...['', '-next', '-next-next', '-prev', '-prev-prev', '-main'].map(suffix => `${params.bulletActiveClass}${suffix}`)].map(s => typeof s === 'string' && s.includes(' ') ? s.split(' ') : s).flat();
|
|
742
|
+
bulletEl.classList.remove(...classesToRemove);
|
|
743
|
+
});
|
|
744
|
+
if (el.length > 1) {
|
|
745
|
+
bullets.forEach(bullet => {
|
|
746
|
+
const bulletIndex = elementIndex(bullet);
|
|
747
|
+
if (bulletIndex === current) {
|
|
748
|
+
bullet.classList.add(...params.bulletActiveClass.split(' '));
|
|
749
|
+
} else if (swiper.isElement) {
|
|
750
|
+
bullet.setAttribute('part', 'bullet');
|
|
751
|
+
}
|
|
752
|
+
if (params.dynamicBullets) {
|
|
753
|
+
if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {
|
|
754
|
+
bullet.classList.add(...`${params.bulletActiveClass}-main`.split(' '));
|
|
755
|
+
}
|
|
756
|
+
if (bulletIndex === firstIndex) {
|
|
757
|
+
setSideBullets(bullet, 'prev');
|
|
758
|
+
}
|
|
759
|
+
if (bulletIndex === lastIndex) {
|
|
760
|
+
setSideBullets(bullet, 'next');
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
});
|
|
764
|
+
} else {
|
|
765
|
+
const bullet = bullets[current];
|
|
766
|
+
if (bullet) {
|
|
767
|
+
bullet.classList.add(...params.bulletActiveClass.split(' '));
|
|
768
|
+
}
|
|
769
|
+
if (swiper.isElement) {
|
|
770
|
+
bullets.forEach((bulletEl, bulletIndex) => {
|
|
771
|
+
bulletEl.setAttribute('part', bulletIndex === current ? 'bullet-active' : 'bullet');
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
if (params.dynamicBullets) {
|
|
775
|
+
const firstDisplayedBullet = bullets[firstIndex];
|
|
776
|
+
const lastDisplayedBullet = bullets[lastIndex];
|
|
777
|
+
for (let i = firstIndex; i <= lastIndex; i += 1) {
|
|
778
|
+
if (bullets[i]) {
|
|
779
|
+
bullets[i].classList.add(...`${params.bulletActiveClass}-main`.split(' '));
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
setSideBullets(firstDisplayedBullet, 'prev');
|
|
783
|
+
setSideBullets(lastDisplayedBullet, 'next');
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
if (params.dynamicBullets) {
|
|
787
|
+
const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);
|
|
788
|
+
const bulletsOffset = (bulletSize * dynamicBulletsLength - bulletSize) / 2 - midIndex * bulletSize;
|
|
789
|
+
const offsetProp = rtl ? 'right' : 'left';
|
|
790
|
+
bullets.forEach(bullet => {
|
|
791
|
+
bullet.style[swiper.isHorizontal() ? offsetProp : 'top'] = `${bulletsOffset}px`;
|
|
792
|
+
});
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
el.forEach((subEl, subElIndex) => {
|
|
796
|
+
if (params.type === 'fraction') {
|
|
797
|
+
subEl.querySelectorAll(classesToSelector(params.currentClass)).forEach(fractionEl => {
|
|
798
|
+
fractionEl.textContent = params.formatFractionCurrent(current + 1);
|
|
799
|
+
});
|
|
800
|
+
subEl.querySelectorAll(classesToSelector(params.totalClass)).forEach(totalEl => {
|
|
801
|
+
totalEl.textContent = params.formatFractionTotal(total);
|
|
802
|
+
});
|
|
803
|
+
}
|
|
804
|
+
if (params.type === 'progressbar') {
|
|
805
|
+
let progressbarDirection;
|
|
806
|
+
if (params.progressbarOpposite) {
|
|
807
|
+
progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';
|
|
808
|
+
} else {
|
|
809
|
+
progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';
|
|
810
|
+
}
|
|
811
|
+
const scale = (current + 1) / total;
|
|
812
|
+
let scaleX = 1;
|
|
813
|
+
let scaleY = 1;
|
|
814
|
+
if (progressbarDirection === 'horizontal') {
|
|
815
|
+
scaleX = scale;
|
|
816
|
+
} else {
|
|
817
|
+
scaleY = scale;
|
|
818
|
+
}
|
|
819
|
+
subEl.querySelectorAll(classesToSelector(params.progressbarFillClass)).forEach(progressEl => {
|
|
820
|
+
progressEl.style.transform = `translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`;
|
|
821
|
+
progressEl.style.transitionDuration = `${swiper.params.speed}ms`;
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
if (params.type === 'custom' && params.renderCustom) {
|
|
825
|
+
subEl.innerHTML = params.renderCustom(swiper, current + 1, total);
|
|
826
|
+
if (subElIndex === 0) emit('paginationRender', subEl);
|
|
827
|
+
} else {
|
|
828
|
+
if (subElIndex === 0) emit('paginationRender', subEl);
|
|
829
|
+
emit('paginationUpdate', subEl);
|
|
830
|
+
}
|
|
831
|
+
if (swiper.params.watchOverflow && swiper.enabled) {
|
|
832
|
+
subEl.classList[swiper.isLocked ? 'add' : 'remove'](params.lockClass);
|
|
833
|
+
}
|
|
834
|
+
});
|
|
835
|
+
}
|
|
836
|
+
function render() {
|
|
837
|
+
// Render Container
|
|
838
|
+
const params = swiper.params.pagination;
|
|
839
|
+
if (isPaginationDisabled()) return;
|
|
840
|
+
const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
|
|
841
|
+
let el = swiper.pagination.el;
|
|
842
|
+
el = makeElementsArray(el);
|
|
843
|
+
let paginationHTML = '';
|
|
844
|
+
if (params.type === 'bullets') {
|
|
845
|
+
let numberOfBullets = swiper.params.loop ? Math.ceil(slidesLength / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
|
|
846
|
+
if (swiper.params.freeMode && swiper.params.freeMode.enabled && numberOfBullets > slidesLength) {
|
|
847
|
+
numberOfBullets = slidesLength;
|
|
848
|
+
}
|
|
849
|
+
for (let i = 0; i < numberOfBullets; i += 1) {
|
|
850
|
+
if (params.renderBullet) {
|
|
851
|
+
paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);
|
|
852
|
+
} else {
|
|
853
|
+
// prettier-ignore
|
|
854
|
+
paginationHTML += `<${params.bulletElement} ${swiper.isElement ? 'part="bullet"' : ''} class="${params.bulletClass}"></${params.bulletElement}>`;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
if (params.type === 'fraction') {
|
|
859
|
+
if (params.renderFraction) {
|
|
860
|
+
paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);
|
|
861
|
+
} else {
|
|
862
|
+
paginationHTML = `<span class="${params.currentClass}"></span>` + ' / ' + `<span class="${params.totalClass}"></span>`;
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
if (params.type === 'progressbar') {
|
|
866
|
+
if (params.renderProgressbar) {
|
|
867
|
+
paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);
|
|
868
|
+
} else {
|
|
869
|
+
paginationHTML = `<span class="${params.progressbarFillClass}"></span>`;
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
swiper.pagination.bullets = [];
|
|
873
|
+
el.forEach(subEl => {
|
|
874
|
+
if (params.type !== 'custom') {
|
|
875
|
+
subEl.innerHTML = paginationHTML || '';
|
|
876
|
+
}
|
|
877
|
+
if (params.type === 'bullets') {
|
|
878
|
+
swiper.pagination.bullets.push(...subEl.querySelectorAll(classesToSelector(params.bulletClass)));
|
|
879
|
+
}
|
|
880
|
+
});
|
|
881
|
+
if (params.type !== 'custom') {
|
|
882
|
+
emit('paginationRender', el[0]);
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
function init() {
|
|
886
|
+
swiper.params.pagination = createElementIfNotDefined(swiper, swiper.originalParams.pagination, swiper.params.pagination, {
|
|
887
|
+
el: 'swiper-pagination'
|
|
888
|
+
});
|
|
889
|
+
const params = swiper.params.pagination;
|
|
890
|
+
if (!params.el) return;
|
|
891
|
+
let el;
|
|
892
|
+
if (typeof params.el === 'string' && swiper.isElement) {
|
|
893
|
+
el = swiper.el.querySelector(params.el);
|
|
894
|
+
}
|
|
895
|
+
if (!el && typeof params.el === 'string') {
|
|
896
|
+
el = [...document.querySelectorAll(params.el)];
|
|
897
|
+
}
|
|
898
|
+
if (!el) {
|
|
899
|
+
el = params.el;
|
|
900
|
+
}
|
|
901
|
+
if (!el || el.length === 0) return;
|
|
902
|
+
if (swiper.params.uniqueNavElements && typeof params.el === 'string' && Array.isArray(el) && el.length > 1) {
|
|
903
|
+
el = [...swiper.el.querySelectorAll(params.el)];
|
|
904
|
+
// check if it belongs to another nested Swiper
|
|
905
|
+
if (el.length > 1) {
|
|
906
|
+
el = el.filter(subEl => {
|
|
907
|
+
if (elementParents(subEl, '.swiper')[0] !== swiper.el) return false;
|
|
908
|
+
return true;
|
|
909
|
+
})[0];
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
if (Array.isArray(el) && el.length === 1) el = el[0];
|
|
913
|
+
Object.assign(swiper.pagination, {
|
|
914
|
+
el
|
|
915
|
+
});
|
|
916
|
+
el = makeElementsArray(el);
|
|
917
|
+
el.forEach(subEl => {
|
|
918
|
+
if (params.type === 'bullets' && params.clickable) {
|
|
919
|
+
subEl.classList.add(...(params.clickableClass || '').split(' '));
|
|
920
|
+
}
|
|
921
|
+
subEl.classList.add(params.modifierClass + params.type);
|
|
922
|
+
subEl.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);
|
|
923
|
+
if (params.type === 'bullets' && params.dynamicBullets) {
|
|
924
|
+
subEl.classList.add(`${params.modifierClass}${params.type}-dynamic`);
|
|
925
|
+
dynamicBulletIndex = 0;
|
|
926
|
+
if (params.dynamicMainBullets < 1) {
|
|
927
|
+
params.dynamicMainBullets = 1;
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
if (params.type === 'progressbar' && params.progressbarOpposite) {
|
|
931
|
+
subEl.classList.add(params.progressbarOppositeClass);
|
|
932
|
+
}
|
|
933
|
+
if (params.clickable) {
|
|
934
|
+
subEl.addEventListener('click', onBulletClick);
|
|
935
|
+
}
|
|
936
|
+
if (!swiper.enabled) {
|
|
937
|
+
subEl.classList.add(params.lockClass);
|
|
938
|
+
}
|
|
939
|
+
});
|
|
940
|
+
}
|
|
941
|
+
function destroy() {
|
|
942
|
+
const params = swiper.params.pagination;
|
|
943
|
+
if (isPaginationDisabled()) return;
|
|
944
|
+
let el = swiper.pagination.el;
|
|
945
|
+
if (el) {
|
|
946
|
+
el = makeElementsArray(el);
|
|
947
|
+
el.forEach(subEl => {
|
|
948
|
+
subEl.classList.remove(params.hiddenClass);
|
|
949
|
+
subEl.classList.remove(params.modifierClass + params.type);
|
|
950
|
+
subEl.classList.remove(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);
|
|
951
|
+
if (params.clickable) {
|
|
952
|
+
subEl.classList.remove(...(params.clickableClass || '').split(' '));
|
|
953
|
+
subEl.removeEventListener('click', onBulletClick);
|
|
954
|
+
}
|
|
955
|
+
});
|
|
956
|
+
}
|
|
957
|
+
if (swiper.pagination.bullets) swiper.pagination.bullets.forEach(subEl => subEl.classList.remove(...params.bulletActiveClass.split(' ')));
|
|
958
|
+
}
|
|
959
|
+
on('changeDirection', () => {
|
|
960
|
+
if (!swiper.pagination || !swiper.pagination.el) return;
|
|
961
|
+
const params = swiper.params.pagination;
|
|
962
|
+
let {
|
|
963
|
+
el
|
|
964
|
+
} = swiper.pagination;
|
|
965
|
+
el = makeElementsArray(el);
|
|
966
|
+
el.forEach(subEl => {
|
|
967
|
+
subEl.classList.remove(params.horizontalClass, params.verticalClass);
|
|
968
|
+
subEl.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);
|
|
969
|
+
});
|
|
970
|
+
});
|
|
971
|
+
on('init', () => {
|
|
972
|
+
if (swiper.params.pagination.enabled === false) {
|
|
973
|
+
// eslint-disable-next-line
|
|
974
|
+
disable();
|
|
975
|
+
} else {
|
|
976
|
+
init();
|
|
977
|
+
render();
|
|
978
|
+
update();
|
|
979
|
+
}
|
|
980
|
+
});
|
|
981
|
+
on('activeIndexChange', () => {
|
|
982
|
+
if (typeof swiper.snapIndex === 'undefined') {
|
|
983
|
+
update();
|
|
984
|
+
}
|
|
985
|
+
});
|
|
986
|
+
on('snapIndexChange', () => {
|
|
987
|
+
update();
|
|
988
|
+
});
|
|
989
|
+
on('snapGridLengthChange', () => {
|
|
990
|
+
render();
|
|
991
|
+
update();
|
|
992
|
+
});
|
|
993
|
+
on('destroy', () => {
|
|
994
|
+
destroy();
|
|
995
|
+
});
|
|
996
|
+
on('enable disable', () => {
|
|
997
|
+
let {
|
|
998
|
+
el
|
|
999
|
+
} = swiper.pagination;
|
|
1000
|
+
if (el) {
|
|
1001
|
+
el = makeElementsArray(el);
|
|
1002
|
+
el.forEach(subEl => subEl.classList[swiper.enabled ? 'remove' : 'add'](swiper.params.pagination.lockClass));
|
|
1003
|
+
}
|
|
1004
|
+
});
|
|
1005
|
+
on('lock unlock', () => {
|
|
1006
|
+
update();
|
|
1007
|
+
});
|
|
1008
|
+
on('click', (_s, e) => {
|
|
1009
|
+
const targetEl = e.target;
|
|
1010
|
+
const el = makeElementsArray(swiper.pagination.el);
|
|
1011
|
+
if (swiper.params.pagination.el && swiper.params.pagination.hideOnClick && el && el.length > 0 && !targetEl.classList.contains(swiper.params.pagination.bulletClass)) {
|
|
1012
|
+
if (swiper.navigation && (swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl || swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl)) return;
|
|
1013
|
+
const isHidden = el[0].classList.contains(swiper.params.pagination.hiddenClass);
|
|
1014
|
+
if (isHidden === true) {
|
|
1015
|
+
emit('paginationShow');
|
|
1016
|
+
} else {
|
|
1017
|
+
emit('paginationHide');
|
|
1018
|
+
}
|
|
1019
|
+
el.forEach(subEl => subEl.classList.toggle(swiper.params.pagination.hiddenClass));
|
|
1020
|
+
}
|
|
1021
|
+
});
|
|
1022
|
+
const enable = () => {
|
|
1023
|
+
swiper.el.classList.remove(swiper.params.pagination.paginationDisabledClass);
|
|
1024
|
+
let {
|
|
1025
|
+
el
|
|
1026
|
+
} = swiper.pagination;
|
|
1027
|
+
if (el) {
|
|
1028
|
+
el = makeElementsArray(el);
|
|
1029
|
+
el.forEach(subEl => subEl.classList.remove(swiper.params.pagination.paginationDisabledClass));
|
|
1030
|
+
}
|
|
1031
|
+
init();
|
|
1032
|
+
render();
|
|
1033
|
+
update();
|
|
1034
|
+
};
|
|
1035
|
+
const disable = () => {
|
|
1036
|
+
swiper.el.classList.add(swiper.params.pagination.paginationDisabledClass);
|
|
1037
|
+
let {
|
|
1038
|
+
el
|
|
1039
|
+
} = swiper.pagination;
|
|
1040
|
+
if (el) {
|
|
1041
|
+
el = makeElementsArray(el);
|
|
1042
|
+
el.forEach(subEl => subEl.classList.add(swiper.params.pagination.paginationDisabledClass));
|
|
1043
|
+
}
|
|
1044
|
+
destroy();
|
|
1045
|
+
};
|
|
1046
|
+
Object.assign(swiper.pagination, {
|
|
1047
|
+
enable,
|
|
1048
|
+
disable,
|
|
1049
|
+
render,
|
|
1050
|
+
update,
|
|
1051
|
+
init,
|
|
1052
|
+
destroy
|
|
1053
|
+
});
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
function A11y(_ref) {
|
|
1057
|
+
let {
|
|
1058
|
+
swiper,
|
|
1059
|
+
extendParams,
|
|
1060
|
+
on
|
|
1061
|
+
} = _ref;
|
|
1062
|
+
extendParams({
|
|
1063
|
+
a11y: {
|
|
1064
|
+
enabled: true,
|
|
1065
|
+
notificationClass: 'swiper-notification',
|
|
1066
|
+
prevSlideMessage: 'Previous slide',
|
|
1067
|
+
nextSlideMessage: 'Next slide',
|
|
1068
|
+
firstSlideMessage: 'This is the first slide',
|
|
1069
|
+
lastSlideMessage: 'This is the last slide',
|
|
1070
|
+
paginationBulletMessage: 'Go to slide {{index}}',
|
|
1071
|
+
slideLabelMessage: '{{index}} / {{slidesLength}}',
|
|
1072
|
+
containerMessage: null,
|
|
1073
|
+
containerRoleDescriptionMessage: null,
|
|
1074
|
+
itemRoleDescriptionMessage: null,
|
|
1075
|
+
slideRole: 'group',
|
|
1076
|
+
id: null
|
|
1077
|
+
}
|
|
1078
|
+
});
|
|
1079
|
+
swiper.a11y = {
|
|
1080
|
+
clicked: false
|
|
1081
|
+
};
|
|
1082
|
+
let liveRegion = null;
|
|
1083
|
+
function notify(message) {
|
|
1084
|
+
const notification = liveRegion;
|
|
1085
|
+
if (notification.length === 0) return;
|
|
1086
|
+
notification.innerHTML = '';
|
|
1087
|
+
notification.innerHTML = message;
|
|
1088
|
+
}
|
|
1089
|
+
const makeElementsArray = el => (Array.isArray(el) ? el : [el]).filter(e => !!e);
|
|
1090
|
+
function getRandomNumber(size) {
|
|
1091
|
+
if (size === void 0) {
|
|
1092
|
+
size = 16;
|
|
1093
|
+
}
|
|
1094
|
+
const randomChar = () => Math.round(16 * Math.random()).toString(16);
|
|
1095
|
+
return 'x'.repeat(size).replace(/x/g, randomChar);
|
|
1096
|
+
}
|
|
1097
|
+
function makeElFocusable(el) {
|
|
1098
|
+
el = makeElementsArray(el);
|
|
1099
|
+
el.forEach(subEl => {
|
|
1100
|
+
subEl.setAttribute('tabIndex', '0');
|
|
1101
|
+
});
|
|
1102
|
+
}
|
|
1103
|
+
function makeElNotFocusable(el) {
|
|
1104
|
+
el = makeElementsArray(el);
|
|
1105
|
+
el.forEach(subEl => {
|
|
1106
|
+
subEl.setAttribute('tabIndex', '-1');
|
|
1107
|
+
});
|
|
1108
|
+
}
|
|
1109
|
+
function addElRole(el, role) {
|
|
1110
|
+
el = makeElementsArray(el);
|
|
1111
|
+
el.forEach(subEl => {
|
|
1112
|
+
subEl.setAttribute('role', role);
|
|
1113
|
+
});
|
|
1114
|
+
}
|
|
1115
|
+
function addElRoleDescription(el, description) {
|
|
1116
|
+
el = makeElementsArray(el);
|
|
1117
|
+
el.forEach(subEl => {
|
|
1118
|
+
subEl.setAttribute('aria-roledescription', description);
|
|
1119
|
+
});
|
|
1120
|
+
}
|
|
1121
|
+
function addElControls(el, controls) {
|
|
1122
|
+
el = makeElementsArray(el);
|
|
1123
|
+
el.forEach(subEl => {
|
|
1124
|
+
subEl.setAttribute('aria-controls', controls);
|
|
1125
|
+
});
|
|
1126
|
+
}
|
|
1127
|
+
function addElLabel(el, label) {
|
|
1128
|
+
el = makeElementsArray(el);
|
|
1129
|
+
el.forEach(subEl => {
|
|
1130
|
+
subEl.setAttribute('aria-label', label);
|
|
1131
|
+
});
|
|
1132
|
+
}
|
|
1133
|
+
function addElId(el, id) {
|
|
1134
|
+
el = makeElementsArray(el);
|
|
1135
|
+
el.forEach(subEl => {
|
|
1136
|
+
subEl.setAttribute('id', id);
|
|
1137
|
+
});
|
|
1138
|
+
}
|
|
1139
|
+
function addElLive(el, live) {
|
|
1140
|
+
el = makeElementsArray(el);
|
|
1141
|
+
el.forEach(subEl => {
|
|
1142
|
+
subEl.setAttribute('aria-live', live);
|
|
1143
|
+
});
|
|
1144
|
+
}
|
|
1145
|
+
function disableEl(el) {
|
|
1146
|
+
el = makeElementsArray(el);
|
|
1147
|
+
el.forEach(subEl => {
|
|
1148
|
+
subEl.setAttribute('aria-disabled', true);
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1151
|
+
function enableEl(el) {
|
|
1152
|
+
el = makeElementsArray(el);
|
|
1153
|
+
el.forEach(subEl => {
|
|
1154
|
+
subEl.setAttribute('aria-disabled', false);
|
|
1155
|
+
});
|
|
1156
|
+
}
|
|
1157
|
+
function onEnterOrSpaceKey(e) {
|
|
1158
|
+
if (e.keyCode !== 13 && e.keyCode !== 32) return;
|
|
1159
|
+
const params = swiper.params.a11y;
|
|
1160
|
+
const targetEl = e.target;
|
|
1161
|
+
if (swiper.pagination && swiper.pagination.el && (targetEl === swiper.pagination.el || swiper.pagination.el.contains(e.target))) {
|
|
1162
|
+
if (!e.target.matches(classesToSelector(swiper.params.pagination.bulletClass))) return;
|
|
1163
|
+
}
|
|
1164
|
+
if (swiper.navigation && swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl) {
|
|
1165
|
+
if (!(swiper.isEnd && !swiper.params.loop)) {
|
|
1166
|
+
swiper.slideNext();
|
|
1167
|
+
}
|
|
1168
|
+
if (swiper.isEnd) {
|
|
1169
|
+
notify(params.lastSlideMessage);
|
|
1170
|
+
} else {
|
|
1171
|
+
notify(params.nextSlideMessage);
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
if (swiper.navigation && swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl) {
|
|
1175
|
+
if (!(swiper.isBeginning && !swiper.params.loop)) {
|
|
1176
|
+
swiper.slidePrev();
|
|
1177
|
+
}
|
|
1178
|
+
if (swiper.isBeginning) {
|
|
1179
|
+
notify(params.firstSlideMessage);
|
|
1180
|
+
} else {
|
|
1181
|
+
notify(params.prevSlideMessage);
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
if (swiper.pagination && targetEl.matches(classesToSelector(swiper.params.pagination.bulletClass))) {
|
|
1185
|
+
targetEl.click();
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
function updateNavigation() {
|
|
1189
|
+
if (swiper.params.loop || swiper.params.rewind || !swiper.navigation) return;
|
|
1190
|
+
const {
|
|
1191
|
+
nextEl,
|
|
1192
|
+
prevEl
|
|
1193
|
+
} = swiper.navigation;
|
|
1194
|
+
if (prevEl) {
|
|
1195
|
+
if (swiper.isBeginning) {
|
|
1196
|
+
disableEl(prevEl);
|
|
1197
|
+
makeElNotFocusable(prevEl);
|
|
1198
|
+
} else {
|
|
1199
|
+
enableEl(prevEl);
|
|
1200
|
+
makeElFocusable(prevEl);
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
if (nextEl) {
|
|
1204
|
+
if (swiper.isEnd) {
|
|
1205
|
+
disableEl(nextEl);
|
|
1206
|
+
makeElNotFocusable(nextEl);
|
|
1207
|
+
} else {
|
|
1208
|
+
enableEl(nextEl);
|
|
1209
|
+
makeElFocusable(nextEl);
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
function hasPagination() {
|
|
1214
|
+
return swiper.pagination && swiper.pagination.bullets && swiper.pagination.bullets.length;
|
|
1215
|
+
}
|
|
1216
|
+
function hasClickablePagination() {
|
|
1217
|
+
return hasPagination() && swiper.params.pagination.clickable;
|
|
1218
|
+
}
|
|
1219
|
+
function updatePagination() {
|
|
1220
|
+
const params = swiper.params.a11y;
|
|
1221
|
+
if (!hasPagination()) return;
|
|
1222
|
+
swiper.pagination.bullets.forEach(bulletEl => {
|
|
1223
|
+
if (swiper.params.pagination.clickable) {
|
|
1224
|
+
makeElFocusable(bulletEl);
|
|
1225
|
+
if (!swiper.params.pagination.renderBullet) {
|
|
1226
|
+
addElRole(bulletEl, 'button');
|
|
1227
|
+
addElLabel(bulletEl, params.paginationBulletMessage.replace(/\{\{index\}\}/, elementIndex(bulletEl) + 1));
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
if (bulletEl.matches(classesToSelector(swiper.params.pagination.bulletActiveClass))) {
|
|
1231
|
+
bulletEl.setAttribute('aria-current', 'true');
|
|
1232
|
+
} else {
|
|
1233
|
+
bulletEl.removeAttribute('aria-current');
|
|
1234
|
+
}
|
|
1235
|
+
});
|
|
1236
|
+
}
|
|
1237
|
+
const initNavEl = (el, wrapperId, message) => {
|
|
1238
|
+
makeElFocusable(el);
|
|
1239
|
+
if (el.tagName !== 'BUTTON') {
|
|
1240
|
+
addElRole(el, 'button');
|
|
1241
|
+
el.addEventListener('keydown', onEnterOrSpaceKey);
|
|
1242
|
+
}
|
|
1243
|
+
addElLabel(el, message);
|
|
1244
|
+
addElControls(el, wrapperId);
|
|
1245
|
+
};
|
|
1246
|
+
const handlePointerDown = () => {
|
|
1247
|
+
swiper.a11y.clicked = true;
|
|
1248
|
+
};
|
|
1249
|
+
const handlePointerUp = () => {
|
|
1250
|
+
requestAnimationFrame(() => {
|
|
1251
|
+
requestAnimationFrame(() => {
|
|
1252
|
+
if (!swiper.destroyed) {
|
|
1253
|
+
swiper.a11y.clicked = false;
|
|
1254
|
+
}
|
|
1255
|
+
});
|
|
1256
|
+
});
|
|
1257
|
+
};
|
|
1258
|
+
const handleFocus = e => {
|
|
1259
|
+
if (swiper.a11y.clicked) return;
|
|
1260
|
+
const slideEl = e.target.closest(`.${swiper.params.slideClass}, swiper-slide`);
|
|
1261
|
+
if (!slideEl || !swiper.slides.includes(slideEl)) return;
|
|
1262
|
+
const isActive = swiper.slides.indexOf(slideEl) === swiper.activeIndex;
|
|
1263
|
+
const isVisible = swiper.params.watchSlidesProgress && swiper.visibleSlides && swiper.visibleSlides.includes(slideEl);
|
|
1264
|
+
if (isActive || isVisible) return;
|
|
1265
|
+
if (e.sourceCapabilities && e.sourceCapabilities.firesTouchEvents) return;
|
|
1266
|
+
if (swiper.isHorizontal()) {
|
|
1267
|
+
swiper.el.scrollLeft = 0;
|
|
1268
|
+
} else {
|
|
1269
|
+
swiper.el.scrollTop = 0;
|
|
1270
|
+
}
|
|
1271
|
+
swiper.slideTo(swiper.slides.indexOf(slideEl), 0);
|
|
1272
|
+
};
|
|
1273
|
+
const initSlides = () => {
|
|
1274
|
+
const params = swiper.params.a11y;
|
|
1275
|
+
if (params.itemRoleDescriptionMessage) {
|
|
1276
|
+
addElRoleDescription(swiper.slides, params.itemRoleDescriptionMessage);
|
|
1277
|
+
}
|
|
1278
|
+
if (params.slideRole) {
|
|
1279
|
+
addElRole(swiper.slides, params.slideRole);
|
|
1280
|
+
}
|
|
1281
|
+
const slidesLength = swiper.slides.length;
|
|
1282
|
+
if (params.slideLabelMessage) {
|
|
1283
|
+
swiper.slides.forEach((slideEl, index) => {
|
|
1284
|
+
const slideIndex = swiper.params.loop ? parseInt(slideEl.getAttribute('data-swiper-slide-index'), 10) : index;
|
|
1285
|
+
const ariaLabelMessage = params.slideLabelMessage.replace(/\{\{index\}\}/, slideIndex + 1).replace(/\{\{slidesLength\}\}/, slidesLength);
|
|
1286
|
+
addElLabel(slideEl, ariaLabelMessage);
|
|
1287
|
+
});
|
|
1288
|
+
}
|
|
1289
|
+
};
|
|
1290
|
+
const init = () => {
|
|
1291
|
+
const params = swiper.params.a11y;
|
|
1292
|
+
swiper.el.append(liveRegion);
|
|
1293
|
+
|
|
1294
|
+
// Container
|
|
1295
|
+
const containerEl = swiper.el;
|
|
1296
|
+
if (params.containerRoleDescriptionMessage) {
|
|
1297
|
+
addElRoleDescription(containerEl, params.containerRoleDescriptionMessage);
|
|
1298
|
+
}
|
|
1299
|
+
if (params.containerMessage) {
|
|
1300
|
+
addElLabel(containerEl, params.containerMessage);
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
// Wrapper
|
|
1304
|
+
const wrapperEl = swiper.wrapperEl;
|
|
1305
|
+
const wrapperId = params.id || wrapperEl.getAttribute('id') || `swiper-wrapper-${getRandomNumber(16)}`;
|
|
1306
|
+
const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? 'off' : 'polite';
|
|
1307
|
+
addElId(wrapperEl, wrapperId);
|
|
1308
|
+
addElLive(wrapperEl, live);
|
|
1309
|
+
|
|
1310
|
+
// Slide
|
|
1311
|
+
initSlides();
|
|
1312
|
+
|
|
1313
|
+
// Navigation
|
|
1314
|
+
let {
|
|
1315
|
+
nextEl,
|
|
1316
|
+
prevEl
|
|
1317
|
+
} = swiper.navigation ? swiper.navigation : {};
|
|
1318
|
+
nextEl = makeElementsArray(nextEl);
|
|
1319
|
+
prevEl = makeElementsArray(prevEl);
|
|
1320
|
+
if (nextEl) {
|
|
1321
|
+
nextEl.forEach(el => initNavEl(el, wrapperId, params.nextSlideMessage));
|
|
1322
|
+
}
|
|
1323
|
+
if (prevEl) {
|
|
1324
|
+
prevEl.forEach(el => initNavEl(el, wrapperId, params.prevSlideMessage));
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
// Pagination
|
|
1328
|
+
if (hasClickablePagination()) {
|
|
1329
|
+
const paginationEl = Array.isArray(swiper.pagination.el) ? swiper.pagination.el : [swiper.pagination.el];
|
|
1330
|
+
paginationEl.forEach(el => {
|
|
1331
|
+
el.addEventListener('keydown', onEnterOrSpaceKey);
|
|
1332
|
+
});
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
// Tab focus
|
|
1336
|
+
swiper.el.addEventListener('focus', handleFocus, true);
|
|
1337
|
+
swiper.el.addEventListener('pointerdown', handlePointerDown, true);
|
|
1338
|
+
swiper.el.addEventListener('pointerup', handlePointerUp, true);
|
|
1339
|
+
};
|
|
1340
|
+
function destroy() {
|
|
1341
|
+
if (liveRegion) liveRegion.remove();
|
|
1342
|
+
let {
|
|
1343
|
+
nextEl,
|
|
1344
|
+
prevEl
|
|
1345
|
+
} = swiper.navigation ? swiper.navigation : {};
|
|
1346
|
+
nextEl = makeElementsArray(nextEl);
|
|
1347
|
+
prevEl = makeElementsArray(prevEl);
|
|
1348
|
+
if (nextEl) {
|
|
1349
|
+
nextEl.forEach(el => el.removeEventListener('keydown', onEnterOrSpaceKey));
|
|
1350
|
+
}
|
|
1351
|
+
if (prevEl) {
|
|
1352
|
+
prevEl.forEach(el => el.removeEventListener('keydown', onEnterOrSpaceKey));
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
// Pagination
|
|
1356
|
+
if (hasClickablePagination()) {
|
|
1357
|
+
const paginationEl = Array.isArray(swiper.pagination.el) ? swiper.pagination.el : [swiper.pagination.el];
|
|
1358
|
+
paginationEl.forEach(el => {
|
|
1359
|
+
el.removeEventListener('keydown', onEnterOrSpaceKey);
|
|
1360
|
+
});
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
// Tab focus
|
|
1364
|
+
swiper.el.removeEventListener('focus', handleFocus, true);
|
|
1365
|
+
swiper.el.removeEventListener('pointerdown', handlePointerDown, true);
|
|
1366
|
+
swiper.el.removeEventListener('pointerup', handlePointerUp, true);
|
|
1367
|
+
}
|
|
1368
|
+
on('beforeInit', () => {
|
|
1369
|
+
liveRegion = createElement('span', swiper.params.a11y.notificationClass);
|
|
1370
|
+
liveRegion.setAttribute('aria-live', 'assertive');
|
|
1371
|
+
liveRegion.setAttribute('aria-atomic', 'true');
|
|
1372
|
+
});
|
|
1373
|
+
on('afterInit', () => {
|
|
1374
|
+
if (!swiper.params.a11y.enabled) return;
|
|
1375
|
+
init();
|
|
1376
|
+
});
|
|
1377
|
+
on('slidesLengthChange snapGridLengthChange slidesGridLengthChange', () => {
|
|
1378
|
+
if (!swiper.params.a11y.enabled) return;
|
|
1379
|
+
initSlides();
|
|
1380
|
+
});
|
|
1381
|
+
on('fromEdge toEdge afterInit lock unlock', () => {
|
|
1382
|
+
if (!swiper.params.a11y.enabled) return;
|
|
1383
|
+
updateNavigation();
|
|
1384
|
+
});
|
|
1385
|
+
on('paginationUpdate', () => {
|
|
1386
|
+
if (!swiper.params.a11y.enabled) return;
|
|
1387
|
+
updatePagination();
|
|
1388
|
+
});
|
|
1389
|
+
on('destroy', () => {
|
|
1390
|
+
if (!swiper.params.a11y.enabled) return;
|
|
1391
|
+
destroy();
|
|
1392
|
+
});
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
const contentCarouselCss = "@font-face{font-family:swiper-icons;src:url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA');font-weight:400;font-style:normal}:root{--swiper-theme-color:#007aff}:host{position:relative;display:block;margin-left:auto;margin-right:auto;z-index:1}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;overflow:clip;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function,initial);box-sizing:content-box}.swiper-android .swiper-slide,.swiper-ios .swiper-slide,.swiper-wrapper{transform:translate3d(0px,0,0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-cube-shadow,.swiper-3d .swiper-slide{transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper::before{content:'';flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper::before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper::before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:rgba(0,0,0,.15)}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader,.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color:#fff}.swiper-lazy-preloader-black{--swiper-preloader-color:#000}@keyframes swiper-preloader-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.swiper-virtual .swiper-slide{-webkit-backface-visibility:hidden;transform:translateZ(0)}.swiper-virtual.swiper-css-mode .swiper-wrapper::after{content:'';position:absolute;left:0;top:0;pointer-events:none}.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after{height:1px;width:var(--swiper-virtual-size)}.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after{width:1px;height:var(--swiper-virtual-size)}:root{--swiper-navigation-size:44px}.swiper-button-next,.swiper-button-prev{position:absolute;top:var(--swiper-navigation-top-offset,50%);width:calc(var(--swiper-navigation-size)/ 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(0px - (var(--swiper-navigation-size)/ 2));z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color,var(--swiper-theme-color))}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-next.swiper-button-hidden,.swiper-button-prev.swiper-button-hidden{opacity:0;cursor:auto;pointer-events:none}.swiper-navigation-disabled .swiper-button-next,.swiper-navigation-disabled .swiper-button-prev{display:none!important}.swiper-button-next svg,.swiper-button-prev svg{width:100%;height:100%;object-fit:contain;transform-origin:center}.swiper-rtl .swiper-button-next svg,.swiper-rtl .swiper-button-prev svg{transform:rotate(180deg)}.swiper-button-prev,.swiper-rtl .swiper-button-next{left:var(--swiper-navigation-sides-offset,10px);right:auto}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:var(--swiper-navigation-sides-offset,10px);left:auto}.swiper-button-lock{display:none}.swiper-button-next:after,.swiper-button-prev:after{font-family:swiper-icons;font-size:var(--swiper-navigation-size);text-transform:none!important;letter-spacing:0;font-variant:initial;line-height:1}.swiper-button-prev:after,.swiper-rtl .swiper-button-next:after{content:'prev'}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:var(--swiper-navigation-sides-offset,10px);left:auto}.swiper-button-next:after,.swiper-rtl .swiper-button-prev:after{content:'next'}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:var(--swiper-pagination-bottom,8px);top:var(--swiper-pagination-top,auto);left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width,var(--swiper-pagination-bullet-size,8px));height:var(--swiper-pagination-bullet-height,var(--swiper-pagination-bullet-size,8px));display:inline-block;border-radius:var(--swiper-pagination-bullet-border-radius,50%);background:var(--swiper-pagination-bullet-inactive-color,#000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-webkit-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-pagination-vertical.swiper-pagination-bullets,.swiper-vertical>.swiper-pagination-bullets{right:var(--swiper-pagination-right,8px);left:var(--swiper-pagination-left,auto);top:50%;transform:translate3d(0px,-50%,0)}.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap,6px) 0;display:block}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap,4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translateX(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color,inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color,rgba(0,0,0,.25));position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size,4px);left:0;top:0}.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-vertical>.swiper-pagination-progressbar{width:var(--swiper-pagination-progressbar-size,4px);height:100%;left:0;top:0}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:var(--swiper-scrollbar-border-radius,10px);position:relative;-ms-touch-action:none;background:var(--swiper-scrollbar-bg-color,rgba(0,0,0,.1))}.swiper-scrollbar-disabled>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-disabled{display:none!important}.swiper-horizontal>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-horizontal{position:absolute;left:var(--swiper-scrollbar-sides-offset,1%);bottom:var(--swiper-scrollbar-bottom,4px);top:var(--swiper-scrollbar-top,auto);z-index:50;height:var(--swiper-scrollbar-size,4px);width:calc(100% - 2 * var(--swiper-scrollbar-sides-offset,1%))}.swiper-scrollbar.swiper-scrollbar-vertical,.swiper-vertical>.swiper-scrollbar{position:absolute;left:var(--swiper-scrollbar-left,auto);right:var(--swiper-scrollbar-right,4px);top:var(--swiper-scrollbar-sides-offset,1%);z-index:50;width:var(--swiper-scrollbar-size,4px);height:calc(100% - 2 * var(--swiper-scrollbar-sides-offset,1%))}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:var(--swiper-scrollbar-drag-bg-color,rgba(0,0,0,.5));border-radius:var(--swiper-scrollbar-border-radius,10px);left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;object-fit:contain}.swiper-slide-zoomed{cursor:move;touch-action:none}.swiper .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-free-mode>.swiper-wrapper{transition-timing-function:ease-out;margin:0 auto}.swiper-grid>.swiper-wrapper{flex-wrap:wrap}.swiper-grid-column>.swiper-wrapper{flex-wrap:wrap;flex-direction:column}.swiper-fade.swiper-free-mode .swiper-slide{transition-timing-function:ease-out}.swiper-fade .swiper-slide{pointer-events:none;transition-property:opacity}.swiper-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-fade .swiper-slide-active{pointer-events:auto}.swiper-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-cube{overflow:visible}.swiper-cube .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;transform-origin:0 0;width:100%;height:100%}.swiper-cube .swiper-slide .swiper-slide{pointer-events:none}.swiper-cube.swiper-rtl .swiper-slide{transform-origin:100% 0}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-next,.swiper-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0px;width:100%;height:100%;opacity:.6;z-index:0}.swiper-cube .swiper-cube-shadow:before{content:'';background:#000;position:absolute;left:0;top:0;bottom:0;right:0;filter:blur(50px)}.swiper-cube .swiper-slide-next+.swiper-slide{pointer-events:auto;visibility:visible}.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-bottom,.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-left,.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-right,.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-flip{overflow:visible}.swiper-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-flip .swiper-slide-active,.swiper-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-bottom,.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-left,.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-right,.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-creative .swiper-slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;transition-property:transform,opacity,height}.swiper-cards{overflow:visible}.swiper-cards .swiper-slide{transform-origin:center bottom;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden}content-carousel{display:block;overflow:hidden;visibility:hidden}content-carousel.hydrated{visibility:inherit}";
|
|
1396
|
+
|
|
1397
|
+
const ContentCarousel = class {
|
|
1398
|
+
constructor(hostRef) {
|
|
1399
|
+
registerInstance(this, hostRef);
|
|
1400
|
+
this.loadStatus = new BehaviorSubject(false);
|
|
1401
|
+
this.initMethod = 'load';
|
|
1402
|
+
this.swiperOptions = '{"slidesPerView": 1, "slidesPerGroup": 1, "autoplay": true, "loop": false}';
|
|
1403
|
+
}
|
|
1404
|
+
getSwiperOptions(newOptions) {
|
|
1405
|
+
return Object.assign({
|
|
1406
|
+
observer: true,
|
|
1407
|
+
observeParents: true,
|
|
1408
|
+
pagination: {
|
|
1409
|
+
el: this.swiperPagination,
|
|
1410
|
+
},
|
|
1411
|
+
navigation: {
|
|
1412
|
+
nextEl: this.swiperNextElement,
|
|
1413
|
+
prevEl: this.swiperPrevElement,
|
|
1414
|
+
},
|
|
1415
|
+
scrollbar: {
|
|
1416
|
+
el: this.swiperScrollbar,
|
|
1417
|
+
},
|
|
1418
|
+
}, newOptions);
|
|
1419
|
+
}
|
|
1420
|
+
componentDidLoad() {
|
|
1421
|
+
if (this.initMethod === 'load') {
|
|
1422
|
+
if (this.swiperOptions) {
|
|
1423
|
+
this.swiperOptionsFinal = this.getSwiperOptions(JSON.parse(this.swiperOptions || ''));
|
|
1424
|
+
}
|
|
1425
|
+
let options = {
|
|
1426
|
+
root: null,
|
|
1427
|
+
rootMargin: '0px',
|
|
1428
|
+
threshold: 0.1,
|
|
1429
|
+
};
|
|
1430
|
+
let observer = new IntersectionObserver((entries) => {
|
|
1431
|
+
entries.forEach(async (entry) => {
|
|
1432
|
+
if (entry.isIntersecting && !this.loadStatus.getValue()) {
|
|
1433
|
+
await this.initSwiper();
|
|
1434
|
+
this.loadStatus.next(true);
|
|
1435
|
+
}
|
|
1436
|
+
});
|
|
1437
|
+
}, options);
|
|
1438
|
+
observer.observe(this.hostElement);
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
setSwiperOptionsCallback(event) {
|
|
1442
|
+
this.loadStatus.subscribe(async () => {
|
|
1443
|
+
let loaded = this.loadStatus.value;
|
|
1444
|
+
if (loaded) {
|
|
1445
|
+
this.swiperOptionsFinal = this.getSwiperOptions(event.detail);
|
|
1446
|
+
await this.initSwiper();
|
|
1447
|
+
}
|
|
1448
|
+
});
|
|
1449
|
+
}
|
|
1450
|
+
async initSwiper() {
|
|
1451
|
+
let Swiper = await import('./swiper-977c310f.js');
|
|
1452
|
+
for (const slide of this.swiperWrapper.children) {
|
|
1453
|
+
slide.classList.add('swiper-slide');
|
|
1454
|
+
}
|
|
1455
|
+
// configure Swiper to use modules
|
|
1456
|
+
this.swiperCarousel = new Swiper.Swiper(this.swiper, Object.assign(Object.assign({}, this.swiperOptionsFinal), {
|
|
1457
|
+
modules: [A11y, Navigation, Pagination]
|
|
1458
|
+
}));
|
|
1459
|
+
}
|
|
1460
|
+
render() {
|
|
1461
|
+
return (h(Host, null, h("div", { class: "swiper", ref: el => this.swiper = el }, h("div", { class: "swiper-wrapper", ref: el => this.swiperWrapper = el }, h("slot", { name: "content" }), h("slot", null)), h("div", { class: "swiper-pagination", ref: el => this.swiperPagination = el }), h("div", { class: "swiper-button-prev", ref: el => this.swiperPrevElement = el }), h("div", { class: "swiper-button-next", ref: el => this.swiperNextElement = el }), h("div", { class: "swiper-scrollbar", ref: el => this.swiperScrollbar = el }))));
|
|
1462
|
+
}
|
|
1463
|
+
get hostElement() { return getElement(this); }
|
|
1464
|
+
};
|
|
1465
|
+
ContentCarousel.style = contentCarouselCss;
|
|
1466
|
+
|
|
1467
|
+
export { ContentCarousel as C, elementChildren as a, elementIndex as b, createElement as c, elementStyle as d, extend as e, deleteProps as f, getDocument as g, getWindow as h, elementParents as i, elementOuterSize as j, elementNextAll as k, elementPrevAll as l, getTranslate as m, animateCSSModeScroll as n, nextTick as o, now as p, setCSSProperty as s };
|
|
1468
|
+
|
|
1469
|
+
//# sourceMappingURL=content-carousel-cf7daf22.js.map
|