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 { proxyCustomElement as e, HTMLElement as t, createEvent as i, h as n, Host as
|
|
1
|
+
import { proxyCustomElement as e, HTMLElement as t, createEvent as i, h as n, Host as r, Fragment as o, transformTag as a } from "@stencil/core/internal/client";
|
|
2
2
|
|
|
3
3
|
import { c as s, l, h as c, o as d, i as u, d as p } from "./index2.js";
|
|
4
4
|
|
|
@@ -6,9 +6,13 @@ import { m as h } from "./mirror-emit.js";
|
|
|
6
6
|
|
|
7
7
|
import { h as f, f as v } from "./component.js";
|
|
8
8
|
|
|
9
|
-
import { d as g } from "./q2-
|
|
9
|
+
import { d as g } from "./q2-btn2.js";
|
|
10
10
|
|
|
11
|
-
import { d as m } from "./q2-
|
|
11
|
+
import { d as m } from "./q2-carousel-pane2.js";
|
|
12
|
+
|
|
13
|
+
import { d as w } from "./q2-icon2.js";
|
|
14
|
+
|
|
15
|
+
import { d as b } from "./q2-loading2.js";
|
|
12
16
|
|
|
13
17
|
/**
|
|
14
18
|
* SSR Window 5.0.1
|
|
@@ -32,7 +36,7 @@ function extend$1(e = {}, t = {}) {
|
|
|
32
36
|
}));
|
|
33
37
|
}
|
|
34
38
|
|
|
35
|
-
const
|
|
39
|
+
const x = {
|
|
36
40
|
body: {},
|
|
37
41
|
addEventListener() {},
|
|
38
42
|
removeEventListener() {},
|
|
@@ -69,11 +73,11 @@ const w = {
|
|
|
69
73
|
|
|
70
74
|
function getDocument() {
|
|
71
75
|
const e = "undefined" != typeof document ? document : {};
|
|
72
|
-
return extend$1(e,
|
|
76
|
+
return extend$1(e, x), e;
|
|
73
77
|
}
|
|
74
78
|
|
|
75
|
-
const
|
|
76
|
-
document:
|
|
79
|
+
const y = {
|
|
80
|
+
document: x,
|
|
77
81
|
navigator: {
|
|
78
82
|
userAgent: ""
|
|
79
83
|
},
|
|
@@ -115,7 +119,7 @@ const b = {
|
|
|
115
119
|
|
|
116
120
|
function getWindow() {
|
|
117
121
|
const e = "undefined" != typeof window ? window : {};
|
|
118
|
-
return extend$1(e,
|
|
122
|
+
return extend$1(e, y), e;
|
|
119
123
|
}
|
|
120
124
|
|
|
121
125
|
function nextTick(e, t = 0) {
|
|
@@ -128,24 +132,24 @@ function now() {
|
|
|
128
132
|
|
|
129
133
|
function getTranslate(e, t = "x") {
|
|
130
134
|
const i = getWindow();
|
|
131
|
-
let n,
|
|
135
|
+
let n, r, o;
|
|
132
136
|
const a = function(e) {
|
|
133
137
|
const t = getWindow();
|
|
134
138
|
let i;
|
|
135
139
|
return t.getComputedStyle && (i = t.getComputedStyle(e, null)), !i && e.currentStyle && (i = e.currentStyle),
|
|
136
140
|
i || (i = e.style), i;
|
|
137
141
|
}(e);
|
|
138
|
-
return i.WebKitCSSMatrix ? (
|
|
142
|
+
return i.WebKitCSSMatrix ? (r = a.transform || a.webkitTransform, r.split(",").length > 6 && (r = r.split(", ").map((e => e.replace(",", "."))).join(", ")),
|
|
139
143
|
// Some old versions of Webkit choke when 'none' is passed; pass
|
|
140
144
|
// empty string instead in this case
|
|
141
|
-
|
|
142
|
-
n =
|
|
145
|
+
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,"),
|
|
146
|
+
n = o.toString().split(",")), "x" === t && (
|
|
143
147
|
// Latest Chrome and webkits Fix
|
|
144
|
-
|
|
148
|
+
r = i.WebKitCSSMatrix ? o.m41 : 16 === n.length ? parseFloat(n[12]) : parseFloat(n[4])),
|
|
145
149
|
"y" === t && (
|
|
146
150
|
// Latest Chrome and webkits Fix
|
|
147
|
-
|
|
148
|
-
|
|
151
|
+
r = i.WebKitCSSMatrix ? o.m42 : 16 === n.length ? parseFloat(n[13]) : parseFloat(n[5])),
|
|
152
|
+
r || 0;
|
|
149
153
|
}
|
|
150
154
|
|
|
151
155
|
function isObject(e) {
|
|
@@ -163,10 +167,10 @@ function extend(...e) {
|
|
|
163
167
|
const n = e[i];
|
|
164
168
|
if (null != n && !isNode(n)) {
|
|
165
169
|
const e = Object.keys(Object(n)).filter((e => "__proto__" !== e && "constructor" !== e && "prototype" !== e));
|
|
166
|
-
for (let i = 0,
|
|
167
|
-
const
|
|
168
|
-
void 0 !==
|
|
169
|
-
n[
|
|
170
|
+
for (let i = 0, r = e.length; i < r; i += 1) {
|
|
171
|
+
const r = e[i], o = Object.getOwnPropertyDescriptor(n, r);
|
|
172
|
+
void 0 !== o && o.enumerable && (isObject(t[r]) && isObject(n[r]) ? n[r].__swiper__ ? t[r] = n[r] : extend(t[r], n[r]) : !isObject(t[r]) && isObject(n[r]) ? (t[r] = {},
|
|
173
|
+
n[r].__swiper__ ? t[r] = n[r] : extend(t[r], n[r])) : t[r] = n[r]);
|
|
170
174
|
}
|
|
171
175
|
}
|
|
172
176
|
}
|
|
@@ -178,13 +182,13 @@ function setCSSProperty(e, t, i) {
|
|
|
178
182
|
}
|
|
179
183
|
|
|
180
184
|
function animateCSSModeScroll({swiper: e, targetPosition: t, side: i}) {
|
|
181
|
-
const n = getWindow(),
|
|
182
|
-
let
|
|
185
|
+
const n = getWindow(), r = -e.translate;
|
|
186
|
+
let o, a = null;
|
|
183
187
|
const s = e.params.speed;
|
|
184
188
|
e.wrapperEl.style.scrollSnapType = "none", n.cancelAnimationFrame(e.cssModeFrameID);
|
|
185
|
-
const l = t >
|
|
186
|
-
|
|
187
|
-
let l =
|
|
189
|
+
const l = t > r ? "next" : "prev", isOutOfBound = (e, t) => "next" === l && e >= t || "prev" === l && e <= t, animate = () => {
|
|
190
|
+
o = (new Date).getTime(), null === a && (a = o);
|
|
191
|
+
let l = r + (.5 - Math.cos(Math.max(Math.min((o - a) / s, 1), 0) * Math.PI) / 2) * (t - r);
|
|
188
192
|
if (isOutOfBound(l, t) && (l = t), e.wrapperEl.scrollTo({
|
|
189
193
|
[i]: l
|
|
190
194
|
}), isOutOfBound(l, t)) return e.wrapperEl.style.overflow = "hidden", e.wrapperEl.style.scrollSnapType = "",
|
|
@@ -237,40 +241,40 @@ function elementOuterSize(e, t, i) {
|
|
|
237
241
|
return e["width" === t ? "offsetWidth" : "offsetHeight"] + parseFloat(n.getComputedStyle(e, null).getPropertyValue("width" === t ? "margin-right" : "margin-top")) + parseFloat(n.getComputedStyle(e, null).getPropertyValue("width" === t ? "margin-left" : "margin-bottom"));
|
|
238
242
|
}
|
|
239
243
|
|
|
240
|
-
let
|
|
244
|
+
let S, q, C;
|
|
241
245
|
|
|
242
246
|
function getSupport() {
|
|
243
|
-
return
|
|
247
|
+
return S || (S = function() {
|
|
244
248
|
const e = getWindow(), t = getDocument();
|
|
245
249
|
return {
|
|
246
250
|
smoothScroll: t.documentElement && t.documentElement.style && "scrollBehavior" in t.documentElement.style,
|
|
247
251
|
touch: !!("ontouchstart" in e || e.DocumentTouch && t instanceof e.DocumentTouch)
|
|
248
252
|
};
|
|
249
|
-
}()),
|
|
253
|
+
}()), S;
|
|
250
254
|
}
|
|
251
255
|
|
|
252
256
|
function getDevice(e = {}) {
|
|
253
|
-
return
|
|
254
|
-
const t = getSupport(), i = getWindow(), n = i.navigator.platform,
|
|
257
|
+
return q || (q = function({userAgent: e} = {}) {
|
|
258
|
+
const t = getSupport(), i = getWindow(), n = i.navigator.platform, r = e || i.navigator.userAgent, o = {
|
|
255
259
|
ios: !1,
|
|
256
260
|
android: !1
|
|
257
|
-
}, a = i.screen.width, s = i.screen.height, l =
|
|
261
|
+
}, a = i.screen.width, s = i.screen.height, l = r.match(/(Android);?[\s\/]+([\d.]+)?/);
|
|
258
262
|
// eslint-disable-line
|
|
259
|
-
let c =
|
|
260
|
-
const d =
|
|
263
|
+
let c = r.match(/(iPad)(?!\1).*OS\s([\d_]+)/);
|
|
264
|
+
const d = r.match(/(iPod)(.*OS\s([\d_]+))?/), u = !c && r.match(/(iPhone\sOS|iOS)\s([\d_]+)/), p = "Win32" === n;
|
|
261
265
|
let h = "MacIntel" === n;
|
|
262
266
|
// iPadOs 13 fix
|
|
263
267
|
// Export object
|
|
264
|
-
return !c && h && t.touch && [ "1024x1366", "1366x1024", "834x1194", "1194x834", "834x1112", "1112x834", "768x1024", "1024x768", "820x1180", "1180x820", "810x1080", "1080x810" ].indexOf(`${a}x${s}`) >= 0 && (c =
|
|
268
|
+
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.]+)/),
|
|
265
269
|
c || (c = [ 0, 1, "13_0_0" ]), h = !1),
|
|
266
270
|
// Android
|
|
267
|
-
l && !p && (
|
|
268
|
-
|
|
269
|
-
}(e)),
|
|
271
|
+
l && !p && (o.os = "android", o.android = !0), (c || u || d) && (o.os = "ios", o.ios = !0),
|
|
272
|
+
o;
|
|
273
|
+
}(e)), q;
|
|
270
274
|
}
|
|
271
275
|
|
|
272
276
|
function getBrowser() {
|
|
273
|
-
return
|
|
277
|
+
return C || (C = function() {
|
|
274
278
|
const e = getWindow(), t = getDevice();
|
|
275
279
|
let i = !1;
|
|
276
280
|
function isSafari() {
|
|
@@ -284,25 +288,25 @@ function getBrowser() {
|
|
|
284
288
|
i = e < 16 || 16 === e && n < 2;
|
|
285
289
|
}
|
|
286
290
|
}
|
|
287
|
-
const n = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),
|
|
291
|
+
const n = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent), r = isSafari();
|
|
288
292
|
return {
|
|
289
|
-
isSafari: i ||
|
|
293
|
+
isSafari: i || r,
|
|
290
294
|
needPerspectiveFix: i,
|
|
291
|
-
need3dFix:
|
|
295
|
+
need3dFix: r || n && t.ios,
|
|
292
296
|
isWebView: n
|
|
293
297
|
};
|
|
294
|
-
}()),
|
|
298
|
+
}()), C;
|
|
295
299
|
}
|
|
296
300
|
|
|
297
301
|
/* eslint-disable no-underscore-dangle */
|
|
298
|
-
var
|
|
302
|
+
var M = {
|
|
299
303
|
on(e, t, i) {
|
|
300
304
|
const n = this;
|
|
301
305
|
if (!n.eventsListeners || n.destroyed) return n;
|
|
302
306
|
if ("function" != typeof t) return n;
|
|
303
|
-
const
|
|
307
|
+
const r = i ? "unshift" : "push";
|
|
304
308
|
return e.split(" ").forEach((e => {
|
|
305
|
-
n.eventsListeners[e] || (n.eventsListeners[e] = []), n.eventsListeners[e][
|
|
309
|
+
n.eventsListeners[e] || (n.eventsListeners[e] = []), n.eventsListeners[e][r](t);
|
|
306
310
|
})), n;
|
|
307
311
|
},
|
|
308
312
|
once(e, t, i) {
|
|
@@ -332,8 +336,8 @@ var q = {
|
|
|
332
336
|
off(e, t) {
|
|
333
337
|
const i = this;
|
|
334
338
|
return !i.eventsListeners || i.destroyed ? i : i.eventsListeners ? (e.split(" ").forEach((e => {
|
|
335
|
-
void 0 === t ? i.eventsListeners[e] = [] : i.eventsListeners[e] && i.eventsListeners[e].forEach(((n,
|
|
336
|
-
(n === t || n.__emitterProxy && n.__emitterProxy === t) && i.eventsListeners[e].splice(
|
|
339
|
+
void 0 === t ? i.eventsListeners[e] = [] : i.eventsListeners[e] && i.eventsListeners[e].forEach(((n, r) => {
|
|
340
|
+
(n === t || n.__emitterProxy && n.__emitterProxy === t) && i.eventsListeners[e].splice(r, 1);
|
|
337
341
|
}));
|
|
338
342
|
})), i) : i;
|
|
339
343
|
},
|
|
@@ -341,14 +345,14 @@ var q = {
|
|
|
341
345
|
const t = this;
|
|
342
346
|
if (!t.eventsListeners || t.destroyed) return t;
|
|
343
347
|
if (!t.eventsListeners) return t;
|
|
344
|
-
let i, n,
|
|
348
|
+
let i, n, r;
|
|
345
349
|
"string" == typeof e[0] || Array.isArray(e[0]) ? (i = e[0], n = e.slice(1, e.length),
|
|
346
|
-
|
|
350
|
+
r = t) : (i = e[0].events, n = e[0].data, r = e[0].context || t), n.unshift(r);
|
|
347
351
|
return (Array.isArray(i) ? i : i.split(" ")).forEach((e => {
|
|
348
352
|
t.eventsAnyListeners && t.eventsAnyListeners.length && t.eventsAnyListeners.forEach((t => {
|
|
349
|
-
t.call(
|
|
353
|
+
t.call(r, e, ...n);
|
|
350
354
|
})), t.eventsListeners && t.eventsListeners[e] && t.eventsListeners[e].forEach((e => {
|
|
351
|
-
e.apply(
|
|
355
|
+
e.apply(r, n);
|
|
352
356
|
}));
|
|
353
357
|
})), t;
|
|
354
358
|
}
|
|
@@ -386,23 +390,23 @@ const processLazyPreloader = (e, t) => {
|
|
|
386
390
|
const i = e.slides.length;
|
|
387
391
|
if (!i || !t || t < 0) return;
|
|
388
392
|
t = Math.min(t, i);
|
|
389
|
-
const n = "auto" === e.params.slidesPerView ? e.slidesPerViewDynamic() : Math.ceil(e.params.slidesPerView),
|
|
393
|
+
const n = "auto" === e.params.slidesPerView ? e.slidesPerViewDynamic() : Math.ceil(e.params.slidesPerView), r = e.activeIndex;
|
|
390
394
|
if (e.params.grid && e.params.grid.rows > 1) {
|
|
391
|
-
const i =
|
|
392
|
-
return
|
|
395
|
+
const i = r, o = [ i - t ];
|
|
396
|
+
return o.push(...Array.from({
|
|
393
397
|
length: t
|
|
394
398
|
}).map(((e, t) => i + n + t))), void e.slides.forEach(((t, i) => {
|
|
395
|
-
|
|
399
|
+
o.includes(t.column) && unlazy(e, i);
|
|
396
400
|
}));
|
|
397
401
|
}
|
|
398
|
-
const
|
|
399
|
-
if (e.params.rewind || e.params.loop) for (let n =
|
|
402
|
+
const o = r + n - 1;
|
|
403
|
+
if (e.params.rewind || e.params.loop) for (let n = r - t; n <= o + t; n += 1) {
|
|
400
404
|
const t = (n % i + i) % i;
|
|
401
|
-
(t <
|
|
402
|
-
} else for (let n = Math.max(
|
|
405
|
+
(t < r || t > o) && unlazy(e, t);
|
|
406
|
+
} 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);
|
|
403
407
|
};
|
|
404
408
|
|
|
405
|
-
var
|
|
409
|
+
var T = {
|
|
406
410
|
updateSize: function() {
|
|
407
411
|
const e = this;
|
|
408
412
|
let t, i;
|
|
@@ -424,7 +428,7 @@ var C = {
|
|
|
424
428
|
function getDirectionPropertyValue(t, i) {
|
|
425
429
|
return parseFloat(t.getPropertyValue(e.getDirectionLabel(i)) || 0);
|
|
426
430
|
}
|
|
427
|
-
const t = e.params, {wrapperEl: i, slidesEl: n, rtlTranslate:
|
|
431
|
+
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;
|
|
428
432
|
let d = [];
|
|
429
433
|
const u = [], p = [];
|
|
430
434
|
let h = t.slidesOffsetBefore;
|
|
@@ -438,7 +442,7 @@ var C = {
|
|
|
438
442
|
e.virtualSize = -w - h - f,
|
|
439
443
|
// reset margins
|
|
440
444
|
l.forEach((e => {
|
|
441
|
-
|
|
445
|
+
r ? e.style.marginLeft = "" : e.style.marginRight = "", e.style.marginBottom = "",
|
|
442
446
|
e.style.marginTop = "";
|
|
443
447
|
})),
|
|
444
448
|
// reset cssMode offsets
|
|
@@ -458,17 +462,17 @@ var C = {
|
|
|
458
462
|
if (a && "auto" === t.slidesPerView) t.virtual.slidesPerViewAutoSlideSize && (q = t.virtual.slidesPerViewAutoSlideSize),
|
|
459
463
|
q && n && (t.roundLengths && (q = Math.floor(q)), n.style[e.getDirectionLabel("width")] = q + "px"); else if ("auto" === t.slidesPerView) {
|
|
460
464
|
C && (n.style[e.getDirectionLabel("width")] = "");
|
|
461
|
-
const i = getComputedStyle(n),
|
|
462
|
-
if (
|
|
465
|
+
const i = getComputedStyle(n), r = n.style.transform, o = n.style.webkitTransform;
|
|
466
|
+
if (r && (n.style.transform = "none"), o && (n.style.webkitTransform = "none"),
|
|
463
467
|
t.roundLengths) q = e.isHorizontal() ? elementOuterSize(n, "width") : elementOuterSize(n, "height"); else {
|
|
464
468
|
// eslint-disable-next-line
|
|
465
|
-
const e = getDirectionPropertyValue(i, "width"), t = getDirectionPropertyValue(i, "padding-left"),
|
|
466
|
-
if (s && "border-box" === s) q = e +
|
|
469
|
+
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");
|
|
470
|
+
if (s && "border-box" === s) q = e + o + a; else {
|
|
467
471
|
const {clientWidth: i, offsetWidth: s} = n;
|
|
468
|
-
q = e + t +
|
|
472
|
+
q = e + t + r + o + a + (s - i);
|
|
469
473
|
}
|
|
470
474
|
}
|
|
471
|
-
|
|
475
|
+
r && (n.style.transform = r), o && (n.style.webkitTransform = o), t.roundLengths && (q = Math.floor(q));
|
|
472
476
|
} else q = (m - (t.slidesPerView - 1) * w) / t.slidesPerView, t.roundLengths && (q = Math.floor(q)),
|
|
473
477
|
n && (n.style[e.getDirectionLabel("width")] = q + "px");
|
|
474
478
|
n && (n.swiperSlideSize = q), p.push(q), t.centeredSlides ? (b = b + q / 2 + x / 2 + w,
|
|
@@ -479,14 +483,14 @@ var C = {
|
|
|
479
483
|
}
|
|
480
484
|
}
|
|
481
485
|
// Remove last grid elements depending on width
|
|
482
|
-
if (e.virtualSize = Math.max(e.virtualSize, m) + f,
|
|
486
|
+
if (e.virtualSize = Math.max(e.virtualSize, m) + f, r && o && ("slide" === t.effect || "coverflow" === t.effect) && (i.style.width = e.virtualSize + w + "px"),
|
|
483
487
|
t.setWrapperSize && (i.style[e.getDirectionLabel("width")] = e.virtualSize + w + "px"),
|
|
484
488
|
S && e.grid.updateWrapperSize(q, d), !t.centeredSlides) {
|
|
485
489
|
// Check if snapToSlideEdge should be applied
|
|
486
490
|
const i = "auto" !== t.slidesPerView && t.slidesPerView % 1 != 0, n = t.snapToSlideEdge && !t.loop && ("auto" === t.slidesPerView || i);
|
|
487
491
|
// Calculate the last allowed snap index when snapToSlideEdge is enabled
|
|
488
492
|
// This ensures minimum slides are visible at the end
|
|
489
|
-
let
|
|
493
|
+
let r = d.length;
|
|
490
494
|
if (n) {
|
|
491
495
|
let e;
|
|
492
496
|
if ("auto" === t.slidesPerView) {
|
|
@@ -495,32 +499,32 @@ var C = {
|
|
|
495
499
|
let t = 0;
|
|
496
500
|
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;
|
|
497
501
|
} else e = Math.floor(t.slidesPerView);
|
|
498
|
-
|
|
502
|
+
r = Math.max(c - e, 0);
|
|
499
503
|
}
|
|
500
|
-
const
|
|
504
|
+
const o = [];
|
|
501
505
|
for (let i = 0; i < d.length; i += 1) {
|
|
502
506
|
let a = d[i];
|
|
503
507
|
t.roundLengths && (a = Math.floor(a)), n ?
|
|
504
508
|
// When snapToSlideEdge is enabled, only keep snaps up to lastAllowedSnapIndex
|
|
505
|
-
i <=
|
|
509
|
+
i <= r && o.push(a) : d[i] <= e.virtualSize - m &&
|
|
506
510
|
// When snapToSlideEdge is disabled, keep snaps that fit within scrollable area
|
|
507
|
-
|
|
511
|
+
o.push(a);
|
|
508
512
|
}
|
|
509
|
-
d =
|
|
513
|
+
d = o, Math.floor(e.virtualSize - m) - Math.floor(d[d.length - 1]) > 1 && (
|
|
510
514
|
// Only add edge-aligned snap if snapToSlideEdge is not enabled
|
|
511
515
|
n || d.push(e.virtualSize - m));
|
|
512
516
|
}
|
|
513
517
|
if (a && t.loop) {
|
|
514
518
|
const i = p[0] + w;
|
|
515
519
|
if (t.slidesPerGroup > 1) {
|
|
516
|
-
const n = Math.ceil((e.virtual.slidesBefore + e.virtual.slidesAfter) / t.slidesPerGroup),
|
|
517
|
-
for (let e = 0; e < n; e += 1) d.push(d[d.length - 1] +
|
|
520
|
+
const n = Math.ceil((e.virtual.slidesBefore + e.virtual.slidesAfter) / t.slidesPerGroup), r = i * t.slidesPerGroup;
|
|
521
|
+
for (let e = 0; e < n; e += 1) d.push(d[d.length - 1] + r);
|
|
518
522
|
}
|
|
519
523
|
for (let n = 0; n < e.virtual.slidesBefore + e.virtual.slidesAfter; n += 1) 1 === t.slidesPerGroup && d.push(d[d.length - 1] + i),
|
|
520
524
|
u.push(u[u.length - 1] + i), e.virtualSize += i;
|
|
521
525
|
}
|
|
522
526
|
if (0 === d.length && (d = [ 0 ]), 0 !== w) {
|
|
523
|
-
const i = e.isHorizontal() &&
|
|
527
|
+
const i = e.isHorizontal() && r ? "marginLeft" : e.getDirectionLabel("marginRight");
|
|
524
528
|
l.filter(((e, i) => !(t.cssMode && !t.loop) || i !== l.length - 1)).forEach((e => {
|
|
525
529
|
e.style[i] = w + "px";
|
|
526
530
|
}));
|
|
@@ -565,44 +569,44 @@ var C = {
|
|
|
565
569
|
},
|
|
566
570
|
updateAutoHeight: function(e) {
|
|
567
571
|
const t = this, i = [], n = t.virtual && t.params.virtual.enabled;
|
|
568
|
-
let
|
|
572
|
+
let r, o = 0;
|
|
569
573
|
"number" == typeof e ? t.setTransition(e) : !0 === e && t.setTransition(t.params.speed);
|
|
570
574
|
const getSlideByIndex = e => n ? t.slides[t.getSlideIndexByData(e)] : t.slides[e];
|
|
571
575
|
// Find slides currently in view
|
|
572
576
|
if ("auto" !== t.params.slidesPerView && t.params.slidesPerView > 1) if (t.params.centeredSlides) (t.visibleSlides || []).forEach((e => {
|
|
573
577
|
i.push(e);
|
|
574
|
-
})); else for (
|
|
575
|
-
const e = t.activeIndex +
|
|
578
|
+
})); else for (r = 0; r < Math.ceil(t.params.slidesPerView); r += 1) {
|
|
579
|
+
const e = t.activeIndex + r;
|
|
576
580
|
if (e > t.slides.length && !n) break;
|
|
577
581
|
i.push(getSlideByIndex(e));
|
|
578
582
|
} else i.push(getSlideByIndex(t.activeIndex));
|
|
579
583
|
// Find new height from highest slide in view
|
|
580
|
-
for (
|
|
581
|
-
const e = i[
|
|
582
|
-
|
|
584
|
+
for (r = 0; r < i.length; r += 1) if (void 0 !== i[r]) {
|
|
585
|
+
const e = i[r].offsetHeight;
|
|
586
|
+
o = e > o ? e : o;
|
|
583
587
|
}
|
|
584
588
|
// Update Height
|
|
585
|
-
(
|
|
589
|
+
(o || 0 === o) && (t.wrapperEl.style.height = o + "px");
|
|
586
590
|
},
|
|
587
591
|
updateSlidesOffset: function() {
|
|
588
592
|
const e = this, t = e.slides, i = e.isElement ? e.isHorizontal() ? e.wrapperEl.offsetLeft : e.wrapperEl.offsetTop : 0;
|
|
589
593
|
for (let n = 0; n < t.length; n += 1) t[n].swiperSlideOffset = (e.isHorizontal() ? t[n].offsetLeft : t[n].offsetTop) - i - e.cssOverflowAdjustment();
|
|
590
594
|
},
|
|
591
595
|
updateSlidesProgress: function(e = this && this.translate || 0) {
|
|
592
|
-
const t = this, i = t.params, {slides: n, rtlTranslate:
|
|
596
|
+
const t = this, i = t.params, {slides: n, rtlTranslate: r, snapGrid: o} = t;
|
|
593
597
|
if (0 === n.length) return;
|
|
594
598
|
void 0 === n[0].swiperSlideOffset && t.updateSlidesOffset();
|
|
595
599
|
let a = -e;
|
|
596
|
-
|
|
600
|
+
r && (a = e), t.visibleSlidesIndexes = [], t.visibleSlides = [];
|
|
597
601
|
let s = i.spaceBetween;
|
|
598
602
|
"string" == typeof s && s.indexOf("%") >= 0 ? s = parseFloat(s.replace("%", "")) / 100 * t.size : "string" == typeof s && (s = parseFloat(s));
|
|
599
603
|
for (let e = 0; e < n.length; e += 1) {
|
|
600
604
|
const l = n[e];
|
|
601
605
|
let c = l.swiperSlideOffset;
|
|
602
606
|
i.cssMode && i.centeredSlides && (c -= n[0].swiperSlideOffset);
|
|
603
|
-
const d = (a + (i.centeredSlides ? t.minTranslate() : 0) - c) / (l.swiperSlideSize + s), u = (a -
|
|
607
|
+
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;
|
|
604
608
|
v && (t.visibleSlides.push(l), t.visibleSlidesIndexes.push(e)), toggleSlideClasses$1(l, v, i.slideVisibleClass),
|
|
605
|
-
toggleSlideClasses$1(l, f, i.slideFullyVisibleClass), l.progress =
|
|
609
|
+
toggleSlideClasses$1(l, f, i.slideFullyVisibleClass), l.progress = r ? -d : d, l.originalProgress = r ? -u : u;
|
|
606
610
|
}
|
|
607
611
|
},
|
|
608
612
|
updateProgress: function(e) {
|
|
@@ -613,35 +617,35 @@ var C = {
|
|
|
613
617
|
e = t && t.translate && t.translate * i || 0;
|
|
614
618
|
}
|
|
615
619
|
const i = t.params, n = t.maxTranslate() - t.minTranslate();
|
|
616
|
-
let {progress:
|
|
617
|
-
const l =
|
|
618
|
-
if (0 === n)
|
|
619
|
-
|
|
620
|
+
let {progress: r, isBeginning: o, isEnd: a, progressLoop: s} = t;
|
|
621
|
+
const l = o, c = a;
|
|
622
|
+
if (0 === n) r = 0, o = !0, a = !0; else {
|
|
623
|
+
r = (e - t.minTranslate()) / n;
|
|
620
624
|
const i = Math.abs(e - t.minTranslate()) < 1, s = Math.abs(e - t.maxTranslate()) < 1;
|
|
621
|
-
|
|
625
|
+
o = i || r <= 0, a = s || r >= 1, i && (r = 0), s && (r = 1);
|
|
622
626
|
}
|
|
623
627
|
if (i.loop) {
|
|
624
|
-
const i = t.getSlideIndexByData(0), n = t.getSlideIndexByData(t.slides.length - 1),
|
|
625
|
-
s = l >=
|
|
628
|
+
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);
|
|
629
|
+
s = l >= r ? (l - r) / a : (l + a - o) / a, s > 1 && (s -= 1);
|
|
626
630
|
}
|
|
627
631
|
Object.assign(t, {
|
|
628
|
-
progress:
|
|
632
|
+
progress: r,
|
|
629
633
|
progressLoop: s,
|
|
630
|
-
isBeginning:
|
|
634
|
+
isBeginning: o,
|
|
631
635
|
isEnd: a
|
|
632
636
|
}), (i.watchSlidesProgress || i.centeredSlides && i.autoHeight) && t.updateSlidesProgress(e),
|
|
633
|
-
|
|
634
|
-
(l && !
|
|
637
|
+
o && !l && t.emit("reachBeginning toEdge"), a && !c && t.emit("reachEnd toEdge"),
|
|
638
|
+
(l && !o || c && !a) && t.emit("fromEdge"), t.emit("progress", r);
|
|
635
639
|
},
|
|
636
640
|
updateSlidesClasses: function() {
|
|
637
|
-
const e = this, {slides: t, params: i, slidesEl: n, activeIndex:
|
|
641
|
+
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];
|
|
638
642
|
let s, l, c;
|
|
639
|
-
if (
|
|
640
|
-
let t =
|
|
643
|
+
if (o) if (i.loop) {
|
|
644
|
+
let t = r - e.virtual.slidesBefore;
|
|
641
645
|
t < 0 && (t = e.virtual.slides.length + t), t >= e.virtual.slides.length && (t -= e.virtual.slides.length),
|
|
642
646
|
s = getFilteredSlide(`[data-swiper-slide-index="${t}"]`);
|
|
643
|
-
} else s = getFilteredSlide(`[data-swiper-slide-index="${
|
|
644
|
-
c = t.find((e => e.column ===
|
|
647
|
+
} else s = getFilteredSlide(`[data-swiper-slide-index="${r}"]`); else a ? (s = t.find((e => e.column === r)),
|
|
648
|
+
c = t.find((e => e.column === r + 1)), l = t.find((e => e.column === r - 1))) : s = t[r];
|
|
645
649
|
s && (a || (
|
|
646
650
|
// Next Slide
|
|
647
651
|
c = function(e, t) {
|
|
@@ -669,7 +673,7 @@ var C = {
|
|
|
669
673
|
})), e.emitSlidesClasses();
|
|
670
674
|
},
|
|
671
675
|
updateActiveIndex: function(e) {
|
|
672
|
-
const t = this, i = t.rtlTranslate ? t.translate : -t.translate, {snapGrid: n, params:
|
|
676
|
+
const t = this, i = t.rtlTranslate ? t.translate : -t.translate, {snapGrid: n, params: r, activeIndex: o, realIndex: a, snapIndex: s} = t;
|
|
673
677
|
let l, c = e;
|
|
674
678
|
const getVirtualRealIndex = e => {
|
|
675
679
|
let i = e - t.virtual.slidesBefore;
|
|
@@ -678,24 +682,24 @@ var C = {
|
|
|
678
682
|
};
|
|
679
683
|
if (void 0 === c && (c = function(e) {
|
|
680
684
|
const {slidesGrid: t, params: i} = e, n = e.rtlTranslate ? e.translate : -e.translate;
|
|
681
|
-
let
|
|
682
|
-
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 ?
|
|
685
|
+
let r;
|
|
686
|
+
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);
|
|
683
687
|
// Normalize slideIndex
|
|
684
|
-
return i.normalizeSlideIndex && (
|
|
688
|
+
return i.normalizeSlideIndex && (r < 0 || void 0 === r) && (r = 0), r;
|
|
685
689
|
}(t)), n.indexOf(i) >= 0) l = n.indexOf(i); else {
|
|
686
|
-
const e = Math.min(
|
|
687
|
-
l = e + Math.floor((c - e) /
|
|
690
|
+
const e = Math.min(r.slidesPerGroupSkip, c);
|
|
691
|
+
l = e + Math.floor((c - e) / r.slidesPerGroup);
|
|
688
692
|
}
|
|
689
|
-
if (l >= n.length && (l = n.length - 1), c ===
|
|
693
|
+
if (l >= n.length && (l = n.length - 1), c === o && !t.params.loop) return void (l !== s && (t.snapIndex = l,
|
|
690
694
|
t.emit("snapIndexChange")));
|
|
691
|
-
if (c ===
|
|
692
|
-
const d = t.grid &&
|
|
695
|
+
if (c === o && t.params.loop && t.virtual && t.params.virtual.enabled) return void (t.realIndex = getVirtualRealIndex(c));
|
|
696
|
+
const d = t.grid && r.grid && r.grid.rows > 1;
|
|
693
697
|
// Get real index
|
|
694
698
|
let u;
|
|
695
|
-
if (t.virtual &&
|
|
699
|
+
if (t.virtual && r.virtual.enabled) u = r.loop ? getVirtualRealIndex(c) : c; else if (d) {
|
|
696
700
|
const e = t.slides.find((e => e.column === c));
|
|
697
701
|
let i = parseInt(e.getAttribute("data-swiper-slide-index"), 10);
|
|
698
|
-
Number.isNaN(i) && (i = Math.max(t.slides.indexOf(e), 0)), u = Math.floor(i /
|
|
702
|
+
Number.isNaN(i) && (i = Math.max(t.slides.indexOf(e), 0)), u = Math.floor(i / r.grid.rows);
|
|
699
703
|
} else if (t.slides[c]) {
|
|
700
704
|
const e = t.slides[c].getAttribute("data-swiper-slide-index");
|
|
701
705
|
u = e ? parseInt(e, 10) : c;
|
|
@@ -705,7 +709,7 @@ var C = {
|
|
|
705
709
|
snapIndex: l,
|
|
706
710
|
previousRealIndex: a,
|
|
707
711
|
realIndex: u,
|
|
708
|
-
previousIndex:
|
|
712
|
+
previousIndex: o,
|
|
709
713
|
activeIndex: c
|
|
710
714
|
}), t.initialized && preload(t), t.emit("activeIndexChange"), t.emit("snapIndexChange"),
|
|
711
715
|
(t.initialized || t.params.runCallbacksOnInit) && (a !== u && t.emit("realIndexChange"),
|
|
@@ -713,36 +717,36 @@ var C = {
|
|
|
713
717
|
},
|
|
714
718
|
updateClickedSlide: function(e, t) {
|
|
715
719
|
const i = this, n = i.params;
|
|
716
|
-
let
|
|
717
|
-
!
|
|
718
|
-
!
|
|
720
|
+
let r = e.closest(`.${n.slideClass}, swiper-slide`);
|
|
721
|
+
!r && i.isElement && t && t.length > 1 && t.includes(e) && [ ...t.slice(t.indexOf(e) + 1, t.length) ].forEach((e => {
|
|
722
|
+
!r && e.matches && e.matches(`.${n.slideClass}, swiper-slide`) && (r = e);
|
|
719
723
|
}));
|
|
720
|
-
let
|
|
721
|
-
if (
|
|
722
|
-
a = !0,
|
|
724
|
+
let o, a = !1;
|
|
725
|
+
if (r) for (let e = 0; e < i.slides.length; e += 1) if (i.slides[e] === r) {
|
|
726
|
+
a = !0, o = e;
|
|
723
727
|
break;
|
|
724
728
|
}
|
|
725
|
-
if (!
|
|
726
|
-
i.clickedSlide =
|
|
729
|
+
if (!r || !a) return i.clickedSlide = void 0, void (i.clickedIndex = void 0);
|
|
730
|
+
i.clickedSlide = r, i.virtual && i.params.virtual.enabled ? i.clickedIndex = parseInt(r.getAttribute("data-swiper-slide-index"), 10) : i.clickedIndex = o,
|
|
727
731
|
n.slideToClickedSlide && void 0 !== i.clickedIndex && i.clickedIndex !== i.activeIndex && i.slideToClickedSlide();
|
|
728
732
|
}
|
|
729
733
|
};
|
|
730
734
|
|
|
731
|
-
var
|
|
735
|
+
var k = {
|
|
732
736
|
getTranslate: function(e = (this.isHorizontal() ? "x" : "y")) {
|
|
733
|
-
const {params: t, rtlTranslate: i, translate: n, wrapperEl:
|
|
737
|
+
const {params: t, rtlTranslate: i, translate: n, wrapperEl: r} = this;
|
|
734
738
|
if (t.virtualTranslate) return i ? -n : n;
|
|
735
739
|
if (t.cssMode) return n;
|
|
736
|
-
let
|
|
737
|
-
return
|
|
740
|
+
let o = getTranslate(r, e);
|
|
741
|
+
return o += this.cssOverflowAdjustment(), i && (o = -o), o || 0;
|
|
738
742
|
},
|
|
739
743
|
setTranslate: function(e, t) {
|
|
740
|
-
const i = this, {rtlTranslate: n, params:
|
|
744
|
+
const i = this, {rtlTranslate: n, params: r, wrapperEl: o, progress: a} = i;
|
|
741
745
|
let s, l = 0, c = 0;
|
|
742
|
-
i.isHorizontal() ? l = n ? -e : e : c = e,
|
|
746
|
+
i.isHorizontal() ? l = n ? -e : e : c = e, r.roundLengths && (l = Math.floor(l),
|
|
743
747
|
c = Math.floor(c)), i.previousTranslate = i.translate, i.translate = i.isHorizontal() ? l : c,
|
|
744
|
-
|
|
745
|
-
|
|
748
|
+
r.cssMode ? o[i.isHorizontal() ? "scrollLeft" : "scrollTop"] = i.isHorizontal() ? -l : -c : r.virtualTranslate || (i.isHorizontal() ? l -= i.cssOverflowAdjustment() : c -= i.cssOverflowAdjustment(),
|
|
749
|
+
o.style.transform = `translate3d(${l}px, ${c}px, 0px)`);
|
|
746
750
|
const d = i.maxTranslate() - i.minTranslate();
|
|
747
751
|
s = 0 === d ? 0 : (e - i.minTranslate()) / d, s !== a && i.updateProgress(e), i.emit("setTranslate", i.translate, t);
|
|
748
752
|
},
|
|
@@ -752,18 +756,18 @@ var M = {
|
|
|
752
756
|
maxTranslate: function() {
|
|
753
757
|
return -this.snapGrid[this.snapGrid.length - 1];
|
|
754
758
|
},
|
|
755
|
-
translateTo: function(e = 0, t = this.params.speed, i = !0, n = !0,
|
|
756
|
-
const
|
|
757
|
-
if (
|
|
758
|
-
const l =
|
|
759
|
+
translateTo: function(e = 0, t = this.params.speed, i = !0, n = !0, r) {
|
|
760
|
+
const o = this, {params: a, wrapperEl: s} = o;
|
|
761
|
+
if (o.animating && a.preventInteractionOnTransition) return !1;
|
|
762
|
+
const l = o.minTranslate(), c = o.maxTranslate();
|
|
759
763
|
let d;
|
|
760
764
|
if (d = n && e > l ? l : n && e < c ? c : e,
|
|
761
765
|
// Update progress
|
|
762
|
-
|
|
763
|
-
const e =
|
|
766
|
+
o.updateProgress(d), a.cssMode) {
|
|
767
|
+
const e = o.isHorizontal();
|
|
764
768
|
if (0 === t) s[e ? "scrollLeft" : "scrollTop"] = -d; else {
|
|
765
|
-
if (!
|
|
766
|
-
swiper:
|
|
769
|
+
if (!o.support.smoothScroll) return animateCSSModeScroll({
|
|
770
|
+
swiper: o,
|
|
767
771
|
targetPosition: -d,
|
|
768
772
|
side: e ? "left" : "top"
|
|
769
773
|
}), !0;
|
|
@@ -774,36 +778,36 @@ var M = {
|
|
|
774
778
|
}
|
|
775
779
|
return !0;
|
|
776
780
|
}
|
|
777
|
-
return 0 === t ? (
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
}),
|
|
781
|
+
return 0 === t ? (o.setTransition(0), o.setTranslate(d), i && (o.emit("beforeTransitionStart", t, r),
|
|
782
|
+
o.emit("transitionEnd"))) : (o.setTransition(t), o.setTranslate(d), i && (o.emit("beforeTransitionStart", t, r),
|
|
783
|
+
o.emit("transitionStart")), o.animating || (o.animating = !0, o.onTranslateToWrapperTransitionEnd || (o.onTranslateToWrapperTransitionEnd = function(e) {
|
|
784
|
+
o && !o.destroyed && e.target === this && (o.wrapperEl.removeEventListener("transitionend", o.onTranslateToWrapperTransitionEnd),
|
|
785
|
+
o.onTranslateToWrapperTransitionEnd = null, delete o.onTranslateToWrapperTransitionEnd,
|
|
786
|
+
o.animating = !1, i && o.emit("transitionEnd"));
|
|
787
|
+
}), o.wrapperEl.addEventListener("transitionend", o.onTranslateToWrapperTransitionEnd))),
|
|
784
788
|
!0;
|
|
785
789
|
}
|
|
786
790
|
};
|
|
787
791
|
|
|
788
792
|
function transitionEmit({swiper: e, runCallbacks: t, direction: i, step: n}) {
|
|
789
|
-
const {activeIndex:
|
|
793
|
+
const {activeIndex: r, previousIndex: o} = e;
|
|
790
794
|
let a = i;
|
|
791
|
-
a || (a =
|
|
792
|
-
t && "reset" === a ? e.emit("slideResetTransition" + n) : t &&
|
|
795
|
+
a || (a = r > o ? "next" : r < o ? "prev" : "reset"), e.emit("transition" + n),
|
|
796
|
+
t && "reset" === a ? e.emit("slideResetTransition" + n) : t && r !== o && (e.emit("slideChangeTransition" + n),
|
|
793
797
|
"next" === a ? e.emit("slideNextTransition" + n) : e.emit("slidePrevTransition" + n));
|
|
794
798
|
}
|
|
795
799
|
|
|
796
|
-
var
|
|
797
|
-
slideTo: function(e = 0, t, i = !0, n,
|
|
800
|
+
var P = {
|
|
801
|
+
slideTo: function(e = 0, t, i = !0, n, r) {
|
|
798
802
|
"string" == typeof e && (e = parseInt(e, 10));
|
|
799
|
-
const
|
|
803
|
+
const o = this;
|
|
800
804
|
let a = e;
|
|
801
805
|
a < 0 && (a = 0);
|
|
802
|
-
const {params: s, snapGrid: l, slidesGrid: c, previousIndex: d, activeIndex: u, rtlTranslate: p, wrapperEl: h, enabled: f} =
|
|
803
|
-
if (!f && !n && !
|
|
804
|
-
void 0 === t && (t =
|
|
805
|
-
const v = Math.min(
|
|
806
|
-
let g = v + Math.floor((a - v) /
|
|
806
|
+
const {params: s, snapGrid: l, slidesGrid: c, previousIndex: d, activeIndex: u, rtlTranslate: p, wrapperEl: h, enabled: f} = o;
|
|
807
|
+
if (!f && !n && !r || o.destroyed || o.animating && s.preventInteractionOnTransition) return !1;
|
|
808
|
+
void 0 === t && (t = o.params.speed);
|
|
809
|
+
const v = Math.min(o.params.slidesPerGroupSkip, a);
|
|
810
|
+
let g = v + Math.floor((a - v) / o.params.slidesPerGroup);
|
|
807
811
|
g >= l.length && (g = l.length - 1);
|
|
808
812
|
const m = -l[g];
|
|
809
813
|
// Normalize slideIndex
|
|
@@ -812,32 +816,32 @@ var T = {
|
|
|
812
816
|
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);
|
|
813
817
|
}
|
|
814
818
|
// Directions locks
|
|
815
|
-
if (
|
|
816
|
-
if (!
|
|
817
|
-
if (!
|
|
819
|
+
if (o.initialized && a !== u) {
|
|
820
|
+
if (!o.allowSlideNext && (p ? m > o.translate && m > o.minTranslate() : m < o.translate && m < o.minTranslate())) return !1;
|
|
821
|
+
if (!o.allowSlidePrev && m > o.translate && m > o.maxTranslate() && (u || 0) !== a) return !1;
|
|
818
822
|
}
|
|
819
823
|
let w;
|
|
820
|
-
a !== (d || 0) && i &&
|
|
824
|
+
a !== (d || 0) && i && o.emit("beforeSlideChangeStart"),
|
|
821
825
|
// Update progress
|
|
822
|
-
|
|
826
|
+
o.updateProgress(m), w = a > u ? "next" : a < u ? "prev" : "reset";
|
|
823
827
|
// initial virtual
|
|
824
|
-
const b =
|
|
828
|
+
const b = o.virtual && o.params.virtual.enabled;
|
|
825
829
|
// Update Index
|
|
826
|
-
if (!(b &&
|
|
830
|
+
if (!(b && r) && (p && -m === o.translate || !p && m === o.translate)) return o.updateActiveIndex(a),
|
|
827
831
|
// Update Height
|
|
828
|
-
s.autoHeight &&
|
|
829
|
-
"reset" !== w && (
|
|
832
|
+
s.autoHeight && o.updateAutoHeight(), o.updateSlidesClasses(), "slide" !== s.effect && o.setTranslate(m),
|
|
833
|
+
"reset" !== w && (o.transitionStart(i, w), o.transitionEnd(i, w)), !1;
|
|
830
834
|
if (s.cssMode) {
|
|
831
|
-
const e =
|
|
832
|
-
if (0 === t) b && (
|
|
833
|
-
b && !
|
|
835
|
+
const e = o.isHorizontal(), i = p ? m : -m;
|
|
836
|
+
if (0 === t) b && (o.wrapperEl.style.scrollSnapType = "none", o._immediateVirtual = !0),
|
|
837
|
+
b && !o._cssModeVirtualInitialSet && o.params.initialSlide > 0 ? (o._cssModeVirtualInitialSet = !0,
|
|
834
838
|
requestAnimationFrame((() => {
|
|
835
839
|
h[e ? "scrollLeft" : "scrollTop"] = i;
|
|
836
840
|
}))) : h[e ? "scrollLeft" : "scrollTop"] = i, b && requestAnimationFrame((() => {
|
|
837
|
-
|
|
841
|
+
o.wrapperEl.style.scrollSnapType = "", o._immediateVirtual = !1;
|
|
838
842
|
})); else {
|
|
839
|
-
if (!
|
|
840
|
-
swiper:
|
|
843
|
+
if (!o.support.smoothScroll) return animateCSSModeScroll({
|
|
844
|
+
swiper: o,
|
|
841
845
|
targetPosition: i,
|
|
842
846
|
side: e ? "left" : "top"
|
|
843
847
|
}), !0;
|
|
@@ -849,85 +853,85 @@ var T = {
|
|
|
849
853
|
return !0;
|
|
850
854
|
}
|
|
851
855
|
const x = getBrowser().isSafari;
|
|
852
|
-
return b && !
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
}),
|
|
856
|
+
return b && !r && x && o.isElement && o.virtual.update(!1, !1, a), o.setTransition(t),
|
|
857
|
+
o.setTranslate(m), o.updateActiveIndex(a), o.updateSlidesClasses(), o.emit("beforeTransitionStart", t, n),
|
|
858
|
+
o.transitionStart(i, w), 0 === t ? o.transitionEnd(i, w) : o.animating || (o.animating = !0,
|
|
859
|
+
o.onSlideToWrapperTransitionEnd || (o.onSlideToWrapperTransitionEnd = function(e) {
|
|
860
|
+
o && !o.destroyed && e.target === this && (o.wrapperEl.removeEventListener("transitionend", o.onSlideToWrapperTransitionEnd),
|
|
861
|
+
o.onSlideToWrapperTransitionEnd = null, delete o.onSlideToWrapperTransitionEnd,
|
|
862
|
+
o.transitionEnd(i, w));
|
|
863
|
+
}), o.wrapperEl.addEventListener("transitionend", o.onSlideToWrapperTransitionEnd)),
|
|
860
864
|
!0;
|
|
861
865
|
},
|
|
862
866
|
slideToLoop: function(e = 0, t, i = !0, n) {
|
|
863
867
|
if ("string" == typeof e) {
|
|
864
868
|
e = parseInt(e, 10);
|
|
865
869
|
}
|
|
866
|
-
const
|
|
867
|
-
if (
|
|
868
|
-
void 0 === t && (t =
|
|
869
|
-
const
|
|
870
|
+
const r = this;
|
|
871
|
+
if (r.destroyed) return;
|
|
872
|
+
void 0 === t && (t = r.params.speed);
|
|
873
|
+
const o = r.grid && r.params.grid && r.params.grid.rows > 1;
|
|
870
874
|
let a = e;
|
|
871
|
-
if (
|
|
875
|
+
if (r.params.loop) if (r.virtual && r.params.virtual.enabled)
|
|
872
876
|
// eslint-disable-next-line
|
|
873
|
-
a +=
|
|
877
|
+
a += r.virtual.slidesBefore; else {
|
|
874
878
|
let e;
|
|
875
|
-
if (
|
|
876
|
-
const t = a *
|
|
877
|
-
e =
|
|
878
|
-
} else e =
|
|
879
|
-
const t =
|
|
880
|
-
let d =
|
|
881
|
-
"auto" === d ? d =
|
|
879
|
+
if (o) {
|
|
880
|
+
const t = a * r.params.grid.rows;
|
|
881
|
+
e = r.slides.find((e => 1 * e.getAttribute("data-swiper-slide-index") === t)).column;
|
|
882
|
+
} else e = r.getSlideIndexByData(a);
|
|
883
|
+
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;
|
|
884
|
+
let d = r.params.slidesPerView;
|
|
885
|
+
"auto" === d ? d = r.slidesPerViewDynamic() : (d = Math.ceil(parseFloat(r.params.slidesPerView, 10)),
|
|
882
886
|
c && d % 2 == 0 && (d += 1));
|
|
883
887
|
let u = t - e < d;
|
|
884
|
-
if (c && (u = u || e < Math.ceil(d / 2)), n && c && "auto" !==
|
|
888
|
+
if (c && (u = u || e < Math.ceil(d / 2)), n && c && "auto" !== r.params.slidesPerView && !o && (u = !1),
|
|
885
889
|
u) {
|
|
886
|
-
const i = c ? e <
|
|
887
|
-
|
|
890
|
+
const i = c ? e < r.activeIndex ? "prev" : "next" : e - r.activeIndex - 1 < r.params.slidesPerView ? "next" : "prev";
|
|
891
|
+
r.loopFix({
|
|
888
892
|
direction: i,
|
|
889
893
|
slideTo: !0,
|
|
890
894
|
activeSlideIndex: "next" === i ? e + 1 : e - t + 1,
|
|
891
|
-
slideRealIndex: "next" === i ?
|
|
895
|
+
slideRealIndex: "next" === i ? r.realIndex : void 0
|
|
892
896
|
});
|
|
893
897
|
}
|
|
894
|
-
if (
|
|
895
|
-
const e = a *
|
|
896
|
-
a =
|
|
897
|
-
} else a =
|
|
898
|
+
if (o) {
|
|
899
|
+
const e = a * r.params.grid.rows;
|
|
900
|
+
a = r.slides.find((t => 1 * t.getAttribute("data-swiper-slide-index") === e)).column;
|
|
901
|
+
} else a = r.getSlideIndexByData(a);
|
|
898
902
|
}
|
|
899
903
|
return requestAnimationFrame((() => {
|
|
900
|
-
|
|
901
|
-
})),
|
|
904
|
+
r.slideTo(a, t, i, n);
|
|
905
|
+
})), r;
|
|
902
906
|
}
|
|
903
907
|
/* eslint no-unused-vars: "off" */ ,
|
|
904
908
|
slideNext: function(e, t = !0, i) {
|
|
905
|
-
const n = this, {enabled:
|
|
906
|
-
if (!
|
|
909
|
+
const n = this, {enabled: r, params: o, animating: a} = n;
|
|
910
|
+
if (!r || n.destroyed) return n;
|
|
907
911
|
void 0 === e && (e = n.params.speed);
|
|
908
|
-
let s =
|
|
909
|
-
"auto" ===
|
|
910
|
-
const l = n.activeIndex <
|
|
911
|
-
if (
|
|
912
|
-
if (a && !c &&
|
|
912
|
+
let s = o.slidesPerGroup;
|
|
913
|
+
"auto" === o.slidesPerView && 1 === o.slidesPerGroup && o.slidesPerGroupAuto && (s = Math.max(n.slidesPerViewDynamic("current", !0), 1));
|
|
914
|
+
const l = n.activeIndex < o.slidesPerGroupSkip ? 1 : s, c = n.virtual && o.virtual.enabled;
|
|
915
|
+
if (o.loop) {
|
|
916
|
+
if (a && !c && o.loopPreventsSliding) return !1;
|
|
913
917
|
if (n.loopFix({
|
|
914
918
|
direction: "next"
|
|
915
919
|
}),
|
|
916
920
|
// eslint-disable-next-line
|
|
917
|
-
n._clientLeft = n.wrapperEl.clientLeft, n.activeIndex === n.slides.length - 1 &&
|
|
921
|
+
n._clientLeft = n.wrapperEl.clientLeft, n.activeIndex === n.slides.length - 1 && o.cssMode) return requestAnimationFrame((() => {
|
|
918
922
|
n.slideTo(n.activeIndex + l, e, t, i);
|
|
919
923
|
})), !0;
|
|
920
924
|
}
|
|
921
|
-
return
|
|
925
|
+
return o.rewind && n.isEnd ? n.slideTo(0, e, t, i) : n.slideTo(n.activeIndex + l, e, t, i);
|
|
922
926
|
}
|
|
923
927
|
/* eslint no-unused-vars: "off" */ ,
|
|
924
928
|
slidePrev: function(e, t = !0, i) {
|
|
925
|
-
const n = this, {params:
|
|
929
|
+
const n = this, {params: r, snapGrid: o, slidesGrid: a, rtlTranslate: s, enabled: l, animating: c} = n;
|
|
926
930
|
if (!l || n.destroyed) return n;
|
|
927
931
|
void 0 === e && (e = n.params.speed);
|
|
928
|
-
const d = n.virtual &&
|
|
929
|
-
if (
|
|
930
|
-
if (c && !d &&
|
|
932
|
+
const d = n.virtual && r.virtual.enabled;
|
|
933
|
+
if (r.loop) {
|
|
934
|
+
if (c && !d && r.loopPreventsSliding) return !1;
|
|
931
935
|
n.loopFix({
|
|
932
936
|
direction: "prev"
|
|
933
937
|
}),
|
|
@@ -937,23 +941,23 @@ var T = {
|
|
|
937
941
|
function normalize(e) {
|
|
938
942
|
return e < 0 ? -Math.floor(Math.abs(e)) : Math.floor(e);
|
|
939
943
|
}
|
|
940
|
-
const u = normalize(s ? n.translate : -n.translate), p =
|
|
941
|
-
let f =
|
|
942
|
-
if (void 0 === f && (
|
|
944
|
+
const u = normalize(s ? n.translate : -n.translate), p = o.map((e => normalize(e))), h = r.freeMode && r.freeMode.enabled;
|
|
945
|
+
let f = o[p.indexOf(u) - 1];
|
|
946
|
+
if (void 0 === f && (r.cssMode || h)) {
|
|
943
947
|
let e;
|
|
944
|
-
|
|
948
|
+
o.forEach(((t, i) => {
|
|
945
949
|
u >= t && (
|
|
946
950
|
// prevSnap = snap;
|
|
947
951
|
e = i);
|
|
948
|
-
})), void 0 !== e && (f = h ?
|
|
952
|
+
})), void 0 !== e && (f = h ? o[e] : o[e > 0 ? e - 1 : e]);
|
|
949
953
|
}
|
|
950
954
|
let v = 0;
|
|
951
|
-
if (void 0 !== f && (v = a.indexOf(f), v < 0 && (v = n.activeIndex - 1), "auto" ===
|
|
952
|
-
v = Math.max(v, 0))),
|
|
953
|
-
const
|
|
954
|
-
return n.slideTo(
|
|
955
|
+
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,
|
|
956
|
+
v = Math.max(v, 0))), r.rewind && n.isBeginning) {
|
|
957
|
+
const r = n.params.virtual && n.params.virtual.enabled && n.virtual ? n.virtual.slides.length - 1 : n.slides.length - 1;
|
|
958
|
+
return n.slideTo(r, e, t, i);
|
|
955
959
|
}
|
|
956
|
-
return
|
|
960
|
+
return r.loop && 0 === n.activeIndex && r.cssMode ? (requestAnimationFrame((() => {
|
|
957
961
|
n.slideTo(v, e, t, i);
|
|
958
962
|
})), !0) : n.slideTo(v, e, t, i);
|
|
959
963
|
}
|
|
@@ -964,57 +968,57 @@ var T = {
|
|
|
964
968
|
}
|
|
965
969
|
/* eslint no-unused-vars: "off" */ ,
|
|
966
970
|
slideToClosest: function(e, t = !0, i, n = .5) {
|
|
967
|
-
const
|
|
968
|
-
if (
|
|
969
|
-
void 0 === e && (e =
|
|
970
|
-
let
|
|
971
|
-
const a = Math.min(
|
|
972
|
-
if (l >=
|
|
971
|
+
const r = this;
|
|
972
|
+
if (r.destroyed) return;
|
|
973
|
+
void 0 === e && (e = r.params.speed);
|
|
974
|
+
let o = r.activeIndex;
|
|
975
|
+
const a = Math.min(r.params.slidesPerGroupSkip, o), s = a + Math.floor((o - a) / r.params.slidesPerGroup), l = r.rtlTranslate ? r.translate : -r.translate;
|
|
976
|
+
if (l >= r.snapGrid[s]) {
|
|
973
977
|
// The current translate is on or after the current snap index, so the choice
|
|
974
978
|
// is between the current index and the one after it.
|
|
975
|
-
const e =
|
|
976
|
-
l - e > (
|
|
979
|
+
const e = r.snapGrid[s];
|
|
980
|
+
l - e > (r.snapGrid[s + 1] - e) * n && (o += r.params.slidesPerGroup);
|
|
977
981
|
} else {
|
|
978
982
|
// The current translate is before the current snap index, so the choice
|
|
979
983
|
// is between the current index and the one before it.
|
|
980
|
-
const e =
|
|
981
|
-
l - e <= (
|
|
984
|
+
const e = r.snapGrid[s - 1];
|
|
985
|
+
l - e <= (r.snapGrid[s] - e) * n && (o -= r.params.slidesPerGroup);
|
|
982
986
|
}
|
|
983
|
-
return
|
|
987
|
+
return o = Math.max(o, 0), o = Math.min(o, r.slidesGrid.length - 1), r.slideTo(o, e, t, i);
|
|
984
988
|
},
|
|
985
989
|
slideToClickedSlide: function() {
|
|
986
990
|
const e = this;
|
|
987
991
|
if (e.destroyed) return;
|
|
988
992
|
const {params: t, slidesEl: i} = e, n = "auto" === t.slidesPerView ? e.slidesPerViewDynamic() : t.slidesPerView;
|
|
989
|
-
let
|
|
993
|
+
let r, o = e.getSlideIndexWhenGrid(e.clickedIndex);
|
|
990
994
|
const a = e.isElement ? "swiper-slide" : "." + t.slideClass, s = e.grid && e.params.grid && e.params.grid.rows > 1;
|
|
991
995
|
if (t.loop) {
|
|
992
996
|
if (e.animating) return;
|
|
993
|
-
|
|
994
|
-
|
|
997
|
+
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(),
|
|
998
|
+
o = e.getSlideIndex(elementChildren(i, `${a}[data-swiper-slide-index="${r}"]`)[0]),
|
|
995
999
|
nextTick((() => {
|
|
996
|
-
e.slideTo(
|
|
997
|
-
}))) : e.slideTo(
|
|
998
|
-
} else e.slideTo(
|
|
1000
|
+
e.slideTo(o);
|
|
1001
|
+
}))) : e.slideTo(o);
|
|
1002
|
+
} else e.slideTo(o);
|
|
999
1003
|
}
|
|
1000
1004
|
};
|
|
1001
1005
|
|
|
1002
|
-
var
|
|
1006
|
+
var E = {
|
|
1003
1007
|
loopCreate: function(e, t) {
|
|
1004
|
-
const i = this, {params: n, slidesEl:
|
|
1008
|
+
const i = this, {params: n, slidesEl: r} = i;
|
|
1005
1009
|
if (!n.loop || i.virtual && i.params.virtual.enabled) return;
|
|
1006
1010
|
const initSlides = () => {
|
|
1007
|
-
elementChildren(
|
|
1011
|
+
elementChildren(r, `.${n.slideClass}, swiper-slide`).forEach(((e, t) => {
|
|
1008
1012
|
e.setAttribute("data-swiper-slide-index", t);
|
|
1009
1013
|
}));
|
|
1010
|
-
},
|
|
1011
|
-
n.loopAddBlankSlides && (n.slidesPerGroup > 1 ||
|
|
1012
|
-
const e = elementChildren(
|
|
1014
|
+
}, o = i.grid && n.grid && n.grid.rows > 1;
|
|
1015
|
+
n.loopAddBlankSlides && (n.slidesPerGroup > 1 || o) && (() => {
|
|
1016
|
+
const e = elementChildren(r, "." + n.slideBlankClass);
|
|
1013
1017
|
e.forEach((e => {
|
|
1014
1018
|
e.remove();
|
|
1015
1019
|
})), e.length > 0 && (i.recalcSlides(), i.updateSlides());
|
|
1016
1020
|
})();
|
|
1017
|
-
const a = n.slidesPerGroup * (
|
|
1021
|
+
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 => {
|
|
1018
1022
|
for (let t = 0; t < e; t += 1) {
|
|
1019
1023
|
const e = i.isElement ? createElement("swiper-slide", [ n.slideBlankClass ]) : createElement("div", [ n.slideClass, n.slideBlankClass ]);
|
|
1020
1024
|
i.slidesEl.append(e);
|
|
@@ -1038,7 +1042,7 @@ var k = {
|
|
|
1038
1042
|
initial: t
|
|
1039
1043
|
});
|
|
1040
1044
|
},
|
|
1041
|
-
loopFix: function({slideRealIndex: e, slideTo: t = !0, direction: i, setTranslate: n, activeSlideIndex:
|
|
1045
|
+
loopFix: function({slideRealIndex: e, slideTo: t = !0, direction: i, setTranslate: n, activeSlideIndex: r, initial: o, byController: a, byMousewheel: s} = {}) {
|
|
1042
1046
|
const l = this;
|
|
1043
1047
|
if (!l.params.loop) return;
|
|
1044
1048
|
l.emit("beforeLoopFix");
|
|
@@ -1053,12 +1057,12 @@ var k = {
|
|
|
1053
1057
|
y % x != 0 && (y += x - y % x), y += h.loopAdditionalSlides, l.loopedSlides = y;
|
|
1054
1058
|
const S = l.grid && h.grid && h.grid.rows > 1;
|
|
1055
1059
|
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`");
|
|
1056
|
-
const q = [], C = [], M = S ? Math.ceil(c.length / h.grid.rows) : c.length, T =
|
|
1060
|
+
const q = [], C = [], M = S ? Math.ceil(c.length / h.grid.rows) : c.length, T = o && M - m < b && !w;
|
|
1057
1061
|
let k = T ? m : l.activeIndex;
|
|
1058
|
-
void 0 ===
|
|
1062
|
+
void 0 === r ? r = l.getSlideIndex(c.find((e => e.classList.contains(h.slideActiveClass)))) : k = r;
|
|
1059
1063
|
const P = "next" === i || !i, E = "prev" === i || !i;
|
|
1060
1064
|
let O = 0, I = 0;
|
|
1061
|
-
const A = (S ? c[
|
|
1065
|
+
const A = (S ? c[r].column : r) + (w && void 0 === n ? -b / 2 + .5 : 0);
|
|
1062
1066
|
// prepend last slides before start
|
|
1063
1067
|
if (A < y) {
|
|
1064
1068
|
O = Math.max(y - A, x);
|
|
@@ -1083,8 +1087,8 @@ var k = {
|
|
|
1083
1087
|
}
|
|
1084
1088
|
if (l.__preventObserver__ = !0, requestAnimationFrame((() => {
|
|
1085
1089
|
l.__preventObserver__ = !1;
|
|
1086
|
-
})), "cards" === l.params.effect && c.length < b + 2 * y && (C.includes(
|
|
1087
|
-
q.includes(
|
|
1090
|
+
})), "cards" === l.params.effect && c.length < b + 2 * y && (C.includes(r) && C.splice(C.indexOf(r), 1),
|
|
1091
|
+
q.includes(r) && q.splice(q.indexOf(r), 1)), E && q.forEach((e => {
|
|
1088
1092
|
c[e].swiperLoopMoveDOM = !0, p.prepend(c[e]), c[e].swiperLoopMoveDOM = !1;
|
|
1089
1093
|
})), P && C.forEach((e => {
|
|
1090
1094
|
c[e].swiperLoopMoveDOM = !0, p.append(c[e]), c[e].swiperLoopMoveDOM = !1;
|
|
@@ -1108,20 +1112,20 @@ var k = {
|
|
|
1108
1112
|
l.slideTo(l.activeIndex - e, 0, !1, !0);
|
|
1109
1113
|
}
|
|
1110
1114
|
if (l.allowSlidePrev = d, l.allowSlideNext = u, l.controller && l.controller.control && !a) {
|
|
1111
|
-
const
|
|
1115
|
+
const o = {
|
|
1112
1116
|
slideRealIndex: e,
|
|
1113
1117
|
direction: i,
|
|
1114
1118
|
setTranslate: n,
|
|
1115
|
-
activeSlideIndex:
|
|
1119
|
+
activeSlideIndex: r,
|
|
1116
1120
|
byController: !0
|
|
1117
1121
|
};
|
|
1118
1122
|
Array.isArray(l.controller.control) ? l.controller.control.forEach((e => {
|
|
1119
1123
|
!e.destroyed && e.params.loop && e.loopFix({
|
|
1120
|
-
...
|
|
1124
|
+
...o,
|
|
1121
1125
|
slideTo: e.params.slidesPerView === h.slidesPerView && t
|
|
1122
1126
|
});
|
|
1123
1127
|
})) : l.controller.control instanceof l.constructor && l.controller.control.params.loop && l.controller.control.loopFix({
|
|
1124
|
-
...
|
|
1128
|
+
...o,
|
|
1125
1129
|
slideTo: l.controller.control.params.slidesPerView === h.slidesPerView && t
|
|
1126
1130
|
});
|
|
1127
1131
|
}
|
|
@@ -1144,8 +1148,8 @@ var k = {
|
|
|
1144
1148
|
};
|
|
1145
1149
|
|
|
1146
1150
|
function preventEdgeSwipe(e, t, i) {
|
|
1147
|
-
const n = getWindow(), {params:
|
|
1148
|
-
return !
|
|
1151
|
+
const n = getWindow(), {params: r} = e, o = r.edgeSwipeDetection, a = r.edgeSwipeThreshold;
|
|
1152
|
+
return !o || !(i <= a || i >= n.innerWidth - a) || "prevent" === o && (t.preventDefault(),
|
|
1149
1153
|
!0);
|
|
1150
1154
|
}
|
|
1151
1155
|
|
|
@@ -1153,21 +1157,21 @@ function onTouchStart(e) {
|
|
|
1153
1157
|
const t = this, i = getDocument();
|
|
1154
1158
|
let n = e;
|
|
1155
1159
|
n.originalEvent && (n = n.originalEvent);
|
|
1156
|
-
const
|
|
1160
|
+
const r = t.touchEventsData;
|
|
1157
1161
|
if ("pointerdown" === n.type) {
|
|
1158
|
-
if (null !==
|
|
1159
|
-
|
|
1160
|
-
} else "touchstart" === n.type && 1 === n.targetTouches.length && (
|
|
1162
|
+
if (null !== r.pointerId && r.pointerId !== n.pointerId) return;
|
|
1163
|
+
r.pointerId = n.pointerId;
|
|
1164
|
+
} else "touchstart" === n.type && 1 === n.targetTouches.length && (r.touchId = n.targetTouches[0].identifier);
|
|
1161
1165
|
if ("touchstart" === n.type)
|
|
1162
1166
|
// don't proceed touch event
|
|
1163
1167
|
return void preventEdgeSwipe(t, n, n.targetTouches[0].pageX);
|
|
1164
|
-
const {params:
|
|
1168
|
+
const {params: o, touches: a, enabled: s} = t;
|
|
1165
1169
|
if (!s) return;
|
|
1166
|
-
if (!
|
|
1167
|
-
if (t.animating &&
|
|
1168
|
-
!t.animating &&
|
|
1170
|
+
if (!o.simulateTouch && "mouse" === n.pointerType) return;
|
|
1171
|
+
if (t.animating && o.preventInteractionOnTransition) return;
|
|
1172
|
+
!t.animating && o.cssMode && o.loop && t.loopFix();
|
|
1169
1173
|
let l = n.target;
|
|
1170
|
-
if ("wrapper" ===
|
|
1174
|
+
if ("wrapper" === o.touchEventsTarget && !function(e, t) {
|
|
1171
1175
|
const i = getWindow();
|
|
1172
1176
|
let n = t.contains(e);
|
|
1173
1177
|
!n && i.HTMLSlotElement && t instanceof HTMLSlotElement && (n = [ ...t.assignedElements() ].includes(e),
|
|
@@ -1184,14 +1188,14 @@ function onTouchStart(e) {
|
|
|
1184
1188
|
}(l, t.wrapperEl)) return;
|
|
1185
1189
|
if ("which" in n && 3 === n.which) return;
|
|
1186
1190
|
if ("button" in n && n.button > 0) return;
|
|
1187
|
-
if (
|
|
1191
|
+
if (r.isTouched && r.isMoved) return;
|
|
1188
1192
|
// change target el for shadow root component
|
|
1189
|
-
const c = !!
|
|
1193
|
+
const c = !!o.noSwipingClass && "" !== o.noSwipingClass, d = n.composedPath ? n.composedPath() : n.path;
|
|
1190
1194
|
// eslint-disable-next-line
|
|
1191
1195
|
c && n.target && n.target.shadowRoot && d && (l = d[0]);
|
|
1192
|
-
const u =
|
|
1196
|
+
const u = o.noSwipingSelector ? o.noSwipingSelector : "." + o.noSwipingClass, p = !(!n.target || !n.target.shadowRoot);
|
|
1193
1197
|
// use closestElement for shadow root element to get the actual closest for nested shadow root element
|
|
1194
|
-
if (
|
|
1198
|
+
if (o.noSwiping && (p ?
|
|
1195
1199
|
// Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd
|
|
1196
1200
|
function(e, t = this) {
|
|
1197
1201
|
return function __closestFrom(t) {
|
|
@@ -1201,32 +1205,32 @@ function onTouchStart(e) {
|
|
|
1201
1205
|
return i || t.getRootNode ? i || __closestFrom(t.getRootNode().host) : null;
|
|
1202
1206
|
}(t);
|
|
1203
1207
|
}(u, l) : l.closest(u))) return void (t.allowClick = !0);
|
|
1204
|
-
if (
|
|
1208
|
+
if (o.swipeHandler && !l.closest(o.swipeHandler)) return;
|
|
1205
1209
|
a.currentX = n.pageX, a.currentY = n.pageY;
|
|
1206
1210
|
const h = a.currentX, f = a.currentY;
|
|
1207
1211
|
// Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore
|
|
1208
1212
|
if (!preventEdgeSwipe(t, n, h)) return;
|
|
1209
|
-
Object.assign(
|
|
1213
|
+
Object.assign(r, {
|
|
1210
1214
|
isTouched: !0,
|
|
1211
1215
|
isMoved: !1,
|
|
1212
1216
|
allowTouchCallbacks: !0,
|
|
1213
1217
|
isScrolling: void 0,
|
|
1214
1218
|
startMoving: void 0
|
|
1215
|
-
}), a.startX = h, a.startY = f,
|
|
1216
|
-
t.swipeDirection = void 0,
|
|
1219
|
+
}), a.startX = h, a.startY = f, r.touchStartTime = now(), t.allowClick = !0, t.updateSize(),
|
|
1220
|
+
t.swipeDirection = void 0, o.threshold > 0 && (r.allowThresholdMove = !1);
|
|
1217
1221
|
let v = !0;
|
|
1218
|
-
l.matches(
|
|
1219
|
-
i.activeElement && i.activeElement.matches(
|
|
1220
|
-
const g = v && t.allowTouchMove &&
|
|
1221
|
-
!
|
|
1222
|
-
|
|
1222
|
+
l.matches(r.focusableElements) && (v = !1, "SELECT" === l.nodeName && (r.isTouched = !1)),
|
|
1223
|
+
i.activeElement && i.activeElement.matches(r.focusableElements) && i.activeElement !== l && ("mouse" === n.pointerType || "mouse" !== n.pointerType && !l.matches(r.focusableElements)) && i.activeElement.blur();
|
|
1224
|
+
const g = v && t.allowTouchMove && o.touchStartPreventDefault;
|
|
1225
|
+
!o.touchStartForcePreventDefault && !g || l.isContentEditable || n.preventDefault(),
|
|
1226
|
+
o.freeMode && o.freeMode.enabled && t.freeMode && t.animating && !o.cssMode && t.freeMode.onTouchStart(),
|
|
1223
1227
|
t.emit("touchStart", n);
|
|
1224
1228
|
}
|
|
1225
1229
|
|
|
1226
1230
|
function onTouchMove(e) {
|
|
1227
|
-
const t = getDocument(), i = this, n = i.touchEventsData, {params:
|
|
1231
|
+
const t = getDocument(), i = this, n = i.touchEventsData, {params: r, touches: o, rtlTranslate: a, enabled: s} = i;
|
|
1228
1232
|
if (!s) return;
|
|
1229
|
-
if (!
|
|
1233
|
+
if (!r.simulateTouch && "mouse" === e.pointerType) return;
|
|
1230
1234
|
let l, c = e;
|
|
1231
1235
|
if (c.originalEvent && (c = c.originalEvent), "pointermove" === c.type) {
|
|
1232
1236
|
if (null !== n.touchId) return;
|
|
@@ -1238,46 +1242,46 @@ function onTouchMove(e) {
|
|
|
1238
1242
|
} else l = c;
|
|
1239
1243
|
if (!n.isTouched) return void (n.startMoving && n.isScrolling && i.emit("touchMoveOpposite", c));
|
|
1240
1244
|
const d = l.pageX, u = l.pageY;
|
|
1241
|
-
if (c.preventedByNestedSwiper) return
|
|
1245
|
+
if (c.preventedByNestedSwiper) return o.startX = d, void (o.startY = u);
|
|
1242
1246
|
if (!i.allowTouchMove) return c.target.matches(n.focusableElements) || (i.allowClick = !1),
|
|
1243
|
-
void (n.isTouched && (Object.assign(
|
|
1247
|
+
void (n.isTouched && (Object.assign(o, {
|
|
1244
1248
|
startX: d,
|
|
1245
1249
|
startY: u,
|
|
1246
1250
|
currentX: d,
|
|
1247
1251
|
currentY: u
|
|
1248
1252
|
}), n.touchStartTime = now()));
|
|
1249
|
-
if (
|
|
1253
|
+
if (r.touchReleaseOnEdges && !r.loop) if (i.isVertical()) {
|
|
1250
1254
|
// Vertical
|
|
1251
|
-
if (u <
|
|
1255
|
+
if (u < o.startY && i.translate <= i.maxTranslate() || u > o.startY && i.translate >= i.minTranslate()) return n.isTouched = !1,
|
|
1252
1256
|
void (n.isMoved = !1);
|
|
1253
1257
|
} else {
|
|
1254
|
-
if (a && (d >
|
|
1255
|
-
if (!a && (d <
|
|
1258
|
+
if (a && (d > o.startX && -i.translate <= i.maxTranslate() || d < o.startX && -i.translate >= i.minTranslate())) return;
|
|
1259
|
+
if (!a && (d < o.startX && i.translate <= i.maxTranslate() || d > o.startX && i.translate >= i.minTranslate())) return;
|
|
1256
1260
|
}
|
|
1257
1261
|
if (t.activeElement && t.activeElement.matches(n.focusableElements) && t.activeElement !== c.target && "mouse" !== c.pointerType && t.activeElement.blur(),
|
|
1258
1262
|
t.activeElement && c.target === t.activeElement && c.target.matches(n.focusableElements)) return n.isMoved = !0,
|
|
1259
1263
|
void (i.allowClick = !1);
|
|
1260
|
-
n.allowTouchCallbacks && i.emit("touchMove", c),
|
|
1261
|
-
|
|
1262
|
-
const p =
|
|
1264
|
+
n.allowTouchCallbacks && i.emit("touchMove", c), o.previousX = o.currentX, o.previousY = o.currentY,
|
|
1265
|
+
o.currentX = d, o.currentY = u;
|
|
1266
|
+
const p = o.currentX - o.startX, h = o.currentY - o.startY;
|
|
1263
1267
|
if (i.params.threshold && Math.sqrt(p ** 2 + h ** 2) < i.params.threshold) return;
|
|
1264
1268
|
if (void 0 === n.isScrolling) {
|
|
1265
1269
|
let e;
|
|
1266
|
-
i.isHorizontal() &&
|
|
1270
|
+
i.isHorizontal() && o.currentY === o.startY || i.isVertical() && o.currentX === o.startX ? n.isScrolling = !1 :
|
|
1267
1271
|
// eslint-disable-next-line
|
|
1268
1272
|
p * p + h * h >= 25 && (e = 180 * Math.atan2(Math.abs(h), Math.abs(p)) / Math.PI,
|
|
1269
|
-
n.isScrolling = i.isHorizontal() ? e >
|
|
1273
|
+
n.isScrolling = i.isHorizontal() ? e > r.touchAngle : 90 - e > r.touchAngle);
|
|
1270
1274
|
}
|
|
1271
|
-
if (n.isScrolling && i.emit("touchMoveOpposite", c), void 0 === n.startMoving && (
|
|
1275
|
+
if (n.isScrolling && i.emit("touchMoveOpposite", c), void 0 === n.startMoving && (o.currentX === o.startX && o.currentY === o.startY || (n.startMoving = !0)),
|
|
1272
1276
|
n.isScrolling || "touchmove" === c.type && n.preventTouchMoveFromPointerMove) return void (n.isTouched = !1);
|
|
1273
1277
|
if (!n.startMoving) return;
|
|
1274
|
-
i.allowClick = !1, !
|
|
1275
|
-
let f = i.isHorizontal() ? p : h, v = i.isHorizontal() ?
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
+
i.allowClick = !1, !r.cssMode && c.cancelable && c.preventDefault(), r.touchMoveStopPropagation && !r.nested && c.stopPropagation();
|
|
1279
|
+
let f = i.isHorizontal() ? p : h, v = i.isHorizontal() ? o.currentX - o.previousX : o.currentY - o.previousY;
|
|
1280
|
+
r.oneWayMovement && (f = Math.abs(f) * (a ? 1 : -1), v = Math.abs(v) * (a ? 1 : -1)),
|
|
1281
|
+
o.diff = f, f *= r.touchRatio, a && (f = -f, v = -v);
|
|
1278
1282
|
const g = i.touchesDirection;
|
|
1279
1283
|
i.swipeDirection = f > 0 ? "prev" : "next", i.touchesDirection = v > 0 ? "prev" : "next";
|
|
1280
|
-
const m = i.params.loop && !
|
|
1284
|
+
const m = i.params.loop && !r.cssMode, w = "next" === i.touchesDirection && i.allowSlideNext || "prev" === i.touchesDirection && i.allowSlidePrev;
|
|
1281
1285
|
if (!n.isMoved) {
|
|
1282
1286
|
if (m && w && i.loopFix({
|
|
1283
1287
|
direction: i.swipeDirection
|
|
@@ -1293,10 +1297,10 @@ function onTouchMove(e) {
|
|
|
1293
1297
|
}
|
|
1294
1298
|
n.allowMomentumBounce = !1,
|
|
1295
1299
|
// Grab Cursor
|
|
1296
|
-
!
|
|
1300
|
+
!r.grabCursor || !0 !== i.allowSlideNext && !0 !== i.allowSlidePrev || i.setGrabCursor(!0),
|
|
1297
1301
|
i.emit("sliderFirstMove", c);
|
|
1298
1302
|
}
|
|
1299
|
-
if ((new Date).getTime(), !1 !==
|
|
1303
|
+
if ((new Date).getTime(), !1 !== r._loopSwapReset && n.isMoved && n.allowThresholdMove && g !== i.touchesDirection && m && w && Math.abs(f) >= 1) return Object.assign(o, {
|
|
1300
1304
|
startX: d,
|
|
1301
1305
|
startY: u,
|
|
1302
1306
|
currentX: d,
|
|
@@ -1304,31 +1308,31 @@ function onTouchMove(e) {
|
|
|
1304
1308
|
startTranslate: n.currentTranslate
|
|
1305
1309
|
}), n.loopSwapReset = !0, void (n.startTranslate = n.currentTranslate);
|
|
1306
1310
|
i.emit("sliderMove", c), n.isMoved = !0, n.currentTranslate = f + n.startTranslate;
|
|
1307
|
-
let b = !0, x =
|
|
1311
|
+
let b = !0, x = r.resistanceRatio;
|
|
1308
1312
|
// Threshold
|
|
1309
|
-
if (
|
|
1313
|
+
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({
|
|
1310
1314
|
direction: "prev",
|
|
1311
1315
|
setTranslate: !0,
|
|
1312
1316
|
activeSlideIndex: 0
|
|
1313
|
-
}), n.currentTranslate > i.minTranslate() && (b = !1,
|
|
1317
|
+
}), 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({
|
|
1314
1318
|
direction: "next",
|
|
1315
1319
|
setTranslate: !0,
|
|
1316
|
-
activeSlideIndex: i.slides.length - ("auto" ===
|
|
1317
|
-
}), n.currentTranslate < i.maxTranslate() && (b = !1,
|
|
1320
|
+
activeSlideIndex: i.slides.length - ("auto" === r.slidesPerView ? i.slidesPerViewDynamic() : Math.ceil(parseFloat(r.slidesPerView, 10)))
|
|
1321
|
+
}), n.currentTranslate < i.maxTranslate() && (b = !1, r.resistance && (n.currentTranslate = i.maxTranslate() + 1 - (i.maxTranslate() - n.startTranslate - f) ** x))),
|
|
1318
1322
|
b && (c.preventedByNestedSwiper = !0),
|
|
1319
1323
|
// Directions locks
|
|
1320
1324
|
!i.allowSlideNext && "next" === i.swipeDirection && n.currentTranslate < n.startTranslate && (n.currentTranslate = n.startTranslate),
|
|
1321
1325
|
!i.allowSlidePrev && "prev" === i.swipeDirection && n.currentTranslate > n.startTranslate && (n.currentTranslate = n.startTranslate),
|
|
1322
1326
|
i.allowSlidePrev || i.allowSlideNext || (n.currentTranslate = n.startTranslate),
|
|
1323
|
-
|
|
1324
|
-
if (!(Math.abs(f) >
|
|
1325
|
-
if (!n.allowThresholdMove) return n.allowThresholdMove = !0,
|
|
1326
|
-
|
|
1327
|
+
r.threshold > 0) {
|
|
1328
|
+
if (!(Math.abs(f) > r.threshold || n.allowThresholdMove)) return void (n.currentTranslate = n.startTranslate);
|
|
1329
|
+
if (!n.allowThresholdMove) return n.allowThresholdMove = !0, o.startX = o.currentX,
|
|
1330
|
+
o.startY = o.currentY, n.currentTranslate = n.startTranslate, void (o.diff = i.isHorizontal() ? o.currentX - o.startX : o.currentY - o.startY);
|
|
1327
1331
|
}
|
|
1328
|
-
|
|
1332
|
+
r.followFinger && !r.cssMode && (
|
|
1329
1333
|
// Update active index in free mode
|
|
1330
|
-
(
|
|
1331
|
-
i.updateSlidesClasses()),
|
|
1334
|
+
(r.freeMode && r.freeMode.enabled && i.freeMode || r.watchSlidesProgress) && (i.updateActiveIndex(),
|
|
1335
|
+
i.updateSlidesClasses()), r.freeMode && r.freeMode.enabled && i.freeMode && i.freeMode.onTouchMove(),
|
|
1332
1336
|
// Update progress
|
|
1333
1337
|
i.updateProgress(n.currentTranslate),
|
|
1334
1338
|
// Update translate
|
|
@@ -1337,66 +1341,66 @@ function onTouchMove(e) {
|
|
|
1337
1341
|
|
|
1338
1342
|
function onTouchEnd(e) {
|
|
1339
1343
|
const t = this, i = t.touchEventsData;
|
|
1340
|
-
let n,
|
|
1341
|
-
|
|
1342
|
-
if ("touchend" ===
|
|
1343
|
-
if (n = [ ...
|
|
1344
|
+
let n, r = e;
|
|
1345
|
+
r.originalEvent && (r = r.originalEvent);
|
|
1346
|
+
if ("touchend" === r.type || "touchcancel" === r.type) {
|
|
1347
|
+
if (n = [ ...r.changedTouches ].find((e => e.identifier === i.touchId)), !n || n.identifier !== i.touchId) return;
|
|
1344
1348
|
} else {
|
|
1345
1349
|
if (null !== i.touchId) return;
|
|
1346
1350
|
// return from pointer if we use touch
|
|
1347
|
-
if (
|
|
1348
|
-
n =
|
|
1351
|
+
if (r.pointerId !== i.pointerId) return;
|
|
1352
|
+
n = r;
|
|
1349
1353
|
}
|
|
1350
|
-
if ([ "pointercancel", "pointerout", "pointerleave", "contextmenu" ].includes(
|
|
1351
|
-
if (!([ "pointercancel", "contextmenu" ].includes(
|
|
1354
|
+
if ([ "pointercancel", "pointerout", "pointerleave", "contextmenu" ].includes(r.type)) {
|
|
1355
|
+
if (!([ "pointercancel", "contextmenu" ].includes(r.type) && (t.browser.isSafari || t.browser.isWebView))) return;
|
|
1352
1356
|
}
|
|
1353
1357
|
i.pointerId = null, i.touchId = null;
|
|
1354
|
-
const {params:
|
|
1358
|
+
const {params: o, touches: a, rtlTranslate: s, slidesGrid: l, enabled: c} = t;
|
|
1355
1359
|
if (!c) return;
|
|
1356
|
-
if (!
|
|
1357
|
-
if (i.allowTouchCallbacks && t.emit("touchEnd",
|
|
1358
|
-
!i.isTouched) return i.isMoved &&
|
|
1360
|
+
if (!o.simulateTouch && "mouse" === r.pointerType) return;
|
|
1361
|
+
if (i.allowTouchCallbacks && t.emit("touchEnd", r), i.allowTouchCallbacks = !1,
|
|
1362
|
+
!i.isTouched) return i.isMoved && o.grabCursor && t.setGrabCursor(!1), i.isMoved = !1,
|
|
1359
1363
|
void (i.startMoving = !1);
|
|
1360
1364
|
// Return Grab Cursor
|
|
1361
|
-
|
|
1365
|
+
o.grabCursor && i.isMoved && i.isTouched && (!0 === t.allowSlideNext || !0 === t.allowSlidePrev) && t.setGrabCursor(!1);
|
|
1362
1366
|
// Time diff
|
|
1363
1367
|
const d = now(), u = d - i.touchStartTime;
|
|
1364
1368
|
// Tap, doubleTap, Click
|
|
1365
1369
|
if (t.allowClick) {
|
|
1366
|
-
const e =
|
|
1367
|
-
t.updateClickedSlide(e && e[0] ||
|
|
1370
|
+
const e = r.path || r.composedPath && r.composedPath();
|
|
1371
|
+
t.updateClickedSlide(e && e[0] || r.target, e), t.emit("tap click", r), u < 300 && d - i.lastClickTime < 300 && t.emit("doubleTap doubleClick", r);
|
|
1368
1372
|
}
|
|
1369
1373
|
if (i.lastClickTime = now(), nextTick((() => {
|
|
1370
1374
|
t.destroyed || (t.allowClick = !0);
|
|
1371
1375
|
})), !i.isTouched || !i.isMoved || !t.swipeDirection || 0 === a.diff && !i.loopSwapReset || i.currentTranslate === i.startTranslate && !i.loopSwapReset) return i.isTouched = !1,
|
|
1372
1376
|
i.isMoved = !1, void (i.startMoving = !1);
|
|
1373
1377
|
let p;
|
|
1374
|
-
if (i.isTouched = !1, i.isMoved = !1, i.startMoving = !1, p =
|
|
1375
|
-
|
|
1376
|
-
if (
|
|
1378
|
+
if (i.isTouched = !1, i.isMoved = !1, i.startMoving = !1, p = o.followFinger ? s ? t.translate : -t.translate : -i.currentTranslate,
|
|
1379
|
+
o.cssMode) return;
|
|
1380
|
+
if (o.freeMode && o.freeMode.enabled) return void t.freeMode.onTouchEnd({
|
|
1377
1381
|
currentPos: p
|
|
1378
1382
|
});
|
|
1379
1383
|
// Find current slide
|
|
1380
1384
|
const h = p >= -t.maxTranslate() && !t.params.loop;
|
|
1381
1385
|
let f = 0, v = t.slidesSizesGrid[0];
|
|
1382
|
-
for (let e = 0; e < l.length; e += e <
|
|
1383
|
-
const t = e <
|
|
1386
|
+
for (let e = 0; e < l.length; e += e < o.slidesPerGroupSkip ? 1 : o.slidesPerGroup) {
|
|
1387
|
+
const t = e < o.slidesPerGroupSkip - 1 ? 1 : o.slidesPerGroup;
|
|
1384
1388
|
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,
|
|
1385
1389
|
v = l[l.length - 1] - l[l.length - 2]);
|
|
1386
1390
|
}
|
|
1387
1391
|
let g = null, m = null;
|
|
1388
|
-
|
|
1392
|
+
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));
|
|
1389
1393
|
// Find current slide size
|
|
1390
|
-
const w = (p - l[f]) / v, b = f <
|
|
1391
|
-
if (u >
|
|
1394
|
+
const w = (p - l[f]) / v, b = f < o.slidesPerGroupSkip - 1 ? 1 : o.slidesPerGroup;
|
|
1395
|
+
if (u > o.longSwipesMs) {
|
|
1392
1396
|
// Long touches
|
|
1393
|
-
if (!
|
|
1394
|
-
"next" === t.swipeDirection && (w >=
|
|
1395
|
-
"prev" === t.swipeDirection && (w > 1 -
|
|
1397
|
+
if (!o.longSwipes) return void t.slideTo(t.activeIndex);
|
|
1398
|
+
"next" === t.swipeDirection && (w >= o.longSwipesRatio ? t.slideTo(o.rewind && t.isEnd ? g : f + b) : t.slideTo(f)),
|
|
1399
|
+
"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));
|
|
1396
1400
|
} else {
|
|
1397
1401
|
// Short swipes
|
|
1398
|
-
if (!
|
|
1399
|
-
t.navigation && (
|
|
1402
|
+
if (!o.shortSwipes) return void t.slideTo(t.activeIndex);
|
|
1403
|
+
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),
|
|
1400
1404
|
"prev" === t.swipeDirection && t.slideTo(null !== m ? m : f));
|
|
1401
1405
|
}
|
|
1402
1406
|
}
|
|
@@ -1407,7 +1411,7 @@ function onResize() {
|
|
|
1407
1411
|
// Breakpoints
|
|
1408
1412
|
t.breakpoints && e.setBreakpoint();
|
|
1409
1413
|
// Save locks
|
|
1410
|
-
const {allowSlideNext: n, allowSlidePrev:
|
|
1414
|
+
const {allowSlideNext: n, allowSlidePrev: r, snapGrid: o} = e, a = e.virtual && e.params.virtual.enabled;
|
|
1411
1415
|
// Disable locks on resize
|
|
1412
1416
|
e.allowSlideNext = !0, e.allowSlidePrev = !0, e.updateSize(), e.updateSlides(),
|
|
1413
1417
|
e.updateSlidesClasses();
|
|
@@ -1418,7 +1422,7 @@ function onResize() {
|
|
|
1418
1422
|
e.autoplay && e.autoplay.running && e.autoplay.paused && e.autoplay.resume();
|
|
1419
1423
|
}), 500)),
|
|
1420
1424
|
// Return locks after resize
|
|
1421
|
-
e.allowSlidePrev =
|
|
1425
|
+
e.allowSlidePrev = r, e.allowSlideNext = n, e.params.watchOverflow && o !== e.snapGrid && e.checkOverflow();
|
|
1422
1426
|
}
|
|
1423
1427
|
|
|
1424
1428
|
function onClick(e) {
|
|
@@ -1430,12 +1434,12 @@ function onClick(e) {
|
|
|
1430
1434
|
function onScroll() {
|
|
1431
1435
|
const e = this, {wrapperEl: t, rtlTranslate: i, enabled: n} = e;
|
|
1432
1436
|
if (!n) return;
|
|
1433
|
-
let
|
|
1437
|
+
let r;
|
|
1434
1438
|
e.previousTranslate = e.translate, e.isHorizontal() ? e.translate = -t.scrollLeft : e.translate = -t.scrollTop,
|
|
1435
1439
|
// eslint-disable-next-line
|
|
1436
1440
|
0 === e.translate && (e.translate = 0), e.updateActiveIndex(), e.updateSlidesClasses();
|
|
1437
|
-
const
|
|
1438
|
-
|
|
1441
|
+
const o = e.maxTranslate() - e.minTranslate();
|
|
1442
|
+
r = 0 === o ? 0 : (e.translate - e.minTranslate()) / o, r !== e.progress && e.updateProgress(i ? -e.translate : e.translate),
|
|
1439
1443
|
e.emit("setTranslate", e.translate, !1);
|
|
1440
1444
|
}
|
|
1441
1445
|
|
|
@@ -1450,15 +1454,15 @@ function onDocumentTouchStart() {
|
|
|
1450
1454
|
}
|
|
1451
1455
|
|
|
1452
1456
|
const events = (e, t) => {
|
|
1453
|
-
const i = getDocument(), {params: n, el:
|
|
1454
|
-
|
|
1457
|
+
const i = getDocument(), {params: n, el: r, wrapperEl: o, device: a} = e, s = !!n.nested, l = "on" === t ? "addEventListener" : "removeEventListener", c = t;
|
|
1458
|
+
r && "string" != typeof r && (
|
|
1455
1459
|
// Touch Events
|
|
1456
1460
|
i[l]("touchstart", e.onDocumentTouchStart, {
|
|
1457
1461
|
passive: !1,
|
|
1458
1462
|
capture: s
|
|
1459
|
-
}),
|
|
1463
|
+
}), r[l]("touchstart", e.onTouchStart, {
|
|
1460
1464
|
passive: !1
|
|
1461
|
-
}),
|
|
1465
|
+
}), r[l]("pointerdown", e.onTouchStart, {
|
|
1462
1466
|
passive: !1
|
|
1463
1467
|
}), i[l]("touchmove", e.onTouchMove, {
|
|
1464
1468
|
passive: !1,
|
|
@@ -1482,19 +1486,19 @@ const events = (e, t) => {
|
|
|
1482
1486
|
passive: !0
|
|
1483
1487
|
}),
|
|
1484
1488
|
// Prevent Links Clicks
|
|
1485
|
-
(n.preventClicks || n.preventClicksPropagation) &&
|
|
1486
|
-
n.cssMode &&
|
|
1489
|
+
(n.preventClicks || n.preventClicksPropagation) && r[l]("click", e.onClick, !0),
|
|
1490
|
+
n.cssMode && o[l]("scroll", e.onScroll),
|
|
1487
1491
|
// Resize handler
|
|
1488
1492
|
n.updateOnWindowResize ? e[c](a.ios || a.android ? "resize orientationchange observerUpdate" : "resize observerUpdate", onResize, !0) : e[c]("observerUpdate", onResize, !0),
|
|
1489
1493
|
// Images loader
|
|
1490
|
-
|
|
1494
|
+
r[l]("load", e.onLoad, {
|
|
1491
1495
|
capture: !0
|
|
1492
1496
|
}));
|
|
1493
1497
|
};
|
|
1494
1498
|
|
|
1495
1499
|
const isGridEnabled = (e, t) => e.grid && t.grid && t.grid.rows > 1;
|
|
1496
1500
|
|
|
1497
|
-
var
|
|
1501
|
+
var O = {
|
|
1498
1502
|
init: !0,
|
|
1499
1503
|
direction: "horizontal",
|
|
1500
1504
|
oneWayMovement: !1,
|
|
@@ -1618,22 +1622,22 @@ var P = {
|
|
|
1618
1622
|
|
|
1619
1623
|
function moduleExtendParams(e, t) {
|
|
1620
1624
|
return function(i = {}) {
|
|
1621
|
-
const n = Object.keys(i)[0],
|
|
1622
|
-
"object" == typeof
|
|
1625
|
+
const n = Object.keys(i)[0], r = i[n];
|
|
1626
|
+
"object" == typeof r && null !== r ? (!0 === e[n] && (e[n] = {
|
|
1623
1627
|
enabled: !0
|
|
1624
1628
|
}), "navigation" === n && e[n] && e[n].enabled && !e[n].prevEl && !e[n].nextEl && (e[n].auto = !0),
|
|
1625
1629
|
[ "pagination", "scrollbar" ].indexOf(n) >= 0 && e[n] && e[n].enabled && !e[n].el && (e[n].auto = !0),
|
|
1626
|
-
n in e && "enabled" in
|
|
1630
|
+
n in e && "enabled" in r ? ("object" != typeof e[n] || "enabled" in e[n] || (e[n].enabled = !0),
|
|
1627
1631
|
e[n] || (e[n] = {
|
|
1628
1632
|
enabled: !1
|
|
1629
1633
|
}), extend(t, i)) : extend(t, i)) : extend(t, i);
|
|
1630
1634
|
};
|
|
1631
1635
|
}
|
|
1632
1636
|
|
|
1633
|
-
/* eslint no-param-reassign: "off" */ const
|
|
1634
|
-
eventsEmitter:
|
|
1635
|
-
update:
|
|
1636
|
-
translate:
|
|
1637
|
+
/* eslint no-param-reassign: "off" */ const I = {
|
|
1638
|
+
eventsEmitter: M,
|
|
1639
|
+
update: T,
|
|
1640
|
+
translate: k,
|
|
1637
1641
|
transition: {
|
|
1638
1642
|
setTransition: function(e, t) {
|
|
1639
1643
|
const i = this;
|
|
@@ -1659,8 +1663,8 @@ function moduleExtendParams(e, t) {
|
|
|
1659
1663
|
}));
|
|
1660
1664
|
}
|
|
1661
1665
|
},
|
|
1662
|
-
slide:
|
|
1663
|
-
loop:
|
|
1666
|
+
slide: P,
|
|
1667
|
+
loop: E,
|
|
1664
1668
|
grabCursor: {
|
|
1665
1669
|
setGrabCursor: function(e) {
|
|
1666
1670
|
const t = this;
|
|
@@ -1693,21 +1697,21 @@ function moduleExtendParams(e, t) {
|
|
|
1693
1697
|
},
|
|
1694
1698
|
breakpoints: {
|
|
1695
1699
|
setBreakpoint: function() {
|
|
1696
|
-
const e = this, {realIndex: t, initialized: i, params: n, el:
|
|
1697
|
-
if (!
|
|
1698
|
-
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(
|
|
1700
|
+
const e = this, {realIndex: t, initialized: i, params: n, el: r} = e, o = n.breakpoints;
|
|
1701
|
+
if (!o || o && 0 === Object.keys(o).length) return;
|
|
1702
|
+
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);
|
|
1699
1703
|
// Get breakpoint for window/container width and update parameters
|
|
1700
1704
|
if (!c || e.currentBreakpoint === c) return;
|
|
1701
|
-
const d = (c in
|
|
1702
|
-
u && !p ? (
|
|
1703
|
-
e.emitContainerClasses()) : !u && p && (
|
|
1704
|
-
(d.grid.fill && "column" === d.grid.fill || !d.grid.fill && "column" === n.grid.fill) &&
|
|
1705
|
+
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;
|
|
1706
|
+
u && !p ? (r.classList.remove(n.containerModifierClass + "grid", n.containerModifierClass + "grid-column"),
|
|
1707
|
+
e.emitContainerClasses()) : !u && p && (r.classList.add(n.containerModifierClass + "grid"),
|
|
1708
|
+
(d.grid.fill && "column" === d.grid.fill || !d.grid.fill && "column" === n.grid.fill) && r.classList.add(n.containerModifierClass + "grid-column"),
|
|
1705
1709
|
e.emitContainerClasses()), h && !f ? e.unsetGrabCursor() : !h && f && e.setGrabCursor(),
|
|
1706
1710
|
// Toggle navigation, pagination, scrollbar
|
|
1707
1711
|
[ "navigation", "pagination", "scrollbar" ].forEach((t => {
|
|
1708
1712
|
if (void 0 === d[t]) return;
|
|
1709
|
-
const i = n[t] && n[t].enabled,
|
|
1710
|
-
i && !
|
|
1713
|
+
const i = n[t] && n[t].enabled, r = d[t] && d[t].enabled;
|
|
1714
|
+
i && !r && e[t].disable(), !i && r && e[t].enable();
|
|
1711
1715
|
}));
|
|
1712
1716
|
const g = d.direction && d.direction !== n.direction, m = n.loop && (d.slidesPerView !== n.slidesPerView || g), w = n.loop;
|
|
1713
1717
|
g && i && e.changeDirection(), extend(e.params, d);
|
|
@@ -1723,11 +1727,11 @@ function moduleExtendParams(e, t) {
|
|
|
1723
1727
|
getBreakpoint: function(e, t = "window", i) {
|
|
1724
1728
|
if (!e || "container" === t && !i) return;
|
|
1725
1729
|
let n = !1;
|
|
1726
|
-
const
|
|
1730
|
+
const r = getWindow(), o = "window" === t ? r.innerHeight : i.clientHeight, a = Object.keys(e).map((e => {
|
|
1727
1731
|
if ("string" == typeof e && 0 === e.indexOf("@")) {
|
|
1728
1732
|
const t = parseFloat(e.substr(1));
|
|
1729
1733
|
return {
|
|
1730
|
-
value:
|
|
1734
|
+
value: o * t,
|
|
1731
1735
|
point: e
|
|
1732
1736
|
};
|
|
1733
1737
|
}
|
|
@@ -1738,8 +1742,8 @@ function moduleExtendParams(e, t) {
|
|
|
1738
1742
|
}));
|
|
1739
1743
|
a.sort(((e, t) => parseInt(e.value, 10) - parseInt(t.value, 10)));
|
|
1740
1744
|
for (let e = 0; e < a.length; e += 1) {
|
|
1741
|
-
const {point:
|
|
1742
|
-
"window" === t ?
|
|
1745
|
+
const {point: o, value: s} = a[e];
|
|
1746
|
+
"window" === t ? r.matchMedia(`(min-width: ${s}px)`).matches && (n = o) : s <= i.clientWidth && (n = o);
|
|
1743
1747
|
}
|
|
1744
1748
|
return n || "max";
|
|
1745
1749
|
}
|
|
@@ -1757,7 +1761,7 @@ function moduleExtendParams(e, t) {
|
|
|
1757
1761
|
},
|
|
1758
1762
|
classes: {
|
|
1759
1763
|
addClasses: function() {
|
|
1760
|
-
const e = this, {classNames: t, params: i, rtl: n, el:
|
|
1764
|
+
const e = this, {classNames: t, params: i, rtl: n, el: r, device: o} = e, a = function(e, t) {
|
|
1761
1765
|
const i = [];
|
|
1762
1766
|
return e.forEach((e => {
|
|
1763
1767
|
"object" == typeof e ? Object.keys(e).forEach((n => {
|
|
@@ -1775,9 +1779,9 @@ function moduleExtendParams(e, t) {
|
|
|
1775
1779
|
}, {
|
|
1776
1780
|
"grid-column": i.grid && i.grid.rows > 1 && "column" === i.grid.fill
|
|
1777
1781
|
}, {
|
|
1778
|
-
android:
|
|
1782
|
+
android: o.android
|
|
1779
1783
|
}, {
|
|
1780
|
-
ios:
|
|
1784
|
+
ios: o.ios
|
|
1781
1785
|
}, {
|
|
1782
1786
|
"css-mode": i.cssMode
|
|
1783
1787
|
}, {
|
|
@@ -1785,16 +1789,16 @@ function moduleExtendParams(e, t) {
|
|
|
1785
1789
|
}, {
|
|
1786
1790
|
"watch-progress": i.watchSlidesProgress
|
|
1787
1791
|
} ], i.containerModifierClass);
|
|
1788
|
-
t.push(...a),
|
|
1792
|
+
t.push(...a), r.classList.add(...t), e.emitContainerClasses();
|
|
1789
1793
|
},
|
|
1790
1794
|
removeClasses: function() {
|
|
1791
1795
|
const {el: e, classNames: t} = this;
|
|
1792
1796
|
e && "string" != typeof e && (e.classList.remove(...t), this.emitContainerClasses());
|
|
1793
1797
|
}
|
|
1794
1798
|
}
|
|
1795
|
-
},
|
|
1799
|
+
}, A = {};
|
|
1796
1800
|
|
|
1797
|
-
class
|
|
1801
|
+
class L {
|
|
1798
1802
|
constructor(...e) {
|
|
1799
1803
|
let t, i;
|
|
1800
1804
|
1 === e.length && e[0].constructor && "Object" === Object.prototype.toString.call(e[0]).slice(8, -1) ? i = e[0] : [t, i] = e,
|
|
@@ -1807,43 +1811,43 @@ class I {
|
|
|
1807
1811
|
const n = extend({}, i, {
|
|
1808
1812
|
el: t
|
|
1809
1813
|
});
|
|
1810
|
-
e.push(new
|
|
1814
|
+
e.push(new L(n));
|
|
1811
1815
|
})), e;
|
|
1812
1816
|
}
|
|
1813
1817
|
// Swiper Instance
|
|
1814
|
-
const
|
|
1815
|
-
|
|
1818
|
+
const r = this;
|
|
1819
|
+
r.__swiper__ = !0, r.support = getSupport(), r.device = getDevice({
|
|
1816
1820
|
userAgent: i.userAgent
|
|
1817
|
-
}),
|
|
1818
|
-
|
|
1819
|
-
"function" == typeof e &&
|
|
1821
|
+
}), r.browser = getBrowser(), r.eventsListeners = {}, r.eventsAnyListeners = [],
|
|
1822
|
+
r.modules = [ ...r.__modules__ ], i.modules && Array.isArray(i.modules) && i.modules.forEach((e => {
|
|
1823
|
+
"function" == typeof e && r.modules.indexOf(e) < 0 && r.modules.push(e);
|
|
1820
1824
|
}));
|
|
1821
|
-
const
|
|
1822
|
-
|
|
1825
|
+
const o = {};
|
|
1826
|
+
r.modules.forEach((e => {
|
|
1823
1827
|
e({
|
|
1824
1828
|
params: i,
|
|
1825
|
-
swiper:
|
|
1826
|
-
extendParams: moduleExtendParams(i,
|
|
1827
|
-
on:
|
|
1828
|
-
once:
|
|
1829
|
-
off:
|
|
1830
|
-
emit:
|
|
1829
|
+
swiper: r,
|
|
1830
|
+
extendParams: moduleExtendParams(i, o),
|
|
1831
|
+
on: r.on.bind(r),
|
|
1832
|
+
once: r.once.bind(r),
|
|
1833
|
+
off: r.off.bind(r),
|
|
1834
|
+
emit: r.emit.bind(r)
|
|
1831
1835
|
});
|
|
1832
1836
|
}));
|
|
1833
1837
|
// Extend defaults with modules params
|
|
1834
|
-
const a = extend({},
|
|
1838
|
+
const a = extend({}, O, o);
|
|
1835
1839
|
// Extend defaults with passed params
|
|
1836
1840
|
// Return app instance
|
|
1837
1841
|
// eslint-disable-next-line no-constructor-return
|
|
1838
|
-
return
|
|
1839
|
-
|
|
1842
|
+
return r.params = extend({}, a, A, i), r.originalParams = extend({}, r.params),
|
|
1843
|
+
r.passedParams = extend({}, i),
|
|
1840
1844
|
// add event listeners
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
})),
|
|
1845
|
+
r.params && r.params.on && Object.keys(r.params.on).forEach((e => {
|
|
1846
|
+
r.on(e, r.params.on[e]);
|
|
1847
|
+
})), r.params && r.params.onAny && r.onAny(r.params.onAny),
|
|
1844
1848
|
// Extend Swiper
|
|
1845
|
-
Object.assign(
|
|
1846
|
-
enabled:
|
|
1849
|
+
Object.assign(r, {
|
|
1850
|
+
enabled: r.params.enabled,
|
|
1847
1851
|
el: t,
|
|
1848
1852
|
// Classes
|
|
1849
1853
|
classNames: [],
|
|
@@ -1853,8 +1857,8 @@ class I {
|
|
|
1853
1857
|
snapGrid: [],
|
|
1854
1858
|
slidesSizesGrid: [],
|
|
1855
1859
|
// isDirection
|
|
1856
|
-
isHorizontal: () => "horizontal" ===
|
|
1857
|
-
isVertical: () => "vertical" ===
|
|
1860
|
+
isHorizontal: () => "horizontal" === r.params.direction,
|
|
1861
|
+
isVertical: () => "vertical" === r.params.direction,
|
|
1858
1862
|
// Indexes
|
|
1859
1863
|
activeIndex: 0,
|
|
1860
1864
|
realIndex: 0,
|
|
@@ -1872,8 +1876,8 @@ class I {
|
|
|
1872
1876
|
return Math.trunc(this.translate / 2 ** 23) * 2 ** 23;
|
|
1873
1877
|
},
|
|
1874
1878
|
// Locks
|
|
1875
|
-
allowSlideNext:
|
|
1876
|
-
allowSlidePrev:
|
|
1879
|
+
allowSlideNext: r.params.allowSlideNext,
|
|
1880
|
+
allowSlidePrev: r.params.allowSlidePrev,
|
|
1877
1881
|
// Touch Events
|
|
1878
1882
|
touchEventsData: {
|
|
1879
1883
|
isTouched: void 0,
|
|
@@ -1885,7 +1889,7 @@ class I {
|
|
|
1885
1889
|
startTranslate: void 0,
|
|
1886
1890
|
allowThresholdMove: void 0,
|
|
1887
1891
|
// Form elements to match
|
|
1888
|
-
focusableElements:
|
|
1892
|
+
focusableElements: r.params.focusableElements,
|
|
1889
1893
|
// Last click time
|
|
1890
1894
|
lastClickTime: 0,
|
|
1891
1895
|
clickTimeout: void 0,
|
|
@@ -1899,7 +1903,7 @@ class I {
|
|
|
1899
1903
|
// Clicks
|
|
1900
1904
|
allowClick: !0,
|
|
1901
1905
|
// Touches
|
|
1902
|
-
allowTouchMove:
|
|
1906
|
+
allowTouchMove: r.params.allowTouchMove,
|
|
1903
1907
|
touches: {
|
|
1904
1908
|
startX: 0,
|
|
1905
1909
|
startY: 0,
|
|
@@ -1910,9 +1914,9 @@ class I {
|
|
|
1910
1914
|
// Images
|
|
1911
1915
|
imagesToLoad: [],
|
|
1912
1916
|
imagesLoaded: 0
|
|
1913
|
-
}),
|
|
1917
|
+
}), r.emit("_swiper"),
|
|
1914
1918
|
// Init
|
|
1915
|
-
|
|
1919
|
+
r.params.init && r.init(), r;
|
|
1916
1920
|
}
|
|
1917
1921
|
getDirectionLabel(e) {
|
|
1918
1922
|
return this.isHorizontal() ? e : {
|
|
@@ -1953,8 +1957,8 @@ class I {
|
|
|
1953
1957
|
setProgress(e, t) {
|
|
1954
1958
|
const i = this;
|
|
1955
1959
|
e = Math.min(Math.max(e, 0), 1);
|
|
1956
|
-
const n = i.minTranslate(),
|
|
1957
|
-
i.translateTo(
|
|
1960
|
+
const n = i.minTranslate(), r = (i.maxTranslate() - n) * e + n;
|
|
1961
|
+
i.translateTo(r, void 0 === t ? 0 : t), i.updateActiveIndex(), i.updateSlidesClasses();
|
|
1958
1962
|
}
|
|
1959
1963
|
emitContainerClasses() {
|
|
1960
1964
|
const e = this;
|
|
@@ -1979,7 +1983,7 @@ class I {
|
|
|
1979
1983
|
})), e.emit("_slideClasses", t);
|
|
1980
1984
|
}
|
|
1981
1985
|
slidesPerViewDynamic(e = "current", t = !1) {
|
|
1982
|
-
const {params: i, slides: n, slidesGrid:
|
|
1986
|
+
const {params: i, slides: n, slidesGrid: r, slidesSizesGrid: o, size: a, activeIndex: s} = this;
|
|
1983
1987
|
let l = 1;
|
|
1984
1988
|
if ("number" == typeof i.slidesPerView) return i.slidesPerView;
|
|
1985
1989
|
if (i.centeredSlides) {
|
|
@@ -1991,11 +1995,11 @@ class I {
|
|
|
1991
1995
|
} else
|
|
1992
1996
|
// eslint-disable-next-line
|
|
1993
1997
|
if ("current" === e) for (let e = s + 1; e < n.length; e += 1) {
|
|
1994
|
-
(t ?
|
|
1998
|
+
(t ? r[e] + o[e] - r[s] < a : r[e] - r[s] < a) && (l += 1);
|
|
1995
1999
|
} else
|
|
1996
2000
|
// previous
|
|
1997
2001
|
for (let e = s - 1; e >= 0; e -= 1) {
|
|
1998
|
-
|
|
2002
|
+
r[s] - r[e] < a && (l += 1);
|
|
1999
2003
|
}
|
|
2000
2004
|
return l;
|
|
2001
2005
|
}
|
|
@@ -2102,7 +2106,7 @@ class I {
|
|
|
2102
2106
|
t.emit("init"), t.emit("afterInit"), t;
|
|
2103
2107
|
}
|
|
2104
2108
|
destroy(e = !0, t = !0) {
|
|
2105
|
-
const i = this, {params: n, el:
|
|
2109
|
+
const i = this, {params: n, el: r, wrapperEl: o, slides: a} = i;
|
|
2106
2110
|
return void 0 === i.params || i.destroyed || (i.emit("beforeDestroy"),
|
|
2107
2111
|
// Init Flag
|
|
2108
2112
|
i.initialized = !1,
|
|
@@ -2111,8 +2115,8 @@ class I {
|
|
|
2111
2115
|
// Destroy loop
|
|
2112
2116
|
n.loop && i.loopDestroy(),
|
|
2113
2117
|
// Cleanup styles
|
|
2114
|
-
t && (i.removeClasses(),
|
|
2115
|
-
|
|
2118
|
+
t && (i.removeClasses(), r && "string" != typeof r && r.removeAttribute("style"),
|
|
2119
|
+
o && o.removeAttribute("style"), a && a.length && a.forEach((e => {
|
|
2116
2120
|
e.classList.remove(n.slideVisibleClass, n.slideFullyVisibleClass, n.slideActiveClass, n.slideNextClass, n.slidePrevClass),
|
|
2117
2121
|
e.removeAttribute("style"), e.removeAttribute("data-swiper-slide-index");
|
|
2118
2122
|
}))), i.emit("destroy"),
|
|
@@ -2136,29 +2140,29 @@ class I {
|
|
|
2136
2140
|
}(i)), i.destroyed = !0), null;
|
|
2137
2141
|
}
|
|
2138
2142
|
static extendDefaults(e) {
|
|
2139
|
-
extend(
|
|
2143
|
+
extend(A, e);
|
|
2140
2144
|
}
|
|
2141
2145
|
static get extendedDefaults() {
|
|
2142
|
-
return
|
|
2146
|
+
return A;
|
|
2143
2147
|
}
|
|
2144
2148
|
static get defaults() {
|
|
2145
|
-
return
|
|
2149
|
+
return O;
|
|
2146
2150
|
}
|
|
2147
2151
|
static installModule(e) {
|
|
2148
|
-
|
|
2149
|
-
const t =
|
|
2152
|
+
L.prototype.__modules__ || (L.prototype.__modules__ = []);
|
|
2153
|
+
const t = L.prototype.__modules__;
|
|
2150
2154
|
"function" == typeof e && t.indexOf(e) < 0 && t.push(e);
|
|
2151
2155
|
}
|
|
2152
2156
|
static use(e) {
|
|
2153
|
-
return Array.isArray(e) ? (e.forEach((e =>
|
|
2154
|
-
|
|
2157
|
+
return Array.isArray(e) ? (e.forEach((e => L.installModule(e))), L) : (L.installModule(e),
|
|
2158
|
+
L);
|
|
2155
2159
|
}
|
|
2156
2160
|
}
|
|
2157
2161
|
|
|
2158
2162
|
/* eslint no-underscore-dangle: "off" */
|
|
2159
2163
|
/* eslint no-use-before-define: "off" */
|
|
2160
|
-
function Autoplay({swiper: e, extendParams: t, on: i, emit: n, params:
|
|
2161
|
-
let
|
|
2164
|
+
function Autoplay({swiper: e, extendParams: t, on: i, emit: n, params: r}) {
|
|
2165
|
+
let o, a;
|
|
2162
2166
|
e.autoplay = {
|
|
2163
2167
|
running: !1,
|
|
2164
2168
|
paused: !1,
|
|
@@ -2174,7 +2178,7 @@ function Autoplay({swiper: e, extendParams: t, on: i, emit: n, params: o}) {
|
|
|
2174
2178
|
pauseOnMouseEnter: !1
|
|
2175
2179
|
}
|
|
2176
2180
|
});
|
|
2177
|
-
let s, l, c, d, u, p, h, f =
|
|
2181
|
+
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();
|
|
2178
2182
|
function onTransitionEnd(t) {
|
|
2179
2183
|
e && !e.destroyed && e.wrapperEl && t.target === e.wrapperEl && (e.wrapperEl.removeEventListener("transitionend", onTransitionEnd),
|
|
2180
2184
|
h || t.detail && t.detail.bySwiperTouchMove || resume());
|
|
@@ -2200,17 +2204,17 @@ function Autoplay({swiper: e, extendParams: t, on: i, emit: n, params: o}) {
|
|
|
2200
2204
|
cancelAnimationFrame(a), calcTimeLeft();
|
|
2201
2205
|
let i = t;
|
|
2202
2206
|
void 0 === i && (i = getTotalDelay(), f = i, v = i), s = i;
|
|
2203
|
-
const
|
|
2204
|
-
e && !e.destroyed && (e.params.autoplay.reverseDirection ? !e.isBeginning || e.params.loop || e.params.rewind ? (e.slidePrev(
|
|
2205
|
-
n("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(e.slides.length - 1,
|
|
2206
|
-
n("autoplay")) : !e.isEnd || e.params.loop || e.params.rewind ? (e.slideNext(
|
|
2207
|
-
n("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(0,
|
|
2207
|
+
const r = e.params.speed, proceed = () => {
|
|
2208
|
+
e && !e.destroyed && (e.params.autoplay.reverseDirection ? !e.isBeginning || e.params.loop || e.params.rewind ? (e.slidePrev(r, !0, !0),
|
|
2209
|
+
n("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(e.slides.length - 1, r, !0, !0),
|
|
2210
|
+
n("autoplay")) : !e.isEnd || e.params.loop || e.params.rewind ? (e.slideNext(r, !0, !0),
|
|
2211
|
+
n("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(0, r, !0, !0),
|
|
2208
2212
|
n("autoplay")), e.params.cssMode && (g = (new Date).getTime(), requestAnimationFrame((() => {
|
|
2209
2213
|
run();
|
|
2210
2214
|
}))));
|
|
2211
2215
|
};
|
|
2212
2216
|
// eslint-disable-next-line
|
|
2213
|
-
return i > 0 ? (clearTimeout(
|
|
2217
|
+
return i > 0 ? (clearTimeout(o), o = setTimeout((() => {
|
|
2214
2218
|
proceed();
|
|
2215
2219
|
}), i)) : requestAnimationFrame((() => {
|
|
2216
2220
|
proceed();
|
|
@@ -2218,16 +2222,16 @@ function Autoplay({swiper: e, extendParams: t, on: i, emit: n, params: o}) {
|
|
|
2218
2222
|
}, start = () => {
|
|
2219
2223
|
g = (new Date).getTime(), e.autoplay.running = !0, run(), n("autoplayStart");
|
|
2220
2224
|
}, stop = () => {
|
|
2221
|
-
e.autoplay.running = !1, clearTimeout(
|
|
2225
|
+
e.autoplay.running = !1, clearTimeout(o), cancelAnimationFrame(a), n("autoplayStop");
|
|
2222
2226
|
}, pause = (t, i) => {
|
|
2223
2227
|
if (e.destroyed || !e.autoplay.running) return;
|
|
2224
|
-
clearTimeout(
|
|
2228
|
+
clearTimeout(o), t || (p = !0);
|
|
2225
2229
|
const proceed = () => {
|
|
2226
2230
|
n("autoplayPause"), e.params.autoplay.waitForTransition ? e.wrapperEl.addEventListener("transitionend", onTransitionEnd) : resume();
|
|
2227
2231
|
};
|
|
2228
2232
|
if (e.autoplay.paused = !0, i) return void proceed();
|
|
2229
|
-
const
|
|
2230
|
-
s =
|
|
2233
|
+
const r = s || e.params.autoplay.delay;
|
|
2234
|
+
s = r - ((new Date).getTime() - g), e.isEnd && s < 0 && !e.params.loop || (s < 0 && (s = 0),
|
|
2231
2235
|
proceed());
|
|
2232
2236
|
}, resume = () => {
|
|
2233
2237
|
e.isEnd && s < 0 && !e.params.loop || e.destroyed || !e.autoplay.running || (g = (new Date).getTime(),
|
|
@@ -2262,7 +2266,7 @@ function Autoplay({swiper: e, extendParams: t, on: i, emit: n, params: o}) {
|
|
|
2262
2266
|
}), 200)));
|
|
2263
2267
|
})), i("touchEnd", (() => {
|
|
2264
2268
|
if (!e.destroyed && e.autoplay.running && c) {
|
|
2265
|
-
if (clearTimeout(u), clearTimeout(
|
|
2269
|
+
if (clearTimeout(u), clearTimeout(o), e.params.autoplay.disableOnInteraction) return d = !1,
|
|
2266
2270
|
void (c = !1);
|
|
2267
2271
|
d && e.params.cssMode && resume(), d = !1, c = !1;
|
|
2268
2272
|
}
|
|
@@ -2277,35 +2281,35 @@ function Autoplay({swiper: e, extendParams: t, on: i, emit: n, params: o}) {
|
|
|
2277
2281
|
});
|
|
2278
2282
|
}
|
|
2279
2283
|
|
|
2280
|
-
Object.keys(
|
|
2281
|
-
Object.keys(
|
|
2282
|
-
|
|
2284
|
+
Object.keys(I).forEach((e => {
|
|
2285
|
+
Object.keys(I[e]).forEach((t => {
|
|
2286
|
+
L.prototype[t] = I[e][t];
|
|
2283
2287
|
}));
|
|
2284
|
-
})),
|
|
2288
|
+
})), L.use([ function({swiper: e, on: t, emit: i}) {
|
|
2285
2289
|
const n = getWindow();
|
|
2286
|
-
let
|
|
2290
|
+
let r = null, o = null;
|
|
2287
2291
|
const resizeHandler = () => {
|
|
2288
2292
|
e && !e.destroyed && e.initialized && (i("beforeResize"), i("resize"));
|
|
2289
2293
|
}, orientationChangeHandler = () => {
|
|
2290
2294
|
e && !e.destroyed && e.initialized && i("orientationchange");
|
|
2291
2295
|
};
|
|
2292
2296
|
t("init", (() => {
|
|
2293
|
-
e.params.resizeObserver && void 0 !== n.ResizeObserver ? e && !e.destroyed && e.initialized && (
|
|
2294
|
-
|
|
2297
|
+
e.params.resizeObserver && void 0 !== n.ResizeObserver ? e && !e.destroyed && e.initialized && (r = new ResizeObserver((t => {
|
|
2298
|
+
o = n.requestAnimationFrame((() => {
|
|
2295
2299
|
const {width: i, height: n} = e;
|
|
2296
|
-
let
|
|
2300
|
+
let r = i, o = n;
|
|
2297
2301
|
t.forEach((({contentBoxSize: t, contentRect: i, target: n}) => {
|
|
2298
|
-
n && n !== e.el || (
|
|
2299
|
-
})),
|
|
2302
|
+
n && n !== e.el || (r = i ? i.width : (t[0] || t).inlineSize, o = i ? i.height : (t[0] || t).blockSize);
|
|
2303
|
+
})), r === i && o === n || resizeHandler();
|
|
2300
2304
|
}));
|
|
2301
|
-
})),
|
|
2305
|
+
})), r.observe(e.el)) : (n.addEventListener("resize", resizeHandler), n.addEventListener("orientationchange", orientationChangeHandler));
|
|
2302
2306
|
})), t("destroy", (() => {
|
|
2303
|
-
|
|
2304
|
-
|
|
2307
|
+
o && n.cancelAnimationFrame(o), r && r.unobserve && e.el && (r.unobserve(e.el),
|
|
2308
|
+
r = null), n.removeEventListener("resize", resizeHandler), n.removeEventListener("orientationchange", orientationChangeHandler);
|
|
2305
2309
|
}));
|
|
2306
2310
|
}, function({swiper: e, extendParams: t, on: i, emit: n}) {
|
|
2307
|
-
const
|
|
2308
|
-
const a = new (
|
|
2311
|
+
const r = [], o = getWindow(), attach = (t, i = {}) => {
|
|
2312
|
+
const a = new (o.MutationObserver || o.WebkitMutationObserver)((t => {
|
|
2309
2313
|
// The observerUpdate event should only be triggered
|
|
2310
2314
|
// once despite the number of mutations. Additional
|
|
2311
2315
|
// triggers are redundant and are very costly
|
|
@@ -2314,13 +2318,13 @@ Object.keys(E).forEach((e => {
|
|
|
2314
2318
|
const observerUpdate = function() {
|
|
2315
2319
|
n("observerUpdate", t[0]);
|
|
2316
2320
|
};
|
|
2317
|
-
|
|
2321
|
+
o.requestAnimationFrame ? o.requestAnimationFrame(observerUpdate) : o.setTimeout(observerUpdate, 0);
|
|
2318
2322
|
}));
|
|
2319
2323
|
a.observe(t, {
|
|
2320
2324
|
attributes: void 0 === i.attributes || i.attributes,
|
|
2321
2325
|
childList: e.isElement || (void 0 === i.childList || i).childList,
|
|
2322
2326
|
characterData: void 0 === i.characterData || i.characterData
|
|
2323
|
-
}),
|
|
2327
|
+
}), r.push(a);
|
|
2324
2328
|
};
|
|
2325
2329
|
t({
|
|
2326
2330
|
observer: !1,
|
|
@@ -2349,13 +2353,13 @@ Object.keys(E).forEach((e => {
|
|
|
2349
2353
|
});
|
|
2350
2354
|
}
|
|
2351
2355
|
})), i("destroy", (() => {
|
|
2352
|
-
|
|
2356
|
+
r.forEach((e => {
|
|
2353
2357
|
e.disconnect();
|
|
2354
|
-
})),
|
|
2358
|
+
})), r.splice(0, r.length);
|
|
2355
2359
|
}));
|
|
2356
2360
|
} ]);
|
|
2357
2361
|
|
|
2358
|
-
const
|
|
2362
|
+
const j = 1024, z = e(class extends t {
|
|
2359
2363
|
constructor(e) {
|
|
2360
2364
|
super(), !1 !== e && this.__registerHost(), this.change = i(this, "change", 7),
|
|
2361
2365
|
this.tctChange = i(this, "tctChange", 7), this.guid = s(), this.swiper = null,
|
|
@@ -2393,8 +2397,54 @@ const A = 1024, j = e(class extends t {
|
|
|
2393
2397
|
*/
|
|
2394
2398
|
this.label = "tecton.element.carousel.ariaLabel",
|
|
2395
2399
|
/** Display navigation arrow buttons as another way to navigate the carousel. */
|
|
2396
|
-
this.showNavigationArrows = !1,
|
|
2397
|
-
|
|
2400
|
+
this.showNavigationArrows = !1,
|
|
2401
|
+
/**
|
|
2402
|
+
* Rebuilt whenever a prop that feeds Swiper's static config (e.g. `loop`) changes,
|
|
2403
|
+
* since Swiper reads its options only at construction time.
|
|
2404
|
+
*/
|
|
2405
|
+
this.buildCarouselOptions = () => {
|
|
2406
|
+
this.universalCarouselOptions = {
|
|
2407
|
+
centeredSlides: !0,
|
|
2408
|
+
loop: !1 !== this.loop,
|
|
2409
|
+
focusableElements: "q2-btn, q2-dropdown, q2-item, q2-list, a, input, select, textarea, button, video, label, option",
|
|
2410
|
+
autoplay: this.autoPlay,
|
|
2411
|
+
modules: [ Autoplay ],
|
|
2412
|
+
on: {
|
|
2413
|
+
realIndexChange: e => {
|
|
2414
|
+
// When peek mode pads the DOM with duplicates (3- or 4-pane carousels),
|
|
2415
|
+
// `swiper.realIndex` can point at a duplicate; map it back to the 0..paneCount-1
|
|
2416
|
+
// range so `this.index`, pagination dots, and emitted events stay logical.
|
|
2417
|
+
const t = this.paneCount > 0 ? e.realIndex % this.paneCount : e.realIndex;
|
|
2418
|
+
this.index = t + 1, this.updateCarouselPaneProps();
|
|
2419
|
+
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;
|
|
2420
|
+
this.handleAriaLive(r), h(this, [ "change", "tctChange" ], {
|
|
2421
|
+
index: t + 1
|
|
2422
|
+
}), i ? this.paginationBtns[t].focus({
|
|
2423
|
+
preventScroll: !0
|
|
2424
|
+
}) : n && e.slides[e.activeIndex].focus({
|
|
2425
|
+
preventScroll: !0
|
|
2426
|
+
});
|
|
2427
|
+
},
|
|
2428
|
+
afterInit: e => {
|
|
2429
|
+
var t;
|
|
2430
|
+
this.swiper = e, null === (t = this.activePane) || void 0 === t || t.addEventListener("popoverStateChanged", this.handlePopovers);
|
|
2431
|
+
},
|
|
2432
|
+
slideChangeTransitionEnd: () => {
|
|
2433
|
+
var e;
|
|
2434
|
+
null === (e = this.activePane) || void 0 === e || e.addEventListener("popoverStateChanged", this.handlePopovers);
|
|
2435
|
+
},
|
|
2436
|
+
slideChangeTransitionStart: () => {
|
|
2437
|
+
var e;
|
|
2438
|
+
null === (e = this.activePane) || void 0 === e || e.removeEventListener("popoverStateChanged", this.handlePopovers);
|
|
2439
|
+
}
|
|
2440
|
+
}
|
|
2441
|
+
}, this.fullWidthDisplayOptions = {
|
|
2442
|
+
slidesPerView: 1,
|
|
2443
|
+
spaceBetween: 100,
|
|
2444
|
+
...this.universalCarouselOptions
|
|
2445
|
+
};
|
|
2446
|
+
}, this.configureCarousel = (e, t) => {
|
|
2447
|
+
var i, n, r;
|
|
2398
2448
|
// Disconnect observer to prevent infinite loop from Swiper's internal DOM changes (e.g. loop mode)
|
|
2399
2449
|
null === (i = this.mutationObserver) || void 0 === i || i.disconnect(), this.swiper && this.tearDownCarousel(),
|
|
2400
2450
|
this.autoPlayInProgress = this.autoPlay,
|
|
@@ -2403,10 +2453,10 @@ const A = 1024, j = e(class extends t {
|
|
|
2403
2453
|
this.syncPaneDuplicates(), this.updateCarouselPaneProps();
|
|
2404
2454
|
// Save the target index before Swiper init — the realIndexChange callback
|
|
2405
2455
|
// fires during construction and may overwrite this.index
|
|
2406
|
-
const
|
|
2407
|
-
new
|
|
2456
|
+
const o = this.realIndex;
|
|
2457
|
+
new L(e, t), this.slideToPane(o, 0),
|
|
2408
2458
|
// Ensure popover listener is on the active pane after initial positioning
|
|
2409
|
-
null === (
|
|
2459
|
+
null === (n = this.activePane) || void 0 === n || n.addEventListener("popoverStateChanged", this.handlePopovers),
|
|
2410
2460
|
this.autoPlayInProgress && (null === (r = this.swiper) || void 0 === r || r.autoplay.start()),
|
|
2411
2461
|
this.managePaneHeightObserver(),
|
|
2412
2462
|
// Re-observe after Swiper's DOM changes have settled
|
|
@@ -2417,6 +2467,9 @@ const A = 1024, j = e(class extends t {
|
|
|
2417
2467
|
subtree: !0
|
|
2418
2468
|
});
|
|
2419
2469
|
}));
|
|
2470
|
+
}, this.getPaginationLabel = e => {
|
|
2471
|
+
const t = this.paneArray.find((t => t.index === e)), i = (null == t ? void 0 : t.label) || (null == t ? void 0 : t.getAttribute("label")), n = l("tecton.element.carousel.itemDescription", [ "" + (e + 1), this.paneCount.toString() ]);
|
|
2472
|
+
return i ? `${l(i)}, ${n}` : n;
|
|
2420
2473
|
}, this.handleAutoPlayPause = e => {
|
|
2421
2474
|
var t;
|
|
2422
2475
|
if (!this.autoPlay) return;
|
|
@@ -2435,7 +2488,7 @@ const A = 1024, j = e(class extends t {
|
|
|
2435
2488
|
null == t || t.disable()) : (i.style.left = null, i.style.transform = `translate3d(${null == t ? void 0 : t.translate}px, 0, 0)`,
|
|
2436
2489
|
null == t || t.enable());
|
|
2437
2490
|
}, this.keydownHandler = e => {
|
|
2438
|
-
var t, i
|
|
2491
|
+
var t, i;
|
|
2439
2492
|
switch (e.key) {
|
|
2440
2493
|
case "ArrowRight":
|
|
2441
2494
|
e.preventDefault(), null === (t = this.swiper) || void 0 === t || t.slideNext();
|
|
@@ -2446,11 +2499,11 @@ const A = 1024, j = e(class extends t {
|
|
|
2446
2499
|
break;
|
|
2447
2500
|
|
|
2448
2501
|
case "Home":
|
|
2449
|
-
e.preventDefault(),
|
|
2502
|
+
e.preventDefault(), this.slideToPane(0);
|
|
2450
2503
|
break;
|
|
2451
2504
|
|
|
2452
2505
|
case "End":
|
|
2453
|
-
e.preventDefault(),
|
|
2506
|
+
e.preventDefault(), this.slideToPane(this.paneCount - 1);
|
|
2454
2507
|
}
|
|
2455
2508
|
}, this.managePaneHeightObserver = () => {
|
|
2456
2509
|
var e, t, i;
|
|
@@ -2474,6 +2527,16 @@ const A = 1024, j = e(class extends t {
|
|
|
2474
2527
|
}, this.setCarouselWrapperWidth = () => {
|
|
2475
2528
|
this.insufficientPanes || (this.carouselWrapperWidth = this.carouselWrapper.clientWidth);
|
|
2476
2529
|
},
|
|
2530
|
+
/**
|
|
2531
|
+
* Swiper's `slideToLoop` snaps by real (logical) index but only exists when loop mode is on.
|
|
2532
|
+
* For non-looped carousels, `slideTo` targets the same logical index directly since the DOM
|
|
2533
|
+
* has no duplicates.
|
|
2534
|
+
*/
|
|
2535
|
+
this.slideToPane = (e, t) => {
|
|
2536
|
+
if (!this.swiper) return;
|
|
2537
|
+
const i = !1 !== this.loop ? this.swiper.slideToLoop : this.swiper.slideTo;
|
|
2538
|
+
void 0 === t ? i.call(this.swiper, e) : i.call(this.swiper, e, t);
|
|
2539
|
+
},
|
|
2477
2540
|
/**
|
|
2478
2541
|
* Swiper's loop mode needs enough DOM slides on both sides of a centered active slide. For
|
|
2479
2542
|
* two-pane full-width carousels and 3 to 5 pane peek carousels, we double the pane set in the
|
|
@@ -2482,11 +2545,14 @@ const A = 1024, j = e(class extends t {
|
|
|
2482
2545
|
* logical index changes are mapped back to the real-pane range via `modulo paneCount`.
|
|
2483
2546
|
*/
|
|
2484
2547
|
this.syncPaneDuplicates = () => {
|
|
2485
|
-
|
|
2548
|
+
// Duplicates only exist to satisfy Swiper's loop-mode minimum slide count.
|
|
2549
|
+
// Non-looped carousels navigate their real panes directly.
|
|
2486
2550
|
if (Array.from(this.hostElement.querySelectorAll("q2-carousel-pane[data-q2-pane-duplicate]")).forEach((e => e.remove())),
|
|
2487
|
-
!
|
|
2488
|
-
const
|
|
2489
|
-
|
|
2551
|
+
!1 === this.loop) return;
|
|
2552
|
+
const e = this.paneArray, t = e.length;
|
|
2553
|
+
if (!(2 === t || !this.useFullWidthPanes && t >= 3 && t <= 5) || 0 === t) return;
|
|
2554
|
+
const i = e[0].parentElement;
|
|
2555
|
+
for (let n = 0; n < t; n += 1) {
|
|
2490
2556
|
// Build a fresh pane and clone only the user-authored slot content. Cloning the
|
|
2491
2557
|
// hydrated real pane would copy Stencil's rendered `<article class="...main-content">`
|
|
2492
2558
|
// wrapper, so when the duplicate hydrates it re-wraps → nested articles.
|
|
@@ -2494,11 +2560,11 @@ const A = 1024, j = e(class extends t {
|
|
|
2494
2560
|
t.setAttribute("data-q2-pane-duplicate", "true"), t.setAttribute("aria-hidden", "true"),
|
|
2495
2561
|
// Apply the same classes Stencil will add on hydration so Swiper recognizes the
|
|
2496
2562
|
// duplicates as slides during initialization (which happens before Stencil runs).
|
|
2497
|
-
t.classList.add("q2-carousel-pane", "swiper-slide", "q2-carousel-pane-" +
|
|
2498
|
-
const
|
|
2499
|
-
Array.from(
|
|
2563
|
+
t.classList.add("q2-carousel-pane", "swiper-slide", "q2-carousel-pane-" + n);
|
|
2564
|
+
const r = e[n].querySelector(":scope > article.q2-carousel-pane-main-content") || e[n];
|
|
2565
|
+
Array.from(r.children).forEach((e => {
|
|
2500
2566
|
t.appendChild(e.cloneNode(!0));
|
|
2501
|
-
})),
|
|
2567
|
+
})), i.appendChild(t);
|
|
2502
2568
|
}
|
|
2503
2569
|
}, this.syncPaneHeights = () => {
|
|
2504
2570
|
var e, t;
|
|
@@ -2513,11 +2579,11 @@ const A = 1024, j = e(class extends t {
|
|
|
2513
2579
|
// Swiper's loop mode reorders slide DOM nodes, so DOM order no longer matches pane identity.
|
|
2514
2580
|
// When Swiper has tagged a slide, use its data-swiper-slide-index as the authoritative index.
|
|
2515
2581
|
t.forEach(((t, n) => {
|
|
2516
|
-
const
|
|
2582
|
+
const r = t.getAttribute("data-swiper-slide-index"), o = null !== r ? parseInt(r, 10) : n, a = i > 0 ? o % i : o;
|
|
2517
2583
|
t.index = a, t.siblingCount = i, t.isActivePane = a === this.realIndex, t.slotFrameless = e || void 0;
|
|
2518
2584
|
}));
|
|
2519
2585
|
Array.from(this.hostElement.querySelectorAll("q2-carousel-pane[data-q2-pane-duplicate]")).forEach(((t, n) => {
|
|
2520
|
-
const
|
|
2586
|
+
const r = t.getAttribute("data-swiper-slide-index"), o = null !== r ? parseInt(r, 10) : n + i, a = i > 0 ? o % i : o;
|
|
2521
2587
|
t.index = a, t.siblingCount = i, t.isActivePane = !1, t.slotFrameless = e || void 0;
|
|
2522
2588
|
})), this.currentPaneCount = i;
|
|
2523
2589
|
},
|
|
@@ -2554,58 +2620,65 @@ const A = 1024, j = e(class extends t {
|
|
|
2554
2620
|
}, n("strong", null, l("tecton.element.carousel.insufficientPanesMessageHeader"))), n("p", {
|
|
2555
2621
|
class: "insufficient-panes-body"
|
|
2556
2622
|
}, l("tecton.element.carousel.insufficientPanesMessageBody")));
|
|
2557
|
-
}, this.renderNextNavBtn = () =>
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2623
|
+
}, this.renderNextNavBtn = () => {
|
|
2624
|
+
const e = !1 === this.loop && this.realIndex >= this.paneCount - 1;
|
|
2625
|
+
return n("div", {
|
|
2626
|
+
class: "next-btn"
|
|
2627
|
+
}, n("q2-btn", {
|
|
2628
|
+
class: "q2-carousel-navigation-button q2-carousel-navigation-button-next",
|
|
2629
|
+
intent: "workflow-primary",
|
|
2630
|
+
label: l("tecton.element.carousel.nextItemLabel"),
|
|
2631
|
+
hideLabel: !0,
|
|
2632
|
+
disabled: e || void 0,
|
|
2633
|
+
onTctClick: () => {
|
|
2634
|
+
var e;
|
|
2635
|
+
return null === (e = this.swiper) || void 0 === e ? void 0 : e.slideNext();
|
|
2636
|
+
}
|
|
2637
|
+
}, n("q2-icon", {
|
|
2638
|
+
type: "arrow-right"
|
|
2639
|
+
})));
|
|
2640
|
+
}, this.renderPaginationArea = () => {
|
|
2641
|
+
const {useDynamicPaginationDots: e, realIndex: t, paneCount: i} = this, r = [ "q2-carousel-pagination", "autoplay" ];
|
|
2642
|
+
return e && r.push("dynamic"), this.autoPlayInProgress && r.push("autoplay-on"),
|
|
2572
2643
|
n("div", {
|
|
2573
|
-
class:
|
|
2644
|
+
class: r.join(" "),
|
|
2574
2645
|
role: "tablist",
|
|
2575
2646
|
"aria-label": l("tecton.element.carousel.tabWrapperLabel")
|
|
2576
2647
|
}, Array.from({
|
|
2577
2648
|
length: i
|
|
2578
|
-
}, ((e, t) => t)).map((
|
|
2579
|
-
const r =
|
|
2580
|
-
let
|
|
2581
|
-
r && (
|
|
2582
|
-
return Math.abs(
|
|
2649
|
+
}, ((e, t) => t)).map((i => {
|
|
2650
|
+
const r = i === t;
|
|
2651
|
+
let o = [ "q2-carousel-page-indicator", "q2-carousel-page-indicator-" + i ];
|
|
2652
|
+
r && (o = [ ...o, "active-page" ]), e && (o = [ ...o, "dynamic" ]);
|
|
2653
|
+
return Math.abs(i - t) <= 2 && !r && (o = [ ...o, "active-adjacent" ]), n("button", {
|
|
2583
2654
|
type: "button",
|
|
2584
2655
|
role: "tab",
|
|
2585
2656
|
tabIndex: r ? void 0 : -1,
|
|
2586
2657
|
"aria-selected": "" + r,
|
|
2587
|
-
class:
|
|
2588
|
-
onClick: () =>
|
|
2589
|
-
var e;
|
|
2590
|
-
return null === (e = this.swiper) || void 0 === e ? void 0 : e.slideToLoop(o);
|
|
2591
|
-
},
|
|
2658
|
+
class: o.join(" "),
|
|
2659
|
+
onClick: () => this.slideToPane(i),
|
|
2592
2660
|
onKeyDown: this.keydownHandler,
|
|
2593
|
-
"aria-label":
|
|
2661
|
+
"aria-label": this.getPaginationLabel(i)
|
|
2594
2662
|
});
|
|
2595
2663
|
})));
|
|
2596
|
-
}, this.renderPrevNavBtn = () =>
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2664
|
+
}, this.renderPrevNavBtn = () => {
|
|
2665
|
+
const e = !1 === this.loop && this.realIndex <= 0;
|
|
2666
|
+
return n("div", {
|
|
2667
|
+
class: "prev-btn"
|
|
2668
|
+
}, n("q2-btn", {
|
|
2669
|
+
class: "q2-carousel-navigation-button q2-carousel-navigation-button-prev",
|
|
2670
|
+
intent: "workflow-primary",
|
|
2671
|
+
label: l("tecton.element.carousel.previousItemLabel"),
|
|
2672
|
+
hideLabel: !0,
|
|
2673
|
+
disabled: e || void 0,
|
|
2674
|
+
onTctClick: () => {
|
|
2675
|
+
var e;
|
|
2676
|
+
return null === (e = this.swiper) || void 0 === e ? void 0 : e.slidePrev();
|
|
2677
|
+
}
|
|
2678
|
+
}, n("q2-icon", {
|
|
2679
|
+
type: "arrow-left"
|
|
2680
|
+
})));
|
|
2681
|
+
};
|
|
2609
2682
|
}
|
|
2610
2683
|
// #endregion
|
|
2611
2684
|
// #region Component Lifecycle Events
|
|
@@ -2618,46 +2691,7 @@ const A = 1024, j = e(class extends t {
|
|
|
2618
2691
|
componentWillLoad() {
|
|
2619
2692
|
c(this), this.updateCarouselPaneProps(), window.addEventListener("resize", this.setCarouselWrapperWidth),
|
|
2620
2693
|
f(this.hostElement, "q2-carousel-pane") || v(this.hostElement, "q2-carousel-pane"),
|
|
2621
|
-
this.
|
|
2622
|
-
centeredSlides: !0,
|
|
2623
|
-
loop: !0,
|
|
2624
|
-
focusableElements: "q2-btn, q2-dropdown, q2-item, q2-list, a, input, select, textarea, button, video, label, option",
|
|
2625
|
-
autoplay: this.autoPlay,
|
|
2626
|
-
modules: [ Autoplay ],
|
|
2627
|
-
on: {
|
|
2628
|
-
realIndexChange: e => {
|
|
2629
|
-
// When peek mode pads the DOM with duplicates (3- or 4-pane carousels),
|
|
2630
|
-
// `swiper.realIndex` can point at a duplicate; map it back to the 0..paneCount-1
|
|
2631
|
-
// range so `this.index`, pagination dots, and emitted events stay logical.
|
|
2632
|
-
const t = this.paneCount > 0 ? e.realIndex % this.paneCount : e.realIndex;
|
|
2633
|
-
this.index = t + 1, this.updateCarouselPaneProps();
|
|
2634
|
-
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;
|
|
2635
|
-
this.handleAriaLive(o), h(this, [ "change", "tctChange" ], {
|
|
2636
|
-
index: t + 1
|
|
2637
|
-
}), i ? this.paginationBtns[t].focus({
|
|
2638
|
-
preventScroll: !0
|
|
2639
|
-
}) : n && e.slides[e.activeIndex].focus({
|
|
2640
|
-
preventScroll: !0
|
|
2641
|
-
});
|
|
2642
|
-
},
|
|
2643
|
-
afterInit: e => {
|
|
2644
|
-
var t;
|
|
2645
|
-
this.swiper = e, null === (t = this.activePane) || void 0 === t || t.addEventListener("popoverStateChanged", this.handlePopovers);
|
|
2646
|
-
},
|
|
2647
|
-
slideChangeTransitionEnd: () => {
|
|
2648
|
-
var e;
|
|
2649
|
-
null === (e = this.activePane) || void 0 === e || e.addEventListener("popoverStateChanged", this.handlePopovers);
|
|
2650
|
-
},
|
|
2651
|
-
slideChangeTransitionStart: () => {
|
|
2652
|
-
var e;
|
|
2653
|
-
null === (e = this.activePane) || void 0 === e || e.removeEventListener("popoverStateChanged", this.handlePopovers);
|
|
2654
|
-
}
|
|
2655
|
-
}
|
|
2656
|
-
}, this.fullWidthDisplayOptions = {
|
|
2657
|
-
slidesPerView: 1,
|
|
2658
|
-
spaceBetween: 100,
|
|
2659
|
-
...this.universalCarouselOptions
|
|
2660
|
-
};
|
|
2694
|
+
this.buildCarouselOptions();
|
|
2661
2695
|
}
|
|
2662
2696
|
componentDidLoad() {
|
|
2663
2697
|
this.setCarouselWrapperWidth(), this.carouselWrapper && this.paneArray.length && this.configureCarousel(this.carouselWrapper, this.activeCarouselOptions);
|
|
@@ -2670,8 +2704,7 @@ const A = 1024, j = e(class extends t {
|
|
|
2670
2704
|
// #endregion
|
|
2671
2705
|
// #region Listeners
|
|
2672
2706
|
carouselPaneClicked(e) {
|
|
2673
|
-
|
|
2674
|
-
null === (t = this.swiper) || void 0 === t || t.slideToLoop(e.detail.paneIndex);
|
|
2707
|
+
this.slideToPane(e.detail.paneIndex);
|
|
2675
2708
|
}
|
|
2676
2709
|
delegateFocus(e) {
|
|
2677
2710
|
var t, i;
|
|
@@ -2687,11 +2720,11 @@ const A = 1024, j = e(class extends t {
|
|
|
2687
2720
|
* @testOnly
|
|
2688
2721
|
*/
|
|
2689
2722
|
async selectCarouselPane(e) {
|
|
2690
|
-
var t, i
|
|
2723
|
+
var t, i;
|
|
2691
2724
|
if (e > this.paneCount) return;
|
|
2692
|
-
const
|
|
2693
|
-
|
|
2694
|
-
const r = null === (
|
|
2725
|
+
const n = e > 0 ? e - 1 : 0;
|
|
2726
|
+
this.slideToPane(n);
|
|
2727
|
+
const r = null === (t = this.swiper) || void 0 === t ? void 0 : t.slides[null === (i = this.swiper) || void 0 === i ? void 0 : i.activeIndex];
|
|
2695
2728
|
null == r || r.focus({
|
|
2696
2729
|
preventScroll: !0
|
|
2697
2730
|
});
|
|
@@ -2723,7 +2756,7 @@ const A = 1024, j = e(class extends t {
|
|
|
2723
2756
|
this.updateCarouselPaneProps(), this.revampCarousel();
|
|
2724
2757
|
}
|
|
2725
2758
|
revampCarousel() {
|
|
2726
|
-
this.configureCarousel(this.carouselWrapper, this.activeCarouselOptions);
|
|
2759
|
+
this.buildCarouselOptions(), this.syncPaneDuplicates(), this.configureCarousel(this.carouselWrapper, this.activeCarouselOptions);
|
|
2727
2760
|
}
|
|
2728
2761
|
indexChanged(e) {
|
|
2729
2762
|
// this allows the carousel to be swiped programmatically via the index prop
|
|
@@ -2731,7 +2764,7 @@ const A = 1024, j = e(class extends t {
|
|
|
2731
2764
|
// Small looped carousels duplicate the pane set, so `swiper.realIndex` may point
|
|
2732
2765
|
// at a duplicate. Compare against its logical (mod paneCount) equivalent before deciding
|
|
2733
2766
|
// to programmatically slide — otherwise the watcher fights our own realIndexChange mapping.
|
|
2734
|
-
e !== (this.paneCount > 0 ? this.swiper.realIndex % this.paneCount : this.swiper.realIndex) + 1 && this.
|
|
2767
|
+
e !== (this.paneCount > 0 ? this.swiper.realIndex % this.paneCount : this.swiper.realIndex) + 1 && this.slideToPane(this.realIndex);
|
|
2735
2768
|
}
|
|
2736
2769
|
// #endregion
|
|
2737
2770
|
// #region Local Methods
|
|
@@ -2740,8 +2773,8 @@ const A = 1024, j = e(class extends t {
|
|
|
2740
2773
|
}
|
|
2741
2774
|
get activePane() {
|
|
2742
2775
|
var e, i, n;
|
|
2743
|
-
const
|
|
2744
|
-
return
|
|
2776
|
+
const r = null !== (n = null === (e = this.swiper) || void 0 === e ? void 0 : e.slides[null === (i = this.swiper) || void 0 === i ? void 0 : i.activeIndex]) && void 0 !== n ? n : 0;
|
|
2777
|
+
return r instanceof t ? r : null;
|
|
2745
2778
|
}
|
|
2746
2779
|
get insufficientPanes() {
|
|
2747
2780
|
return this.paneCount < 1;
|
|
@@ -2762,7 +2795,7 @@ const A = 1024, j = e(class extends t {
|
|
|
2762
2795
|
spaceBetween: 10,
|
|
2763
2796
|
centerInsufficientSlides: !1,
|
|
2764
2797
|
breakpoints: {
|
|
2765
|
-
[
|
|
2798
|
+
[j]: {
|
|
2766
2799
|
slidesPerView: e
|
|
2767
2800
|
}
|
|
2768
2801
|
},
|
|
@@ -2793,11 +2826,11 @@ const A = 1024, j = e(class extends t {
|
|
|
2793
2826
|
t || (v = [ ...v, "content-peek-display" ]), a && (v = [ ...v, "compact" ]);
|
|
2794
2827
|
const g = [ "q2-carousel-pagination-navigation-wrapper" ];
|
|
2795
2828
|
return s && "bottom" === c && g.push("evenly-space"), s && "hug" === c && g.push("center-space"),
|
|
2796
|
-
n(
|
|
2797
|
-
key: "
|
|
2829
|
+
n(r, {
|
|
2830
|
+
key: "2c623516b2b0ce7800440110cde323bdf065abc1",
|
|
2798
2831
|
id: "q2-carousel-" + this.guid,
|
|
2799
2832
|
class: "q2-carousel-instance"
|
|
2800
|
-
}, d ? this.renderInsufficientPanesDisplay() : n(
|
|
2833
|
+
}, d ? this.renderInsufficientPanesDisplay() : n(o, null, e > 1 && n("div", {
|
|
2801
2834
|
class: g.join(" ")
|
|
2802
2835
|
}, s && [ "bottom", "hug" ].includes(c) && this.renderPrevNavBtn(), n("div", {
|
|
2803
2836
|
class: "q2-carousel-control-center-tray"
|
|
@@ -2849,13 +2882,16 @@ const A = 1024, j = e(class extends t {
|
|
|
2849
2882
|
autoPlay: [ {
|
|
2850
2883
|
revampCarousel: 0
|
|
2851
2884
|
} ],
|
|
2885
|
+
loop: [ {
|
|
2886
|
+
revampCarousel: 0
|
|
2887
|
+
} ],
|
|
2852
2888
|
index: [ {
|
|
2853
2889
|
indexChanged: 0
|
|
2854
2890
|
} ]
|
|
2855
2891
|
};
|
|
2856
2892
|
}
|
|
2857
2893
|
static get style() {
|
|
2858
|
-
return '*{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{
|
|
2894
|
+
return '*{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))}';
|
|
2859
2895
|
}
|
|
2860
2896
|
}, [ 260, "q2-carousel", {
|
|
2861
2897
|
ariaLabel: [ 513, "aria-label" ],
|
|
@@ -2870,6 +2906,7 @@ const A = 1024, j = e(class extends t {
|
|
|
2870
2906
|
hidePagination: [ 516, "hide-pagination" ],
|
|
2871
2907
|
index: [ 1538 ],
|
|
2872
2908
|
label: [ 513 ],
|
|
2909
|
+
loop: [ 516 ],
|
|
2873
2910
|
showNavigationArrows: [ 516, "show-navigation-arrows" ],
|
|
2874
2911
|
ariaLiveValue: [ 32 ],
|
|
2875
2912
|
autoPlayInProgress: [ 32 ],
|
|
@@ -2902,27 +2939,38 @@ const A = 1024, j = e(class extends t {
|
|
|
2902
2939
|
autoPlay: [ {
|
|
2903
2940
|
revampCarousel: 0
|
|
2904
2941
|
} ],
|
|
2942
|
+
loop: [ {
|
|
2943
|
+
revampCarousel: 0
|
|
2944
|
+
} ],
|
|
2905
2945
|
index: [ {
|
|
2906
2946
|
indexChanged: 0
|
|
2907
2947
|
} ]
|
|
2908
2948
|
} ]);
|
|
2909
2949
|
|
|
2910
|
-
const
|
|
2950
|
+
const D = z, defineCustomElement = function() {
|
|
2911
2951
|
if ("undefined" == typeof customElements) return;
|
|
2912
|
-
[ "q2-carousel", "q2-carousel-pane", "q2-icon" ].forEach((e => {
|
|
2952
|
+
[ "q2-carousel", "q2-btn", "q2-carousel-pane", "q2-icon", "q2-loading" ].forEach((e => {
|
|
2913
2953
|
switch (e) {
|
|
2914
2954
|
case "q2-carousel":
|
|
2915
|
-
customElements.get(a(e)) || customElements.define(a(e),
|
|
2955
|
+
customElements.get(a(e)) || customElements.define(a(e), z);
|
|
2916
2956
|
break;
|
|
2917
2957
|
|
|
2918
|
-
case "q2-
|
|
2958
|
+
case "q2-btn":
|
|
2919
2959
|
customElements.get(a(e)) || g();
|
|
2920
2960
|
break;
|
|
2921
2961
|
|
|
2922
|
-
case "q2-
|
|
2962
|
+
case "q2-carousel-pane":
|
|
2923
2963
|
customElements.get(a(e)) || m();
|
|
2964
|
+
break;
|
|
2965
|
+
|
|
2966
|
+
case "q2-icon":
|
|
2967
|
+
customElements.get(a(e)) || w();
|
|
2968
|
+
break;
|
|
2969
|
+
|
|
2970
|
+
case "q2-loading":
|
|
2971
|
+
customElements.get(a(e)) || b();
|
|
2924
2972
|
}
|
|
2925
2973
|
}));
|
|
2926
2974
|
};
|
|
2927
2975
|
|
|
2928
|
-
export {
|
|
2976
|
+
export { D as Q2Carousel, defineCustomElement }
|