q2-tecton-elements 1.70.2 → 1.71.0
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/dist/bundle-report.json +556 -231
- package/dist/cjs/click-elsewhere_3.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-group_2.cjs.entry.js +3 -3
- package/dist/cjs/q2-action-sheet.cjs.entry.js +4 -3
- package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q2-badge_2.cjs.entry.js +17 -8
- package/dist/cjs/q2-btn_2.cjs.entry.js +2 -2
- package/dist/cjs/q2-calendar.cjs.entry.js +8 -6
- package/dist/cjs/q2-card-image.cjs.entry.js +1 -1
- package/dist/cjs/q2-card.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel.cjs.entry.js +108 -74
- package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-donut.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox_2.cjs.entry.js +3 -3
- package/dist/cjs/q2-currency.cjs.entry.js +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
- package/dist/cjs/q2-detail.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +3 -3
- package/dist/cjs/q2-example.cjs.entry.js +1 -1
- package/dist/cjs/q2-file-picker.cjs.entry.js +1 -1
- package/dist/cjs/q2-form.cjs.entry.js +1 -1
- package/dist/cjs/q2-formatted-text.cjs.entry.js +1 -1
- package/dist/cjs/q2-icon.cjs.entry.js +1 -1
- package/dist/cjs/q2-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-legend.cjs.entry.js +1 -1
- package/dist/cjs/q2-link_2.cjs.entry.js +2 -2
- package/dist/cjs/q2-message.cjs.entry.js +1 -1
- package/dist/cjs/q2-meter.cjs.entry.js +1 -1
- package/dist/cjs/q2-modal.cjs.entry.js +1 -1
- package/dist/cjs/q2-month-picker.cjs.entry.js +1 -1
- package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
- package/dist/cjs/q2-option.cjs.entry.js +1 -1
- package/dist/cjs/q2-otp.cjs.entry.js +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +1 -1
- package/dist/cjs/q2-pill.cjs.entry.js +18 -2
- package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-radio.cjs.entry.js +1 -1
- package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
- package/dist/cjs/q2-search.cjs.entry.js +2 -2
- package/dist/cjs/q2-section.cjs.entry.js +3 -3
- package/dist/cjs/q2-select.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +2 -2
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +32 -9
- package/dist/cjs/q2-stepper.cjs.entry.js +18 -4
- package/dist/cjs/q2-surface.cjs.entry.js +3 -3
- package/dist/cjs/q2-tab-container.cjs.entry.js +89 -20
- package/dist/cjs/q2-tab-pane.cjs.entry.js +2 -2
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +3 -3
- package/dist/cjs/q2-toast.cjs.entry.js +1 -1
- package/dist/cjs/q2-tooltip.cjs.entry.js +26 -15
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +3 -3
- package/dist/collection/components/q2-action-group/q2-action-group.css +22 -0
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.css +24 -1
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +3 -2
- package/dist/collection/components/q2-avatar/q2-avatar.css +23 -1
- package/dist/collection/components/q2-avatar/test/q2-avatar-test.vr.js +13 -1
- package/dist/collection/components/q2-badge/q2-badge.css +26 -4
- package/dist/collection/components/q2-badge/test/q2-badge-test.vr.js +13 -1
- package/dist/collection/components/q2-btn/q2-btn.css +53 -9
- package/dist/collection/components/q2-btn/test/q2-btn-test.vr.js +19 -1
- package/dist/collection/components/q2-calendar/q2-calendar.css +26 -4
- package/dist/collection/components/q2-calendar/q2-calendar.js +7 -5
- package/dist/collection/components/q2-calendar/q2-month-picker.css +22 -0
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.vr.js +34 -1
- package/dist/collection/components/q2-card/q2-card.css +23 -1
- package/dist/collection/components/q2-card/test/q2-card-test.vr.js +10 -1
- package/dist/collection/components/q2-card-image/q2-card-image.css +23 -1
- package/dist/collection/components/q2-card-image/test/q2-card-image-test.vr.js +9 -1
- package/dist/collection/components/q2-carousel/q2-carousel.css +29 -39
- package/dist/collection/components/q2-carousel/q2-carousel.js +122 -69
- package/dist/collection/components/q2-carousel/test/q2-carousel-test.vr.js +5 -4
- package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.css +22 -0
- package/dist/collection/components/q2-chart-area/q2-chart-area.css +22 -0
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.css +22 -0
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.css +24 -2
- package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.vr.js +13 -1
- package/dist/collection/components/q2-checkbox/q2-checkbox.css +23 -1
- package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.vr.js +11 -1
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.css +23 -1
- package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.vr.js +11 -1
- package/dist/collection/components/q2-currency/q2-currency.css +25 -3
- package/dist/collection/components/q2-currency/test/q2-currency-test.vr.js +13 -1
- package/dist/collection/components/q2-data-table/q2-data-table.css +24 -2
- package/dist/collection/components/q2-data-table/test/q2-data-table-test.vr.js +11 -1
- package/dist/collection/components/q2-detail/q2-detail.css +32 -10
- package/dist/collection/components/q2-dropdown/q2-dropdown.css +22 -0
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.css +22 -0
- package/dist/collection/components/q2-editable-field/q2-editable-field.css +22 -0
- package/dist/collection/components/q2-editable-field/q2-editable-field.js +2 -2
- package/dist/collection/components/q2-example/q2-example.css +23 -0
- package/dist/collection/components/q2-file-picker/q2-file-picker.css +57 -10
- package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.vr.js +14 -1
- package/dist/collection/components/q2-form/q2-form.css +22 -0
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.css +25 -3
- package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.vr.js +13 -1
- package/dist/collection/components/q2-icon/assets/standard.symbol.svg +1 -1
- package/dist/collection/components/q2-icon/q2-icon.css +22 -0
- package/dist/collection/components/q2-input/q2-input.css +26 -4
- package/dist/collection/components/q2-input/q2-input.js +39 -7
- package/dist/collection/components/q2-input/test/q2-input-test.vr.js +36 -1
- package/dist/collection/components/q2-item/q2-item.css +46 -2
- package/dist/collection/components/q2-item/test/q2-item-test.vr.js +12 -1
- package/dist/collection/components/q2-legend/q2-legend.css +24 -2
- package/dist/collection/components/q2-link/q2-link.css +22 -0
- package/dist/collection/components/q2-list/q2-list.css +46 -2
- package/dist/collection/components/q2-list/test/q2-list-test.vr.js +12 -1
- package/dist/collection/components/q2-loading/q2-loading.css +23 -0
- package/dist/collection/components/q2-message/q2-message.css +22 -0
- package/dist/collection/components/q2-meter/q2-meter.css +25 -3
- package/dist/collection/components/q2-meter/test/q2-meter-test.vr.js +12 -1
- package/dist/collection/components/q2-modal/q2-modal.css +23 -1
- package/dist/collection/components/q2-modal/test/q2-modal-test.vr.js +12 -1
- package/dist/collection/components/q2-optgroup/q2-optgroup.css +23 -1
- package/dist/collection/components/q2-option/q2-option.css +22 -0
- package/dist/collection/components/q2-option-list/q2-option-list.css +22 -0
- package/dist/collection/components/q2-otp/q2-otp.css +27 -4
- package/dist/collection/components/q2-otp/test/q2-otp-test.vr.js +12 -1
- package/dist/collection/components/q2-pagination/q2-pagination.css +22 -0
- package/dist/collection/components/q2-pill/q2-pill.css +42 -2
- package/dist/collection/components/q2-pill/q2-pill.js +18 -1
- package/dist/collection/components/q2-pill/test/q2-pill-test.vr.js +27 -1
- package/dist/collection/components/q2-popover/q2-popover.css +22 -7
- package/dist/collection/components/q2-radio/q2-radio.css +24 -2
- package/dist/collection/components/q2-radio/test/q2-radio-test.vr.js +12 -1
- package/dist/collection/components/q2-radio-group/q2-radio-group.css +23 -1
- package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.vr.js +11 -1
- package/dist/collection/components/q2-relative-time/q2-relative-time.css +22 -0
- package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.css +22 -0
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
- package/dist/collection/components/q2-search/q2-search.css +22 -0
- package/dist/collection/components/q2-search/q2-search.js +1 -1
- package/dist/collection/components/q2-section/q2-section.css +23 -1
- package/dist/collection/components/q2-section/q2-section.js +2 -2
- package/dist/collection/components/q2-section/test/q2-section-test.vr.js +11 -1
- package/dist/collection/components/q2-select/q2-select.css +22 -0
- package/dist/collection/components/q2-stepper/q2-stepper.css +38 -4
- package/dist/collection/components/q2-stepper/q2-stepper.js +17 -3
- package/dist/collection/components/q2-stepper/test/q2-stepper-test.vr.js +12 -1
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.css +22 -0
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +1 -1
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.css +39 -5
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +31 -8
- package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.vr.js +16 -1
- package/dist/collection/components/q2-surface/q2-surface.css +71 -32
- package/dist/collection/components/q2-surface/q2-surface.js +7 -7
- package/dist/collection/components/q2-surface/test/q2-surface-test.vr.js +54 -0
- package/dist/collection/components/q2-tab-container/q2-tab-container.css +112 -6
- package/dist/collection/components/q2-tab-container/q2-tab-container.js +114 -21
- package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.vr.js +24 -1
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.css +22 -0
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
- package/dist/collection/components/q2-tag/q2-tag.css +25 -2
- package/dist/collection/components/q2-tag/q2-tag.js +1 -1
- package/dist/collection/components/q2-tag/test/q2-tag-test.vr.js +21 -1
- package/dist/collection/components/q2-textarea/q2-textarea.css +24 -2
- package/dist/collection/components/q2-textarea/q2-textarea.js +2 -2
- package/dist/collection/components/q2-textarea/test/q2-textarea-test.vr.js +16 -1
- package/dist/collection/components/q2-toast/q2-toast.css +22 -0
- package/dist/collection/components/q2-tooltip/q2-tooltip.css +27 -19
- package/dist/collection/components/q2-tooltip/q2-tooltip.js +32 -21
- package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.vr.js +13 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.css +22 -0
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/collection/utils/helpers.js +29 -6
- package/dist/collection/utils/test/vr-helpers.js +7 -0
- package/dist/components/q2-action-group2.js +1 -1
- package/dist/components/q2-action-sheet.js +21 -18
- package/dist/components/q2-avatar2.js +1 -1
- package/dist/components/q2-badge2.js +1 -1
- package/dist/components/q2-btn2.js +15 -15
- package/dist/components/q2-calendar.js +306 -301
- package/dist/components/q2-card-image.js +6 -6
- package/dist/components/q2-card.js +14 -14
- package/dist/components/q2-carousel-pane2.js +1 -1
- package/dist/components/q2-carousel.js +633 -585
- package/dist/components/q2-chart-area.js +1 -1
- package/dist/components/q2-chart-bar.js +70 -70
- package/dist/components/q2-chart-donut.js +1 -1
- package/dist/components/q2-checkbox-group.js +42 -42
- package/dist/components/q2-checkbox2.js +1 -1
- package/dist/components/q2-currency.js +32 -32
- package/dist/components/q2-data-table.js +34 -34
- package/dist/components/q2-detail.js +5 -5
- package/dist/components/q2-dropdown-item2.js +11 -11
- package/dist/components/q2-dropdown.js +17 -17
- package/dist/components/q2-editable-field.js +12 -11
- package/dist/components/q2-example.js +15 -15
- package/dist/components/q2-file-picker.js +25 -25
- package/dist/components/q2-form.js +11 -11
- package/dist/components/q2-formatted-text.js +5 -5
- package/dist/components/q2-icon2.js +1 -1
- package/dist/components/q2-input2.js +24 -13
- package/dist/components/q2-item2.js +1 -1
- package/dist/components/q2-legend2.js +56 -56
- package/dist/components/q2-link2.js +6 -6
- package/dist/components/q2-list2.js +22 -22
- package/dist/components/q2-loading2.js +1 -1
- package/dist/components/q2-message2.js +20 -20
- package/dist/components/q2-meter.js +1 -1
- package/dist/components/q2-modal.js +3 -3
- package/dist/components/q2-month-picker.js +10 -10
- package/dist/components/q2-optgroup2.js +7 -7
- package/dist/components/q2-option-list2.js +34 -34
- package/dist/components/q2-option2.js +13 -13
- package/dist/components/q2-otp.js +5 -5
- package/dist/components/q2-pagination.js +58 -58
- package/dist/components/q2-pill.js +66 -54
- package/dist/components/q2-popover2.js +1 -1
- package/dist/components/q2-radio-group.js +5 -5
- package/dist/components/q2-radio.js +14 -14
- package/dist/components/q2-relative-time.js +10 -10
- package/dist/components/q2-resize-observer2.js +9 -9
- package/dist/components/q2-search.js +5 -5
- package/dist/components/q2-section.js +22 -22
- package/dist/components/q2-select2.js +1 -1
- package/dist/components/q2-stepper-pane.js +33 -33
- package/dist/components/q2-stepper-vertical.js +84 -60
- package/dist/components/q2-stepper.js +79 -65
- package/dist/components/q2-surface.js +14 -14
- package/dist/components/q2-tab-container.js +110 -55
- package/dist/components/q2-tab-pane.js +7 -7
- package/dist/components/q2-tag2.js +39 -39
- package/dist/components/q2-textarea.js +16 -16
- package/dist/components/q2-toast.js +22 -22
- package/dist/components/q2-tooltip2.js +26 -25
- package/dist/components/tecton-tab-pane.js +11 -11
- package/dist/esm/click-elsewhere_3.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-group_2.entry.js +3 -3
- package/dist/esm/q2-action-sheet.entry.js +4 -3
- package/dist/esm/q2-avatar.entry.js +1 -1
- package/dist/esm/q2-badge_2.entry.js +17 -8
- package/dist/esm/q2-btn_2.entry.js +2 -2
- package/dist/esm/q2-calendar.entry.js +8 -6
- package/dist/esm/q2-card-image.entry.js +1 -1
- package/dist/esm/q2-card.entry.js +1 -1
- package/dist/esm/q2-carousel-pane.entry.js +1 -1
- package/dist/esm/q2-carousel.entry.js +104 -70
- package/dist/esm/q2-chart-area.entry.js +1 -1
- package/dist/esm/q2-chart-bar.entry.js +1 -1
- package/dist/esm/q2-chart-donut.entry.js +1 -1
- package/dist/esm/q2-checkbox-group.entry.js +1 -1
- package/dist/esm/q2-checkbox_2.entry.js +3 -3
- package/dist/esm/q2-currency.entry.js +1 -1
- package/dist/esm/q2-data-table.entry.js +1 -1
- package/dist/esm/q2-detail.entry.js +1 -1
- package/dist/esm/q2-dropdown-item.entry.js +1 -1
- package/dist/esm/q2-dropdown.entry.js +1 -1
- package/dist/esm/q2-editable-field.entry.js +3 -3
- package/dist/esm/q2-example.entry.js +1 -1
- package/dist/esm/q2-file-picker.entry.js +1 -1
- package/dist/esm/q2-form.entry.js +1 -1
- package/dist/esm/q2-formatted-text.entry.js +1 -1
- package/dist/esm/q2-icon.entry.js +1 -1
- package/dist/esm/q2-item.entry.js +1 -1
- package/dist/esm/q2-legend.entry.js +1 -1
- package/dist/esm/q2-link_2.entry.js +2 -2
- package/dist/esm/q2-message.entry.js +1 -1
- package/dist/esm/q2-meter.entry.js +1 -1
- package/dist/esm/q2-modal.entry.js +1 -1
- package/dist/esm/q2-month-picker.entry.js +1 -1
- package/dist/esm/q2-optgroup.entry.js +1 -1
- package/dist/esm/q2-option.entry.js +1 -1
- package/dist/esm/q2-otp.entry.js +1 -1
- package/dist/esm/q2-pagination.entry.js +1 -1
- package/dist/esm/q2-pill.entry.js +18 -2
- package/dist/esm/q2-radio-group.entry.js +1 -1
- package/dist/esm/q2-radio.entry.js +1 -1
- package/dist/esm/q2-relative-time.entry.js +2 -2
- package/dist/esm/q2-search.entry.js +2 -2
- package/dist/esm/q2-section.entry.js +3 -3
- package/dist/esm/q2-select.entry.js +1 -1
- package/dist/esm/q2-stepper-pane.entry.js +2 -2
- package/dist/esm/q2-stepper-vertical.entry.js +32 -9
- package/dist/esm/q2-stepper.entry.js +18 -4
- package/dist/esm/q2-surface.entry.js +3 -3
- package/dist/esm/q2-tab-container.entry.js +89 -20
- package/dist/esm/q2-tab-pane.entry.js +2 -2
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +3 -3
- package/dist/esm/q2-toast.entry.js +1 -1
- package/dist/esm/q2-tooltip.entry.js +27 -16
- package/dist/esm/tecton-tab-pane.entry.js +3 -3
- package/dist/q2-tecton-elements/assets/standard.symbol.svg +1 -1
- package/dist/q2-tecton-elements/click-elsewhere_3.entry.js +23 -23
- package/dist/q2-tecton-elements/q2-action-group_2.entry.js +42 -42
- package/dist/q2-tecton-elements/q2-action-sheet.entry.js +21 -18
- package/dist/q2-tecton-elements/q2-avatar.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-badge_2.entry.js +25 -15
- package/dist/q2-tecton-elements/q2-btn_2.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-calendar.entry.js +120 -115
- package/dist/q2-tecton-elements/q2-card-image.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +11 -11
- package/dist/q2-tecton-elements/q2-carousel.entry.js +572 -540
- package/dist/q2-tecton-elements/q2-chart-area.entry.js +166 -166
- package/dist/q2-tecton-elements/q2-chart-bar.entry.js +190 -190
- package/dist/q2-tecton-elements/q2-chart-donut.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +8 -8
- package/dist/q2-tecton-elements/q2-checkbox_2.entry.js +7 -7
- package/dist/q2-tecton-elements/q2-currency.entry.js +40 -40
- package/dist/q2-tecton-elements/q2-data-table.entry.js +64 -64
- package/dist/q2-tecton-elements/q2-detail.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-dropdown.entry.js +21 -21
- package/dist/q2-tecton-elements/q2-editable-field.entry.js +18 -17
- package/dist/q2-tecton-elements/q2-example.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-file-picker.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-form.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-formatted-text.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-icon.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-item.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-legend.entry.js +8 -8
- package/dist/q2-tecton-elements/q2-link_2.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-message.entry.js +23 -23
- package/dist/q2-tecton-elements/q2-meter.entry.js +4 -4
- package/dist/q2-tecton-elements/q2-modal.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-month-picker.entry.js +39 -39
- package/dist/q2-tecton-elements/q2-optgroup.entry.js +13 -13
- package/dist/q2-tecton-elements/q2-option.entry.js +22 -22
- package/dist/q2-tecton-elements/q2-otp.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-pagination.entry.js +11 -11
- package/dist/q2-tecton-elements/q2-pill.entry.js +30 -18
- package/dist/q2-tecton-elements/q2-radio-group.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-radio.entry.js +24 -24
- package/dist/q2-tecton-elements/q2-relative-time.entry.js +21 -21
- package/dist/q2-tecton-elements/q2-search.entry.js +12 -12
- package/dist/q2-tecton-elements/q2-section.entry.js +25 -25
- package/dist/q2-tecton-elements/q2-select.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +16 -16
- package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +77 -53
- package/dist/q2-tecton-elements/q2-stepper.entry.js +44 -30
- package/dist/q2-tecton-elements/q2-surface.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-tab-container.entry.js +109 -56
- package/dist/q2-tecton-elements/q2-tab-pane.entry.js +13 -13
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/q2-tecton-elements/q2-textarea.entry.js +14 -14
- package/dist/q2-tecton-elements/q2-toast.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-tooltip.entry.js +25 -24
- package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +11 -11
- package/dist/types/components/q2-carousel/q2-carousel.d.ts +14 -0
- package/dist/types/components/q2-input/q2-input.d.ts +7 -1
- package/dist/types/components/q2-pill/q2-pill.d.ts +2 -0
- package/dist/types/components/q2-stepper/q2-stepper.d.ts +1 -0
- package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +3 -2
- package/dist/types/components/q2-surface/q2-surface.d.ts +3 -3
- package/dist/types/components/q2-tab-container/q2-tab-container.d.ts +17 -3
- package/dist/types/components/q2-tooltip/q2-tooltip.d.ts +2 -1
- package/dist/types/components.d.ts +50 -21
- package/dist/types/utils/helpers.d.ts +16 -1
- package/dist/types/utils/test/vr-helpers.d.ts +11 -0
- package/package.json +12 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as e, c as t, h as i, F as n, H as
|
|
1
|
+
import { r as e, c as t, h as i, F as n, H as r, g as o } from "./index-Cqkz7Bnm.js";
|
|
2
2
|
|
|
3
3
|
import { c as a, l as s, d as l, o as c, i as d, g as u } from "./index-Cps4jSQM.js";
|
|
4
4
|
|
|
@@ -124,24 +124,24 @@ function now() {
|
|
|
124
124
|
|
|
125
125
|
function getTranslate(e, t = "x") {
|
|
126
126
|
const i = getWindow();
|
|
127
|
-
let n,
|
|
127
|
+
let n, r, o;
|
|
128
128
|
const a = function(e) {
|
|
129
129
|
const t = getWindow();
|
|
130
130
|
let i;
|
|
131
131
|
return t.getComputedStyle && (i = t.getComputedStyle(e, null)), !i && e.currentStyle && (i = e.currentStyle),
|
|
132
132
|
i || (i = e.style), i;
|
|
133
133
|
}(e);
|
|
134
|
-
return i.WebKitCSSMatrix ? (
|
|
134
|
+
return i.WebKitCSSMatrix ? (r = a.transform || a.webkitTransform, r.split(",").length > 6 && (r = r.split(", ").map((e => e.replace(",", "."))).join(", ")),
|
|
135
135
|
// Some old versions of Webkit choke when 'none' is passed; pass
|
|
136
136
|
// empty string instead in this case
|
|
137
|
-
|
|
138
|
-
n =
|
|
137
|
+
o = new i.WebKitCSSMatrix("none" === r ? "" : r)) : (o = a.MozTransform || a.OTransform || a.MsTransform || a.msTransform || a.transform || a.getPropertyValue("transform").replace("translate(", "matrix(1, 0, 0, 1,"),
|
|
138
|
+
n = o.toString().split(",")), "x" === t && (
|
|
139
139
|
// Latest Chrome and webkits Fix
|
|
140
|
-
|
|
140
|
+
r = i.WebKitCSSMatrix ? o.m41 : 16 === n.length ? parseFloat(n[12]) : parseFloat(n[4])),
|
|
141
141
|
"y" === t && (
|
|
142
142
|
// Latest Chrome and webkits Fix
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
r = i.WebKitCSSMatrix ? o.m42 : 16 === n.length ? parseFloat(n[13]) : parseFloat(n[5])),
|
|
144
|
+
r || 0;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
function isObject(e) {
|
|
@@ -151,15 +151,15 @@ function isObject(e) {
|
|
|
151
151
|
function extend(...e) {
|
|
152
152
|
const t = Object(e[0]);
|
|
153
153
|
for (let n = 1; n < e.length; n += 1) {
|
|
154
|
-
const
|
|
155
|
-
if (null !=
|
|
154
|
+
const r = e[n];
|
|
155
|
+
if (null != r && (i = r, !(
|
|
156
156
|
// eslint-disable-next-line
|
|
157
157
|
"undefined" != typeof window && void 0 !== window.HTMLElement ? i instanceof HTMLElement : i && (1 === i.nodeType || 11 === i.nodeType)))) {
|
|
158
|
-
const e = Object.keys(Object(
|
|
158
|
+
const e = Object.keys(Object(r)).filter((e => "__proto__" !== e && "constructor" !== e && "prototype" !== e));
|
|
159
159
|
for (let i = 0, n = e.length; i < n; i += 1) {
|
|
160
|
-
const n = e[i],
|
|
161
|
-
void 0 !==
|
|
162
|
-
|
|
160
|
+
const n = e[i], o = Object.getOwnPropertyDescriptor(r, n);
|
|
161
|
+
void 0 !== o && o.enumerable && (isObject(t[n]) && isObject(r[n]) ? r[n].__swiper__ ? t[n] = r[n] : extend(t[n], r[n]) : !isObject(t[n]) && isObject(r[n]) ? (t[n] = {},
|
|
162
|
+
r[n].__swiper__ ? t[n] = r[n] : extend(t[n], r[n])) : t[n] = r[n]);
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
}
|
|
@@ -172,14 +172,14 @@ function setCSSProperty(e, t, i) {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
function animateCSSModeScroll({swiper: e, targetPosition: t, side: i}) {
|
|
175
|
-
const n = getWindow(),
|
|
176
|
-
let
|
|
175
|
+
const n = getWindow(), r = -e.translate;
|
|
176
|
+
let o, a = null;
|
|
177
177
|
const s = e.params.speed;
|
|
178
178
|
e.wrapperEl.style.scrollSnapType = "none", n.cancelAnimationFrame(e.cssModeFrameID);
|
|
179
|
-
const l = t >
|
|
180
|
-
|
|
181
|
-
const l = Math.max(Math.min((
|
|
182
|
-
let d =
|
|
179
|
+
const l = t > r ? "next" : "prev", isOutOfBound = (e, t) => "next" === l && e >= t || "prev" === l && e <= t, animate = () => {
|
|
180
|
+
o = (new Date).getTime(), null === a && (a = o);
|
|
181
|
+
const l = Math.max(Math.min((o - a) / s, 1), 0), c = .5 - Math.cos(l * Math.PI) / 2;
|
|
182
|
+
let d = r + c * (t - r);
|
|
183
183
|
if (isOutOfBound(d, t) && (d = t), e.wrapperEl.scrollTo({
|
|
184
184
|
[i]: d
|
|
185
185
|
}), isOutOfBound(d, t)) return e.wrapperEl.style.overflow = "hidden", e.wrapperEl.style.scrollSnapType = "",
|
|
@@ -246,21 +246,21 @@ function getSupport() {
|
|
|
246
246
|
|
|
247
247
|
function getDevice(e = {}) {
|
|
248
248
|
return w || (w = function({userAgent: e} = {}) {
|
|
249
|
-
const t = getSupport(), i = getWindow(), n = i.navigator.platform,
|
|
249
|
+
const t = getSupport(), i = getWindow(), n = i.navigator.platform, r = e || i.navigator.userAgent, o = {
|
|
250
250
|
ios: !1,
|
|
251
251
|
android: !1
|
|
252
|
-
}, a = i.screen.width, s = i.screen.height, l =
|
|
252
|
+
}, a = i.screen.width, s = i.screen.height, l = r.match(/(Android);?[\s\/]+([\d.]+)?/);
|
|
253
253
|
// eslint-disable-line
|
|
254
|
-
let c =
|
|
255
|
-
const d =
|
|
254
|
+
let c = r.match(/(iPad)(?!\1).*OS\s([\d_]+)/);
|
|
255
|
+
const d = r.match(/(iPod)(.*OS\s([\d_]+))?/), u = !c && r.match(/(iPhone\sOS|iOS)\s([\d_]+)/), p = "Win32" === n;
|
|
256
256
|
let h = "MacIntel" === n;
|
|
257
257
|
// iPadOs 13 fix
|
|
258
258
|
// Export object
|
|
259
|
-
return !c && h && t.touch && [ "1024x1366", "1366x1024", "834x1194", "1194x834", "834x1112", "1112x834", "768x1024", "1024x768", "820x1180", "1180x820", "810x1080", "1080x810" ].indexOf(`${a}x${s}`) >= 0 && (c =
|
|
259
|
+
return !c && h && t.touch && [ "1024x1366", "1366x1024", "834x1194", "1194x834", "834x1112", "1112x834", "768x1024", "1024x768", "820x1180", "1180x820", "810x1080", "1080x810" ].indexOf(`${a}x${s}`) >= 0 && (c = r.match(/(Version)\/([\d.]+)/),
|
|
260
260
|
c || (c = [ 0, 1, "13_0_0" ]), h = !1),
|
|
261
261
|
// Android
|
|
262
|
-
l && !p && (
|
|
263
|
-
|
|
262
|
+
l && !p && (o.os = "android", o.android = !0), (c || u || d) && (o.os = "ios", o.ios = !0),
|
|
263
|
+
o;
|
|
264
264
|
}(e)), w;
|
|
265
265
|
}
|
|
266
266
|
|
|
@@ -279,11 +279,11 @@ function getBrowser() {
|
|
|
279
279
|
i = e < 16 || 16 === e && n < 2;
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
|
-
const n = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),
|
|
282
|
+
const n = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent), r = isSafari();
|
|
283
283
|
return {
|
|
284
|
-
isSafari: i ||
|
|
284
|
+
isSafari: i || r,
|
|
285
285
|
needPerspectiveFix: i,
|
|
286
|
-
need3dFix:
|
|
286
|
+
need3dFix: r || n && t.ios,
|
|
287
287
|
isWebView: n
|
|
288
288
|
};
|
|
289
289
|
}()), b;
|
|
@@ -295,9 +295,9 @@ var x = {
|
|
|
295
295
|
const n = this;
|
|
296
296
|
if (!n.eventsListeners || n.destroyed) return n;
|
|
297
297
|
if ("function" != typeof t) return n;
|
|
298
|
-
const
|
|
298
|
+
const r = i ? "unshift" : "push";
|
|
299
299
|
return e.split(" ").forEach((e => {
|
|
300
|
-
n.eventsListeners[e] || (n.eventsListeners[e] = []), n.eventsListeners[e][
|
|
300
|
+
n.eventsListeners[e] || (n.eventsListeners[e] = []), n.eventsListeners[e][r](t);
|
|
301
301
|
})), n;
|
|
302
302
|
},
|
|
303
303
|
once(e, t, i) {
|
|
@@ -327,8 +327,8 @@ var x = {
|
|
|
327
327
|
off(e, t) {
|
|
328
328
|
const i = this;
|
|
329
329
|
return !i.eventsListeners || i.destroyed ? i : i.eventsListeners ? (e.split(" ").forEach((e => {
|
|
330
|
-
void 0 === t ? i.eventsListeners[e] = [] : i.eventsListeners[e] && i.eventsListeners[e].forEach(((n,
|
|
331
|
-
(n === t || n.__emitterProxy && n.__emitterProxy === t) && i.eventsListeners[e].splice(
|
|
330
|
+
void 0 === t ? i.eventsListeners[e] = [] : i.eventsListeners[e] && i.eventsListeners[e].forEach(((n, r) => {
|
|
331
|
+
(n === t || n.__emitterProxy && n.__emitterProxy === t) && i.eventsListeners[e].splice(r, 1);
|
|
332
332
|
}));
|
|
333
333
|
})), i) : i;
|
|
334
334
|
},
|
|
@@ -336,14 +336,14 @@ var x = {
|
|
|
336
336
|
const t = this;
|
|
337
337
|
if (!t.eventsListeners || t.destroyed) return t;
|
|
338
338
|
if (!t.eventsListeners) return t;
|
|
339
|
-
let i, n,
|
|
339
|
+
let i, n, r;
|
|
340
340
|
"string" == typeof e[0] || Array.isArray(e[0]) ? (i = e[0], n = e.slice(1, e.length),
|
|
341
|
-
|
|
341
|
+
r = t) : (i = e[0].events, n = e[0].data, r = e[0].context || t), n.unshift(r);
|
|
342
342
|
return (Array.isArray(i) ? i : i.split(" ")).forEach((e => {
|
|
343
343
|
t.eventsAnyListeners && t.eventsAnyListeners.length && t.eventsAnyListeners.forEach((t => {
|
|
344
|
-
t.apply(
|
|
344
|
+
t.apply(r, [ e, ...n ]);
|
|
345
345
|
})), t.eventsListeners && t.eventsListeners[e] && t.eventsListeners[e].forEach((e => {
|
|
346
|
-
e.apply(
|
|
346
|
+
e.apply(r, n);
|
|
347
347
|
}));
|
|
348
348
|
})), t;
|
|
349
349
|
}
|
|
@@ -381,20 +381,20 @@ const processLazyPreloader = (e, t) => {
|
|
|
381
381
|
const i = e.slides.length;
|
|
382
382
|
if (!i || !t || t < 0) return;
|
|
383
383
|
t = Math.min(t, i);
|
|
384
|
-
const n = "auto" === e.params.slidesPerView ? e.slidesPerViewDynamic() : Math.ceil(e.params.slidesPerView),
|
|
384
|
+
const n = "auto" === e.params.slidesPerView ? e.slidesPerViewDynamic() : Math.ceil(e.params.slidesPerView), r = e.activeIndex;
|
|
385
385
|
if (e.params.grid && e.params.grid.rows > 1) {
|
|
386
|
-
const i =
|
|
387
|
-
return
|
|
386
|
+
const i = r, o = [ i - t ];
|
|
387
|
+
return o.push(...Array.from({
|
|
388
388
|
length: t
|
|
389
389
|
}).map(((e, t) => i + n + t))), void e.slides.forEach(((t, i) => {
|
|
390
|
-
|
|
390
|
+
o.includes(t.column) && unlazy(e, i);
|
|
391
391
|
}));
|
|
392
392
|
}
|
|
393
|
-
const
|
|
394
|
-
if (e.params.rewind || e.params.loop) for (let n =
|
|
393
|
+
const o = r + n - 1;
|
|
394
|
+
if (e.params.rewind || e.params.loop) for (let n = r - t; n <= o + t; n += 1) {
|
|
395
395
|
const t = (n % i + i) % i;
|
|
396
|
-
(t <
|
|
397
|
-
} else for (let n = Math.max(
|
|
396
|
+
(t < r || t > o) && unlazy(e, t);
|
|
397
|
+
} else for (let n = Math.max(r - t, 0); n <= Math.min(o + t, i - 1); n += 1) n !== r && (n > o || n < r) && unlazy(e, n);
|
|
398
398
|
};
|
|
399
399
|
|
|
400
400
|
var y = {
|
|
@@ -419,7 +419,7 @@ var y = {
|
|
|
419
419
|
function getDirectionPropertyValue(t, i) {
|
|
420
420
|
return parseFloat(t.getPropertyValue(e.getDirectionLabel(i)) || 0);
|
|
421
421
|
}
|
|
422
|
-
const t = e.params, {wrapperEl: i, slidesEl: n, rtlTranslate:
|
|
422
|
+
const t = e.params, {wrapperEl: i, slidesEl: n, rtlTranslate: r, wrongRTL: o} = e, a = e.virtual && t.virtual.enabled, s = a ? e.virtual.slides.length : e.slides.length, l = elementChildren(n, `.${e.params.slideClass}, swiper-slide`), c = a ? e.virtual.slides.length : l.length;
|
|
423
423
|
let d = [];
|
|
424
424
|
const u = [], p = [];
|
|
425
425
|
let h = t.slidesOffsetBefore;
|
|
@@ -433,7 +433,7 @@ var y = {
|
|
|
433
433
|
e.virtualSize = -w - h - f,
|
|
434
434
|
// reset margins
|
|
435
435
|
l.forEach((e => {
|
|
436
|
-
|
|
436
|
+
r ? e.style.marginLeft = "" : e.style.marginRight = "", e.style.marginBottom = "",
|
|
437
437
|
e.style.marginTop = "";
|
|
438
438
|
})),
|
|
439
439
|
// reset cssMode offsets
|
|
@@ -453,17 +453,17 @@ var y = {
|
|
|
453
453
|
if (a && "auto" === t.slidesPerView) t.virtual.slidesPerViewAutoSlideSize && (q = t.virtual.slidesPerViewAutoSlideSize),
|
|
454
454
|
q && n && (t.roundLengths && (q = Math.floor(q)), n.style[e.getDirectionLabel("width")] = `${q}px`); else if ("auto" === t.slidesPerView) {
|
|
455
455
|
M && (n.style[e.getDirectionLabel("width")] = "");
|
|
456
|
-
const i = getComputedStyle(n),
|
|
457
|
-
if (
|
|
456
|
+
const i = getComputedStyle(n), r = n.style.transform, o = n.style.webkitTransform;
|
|
457
|
+
if (r && (n.style.transform = "none"), o && (n.style.webkitTransform = "none"),
|
|
458
458
|
t.roundLengths) q = e.isHorizontal() ? elementOuterSize(n, "width") : elementOuterSize(n, "height"); else {
|
|
459
459
|
// eslint-disable-next-line
|
|
460
|
-
const e = getDirectionPropertyValue(i, "width"), t = getDirectionPropertyValue(i, "padding-left"),
|
|
461
|
-
if (s && "border-box" === s) q = e +
|
|
460
|
+
const e = getDirectionPropertyValue(i, "width"), t = getDirectionPropertyValue(i, "padding-left"), r = getDirectionPropertyValue(i, "padding-right"), o = getDirectionPropertyValue(i, "margin-left"), a = getDirectionPropertyValue(i, "margin-right"), s = i.getPropertyValue("box-sizing");
|
|
461
|
+
if (s && "border-box" === s) q = e + o + a; else {
|
|
462
462
|
const {clientWidth: i, offsetWidth: s} = n;
|
|
463
|
-
q = e + t +
|
|
463
|
+
q = e + t + r + o + a + (s - i);
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
|
|
466
|
+
r && (n.style.transform = r), o && (n.style.webkitTransform = o), t.roundLengths && (q = Math.floor(q));
|
|
467
467
|
} else q = (m - (t.slidesPerView - 1) * w) / t.slidesPerView, t.roundLengths && (q = Math.floor(q)),
|
|
468
468
|
n && (n.style[e.getDirectionLabel("width")] = `${q}px`);
|
|
469
469
|
n && (n.swiperSlideSize = q), p.push(q), t.centeredSlides ? (b = b + q / 2 + x / 2 + w,
|
|
@@ -474,14 +474,14 @@ var y = {
|
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
476
|
// Remove last grid elements depending on width
|
|
477
|
-
if (e.virtualSize = Math.max(e.virtualSize, m) + f,
|
|
477
|
+
if (e.virtualSize = Math.max(e.virtualSize, m) + f, r && o && ("slide" === t.effect || "coverflow" === t.effect) && (i.style.width = `${e.virtualSize + w}px`),
|
|
478
478
|
t.setWrapperSize && (i.style[e.getDirectionLabel("width")] = `${e.virtualSize + w}px`),
|
|
479
479
|
S && e.grid.updateWrapperSize(q, d), !t.centeredSlides) {
|
|
480
480
|
// Check if snapToSlideEdge should be applied
|
|
481
481
|
const i = "auto" !== t.slidesPerView && t.slidesPerView % 1 != 0, n = t.snapToSlideEdge && !t.loop && ("auto" === t.slidesPerView || i);
|
|
482
482
|
// Calculate the last allowed snap index when snapToSlideEdge is enabled
|
|
483
483
|
// This ensures minimum slides are visible at the end
|
|
484
|
-
let
|
|
484
|
+
let r = d.length;
|
|
485
485
|
if (n) {
|
|
486
486
|
let e;
|
|
487
487
|
if ("auto" === t.slidesPerView) {
|
|
@@ -490,32 +490,32 @@ var y = {
|
|
|
490
490
|
let t = 0;
|
|
491
491
|
for (let i = p.length - 1; i >= 0 && (t += p[i] + (i < p.length - 1 ? w : 0), t <= m); i -= 1) e = p.length - i;
|
|
492
492
|
} else e = Math.floor(t.slidesPerView);
|
|
493
|
-
|
|
493
|
+
r = Math.max(c - e, 0);
|
|
494
494
|
}
|
|
495
|
-
const
|
|
495
|
+
const o = [];
|
|
496
496
|
for (let i = 0; i < d.length; i += 1) {
|
|
497
497
|
let a = d[i];
|
|
498
498
|
t.roundLengths && (a = Math.floor(a)), n ?
|
|
499
499
|
// When snapToSlideEdge is enabled, only keep snaps up to lastAllowedSnapIndex
|
|
500
|
-
i <=
|
|
500
|
+
i <= r && o.push(a) : d[i] <= e.virtualSize - m &&
|
|
501
501
|
// When snapToSlideEdge is disabled, keep snaps that fit within scrollable area
|
|
502
|
-
|
|
502
|
+
o.push(a);
|
|
503
503
|
}
|
|
504
|
-
d =
|
|
504
|
+
d = o, Math.floor(e.virtualSize - m) - Math.floor(d[d.length - 1]) > 1 && (
|
|
505
505
|
// Only add edge-aligned snap if snapToSlideEdge is not enabled
|
|
506
506
|
n || d.push(e.virtualSize - m));
|
|
507
507
|
}
|
|
508
508
|
if (a && t.loop) {
|
|
509
509
|
const i = p[0] + w;
|
|
510
510
|
if (t.slidesPerGroup > 1) {
|
|
511
|
-
const n = Math.ceil((e.virtual.slidesBefore + e.virtual.slidesAfter) / t.slidesPerGroup),
|
|
512
|
-
for (let e = 0; e < n; e += 1) d.push(d[d.length - 1] +
|
|
511
|
+
const n = Math.ceil((e.virtual.slidesBefore + e.virtual.slidesAfter) / t.slidesPerGroup), r = i * t.slidesPerGroup;
|
|
512
|
+
for (let e = 0; e < n; e += 1) d.push(d[d.length - 1] + r);
|
|
513
513
|
}
|
|
514
514
|
for (let n = 0; n < e.virtual.slidesBefore + e.virtual.slidesAfter; n += 1) 1 === t.slidesPerGroup && d.push(d[d.length - 1] + i),
|
|
515
515
|
u.push(u[u.length - 1] + i), e.virtualSize += i;
|
|
516
516
|
}
|
|
517
517
|
if (0 === d.length && (d = [ 0 ]), 0 !== w) {
|
|
518
|
-
const i = e.isHorizontal() &&
|
|
518
|
+
const i = e.isHorizontal() && r ? "marginLeft" : e.getDirectionLabel("marginRight");
|
|
519
519
|
l.filter(((e, i) => !(t.cssMode && !t.loop) || i !== l.length - 1)).forEach((e => {
|
|
520
520
|
e.style[i] = `${w}px`;
|
|
521
521
|
}));
|
|
@@ -560,44 +560,44 @@ var y = {
|
|
|
560
560
|
},
|
|
561
561
|
updateAutoHeight: function(e) {
|
|
562
562
|
const t = this, i = [], n = t.virtual && t.params.virtual.enabled;
|
|
563
|
-
let
|
|
563
|
+
let r, o = 0;
|
|
564
564
|
"number" == typeof e ? t.setTransition(e) : !0 === e && t.setTransition(t.params.speed);
|
|
565
565
|
const getSlideByIndex = e => n ? t.slides[t.getSlideIndexByData(e)] : t.slides[e];
|
|
566
566
|
// Find slides currently in view
|
|
567
567
|
if ("auto" !== t.params.slidesPerView && t.params.slidesPerView > 1) if (t.params.centeredSlides) (t.visibleSlides || []).forEach((e => {
|
|
568
568
|
i.push(e);
|
|
569
|
-
})); else for (
|
|
570
|
-
const e = t.activeIndex +
|
|
569
|
+
})); else for (r = 0; r < Math.ceil(t.params.slidesPerView); r += 1) {
|
|
570
|
+
const e = t.activeIndex + r;
|
|
571
571
|
if (e > t.slides.length && !n) break;
|
|
572
572
|
i.push(getSlideByIndex(e));
|
|
573
573
|
} else i.push(getSlideByIndex(t.activeIndex));
|
|
574
574
|
// Find new height from highest slide in view
|
|
575
|
-
for (
|
|
576
|
-
const e = i[
|
|
577
|
-
|
|
575
|
+
for (r = 0; r < i.length; r += 1) if (void 0 !== i[r]) {
|
|
576
|
+
const e = i[r].offsetHeight;
|
|
577
|
+
o = e > o ? e : o;
|
|
578
578
|
}
|
|
579
579
|
// Update Height
|
|
580
|
-
(
|
|
580
|
+
(o || 0 === o) && (t.wrapperEl.style.height = `${o}px`);
|
|
581
581
|
},
|
|
582
582
|
updateSlidesOffset: function() {
|
|
583
583
|
const e = this, t = e.slides, i = e.isElement ? e.isHorizontal() ? e.wrapperEl.offsetLeft : e.wrapperEl.offsetTop : 0;
|
|
584
584
|
for (let n = 0; n < t.length; n += 1) t[n].swiperSlideOffset = (e.isHorizontal() ? t[n].offsetLeft : t[n].offsetTop) - i - e.cssOverflowAdjustment();
|
|
585
585
|
},
|
|
586
586
|
updateSlidesProgress: function(e = this && this.translate || 0) {
|
|
587
|
-
const t = this, i = t.params, {slides: n, rtlTranslate:
|
|
587
|
+
const t = this, i = t.params, {slides: n, rtlTranslate: r, snapGrid: o} = t;
|
|
588
588
|
if (0 === n.length) return;
|
|
589
589
|
void 0 === n[0].swiperSlideOffset && t.updateSlidesOffset();
|
|
590
590
|
let a = -e;
|
|
591
|
-
|
|
591
|
+
r && (a = e), t.visibleSlidesIndexes = [], t.visibleSlides = [];
|
|
592
592
|
let s = i.spaceBetween;
|
|
593
593
|
"string" == typeof s && s.indexOf("%") >= 0 ? s = parseFloat(s.replace("%", "")) / 100 * t.size : "string" == typeof s && (s = parseFloat(s));
|
|
594
594
|
for (let e = 0; e < n.length; e += 1) {
|
|
595
595
|
const l = n[e];
|
|
596
596
|
let c = l.swiperSlideOffset;
|
|
597
597
|
i.cssMode && i.centeredSlides && (c -= n[0].swiperSlideOffset);
|
|
598
|
-
const d = (a + (i.centeredSlides ? t.minTranslate() : 0) - c) / (l.swiperSlideSize + s), u = (a -
|
|
598
|
+
const d = (a + (i.centeredSlides ? t.minTranslate() : 0) - c) / (l.swiperSlideSize + s), u = (a - o[0] + (i.centeredSlides ? t.minTranslate() : 0) - c) / (l.swiperSlideSize + s), p = -(a - c), h = p + t.slidesSizesGrid[e], f = p >= 0 && p <= t.size - t.slidesSizesGrid[e], v = p >= 0 && p < t.size - 1 || h > 1 && h <= t.size || p <= 0 && h >= t.size;
|
|
599
599
|
v && (t.visibleSlides.push(l), t.visibleSlidesIndexes.push(e)), toggleSlideClasses$1(l, v, i.slideVisibleClass),
|
|
600
|
-
toggleSlideClasses$1(l, f, i.slideFullyVisibleClass), l.progress =
|
|
600
|
+
toggleSlideClasses$1(l, f, i.slideFullyVisibleClass), l.progress = r ? -d : d, l.originalProgress = r ? -u : u;
|
|
601
601
|
}
|
|
602
602
|
},
|
|
603
603
|
updateProgress: function(e) {
|
|
@@ -608,35 +608,35 @@ var y = {
|
|
|
608
608
|
e = t && t.translate && t.translate * i || 0;
|
|
609
609
|
}
|
|
610
610
|
const i = t.params, n = t.maxTranslate() - t.minTranslate();
|
|
611
|
-
let {progress:
|
|
612
|
-
const l =
|
|
613
|
-
if (0 === n)
|
|
614
|
-
|
|
611
|
+
let {progress: r, isBeginning: o, isEnd: a, progressLoop: s} = t;
|
|
612
|
+
const l = o, c = a;
|
|
613
|
+
if (0 === n) r = 0, o = !0, a = !0; else {
|
|
614
|
+
r = (e - t.minTranslate()) / n;
|
|
615
615
|
const i = Math.abs(e - t.minTranslate()) < 1, s = Math.abs(e - t.maxTranslate()) < 1;
|
|
616
|
-
|
|
616
|
+
o = i || r <= 0, a = s || r >= 1, i && (r = 0), s && (r = 1);
|
|
617
617
|
}
|
|
618
618
|
if (i.loop) {
|
|
619
|
-
const i = t.getSlideIndexByData(0), n = t.getSlideIndexByData(t.slides.length - 1),
|
|
620
|
-
s = l >=
|
|
619
|
+
const i = t.getSlideIndexByData(0), n = t.getSlideIndexByData(t.slides.length - 1), r = t.slidesGrid[i], o = t.slidesGrid[n], a = t.slidesGrid[t.slidesGrid.length - 1], l = Math.abs(e);
|
|
620
|
+
s = l >= r ? (l - r) / a : (l + a - o) / a, s > 1 && (s -= 1);
|
|
621
621
|
}
|
|
622
622
|
Object.assign(t, {
|
|
623
|
-
progress:
|
|
623
|
+
progress: r,
|
|
624
624
|
progressLoop: s,
|
|
625
|
-
isBeginning:
|
|
625
|
+
isBeginning: o,
|
|
626
626
|
isEnd: a
|
|
627
627
|
}), (i.watchSlidesProgress || i.centeredSlides && i.autoHeight) && t.updateSlidesProgress(e),
|
|
628
|
-
|
|
629
|
-
(l && !
|
|
628
|
+
o && !l && t.emit("reachBeginning toEdge"), a && !c && t.emit("reachEnd toEdge"),
|
|
629
|
+
(l && !o || c && !a) && t.emit("fromEdge"), t.emit("progress", r);
|
|
630
630
|
},
|
|
631
631
|
updateSlidesClasses: function() {
|
|
632
|
-
const e = this, {slides: t, params: i, slidesEl: n, activeIndex:
|
|
632
|
+
const e = this, {slides: t, params: i, slidesEl: n, activeIndex: r} = e, o = e.virtual && i.virtual.enabled, a = e.grid && i.grid && i.grid.rows > 1, getFilteredSlide = e => elementChildren(n, `.${i.slideClass}${e}, swiper-slide${e}`)[0];
|
|
633
633
|
let s, l, c;
|
|
634
|
-
if (
|
|
635
|
-
let t =
|
|
634
|
+
if (o) if (i.loop) {
|
|
635
|
+
let t = r - e.virtual.slidesBefore;
|
|
636
636
|
t < 0 && (t = e.virtual.slides.length + t), t >= e.virtual.slides.length && (t -= e.virtual.slides.length),
|
|
637
637
|
s = getFilteredSlide(`[data-swiper-slide-index="${t}"]`);
|
|
638
|
-
} else s = getFilteredSlide(`[data-swiper-slide-index="${
|
|
639
|
-
c = t.find((e => e.column ===
|
|
638
|
+
} else s = getFilteredSlide(`[data-swiper-slide-index="${r}"]`); else a ? (s = t.find((e => e.column === r)),
|
|
639
|
+
c = t.find((e => e.column === r + 1)), l = t.find((e => e.column === r - 1))) : s = t[r];
|
|
640
640
|
s && (a || (
|
|
641
641
|
// Next Slide
|
|
642
642
|
c = function(e, t) {
|
|
@@ -664,7 +664,7 @@ var y = {
|
|
|
664
664
|
})), e.emitSlidesClasses();
|
|
665
665
|
},
|
|
666
666
|
updateActiveIndex: function(e) {
|
|
667
|
-
const t = this, i = t.rtlTranslate ? t.translate : -t.translate, {snapGrid: n, params:
|
|
667
|
+
const t = this, i = t.rtlTranslate ? t.translate : -t.translate, {snapGrid: n, params: r, activeIndex: o, realIndex: a, snapIndex: s} = t;
|
|
668
668
|
let l, c = e;
|
|
669
669
|
const getVirtualRealIndex = e => {
|
|
670
670
|
let i = e - t.virtual.slidesBefore;
|
|
@@ -673,24 +673,24 @@ var y = {
|
|
|
673
673
|
};
|
|
674
674
|
if (void 0 === c && (c = function(e) {
|
|
675
675
|
const {slidesGrid: t, params: i} = e, n = e.rtlTranslate ? e.translate : -e.translate;
|
|
676
|
-
let
|
|
677
|
-
for (let e = 0; e < t.length; e += 1) void 0 !== t[e + 1] ? n >= t[e] && n < t[e + 1] - (t[e + 1] - t[e]) / 2 ?
|
|
676
|
+
let r;
|
|
677
|
+
for (let e = 0; e < t.length; e += 1) void 0 !== t[e + 1] ? n >= t[e] && n < t[e + 1] - (t[e + 1] - t[e]) / 2 ? r = e : n >= t[e] && n < t[e + 1] && (r = e + 1) : n >= t[e] && (r = e);
|
|
678
678
|
// Normalize slideIndex
|
|
679
|
-
return i.normalizeSlideIndex && (
|
|
679
|
+
return i.normalizeSlideIndex && (r < 0 || void 0 === r) && (r = 0), r;
|
|
680
680
|
}(t)), n.indexOf(i) >= 0) l = n.indexOf(i); else {
|
|
681
|
-
const e = Math.min(
|
|
682
|
-
l = e + Math.floor((c - e) /
|
|
681
|
+
const e = Math.min(r.slidesPerGroupSkip, c);
|
|
682
|
+
l = e + Math.floor((c - e) / r.slidesPerGroup);
|
|
683
683
|
}
|
|
684
|
-
if (l >= n.length && (l = n.length - 1), c ===
|
|
684
|
+
if (l >= n.length && (l = n.length - 1), c === o && !t.params.loop) return void (l !== s && (t.snapIndex = l,
|
|
685
685
|
t.emit("snapIndexChange")));
|
|
686
|
-
if (c ===
|
|
687
|
-
const d = t.grid &&
|
|
686
|
+
if (c === o && t.params.loop && t.virtual && t.params.virtual.enabled) return void (t.realIndex = getVirtualRealIndex(c));
|
|
687
|
+
const d = t.grid && r.grid && r.grid.rows > 1;
|
|
688
688
|
// Get real index
|
|
689
689
|
let u;
|
|
690
|
-
if (t.virtual &&
|
|
690
|
+
if (t.virtual && r.virtual.enabled) u = r.loop ? getVirtualRealIndex(c) : c; else if (d) {
|
|
691
691
|
const e = t.slides.find((e => e.column === c));
|
|
692
692
|
let i = parseInt(e.getAttribute("data-swiper-slide-index"), 10);
|
|
693
|
-
Number.isNaN(i) && (i = Math.max(t.slides.indexOf(e), 0)), u = Math.floor(i /
|
|
693
|
+
Number.isNaN(i) && (i = Math.max(t.slides.indexOf(e), 0)), u = Math.floor(i / r.grid.rows);
|
|
694
694
|
} else if (t.slides[c]) {
|
|
695
695
|
const e = t.slides[c].getAttribute("data-swiper-slide-index");
|
|
696
696
|
u = e ? parseInt(e, 10) : c;
|
|
@@ -700,7 +700,7 @@ var y = {
|
|
|
700
700
|
snapIndex: l,
|
|
701
701
|
previousRealIndex: a,
|
|
702
702
|
realIndex: u,
|
|
703
|
-
previousIndex:
|
|
703
|
+
previousIndex: o,
|
|
704
704
|
activeIndex: c
|
|
705
705
|
}), t.initialized && preload(t), t.emit("activeIndexChange"), t.emit("snapIndexChange"),
|
|
706
706
|
(t.initialized || t.params.runCallbacksOnInit) && (a !== u && t.emit("realIndexChange"),
|
|
@@ -708,36 +708,36 @@ var y = {
|
|
|
708
708
|
},
|
|
709
709
|
updateClickedSlide: function(e, t) {
|
|
710
710
|
const i = this, n = i.params;
|
|
711
|
-
let
|
|
712
|
-
!
|
|
713
|
-
!
|
|
711
|
+
let r = e.closest(`.${n.slideClass}, swiper-slide`);
|
|
712
|
+
!r && i.isElement && t && t.length > 1 && t.includes(e) && [ ...t.slice(t.indexOf(e) + 1, t.length) ].forEach((e => {
|
|
713
|
+
!r && e.matches && e.matches(`.${n.slideClass}, swiper-slide`) && (r = e);
|
|
714
714
|
}));
|
|
715
|
-
let
|
|
716
|
-
if (
|
|
717
|
-
a = !0,
|
|
715
|
+
let o, a = !1;
|
|
716
|
+
if (r) for (let e = 0; e < i.slides.length; e += 1) if (i.slides[e] === r) {
|
|
717
|
+
a = !0, o = e;
|
|
718
718
|
break;
|
|
719
719
|
}
|
|
720
|
-
if (!
|
|
721
|
-
i.clickedSlide =
|
|
720
|
+
if (!r || !a) return i.clickedSlide = void 0, void (i.clickedIndex = void 0);
|
|
721
|
+
i.clickedSlide = r, i.virtual && i.params.virtual.enabled ? i.clickedIndex = parseInt(r.getAttribute("data-swiper-slide-index"), 10) : i.clickedIndex = o,
|
|
722
722
|
n.slideToClickedSlide && void 0 !== i.clickedIndex && i.clickedIndex !== i.activeIndex && i.slideToClickedSlide();
|
|
723
723
|
}
|
|
724
724
|
};
|
|
725
725
|
|
|
726
726
|
var S = {
|
|
727
727
|
getTranslate: function(e = (this.isHorizontal() ? "x" : "y")) {
|
|
728
|
-
const {params: t, rtlTranslate: i, translate: n, wrapperEl:
|
|
728
|
+
const {params: t, rtlTranslate: i, translate: n, wrapperEl: r} = this;
|
|
729
729
|
if (t.virtualTranslate) return i ? -n : n;
|
|
730
730
|
if (t.cssMode) return n;
|
|
731
|
-
let
|
|
732
|
-
return
|
|
731
|
+
let o = getTranslate(r, e);
|
|
732
|
+
return o += this.cssOverflowAdjustment(), i && (o = -o), o || 0;
|
|
733
733
|
},
|
|
734
734
|
setTranslate: function(e, t) {
|
|
735
|
-
const i = this, {rtlTranslate: n, params:
|
|
735
|
+
const i = this, {rtlTranslate: n, params: r, wrapperEl: o, progress: a} = i;
|
|
736
736
|
let s, l = 0, c = 0;
|
|
737
|
-
i.isHorizontal() ? l = n ? -e : e : c = e,
|
|
737
|
+
i.isHorizontal() ? l = n ? -e : e : c = e, r.roundLengths && (l = Math.floor(l),
|
|
738
738
|
c = Math.floor(c)), i.previousTranslate = i.translate, i.translate = i.isHorizontal() ? l : c,
|
|
739
|
-
|
|
740
|
-
|
|
739
|
+
r.cssMode ? o[i.isHorizontal() ? "scrollLeft" : "scrollTop"] = i.isHorizontal() ? -l : -c : r.virtualTranslate || (i.isHorizontal() ? l -= i.cssOverflowAdjustment() : c -= i.cssOverflowAdjustment(),
|
|
740
|
+
o.style.transform = `translate3d(${l}px, ${c}px, 0px)`);
|
|
741
741
|
const d = i.maxTranslate() - i.minTranslate();
|
|
742
742
|
s = 0 === d ? 0 : (e - i.minTranslate()) / d, s !== a && i.updateProgress(e), i.emit("setTranslate", i.translate, t);
|
|
743
743
|
},
|
|
@@ -747,18 +747,18 @@ var S = {
|
|
|
747
747
|
maxTranslate: function() {
|
|
748
748
|
return -this.snapGrid[this.snapGrid.length - 1];
|
|
749
749
|
},
|
|
750
|
-
translateTo: function(e = 0, t = this.params.speed, i = !0, n = !0,
|
|
751
|
-
const
|
|
752
|
-
if (
|
|
753
|
-
const l =
|
|
750
|
+
translateTo: function(e = 0, t = this.params.speed, i = !0, n = !0, r) {
|
|
751
|
+
const o = this, {params: a, wrapperEl: s} = o;
|
|
752
|
+
if (o.animating && a.preventInteractionOnTransition) return !1;
|
|
753
|
+
const l = o.minTranslate(), c = o.maxTranslate();
|
|
754
754
|
let d;
|
|
755
755
|
if (d = n && e > l ? l : n && e < c ? c : e,
|
|
756
756
|
// Update progress
|
|
757
|
-
|
|
758
|
-
const e =
|
|
757
|
+
o.updateProgress(d), a.cssMode) {
|
|
758
|
+
const e = o.isHorizontal();
|
|
759
759
|
if (0 === t) s[e ? "scrollLeft" : "scrollTop"] = -d; else {
|
|
760
|
-
if (!
|
|
761
|
-
swiper:
|
|
760
|
+
if (!o.support.smoothScroll) return animateCSSModeScroll({
|
|
761
|
+
swiper: o,
|
|
762
762
|
targetPosition: -d,
|
|
763
763
|
side: e ? "left" : "top"
|
|
764
764
|
}), !0;
|
|
@@ -769,36 +769,36 @@ var S = {
|
|
|
769
769
|
}
|
|
770
770
|
return !0;
|
|
771
771
|
}
|
|
772
|
-
return 0 === t ? (
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
}),
|
|
772
|
+
return 0 === t ? (o.setTransition(0), o.setTranslate(d), i && (o.emit("beforeTransitionStart", t, r),
|
|
773
|
+
o.emit("transitionEnd"))) : (o.setTransition(t), o.setTranslate(d), i && (o.emit("beforeTransitionStart", t, r),
|
|
774
|
+
o.emit("transitionStart")), o.animating || (o.animating = !0, o.onTranslateToWrapperTransitionEnd || (o.onTranslateToWrapperTransitionEnd = function(e) {
|
|
775
|
+
o && !o.destroyed && e.target === this && (o.wrapperEl.removeEventListener("transitionend", o.onTranslateToWrapperTransitionEnd),
|
|
776
|
+
o.onTranslateToWrapperTransitionEnd = null, delete o.onTranslateToWrapperTransitionEnd,
|
|
777
|
+
o.animating = !1, i && o.emit("transitionEnd"));
|
|
778
|
+
}), o.wrapperEl.addEventListener("transitionend", o.onTranslateToWrapperTransitionEnd))),
|
|
779
779
|
!0;
|
|
780
780
|
}
|
|
781
781
|
};
|
|
782
782
|
|
|
783
783
|
function transitionEmit({swiper: e, runCallbacks: t, direction: i, step: n}) {
|
|
784
|
-
const {activeIndex:
|
|
784
|
+
const {activeIndex: r, previousIndex: o} = e;
|
|
785
785
|
let a = i;
|
|
786
|
-
a || (a =
|
|
787
|
-
t && "reset" === a ? e.emit(`slideResetTransition${n}`) : t &&
|
|
786
|
+
a || (a = r > o ? "next" : r < o ? "prev" : "reset"), e.emit(`transition${n}`),
|
|
787
|
+
t && "reset" === a ? e.emit(`slideResetTransition${n}`) : t && r !== o && (e.emit(`slideChangeTransition${n}`),
|
|
788
788
|
"next" === a ? e.emit(`slideNextTransition${n}`) : e.emit(`slidePrevTransition${n}`));
|
|
789
789
|
}
|
|
790
790
|
|
|
791
791
|
var q = {
|
|
792
|
-
slideTo: function(e = 0, t, i = !0, n,
|
|
792
|
+
slideTo: function(e = 0, t, i = !0, n, r) {
|
|
793
793
|
"string" == typeof e && (e = parseInt(e, 10));
|
|
794
|
-
const
|
|
794
|
+
const o = this;
|
|
795
795
|
let a = e;
|
|
796
796
|
a < 0 && (a = 0);
|
|
797
|
-
const {params: s, snapGrid: l, slidesGrid: c, previousIndex: d, activeIndex: u, rtlTranslate: p, wrapperEl: h, enabled: f} =
|
|
798
|
-
if (!f && !n && !
|
|
799
|
-
void 0 === t && (t =
|
|
800
|
-
const v = Math.min(
|
|
801
|
-
let g = v + Math.floor((a - v) /
|
|
797
|
+
const {params: s, snapGrid: l, slidesGrid: c, previousIndex: d, activeIndex: u, rtlTranslate: p, wrapperEl: h, enabled: f} = o;
|
|
798
|
+
if (!f && !n && !r || o.destroyed || o.animating && s.preventInteractionOnTransition) return !1;
|
|
799
|
+
void 0 === t && (t = o.params.speed);
|
|
800
|
+
const v = Math.min(o.params.slidesPerGroupSkip, a);
|
|
801
|
+
let g = v + Math.floor((a - v) / o.params.slidesPerGroup);
|
|
802
802
|
g >= l.length && (g = l.length - 1);
|
|
803
803
|
const m = -l[g];
|
|
804
804
|
// Normalize slideIndex
|
|
@@ -807,32 +807,32 @@ var q = {
|
|
|
807
807
|
void 0 !== c[e + 1] ? t >= i && t < n - (n - i) / 2 ? a = e : t >= i && t < n && (a = e + 1) : t >= i && (a = e);
|
|
808
808
|
}
|
|
809
809
|
// Directions locks
|
|
810
|
-
if (
|
|
811
|
-
if (!
|
|
812
|
-
if (!
|
|
810
|
+
if (o.initialized && a !== u) {
|
|
811
|
+
if (!o.allowSlideNext && (p ? m > o.translate && m > o.minTranslate() : m < o.translate && m < o.minTranslate())) return !1;
|
|
812
|
+
if (!o.allowSlidePrev && m > o.translate && m > o.maxTranslate() && (u || 0) !== a) return !1;
|
|
813
813
|
}
|
|
814
814
|
let w;
|
|
815
|
-
a !== (d || 0) && i &&
|
|
815
|
+
a !== (d || 0) && i && o.emit("beforeSlideChangeStart"),
|
|
816
816
|
// Update progress
|
|
817
|
-
|
|
817
|
+
o.updateProgress(m), w = a > u ? "next" : a < u ? "prev" : "reset";
|
|
818
818
|
// initial virtual
|
|
819
|
-
const b =
|
|
819
|
+
const b = o.virtual && o.params.virtual.enabled;
|
|
820
820
|
// Update Index
|
|
821
|
-
if (!(b &&
|
|
821
|
+
if (!(b && r) && (p && -m === o.translate || !p && m === o.translate)) return o.updateActiveIndex(a),
|
|
822
822
|
// Update Height
|
|
823
|
-
s.autoHeight &&
|
|
824
|
-
"reset" !== w && (
|
|
823
|
+
s.autoHeight && o.updateAutoHeight(), o.updateSlidesClasses(), "slide" !== s.effect && o.setTranslate(m),
|
|
824
|
+
"reset" !== w && (o.transitionStart(i, w), o.transitionEnd(i, w)), !1;
|
|
825
825
|
if (s.cssMode) {
|
|
826
|
-
const e =
|
|
827
|
-
if (0 === t) b && (
|
|
828
|
-
b && !
|
|
826
|
+
const e = o.isHorizontal(), i = p ? m : -m;
|
|
827
|
+
if (0 === t) b && (o.wrapperEl.style.scrollSnapType = "none", o._immediateVirtual = !0),
|
|
828
|
+
b && !o._cssModeVirtualInitialSet && o.params.initialSlide > 0 ? (o._cssModeVirtualInitialSet = !0,
|
|
829
829
|
requestAnimationFrame((() => {
|
|
830
830
|
h[e ? "scrollLeft" : "scrollTop"] = i;
|
|
831
831
|
}))) : h[e ? "scrollLeft" : "scrollTop"] = i, b && requestAnimationFrame((() => {
|
|
832
|
-
|
|
832
|
+
o.wrapperEl.style.scrollSnapType = "", o._immediateVirtual = !1;
|
|
833
833
|
})); else {
|
|
834
|
-
if (!
|
|
835
|
-
swiper:
|
|
834
|
+
if (!o.support.smoothScroll) return animateCSSModeScroll({
|
|
835
|
+
swiper: o,
|
|
836
836
|
targetPosition: i,
|
|
837
837
|
side: e ? "left" : "top"
|
|
838
838
|
}), !0;
|
|
@@ -844,85 +844,85 @@ var q = {
|
|
|
844
844
|
return !0;
|
|
845
845
|
}
|
|
846
846
|
const x = getBrowser().isSafari;
|
|
847
|
-
return b && !
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
}),
|
|
847
|
+
return b && !r && x && o.isElement && o.virtual.update(!1, !1, a), o.setTransition(t),
|
|
848
|
+
o.setTranslate(m), o.updateActiveIndex(a), o.updateSlidesClasses(), o.emit("beforeTransitionStart", t, n),
|
|
849
|
+
o.transitionStart(i, w), 0 === t ? o.transitionEnd(i, w) : o.animating || (o.animating = !0,
|
|
850
|
+
o.onSlideToWrapperTransitionEnd || (o.onSlideToWrapperTransitionEnd = function(e) {
|
|
851
|
+
o && !o.destroyed && e.target === this && (o.wrapperEl.removeEventListener("transitionend", o.onSlideToWrapperTransitionEnd),
|
|
852
|
+
o.onSlideToWrapperTransitionEnd = null, delete o.onSlideToWrapperTransitionEnd,
|
|
853
|
+
o.transitionEnd(i, w));
|
|
854
|
+
}), o.wrapperEl.addEventListener("transitionend", o.onSlideToWrapperTransitionEnd)),
|
|
855
855
|
!0;
|
|
856
856
|
},
|
|
857
857
|
slideToLoop: function(e = 0, t, i = !0, n) {
|
|
858
858
|
if ("string" == typeof e) {
|
|
859
859
|
e = parseInt(e, 10);
|
|
860
860
|
}
|
|
861
|
-
const
|
|
862
|
-
if (
|
|
863
|
-
void 0 === t && (t =
|
|
864
|
-
const
|
|
861
|
+
const r = this;
|
|
862
|
+
if (r.destroyed) return;
|
|
863
|
+
void 0 === t && (t = r.params.speed);
|
|
864
|
+
const o = r.grid && r.params.grid && r.params.grid.rows > 1;
|
|
865
865
|
let a = e;
|
|
866
|
-
if (
|
|
866
|
+
if (r.params.loop) if (r.virtual && r.params.virtual.enabled)
|
|
867
867
|
// eslint-disable-next-line
|
|
868
|
-
a +=
|
|
868
|
+
a += r.virtual.slidesBefore; else {
|
|
869
869
|
let e;
|
|
870
|
-
if (
|
|
871
|
-
const t = a *
|
|
872
|
-
e =
|
|
873
|
-
} else e =
|
|
874
|
-
const t =
|
|
875
|
-
let d =
|
|
876
|
-
"auto" === d ? d =
|
|
870
|
+
if (o) {
|
|
871
|
+
const t = a * r.params.grid.rows;
|
|
872
|
+
e = r.slides.find((e => 1 * e.getAttribute("data-swiper-slide-index") === t)).column;
|
|
873
|
+
} else e = r.getSlideIndexByData(a);
|
|
874
|
+
const t = o ? Math.ceil(r.slides.length / r.params.grid.rows) : r.slides.length, {centeredSlides: i, slidesOffsetBefore: s, slidesOffsetAfter: l} = r.params, c = i || !!s || !!l;
|
|
875
|
+
let d = r.params.slidesPerView;
|
|
876
|
+
"auto" === d ? d = r.slidesPerViewDynamic() : (d = Math.ceil(parseFloat(r.params.slidesPerView, 10)),
|
|
877
877
|
c && d % 2 == 0 && (d += 1));
|
|
878
878
|
let u = t - e < d;
|
|
879
|
-
if (c && (u = u || e < Math.ceil(d / 2)), n && c && "auto" !==
|
|
879
|
+
if (c && (u = u || e < Math.ceil(d / 2)), n && c && "auto" !== r.params.slidesPerView && !o && (u = !1),
|
|
880
880
|
u) {
|
|
881
|
-
const i = c ? e <
|
|
882
|
-
|
|
881
|
+
const i = c ? e < r.activeIndex ? "prev" : "next" : e - r.activeIndex - 1 < r.params.slidesPerView ? "next" : "prev";
|
|
882
|
+
r.loopFix({
|
|
883
883
|
direction: i,
|
|
884
884
|
slideTo: !0,
|
|
885
885
|
activeSlideIndex: "next" === i ? e + 1 : e - t + 1,
|
|
886
|
-
slideRealIndex: "next" === i ?
|
|
886
|
+
slideRealIndex: "next" === i ? r.realIndex : void 0
|
|
887
887
|
});
|
|
888
888
|
}
|
|
889
|
-
if (
|
|
890
|
-
const e = a *
|
|
891
|
-
a =
|
|
892
|
-
} else a =
|
|
889
|
+
if (o) {
|
|
890
|
+
const e = a * r.params.grid.rows;
|
|
891
|
+
a = r.slides.find((t => 1 * t.getAttribute("data-swiper-slide-index") === e)).column;
|
|
892
|
+
} else a = r.getSlideIndexByData(a);
|
|
893
893
|
}
|
|
894
894
|
return requestAnimationFrame((() => {
|
|
895
|
-
|
|
896
|
-
})),
|
|
895
|
+
r.slideTo(a, t, i, n);
|
|
896
|
+
})), r;
|
|
897
897
|
}
|
|
898
898
|
/* eslint no-unused-vars: "off" */ ,
|
|
899
899
|
slideNext: function(e, t = !0, i) {
|
|
900
|
-
const n = this, {enabled:
|
|
901
|
-
if (!
|
|
900
|
+
const n = this, {enabled: r, params: o, animating: a} = n;
|
|
901
|
+
if (!r || n.destroyed) return n;
|
|
902
902
|
void 0 === e && (e = n.params.speed);
|
|
903
|
-
let s =
|
|
904
|
-
"auto" ===
|
|
905
|
-
const l = n.activeIndex <
|
|
906
|
-
if (
|
|
907
|
-
if (a && !c &&
|
|
903
|
+
let s = o.slidesPerGroup;
|
|
904
|
+
"auto" === o.slidesPerView && 1 === o.slidesPerGroup && o.slidesPerGroupAuto && (s = Math.max(n.slidesPerViewDynamic("current", !0), 1));
|
|
905
|
+
const l = n.activeIndex < o.slidesPerGroupSkip ? 1 : s, c = n.virtual && o.virtual.enabled;
|
|
906
|
+
if (o.loop) {
|
|
907
|
+
if (a && !c && o.loopPreventsSliding) return !1;
|
|
908
908
|
if (n.loopFix({
|
|
909
909
|
direction: "next"
|
|
910
910
|
}),
|
|
911
911
|
// eslint-disable-next-line
|
|
912
|
-
n._clientLeft = n.wrapperEl.clientLeft, n.activeIndex === n.slides.length - 1 &&
|
|
912
|
+
n._clientLeft = n.wrapperEl.clientLeft, n.activeIndex === n.slides.length - 1 && o.cssMode) return requestAnimationFrame((() => {
|
|
913
913
|
n.slideTo(n.activeIndex + l, e, t, i);
|
|
914
914
|
})), !0;
|
|
915
915
|
}
|
|
916
|
-
return
|
|
916
|
+
return o.rewind && n.isEnd ? n.slideTo(0, e, t, i) : n.slideTo(n.activeIndex + l, e, t, i);
|
|
917
917
|
}
|
|
918
918
|
/* eslint no-unused-vars: "off" */ ,
|
|
919
919
|
slidePrev: function(e, t = !0, i) {
|
|
920
|
-
const n = this, {params:
|
|
920
|
+
const n = this, {params: r, snapGrid: o, slidesGrid: a, rtlTranslate: s, enabled: l, animating: c} = n;
|
|
921
921
|
if (!l || n.destroyed) return n;
|
|
922
922
|
void 0 === e && (e = n.params.speed);
|
|
923
|
-
const d = n.virtual &&
|
|
924
|
-
if (
|
|
925
|
-
if (c && !d &&
|
|
923
|
+
const d = n.virtual && r.virtual.enabled;
|
|
924
|
+
if (r.loop) {
|
|
925
|
+
if (c && !d && r.loopPreventsSliding) return !1;
|
|
926
926
|
n.loopFix({
|
|
927
927
|
direction: "prev"
|
|
928
928
|
}),
|
|
@@ -932,23 +932,23 @@ var q = {
|
|
|
932
932
|
function normalize(e) {
|
|
933
933
|
return e < 0 ? -Math.floor(Math.abs(e)) : Math.floor(e);
|
|
934
934
|
}
|
|
935
|
-
const u = normalize(s ? n.translate : -n.translate), p =
|
|
936
|
-
let f =
|
|
937
|
-
if (void 0 === f && (
|
|
935
|
+
const u = normalize(s ? n.translate : -n.translate), p = o.map((e => normalize(e))), h = r.freeMode && r.freeMode.enabled;
|
|
936
|
+
let f = o[p.indexOf(u) - 1];
|
|
937
|
+
if (void 0 === f && (r.cssMode || h)) {
|
|
938
938
|
let e;
|
|
939
|
-
|
|
939
|
+
o.forEach(((t, i) => {
|
|
940
940
|
u >= t && (
|
|
941
941
|
// prevSnap = snap;
|
|
942
942
|
e = i);
|
|
943
|
-
})), void 0 !== e && (f = h ?
|
|
943
|
+
})), void 0 !== e && (f = h ? o[e] : o[e > 0 ? e - 1 : e]);
|
|
944
944
|
}
|
|
945
945
|
let v = 0;
|
|
946
|
-
if (void 0 !== f && (v = a.indexOf(f), v < 0 && (v = n.activeIndex - 1), "auto" ===
|
|
947
|
-
v = Math.max(v, 0))),
|
|
948
|
-
const
|
|
949
|
-
return n.slideTo(
|
|
946
|
+
if (void 0 !== f && (v = a.indexOf(f), v < 0 && (v = n.activeIndex - 1), "auto" === r.slidesPerView && 1 === r.slidesPerGroup && r.slidesPerGroupAuto && (v = v - n.slidesPerViewDynamic("previous", !0) + 1,
|
|
947
|
+
v = Math.max(v, 0))), r.rewind && n.isBeginning) {
|
|
948
|
+
const r = n.params.virtual && n.params.virtual.enabled && n.virtual ? n.virtual.slides.length - 1 : n.slides.length - 1;
|
|
949
|
+
return n.slideTo(r, e, t, i);
|
|
950
950
|
}
|
|
951
|
-
return
|
|
951
|
+
return r.loop && 0 === n.activeIndex && r.cssMode ? (requestAnimationFrame((() => {
|
|
952
952
|
n.slideTo(v, e, t, i);
|
|
953
953
|
})), !0) : n.slideTo(v, e, t, i);
|
|
954
954
|
}
|
|
@@ -959,57 +959,57 @@ var q = {
|
|
|
959
959
|
}
|
|
960
960
|
/* eslint no-unused-vars: "off" */ ,
|
|
961
961
|
slideToClosest: function(e, t = !0, i, n = .5) {
|
|
962
|
-
const
|
|
963
|
-
if (
|
|
964
|
-
void 0 === e && (e =
|
|
965
|
-
let
|
|
966
|
-
const a = Math.min(
|
|
967
|
-
if (l >=
|
|
962
|
+
const r = this;
|
|
963
|
+
if (r.destroyed) return;
|
|
964
|
+
void 0 === e && (e = r.params.speed);
|
|
965
|
+
let o = r.activeIndex;
|
|
966
|
+
const a = Math.min(r.params.slidesPerGroupSkip, o), s = a + Math.floor((o - a) / r.params.slidesPerGroup), l = r.rtlTranslate ? r.translate : -r.translate;
|
|
967
|
+
if (l >= r.snapGrid[s]) {
|
|
968
968
|
// The current translate is on or after the current snap index, so the choice
|
|
969
969
|
// is between the current index and the one after it.
|
|
970
|
-
const e =
|
|
971
|
-
l - e > (
|
|
970
|
+
const e = r.snapGrid[s];
|
|
971
|
+
l - e > (r.snapGrid[s + 1] - e) * n && (o += r.params.slidesPerGroup);
|
|
972
972
|
} else {
|
|
973
973
|
// The current translate is before the current snap index, so the choice
|
|
974
974
|
// is between the current index and the one before it.
|
|
975
|
-
const e =
|
|
976
|
-
l - e <= (
|
|
975
|
+
const e = r.snapGrid[s - 1];
|
|
976
|
+
l - e <= (r.snapGrid[s] - e) * n && (o -= r.params.slidesPerGroup);
|
|
977
977
|
}
|
|
978
|
-
return
|
|
978
|
+
return o = Math.max(o, 0), o = Math.min(o, r.slidesGrid.length - 1), r.slideTo(o, e, t, i);
|
|
979
979
|
},
|
|
980
980
|
slideToClickedSlide: function() {
|
|
981
981
|
const e = this;
|
|
982
982
|
if (e.destroyed) return;
|
|
983
983
|
const {params: t, slidesEl: i} = e, n = "auto" === t.slidesPerView ? e.slidesPerViewDynamic() : t.slidesPerView;
|
|
984
|
-
let
|
|
984
|
+
let r, o = e.getSlideIndexWhenGrid(e.clickedIndex);
|
|
985
985
|
const a = e.isElement ? "swiper-slide" : `.${t.slideClass}`, s = e.grid && e.params.grid && e.params.grid.rows > 1;
|
|
986
986
|
if (t.loop) {
|
|
987
987
|
if (e.animating) return;
|
|
988
|
-
|
|
989
|
-
|
|
988
|
+
r = parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"), 10), t.centeredSlides ? e.slideToLoop(r) : o > (s ? (e.slides.length - n) / 2 - (e.params.grid.rows - 1) : e.slides.length - n) ? (e.loopFix(),
|
|
989
|
+
o = e.getSlideIndex(elementChildren(i, `${a}[data-swiper-slide-index="${r}"]`)[0]),
|
|
990
990
|
nextTick((() => {
|
|
991
|
-
e.slideTo(
|
|
992
|
-
}))) : e.slideTo(
|
|
993
|
-
} else e.slideTo(
|
|
991
|
+
e.slideTo(o);
|
|
992
|
+
}))) : e.slideTo(o);
|
|
993
|
+
} else e.slideTo(o);
|
|
994
994
|
}
|
|
995
995
|
};
|
|
996
996
|
|
|
997
997
|
var M = {
|
|
998
998
|
loopCreate: function(e, t) {
|
|
999
|
-
const i = this, {params: n, slidesEl:
|
|
999
|
+
const i = this, {params: n, slidesEl: r} = i;
|
|
1000
1000
|
if (!n.loop || i.virtual && i.params.virtual.enabled) return;
|
|
1001
1001
|
const initSlides = () => {
|
|
1002
|
-
elementChildren(
|
|
1002
|
+
elementChildren(r, `.${n.slideClass}, swiper-slide`).forEach(((e, t) => {
|
|
1003
1003
|
e.setAttribute("data-swiper-slide-index", t);
|
|
1004
1004
|
}));
|
|
1005
|
-
},
|
|
1006
|
-
n.loopAddBlankSlides && (n.slidesPerGroup > 1 ||
|
|
1007
|
-
const e = elementChildren(
|
|
1005
|
+
}, o = i.grid && n.grid && n.grid.rows > 1;
|
|
1006
|
+
n.loopAddBlankSlides && (n.slidesPerGroup > 1 || o) && (() => {
|
|
1007
|
+
const e = elementChildren(r, `.${n.slideBlankClass}`);
|
|
1008
1008
|
e.forEach((e => {
|
|
1009
1009
|
e.remove();
|
|
1010
1010
|
})), e.length > 0 && (i.recalcSlides(), i.updateSlides());
|
|
1011
1011
|
})();
|
|
1012
|
-
const a = n.slidesPerGroup * (
|
|
1012
|
+
const a = n.slidesPerGroup * (o ? n.grid.rows : 1), s = i.slides.length % a != 0, l = o && i.slides.length % n.grid.rows != 0, addBlankSlides = e => {
|
|
1013
1013
|
for (let t = 0; t < e; t += 1) {
|
|
1014
1014
|
const e = i.isElement ? createElement("swiper-slide", [ n.slideBlankClass ]) : createElement("div", [ n.slideClass, n.slideBlankClass ]);
|
|
1015
1015
|
i.slidesEl.append(e);
|
|
@@ -1033,7 +1033,7 @@ var M = {
|
|
|
1033
1033
|
initial: t
|
|
1034
1034
|
});
|
|
1035
1035
|
},
|
|
1036
|
-
loopFix: function({slideRealIndex: e, slideTo: t = !0, direction: i, setTranslate: n, activeSlideIndex:
|
|
1036
|
+
loopFix: function({slideRealIndex: e, slideTo: t = !0, direction: i, setTranslate: n, activeSlideIndex: r, initial: o, byController: a, byMousewheel: s} = {}) {
|
|
1037
1037
|
const l = this;
|
|
1038
1038
|
if (!l.params.loop) return;
|
|
1039
1039
|
l.emit("beforeLoopFix");
|
|
@@ -1048,12 +1048,12 @@ var M = {
|
|
|
1048
1048
|
y % x != 0 && (y += x - y % x), y += h.loopAdditionalSlides, l.loopedSlides = y;
|
|
1049
1049
|
const S = l.grid && h.grid && h.grid.rows > 1;
|
|
1050
1050
|
c.length < b + y || "cards" === l.params.effect && c.length < b + 2 * y ? showWarning("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters") : S && "row" === h.grid.fill && showWarning("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");
|
|
1051
|
-
const q = [], M = [], C = S ? Math.ceil(c.length / h.grid.rows) : c.length, T =
|
|
1051
|
+
const q = [], M = [], C = S ? Math.ceil(c.length / h.grid.rows) : c.length, T = o && C - m < b && !w;
|
|
1052
1052
|
let k = T ? m : l.activeIndex;
|
|
1053
|
-
void 0 ===
|
|
1053
|
+
void 0 === r ? r = l.getSlideIndex(c.find((e => e.classList.contains(h.slideActiveClass)))) : k = r;
|
|
1054
1054
|
const P = "next" === i || !i, E = "prev" === i || !i;
|
|
1055
1055
|
let O = 0, I = 0;
|
|
1056
|
-
const $ = (S ? c[
|
|
1056
|
+
const $ = (S ? c[r].column : r) + (w && void 0 === n ? -b / 2 + .5 : 0);
|
|
1057
1057
|
// prepend last slides before start
|
|
1058
1058
|
if ($ < y) {
|
|
1059
1059
|
O = Math.max(y - $, x);
|
|
@@ -1078,8 +1078,8 @@ var M = {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
if (l.__preventObserver__ = !0, requestAnimationFrame((() => {
|
|
1080
1080
|
l.__preventObserver__ = !1;
|
|
1081
|
-
})), "cards" === l.params.effect && c.length < b + 2 * y && (M.includes(
|
|
1082
|
-
q.includes(
|
|
1081
|
+
})), "cards" === l.params.effect && c.length < b + 2 * y && (M.includes(r) && M.splice(M.indexOf(r), 1),
|
|
1082
|
+
q.includes(r) && q.splice(q.indexOf(r), 1)), E && q.forEach((e => {
|
|
1083
1083
|
c[e].swiperLoopMoveDOM = !0, p.prepend(c[e]), c[e].swiperLoopMoveDOM = !1;
|
|
1084
1084
|
})), P && M.forEach((e => {
|
|
1085
1085
|
c[e].swiperLoopMoveDOM = !0, p.append(c[e]), c[e].swiperLoopMoveDOM = !1;
|
|
@@ -1103,20 +1103,20 @@ var M = {
|
|
|
1103
1103
|
l.slideTo(l.activeIndex - e, 0, !1, !0);
|
|
1104
1104
|
}
|
|
1105
1105
|
if (l.allowSlidePrev = d, l.allowSlideNext = u, l.controller && l.controller.control && !a) {
|
|
1106
|
-
const
|
|
1106
|
+
const o = {
|
|
1107
1107
|
slideRealIndex: e,
|
|
1108
1108
|
direction: i,
|
|
1109
1109
|
setTranslate: n,
|
|
1110
|
-
activeSlideIndex:
|
|
1110
|
+
activeSlideIndex: r,
|
|
1111
1111
|
byController: !0
|
|
1112
1112
|
};
|
|
1113
1113
|
Array.isArray(l.controller.control) ? l.controller.control.forEach((e => {
|
|
1114
1114
|
!e.destroyed && e.params.loop && e.loopFix({
|
|
1115
|
-
...
|
|
1115
|
+
...o,
|
|
1116
1116
|
slideTo: e.params.slidesPerView === h.slidesPerView && t
|
|
1117
1117
|
});
|
|
1118
1118
|
})) : l.controller.control instanceof l.constructor && l.controller.control.params.loop && l.controller.control.loopFix({
|
|
1119
|
-
...
|
|
1119
|
+
...o,
|
|
1120
1120
|
slideTo: l.controller.control.params.slidesPerView === h.slidesPerView && t
|
|
1121
1121
|
});
|
|
1122
1122
|
}
|
|
@@ -1139,8 +1139,8 @@ var M = {
|
|
|
1139
1139
|
};
|
|
1140
1140
|
|
|
1141
1141
|
function preventEdgeSwipe(e, t, i) {
|
|
1142
|
-
const n = getWindow(), {params:
|
|
1143
|
-
return !
|
|
1142
|
+
const n = getWindow(), {params: r} = e, o = r.edgeSwipeDetection, a = r.edgeSwipeThreshold;
|
|
1143
|
+
return !o || !(i <= a || i >= n.innerWidth - a) || "prevent" === o && (t.preventDefault(),
|
|
1144
1144
|
!0);
|
|
1145
1145
|
}
|
|
1146
1146
|
|
|
@@ -1148,21 +1148,21 @@ function onTouchStart(e) {
|
|
|
1148
1148
|
const t = this, i = getDocument();
|
|
1149
1149
|
let n = e;
|
|
1150
1150
|
n.originalEvent && (n = n.originalEvent);
|
|
1151
|
-
const
|
|
1151
|
+
const r = t.touchEventsData;
|
|
1152
1152
|
if ("pointerdown" === n.type) {
|
|
1153
|
-
if (null !==
|
|
1154
|
-
|
|
1155
|
-
} else "touchstart" === n.type && 1 === n.targetTouches.length && (
|
|
1153
|
+
if (null !== r.pointerId && r.pointerId !== n.pointerId) return;
|
|
1154
|
+
r.pointerId = n.pointerId;
|
|
1155
|
+
} else "touchstart" === n.type && 1 === n.targetTouches.length && (r.touchId = n.targetTouches[0].identifier);
|
|
1156
1156
|
if ("touchstart" === n.type)
|
|
1157
1157
|
// don't proceed touch event
|
|
1158
1158
|
return void preventEdgeSwipe(t, n, n.targetTouches[0].pageX);
|
|
1159
|
-
const {params:
|
|
1159
|
+
const {params: o, touches: a, enabled: s} = t;
|
|
1160
1160
|
if (!s) return;
|
|
1161
|
-
if (!
|
|
1162
|
-
if (t.animating &&
|
|
1163
|
-
!t.animating &&
|
|
1161
|
+
if (!o.simulateTouch && "mouse" === n.pointerType) return;
|
|
1162
|
+
if (t.animating && o.preventInteractionOnTransition) return;
|
|
1163
|
+
!t.animating && o.cssMode && o.loop && t.loopFix();
|
|
1164
1164
|
let l = n.target;
|
|
1165
|
-
if ("wrapper" ===
|
|
1165
|
+
if ("wrapper" === o.touchEventsTarget && !function(e, t) {
|
|
1166
1166
|
const i = getWindow();
|
|
1167
1167
|
let n = t.contains(e);
|
|
1168
1168
|
!n && i.HTMLSlotElement && t instanceof HTMLSlotElement && (n = [ ...t.assignedElements() ].includes(e),
|
|
@@ -1179,14 +1179,14 @@ function onTouchStart(e) {
|
|
|
1179
1179
|
}(l, t.wrapperEl)) return;
|
|
1180
1180
|
if ("which" in n && 3 === n.which) return;
|
|
1181
1181
|
if ("button" in n && n.button > 0) return;
|
|
1182
|
-
if (
|
|
1182
|
+
if (r.isTouched && r.isMoved) return;
|
|
1183
1183
|
// change target el for shadow root component
|
|
1184
|
-
const c = !!
|
|
1184
|
+
const c = !!o.noSwipingClass && "" !== o.noSwipingClass, d = n.composedPath ? n.composedPath() : n.path;
|
|
1185
1185
|
// eslint-disable-next-line
|
|
1186
1186
|
c && n.target && n.target.shadowRoot && d && (l = d[0]);
|
|
1187
|
-
const u =
|
|
1187
|
+
const u = o.noSwipingSelector ? o.noSwipingSelector : `.${o.noSwipingClass}`, p = !(!n.target || !n.target.shadowRoot);
|
|
1188
1188
|
// use closestElement for shadow root element to get the actual closest for nested shadow root element
|
|
1189
|
-
if (
|
|
1189
|
+
if (o.noSwiping && (p ?
|
|
1190
1190
|
// Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd
|
|
1191
1191
|
function(e, t = this) {
|
|
1192
1192
|
return function __closestFrom(t) {
|
|
@@ -1196,32 +1196,32 @@ function onTouchStart(e) {
|
|
|
1196
1196
|
return i || t.getRootNode ? i || __closestFrom(t.getRootNode().host) : null;
|
|
1197
1197
|
}(t);
|
|
1198
1198
|
}(u, l) : l.closest(u))) return void (t.allowClick = !0);
|
|
1199
|
-
if (
|
|
1199
|
+
if (o.swipeHandler && !l.closest(o.swipeHandler)) return;
|
|
1200
1200
|
a.currentX = n.pageX, a.currentY = n.pageY;
|
|
1201
1201
|
const h = a.currentX, f = a.currentY;
|
|
1202
1202
|
// Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore
|
|
1203
1203
|
if (!preventEdgeSwipe(t, n, h)) return;
|
|
1204
|
-
Object.assign(
|
|
1204
|
+
Object.assign(r, {
|
|
1205
1205
|
isTouched: !0,
|
|
1206
1206
|
isMoved: !1,
|
|
1207
1207
|
allowTouchCallbacks: !0,
|
|
1208
1208
|
isScrolling: void 0,
|
|
1209
1209
|
startMoving: void 0
|
|
1210
|
-
}), a.startX = h, a.startY = f,
|
|
1211
|
-
t.swipeDirection = void 0,
|
|
1210
|
+
}), a.startX = h, a.startY = f, r.touchStartTime = now(), t.allowClick = !0, t.updateSize(),
|
|
1211
|
+
t.swipeDirection = void 0, o.threshold > 0 && (r.allowThresholdMove = !1);
|
|
1212
1212
|
let v = !0;
|
|
1213
|
-
l.matches(
|
|
1214
|
-
i.activeElement && i.activeElement.matches(
|
|
1215
|
-
const g = v && t.allowTouchMove &&
|
|
1216
|
-
!
|
|
1217
|
-
|
|
1213
|
+
l.matches(r.focusableElements) && (v = !1, "SELECT" === l.nodeName && (r.isTouched = !1)),
|
|
1214
|
+
i.activeElement && i.activeElement.matches(r.focusableElements) && i.activeElement !== l && ("mouse" === n.pointerType || "mouse" !== n.pointerType && !l.matches(r.focusableElements)) && i.activeElement.blur();
|
|
1215
|
+
const g = v && t.allowTouchMove && o.touchStartPreventDefault;
|
|
1216
|
+
!o.touchStartForcePreventDefault && !g || l.isContentEditable || n.preventDefault(),
|
|
1217
|
+
o.freeMode && o.freeMode.enabled && t.freeMode && t.animating && !o.cssMode && t.freeMode.onTouchStart(),
|
|
1218
1218
|
t.emit("touchStart", n);
|
|
1219
1219
|
}
|
|
1220
1220
|
|
|
1221
1221
|
function onTouchMove(e) {
|
|
1222
|
-
const t = getDocument(), i = this, n = i.touchEventsData, {params:
|
|
1222
|
+
const t = getDocument(), i = this, n = i.touchEventsData, {params: r, touches: o, rtlTranslate: a, enabled: s} = i;
|
|
1223
1223
|
if (!s) return;
|
|
1224
|
-
if (!
|
|
1224
|
+
if (!r.simulateTouch && "mouse" === e.pointerType) return;
|
|
1225
1225
|
let l, c = e;
|
|
1226
1226
|
if (c.originalEvent && (c = c.originalEvent), "pointermove" === c.type) {
|
|
1227
1227
|
if (null !== n.touchId) return;
|
|
@@ -1233,46 +1233,46 @@ function onTouchMove(e) {
|
|
|
1233
1233
|
} else l = c;
|
|
1234
1234
|
if (!n.isTouched) return void (n.startMoving && n.isScrolling && i.emit("touchMoveOpposite", c));
|
|
1235
1235
|
const d = l.pageX, u = l.pageY;
|
|
1236
|
-
if (c.preventedByNestedSwiper) return
|
|
1236
|
+
if (c.preventedByNestedSwiper) return o.startX = d, void (o.startY = u);
|
|
1237
1237
|
if (!i.allowTouchMove) return c.target.matches(n.focusableElements) || (i.allowClick = !1),
|
|
1238
|
-
void (n.isTouched && (Object.assign(
|
|
1238
|
+
void (n.isTouched && (Object.assign(o, {
|
|
1239
1239
|
startX: d,
|
|
1240
1240
|
startY: u,
|
|
1241
1241
|
currentX: d,
|
|
1242
1242
|
currentY: u
|
|
1243
1243
|
}), n.touchStartTime = now()));
|
|
1244
|
-
if (
|
|
1244
|
+
if (r.touchReleaseOnEdges && !r.loop) if (i.isVertical()) {
|
|
1245
1245
|
// Vertical
|
|
1246
|
-
if (u <
|
|
1246
|
+
if (u < o.startY && i.translate <= i.maxTranslate() || u > o.startY && i.translate >= i.minTranslate()) return n.isTouched = !1,
|
|
1247
1247
|
void (n.isMoved = !1);
|
|
1248
1248
|
} else {
|
|
1249
|
-
if (a && (d >
|
|
1250
|
-
if (!a && (d <
|
|
1249
|
+
if (a && (d > o.startX && -i.translate <= i.maxTranslate() || d < o.startX && -i.translate >= i.minTranslate())) return;
|
|
1250
|
+
if (!a && (d < o.startX && i.translate <= i.maxTranslate() || d > o.startX && i.translate >= i.minTranslate())) return;
|
|
1251
1251
|
}
|
|
1252
1252
|
if (t.activeElement && t.activeElement.matches(n.focusableElements) && t.activeElement !== c.target && "mouse" !== c.pointerType && t.activeElement.blur(),
|
|
1253
1253
|
t.activeElement && c.target === t.activeElement && c.target.matches(n.focusableElements)) return n.isMoved = !0,
|
|
1254
1254
|
void (i.allowClick = !1);
|
|
1255
|
-
n.allowTouchCallbacks && i.emit("touchMove", c),
|
|
1256
|
-
|
|
1257
|
-
const p =
|
|
1255
|
+
n.allowTouchCallbacks && i.emit("touchMove", c), o.previousX = o.currentX, o.previousY = o.currentY,
|
|
1256
|
+
o.currentX = d, o.currentY = u;
|
|
1257
|
+
const p = o.currentX - o.startX, h = o.currentY - o.startY;
|
|
1258
1258
|
if (i.params.threshold && Math.sqrt(p ** 2 + h ** 2) < i.params.threshold) return;
|
|
1259
1259
|
if (void 0 === n.isScrolling) {
|
|
1260
1260
|
let e;
|
|
1261
|
-
i.isHorizontal() &&
|
|
1261
|
+
i.isHorizontal() && o.currentY === o.startY || i.isVertical() && o.currentX === o.startX ? n.isScrolling = !1 :
|
|
1262
1262
|
// eslint-disable-next-line
|
|
1263
1263
|
p * p + h * h >= 25 && (e = 180 * Math.atan2(Math.abs(h), Math.abs(p)) / Math.PI,
|
|
1264
|
-
n.isScrolling = i.isHorizontal() ? e >
|
|
1264
|
+
n.isScrolling = i.isHorizontal() ? e > r.touchAngle : 90 - e > r.touchAngle);
|
|
1265
1265
|
}
|
|
1266
|
-
if (n.isScrolling && i.emit("touchMoveOpposite", c), void 0 === n.startMoving && (
|
|
1266
|
+
if (n.isScrolling && i.emit("touchMoveOpposite", c), void 0 === n.startMoving && (o.currentX === o.startX && o.currentY === o.startY || (n.startMoving = !0)),
|
|
1267
1267
|
n.isScrolling || "touchmove" === c.type && n.preventTouchMoveFromPointerMove) return void (n.isTouched = !1);
|
|
1268
1268
|
if (!n.startMoving) return;
|
|
1269
|
-
i.allowClick = !1, !
|
|
1270
|
-
let f = i.isHorizontal() ? p : h, v = i.isHorizontal() ?
|
|
1271
|
-
|
|
1272
|
-
|
|
1269
|
+
i.allowClick = !1, !r.cssMode && c.cancelable && c.preventDefault(), r.touchMoveStopPropagation && !r.nested && c.stopPropagation();
|
|
1270
|
+
let f = i.isHorizontal() ? p : h, v = i.isHorizontal() ? o.currentX - o.previousX : o.currentY - o.previousY;
|
|
1271
|
+
r.oneWayMovement && (f = Math.abs(f) * (a ? 1 : -1), v = Math.abs(v) * (a ? 1 : -1)),
|
|
1272
|
+
o.diff = f, f *= r.touchRatio, a && (f = -f, v = -v);
|
|
1273
1273
|
const g = i.touchesDirection;
|
|
1274
1274
|
i.swipeDirection = f > 0 ? "prev" : "next", i.touchesDirection = v > 0 ? "prev" : "next";
|
|
1275
|
-
const m = i.params.loop && !
|
|
1275
|
+
const m = i.params.loop && !r.cssMode, w = "next" === i.touchesDirection && i.allowSlideNext || "prev" === i.touchesDirection && i.allowSlidePrev;
|
|
1276
1276
|
if (!n.isMoved) {
|
|
1277
1277
|
if (m && w && i.loopFix({
|
|
1278
1278
|
direction: i.swipeDirection
|
|
@@ -1288,10 +1288,10 @@ function onTouchMove(e) {
|
|
|
1288
1288
|
}
|
|
1289
1289
|
n.allowMomentumBounce = !1,
|
|
1290
1290
|
// Grab Cursor
|
|
1291
|
-
!
|
|
1291
|
+
!r.grabCursor || !0 !== i.allowSlideNext && !0 !== i.allowSlidePrev || i.setGrabCursor(!0),
|
|
1292
1292
|
i.emit("sliderFirstMove", c);
|
|
1293
1293
|
}
|
|
1294
|
-
if ((new Date).getTime(), !1 !==
|
|
1294
|
+
if ((new Date).getTime(), !1 !== r._loopSwapReset && n.isMoved && n.allowThresholdMove && g !== i.touchesDirection && m && w && Math.abs(f) >= 1) return Object.assign(o, {
|
|
1295
1295
|
startX: d,
|
|
1296
1296
|
startY: u,
|
|
1297
1297
|
currentX: d,
|
|
@@ -1299,31 +1299,31 @@ function onTouchMove(e) {
|
|
|
1299
1299
|
startTranslate: n.currentTranslate
|
|
1300
1300
|
}), n.loopSwapReset = !0, void (n.startTranslate = n.currentTranslate);
|
|
1301
1301
|
i.emit("sliderMove", c), n.isMoved = !0, n.currentTranslate = f + n.startTranslate;
|
|
1302
|
-
let b = !0, x =
|
|
1302
|
+
let b = !0, x = r.resistanceRatio;
|
|
1303
1303
|
// Threshold
|
|
1304
|
-
if (
|
|
1304
|
+
if (r.touchReleaseOnEdges && (x = 0), f > 0 ? (m && w && n.allowThresholdMove && n.currentTranslate > (r.centeredSlides ? i.minTranslate() - i.slidesSizesGrid[i.activeIndex + 1] - ("auto" !== r.slidesPerView && i.slides.length - r.slidesPerView >= 2 ? i.slidesSizesGrid[i.activeIndex + 1] + i.params.spaceBetween : 0) - i.params.spaceBetween : i.minTranslate()) && i.loopFix({
|
|
1305
1305
|
direction: "prev",
|
|
1306
1306
|
setTranslate: !0,
|
|
1307
1307
|
activeSlideIndex: 0
|
|
1308
|
-
}), n.currentTranslate > i.minTranslate() && (b = !1,
|
|
1308
|
+
}), n.currentTranslate > i.minTranslate() && (b = !1, r.resistance && (n.currentTranslate = i.minTranslate() - 1 + (-i.minTranslate() + n.startTranslate + f) ** x))) : f < 0 && (m && w && n.allowThresholdMove && n.currentTranslate < (r.centeredSlides ? i.maxTranslate() + i.slidesSizesGrid[i.slidesSizesGrid.length - 1] + i.params.spaceBetween + ("auto" !== r.slidesPerView && i.slides.length - r.slidesPerView >= 2 ? i.slidesSizesGrid[i.slidesSizesGrid.length - 1] + i.params.spaceBetween : 0) : i.maxTranslate()) && i.loopFix({
|
|
1309
1309
|
direction: "next",
|
|
1310
1310
|
setTranslate: !0,
|
|
1311
|
-
activeSlideIndex: i.slides.length - ("auto" ===
|
|
1312
|
-
}), n.currentTranslate < i.maxTranslate() && (b = !1,
|
|
1311
|
+
activeSlideIndex: i.slides.length - ("auto" === r.slidesPerView ? i.slidesPerViewDynamic() : Math.ceil(parseFloat(r.slidesPerView, 10)))
|
|
1312
|
+
}), n.currentTranslate < i.maxTranslate() && (b = !1, r.resistance && (n.currentTranslate = i.maxTranslate() + 1 - (i.maxTranslate() - n.startTranslate - f) ** x))),
|
|
1313
1313
|
b && (c.preventedByNestedSwiper = !0),
|
|
1314
1314
|
// Directions locks
|
|
1315
1315
|
!i.allowSlideNext && "next" === i.swipeDirection && n.currentTranslate < n.startTranslate && (n.currentTranslate = n.startTranslate),
|
|
1316
1316
|
!i.allowSlidePrev && "prev" === i.swipeDirection && n.currentTranslate > n.startTranslate && (n.currentTranslate = n.startTranslate),
|
|
1317
1317
|
i.allowSlidePrev || i.allowSlideNext || (n.currentTranslate = n.startTranslate),
|
|
1318
|
-
|
|
1319
|
-
if (!(Math.abs(f) >
|
|
1320
|
-
if (!n.allowThresholdMove) return n.allowThresholdMove = !0,
|
|
1321
|
-
|
|
1318
|
+
r.threshold > 0) {
|
|
1319
|
+
if (!(Math.abs(f) > r.threshold || n.allowThresholdMove)) return void (n.currentTranslate = n.startTranslate);
|
|
1320
|
+
if (!n.allowThresholdMove) return n.allowThresholdMove = !0, o.startX = o.currentX,
|
|
1321
|
+
o.startY = o.currentY, n.currentTranslate = n.startTranslate, void (o.diff = i.isHorizontal() ? o.currentX - o.startX : o.currentY - o.startY);
|
|
1322
1322
|
}
|
|
1323
|
-
|
|
1323
|
+
r.followFinger && !r.cssMode && (
|
|
1324
1324
|
// Update active index in free mode
|
|
1325
|
-
(
|
|
1326
|
-
i.updateSlidesClasses()),
|
|
1325
|
+
(r.freeMode && r.freeMode.enabled && i.freeMode || r.watchSlidesProgress) && (i.updateActiveIndex(),
|
|
1326
|
+
i.updateSlidesClasses()), r.freeMode && r.freeMode.enabled && i.freeMode && i.freeMode.onTouchMove(),
|
|
1327
1327
|
// Update progress
|
|
1328
1328
|
i.updateProgress(n.currentTranslate),
|
|
1329
1329
|
// Update translate
|
|
@@ -1332,66 +1332,66 @@ function onTouchMove(e) {
|
|
|
1332
1332
|
|
|
1333
1333
|
function onTouchEnd(e) {
|
|
1334
1334
|
const t = this, i = t.touchEventsData;
|
|
1335
|
-
let n,
|
|
1336
|
-
|
|
1337
|
-
if ("touchend" ===
|
|
1338
|
-
if (n = [ ...
|
|
1335
|
+
let n, r = e;
|
|
1336
|
+
r.originalEvent && (r = r.originalEvent);
|
|
1337
|
+
if ("touchend" === r.type || "touchcancel" === r.type) {
|
|
1338
|
+
if (n = [ ...r.changedTouches ].find((e => e.identifier === i.touchId)), !n || n.identifier !== i.touchId) return;
|
|
1339
1339
|
} else {
|
|
1340
1340
|
if (null !== i.touchId) return;
|
|
1341
1341
|
// return from pointer if we use touch
|
|
1342
|
-
if (
|
|
1343
|
-
n =
|
|
1342
|
+
if (r.pointerId !== i.pointerId) return;
|
|
1343
|
+
n = r;
|
|
1344
1344
|
}
|
|
1345
|
-
if ([ "pointercancel", "pointerout", "pointerleave", "contextmenu" ].includes(
|
|
1346
|
-
if (!([ "pointercancel", "contextmenu" ].includes(
|
|
1345
|
+
if ([ "pointercancel", "pointerout", "pointerleave", "contextmenu" ].includes(r.type)) {
|
|
1346
|
+
if (!([ "pointercancel", "contextmenu" ].includes(r.type) && (t.browser.isSafari || t.browser.isWebView))) return;
|
|
1347
1347
|
}
|
|
1348
1348
|
i.pointerId = null, i.touchId = null;
|
|
1349
|
-
const {params:
|
|
1349
|
+
const {params: o, touches: a, rtlTranslate: s, slidesGrid: l, enabled: c} = t;
|
|
1350
1350
|
if (!c) return;
|
|
1351
|
-
if (!
|
|
1352
|
-
if (i.allowTouchCallbacks && t.emit("touchEnd",
|
|
1353
|
-
!i.isTouched) return i.isMoved &&
|
|
1351
|
+
if (!o.simulateTouch && "mouse" === r.pointerType) return;
|
|
1352
|
+
if (i.allowTouchCallbacks && t.emit("touchEnd", r), i.allowTouchCallbacks = !1,
|
|
1353
|
+
!i.isTouched) return i.isMoved && o.grabCursor && t.setGrabCursor(!1), i.isMoved = !1,
|
|
1354
1354
|
void (i.startMoving = !1);
|
|
1355
1355
|
// Return Grab Cursor
|
|
1356
|
-
|
|
1356
|
+
o.grabCursor && i.isMoved && i.isTouched && (!0 === t.allowSlideNext || !0 === t.allowSlidePrev) && t.setGrabCursor(!1);
|
|
1357
1357
|
// Time diff
|
|
1358
1358
|
const d = now(), u = d - i.touchStartTime;
|
|
1359
1359
|
// Tap, doubleTap, Click
|
|
1360
1360
|
if (t.allowClick) {
|
|
1361
|
-
const e =
|
|
1362
|
-
t.updateClickedSlide(e && e[0] ||
|
|
1361
|
+
const e = r.path || r.composedPath && r.composedPath();
|
|
1362
|
+
t.updateClickedSlide(e && e[0] || r.target, e), t.emit("tap click", r), u < 300 && d - i.lastClickTime < 300 && t.emit("doubleTap doubleClick", r);
|
|
1363
1363
|
}
|
|
1364
1364
|
if (i.lastClickTime = now(), nextTick((() => {
|
|
1365
1365
|
t.destroyed || (t.allowClick = !0);
|
|
1366
1366
|
})), !i.isTouched || !i.isMoved || !t.swipeDirection || 0 === a.diff && !i.loopSwapReset || i.currentTranslate === i.startTranslate && !i.loopSwapReset) return i.isTouched = !1,
|
|
1367
1367
|
i.isMoved = !1, void (i.startMoving = !1);
|
|
1368
1368
|
let p;
|
|
1369
|
-
if (i.isTouched = !1, i.isMoved = !1, i.startMoving = !1, p =
|
|
1370
|
-
|
|
1371
|
-
if (
|
|
1369
|
+
if (i.isTouched = !1, i.isMoved = !1, i.startMoving = !1, p = o.followFinger ? s ? t.translate : -t.translate : -i.currentTranslate,
|
|
1370
|
+
o.cssMode) return;
|
|
1371
|
+
if (o.freeMode && o.freeMode.enabled) return void t.freeMode.onTouchEnd({
|
|
1372
1372
|
currentPos: p
|
|
1373
1373
|
});
|
|
1374
1374
|
// Find current slide
|
|
1375
1375
|
const h = p >= -t.maxTranslate() && !t.params.loop;
|
|
1376
1376
|
let f = 0, v = t.slidesSizesGrid[0];
|
|
1377
|
-
for (let e = 0; e < l.length; e += e <
|
|
1378
|
-
const t = e <
|
|
1377
|
+
for (let e = 0; e < l.length; e += e < o.slidesPerGroupSkip ? 1 : o.slidesPerGroup) {
|
|
1378
|
+
const t = e < o.slidesPerGroupSkip - 1 ? 1 : o.slidesPerGroup;
|
|
1379
1379
|
void 0 !== l[e + t] ? (h || p >= l[e] && p < l[e + t]) && (f = e, v = l[e + t] - l[e]) : (h || p >= l[e]) && (f = e,
|
|
1380
1380
|
v = l[l.length - 1] - l[l.length - 2]);
|
|
1381
1381
|
}
|
|
1382
1382
|
let g = null, m = null;
|
|
1383
|
-
|
|
1383
|
+
o.rewind && (t.isBeginning ? m = o.virtual && o.virtual.enabled && t.virtual ? t.virtual.slides.length - 1 : t.slides.length - 1 : t.isEnd && (g = 0));
|
|
1384
1384
|
// Find current slide size
|
|
1385
|
-
const w = (p - l[f]) / v, b = f <
|
|
1386
|
-
if (u >
|
|
1385
|
+
const w = (p - l[f]) / v, b = f < o.slidesPerGroupSkip - 1 ? 1 : o.slidesPerGroup;
|
|
1386
|
+
if (u > o.longSwipesMs) {
|
|
1387
1387
|
// Long touches
|
|
1388
|
-
if (!
|
|
1389
|
-
"next" === t.swipeDirection && (w >=
|
|
1390
|
-
"prev" === t.swipeDirection && (w > 1 -
|
|
1388
|
+
if (!o.longSwipes) return void t.slideTo(t.activeIndex);
|
|
1389
|
+
"next" === t.swipeDirection && (w >= o.longSwipesRatio ? t.slideTo(o.rewind && t.isEnd ? g : f + b) : t.slideTo(f)),
|
|
1390
|
+
"prev" === t.swipeDirection && (w > 1 - o.longSwipesRatio ? t.slideTo(f + b) : null !== m && w < 0 && Math.abs(w) > o.longSwipesRatio ? t.slideTo(m) : t.slideTo(f));
|
|
1391
1391
|
} else {
|
|
1392
1392
|
// Short swipes
|
|
1393
|
-
if (!
|
|
1394
|
-
t.navigation && (
|
|
1393
|
+
if (!o.shortSwipes) return void t.slideTo(t.activeIndex);
|
|
1394
|
+
t.navigation && (r.target === t.navigation.nextEl || r.target === t.navigation.prevEl) ? r.target === t.navigation.nextEl ? t.slideTo(f + b) : t.slideTo(f) : ("next" === t.swipeDirection && t.slideTo(null !== g ? g : f + b),
|
|
1395
1395
|
"prev" === t.swipeDirection && t.slideTo(null !== m ? m : f));
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
@@ -1402,7 +1402,7 @@ function onResize() {
|
|
|
1402
1402
|
// Breakpoints
|
|
1403
1403
|
t.breakpoints && e.setBreakpoint();
|
|
1404
1404
|
// Save locks
|
|
1405
|
-
const {allowSlideNext: n, allowSlidePrev:
|
|
1405
|
+
const {allowSlideNext: n, allowSlidePrev: r, snapGrid: o} = e, a = e.virtual && e.params.virtual.enabled;
|
|
1406
1406
|
// Disable locks on resize
|
|
1407
1407
|
e.allowSlideNext = !0, e.allowSlidePrev = !0, e.updateSize(), e.updateSlides(),
|
|
1408
1408
|
e.updateSlidesClasses();
|
|
@@ -1413,7 +1413,7 @@ function onResize() {
|
|
|
1413
1413
|
e.autoplay && e.autoplay.running && e.autoplay.paused && e.autoplay.resume();
|
|
1414
1414
|
}), 500)),
|
|
1415
1415
|
// Return locks after resize
|
|
1416
|
-
e.allowSlidePrev =
|
|
1416
|
+
e.allowSlidePrev = r, e.allowSlideNext = n, e.params.watchOverflow && o !== e.snapGrid && e.checkOverflow();
|
|
1417
1417
|
}
|
|
1418
1418
|
|
|
1419
1419
|
function onClick(e) {
|
|
@@ -1425,12 +1425,12 @@ function onClick(e) {
|
|
|
1425
1425
|
function onScroll() {
|
|
1426
1426
|
const e = this, {wrapperEl: t, rtlTranslate: i, enabled: n} = e;
|
|
1427
1427
|
if (!n) return;
|
|
1428
|
-
let
|
|
1428
|
+
let r;
|
|
1429
1429
|
e.previousTranslate = e.translate, e.isHorizontal() ? e.translate = -t.scrollLeft : e.translate = -t.scrollTop,
|
|
1430
1430
|
// eslint-disable-next-line
|
|
1431
1431
|
0 === e.translate && (e.translate = 0), e.updateActiveIndex(), e.updateSlidesClasses();
|
|
1432
|
-
const
|
|
1433
|
-
|
|
1432
|
+
const o = e.maxTranslate() - e.minTranslate();
|
|
1433
|
+
r = 0 === o ? 0 : (e.translate - e.minTranslate()) / o, r !== e.progress && e.updateProgress(i ? -e.translate : e.translate),
|
|
1434
1434
|
e.emit("setTranslate", e.translate, !1);
|
|
1435
1435
|
}
|
|
1436
1436
|
|
|
@@ -1445,15 +1445,15 @@ function onDocumentTouchStart() {
|
|
|
1445
1445
|
}
|
|
1446
1446
|
|
|
1447
1447
|
const events = (e, t) => {
|
|
1448
|
-
const i = getDocument(), {params: n, el:
|
|
1449
|
-
|
|
1448
|
+
const i = getDocument(), {params: n, el: r, wrapperEl: o, device: a} = e, s = !!n.nested, l = "on" === t ? "addEventListener" : "removeEventListener", c = t;
|
|
1449
|
+
r && "string" != typeof r && (
|
|
1450
1450
|
// Touch Events
|
|
1451
1451
|
i[l]("touchstart", e.onDocumentTouchStart, {
|
|
1452
1452
|
passive: !1,
|
|
1453
1453
|
capture: s
|
|
1454
|
-
}),
|
|
1454
|
+
}), r[l]("touchstart", e.onTouchStart, {
|
|
1455
1455
|
passive: !1
|
|
1456
|
-
}),
|
|
1456
|
+
}), r[l]("pointerdown", e.onTouchStart, {
|
|
1457
1457
|
passive: !1
|
|
1458
1458
|
}), i[l]("touchmove", e.onTouchMove, {
|
|
1459
1459
|
passive: !1,
|
|
@@ -1477,12 +1477,12 @@ const events = (e, t) => {
|
|
|
1477
1477
|
passive: !0
|
|
1478
1478
|
}),
|
|
1479
1479
|
// Prevent Links Clicks
|
|
1480
|
-
(n.preventClicks || n.preventClicksPropagation) &&
|
|
1481
|
-
n.cssMode &&
|
|
1480
|
+
(n.preventClicks || n.preventClicksPropagation) && r[l]("click", e.onClick, !0),
|
|
1481
|
+
n.cssMode && o[l]("scroll", e.onScroll),
|
|
1482
1482
|
// Resize handler
|
|
1483
1483
|
n.updateOnWindowResize ? e[c](a.ios || a.android ? "resize orientationchange observerUpdate" : "resize observerUpdate", onResize, !0) : e[c]("observerUpdate", onResize, !0),
|
|
1484
1484
|
// Images loader
|
|
1485
|
-
|
|
1485
|
+
r[l]("load", e.onLoad, {
|
|
1486
1486
|
capture: !0
|
|
1487
1487
|
}));
|
|
1488
1488
|
};
|
|
@@ -1613,12 +1613,12 @@ var C = {
|
|
|
1613
1613
|
|
|
1614
1614
|
function moduleExtendParams(e, t) {
|
|
1615
1615
|
return function(i = {}) {
|
|
1616
|
-
const n = Object.keys(i)[0],
|
|
1617
|
-
"object" == typeof
|
|
1616
|
+
const n = Object.keys(i)[0], r = i[n];
|
|
1617
|
+
"object" == typeof r && null !== r ? (!0 === e[n] && (e[n] = {
|
|
1618
1618
|
enabled: !0
|
|
1619
1619
|
}), "navigation" === n && e[n] && e[n].enabled && !e[n].prevEl && !e[n].nextEl && (e[n].auto = !0),
|
|
1620
1620
|
[ "pagination", "scrollbar" ].indexOf(n) >= 0 && e[n] && e[n].enabled && !e[n].el && (e[n].auto = !0),
|
|
1621
|
-
n in e && "enabled" in
|
|
1621
|
+
n in e && "enabled" in r ? ("object" != typeof e[n] || "enabled" in e[n] || (e[n].enabled = !0),
|
|
1622
1622
|
e[n] || (e[n] = {
|
|
1623
1623
|
enabled: !1
|
|
1624
1624
|
}), extend(t, i)) : extend(t, i)) : extend(t, i);
|
|
@@ -1688,21 +1688,21 @@ function moduleExtendParams(e, t) {
|
|
|
1688
1688
|
},
|
|
1689
1689
|
breakpoints: {
|
|
1690
1690
|
setBreakpoint: function() {
|
|
1691
|
-
const e = this, {realIndex: t, initialized: i, params: n, el:
|
|
1692
|
-
if (!
|
|
1693
|
-
const a = getDocument(), s = "window" !== n.breakpointsBase && n.breakpointsBase ? "container" : n.breakpointsBase, l = [ "window", "container" ].includes(n.breakpointsBase) || !n.breakpointsBase ? e.el : a.querySelector(n.breakpointsBase), c = e.getBreakpoint(
|
|
1691
|
+
const e = this, {realIndex: t, initialized: i, params: n, el: r} = e, o = n.breakpoints;
|
|
1692
|
+
if (!o || o && 0 === Object.keys(o).length) return;
|
|
1693
|
+
const a = getDocument(), s = "window" !== n.breakpointsBase && n.breakpointsBase ? "container" : n.breakpointsBase, l = [ "window", "container" ].includes(n.breakpointsBase) || !n.breakpointsBase ? e.el : a.querySelector(n.breakpointsBase), c = e.getBreakpoint(o, s, l);
|
|
1694
1694
|
// Get breakpoint for window/container width and update parameters
|
|
1695
1695
|
if (!c || e.currentBreakpoint === c) return;
|
|
1696
|
-
const d = (c in
|
|
1697
|
-
u && !p ? (
|
|
1698
|
-
e.emitContainerClasses()) : !u && p && (
|
|
1699
|
-
(d.grid.fill && "column" === d.grid.fill || !d.grid.fill && "column" === n.grid.fill) &&
|
|
1696
|
+
const d = (c in o ? o[c] : void 0) || e.originalParams, u = isGridEnabled(e, n), p = isGridEnabled(e, d), h = e.params.grabCursor, f = d.grabCursor, v = n.enabled;
|
|
1697
|
+
u && !p ? (r.classList.remove(`${n.containerModifierClass}grid`, `${n.containerModifierClass}grid-column`),
|
|
1698
|
+
e.emitContainerClasses()) : !u && p && (r.classList.add(`${n.containerModifierClass}grid`),
|
|
1699
|
+
(d.grid.fill && "column" === d.grid.fill || !d.grid.fill && "column" === n.grid.fill) && r.classList.add(`${n.containerModifierClass}grid-column`),
|
|
1700
1700
|
e.emitContainerClasses()), h && !f ? e.unsetGrabCursor() : !h && f && e.setGrabCursor(),
|
|
1701
1701
|
// Toggle navigation, pagination, scrollbar
|
|
1702
1702
|
[ "navigation", "pagination", "scrollbar" ].forEach((t => {
|
|
1703
1703
|
if (void 0 === d[t]) return;
|
|
1704
|
-
const i = n[t] && n[t].enabled,
|
|
1705
|
-
i && !
|
|
1704
|
+
const i = n[t] && n[t].enabled, r = d[t] && d[t].enabled;
|
|
1705
|
+
i && !r && e[t].disable(), !i && r && e[t].enable();
|
|
1706
1706
|
}));
|
|
1707
1707
|
const g = d.direction && d.direction !== n.direction, m = n.loop && (d.slidesPerView !== n.slidesPerView || g), w = n.loop;
|
|
1708
1708
|
g && i && e.changeDirection(), extend(e.params, d);
|
|
@@ -1718,11 +1718,11 @@ function moduleExtendParams(e, t) {
|
|
|
1718
1718
|
getBreakpoint: function(e, t = "window", i) {
|
|
1719
1719
|
if (!e || "container" === t && !i) return;
|
|
1720
1720
|
let n = !1;
|
|
1721
|
-
const
|
|
1721
|
+
const r = getWindow(), o = "window" === t ? r.innerHeight : i.clientHeight, a = Object.keys(e).map((e => {
|
|
1722
1722
|
if ("string" == typeof e && 0 === e.indexOf("@")) {
|
|
1723
1723
|
const t = parseFloat(e.substr(1));
|
|
1724
1724
|
return {
|
|
1725
|
-
value:
|
|
1725
|
+
value: o * t,
|
|
1726
1726
|
point: e
|
|
1727
1727
|
};
|
|
1728
1728
|
}
|
|
@@ -1733,8 +1733,8 @@ function moduleExtendParams(e, t) {
|
|
|
1733
1733
|
}));
|
|
1734
1734
|
a.sort(((e, t) => parseInt(e.value, 10) - parseInt(t.value, 10)));
|
|
1735
1735
|
for (let e = 0; e < a.length; e += 1) {
|
|
1736
|
-
const {point:
|
|
1737
|
-
"window" === t ?
|
|
1736
|
+
const {point: o, value: s} = a[e];
|
|
1737
|
+
"window" === t ? r.matchMedia(`(min-width: ${s}px)`).matches && (n = o) : s <= i.clientWidth && (n = o);
|
|
1738
1738
|
}
|
|
1739
1739
|
return n || "max";
|
|
1740
1740
|
}
|
|
@@ -1752,7 +1752,7 @@ function moduleExtendParams(e, t) {
|
|
|
1752
1752
|
},
|
|
1753
1753
|
classes: {
|
|
1754
1754
|
addClasses: function() {
|
|
1755
|
-
const e = this, {classNames: t, params: i, rtl: n, el:
|
|
1755
|
+
const e = this, {classNames: t, params: i, rtl: n, el: r, device: o} = e, a = function(e, t) {
|
|
1756
1756
|
const i = [];
|
|
1757
1757
|
return e.forEach((e => {
|
|
1758
1758
|
"object" == typeof e ? Object.keys(e).forEach((n => {
|
|
@@ -1770,9 +1770,9 @@ function moduleExtendParams(e, t) {
|
|
|
1770
1770
|
}, {
|
|
1771
1771
|
"grid-column": i.grid && i.grid.rows > 1 && "column" === i.grid.fill
|
|
1772
1772
|
}, {
|
|
1773
|
-
android:
|
|
1773
|
+
android: o.android
|
|
1774
1774
|
}, {
|
|
1775
|
-
ios:
|
|
1775
|
+
ios: o.ios
|
|
1776
1776
|
}, {
|
|
1777
1777
|
"css-mode": i.cssMode
|
|
1778
1778
|
}, {
|
|
@@ -1780,7 +1780,7 @@ function moduleExtendParams(e, t) {
|
|
|
1780
1780
|
}, {
|
|
1781
1781
|
"watch-progress": i.watchSlidesProgress
|
|
1782
1782
|
} ], i.containerModifierClass);
|
|
1783
|
-
t.push(...a),
|
|
1783
|
+
t.push(...a), r.classList.add(...t), e.emitContainerClasses();
|
|
1784
1784
|
},
|
|
1785
1785
|
removeClasses: function() {
|
|
1786
1786
|
const {el: e, classNames: t} = this;
|
|
@@ -1806,39 +1806,39 @@ class P {
|
|
|
1806
1806
|
})), e;
|
|
1807
1807
|
}
|
|
1808
1808
|
// Swiper Instance
|
|
1809
|
-
const
|
|
1810
|
-
|
|
1809
|
+
const r = this;
|
|
1810
|
+
r.__swiper__ = !0, r.support = getSupport(), r.device = getDevice({
|
|
1811
1811
|
userAgent: i.userAgent
|
|
1812
|
-
}),
|
|
1813
|
-
|
|
1814
|
-
"function" == typeof e &&
|
|
1812
|
+
}), r.browser = getBrowser(), r.eventsListeners = {}, r.eventsAnyListeners = [],
|
|
1813
|
+
r.modules = [ ...r.__modules__ ], i.modules && Array.isArray(i.modules) && i.modules.forEach((e => {
|
|
1814
|
+
"function" == typeof e && r.modules.indexOf(e) < 0 && r.modules.push(e);
|
|
1815
1815
|
}));
|
|
1816
|
-
const
|
|
1817
|
-
|
|
1816
|
+
const o = {};
|
|
1817
|
+
r.modules.forEach((e => {
|
|
1818
1818
|
e({
|
|
1819
1819
|
params: i,
|
|
1820
|
-
swiper:
|
|
1821
|
-
extendParams: moduleExtendParams(i,
|
|
1822
|
-
on:
|
|
1823
|
-
once:
|
|
1824
|
-
off:
|
|
1825
|
-
emit:
|
|
1820
|
+
swiper: r,
|
|
1821
|
+
extendParams: moduleExtendParams(i, o),
|
|
1822
|
+
on: r.on.bind(r),
|
|
1823
|
+
once: r.once.bind(r),
|
|
1824
|
+
off: r.off.bind(r),
|
|
1825
|
+
emit: r.emit.bind(r)
|
|
1826
1826
|
});
|
|
1827
1827
|
}));
|
|
1828
1828
|
// Extend defaults with modules params
|
|
1829
|
-
const a = extend({}, C,
|
|
1829
|
+
const a = extend({}, C, o);
|
|
1830
1830
|
// Extend defaults with passed params
|
|
1831
1831
|
// Return app instance
|
|
1832
1832
|
// eslint-disable-next-line no-constructor-return
|
|
1833
|
-
return
|
|
1834
|
-
|
|
1833
|
+
return r.params = extend({}, a, k, i), r.originalParams = extend({}, r.params),
|
|
1834
|
+
r.passedParams = extend({}, i),
|
|
1835
1835
|
// add event listeners
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
})),
|
|
1836
|
+
r.params && r.params.on && Object.keys(r.params.on).forEach((e => {
|
|
1837
|
+
r.on(e, r.params.on[e]);
|
|
1838
|
+
})), r.params && r.params.onAny && r.onAny(r.params.onAny),
|
|
1839
1839
|
// Extend Swiper
|
|
1840
|
-
Object.assign(
|
|
1841
|
-
enabled:
|
|
1840
|
+
Object.assign(r, {
|
|
1841
|
+
enabled: r.params.enabled,
|
|
1842
1842
|
el: t,
|
|
1843
1843
|
// Classes
|
|
1844
1844
|
classNames: [],
|
|
@@ -1848,8 +1848,8 @@ class P {
|
|
|
1848
1848
|
snapGrid: [],
|
|
1849
1849
|
slidesSizesGrid: [],
|
|
1850
1850
|
// isDirection
|
|
1851
|
-
isHorizontal: () => "horizontal" ===
|
|
1852
|
-
isVertical: () => "vertical" ===
|
|
1851
|
+
isHorizontal: () => "horizontal" === r.params.direction,
|
|
1852
|
+
isVertical: () => "vertical" === r.params.direction,
|
|
1853
1853
|
// Indexes
|
|
1854
1854
|
activeIndex: 0,
|
|
1855
1855
|
realIndex: 0,
|
|
@@ -1867,8 +1867,8 @@ class P {
|
|
|
1867
1867
|
return Math.trunc(this.translate / 2 ** 23) * 2 ** 23;
|
|
1868
1868
|
},
|
|
1869
1869
|
// Locks
|
|
1870
|
-
allowSlideNext:
|
|
1871
|
-
allowSlidePrev:
|
|
1870
|
+
allowSlideNext: r.params.allowSlideNext,
|
|
1871
|
+
allowSlidePrev: r.params.allowSlidePrev,
|
|
1872
1872
|
// Touch Events
|
|
1873
1873
|
touchEventsData: {
|
|
1874
1874
|
isTouched: void 0,
|
|
@@ -1880,7 +1880,7 @@ class P {
|
|
|
1880
1880
|
startTranslate: void 0,
|
|
1881
1881
|
allowThresholdMove: void 0,
|
|
1882
1882
|
// Form elements to match
|
|
1883
|
-
focusableElements:
|
|
1883
|
+
focusableElements: r.params.focusableElements,
|
|
1884
1884
|
// Last click time
|
|
1885
1885
|
lastClickTime: 0,
|
|
1886
1886
|
clickTimeout: void 0,
|
|
@@ -1894,7 +1894,7 @@ class P {
|
|
|
1894
1894
|
// Clicks
|
|
1895
1895
|
allowClick: !0,
|
|
1896
1896
|
// Touches
|
|
1897
|
-
allowTouchMove:
|
|
1897
|
+
allowTouchMove: r.params.allowTouchMove,
|
|
1898
1898
|
touches: {
|
|
1899
1899
|
startX: 0,
|
|
1900
1900
|
startY: 0,
|
|
@@ -1905,9 +1905,9 @@ class P {
|
|
|
1905
1905
|
// Images
|
|
1906
1906
|
imagesToLoad: [],
|
|
1907
1907
|
imagesLoaded: 0
|
|
1908
|
-
}),
|
|
1908
|
+
}), r.emit("_swiper"),
|
|
1909
1909
|
// Init
|
|
1910
|
-
|
|
1910
|
+
r.params.init && r.init(), r;
|
|
1911
1911
|
}
|
|
1912
1912
|
getDirectionLabel(e) {
|
|
1913
1913
|
return this.isHorizontal() ? e : {
|
|
@@ -1948,8 +1948,8 @@ class P {
|
|
|
1948
1948
|
setProgress(e, t) {
|
|
1949
1949
|
const i = this;
|
|
1950
1950
|
e = Math.min(Math.max(e, 0), 1);
|
|
1951
|
-
const n = i.minTranslate(),
|
|
1952
|
-
i.translateTo(
|
|
1951
|
+
const n = i.minTranslate(), r = (i.maxTranslate() - n) * e + n;
|
|
1952
|
+
i.translateTo(r, void 0 === t ? 0 : t), i.updateActiveIndex(), i.updateSlidesClasses();
|
|
1953
1953
|
}
|
|
1954
1954
|
emitContainerClasses() {
|
|
1955
1955
|
const e = this;
|
|
@@ -1974,7 +1974,7 @@ class P {
|
|
|
1974
1974
|
})), e.emit("_slideClasses", t);
|
|
1975
1975
|
}
|
|
1976
1976
|
slidesPerViewDynamic(e = "current", t = !1) {
|
|
1977
|
-
const {params: i, slides: n, slidesGrid:
|
|
1977
|
+
const {params: i, slides: n, slidesGrid: r, slidesSizesGrid: o, size: a, activeIndex: s} = this;
|
|
1978
1978
|
let l = 1;
|
|
1979
1979
|
if ("number" == typeof i.slidesPerView) return i.slidesPerView;
|
|
1980
1980
|
if (i.centeredSlides) {
|
|
@@ -1986,11 +1986,11 @@ class P {
|
|
|
1986
1986
|
} else
|
|
1987
1987
|
// eslint-disable-next-line
|
|
1988
1988
|
if ("current" === e) for (let e = s + 1; e < n.length; e += 1) {
|
|
1989
|
-
(t ?
|
|
1989
|
+
(t ? r[e] + o[e] - r[s] < a : r[e] - r[s] < a) && (l += 1);
|
|
1990
1990
|
} else
|
|
1991
1991
|
// previous
|
|
1992
1992
|
for (let e = s - 1; e >= 0; e -= 1) {
|
|
1993
|
-
|
|
1993
|
+
r[s] - r[e] < a && (l += 1);
|
|
1994
1994
|
}
|
|
1995
1995
|
return l;
|
|
1996
1996
|
}
|
|
@@ -2097,7 +2097,7 @@ class P {
|
|
|
2097
2097
|
t.emit("init"), t.emit("afterInit"), t;
|
|
2098
2098
|
}
|
|
2099
2099
|
destroy(e = !0, t = !0) {
|
|
2100
|
-
const i = this, {params: n, el:
|
|
2100
|
+
const i = this, {params: n, el: r, wrapperEl: o, slides: a} = i;
|
|
2101
2101
|
return void 0 === i.params || i.destroyed || (i.emit("beforeDestroy"),
|
|
2102
2102
|
// Init Flag
|
|
2103
2103
|
i.initialized = !1,
|
|
@@ -2106,8 +2106,8 @@ class P {
|
|
|
2106
2106
|
// Destroy loop
|
|
2107
2107
|
n.loop && i.loopDestroy(),
|
|
2108
2108
|
// Cleanup styles
|
|
2109
|
-
t && (i.removeClasses(),
|
|
2110
|
-
|
|
2109
|
+
t && (i.removeClasses(), r && "string" != typeof r && r.removeAttribute("style"),
|
|
2110
|
+
o && o.removeAttribute("style"), a && a.length && a.forEach((e => {
|
|
2111
2111
|
e.classList.remove(n.slideVisibleClass, n.slideFullyVisibleClass, n.slideActiveClass, n.slideNextClass, n.slidePrevClass),
|
|
2112
2112
|
e.removeAttribute("style"), e.removeAttribute("data-swiper-slide-index");
|
|
2113
2113
|
}))), i.emit("destroy"),
|
|
@@ -2152,8 +2152,8 @@ class P {
|
|
|
2152
2152
|
|
|
2153
2153
|
/* eslint no-underscore-dangle: "off" */
|
|
2154
2154
|
/* eslint no-use-before-define: "off" */
|
|
2155
|
-
function Autoplay({swiper: e, extendParams: t, on: i, emit: n, params:
|
|
2156
|
-
let
|
|
2155
|
+
function Autoplay({swiper: e, extendParams: t, on: i, emit: n, params: r}) {
|
|
2156
|
+
let o, a;
|
|
2157
2157
|
e.autoplay = {
|
|
2158
2158
|
running: !1,
|
|
2159
2159
|
paused: !1,
|
|
@@ -2169,7 +2169,7 @@ function Autoplay({swiper: e, extendParams: t, on: i, emit: n, params: o}) {
|
|
|
2169
2169
|
pauseOnMouseEnter: !1
|
|
2170
2170
|
}
|
|
2171
2171
|
});
|
|
2172
|
-
let s, l, c, d, u, p, h, f =
|
|
2172
|
+
let s, l, c, d, u, p, h, f = r && r.autoplay ? r.autoplay.delay : 3e3, v = r && r.autoplay ? r.autoplay.delay : 3e3, g = (new Date).getTime();
|
|
2173
2173
|
function onTransitionEnd(t) {
|
|
2174
2174
|
e && !e.destroyed && e.wrapperEl && t.target === e.wrapperEl && (e.wrapperEl.removeEventListener("transitionend", onTransitionEnd),
|
|
2175
2175
|
h || t.detail && t.detail.bySwiperTouchMove || resume());
|
|
@@ -2195,17 +2195,17 @@ function Autoplay({swiper: e, extendParams: t, on: i, emit: n, params: o}) {
|
|
|
2195
2195
|
cancelAnimationFrame(a), calcTimeLeft();
|
|
2196
2196
|
let i = t;
|
|
2197
2197
|
void 0 === i && (i = getTotalDelay(), f = i, v = i), s = i;
|
|
2198
|
-
const
|
|
2199
|
-
e && !e.destroyed && (e.params.autoplay.reverseDirection ? !e.isBeginning || e.params.loop || e.params.rewind ? (e.slidePrev(
|
|
2200
|
-
n("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(e.slides.length - 1,
|
|
2201
|
-
n("autoplay")) : !e.isEnd || e.params.loop || e.params.rewind ? (e.slideNext(
|
|
2202
|
-
n("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(0,
|
|
2198
|
+
const r = e.params.speed, proceed = () => {
|
|
2199
|
+
e && !e.destroyed && (e.params.autoplay.reverseDirection ? !e.isBeginning || e.params.loop || e.params.rewind ? (e.slidePrev(r, !0, !0),
|
|
2200
|
+
n("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(e.slides.length - 1, r, !0, !0),
|
|
2201
|
+
n("autoplay")) : !e.isEnd || e.params.loop || e.params.rewind ? (e.slideNext(r, !0, !0),
|
|
2202
|
+
n("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(0, r, !0, !0),
|
|
2203
2203
|
n("autoplay")), e.params.cssMode && (g = (new Date).getTime(), requestAnimationFrame((() => {
|
|
2204
2204
|
run();
|
|
2205
2205
|
}))));
|
|
2206
2206
|
};
|
|
2207
2207
|
// eslint-disable-next-line
|
|
2208
|
-
return i > 0 ? (clearTimeout(
|
|
2208
|
+
return i > 0 ? (clearTimeout(o), o = setTimeout((() => {
|
|
2209
2209
|
proceed();
|
|
2210
2210
|
}), i)) : requestAnimationFrame((() => {
|
|
2211
2211
|
proceed();
|
|
@@ -2213,16 +2213,16 @@ function Autoplay({swiper: e, extendParams: t, on: i, emit: n, params: o}) {
|
|
|
2213
2213
|
}, start = () => {
|
|
2214
2214
|
g = (new Date).getTime(), e.autoplay.running = !0, run(), n("autoplayStart");
|
|
2215
2215
|
}, stop = () => {
|
|
2216
|
-
e.autoplay.running = !1, clearTimeout(
|
|
2216
|
+
e.autoplay.running = !1, clearTimeout(o), cancelAnimationFrame(a), n("autoplayStop");
|
|
2217
2217
|
}, pause = (t, i) => {
|
|
2218
2218
|
if (e.destroyed || !e.autoplay.running) return;
|
|
2219
|
-
clearTimeout(
|
|
2219
|
+
clearTimeout(o), t || (p = !0);
|
|
2220
2220
|
const proceed = () => {
|
|
2221
2221
|
n("autoplayPause"), e.params.autoplay.waitForTransition ? e.wrapperEl.addEventListener("transitionend", onTransitionEnd) : resume();
|
|
2222
2222
|
};
|
|
2223
2223
|
if (e.autoplay.paused = !0, i) return void proceed();
|
|
2224
|
-
const
|
|
2225
|
-
s =
|
|
2224
|
+
const r = s || e.params.autoplay.delay;
|
|
2225
|
+
s = r - ((new Date).getTime() - g), e.isEnd && s < 0 && !e.params.loop || (s < 0 && (s = 0),
|
|
2226
2226
|
proceed());
|
|
2227
2227
|
}, resume = () => {
|
|
2228
2228
|
e.isEnd && s < 0 && !e.params.loop || e.destroyed || !e.autoplay.running || (g = (new Date).getTime(),
|
|
@@ -2257,7 +2257,7 @@ function Autoplay({swiper: e, extendParams: t, on: i, emit: n, params: o}) {
|
|
|
2257
2257
|
}), 200)));
|
|
2258
2258
|
})), i("touchEnd", (() => {
|
|
2259
2259
|
if (!e.destroyed && e.autoplay.running && c) {
|
|
2260
|
-
if (clearTimeout(u), clearTimeout(
|
|
2260
|
+
if (clearTimeout(u), clearTimeout(o), e.params.autoplay.disableOnInteraction) return d = !1,
|
|
2261
2261
|
void (c = !1);
|
|
2262
2262
|
d && e.params.cssMode && resume(), d = !1, c = !1;
|
|
2263
2263
|
}
|
|
@@ -2278,29 +2278,29 @@ Object.keys(T).forEach((e => {
|
|
|
2278
2278
|
}));
|
|
2279
2279
|
})), P.use([ function({swiper: e, on: t, emit: i}) {
|
|
2280
2280
|
const n = getWindow();
|
|
2281
|
-
let
|
|
2281
|
+
let r = null, o = null;
|
|
2282
2282
|
const resizeHandler = () => {
|
|
2283
2283
|
e && !e.destroyed && e.initialized && (i("beforeResize"), i("resize"));
|
|
2284
2284
|
}, orientationChangeHandler = () => {
|
|
2285
2285
|
e && !e.destroyed && e.initialized && i("orientationchange");
|
|
2286
2286
|
};
|
|
2287
2287
|
t("init", (() => {
|
|
2288
|
-
e.params.resizeObserver && void 0 !== n.ResizeObserver ? e && !e.destroyed && e.initialized && (
|
|
2289
|
-
|
|
2288
|
+
e.params.resizeObserver && void 0 !== n.ResizeObserver ? e && !e.destroyed && e.initialized && (r = new ResizeObserver((t => {
|
|
2289
|
+
o = n.requestAnimationFrame((() => {
|
|
2290
2290
|
const {width: i, height: n} = e;
|
|
2291
|
-
let
|
|
2291
|
+
let r = i, o = n;
|
|
2292
2292
|
t.forEach((({contentBoxSize: t, contentRect: i, target: n}) => {
|
|
2293
|
-
n && n !== e.el || (
|
|
2294
|
-
})),
|
|
2293
|
+
n && n !== e.el || (r = i ? i.width : (t[0] || t).inlineSize, o = i ? i.height : (t[0] || t).blockSize);
|
|
2294
|
+
})), r === i && o === n || resizeHandler();
|
|
2295
2295
|
}));
|
|
2296
|
-
})),
|
|
2296
|
+
})), r.observe(e.el)) : (n.addEventListener("resize", resizeHandler), n.addEventListener("orientationchange", orientationChangeHandler));
|
|
2297
2297
|
})), t("destroy", (() => {
|
|
2298
|
-
|
|
2299
|
-
|
|
2298
|
+
o && n.cancelAnimationFrame(o), r && r.unobserve && e.el && (r.unobserve(e.el),
|
|
2299
|
+
r = null), n.removeEventListener("resize", resizeHandler), n.removeEventListener("orientationchange", orientationChangeHandler);
|
|
2300
2300
|
}));
|
|
2301
2301
|
}, function({swiper: e, extendParams: t, on: i, emit: n}) {
|
|
2302
|
-
const
|
|
2303
|
-
const a = new (
|
|
2302
|
+
const r = [], o = getWindow(), attach = (t, i = {}) => {
|
|
2303
|
+
const a = new (o.MutationObserver || o.WebkitMutationObserver)((t => {
|
|
2304
2304
|
// The observerUpdate event should only be triggered
|
|
2305
2305
|
// once despite the number of mutations. Additional
|
|
2306
2306
|
// triggers are redundant and are very costly
|
|
@@ -2309,13 +2309,13 @@ Object.keys(T).forEach((e => {
|
|
|
2309
2309
|
const observerUpdate = function() {
|
|
2310
2310
|
n("observerUpdate", t[0]);
|
|
2311
2311
|
};
|
|
2312
|
-
|
|
2312
|
+
o.requestAnimationFrame ? o.requestAnimationFrame(observerUpdate) : o.setTimeout(observerUpdate, 0);
|
|
2313
2313
|
}));
|
|
2314
2314
|
a.observe(t, {
|
|
2315
2315
|
attributes: void 0 === i.attributes || i.attributes,
|
|
2316
2316
|
childList: e.isElement || (void 0 === i.childList || i).childList,
|
|
2317
2317
|
characterData: void 0 === i.characterData || i.characterData
|
|
2318
|
-
}),
|
|
2318
|
+
}), r.push(a);
|
|
2319
2319
|
};
|
|
2320
2320
|
t({
|
|
2321
2321
|
observer: !1,
|
|
@@ -2344,9 +2344,9 @@ Object.keys(T).forEach((e => {
|
|
|
2344
2344
|
});
|
|
2345
2345
|
}
|
|
2346
2346
|
})), i("destroy", (() => {
|
|
2347
|
-
|
|
2347
|
+
r.forEach((e => {
|
|
2348
2348
|
e.disconnect();
|
|
2349
|
-
})),
|
|
2349
|
+
})), r.splice(0, r.length);
|
|
2350
2350
|
}));
|
|
2351
2351
|
} ]);
|
|
2352
2352
|
|
|
@@ -2388,8 +2388,54 @@ const E = 1024, O = class {
|
|
|
2388
2388
|
*/
|
|
2389
2389
|
this.label = "tecton.element.carousel.ariaLabel",
|
|
2390
2390
|
/** Display navigation arrow buttons as another way to navigate the carousel. */
|
|
2391
|
-
this.showNavigationArrows = !1,
|
|
2392
|
-
|
|
2391
|
+
this.showNavigationArrows = !1,
|
|
2392
|
+
/**
|
|
2393
|
+
* Rebuilt whenever a prop that feeds Swiper's static config (e.g. `loop`) changes,
|
|
2394
|
+
* since Swiper reads its options only at construction time.
|
|
2395
|
+
*/
|
|
2396
|
+
this.buildCarouselOptions = () => {
|
|
2397
|
+
this.universalCarouselOptions = {
|
|
2398
|
+
centeredSlides: !0,
|
|
2399
|
+
loop: !1 !== this.loop,
|
|
2400
|
+
focusableElements: "q2-btn, q2-dropdown, q2-item, q2-list, a, input, select, textarea, button, video, label, option",
|
|
2401
|
+
autoplay: this.autoPlay,
|
|
2402
|
+
modules: [ Autoplay ],
|
|
2403
|
+
on: {
|
|
2404
|
+
realIndexChange: e => {
|
|
2405
|
+
// When peek mode pads the DOM with duplicates (3- or 4-pane carousels),
|
|
2406
|
+
// `swiper.realIndex` can point at a duplicate; map it back to the 0..paneCount-1
|
|
2407
|
+
// range so `this.index`, pagination dots, and emitted events stay logical.
|
|
2408
|
+
const t = this.paneCount > 0 ? e.realIndex % this.paneCount : e.realIndex;
|
|
2409
|
+
this.index = t + 1, this.updateCarouselPaneProps();
|
|
2410
|
+
const i = !!document.activeElement.closest(`#q2-carousel-${this.guid} .q2-carousel-page-indicator`), n = !!document.activeElement.closest(`#q2-carousel-${this.guid} q2-carousel-pane`), r = i || n;
|
|
2411
|
+
this.handleAriaLive(r), p(this, [ "change", "tctChange" ], {
|
|
2412
|
+
index: t + 1
|
|
2413
|
+
}), i ? this.paginationBtns[t].focus({
|
|
2414
|
+
preventScroll: !0
|
|
2415
|
+
}) : n && e.slides[e.activeIndex].focus({
|
|
2416
|
+
preventScroll: !0
|
|
2417
|
+
});
|
|
2418
|
+
},
|
|
2419
|
+
afterInit: e => {
|
|
2420
|
+
var t;
|
|
2421
|
+
this.swiper = e, null === (t = this.activePane) || void 0 === t || t.addEventListener("popoverStateChanged", this.handlePopovers);
|
|
2422
|
+
},
|
|
2423
|
+
slideChangeTransitionEnd: () => {
|
|
2424
|
+
var e;
|
|
2425
|
+
null === (e = this.activePane) || void 0 === e || e.addEventListener("popoverStateChanged", this.handlePopovers);
|
|
2426
|
+
},
|
|
2427
|
+
slideChangeTransitionStart: () => {
|
|
2428
|
+
var e;
|
|
2429
|
+
null === (e = this.activePane) || void 0 === e || e.removeEventListener("popoverStateChanged", this.handlePopovers);
|
|
2430
|
+
}
|
|
2431
|
+
}
|
|
2432
|
+
}, this.fullWidthDisplayOptions = {
|
|
2433
|
+
slidesPerView: 1,
|
|
2434
|
+
spaceBetween: 100,
|
|
2435
|
+
...this.universalCarouselOptions
|
|
2436
|
+
};
|
|
2437
|
+
}, this.configureCarousel = (e, t) => {
|
|
2438
|
+
var i, n, r;
|
|
2393
2439
|
// Disconnect observer to prevent infinite loop from Swiper's internal DOM changes (e.g. loop mode)
|
|
2394
2440
|
null === (i = this.mutationObserver) || void 0 === i || i.disconnect(), this.swiper && this.tearDownCarousel(),
|
|
2395
2441
|
this.autoPlayInProgress = this.autoPlay,
|
|
@@ -2398,10 +2444,10 @@ const E = 1024, O = class {
|
|
|
2398
2444
|
this.syncPaneDuplicates(), this.updateCarouselPaneProps();
|
|
2399
2445
|
// Save the target index before Swiper init — the realIndexChange callback
|
|
2400
2446
|
// fires during construction and may overwrite this.index
|
|
2401
|
-
const
|
|
2402
|
-
new P(e, t),
|
|
2447
|
+
const o = this.realIndex;
|
|
2448
|
+
new P(e, t), this.slideToPane(o, 0),
|
|
2403
2449
|
// Ensure popover listener is on the active pane after initial positioning
|
|
2404
|
-
null === (
|
|
2450
|
+
null === (n = this.activePane) || void 0 === n || n.addEventListener("popoverStateChanged", this.handlePopovers),
|
|
2405
2451
|
this.autoPlayInProgress && (null === (r = this.swiper) || void 0 === r || r.autoplay.start()),
|
|
2406
2452
|
this.managePaneHeightObserver(),
|
|
2407
2453
|
// Re-observe after Swiper's DOM changes have settled
|
|
@@ -2412,6 +2458,9 @@ const E = 1024, O = class {
|
|
|
2412
2458
|
subtree: !0
|
|
2413
2459
|
});
|
|
2414
2460
|
}));
|
|
2461
|
+
}, this.getPaginationLabel = e => {
|
|
2462
|
+
const t = this.paneArray.find((t => t.index === e)), i = (null == t ? void 0 : t.label) || (null == t ? void 0 : t.getAttribute("label")), n = s("tecton.element.carousel.itemDescription", [ (e + 1).toString(), this.paneCount.toString() ]);
|
|
2463
|
+
return i ? `${s(i)}, ${n}` : n;
|
|
2415
2464
|
}, this.handleAutoPlayPause = e => {
|
|
2416
2465
|
var t;
|
|
2417
2466
|
if (!this.autoPlay) return;
|
|
@@ -2430,7 +2479,7 @@ const E = 1024, O = class {
|
|
|
2430
2479
|
null == t || t.disable()) : (i.style.left = null, i.style.transform = `translate3d(${null == t ? void 0 : t.translate}px, 0, 0)`,
|
|
2431
2480
|
null == t || t.enable());
|
|
2432
2481
|
}, this.keydownHandler = e => {
|
|
2433
|
-
var t, i
|
|
2482
|
+
var t, i;
|
|
2434
2483
|
switch (e.key) {
|
|
2435
2484
|
case "ArrowRight":
|
|
2436
2485
|
e.preventDefault(), null === (t = this.swiper) || void 0 === t || t.slideNext();
|
|
@@ -2441,11 +2490,11 @@ const E = 1024, O = class {
|
|
|
2441
2490
|
break;
|
|
2442
2491
|
|
|
2443
2492
|
case "Home":
|
|
2444
|
-
e.preventDefault(),
|
|
2493
|
+
e.preventDefault(), this.slideToPane(0);
|
|
2445
2494
|
break;
|
|
2446
2495
|
|
|
2447
2496
|
case "End":
|
|
2448
|
-
e.preventDefault(),
|
|
2497
|
+
e.preventDefault(), this.slideToPane(this.paneCount - 1);
|
|
2449
2498
|
}
|
|
2450
2499
|
}, this.managePaneHeightObserver = () => {
|
|
2451
2500
|
var e, t, i;
|
|
@@ -2469,6 +2518,16 @@ const E = 1024, O = class {
|
|
|
2469
2518
|
}, this.setCarouselWrapperWidth = () => {
|
|
2470
2519
|
this.insufficientPanes || (this.carouselWrapperWidth = this.carouselWrapper.clientWidth);
|
|
2471
2520
|
},
|
|
2521
|
+
/**
|
|
2522
|
+
* Swiper's `slideToLoop` snaps by real (logical) index but only exists when loop mode is on.
|
|
2523
|
+
* For non-looped carousels, `slideTo` targets the same logical index directly since the DOM
|
|
2524
|
+
* has no duplicates.
|
|
2525
|
+
*/
|
|
2526
|
+
this.slideToPane = (e, t) => {
|
|
2527
|
+
if (!this.swiper) return;
|
|
2528
|
+
const i = !1 !== this.loop ? this.swiper.slideToLoop : this.swiper.slideTo;
|
|
2529
|
+
void 0 === t ? i.call(this.swiper, e) : i.call(this.swiper, e, t);
|
|
2530
|
+
},
|
|
2472
2531
|
/**
|
|
2473
2532
|
* Swiper's loop mode needs enough DOM slides on both sides of a centered active slide. For
|
|
2474
2533
|
* two-pane full-width carousels and 3 to 5 pane peek carousels, we double the pane set in the
|
|
@@ -2477,11 +2536,14 @@ const E = 1024, O = class {
|
|
|
2477
2536
|
* logical index changes are mapped back to the real-pane range via `modulo paneCount`.
|
|
2478
2537
|
*/
|
|
2479
2538
|
this.syncPaneDuplicates = () => {
|
|
2480
|
-
|
|
2539
|
+
// Duplicates only exist to satisfy Swiper's loop-mode minimum slide count.
|
|
2540
|
+
// Non-looped carousels navigate their real panes directly.
|
|
2481
2541
|
if (Array.from(this.hostElement.querySelectorAll("q2-carousel-pane[data-q2-pane-duplicate]")).forEach((e => e.remove())),
|
|
2482
|
-
!
|
|
2483
|
-
const
|
|
2484
|
-
|
|
2542
|
+
!1 === this.loop) return;
|
|
2543
|
+
const e = this.paneArray, t = e.length;
|
|
2544
|
+
if (!(2 === t || !this.useFullWidthPanes && t >= 3 && t <= 5) || 0 === t) return;
|
|
2545
|
+
const i = e[0].parentElement;
|
|
2546
|
+
for (let n = 0; n < t; n += 1) {
|
|
2485
2547
|
// Build a fresh pane and clone only the user-authored slot content. Cloning the
|
|
2486
2548
|
// hydrated real pane would copy Stencil's rendered `<article class="...main-content">`
|
|
2487
2549
|
// wrapper, so when the duplicate hydrates it re-wraps → nested articles.
|
|
@@ -2489,11 +2551,11 @@ const E = 1024, O = class {
|
|
|
2489
2551
|
t.setAttribute("data-q2-pane-duplicate", "true"), t.setAttribute("aria-hidden", "true"),
|
|
2490
2552
|
// Apply the same classes Stencil will add on hydration so Swiper recognizes the
|
|
2491
2553
|
// duplicates as slides during initialization (which happens before Stencil runs).
|
|
2492
|
-
t.classList.add("q2-carousel-pane", "swiper-slide", `q2-carousel-pane-${
|
|
2493
|
-
const
|
|
2494
|
-
Array.from(
|
|
2554
|
+
t.classList.add("q2-carousel-pane", "swiper-slide", `q2-carousel-pane-${n}`);
|
|
2555
|
+
const r = e[n].querySelector(":scope > article.q2-carousel-pane-main-content") || e[n];
|
|
2556
|
+
Array.from(r.children).forEach((e => {
|
|
2495
2557
|
t.appendChild(e.cloneNode(!0));
|
|
2496
|
-
})),
|
|
2558
|
+
})), i.appendChild(t);
|
|
2497
2559
|
}
|
|
2498
2560
|
}, this.syncPaneHeights = () => {
|
|
2499
2561
|
var e, t;
|
|
@@ -2508,11 +2570,11 @@ const E = 1024, O = class {
|
|
|
2508
2570
|
// Swiper's loop mode reorders slide DOM nodes, so DOM order no longer matches pane identity.
|
|
2509
2571
|
// When Swiper has tagged a slide, use its data-swiper-slide-index as the authoritative index.
|
|
2510
2572
|
t.forEach(((t, n) => {
|
|
2511
|
-
const
|
|
2573
|
+
const r = t.getAttribute("data-swiper-slide-index"), o = null !== r ? parseInt(r, 10) : n, a = i > 0 ? o % i : o;
|
|
2512
2574
|
t.index = a, t.siblingCount = i, t.isActivePane = a === this.realIndex, t.slotFrameless = e || void 0;
|
|
2513
2575
|
}));
|
|
2514
2576
|
Array.from(this.hostElement.querySelectorAll("q2-carousel-pane[data-q2-pane-duplicate]")).forEach(((t, n) => {
|
|
2515
|
-
const
|
|
2577
|
+
const r = t.getAttribute("data-swiper-slide-index"), o = null !== r ? parseInt(r, 10) : n + i, a = i > 0 ? o % i : o;
|
|
2516
2578
|
t.index = a, t.siblingCount = i, t.isActivePane = !1, t.slotFrameless = e || void 0;
|
|
2517
2579
|
})), this.currentPaneCount = i;
|
|
2518
2580
|
},
|
|
@@ -2549,58 +2611,65 @@ const E = 1024, O = class {
|
|
|
2549
2611
|
}, i("strong", null, s("tecton.element.carousel.insufficientPanesMessageHeader"))), i("p", {
|
|
2550
2612
|
class: "insufficient-panes-body"
|
|
2551
2613
|
}, s("tecton.element.carousel.insufficientPanesMessageBody")));
|
|
2552
|
-
}, this.renderNextNavBtn = () =>
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2614
|
+
}, this.renderNextNavBtn = () => {
|
|
2615
|
+
const e = !1 === this.loop && this.realIndex >= this.paneCount - 1;
|
|
2616
|
+
return i("div", {
|
|
2617
|
+
class: "next-btn"
|
|
2618
|
+
}, i("q2-btn", {
|
|
2619
|
+
class: "q2-carousel-navigation-button q2-carousel-navigation-button-next",
|
|
2620
|
+
intent: "workflow-primary",
|
|
2621
|
+
label: s("tecton.element.carousel.nextItemLabel"),
|
|
2622
|
+
hideLabel: !0,
|
|
2623
|
+
disabled: e || void 0,
|
|
2624
|
+
onTctClick: () => {
|
|
2625
|
+
var e;
|
|
2626
|
+
return null === (e = this.swiper) || void 0 === e ? void 0 : e.slideNext();
|
|
2627
|
+
}
|
|
2628
|
+
}, i("q2-icon", {
|
|
2629
|
+
type: "arrow-right"
|
|
2630
|
+
})));
|
|
2631
|
+
}, this.renderPaginationArea = () => {
|
|
2632
|
+
const {useDynamicPaginationDots: e, realIndex: t, paneCount: n} = this, r = [ "q2-carousel-pagination", "autoplay" ];
|
|
2633
|
+
return e && r.push("dynamic"), this.autoPlayInProgress && r.push("autoplay-on"),
|
|
2567
2634
|
i("div", {
|
|
2568
|
-
class:
|
|
2635
|
+
class: r.join(" "),
|
|
2569
2636
|
role: "tablist",
|
|
2570
2637
|
"aria-label": s("tecton.element.carousel.tabWrapperLabel")
|
|
2571
2638
|
}, Array.from({
|
|
2572
2639
|
length: n
|
|
2573
|
-
}, ((e, t) => t)).map((
|
|
2574
|
-
const r =
|
|
2575
|
-
let
|
|
2576
|
-
r && (
|
|
2577
|
-
return Math.abs(
|
|
2640
|
+
}, ((e, t) => t)).map((n => {
|
|
2641
|
+
const r = n === t;
|
|
2642
|
+
let o = [ "q2-carousel-page-indicator", `q2-carousel-page-indicator-${n}` ];
|
|
2643
|
+
r && (o = [ ...o, "active-page" ]), e && (o = [ ...o, "dynamic" ]);
|
|
2644
|
+
return Math.abs(n - t) <= 2 && !r && (o = [ ...o, "active-adjacent" ]), i("button", {
|
|
2578
2645
|
type: "button",
|
|
2579
2646
|
role: "tab",
|
|
2580
2647
|
tabIndex: r ? void 0 : -1,
|
|
2581
2648
|
"aria-selected": `${r}`,
|
|
2582
|
-
class:
|
|
2583
|
-
onClick: () =>
|
|
2584
|
-
var e;
|
|
2585
|
-
return null === (e = this.swiper) || void 0 === e ? void 0 : e.slideToLoop(o);
|
|
2586
|
-
},
|
|
2649
|
+
class: o.join(" "),
|
|
2650
|
+
onClick: () => this.slideToPane(n),
|
|
2587
2651
|
onKeyDown: this.keydownHandler,
|
|
2588
|
-
"aria-label":
|
|
2652
|
+
"aria-label": this.getPaginationLabel(n)
|
|
2589
2653
|
});
|
|
2590
2654
|
})));
|
|
2591
|
-
}, this.renderPrevNavBtn = () =>
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2655
|
+
}, this.renderPrevNavBtn = () => {
|
|
2656
|
+
const e = !1 === this.loop && this.realIndex <= 0;
|
|
2657
|
+
return i("div", {
|
|
2658
|
+
class: "prev-btn"
|
|
2659
|
+
}, i("q2-btn", {
|
|
2660
|
+
class: "q2-carousel-navigation-button q2-carousel-navigation-button-prev",
|
|
2661
|
+
intent: "workflow-primary",
|
|
2662
|
+
label: s("tecton.element.carousel.previousItemLabel"),
|
|
2663
|
+
hideLabel: !0,
|
|
2664
|
+
disabled: e || void 0,
|
|
2665
|
+
onTctClick: () => {
|
|
2666
|
+
var e;
|
|
2667
|
+
return null === (e = this.swiper) || void 0 === e ? void 0 : e.slidePrev();
|
|
2668
|
+
}
|
|
2669
|
+
}, i("q2-icon", {
|
|
2670
|
+
type: "arrow-left"
|
|
2671
|
+
})));
|
|
2672
|
+
};
|
|
2604
2673
|
}
|
|
2605
2674
|
// #endregion
|
|
2606
2675
|
// #region Component Lifecycle Events
|
|
@@ -2613,46 +2682,7 @@ const E = 1024, O = class {
|
|
|
2613
2682
|
componentWillLoad() {
|
|
2614
2683
|
l(this), this.updateCarouselPaneProps(), window.addEventListener("resize", this.setCarouselWrapperWidth),
|
|
2615
2684
|
h(this.hostElement, "q2-carousel-pane") || f(this.hostElement, "q2-carousel-pane"),
|
|
2616
|
-
this.
|
|
2617
|
-
centeredSlides: !0,
|
|
2618
|
-
loop: !0,
|
|
2619
|
-
focusableElements: "q2-btn, q2-dropdown, q2-item, q2-list, a, input, select, textarea, button, video, label, option",
|
|
2620
|
-
autoplay: this.autoPlay,
|
|
2621
|
-
modules: [ Autoplay ],
|
|
2622
|
-
on: {
|
|
2623
|
-
realIndexChange: e => {
|
|
2624
|
-
// When peek mode pads the DOM with duplicates (3- or 4-pane carousels),
|
|
2625
|
-
// `swiper.realIndex` can point at a duplicate; map it back to the 0..paneCount-1
|
|
2626
|
-
// range so `this.index`, pagination dots, and emitted events stay logical.
|
|
2627
|
-
const t = this.paneCount > 0 ? e.realIndex % this.paneCount : e.realIndex;
|
|
2628
|
-
this.index = t + 1, this.updateCarouselPaneProps();
|
|
2629
|
-
const i = !!document.activeElement.closest(`#q2-carousel-${this.guid} .q2-carousel-page-indicator`), n = !!document.activeElement.closest(`#q2-carousel-${this.guid} q2-carousel-pane`), o = i || n;
|
|
2630
|
-
this.handleAriaLive(o), p(this, [ "change", "tctChange" ], {
|
|
2631
|
-
index: t + 1
|
|
2632
|
-
}), i ? this.paginationBtns[t].focus({
|
|
2633
|
-
preventScroll: !0
|
|
2634
|
-
}) : n && e.slides[e.activeIndex].focus({
|
|
2635
|
-
preventScroll: !0
|
|
2636
|
-
});
|
|
2637
|
-
},
|
|
2638
|
-
afterInit: e => {
|
|
2639
|
-
var t;
|
|
2640
|
-
this.swiper = e, null === (t = this.activePane) || void 0 === t || t.addEventListener("popoverStateChanged", this.handlePopovers);
|
|
2641
|
-
},
|
|
2642
|
-
slideChangeTransitionEnd: () => {
|
|
2643
|
-
var e;
|
|
2644
|
-
null === (e = this.activePane) || void 0 === e || e.addEventListener("popoverStateChanged", this.handlePopovers);
|
|
2645
|
-
},
|
|
2646
|
-
slideChangeTransitionStart: () => {
|
|
2647
|
-
var e;
|
|
2648
|
-
null === (e = this.activePane) || void 0 === e || e.removeEventListener("popoverStateChanged", this.handlePopovers);
|
|
2649
|
-
}
|
|
2650
|
-
}
|
|
2651
|
-
}, this.fullWidthDisplayOptions = {
|
|
2652
|
-
slidesPerView: 1,
|
|
2653
|
-
spaceBetween: 100,
|
|
2654
|
-
...this.universalCarouselOptions
|
|
2655
|
-
};
|
|
2685
|
+
this.buildCarouselOptions();
|
|
2656
2686
|
}
|
|
2657
2687
|
componentDidLoad() {
|
|
2658
2688
|
this.setCarouselWrapperWidth(), this.carouselWrapper && this.paneArray.length && this.configureCarousel(this.carouselWrapper, this.activeCarouselOptions);
|
|
@@ -2665,8 +2695,7 @@ const E = 1024, O = class {
|
|
|
2665
2695
|
// #endregion
|
|
2666
2696
|
// #region Listeners
|
|
2667
2697
|
carouselPaneClicked(e) {
|
|
2668
|
-
|
|
2669
|
-
null === (t = this.swiper) || void 0 === t || t.slideToLoop(e.detail.paneIndex);
|
|
2698
|
+
this.slideToPane(e.detail.paneIndex);
|
|
2670
2699
|
}
|
|
2671
2700
|
delegateFocus(e) {
|
|
2672
2701
|
var t, i;
|
|
@@ -2682,11 +2711,11 @@ const E = 1024, O = class {
|
|
|
2682
2711
|
* @testOnly
|
|
2683
2712
|
*/
|
|
2684
2713
|
async selectCarouselPane(e) {
|
|
2685
|
-
var t, i
|
|
2714
|
+
var t, i;
|
|
2686
2715
|
if (e > this.paneCount) return;
|
|
2687
|
-
const
|
|
2688
|
-
|
|
2689
|
-
const r = null === (
|
|
2716
|
+
const n = e > 0 ? e - 1 : 0;
|
|
2717
|
+
this.slideToPane(n);
|
|
2718
|
+
const r = null === (t = this.swiper) || void 0 === t ? void 0 : t.slides[null === (i = this.swiper) || void 0 === i ? void 0 : i.activeIndex];
|
|
2690
2719
|
null == r || r.focus({
|
|
2691
2720
|
preventScroll: !0
|
|
2692
2721
|
});
|
|
@@ -2718,7 +2747,7 @@ const E = 1024, O = class {
|
|
|
2718
2747
|
this.updateCarouselPaneProps(), this.revampCarousel();
|
|
2719
2748
|
}
|
|
2720
2749
|
revampCarousel() {
|
|
2721
|
-
this.configureCarousel(this.carouselWrapper, this.activeCarouselOptions);
|
|
2750
|
+
this.buildCarouselOptions(), this.syncPaneDuplicates(), this.configureCarousel(this.carouselWrapper, this.activeCarouselOptions);
|
|
2722
2751
|
}
|
|
2723
2752
|
indexChanged(e) {
|
|
2724
2753
|
// this allows the carousel to be swiped programmatically via the index prop
|
|
@@ -2726,7 +2755,7 @@ const E = 1024, O = class {
|
|
|
2726
2755
|
// Small looped carousels duplicate the pane set, so `swiper.realIndex` may point
|
|
2727
2756
|
// at a duplicate. Compare against its logical (mod paneCount) equivalent before deciding
|
|
2728
2757
|
// to programmatically slide — otherwise the watcher fights our own realIndexChange mapping.
|
|
2729
|
-
e !== (this.paneCount > 0 ? this.swiper.realIndex % this.paneCount : this.swiper.realIndex) + 1 && this.
|
|
2758
|
+
e !== (this.paneCount > 0 ? this.swiper.realIndex % this.paneCount : this.swiper.realIndex) + 1 && this.slideToPane(this.realIndex);
|
|
2730
2759
|
}
|
|
2731
2760
|
// #endregion
|
|
2732
2761
|
// #region Local Methods
|
|
@@ -2782,14 +2811,14 @@ const E = 1024, O = class {
|
|
|
2782
2811
|
this.autoPlayInProgress && !e ? this.ariaLiveValue = "off" : this.ariaLiveValue = "polite";
|
|
2783
2812
|
}
|
|
2784
2813
|
render() {
|
|
2785
|
-
const {paneCount: e, useFullWidthPanes: t, framelessPanes:
|
|
2814
|
+
const {paneCount: e, useFullWidthPanes: t, framelessPanes: o, compactMode: a, showNavigationArrows: l, arrowPosition: c = "bottom", insufficientPanes: d, autoPlay: u, hidePagination: p, ariaLiveValue: h, label: f} = this;
|
|
2786
2815
|
let v = [ "q2-carousel-swiper-container", "swiper" ];
|
|
2787
|
-
t && (v = [ ...v, "full-width-display" ]),
|
|
2816
|
+
t && (v = [ ...v, "full-width-display" ]), o && (v = [ ...v, "frameless-display" ]),
|
|
2788
2817
|
t || (v = [ ...v, "content-peek-display" ]), a && (v = [ ...v, "compact" ]);
|
|
2789
2818
|
const g = [ "q2-carousel-pagination-navigation-wrapper" ];
|
|
2790
2819
|
return l && "bottom" === c && g.push("evenly-space"), l && "hug" === c && g.push("center-space"),
|
|
2791
|
-
i(
|
|
2792
|
-
key: "
|
|
2820
|
+
i(r, {
|
|
2821
|
+
key: "2c623516b2b0ce7800440110cde323bdf065abc1",
|
|
2793
2822
|
id: `q2-carousel-${this.guid}`,
|
|
2794
2823
|
class: "q2-carousel-instance"
|
|
2795
2824
|
}, d ? this.renderInsufficientPanesDisplay() : i(n, null, e > 1 && i("div", {
|
|
@@ -2817,7 +2846,7 @@ const E = 1024, O = class {
|
|
|
2817
2846
|
}, this.renderPrevNavBtn(), this.renderNextNavBtn())))));
|
|
2818
2847
|
}
|
|
2819
2848
|
get hostElement() {
|
|
2820
|
-
return
|
|
2849
|
+
return o(this);
|
|
2821
2850
|
}
|
|
2822
2851
|
static get watchers() {
|
|
2823
2852
|
return {
|
|
@@ -2844,6 +2873,9 @@ const E = 1024, O = class {
|
|
|
2844
2873
|
autoPlay: [ {
|
|
2845
2874
|
revampCarousel: 0
|
|
2846
2875
|
} ],
|
|
2876
|
+
loop: [ {
|
|
2877
|
+
revampCarousel: 0
|
|
2878
|
+
} ],
|
|
2847
2879
|
index: [ {
|
|
2848
2880
|
indexChanged: 0
|
|
2849
2881
|
} ]
|
|
@@ -2851,6 +2883,6 @@ const E = 1024, O = class {
|
|
|
2851
2883
|
}
|
|
2852
2884
|
};
|
|
2853
2885
|
|
|
2854
|
-
O.style = '*{box-sizing:border-box}*:active{outline:none}*:focus-visible{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}q2-carousel{display:grid;grid-template-rows:repeat(2, auto);gap:var(--tct-carousel-gap, var(--app-scale-2x, 10px))}.swiper{--comp-container-padding:var(--app-scale-1x, 5px) 0 var(--app-scale-2x, 10px);display:block;width:100%;margin-left:auto;margin-right:auto;position:relative;overflow:hidden;padding:var(--tct-carousel-container-padding, var(--t-carousel-container-padding, var(--comp-container-padding, 5px 0 10px)))}.insufficient-pane-feedback{text-align:center;box-shadow:var(--app-shadow-2, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 4px 8px rgba(0, 0, 0, 0.14));background:var(--tct-carousel-background, var(--tct-carousel-background-color, var(--t-carousel-background-color, var(--tct-white, var(--app-white, #ffffff)))));border:var(--tct-carousel-pane-border-width, var(--t-carousel-pane-border-width, 1px)) solid var(--tct-carousel-pane-border-color, var(--t-carousel-pane-border-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))));border-radius:var(--tct-carousel-pane-border-radius, var(--t-carousel-pane-border-radius, 8px));padding:var(--tct-carousel-pane-padding, var(--t-carousel-pane-padding, 7px))}.insufficient-pane-feedback.content-peek-display{max-width:395px;margin:0 auto}.insufficient-pane-feedback .insufficient-panes-header,.insufficient-pane-feedback .insufficient-panes-body{text-align:center}.insufficient-pane-feedback .insufficient-panes-header strong{font-weight:600}.insufficient-pane-feedback .insufficient-panes-body{margin:0 auto 2rem auto;max-width:75%}.insufficient-pane-feedback .insufficient-panes-icon-wrapper{display:flex;justify-content:center;margin:1rem 0 2rem 0}.insufficient-pane-feedback .insufficient-panes-icon-wrapper q2-icon{width:38px}.q2-carousel-pagination-navigation-wrapper{grid-row:2;display:flex;justify-content:center;align-items:center;min-height:44px}.q2-carousel-pagination-navigation-wrapper.evenly-space{justify-content:space-between}.q2-carousel-pagination-navigation-wrapper.center-space{justify-content:center}.q2-carousel-pagination-navigation-wrapper.center-space .q2-carousel-control-center-tray{margin:var(--tct-carousel-pagination-center-tray-margin, 0 24px)}.q2-carousel-floating-arrow-wrapper{--comp-pagination-arrow-height:var(--tct-carousel-floating-nav-arrow-height, 44px);width:auto;z-index:2;display:flex;position:absolute;left:10px;right:10px;top:calc(50% - var(--comp-pagination-arrow-height) / 2);height:var(--comp-pagination-arrow-height);justify-content:space-between;align-items:center}.q2-carousel-control-center-tray{display:flex;align-items:center;gap:var(--tct-carousel-control-gap, 16px)}.q2-carousel-swiper-wrapper.compact{overflow:visible}.q2-carousel-swiper-wrapper.compact q2-btn{margin-top:4px}.q2-carousel-pagination{height:var(--tct-carousel-pagination-height, 12px);display:flex;align-content:center;justify-content:center;gap:0.5rem;--comp-carousel-page-transition-duration:var(--tct-carousel-page-transition-duration, 0.3s)}.q2-carousel-pagination .q2-carousel-page-indicator{display:inline-block;height:var(--tct-carousel-indicator-size, 8px);width:var(--tct-carousel-indicator-size, 8px);border-radius:var(--tct-carousel-active-page-border-radius, 4px);background-color:var(--tct-carousel-page-indicator-inactive-color, var(--t-gray11, #cccccc));padding:0;border:0;transition:width 0.3s ease, background-color 0.3s ease 0.3s;transition-duration:var(--comp-carousel-page-transition-duration)}.q2-carousel-pagination .q2-carousel-page-indicator:hover{background-color:var(--tct-carousel-indicator-active, var(--t-primary, #6a4a9e));transition:background-color 0.3s ease;transition-duration:var(--comp-carousel-page-transition-duration)}.q2-carousel-pagination .q2-carousel-page-indicator.active-page{width:var(--tct-carousel-indicator-active-width, 24px);border-radius:var(--tct-carousel-active-page-border-radius, 4px);background-color:var(--tct-carousel-indicator-active, var(--t-primary, #6A4A9E))}.q2-carousel-pagination .q2-carousel-page-indicator.active-page:focus-visible{box-shadow:var(--tct-carousel-indicator-active-focus-visible-box-shadow, var(--const-double-focus-ring))}.q2-carousel-pagination.dynamic .q2-carousel-page-indicator{display:none}.q2-carousel-pagination.dynamic .q2-carousel-page-indicator.active-page,.q2-carousel-pagination.dynamic .q2-carousel-page-indicator.active-adjacent{display:inline-block;height:8px;width:8px}.q2-carousel-pagination.autoplay{align-items:center;gap:var(--tct-carousel-pagination-gap, var(--app-scale-2x, 8px))}.q2-carousel-pagination.autoplay.autoplay-on{--comp-carousel-indicator-grow-animation:autoplay-progress 3s linear forwards}.q2-carousel-pagination.autoplay .q2-carousel-page-indicator{height:var(--tct-carousel-page-indicator-height, 8px);width:var(--tct-carousel-page-indicator-width, 8px);transition:width 0.3s ease;transition-duration:var(--comp-carousel-page-transition-duration)}.q2-carousel-pagination.autoplay .q2-carousel-page-indicator.active-page{width:var(--tct-carousel-indicator-active-width, 24px);border-radius:var(--tct-carousel-active-page-border-radius, 4px);background-color:var(--tct-carousel-indicator-inactive, var(--t-gray11, #cccccc));position:relative;overflow:hidden}.q2-carousel-pagination.autoplay .q2-carousel-page-indicator.active-page::after{content:"";position:absolute;top:0;left:0;height:100%;width:100%;border-radius:var(--tct-carousel-active-page-border-radius-pseudo, 4px);background-color:var(--tct-carousel-indicator-active, var(--t-primary, #6a4a9e));transform-origin:left;animation:var(--comp-carousel-indicator-grow-animation, none)}@keyframes autoplay-progress{from{transform:scaleX(0)}to{transform:scaleX(1)}}.q2-carousel-section-wrapper{position:relative;grid-row:1;overflow:hidden}.q2-carousel-edge-fade{position:absolute;top:0;bottom:0;width:var(--tct-carousel-edge-fade-width, 64px);z-index:10;pointer-events:none}.q2-carousel-edge-fade-left{left:0;background:linear-gradient(to right, var(--tct-carousel-edge-fade-color, #ffffff), transparent)}.q2-carousel-edge-fade-right{right:0;background:linear-gradient(to left, var(--tct-carousel-edge-fade-color, #ffffff), transparent)}.q2-carousel-swiper-container{}.q2-carousel-swiper-container .swiper-wrapper{position:relative;width:100%;z-index:1;display:flex;transition-property:transform;box-sizing:content-box}.q2-carousel-swiper-container.content-peek-display .q2-carousel-pane:not(.swiper-slide-active){transform:scale(var(--tct-carousel-neighbor-pane-scale, 1))}.q2-carousel-swiper-container.frameless-display{padding:var(--tct-carousel-frameless-container-padding, var(--t-carousel-frameless-container-padding, 0))}.q2-carousel-swiper-container.full-width-display{--comp-container-padding:var(--app-scale-1x, 5px) var(--app-scale-2x, 10px) var(--app-scale-2x, 10px);padding:var(--tct-carousel-full-width-container-padding, var(--t-carousel-full-width-container-padding, var(--comp-container-padding, 5px 10px 10px)))}.q2-carousel-navigation-button{
|
|
2886
|
+
O.style = '*{box-sizing:border-box}*:active{outline:none}*:focus-visible{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}@container style(--t-prefers-motion: "reduced"){*,*::before,*::after{animation-duration:0.01ms !important;transition-duration:0.01ms !important;animation-delay:0ms !important;transition-delay:0ms !important}}@container (not style(--t-prefers-motion: "normal")) and (not style(--t-prefers-motion: "reduced")){@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:0.01ms !important;transition-duration:0.01ms !important;animation-delay:0ms !important;transition-delay:0ms !important}}}q2-carousel{display:grid;grid-template-rows:repeat(2, auto);gap:var(--tct-carousel-gap, var(--app-scale-2x, 10px))}.swiper{--comp-container-padding:var(--app-scale-1x, 5px) 0 var(--app-scale-2x, 10px);display:block;width:100%;margin-left:auto;margin-right:auto;position:relative;overflow:hidden;padding:var(--tct-carousel-container-padding, var(--t-carousel-container-padding, var(--comp-container-padding, 5px 0 10px)))}.insufficient-pane-feedback{text-align:center;box-shadow:var(--app-shadow-2, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 4px 8px rgba(0, 0, 0, 0.14));background:var(--tct-carousel-background, var(--tct-carousel-background-color, var(--t-carousel-background-color, var(--tct-white, var(--app-white, #ffffff)))));border:var(--tct-carousel-pane-border-width, var(--t-carousel-pane-border-width, 1px)) solid var(--tct-carousel-pane-border-color, var(--t-carousel-pane-border-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))));border-radius:var(--tct-carousel-pane-border-radius, var(--t-carousel-pane-border-radius, 8px));padding:var(--tct-carousel-pane-padding, var(--t-carousel-pane-padding, 7px))}.insufficient-pane-feedback.content-peek-display{max-width:395px;margin:0 auto}.insufficient-pane-feedback .insufficient-panes-header,.insufficient-pane-feedback .insufficient-panes-body{text-align:center}.insufficient-pane-feedback .insufficient-panes-header strong{font-weight:600}.insufficient-pane-feedback .insufficient-panes-body{margin:0 auto 2rem auto;max-width:75%}.insufficient-pane-feedback .insufficient-panes-icon-wrapper{display:flex;justify-content:center;margin:1rem 0 2rem 0}.insufficient-pane-feedback .insufficient-panes-icon-wrapper q2-icon{width:38px}.q2-carousel-pagination-navigation-wrapper{grid-row:2;display:flex;justify-content:center;align-items:center;min-height:44px}.q2-carousel-pagination-navigation-wrapper.evenly-space{justify-content:space-between}.q2-carousel-pagination-navigation-wrapper.center-space{justify-content:center}.q2-carousel-pagination-navigation-wrapper.center-space .q2-carousel-control-center-tray{margin:var(--tct-carousel-pagination-center-tray-margin, 0 24px)}.q2-carousel-floating-arrow-wrapper{--comp-pagination-arrow-height:var(--tct-carousel-floating-nav-arrow-height, 44px);width:auto;z-index:2;display:flex;position:absolute;left:10px;right:10px;top:calc(50% - var(--comp-pagination-arrow-height) / 2);height:var(--comp-pagination-arrow-height);justify-content:space-between;align-items:center}.q2-carousel-control-center-tray{display:flex;align-items:center;gap:var(--tct-carousel-control-gap, 16px)}.q2-carousel-swiper-wrapper.compact{overflow:visible}.q2-carousel-swiper-wrapper.compact q2-btn{margin-top:4px}.q2-carousel-pagination{height:var(--tct-carousel-pagination-height, 12px);display:flex;align-content:center;justify-content:center;gap:0.5rem;--comp-carousel-page-transition-duration:var(--tct-carousel-page-transition-duration, 0.3s)}.q2-carousel-pagination .q2-carousel-page-indicator{display:inline-block;height:var(--tct-carousel-indicator-size, 8px);width:var(--tct-carousel-indicator-size, 8px);border-radius:var(--tct-carousel-active-page-border-radius, 4px);background-color:var(--tct-carousel-page-indicator-inactive-color, var(--t-gray11, #cccccc));padding:0;border:0;transition:width 0.3s ease, background-color 0.3s ease 0.3s;transition-duration:var(--comp-carousel-page-transition-duration)}.q2-carousel-pagination .q2-carousel-page-indicator:hover{background-color:var(--tct-carousel-indicator-active, var(--t-primary, #6a4a9e));transition:background-color 0.3s ease;transition-duration:var(--comp-carousel-page-transition-duration)}.q2-carousel-pagination .q2-carousel-page-indicator.active-page{width:var(--tct-carousel-indicator-active-width, 24px);border-radius:var(--tct-carousel-active-page-border-radius, 4px);background-color:var(--tct-carousel-indicator-active, var(--t-primary, #6A4A9E))}.q2-carousel-pagination .q2-carousel-page-indicator.active-page:focus-visible{box-shadow:var(--tct-carousel-indicator-active-focus-visible-box-shadow, var(--const-double-focus-ring))}.q2-carousel-pagination.dynamic .q2-carousel-page-indicator{display:none}.q2-carousel-pagination.dynamic .q2-carousel-page-indicator.active-page,.q2-carousel-pagination.dynamic .q2-carousel-page-indicator.active-adjacent{display:inline-block;height:8px;width:8px}.q2-carousel-pagination.autoplay{align-items:center;gap:var(--tct-carousel-pagination-gap, var(--app-scale-2x, 8px))}.q2-carousel-pagination.autoplay.autoplay-on{--comp-carousel-indicator-grow-animation:autoplay-progress 3s linear forwards}.q2-carousel-pagination.autoplay .q2-carousel-page-indicator{height:var(--tct-carousel-page-indicator-height, 8px);width:var(--tct-carousel-page-indicator-width, 8px);transition:width 0.3s ease;transition-duration:var(--comp-carousel-page-transition-duration)}.q2-carousel-pagination.autoplay .q2-carousel-page-indicator.active-page{width:var(--tct-carousel-indicator-active-width, 24px);border-radius:var(--tct-carousel-active-page-border-radius, 4px);background-color:var(--tct-carousel-indicator-inactive, var(--t-gray11, #cccccc));position:relative;overflow:hidden}.q2-carousel-pagination.autoplay .q2-carousel-page-indicator.active-page::after{content:"";position:absolute;top:0;left:0;height:100%;width:100%;border-radius:var(--tct-carousel-active-page-border-radius-pseudo, 4px);background-color:var(--tct-carousel-indicator-active, var(--t-primary, #6a4a9e));transform-origin:left;animation:var(--comp-carousel-indicator-grow-animation, none)}@keyframes autoplay-progress{from{transform:scaleX(0)}to{transform:scaleX(1)}}.q2-carousel-section-wrapper{position:relative;grid-row:1;overflow:hidden}.q2-carousel-edge-fade{position:absolute;top:0;bottom:0;width:var(--tct-carousel-edge-fade-width, 64px);z-index:10;pointer-events:none}.q2-carousel-edge-fade-left{left:0;background:linear-gradient(to right, var(--tct-carousel-edge-fade-color, #ffffff), transparent)}.q2-carousel-edge-fade-right{right:0;background:linear-gradient(to left, var(--tct-carousel-edge-fade-color, #ffffff), transparent)}.q2-carousel-swiper-container{}.q2-carousel-swiper-container .swiper-wrapper{position:relative;width:100%;z-index:1;display:flex;transition-property:transform;box-sizing:content-box}.q2-carousel-swiper-container.content-peek-display .q2-carousel-pane:not(.swiper-slide-active){transform:scale(var(--tct-carousel-neighbor-pane-scale, 1))}.q2-carousel-swiper-container.frameless-display{padding:var(--tct-carousel-frameless-container-padding, var(--t-carousel-frameless-container-padding, 0))}.q2-carousel-swiper-container.full-width-display{--comp-container-padding:var(--app-scale-1x, 5px) var(--app-scale-2x, 10px) var(--app-scale-2x, 10px);padding:var(--tct-carousel-full-width-container-padding, var(--t-carousel-full-width-container-padding, var(--comp-container-padding, 5px 10px 10px)))}.q2-carousel-navigation-button{--tct-btn-icon-width:32px;--tct-btn-icon-height:32px;--tct-btn-icon-border-radius:50%;--tct-btn-icon-padding:0;--tct-icon-size:16px;--tct-btn-primary-background:var(--tct-carousel-arrow-background, var(--tct-carousel-indicator-active, var(--t-primary, #6a4a9e)));--tct-btn-primary-hover-background:var(--tct-carousel-arrow-hover-background, var(--t-primary-d1, #5f438e));opacity:var(--tct-carousel-navigation-arrow-opacity, 1)}.q2-carousel-autoplay-control{display:flex;align-items:center;justify-content:center;position:relative;width:44px;height:44px;padding:0;border:none;background:transparent;cursor:pointer;-webkit-tap-highlight-color:transparent}.q2-carousel-autoplay-control::before{content:"";position:absolute;width:32px;height:32px;border-radius:50%;background:transparent;transition:background-color var(--t-tween-time-in-2, 200ms) var(--t-tween-ease-inout, cubic-bezier(0.4, 0, 0.2, 1))}.q2-carousel-autoplay-control:hover::before,.q2-carousel-autoplay-control:focus-visible::before{background-color:var(--tct-carousel-autoplay-hover-background, var(--t-gray13, #e6e6e6))}.q2-carousel-autoplay-control:focus-visible{outline:none}.q2-carousel-autoplay-control:focus-visible::before{outline:2px solid var(--const-focus-color, #1a73e8);outline-offset:2px}.q2-carousel-autoplay-control .autoplay-icon{position:relative;width:var(--tct-carousel-autoplay-icon-width, 16px);height:var(--tct-carousel-autoplay-icon-height, 16px);color:var(--tct-carousel-autoplay-icon-color, var(--t-gray6, #4d4d4d))}';
|
|
2855
2887
|
|
|
2856
2888
|
export { O as q2_carousel }
|