├── .browserslistrc ├── src ├── index.js ├── utils │ └── debounce.js ├── Navigation.vue ├── Slide.vue ├── scss │ └── index.scss ├── Pagination.vue └── Carousel.vue ├── .npmignore ├── .gitignore ├── demo ├── main.js ├── index.html ├── ExampleBasic.vue ├── ExampleScrollPerPage.vue ├── ExampleResponsive.vue ├── ExampleAdjust.vue └── App.vue ├── dist ├── index.html └── assets │ ├── index.38e53d8b.css │ ├── index.acaa292a.js │ └── vendor.b77b2fb4.js ├── .eslintrc.js ├── LICENSE.md ├── vite.config.js ├── package.json ├── release.js └── README.md /.browserslistrc: -------------------------------------------------------------------------------- 1 | current node 2 | last 2 versions and > 2% 3 | ie > 10 4 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | export { default as Carousel } from './Carousel.vue'; 2 | export { default as Slide } from './Slide.vue'; 3 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .npmignore 2 | .gitignore 3 | .eslintrc 4 | .eslintrc 5 | .idea 6 | .prettierrc 7 | .npmrc 8 | 9 | src/scss/ 10 | node_modules/ 11 | package-lock.json 12 | yarn.lock 13 | npm-debug.log 14 | yarn-error.log 15 | 16 | .travis.yml 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | lib 4 | 5 | # Log files 6 | npm-debug.log* 7 | yarn-debug.log* 8 | yarn-error.log* 9 | pnpm-debug.log* 10 | 11 | # Editor directories and files 12 | .idea 13 | .vscode 14 | .npmrc 15 | *.suo 16 | *.ntvs* 17 | *.njsproj 18 | *.sln 19 | *.sw? 20 | -------------------------------------------------------------------------------- /demo/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue'; 2 | import App from './App.vue'; 3 | import '../src/scss/index.scss'; 4 | import { Carousel, Slide } from '../src/index.js'; 5 | 6 | const app = createApp(App); 7 | app.component(Carousel.name, Carousel); 8 | app.component(Slide.name, Slide); 9 | 10 | app.mount('#app'); 11 | -------------------------------------------------------------------------------- /demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vue Concise Carousel is SSR and CSR friendly 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vue Concise Carousel is SSR and CSR friendly 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true, 5 | }, 6 | extends: ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/prettier'], 7 | rules: { 8 | 'prettier/prettier': [ 9 | 'error', 10 | { 11 | singleQuote: true, 12 | }, 13 | ], 14 | 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', 15 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', 16 | }, 17 | parserOptions: { 18 | ecmaVersion: 2020, 19 | sourceType: 'module', 20 | }, 21 | } 22 | -------------------------------------------------------------------------------- /src/utils/debounce.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Returns a function, that, as long as it continues to be invoked, will not 3 | * be triggered. The function will be called after it stops being called for 4 | * N milliseconds. If `immediate` is passed, trigger the function on the 5 | * leading edge, instead of the trailing. 6 | */ 7 | const debounce = (func, wait, immediate) => { 8 | let timeout; 9 | return () => { 10 | const context = this; 11 | const later = () => { 12 | timeout = null; 13 | if (!immediate) { 14 | func.apply(context); 15 | } 16 | }; 17 | const callNow = immediate && !timeout; 18 | clearTimeout(timeout); 19 | timeout = setTimeout(later, wait); 20 | if (callNow) { 21 | func.apply(context); 22 | } 23 | }; 24 | }; 25 | 26 | export default debounce; 27 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 - Jambon 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import path from 'path'; 2 | import { defineConfig } from 'vite'; 3 | import vue from '@vitejs/plugin-vue'; 4 | 5 | // https://vitejs.dev/config/ 6 | export default ({ command, mode }) => { 7 | const isProd = command === 'build'; 8 | const isDemo = mode === 'demo'; 9 | const config = { 10 | server: { 11 | port: 8080, 12 | host: '0.0.0.0', 13 | }, 14 | plugins: [vue()], 15 | }; 16 | 17 | if (!isProd || isDemo) { 18 | config.root = `${process.cwd()}/demo`; 19 | config.build = { 20 | outDir: `${process.cwd()}/dist`, 21 | emptyOutDir: true, 22 | }; 23 | } 24 | 25 | if (isProd && !isDemo) { 26 | config.build = { 27 | outDir: 'lib', 28 | rollupOptions: { 29 | external: ['vue'], 30 | output: { 31 | exports: 'named', 32 | globals: { 33 | vue: 'Vue', 34 | }, 35 | }, 36 | }, 37 | lib: { 38 | entry: path.resolve(__dirname, 'src/index.js'), 39 | name: 'VueConciseCarousel', 40 | formats: ['es', 'cjs', 'umd'], 41 | }, 42 | }; 43 | } 44 | 45 | return defineConfig(config); 46 | }; 47 | -------------------------------------------------------------------------------- /src/Navigation.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 58 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@jambonn/vue-concise-carousel", 3 | "version": "2.1.31", 4 | "description": "Vue Concise Carousel is SSR and CSR friendly", 5 | "keywords": [ 6 | "vue", 7 | "vue 3", 8 | "concise", 9 | "carousel", 10 | "slider", 11 | "ssr", 12 | "csr", 13 | "pwa" 14 | ], 15 | "homepage": "https://jambonn.github.io/vue-concise-carousel/", 16 | "bugs": { 17 | "url": "https://github.com/jambonn/vue-concise-carousel/issues" 18 | }, 19 | "license": "MIT", 20 | "author": "Jambon ", 21 | "repository": { 22 | "type": "git", 23 | "url": "git+https://github.com/jambonn/vue-concise-carousel.git" 24 | }, 25 | "scripts": { 26 | "dev": "vite", 27 | "release": "node release.js", 28 | "build:demo": "NODE_ENV=production vite build --mode demo", 29 | "build:lib": "NODE_ENV=production vite build --mode lib && yarn build:scss", 30 | "build:scss": "sass src/scss/index.scss > lib/vue-concise-carousel.css && cleancss -o lib/vue-concise-carousel.min.css lib/vue-concise-carousel.css", 31 | "serve": "vite preview" 32 | }, 33 | "main": "lib/vue-concise-carousel.cjs.js", 34 | "browser": "lib/vue-concise-carousel.es.js", 35 | "module": "src/index.js", 36 | "unpkg": "lib/vue-concise-carousel.umd.js", 37 | "style": "lib/vue-concise-carousel.min.css", 38 | "files": [ 39 | "lib", 40 | "src/utils", 41 | "src/*.js", 42 | "src/*.vue" 43 | ], 44 | "dependencies": {}, 45 | "devDependencies": { 46 | "@vitejs/plugin-vue": "^1.2.3", 47 | "@vue/compiler-sfc": "^3.1.1", 48 | "@vue/eslint-config-prettier": "^6.0.0", 49 | "chalk": "^4.1.1", 50 | "clean-css-cli": "^5.2.2", 51 | "eslint": "^7.23.0", 52 | "eslint-loader": "^4.0.2", 53 | "eslint-plugin-import": "^2.22.1", 54 | "eslint-plugin-prettier": "^3.3.1", 55 | "eslint-plugin-vue": "^7.8.0", 56 | "execa": "^5.1.1", 57 | "prettier": "^2.2.1", 58 | "sass": "^1.32.8", 59 | "semver": "^7.3.5", 60 | "vite": "^2.3.7", 61 | "vue": "^3.1.1" 62 | }, 63 | "peerDependencies": { 64 | "vue": "^3.0.11" 65 | }, 66 | "engines": { 67 | "node": ">=12.x" 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/Slide.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 91 | -------------------------------------------------------------------------------- /src/scss/index.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | .VueCarousel { 4 | display: flex; 5 | flex-direction: column; 6 | position: relative; 7 | &--reverse { 8 | flex-direction: column-reverse; 9 | } 10 | } 11 | .VueCarousel-wrapper { 12 | width: 100%; 13 | position: relative; 14 | overflow: hidden; 15 | } 16 | .VueCarousel-inner { 17 | display: flex; 18 | flex-direction: row; 19 | backface-visibility: hidden; 20 | &--center { 21 | justify-content: center; 22 | } 23 | } 24 | .VueCarousel-slide { 25 | flex-basis: inherit; 26 | flex-grow: 0; 27 | flex-shrink: 0; 28 | user-select: none; 29 | backface-visibility: unset; 30 | -webkit-touch-callout: none; 31 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 32 | outline: none; 33 | } 34 | .VueCarousel-slide-adjustableHeight { 35 | display: table; 36 | flex-basis: auto; 37 | width: 100%; 38 | } 39 | .VueCarousel-pagination { 40 | width: 100%; 41 | text-align: center; 42 | &--top-overlay { 43 | position: absolute; 44 | top: 0; 45 | } 46 | &--bottom-overlay { 47 | position: absolute; 48 | bottom: 0; 49 | } 50 | } 51 | .VueCarousel-dot-container { 52 | display: inline-block; 53 | margin: 0 auto; 54 | padding: 0; 55 | } 56 | .VueCarousel-dot { 57 | display: inline-block; 58 | cursor: pointer; 59 | appearance: none; 60 | border: none; 61 | background-clip: content-box; 62 | box-sizing: content-box; 63 | padding: 0; 64 | border-radius: 100%; 65 | outline: none; 66 | &:focus { 67 | outline: none; 68 | } 69 | } 70 | .VueCarousel-navigation-button { 71 | position: absolute; 72 | top: 50%; 73 | box-sizing: border-box; 74 | color: #000; 75 | text-decoration: none; 76 | appearance: none; 77 | border: none; 78 | background-color: transparent; 79 | padding: 0; 80 | cursor: pointer; 81 | outline: none; 82 | &:focus { 83 | outline: none; 84 | } 85 | } 86 | .VueCarousel-navigation-next { 87 | right: 0; 88 | transform: translateY(-50%) translateX(100%); 89 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, 90 | Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; 91 | } 92 | .VueCarousel-navigation-prev { 93 | left: 0; 94 | transform: translateY(-50%) translateX(-100%); 95 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, 96 | Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; 97 | } 98 | .VueCarousel-navigation--disabled { 99 | opacity: 0.5; 100 | cursor: default; 101 | } 102 | -------------------------------------------------------------------------------- /demo/ExampleBasic.vue: -------------------------------------------------------------------------------- 1 | 36 | 37 | 42 | -------------------------------------------------------------------------------- /dist/assets/index.38e53d8b.css: -------------------------------------------------------------------------------- 1 | body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:16px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#34495e;background-color:#fff;margin:0}.container{width:100%;padding:12px;margin-right:auto;margin-left:auto}@media (min-width:960px){.container{max-width:900px}}@media (min-width:1264px){.container{max-width:1185px}}pre[class*=language-]{background:#2d2d2d;padding:1em;margin:.5em 0;overflow:auto;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;line-height:1.5;tab-size:4;hyphens:none}code{color:#bd4147;white-space:pre;word-break:normal;background:0 0;overflow:visible;padding:0;border:0;display:inline;line-height:inherit;margin:0}code:after,code:before{content:' ';letter-spacing:-1px}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#999}.token.boolean,.token.function,.token.number{color:#f08d49}.token.punctuation{color:#ccc}.token.attr-value,.token.char,.token.regex,.token.string,.token.variable{color:#7ec699}.token.attr-name,.token.deleted,.token.namespace,.token.tag{color:#e2777a}.token.atrule,.token.builtin,.token.important,.token.keyword,.token.selector{color:#cc99cd}a{text-decoration:none}.button{padding:.75em 2em;border-radius:2em;display:inline-block;color:#fff;background-color:#34495e;transition:all .15s ease;box-sizing:border-box;border:1px solid #34495e}.button.white{background-color:#fff;color:#34495e}.action .button:first-child{margin-right:1em}.action .button{margin:1em 0;font-size:1.05em;font-weight:600;letter-spacing:.1em}.VueCarousel{display:flex;flex-direction:column;position:relative}.VueCarousel--reverse{flex-direction:column-reverse}.VueCarousel-wrapper{width:100%;position:relative;overflow:hidden}.VueCarousel-inner{display:flex;flex-direction:row;backface-visibility:hidden}.VueCarousel-inner--center{justify-content:center}.VueCarousel-slide{flex-basis:inherit;flex-grow:0;flex-shrink:0;user-select:none;backface-visibility:unset;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;outline:0}.VueCarousel-slide-adjustableHeight{display:table;flex-basis:auto;width:100%}.VueCarousel-pagination{width:100%;text-align:center}.VueCarousel-pagination--top-overlay{position:absolute;top:0}.VueCarousel-pagination--bottom-overlay{position:absolute;bottom:0}.VueCarousel-dot-container{display:inline-block;margin:0 auto;padding:0}.VueCarousel-dot{display:inline-block;cursor:pointer;appearance:none;border:none;background-clip:content-box;box-sizing:content-box;padding:0;border-radius:100%;outline:0}.VueCarousel-dot:focus{outline:0}.VueCarousel-navigation-button{position:absolute;top:50%;box-sizing:border-box;color:#000;text-decoration:none;appearance:none;border:none;background-color:transparent;padding:0;cursor:pointer;outline:0}.VueCarousel-navigation-button:focus{outline:0}.VueCarousel-navigation-next{right:0;transform:translateY(-50%) translateX(100%);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"}.VueCarousel-navigation-prev{left:0;transform:translateY(-50%) translateX(-100%);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"}.VueCarousel-navigation--disabled{opacity:.5;cursor:default} -------------------------------------------------------------------------------- /demo/ExampleScrollPerPage.vue: -------------------------------------------------------------------------------- 1 | 40 | 41 | 46 | -------------------------------------------------------------------------------- /demo/ExampleResponsive.vue: -------------------------------------------------------------------------------- 1 | 45 | 46 | 51 | -------------------------------------------------------------------------------- /demo/ExampleAdjust.vue: -------------------------------------------------------------------------------- 1 | 45 | 46 | 51 | -------------------------------------------------------------------------------- /release.js: -------------------------------------------------------------------------------- 1 | const args = require('minimist')(process.argv.slice(2)); 2 | const fs = require('fs'); 3 | const path = require('path'); 4 | const chalk = require('chalk'); 5 | const semver = require('semver'); 6 | const execa = require('execa'); 7 | const currentVersion = require('./package.json').version; 8 | const { prompt } = require('enquirer'); 9 | 10 | const preId = 11 | args.preid || 12 | (semver.prerelease(currentVersion) && semver.prerelease(currentVersion)[0]); 13 | const skipBuild = args.skipBuild; 14 | 15 | const versionIncrements = [ 16 | 'patch', 17 | 'minor', 18 | 'major', 19 | ...(preId ? ['prepatch', 'preminor', 'premajor', 'prerelease'] : []), 20 | ]; 21 | 22 | const inc = (i) => semver.inc(currentVersion, i, preId); 23 | const run = (bin, args, opts = {}) => 24 | execa(bin, args, { stdio: 'inherit', ...opts }); 25 | const step = (msg) => console.log(chalk.cyan(msg)); 26 | 27 | const updatePackage = (pkgRoot, version) => { 28 | const pkgPath = path.resolve(pkgRoot, 'package.json'); 29 | const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8')); 30 | pkg.version = version; 31 | fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n'); 32 | }; 33 | 34 | const publishPackage = async (version, tag) => { 35 | const pkgPath = path.resolve(path.resolve(__dirname, ''), 'package.json'); 36 | const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8')); 37 | const pkgName = pkg.name; 38 | 39 | step(`Publishing ${pkgName}...`); 40 | try { 41 | await run('yarn', [ 42 | 'publish', 43 | '--new-version', 44 | version, 45 | ...(tag ? ['--tag', tag] : []), 46 | '--access', 47 | 'public', 48 | ]); 49 | console.log(chalk.green(`Successfully published ${pkgName}@${version}`)); 50 | } catch (e) { 51 | if (e.stderr.match(/previously published/)) { 52 | console.log(chalk.red(`Skipping already published: ${pkgName}`)); 53 | } else { 54 | throw e; 55 | } 56 | } 57 | }; 58 | 59 | const main = async () => { 60 | let targetVersion = args._[0]; 61 | if (!targetVersion) { 62 | // no explicit version, offer suggestions 63 | const { release } = await prompt({ 64 | type: 'select', 65 | name: 'release', 66 | message: 'Select release type', 67 | choices: versionIncrements 68 | .map((i) => `${i} (${inc(i)})`) 69 | .concat(['custom']), 70 | }); 71 | 72 | if (release === 'custom') { 73 | targetVersion = ( 74 | await prompt({ 75 | type: 'input', 76 | name: 'version', 77 | message: 'Input custom version', 78 | initial: currentVersion, 79 | }) 80 | ).version; 81 | } else { 82 | targetVersion = release.match(/\((.*)\)/)[1]; 83 | } 84 | 85 | if (!semver.valid(targetVersion)) { 86 | throw new Error(`invalid target version: ${targetVersion}`); 87 | } 88 | 89 | const { yes } = await prompt({ 90 | type: 'confirm', 91 | name: 'yes', 92 | message: `Releasing v${targetVersion}. Confirm?`, 93 | }); 94 | 95 | if (!yes) { 96 | return; 97 | } 98 | 99 | let releaseTag = args.tag || null; 100 | if (!releaseTag) { 101 | const { tag } = await prompt({ 102 | type: 'select', 103 | name: 'tag', 104 | message: 'Select release type', 105 | choices: ['next', 'latest'].map((i) => `${i}`), 106 | }); 107 | releaseTag = tag; 108 | 109 | const { yes } = await prompt({ 110 | type: 'confirm', 111 | name: 'yes', 112 | message: `Releasing with --tag ${releaseTag}. Confirm?`, 113 | }); 114 | 115 | if (!yes) { 116 | return; 117 | } 118 | } 119 | 120 | // update package versions 121 | step('\nUpdate package.json...'); 122 | updatePackage(path.resolve(__dirname, ''), targetVersion); 123 | 124 | // build package 125 | step('\nBuilding package...'); 126 | if (!skipBuild) { 127 | await run('yarn', ['build:lib']); 128 | await run('yarn', ['build:demo']); 129 | } else { 130 | console.log(`(skipped)`); 131 | } 132 | 133 | const { stdout } = await run('git', ['diff'], { stdio: 'pipe' }); 134 | if (stdout) { 135 | step('\nCommitting changes...'); 136 | await run('git', ['add', '-A']); 137 | await run('git', [ 138 | 'commit', 139 | '-m', 140 | `:tada: :rocket: release: v${targetVersion}`, 141 | ]); 142 | } else { 143 | console.log('No changes to commit.'); 144 | } 145 | 146 | // publish package 147 | step('\nPublishing package...'); 148 | await publishPackage(targetVersion, releaseTag); 149 | 150 | // push to GitHub 151 | step('\nPushing to GitHub...'); 152 | await run('git', ['tag', `v${targetVersion}`]); 153 | await run('git', ['push', 'origin', `refs/tags/v${targetVersion}`]); 154 | await run('git', ['push', 'origin', 'HEAD']); 155 | 156 | console.log(); 157 | } 158 | }; 159 | 160 | main().catch((err) => { 161 | console.error(err); 162 | }); 163 | -------------------------------------------------------------------------------- /src/Pagination.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 186 | -------------------------------------------------------------------------------- /demo/App.vue: -------------------------------------------------------------------------------- 1 | 106 | 124 | 125 | 245 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-concise-carousel 2 | > Vue Concise Carousel is SSR and CSR friendly. 3 | > An upgraded version from [vue-carousel](https://github.com/SSENSE/vue-carousel) 4 | 5 | Vue 3 support is almost here with the vue-concise-carousel 2 rewrite. Check out the [next](https://github.com/jambonn/vue-concise-carousel/tree/next) branch to see the latest progress. 6 | 7 | **[Full examples](https://jambonn.github.io/vue-concise-carousel/#example-full)** 8 | 9 | ## Table of Contents 10 | - [Installation](#installation) 11 | - [Usage](#usage) 12 | - [Configuration](#configuration) 13 | - [Events](#events) 14 | - [Methods](#methods) 15 | - [Slots](#slots) 16 | - [Development](#compiles-and-hot-reloads-for-development) 17 | - [License](#license) 18 | 19 | ## Installation 20 | 21 | ``` bash 22 | npm install @jambonn/vue-concise-carousel@next 23 | ``` 24 | 25 | or if you prefer yarn 26 | 27 | ``` bash 28 | yarn add @jambonn/vue-concise-carousel@next 29 | ``` 30 | 31 | ## Usage 32 | 33 | ### Global 34 | 35 | You may install Vue Concise Carousel globally: 36 | 37 | ``` js 38 | import Vue from 'vue'; 39 | import { Carousel, Slide } from '@jambonn/vue-concise-carousel'; 40 | import '@jambonn/vue-concise-carousel/lib/vue-concise-carousel.css' 41 | 42 | Vue.component('carousel', Carousel); 43 | Vue.component('slide', Slide); 44 | ``` 45 | This will make **<carousel>** and **<slide>** available to all components within your Vue app. 46 | 47 | ### Local 48 | 49 | Include the carousel directly into your component using import: 50 | 51 | ``` js 52 | import { Carousel, Slide } from '@jambonn/vue-concise-carousel'; 53 | import '@jambonn/vue-concise-carousel/lib/vue-concise-carousel.css' 54 | 55 | export default { 56 | ... 57 | components: { 58 | Carousel, 59 | Slide 60 | } 61 | ... 62 | }; 63 | ``` 64 | 65 | ## Configuration 66 | | Property | Type | Default | Description | 67 | |:----------------------------|:--------------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| 68 | | adjustableHeight | Boolean | false | Adjust the height of the carousel for the current slide. 69 | | adjustableHeightEasing | String | | Slide transition easing for adjustableHeight. Any valid CSS transition easing accepted. 70 | | autoplay | Boolean | false | Flag to enable autoplay. | 71 | | autoplayDirection | String | forward | Sets the autoplay direction for the carousel during autoplay. By default it is forward but can also be set to backward. If an incorrect string is supplied it will default to forward. | 72 | | autoplayHoverPause | Boolean | true | Flag to pause autoplay on hover. | 73 | | autoplayTimeout | Number | 2000 | Time elapsed before advancing slide in autoplay. | 74 | | centerMode | Boolean | false | Center images when the size is less than the container width. | 75 | | easing | String | ease | Slide transition easing. Any valid CSS transition easing accepted. | 76 | | loop | Boolean | false | Flag to make the carousel loop around when it reaches the end. | 77 | | minSwipeDistance | Number | 8 | Minimum distance for the swipe to trigger a slide advance. | 78 | | mouseDrag | Boolean | true | Flag to toggle mouse dragging. | 79 | | navigateTo | Number, Array | 0 | Listen for an external navigation request using this prop. When the supplied prop is of type Number the slide with the matching index is animated into view, however you can disable this animation by supplying an Array consisting of exactly two element: the new slide index and a boolean indication whether the change should be animated or not (eg. [3, false] would mean "go to the slide with index 3 without animation"). | 80 | | navigationClickTargetSize | Number | 8 | Amount of padding to apply around the label in pixels. | 81 | | navigationEnabled | Boolean | false | Flag to render the navigation component (next/prev buttons). | 82 | | navigationNextLabel | String | ▶ | Text content of the navigation next button. | 83 | | navigationPrevLabel | String | ◀ | Text content of the navigation prev button. | 84 | | paginationActiveColor | String | #000000 | The fill color of the active pagination dot. Any valid CSS color is accepted. | 85 | | paginationColor | String | #efefef | The fill color of pagination dots. Any valid CSS color is accepted. | 86 | | paginationPosition | String | bottom | The position of pagination dots. Possible values are `bottom`, `bottom-overlay`, `top` and `top-overlay`. The overlay values place the pagination component over the images. | 87 | | paginationEnabled | Boolean | true | Flag to render pagination component. | 88 | | paginationPadding | Number | 10 | The padding inside each pagination dot. Pixel values are accepted. | 89 | | paginationSize | Number | 10 | The size of each pagination dot. Pixel values are accepted. | 90 | | perPage | Number | 2 | Maximum number of slides displayed on each page. | 91 | | perPageCustom | Array | | Configure the number of visible slides with a particular browser width. This will be an array of arrays, ex. [[320, 2], [1199, 4]]. Formatted as [x, y] where x=browser width, and y=number of slides displayed. Ex. [1199, 4] means if (window >= 1199) then show 4 slides per page. | 92 | | resistanceCoef | Number | 20 | Resistance coefficient to dragging on the edge of the carousel. This dictates the effect of the pull as you move towards the boundaries. | 93 | | scrollPerPage | Boolean | true | Scroll per page, not per item. | 94 | | spacePadding | Number | 0 | Stage padding option adds left and right padding style (in pixels) onto VueCarousel-inner. | 95 | | spacePaddingMaxOffsetFactor | Number | 0 | Specify by how much should the space padding value be multiplied of, to re-arange the final slide padding. | 96 | | speed | Number | 500 | Slide transition speed. Number of milliseconds accepted. | 97 | | tagName | String | slide | Name (tag) of slide component. Overwrite with coponent name when extending slide component. | 98 | | touchDrag | Boolean | true | Flag to toggle touch dragging. | 99 | | value | Number | | Support for v-model functionality. Setting this value will change the current page to the number inputted (if between 0 and pageCount). | 100 | | maxPaginationDotCount | Number | -1 | Support Max pagination dot amount | 101 | | rtl | Boolean | false | Support right to left | 102 | | keyboard | Boolean | false | Navigate slide using keyboard | 103 | | resizeObserver | Boolean | false | Use ResizeObserver | 104 | 105 | 106 | ## Events 107 | | Event | Type | Emitter | Description | 108 | |:------------------------------|:-------|:---------|:-------------------------------------------------------------------------------------------------------------------------------------------------| 109 | | `navigation-click` | | Carousel | Emits when the a navigation button is clicked, with the current direction (`backward` or `forward`) | 110 | | `pagination-click` | | Carousel | Emits when a pagination button is clicked, with the current `pageNumber` | 111 | | `page-change` | Number | Carousel | Emits with the current page number. | 112 | | `slide-click` | Object | Slide | Emits with the *dataset* object of the selected element ·· 113 | | `transition-start` | | Carousel | Emits when the transition end is reached | 114 | | `transition-end` | | Carousel | Emits when the transition start is reached · | 115 | | `mounted` | | Carousel | Emits when carousel ready · | 116 | 117 | Lowercase versions of the above events are also emitted, namely—`pagechange`, `slideclick`, `transitionstart` and `transitionend`. 118 | 119 | ### HTML Structure 120 | 121 | Once the **Carousel** and **Slide** components are installed globally or imported, they can be used in templates in the following manner: 122 | 123 | ``` vue 124 | 125 | 126 | Slide 1 Content 127 | 128 | 129 | Slide 2 Content 130 | 131 | 132 | ``` 133 | 134 | To listen for the 'slide-click' event you can do the following: 135 | 136 | ``` vue 137 | 138 | 142 | Slide 1 Content 143 | 144 | ... 145 | 146 | ``` 147 | 148 | ``` js 149 | handleSlideClick (dataset) => { 150 | console.log(dataset.index, dataset.name) 151 | } 152 | ``` 153 | 154 | ## Methods 155 | 156 | ### Calling Methods 157 | 158 | ```html 159 | 170 | 179 | ``` 180 | ### All Methods 181 | 182 | | Method name | Description | Returns | Parameters | Default | 183 | |------------------| -------------------------------------------------------------------- | ------- | ---------------------------------------- | ------- | 184 | | handleNavigation | go to the next or previous slide | - | direction: forward or backward | - | 185 | | goToPage | go to slide index | - | slide:Number - slide number | null | 186 | | restartAutoplay | restarts the autoplay | - | | | 187 | | pauseAutoplay | pauses the autoplay | - | | | 188 | 189 | ## Slots 190 | 191 | ### Customizing Navigation & Pagination 192 | 193 | ```html 194 | 212 | 234 | ``` 235 | 236 | ### All Slots 237 | 238 | | Name | Description | Method | 239 | |------------| ------------------------------------- | -------------------------------------------- | 240 | | pagination | Custom pagination | goToPage(currentSlide: Number) | 241 | | | | | 242 | | navigation | Custom navigation | handleNavigation(direction: String) | 243 | | | | | 244 | 245 | ### Compiles and hot-reloads for development 246 | ``` bash 247 | yarn install 248 | yarn dev 249 | ``` 250 | then navigate to `http://localhost:8080` 251 | 252 | ### Compiles and minifies for production 253 | ``` 254 | yarn build 255 | ``` 256 | 257 | ### Lints and fixes files 258 | ``` 259 | yarn lint 260 | ``` 261 | 262 | ## License 263 | This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details. 264 | -------------------------------------------------------------------------------- /dist/assets/index.acaa292a.js: -------------------------------------------------------------------------------- 1 | import{r as a,o as n,c as t,a as s,w as e,F as o,b as l,d as p,e as i,f as u,g as c,h as r,v as g,i as d,p as v,j as k,n as m,k as f,l as b,m as h,q as y,s as C,t as P,u as x}from"./vendor.b77b2fb4.js";const w={name:"ExampleBasic"},S={class:"content"},T=s("h3",{style:{"border-bottom":"1px solid #eaecef","padding-bottom":"0.3em"}}," 1. Basic ",-1),E=s("p",null,"No options configured, 10 slides added to the carousel.",-1),M={class:"example-basic",style:{"margin-bottom":"50px"}},L={class:"preview"},N=s("img",{style:{width:"100%"},src:"https://via.placeholder.com/1080.png/09f/fff"},null,-1),j=p('
<template>\n  <div>\n    <carousel>\n      <slide>1</slide>\n      <slide>2</slide>\n      <slide>3</slide>\n      <slide>4</slide>\n    </carousel>\n  </div>\n</template>\n
',1);w.render=function(p,i,u,c,r,g){const d=a("slide"),v=a("carousel");return n(),t("div",S,[T,E,s("div",M,[s("div",L,[s(v,null,{default:e((()=>[(n(),t(o,null,l(10,(a=>s(d,{key:a},{default:e((()=>[N])),_:2},1024))),64))])),_:1})]),j])])};const $={name:"ExampleResponsive"},A={class:"content"},B=s("h3",{style:{"border-bottom":"1px solid #eaecef","padding-bottom":"0.3em"}}," 2. Responsive ",-1),D=s("p",null," Configured breakpoints: 2 slides on mobile (<= 480px), 3 slides on tablet (<= 768). ",-1),z={class:"example-responsive",style:{"margin-bottom":"50px"}},H={class:"preview"},V=s("img",{style:{width:"100%"},src:"https://via.placeholder.com/1080.png/09f/fff"},null,-1),q=p('

Template

<template>\n  <div>\n    <carousel :per-page-custom="[[480, 2], [768, 3]]">\n      <slide>1</slide>\n      <slide>2</slide>\n      <slide>3</slide>\n      <slide>4</slide>\n    </carousel>\n  </div>\n</template>\n
',1);$.render=function(p,i,u,c,r,g){const d=a("slide"),v=a("carousel");return n(),t("div",A,[B,D,s("div",z,[s("div",H,[s(v,{"per-page-custom":[[480,2],[768,3]]},{default:e((()=>[(n(),t(o,null,l(10,(a=>s(d,{key:a},{default:e((()=>[V])),_:2},1024))),64))])),_:1})]),q])])};const O={name:"ExampleScrollPerPage"},_={class:"content"},F=s("h3",{style:{"border-bottom":"1px solid #eaecef","padding-bottom":"0.3em"}}," 3. Scroll per page false ",-1),R=s("p",null," Instead of scrolling per page, the carousel will scroll on a per item basis or perPageCustom with each movement. ",-1),X={class:"example-scroll-per-page",style:{"margin-bottom":"50px"}},I={class:"preview"},W=s("img",{style:{width:"100%"},src:"https://via.placeholder.com/1080.png/09f/fff"},null,-1),Y=p('

Template

<template>\n  <div>\n    <carousel :scroll-per-page="false">\n      <slide>1</slide>\n      <slide>2</slide>\n      <slide>3</slide>\n      <slide>4</slide>\n    </carousel>\n  </div>\n</template>\n
',1);O.render=function(p,i,u,c,r,g){const d=a("slide"),v=a("carousel");return n(),t("div",_,[F,R,s("div",X,[s("div",I,[s(v,{"scroll-per-page":!1},{default:e((()=>[(n(),t(o,null,l(10,(a=>s(d,{key:a},{default:e((()=>[W])),_:2},1024))),64))])),_:1})]),Y])])};const G={name:"ExampleBasic"},K={class:"content"},Q=s("h3",{style:{"border-bottom":"1px solid #eaecef","padding-bottom":"0.3em"}}," 4. Adjust ",-1),U=s("p",null," Sometimes we need to show not the first slide. And do not want to reduce the score of page speed. ",-1),J={class:"example-basic",style:{"margin-bottom":"50px"}},Z={class:"preview"},aa=s("img",{src:"https://via.placeholder.com/1211x300.png/09f/fff"},null,-1),na=s("img",{src:"https://via.placeholder.com/1210x300.png/09f/fff"},null,-1),ta=s("img",{src:"https://via.placeholder.com/1211x300.png/09f/fff"},null,-1),sa=s("img",{src:"https://via.placeholder.com/1212x300.png/09f/fff"},null,-1),ea=p('
<template>\n  <div>\n    <carousel>\n      <slide :adjust="true>1</slide>\n      <slide>2</slide>\n      <slide>3</slide>\n      <slide>4</slide>\n    </carousel>\n  </div>\n</template>\n
',1);G.render=function(o,l,p,i,u,c){const r=a("slide"),g=a("carousel");return n(),t("div",K,[Q,U,s("div",J,[s("div",Z,[s(g,{"per-page":1,"navigate-to":1,navigationEnabled:!0},{default:e((()=>[s(r,{adjust:!0},{default:e((()=>[aa])),_:1}),s(r,null,{default:e((()=>[na])),_:1}),s(r,null,{default:e((()=>[ta])),_:1}),s(r,null,{default:e((()=>[sa])),_:1})])),_:1})]),ea])])};const oa={name:"App",components:{ExampleBasic:w,ExampleResponsive:$,ExampleScrollPerPage:O,ExampleAdjust:G},setup:()=>({slideCount:6})},la={id:"hero",style:{"margin-top":"50px","margin-bottom":"50px"}},pa=s("h1",{style:{"text-align":"center"}}," Vue Concise Carousel is SSR and CSR friendly. ",-1),ia=s("p",{class:"action",style:{"text-align":"center"}},[s("a",{class:"button",href:"#install"},"GET STARTED"),s("a",{class:"button white",href:"https://github.com/jambonn/vue-concise-carousel#readme"}," GITHUB ")],-1),ua={id:"example"},ca=s("img",{style:{width:"100%"},src:"https://via.placeholder.com/1080.png/09f/fff"},null,-1),ra=p('

Installation

yarn/npm

# npm\nnpm i @jambonn/vue-concise-carousel\n# yarn\nyarn add @jambonn/vue-concise-carousel

Quick Start

See Configuration to learn advanced usage.

<template>\n  <div>\n    <carousel :center-mode="true" :navigation-enabled="false">\n      <slide>1</slide>\n      <slide>2</slide>\n      <slide>3</slide>\n      <slide>4</slide>\n    </carousel>\n  </div>\n</template>\n\n<script>\n  import { Carousel, Slide } from '@jambonn/vue-concise-carousel'\n  import '@jambonn/vue-concise-carousel/dist/vue-concise-carousel.css'\n\n  export default {\n    name: 'ConciseCarouselComponent',\n    components: { Carousel, Slide },\n  }\n</script>
',2),ga={id:"example-full",class:"container"},da=s("h2",{style:{"border-bottom":"1px solid #eaecef","padding-bottom":"0.3em"}}," Examples ",-1),va=s("div",{id:"license",class:"container"},[s("h2",{style:{"border-bottom":"1px solid #eaecef","padding-bottom":"0.3em"}}," License "),s("p",null,[i(" This software is licensed under the "),s("a",{href:"https://github.com/jambonn/vue-concise-carousel/blob/next/LICENSE.md"}," MIT "),i(" . ")])],-1);oa.render=function(p,i,u,c,r,g){const d=a("slide"),v=a("carousel"),k=a("example-basic"),m=a("example-responsive"),f=a("example-scroll-per-page"),b=a("example-adjust");return n(),t("div",la,[pa,ia,s("div",ua,[s(v,{"per-page-custom":[[480,1],[768,4]],"center-mode":!0,"navigation-enabled":!1},{default:e((()=>[(n(!0),t(o,null,l(c.slideCount,(a=>(n(),t(d,{key:a},{default:e((()=>[ca])),_:2},1024)))),128))])),_:1})]),ra,s("div",ga,[da,s(k),s(m),s(f),s(b)]),va])};const ka={name:"Navigation",emits:["navigation-click"],props:{clickTargetSize:{type:Number,default:8},nextLabel:{type:String,default:"▶"},prevLabel:{type:String,default:"◀"},canAdvanceForward:{type:Boolean,default:!1},canAdvanceBackward:{type:Boolean,default:!1}}},ma={class:"VueCarousel-navigation"};ka.render=function(a,e,o,l,p,i){return n(),t("div",ma,[s("button",{type:"button","aria-label":"Previous page",tabindex:o.canAdvanceBackward?0:-1,class:["VueCarousel-navigation-button VueCarousel-navigation-prev",{"VueCarousel-navigation--disabled":!o.canAdvanceBackward}],style:`padding: ${o.clickTargetSize}px; margin-right: -${o.clickTargetSize}px;`,onClick:e[1]||(e[1]=u((n=>a.$emit("navigation-click","backward")),["prevent"])),innerHTML:o.prevLabel},null,14,["tabindex","innerHTML"]),s("button",{type:"button","aria-label":"Next page",tabindex:o.canAdvanceForward?0:-1,onClick:e[2]||(e[2]=u((n=>a.$emit("navigation-click","forward")),["prevent"])),class:["VueCarousel-navigation-button VueCarousel-navigation-next",{"VueCarousel-navigation--disabled":!o.canAdvanceForward}],style:`padding: ${o.clickTargetSize}px; margin-left: -${o.clickTargetSize}px;`,innerHTML:o.nextLabel},null,14,["tabindex","innerHTML"])])};const fa={name:"Pagination",emits:["pagination-click"],props:{paginationPosition:{type:String,default:"bottom"},scrollPerPage:{type:Boolean,default:!0},maxPaginationDotCount:{type:Number,default:-1},paginationPadding:{type:Number,default:10},paginationSize:{type:Number,default:10},paginationActiveColor:{type:String,default:"#000000"},paginationColor:{type:String,default:"#efefef"},speed:{type:Number,default:500},pageCount:{type:Number,default:0},slideCount:{type:Number,default:0},currentPage:{type:Number,default:0}},setup(a,n){const t=c((()=>{const n=a.paginationPosition;return n.indexOf("overlay")<0?"":n})),s=c((()=>a.paginationPosition.indexOf("top")>=0?"bottom":"top")),e=c((()=>a.scrollPerPage?a.pageCount:a.slideCount||0)),o=c((()=>{if(-1===a.maxPaginationDotCount)return{"margin-top":2*a.paginationPadding+"px"};const n=2*a.paginationPadding,t=a.maxPaginationDotCount*(a.paginationSize+n);return{"margin-top":2*a.paginationPadding+"px",overflow:"hidden",width:`${t}px`,margin:"0 auto","white-space":"nowrap"}})),l=n=>n===a.currentPage;return{paginationPositionModifierName:t,paginationCount:e,dotContainerStyle:o,goToPage:a=>{n.emit("pagination-click",a)},isCurrentDot:l,dotStyle:n=>{const t={};if(t[`margin-${s.value}`]=2*a.paginationPadding+"px",Object.assign(t,{padding:`${a.paginationPadding}px`,width:`${a.paginationSize}px`,height:`${a.paginationSize}px`,"background-color":`${l(n)?a.paginationActiveColor:a.paginationColor}`}),-1===a.maxPaginationDotCount)return t;const e=a.paginationSize+2*a.paginationPadding,o=a.pageCount-a.maxPaginationDotCount,p=0-e*(a.currentPage>o?o:a.currentPage<=a.maxPaginationDotCount/2?0:a.currentPage-Math.ceil(a.maxPaginationDotCount/2)+1);return Object.assign(t,{"-webkit-transform":`translate3d(${p}px,0,0)`,transform:`translate3d(${p}px,0,0)`,"-webkit-transition":`-webkit-transform ${a.speed/1e3}s`,transition:`transform ${a.speed/1e3}s`})}}}};fa.render=function(a,e,p,i,c,d){return r((n(),t("div",{class:["VueCarousel-pagination",{[`VueCarousel-pagination--${i.paginationPositionModifierName}`]:i.paginationPositionModifierName}]},[s("div",{class:"VueCarousel-dot-container",role:"tablist",style:i.dotContainerStyle},[(n(!0),t(o,null,l(i.paginationCount,((a,s)=>(n(),t("button",{key:`${a}_${s}`,"aria-hidden":"false",role:"tab","aria-selected":i.isCurrentDot(s)?"true":"false",class:["VueCarousel-dot",{"VueCarousel-dot--active":i.isCurrentDot(s)}],onClick:u((a=>i.goToPage(s)),["prevent"]),style:i.dotStyle(s)},null,14,["aria-selected","onClick"])))),128))],4)],2)),[[g,p.pageCount>1]])};const ba={onwebkittransitionstart:"webkitTransitionStart",onmoztransitionstart:"transitionstart",onotransitionstart:"oTransitionStart otransitionstart",ontransitionstart:"transitionstart"},ha={onwebkittransitionend:"webkitTransitionEnd",onmoztransitionend:"transitionend",onotransitionend:"oTransitionEnd otransitionend",ontransitionend:"transitionend"},ya={name:"Carousel",components:{Navigation:ka,Pagination:fa},emits:["mounted","input","page-change","pagination","navigation-click","pagination-click","transition-start","transition-end"],props:{adjustableHeight:{type:Boolean,default:!1},adjustableHeightEasing:{type:String},centerMode:{type:Boolean,default:!1},easing:{type:String,validator:function(a){return-1!==["ease","linear","ease-in","ease-out","ease-in-out"].indexOf(a)||a.includes("cubic-bezier")},default:"ease"},loop:{type:Boolean,default:!1},minSwipeDistance:{type:Number,default:8},mouseDrag:{type:Boolean,default:!0},touchDrag:{type:Boolean,default:!0},navigateTo:{type:[Number,Array],default:0},navigationClickTargetSize:{type:Number,default:8},navigationEnabled:{type:Boolean,default:!1},navigationNextLabel:{type:String,default:"▶"},navigationPrevLabel:{type:String,default:"◀"},paginationActiveColor:{type:String,default:"#000000"},paginationColor:{type:String,default:"#efefef"},paginationEnabled:{type:Boolean,default:!0},paginationPadding:{type:Number,default:10},paginationPosition:{type:String,default:"bottom"},paginationSize:{type:Number,default:10},perPage:{type:Number,default:2},perPageCustom:{type:Array},resistanceCoef:{type:Number,default:20},scrollPerPage:{type:Boolean,default:!0},spacePadding:{type:Number,default:0},spacePaddingMaxOffsetFactor:{type:Number,default:0},speed:{type:Number,default:500},tagName:{type:String,default:"slide"},value:{type:Number},maxPaginationDotCount:{type:Number,default:-1},rtl:{type:Boolean,default:!1},autoplay:{type:Boolean,default:!1},autoplayTimeout:{type:Number,default:2e3},autoplayHoverPause:{type:Boolean,default:!0},autoplayDirection:{type:String,default:"forward"},keyboard:{type:Boolean,default:!1},resizeObserver:{type:Boolean,default:!1}},setup(a,n){const t=d(null),s=d(0),e=d(0),o=d(!1),l=d(0),p=d(0),i=d(0),u=d(0),r="undefined"!=typeof window&&"ontouchstart"in window,g=d(0),y=d(16),C=d(0),P=d("transitionstart"),x=d("transitionend"),w=d("auto"),S=d(null),T=d(null),E=d(null),M=d([]),L=d(!1),N=d(!0),j=d(null),$=d(null),A=d(null),B=d(null),D=c((()=>{if(!a.perPageCustom)return a.perPage;const n=a.perPageCustom,s=t.value,e=n.sort(((a,n)=>a[0]>n[0]?-1:1)).filter((a=>s>=a[0]));return e[0]&&e[0][1]||a.perPage})),z=c((()=>a.loop||g.valuea.loop||e.value>0)),V=c((()=>a.perPageCustom&&"undefined"!=typeof window?D.value:a.perPage)),q=c((()=>X.value?0:a.rtl?g.value-p.value:-1*(g.value+p.value))),O=c((()=>Math.max(F.value*(C.value-V.value)-a.spacePadding*a.spacePaddingMaxOffsetFactor,0))),_=c((()=>Y(a.scrollPerPage,C.value,V.value))),F=c((()=>(s.value-2*a.spacePadding)/V.value)),R=c((()=>C.value>V.value)),X=c((()=>a.centerMode&&!R.value)),I=c((()=>{const n=a.speed/1e3+"s",t=`${n} ${a.easing} transform`;return a.adjustableHeight?`${t}, height ${n} ${a.adjustableHeightEasing||a.easing}`:t})),W=c((()=>{const n=a.spacePadding;return n>0&&n})),Y=(a,n,t)=>a?Math.ceil(n/t):n-t+1,G=()=>{E.value&&(clearInterval(E.value),E.value=null)},K=()=>{a.autoplay&&(E.value=setInterval(U,a.autoplayTimeout))},Q=()=>{G(),K()},U=()=>{J(a.autoplayDirection)},J=n=>{n&&"backward"===n&&H.value?ta(e.value>0?e.value-1:a.loop?_.value-1:e.value,"navigation"):(!n||n&&"backward"!==n)&&z.value&&ta(e.value<_.value-1?+e.value+1:a.loop?0:e.value,"navigation")},Z=()=>(t.value=window.innerWidth,t.value),aa=()=>{if(!a.adjustableHeight)return"auto";const n=V.value*(+e.value+1)-1,t=[...Array(V.value)].map(((a,t)=>na(n+t))).reduce(((a,n)=>Math.max(a,n&&n.clientHeight||0)),0);return w.value=0===t?"auto":`${t}px`,w.value},na=a=>M.value[a],ta=(t,s="")=>{const p=Y(a.scrollPerPage,C.value||a.value,V.value);if(t>=0&&t<=p){if(va.value&&!L.value){if(N.value&&t===a.navigateTo)return e.value=a.navigateTo,void(N.value=!1);o.value=!0,ka(),setTimeout((()=>{o.value=!1}),y.value)}g.value=a.scrollPerPage?Math.min(F.value*V.value*t,O.value):F.value*t,a.autoplay&&!a.autoplayHoverPause&&Q(),e.value=t,l.value=0,"pagination"===s&&(G(),n.emit("pagination-click",t))}},sa=a=>{2!==a.button&&(document.addEventListener(r?"touchend":"mouseup",ea,!0),document.addEventListener(r?"touchmove":"mousemove",oa,!0),T.value=a.timeStamp,o.value=!0,u.value=r?a.touches[0].clientX:a.clientX,i.value=r?a.touches[0].clientY:a.clientY)},ea=n=>{a.autoplay&&!a.autoplayHoverPause&&Q(),G();const t=r?n.changedTouches[0].clientX:n.clientX,s=u.value-t;if(l.value=s/(n.timeStamp-T.value),0!==a.minSwipeDistance&&Math.abs(s)>=a.minSwipeDistance){const n=a.scrollPerPage?F.value*V.value:F.value;p.value=p.value+Math.sign(s)*(n/2)}a.rtl?g.value-=p.value:g.value+=p.value,p.value=0,o.value=!1,pa(),document.removeEventListener(r?"touchend":"mouseup",ea,!0),document.removeEventListener(r?"touchmove":"mousemove",oa,!0)},oa=n=>{if(va.value&&!L.value&&e.value>0)return void ka();const t=r?n.touches[0].clientX:n.clientX,s=r?n.touches[0].clientY:n.clientY,o=u.value-t,l=i.value-s;if(r&&Math.abs(o)0?p.value=Math.sqrt(a.resistanceCoef*p.value):g.value===O.value&&p.value<0&&(p.value=-Math.sqrt(-a.resistanceCoef*p.value)):c<0?p.value=-Math.sqrt(-a.resistanceCoef*p.value):c>O.value&&(p.value=Math.sqrt(a.resistanceCoef*p.value))},la=()=>{ia(),ua(),o.value=!0,pa(),setTimeout((()=>{o.value=!1}),y.value)},pa=()=>{a.rtl?g.value-=Math.max(1-V.value,Math.min(Math.round(l.value),V.value-1))*F.value:g.value+=Math.max(1-V.value,Math.min(Math.round(l.value),V.value-1))*F.value;const n=a.scrollPerPage?F.value*V.value:F.value,t=n*Math.floor(C.value/(V.value-1)),s=t+F.value*(C.value%V.value);g.value>(t+s)/2?g.value=s:g.value=n*Math.round(g.value/n),g.value=Math.max(0,Math.min(g.value,O.value)),e.value=a.scrollPerPage?Math.round(g.value/F.value/V.value):Math.round(g.value/F.value)},ia=()=>{(()=>{if($.value){const a=$.value.querySelectorAll(".VueCarousel-slide:not(.VueCarousel-slide-adjust)");M.value=a,C.value=a.length}})(),Z(),(()=>{if($.value){const a=$.value.getElementsByClassName("VueCarousel-inner");for(let n=0;n0&&(s.value=t)}}s.value})(),ca()},ua=()=>{aa()},ca=()=>{if(!z.value&&a.scrollPerPage){const a=_.value-1;e.value=a>=0?a:0,g.value=Math.max(0,Math.min(g.value,O.value))}},ra=()=>{n.emit("transition-start")},ga=()=>{n.emit("transition-end")},da=({keyCode:a})=>{const n=37===a,t=39===a;H.value&&n&&J("backward"),z.value&&t&&J("forward")},va=c((()=>!!$.value&&null!==$.value.querySelector(".VueCarousel-slide-adjust"))),ka=()=>{if(va.value&&!L.value){e.value>0&&(g.value=a.scrollPerPage?Math.min(F.value*V.value*e.value,O.value):F.value*e.value);const n=$.value.querySelector(".VueCarousel-slide-adjust");n&&n.parentElement.removeChild(n),L.value=!0}};return v("carousel",{isTouch:r,dragStartX:u,minSwipeDistance:a.minSwipeDistance,adjustableHeight:a.adjustableHeight}),k((async()=>{await m(),K(),a.autoplayHoverPause&&($.value.addEventListener("mouseenter",G),$.value.addEventListener("mouseleave",K)),a.keyboard&&window.addEventListener("keydown",da),window.addEventListener("resize",((a,n,t)=>{let s;return()=>{const e=void 0,o=t&&!s;clearTimeout(s),s=setTimeout((()=>{s=null,t||a.apply(e)}),n),o&&a.apply(e)}})(la,y.value)),(r&&a.touchDrag||a.mouseDrag)&&A.value.addEventListener(r?"touchstart":"mousedown",sa,{passive:!0}),(()=>{const n=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(n){let t={attributes:!0,data:!0};if(a.adjustableHeight){const a={childList:!0,subtree:!0,characterData:!0};t=Object.assign({},t,a)}if(S.value=new n((()=>{m((()=>{ia(),ua()}))})),$.value){const a=$.value.getElementsByClassName("VueCarousel-inner");for(let n=0;nla())),j.value.observe($.value)),ia(),ua(),P.value=(()=>{for(let a in ba)if(a in window)return ba[a]})(),B.value.addEventListener(P.value,ra),x.value=(()=>{for(let a in ha)if(a in window)return ha[a]})(),B.value.addEventListener(x.value,ga),n.emit("mounted"),"backward"===a.autoplayDirection&&(o.value=!0,setTimeout((()=>{o.value=!1}),y.value),m((()=>{ta(_.value)})))})),f((()=>{m((()=>{ia()}))})),b((()=>{S.value&&S.value.disconnect(),j.value&&j.value.disconnect(),a.autoplayHoverPause&&($.value.removeEventListener("mouseenter",G),$.value.removeEventListener("mouseleave",K)),a.keyboard&&window.removeEventListener("keydown",da),window.removeEventListener("resize",Z),B.value.removeEventListener(P.value,ra),B.value.removeEventListener(x.value,ga),A.value.removeEventListener(r?"touchstart":"mousedown",sa,!0)})),h((()=>a.value),(a=>{a!==e.value&&(ta(a),pa())})),h((()=>a.navigateTo),(a=>{"object"==typeof a?(!1===a[1]&&(o.value=!0,setTimeout((()=>{o.value=!1}),y.value)),m((()=>{ta(a[0])}))):m((()=>{ta(a)}))}),{immediate:!0}),h((()=>a.autoplay),(a=>{a?Q():G()})),h(e,(t=>{$.value&&(n.emit("page-change",t),n.emit("input",t),e.value!==a.navigateTo&&ka())})),{vueConciseCarousel:$,vueCarouselWrapper:A,vueCarouselInner:B,isCenterModeEnabled:X,offset:g,maxOffset:O,currentOffset:q,dragging:o,transitionStyle:I,slideWidth:F,currentHeight:w,padding:W,isNavigationRequired:R,pageCount:_,slideCount:C,currentPerPage:V,currentPage:e,canAdvanceForward:z,canAdvanceBackward:H,restartAutoplay:Q,pauseAutoplay:G,computeCarouselHeight:ua,getCarouselHeight:aa,handleNavigation:a=>{J(a),G(),n.emit("navigation-click",a)},goToPage:ta}}},Ca={class:"VueCarousel-wrapper",ref:"vueCarouselWrapper"};ya.render=function(e,o,l,p,i,u){const c=a("Navigation"),r=a("Pagination");return n(),t("div",{ref:"vueConciseCarousel",class:["VueCarousel",{"VueCarousel--reverse":"top"===l.paginationPosition}]},[s("div",Ca,[s("div",{ref:"vueCarouselInner",class:["VueCarousel-inner",{"VueCarousel-inner--center":p.isCenterModeEnabled}],style:{transform:`translate(${p.currentOffset}px, 0)`,transition:p.dragging?"none":p.transitionStyle,"ms-flex-preferred-size":`${p.slideWidth}px`,"webkit-flex-basis":`${p.slideWidth}px`,"flex-basis":`${p.slideWidth}px`,visibility:p.slideWidth?"visible":"hidden",height:`${p.currentHeight}`,"padding-left":`${p.padding}px`,"padding-right":`${p.padding}px`}},[y(e.$slots,"default")],6)],512),l.navigationEnabled&&p.isNavigationRequired?y(e.$slots,"navigation",{key:0},(()=>[s(c,{clickTargetSize:l.navigationClickTargetSize,nextLabel:l.navigationNextLabel,prevLabel:l.navigationPrevLabel,canAdvanceForward:p.canAdvanceForward,canAdvanceBackward:p.canAdvanceBackward,onNavigationClick:p.handleNavigation},null,8,["clickTargetSize","nextLabel","prevLabel","canAdvanceForward","canAdvanceBackward","onNavigationClick"])])):C("",!0),l.paginationEnabled?y(e.$slots,"pagination",{key:1},(()=>[s(r,{paginationPosition:l.paginationPosition,scrollPerPage:l.scrollPerPage,maxPaginationDotCount:l.maxPaginationDotCount,paginationPadding:l.paginationPadding,paginationSize:l.paginationSize,paginationActiveColor:l.paginationActiveColor,paginationColor:l.paginationColor,speed:l.speed,pageCount:p.pageCount,slideCount:p.slideCount,currentPage:p.currentPage,onPaginationClick:o[1]||(o[1]=a=>p.goToPage(a,"pagination"))},null,8,["paginationPosition","scrollPerPage","maxPaginationDotCount","paginationPadding","paginationSize","paginationActiveColor","paginationColor","speed","pageCount","slideCount","currentPage"])])):C("",!0)],2)};const Pa={name:"Slide",emits:["slide-click"],props:{adjust:{type:Boolean,default:!1}},setup(a,n){const t=P("carousel"),s=d(null),e=c((()=>t.adjustableHeight)),o=a=>{const s=t.isTouch&&a.changedTouches&&a.changedTouches.length>0?a.changedTouches[0].clientX:a.clientX,e=t.dragStartX.value-s;(0===t.minSwipeDistance||Math.abs(e){m((()=>{s.value.addEventListener("dragstart",(a=>a.preventDefault())),s.value.addEventListener(t.isTouch?"touchend":"mouseup",o,!0)}))})),b((()=>{s.value.removeEventListener("dragstart",(a=>a.preventDefault())),s.value.removeEventListener(t.isTouch?"touchend":"mouseup",o,!0)})),{vueCarouselSlide:s,isAdjustableHeight:e}}};Pa.render=function(a,s,e,o,l,p){return n(),t("div",{ref:"vueCarouselSlide",tabindex:"-1",role:"tabpanel",class:["VueCarousel-slide",{"VueCarousel-slide-adjustableHeight":o.isAdjustableHeight,"VueCarousel-slide-adjust":e.adjust}]},[y(a.$slots,"default")],2)};const xa=x(oa);xa.component(ya.name,ya),xa.component(Pa.name,Pa),xa.mount("#app"); 2 | -------------------------------------------------------------------------------- /src/Carousel.vue: -------------------------------------------------------------------------------- 1 | 61 | 62 | 1205 | -------------------------------------------------------------------------------- /dist/assets/vendor.b77b2fb4.js: -------------------------------------------------------------------------------- 1 | function e(e,t){const n=Object.create(null),o=e.split(",");for(let r=0;r!!n[e.toLowerCase()]:e=>!!n[e]}const t=e("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt"),n=e("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function o(e){if(y(e)){const t={};for(let n=0;n{if(e){const n=e.split(s);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function i(e){let t="";if(w(e))t=e;else if(y(e))for(let n=0;n{},f=()=>!1,p=/^on[^a-z]/,d=e=>p.test(e),h=e=>e.startsWith("onUpdate:"),v=Object.assign,m=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},g=Object.prototype.hasOwnProperty,_=(e,t)=>g.call(e,t),y=Array.isArray,b=e=>"[object Map]"===O(e),x=e=>"function"==typeof e,w=e=>"string"==typeof e,C=e=>"symbol"==typeof e,S=e=>null!==e&&"object"==typeof e,k=e=>S(e)&&x(e.then)&&x(e.catch),E=Object.prototype.toString,O=e=>E.call(e),F=e=>w(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,R=e(",key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),P=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},A=/-(\w)/g,M=P((e=>e.replace(A,((e,t)=>t?t.toUpperCase():"")))),T=/\B([A-Z])/g,j=P((e=>e.replace(T,"-$1").toLowerCase())),I=P((e=>e.charAt(0).toUpperCase()+e.slice(1))),N=P((e=>e?`on${I(e)}`:"")),U=(e,t)=>e!==t&&(e==e||t==t),V=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},L=e=>{const t=parseFloat(e);return isNaN(t)?e:t},B=new WeakMap,D=[];let W;const z=Symbol(""),K=Symbol("");function H(e,t=c){(function(e){return e&&!0===e._isEffect})(e)&&(e=e.raw);const n=function(e,t){const n=function(){if(!n.active)return e();if(!D.includes(n)){J(n);try{return Z.push(X),X=!0,D.push(n),W=n,e()}finally{D.pop(),Y(),W=D[D.length-1]}}};return n.id=G++,n.allowRecurse=!!t.allowRecurse,n._isEffect=!0,n.active=!0,n.raw=e,n.deps=[],n.options=t,n}(e,t);return t.lazy||n(),n}function q(e){e.active&&(J(e),e.options.onStop&&e.options.onStop(),e.active=!1)}let G=0;function J(e){const{deps:t}=e;if(t.length){for(let n=0;n{e&&e.forEach((e=>{(e!==W||e.allowRecurse)&&i.add(e)}))};if("clear"===t)l.forEach(c);else if("length"===n&&y(e))l.forEach(((e,t)=>{("length"===t||t>=o)&&c(e)}));else switch(void 0!==n&&c(l.get(n)),t){case"add":y(e)?F(n)&&c(l.get("length")):(c(l.get(z)),b(e)&&c(l.get(K)));break;case"delete":y(e)||(c(l.get(z)),b(e)&&c(l.get(K)));break;case"set":b(e)&&c(l.get(z))}i.forEach((e=>{e.options.scheduler?e.options.scheduler(e):e()}))}const ne=e("__proto__,__v_isRef,__isVue"),oe=new Set(Object.getOwnPropertyNames(Symbol).map((e=>Symbol[e])).filter(C)),re=ue(),se=ue(!1,!0),le=ue(!0),ie=ue(!0,!0),ce={};function ue(e=!1,t=!1){return function(n,o,r){if("__v_isReactive"===o)return!e;if("__v_isReadonly"===o)return e;if("__v_raw"===o&&r===(e?t?$e:Ve:t?Ue:Ne).get(n))return n;const s=y(n);if(!e&&s&&_(ce,o))return Reflect.get(ce,o,r);const l=Reflect.get(n,o,r);if(C(o)?oe.has(o):ne(o))return l;if(e||ee(n,0,o),t)return l;if(Je(l)){return!s||!F(o)?l.value:l}return S(l)?e?De(l):Be(l):l}}["includes","indexOf","lastIndexOf"].forEach((e=>{const t=Array.prototype[e];ce[e]=function(...e){const n=qe(this);for(let t=0,r=this.length;t{const t=Array.prototype[e];ce[e]=function(...e){Q();const n=t.apply(this,e);return Y(),n}}));function ae(e=!1){return function(t,n,o,r){let s=t[n];if(!e&&(o=qe(o),s=qe(s),!y(t)&&Je(s)&&!Je(o)))return s.value=o,!0;const l=y(t)&&F(n)?Number(n)!0,deleteProperty:(e,t)=>!0},de=v({},fe,{get:se,set:ae(!0)});v({},pe,{get:ie});const he=e=>S(e)?Be(e):e,ve=e=>S(e)?De(e):e,me=e=>e,ge=e=>Reflect.getPrototypeOf(e);function _e(e,t,n=!1,o=!1){const r=qe(e=e.__v_raw),s=qe(t);t!==s&&!n&&ee(r,0,t),!n&&ee(r,0,s);const{has:l}=ge(r),i=o?me:n?ve:he;return l.call(r,t)?i(e.get(t)):l.call(r,s)?i(e.get(s)):void(e!==r&&e.get(t))}function ye(e,t=!1){const n=this.__v_raw,o=qe(n),r=qe(e);return e!==r&&!t&&ee(o,0,e),!t&&ee(o,0,r),e===r?n.has(e):n.has(e)||n.has(r)}function be(e,t=!1){return e=e.__v_raw,!t&&ee(qe(e),0,z),Reflect.get(e,"size",e)}function xe(e){e=qe(e);const t=qe(this);return ge(t).has.call(t,e)||(t.add(e),te(t,"add",e,e)),this}function we(e,t){t=qe(t);const n=qe(this),{has:o,get:r}=ge(n);let s=o.call(n,e);s||(e=qe(e),s=o.call(n,e));const l=r.call(n,e);return n.set(e,t),s?U(t,l)&&te(n,"set",e,t):te(n,"add",e,t),this}function Ce(e){const t=qe(this),{has:n,get:o}=ge(t);let r=n.call(t,e);r||(e=qe(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&te(t,"delete",e,void 0),s}function Se(){const e=qe(this),t=0!==e.size,n=e.clear();return t&&te(e,"clear",void 0,void 0),n}function ke(e,t){return function(n,o){const r=this,s=r.__v_raw,l=qe(s),i=t?me:e?ve:he;return!e&&ee(l,0,z),s.forEach(((e,t)=>n.call(o,i(e),i(t),r)))}}function Ee(e,t,n){return function(...o){const r=this.__v_raw,s=qe(r),l=b(s),i="entries"===e||e===Symbol.iterator&&l,c="keys"===e&&l,u=r[e](...o),a=n?me:t?ve:he;return!t&&ee(s,0,c?K:z),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:i?[a(e[0]),a(e[1])]:a(e),done:t}},[Symbol.iterator](){return this}}}}function Oe(e){return function(...t){return"delete"!==e&&this}}const Fe={get(e){return _e(this,e)},get size(){return be(this)},has:ye,add:xe,set:we,delete:Ce,clear:Se,forEach:ke(!1,!1)},Re={get(e){return _e(this,e,!1,!0)},get size(){return be(this)},has:ye,add:xe,set:we,delete:Ce,clear:Se,forEach:ke(!1,!0)},Pe={get(e){return _e(this,e,!0)},get size(){return be(this,!0)},has(e){return ye.call(this,e,!0)},add:Oe("add"),set:Oe("set"),delete:Oe("delete"),clear:Oe("clear"),forEach:ke(!0,!1)},Ae={get(e){return _e(this,e,!0,!0)},get size(){return be(this,!0)},has(e){return ye.call(this,e,!0)},add:Oe("add"),set:Oe("set"),delete:Oe("delete"),clear:Oe("clear"),forEach:ke(!0,!0)};function Me(e,t){const n=t?e?Ae:Re:e?Pe:Fe;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(_(n,o)&&o in t?n:t,o,r)}["keys","values","entries",Symbol.iterator].forEach((e=>{Fe[e]=Ee(e,!1,!1),Pe[e]=Ee(e,!0,!1),Re[e]=Ee(e,!1,!0),Ae[e]=Ee(e,!0,!0)}));const Te={get:Me(!1,!1)},je={get:Me(!1,!0)},Ie={get:Me(!0,!1)},Ne=new WeakMap,Ue=new WeakMap,Ve=new WeakMap,$e=new WeakMap;function Le(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>O(e).slice(8,-1))(e))}function Be(e){return e&&e.__v_isReadonly?e:We(e,!1,fe,Te,Ne)}function De(e){return We(e,!0,pe,Ie,Ve)}function We(e,t,n,o,r){if(!S(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const l=Le(e);if(0===l)return e;const i=new Proxy(e,2===l?o:n);return r.set(e,i),i}function ze(e){return Ke(e)?ze(e.__v_raw):!(!e||!e.__v_isReactive)}function Ke(e){return!(!e||!e.__v_isReadonly)}function He(e){return ze(e)||Ke(e)}function qe(e){return e&&qe(e.__v_raw)||e}const Ge=e=>S(e)?Be(e):e;function Je(e){return Boolean(e&&!0===e.__v_isRef)}function Xe(e){return function(e,t=!1){if(Je(e))return e;return new Ze(e,t)}(e)}class Ze{constructor(e,t=!1){this._rawValue=e,this._shallow=t,this.__v_isRef=!0,this._value=t?e:Ge(e)}get value(){return ee(qe(this),0,"value"),this._value}set value(e){U(qe(e),this._rawValue)&&(this._rawValue=e,this._value=this._shallow?e:Ge(e),te(qe(this),"set","value",e))}}const Qe={get:(e,t,n)=>{return Je(o=Reflect.get(e,t,n))?o.value:o;var o},set:(e,t,n,o)=>{const r=e[t];return Je(r)&&!Je(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function Ye(e){return ze(e)?e:new Proxy(e,Qe)}class et{constructor(e,t){this._object=e,this._key=t,this.__v_isRef=!0}get value(){return this._object[this._key]}set value(e){this._object[this._key]=e}}class tt{constructor(e,t,n){this._setter=t,this._dirty=!0,this.__v_isRef=!0,this.effect=H(e,{lazy:!0,scheduler:()=>{this._dirty||(this._dirty=!0,te(qe(this),"set","value"))}}),this.__v_isReadonly=n}get value(){const e=qe(this);return e._dirty&&(e._value=this.effect(),e._dirty=!1),ee(e,0,"value"),e._value}set value(e){this._setter(e)}}function nt(e,t,n,o){let r;try{r=o?e(...o):e()}catch(s){rt(s,t,n)}return r}function ot(e,t,n,o){if(x(e)){const r=nt(e,t,n,o);return r&&k(r)&&r.catch((e=>{rt(e,t,n)})),r}const r=[];for(let s=0;s>>1;St(it[e])-1?it.splice(t,0,e):it.push(e),bt()}}function bt(){st||lt||(lt=!0,mt=vt.then(kt))}function xt(e,t,n,o){y(e)?n.push(...e):t&&t.includes(e,e.allowRecurse?o+1:o)||n.push(e),bt()}function wt(e,t=null){if(ut.length){for(gt=t,at=[...new Set(ut)],ut.length=0,ft=0;ftSt(e)-St(t))),ht=0;htnull==e.id?1/0:e.id;function kt(e){lt=!1,st=!0,wt(e),it.sort(((e,t)=>St(e)-St(t)));try{for(ct=0;cte.trim())):t&&(r=n.map(L))}let i,u=o[i=N(t)]||o[i=N(M(t))];!u&&s&&(u=o[i=N(j(t))]),u&&ot(u,e,6,r);const a=o[i+"Once"];if(a){if(e.emitted){if(e.emitted[i])return}else(e.emitted={})[i]=!0;ot(a,e,6,r)}}function Ot(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let l={},i=!1;if(!x(e)){const o=e=>{const n=Ot(e,t,!0);n&&(i=!0,v(l,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||i?(y(s)?s.forEach((e=>l[e]=null)):v(l,s),o.set(e,l),l):(o.set(e,null),null)}function Ft(e,t){return!(!e||!d(t))&&(t=t.slice(2).replace(/Once$/,""),_(e,t[0].toLowerCase()+t.slice(1))||_(e,j(t))||_(e,t))}let Rt=null,Pt=null;function At(e){const t=Rt;return Rt=e,Pt=e&&e.type.__scopeId||null,t}function Mt(e,t=Rt,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&no(-1);const r=At(t),s=e(...n);return At(r),o._d&&no(1),s};return o._n=!0,o._c=!0,o._d=!0,o}function Tt(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[l],slots:i,attrs:c,emit:u,render:a,renderCache:f,data:p,setupState:d,ctx:v,inheritAttrs:m}=e;let g;const _=At(e);try{let e;if(4&n.shapeFlag){const t=r||o;g=vo(a.call(t,t,f,s,d,p,v)),e=c}else{const n=t;0,g=vo(n.length>1?n(s,{attrs:c,slots:i,emit:u}):n(s,null)),e=t.props?c:jt(c)}let _=g;if(e&&!1!==m){const t=Object.keys(e),{shapeFlag:n}=_;t.length&&(1&n||6&n)&&(l&&t.some(h)&&(e=It(e,l)),_=ao(_,e))}0,n.dirs&&(_.dirs=_.dirs?_.dirs.concat(n.dirs):n.dirs),n.transition&&(_.transition=n.transition),g=_}catch(y){Qn.length=0,rt(y,e,1),g=uo(Xn)}return At(_),g}const jt=e=>{let t;for(const n in e)("class"===n||"style"===n||d(n))&&((t||(t={}))[n]=e[n]);return t},It=(e,t)=>{const n={};for(const o in e)h(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function Nt(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;r1)return n&&x(t)?t():t}}const $t={};function Lt(e,t,n){return Bt(e,t,n)}function Bt(e,t,{immediate:n,deep:o,flush:r,onTrack:s,onTrigger:l}=c,i=Oo){let u,f,p=!1,d=!1;if(Je(e)?(u=()=>e.value,p=!!e._shallow):ze(e)?(u=()=>e,o=!0):y(e)?(d=!0,p=e.some(ze),u=()=>e.map((e=>Je(e)?e.value:ze(e)?zt(e):x(e)?nt(e,i,2):void 0))):u=x(e)?t?()=>nt(e,i,2):()=>{if(!i||!i.isUnmounted)return f&&f(),ot(e,i,3,[h])}:a,t&&o){const e=u;u=()=>zt(e())}let h=e=>{f=b.options.onStop=()=>{nt(e,i,4)}},v=d?[]:$t;const g=()=>{if(b.active)if(t){const e=b();(o||p||(d?e.some(((e,t)=>U(e,v[t]))):U(e,v)))&&(f&&f(),ot(t,i,3,[e,v===$t?void 0:v,h]),v=e)}else b()};let _;g.allowRecurse=!!t,_="sync"===r?g:"post"===r?()=>Ln(g,i&&i.suspense):()=>{!i||i.isMounted?function(e){xt(e,at,ut,ft)}(g):g()};const b=H(u,{lazy:!0,onTrack:s,onTrigger:l,scheduler:_});return To(b,i),t?n?g():v=b():"post"===r?Ln(b,i&&i.suspense):b(),()=>{q(b),i&&m(i.effects,b)}}function Dt(e,t,n){const o=this.proxy,r=w(e)?e.includes(".")?Wt(o,e):()=>o[e]:e.bind(o,o);let s;return x(t)?s=t:(s=t.handler,n=t),Bt(r,s.bind(o),n,this)}function Wt(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e{zt(e,t)}));else if((e=>"[object Object]"===O(e))(e))for(const n in e)zt(e[n],t);return e}const Kt=e=>!!e.type.__asyncLoader,Ht=e=>e.type.__isKeepAlive;function qt(e,t){Jt(e,"a",t)}function Gt(e,t){Jt(e,"da",t)}function Jt(e,t,n=Oo){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}e()});if(Zt(t,o,n),n){let e=n.parent;for(;e&&e.parent;)Ht(e.parent.vnode)&&Xt(o,t,n,e),e=e.parent}}function Xt(e,t,n,o){const r=Zt(t,e,o,!0);rn((()=>{m(o[t],r)}),n)}function Zt(e,t,n=Oo,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;Q(),Fo(n);const r=ot(t,n,e,o);return Fo(null),Y(),r});return o?r.unshift(s):r.push(s),s}}const Qt=e=>(t,n=Oo)=>(!Po||"sp"===e)&&Zt(e,t,n),Yt=Qt("bm"),en=Qt("m"),tn=Qt("bu"),nn=Qt("u"),on=Qt("bum"),rn=Qt("um"),sn=Qt("sp"),ln=Qt("rtg"),cn=Qt("rtc");function un(e,t=Oo){Zt("ec",e,t)}let an=!0;function fn(e){const t=hn(e),n=e.proxy,o=e.ctx;an=!1,t.beforeCreate&&pn(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:l,watch:i,provide:u,inject:f,created:p,beforeMount:d,mounted:h,beforeUpdate:v,updated:m,activated:g,deactivated:_,beforeDestroy:b,beforeUnmount:w,destroyed:C,unmounted:k,render:E,renderTracked:O,renderTriggered:F,errorCaptured:R,serverPrefetch:P,expose:A,inheritAttrs:M,components:T,directives:j,filters:I}=t;if(f&&function(e,t,n=a){y(e)&&(e=_n(e));for(const o in e){const n=e[o];S(n)?t[o]="default"in n?Vt(n.from||o,n.default,!0):Vt(n.from||o):t[o]=Vt(n)}}(f,o,null),l)for(const c in l){const e=l[c];x(e)&&(o[c]=e.bind(n))}if(r){const t=r.call(n,n);S(t)&&(e.data=Be(t))}if(an=!0,s)for(const c in s){const e=s[c],t=Io({get:x(e)?e.bind(n,n):x(e.get)?e.get.bind(n,n):a,set:!x(e)&&x(e.set)?e.set.bind(n):a});Object.defineProperty(o,c,{enumerable:!0,configurable:!0,get:()=>t.value,set:e=>t.value=e})}if(i)for(const c in i)dn(i[c],o,n,c);if(u){const e=x(u)?u.call(n):u;Reflect.ownKeys(e).forEach((t=>{Ut(t,e[t])}))}function N(e,t){y(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(p&&pn(p,e,"c"),N(Yt,d),N(en,h),N(tn,v),N(nn,m),N(qt,g),N(Gt,_),N(un,R),N(cn,O),N(ln,F),N(on,w),N(rn,k),N(sn,P),y(A))if(A.length){const t=e.exposed||(e.exposed=Ye({}));A.forEach((e=>{t[e]=function(e,t){return Je(e[t])?e[t]:new et(e,t)}(n,e)}))}else e.exposed||(e.exposed=c);E&&e.render===a&&(e.render=E),null!=M&&(e.inheritAttrs=M),T&&(e.components=T),j&&(e.directives=j)}function pn(e,t,n){ot(y(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function dn(e,t,n,o){const r=o.includes(".")?Wt(n,o):()=>n[o];if(w(e)){const n=t[e];x(n)&&Lt(r,n)}else if(x(e))Lt(r,e.bind(n));else if(S(e))if(y(e))e.forEach((e=>dn(e,t,n,o)));else{const o=x(e.handler)?e.handler.bind(n):t[e.handler];x(o)&&Lt(r,o,e)}}function hn(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:l}}=e.appContext,i=s.get(t);let c;return i?c=i:r.length||n||o?(c={},r.length&&r.forEach((e=>vn(c,e,l,!0))),vn(c,t,l)):c=t,s.set(t,c),c}function vn(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&vn(e,s,n,!0),r&&r.forEach((t=>vn(e,t,n,!0)));for(const l in t)if(o&&"expose"===l);else{const o=mn[l]||n&&n[l];e[l]=o?o(e[l],t[l]):t[l]}return e}const mn={data:gn,props:bn,emits:bn,methods:bn,computed:bn,beforeCreate:yn,created:yn,beforeMount:yn,mounted:yn,beforeUpdate:yn,updated:yn,beforeDestroy:yn,destroyed:yn,activated:yn,deactivated:yn,errorCaptured:yn,serverPrefetch:yn,components:bn,directives:bn,watch:bn,provide:gn,inject:function(e,t){return bn(_n(e),_n(t))}};function gn(e,t){return t?e?function(){return v(x(e)?e.call(this,this):e,x(t)?t.call(this,this):t)}:t:e}function _n(e){if(y(e)){const t={};for(let n=0;n{a=!0;const[n,o]=Sn(e,t,!0);v(l,n),o&&i.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!s&&!a)return o.set(e,u),u;if(y(s))for(let u=0;u-1,n[1]=o<0||t-1||_(n,"default"))&&i.push(e)}}}const f=[l,i];return o.set(e,f),f}function kn(e){return"$"!==e[0]}function En(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function On(e,t){return En(e)===En(t)}function Fn(e,t){return y(t)?t.findIndex((t=>On(t,e))):x(t)&&On(t,e)?0:-1}const Rn=e=>"_"===e[0]||"$stable"===e,Pn=e=>y(e)?e.map(vo):[vo(e)],An=(e,t,n)=>{const o=Mt((e=>Pn(t(e))),n);return o._c=!1,o},Mn=(e,t,n)=>{const o=e._ctx;for(const r in e){if(Rn(r))continue;const n=e[r];if(x(n))t[r]=An(0,n,o);else if(null!=n){const e=Pn(n);t[r]=()=>e}}},Tn=(e,t)=>{const n=Pn(t);e.slots.default=()=>n};function jn(e,t){if(null===Rt)return e;const n=Rt.proxy,o=e.dirs||(e.dirs=[]);for(let r=0;r(s.has(e)||(e&&x(e.install)?(s.add(e),e.install(i,...t)):x(e)&&(s.add(e),e(i,...t))),i),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),i),component:(e,t)=>t?(r.components[e]=t,i):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,i):r.directives[e],mount(s,c,u){if(!l){const a=uo(n,o);return a.appContext=r,c&&t?t(a,s):e(a,s,u),l=!0,i._container=s,s.__vue_app__=i,a.component.proxy}},unmount(){l&&(e(null,i._container),delete i._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,i)};return i}}const $n={scheduler:yt,allowRecurse:!0},Ln=function(e,t){t&&t.pendingBranch?y(e)?t.effects.push(...e):t.effects.push(e):xt(e,dt,pt,ht)},Bn=(e,t,n,o,r=!1)=>{if(y(e))return void e.forEach(((e,s)=>Bn(e,t&&(y(t)?t[s]:t),n,o,r)));if(Kt(o)&&!r)return;const s=4&o.shapeFlag?o.component.exposed||o.component.proxy:o.el,l=r?null:s,{i:i,r:u}=e,a=t&&t.r,f=i.refs===c?i.refs={}:i.refs,p=i.setupState;if(null!=a&&a!==u&&(w(a)?(f[a]=null,_(p,a)&&(p[a]=null)):Je(a)&&(a.value=null)),w(u)){const e=()=>{f[u]=l,_(p,u)&&(p[u]=l)};l?(e.id=-1,Ln(e,n)):e()}else if(Je(u)){const e=()=>{u.value=l};l?(e.id=-1,Ln(e,n)):e()}else x(u)&&nt(u,i,12,[l,f])};function Dn(e){return function(e,t){const{insert:n,remove:o,patchProp:r,forcePatchProp:s,createElement:l,createText:i,createComment:f,setText:p,setElementText:d,parentNode:h,nextSibling:m,setScopeId:g=a,cloneNode:y,insertStaticContent:b}=e,x=(e,t,n,o=null,r=null,s=null,l=!1,i=null,c=!1)=>{e&&!so(e,t)&&(o=le(e),ee(e,r,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:u,ref:a,shapeFlag:f}=t;switch(u){case Jn:w(e,t,n,o);break;case Xn:C(e,t,n,o);break;case Zn:null==e&&S(t,n,o,l);break;case Gn:L(e,t,n,o,r,s,l,i,c);break;default:1&f?F(e,t,n,o,r,s,l,i,c):6&f?B(e,t,n,o,r,s,l,i,c):(64&f||128&f)&&u.process(e,t,n,o,r,s,l,i,c,ce)}null!=a&&r&&Bn(a,e&&e.ref,s,t||e,!t)},w=(e,t,o,r)=>{if(null==e)n(t.el=i(t.children),o,r);else{const n=t.el=e.el;t.children!==e.children&&p(n,t.children)}},C=(e,t,o,r)=>{null==e?n(t.el=f(t.children||""),o,r):t.el=e.el},S=(e,t,n,o)=>{[e.el,e.anchor]=b(e.children,t,n,o)},E=({el:e,anchor:t},o,r)=>{let s;for(;e&&e!==t;)s=m(e),n(e,o,r),e=s;n(t,o,r)},O=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=m(e),o(e),e=n;o(t)},F=(e,t,n,o,r,s,l,i,c)=>{l=l||"svg"===t.type,null==e?P(t,n,o,r,s,l,i,c):I(e,t,r,s,l,i,c)},P=(e,t,o,s,i,c,u,a)=>{let f,p;const{type:h,props:v,shapeFlag:m,transition:g,patchFlag:_,dirs:b}=e;if(e.el&&void 0!==y&&-1===_)f=e.el=y(e.el);else{if(f=e.el=l(e.type,c,v&&v.is,v),8&m?d(f,e.children):16&m&&T(e.children,f,null,s,i,c&&"foreignObject"!==h,u,a||!!e.dynamicChildren),b&&In(e,null,s,"created"),v){for(const t in v)R(t)||r(f,t,null,v[t],c,e.children,s,i,se);(p=v.onVnodeBeforeMount)&&Wn(p,s,e)}A(f,e,e.scopeId,u,s)}b&&In(e,null,s,"beforeMount");const x=(!i||i&&!i.pendingBranch)&&g&&!g.persisted;x&&g.beforeEnter(f),n(f,t,o),((p=v&&v.onVnodeMounted)||x||b)&&Ln((()=>{p&&Wn(p,s,e),x&&g.enter(f),b&&In(e,null,s,"mounted")}),i)},A=(e,t,n,o,r)=>{if(n&&g(e,n),o)for(let s=0;s{for(let u=c;u{const a=t.el=e.el;let{patchFlag:f,dynamicChildren:p,dirs:h}=t;f|=16&e.patchFlag;const v=e.props||c,m=t.props||c;let g;if((g=m.onVnodeBeforeUpdate)&&Wn(g,n,t,e),h&&In(t,e,n,"beforeUpdate"),f>0){if(16&f)U(a,t,v,m,n,o,l);else if(2&f&&v.class!==m.class&&r(a,"class",null,m.class,l),4&f&&r(a,"style",v.style,m.style,l),8&f){const i=t.dynamicProps;for(let t=0;t{g&&Wn(g,n,t,e),h&&In(t,e,n,"updated")}),o)},N=(e,t,n,o,r,s,l)=>{for(let i=0;i{if(n!==o){for(const c in o){if(R(c))continue;const a=o[c],f=n[c];(a!==f||s&&s(e,c))&&r(e,c,f,a,u,t.children,l,i,se)}if(n!==c)for(const s in n)R(s)||s in o||r(e,s,n[s],null,u,t.children,l,i,se)}},L=(e,t,o,r,s,l,c,u,a)=>{const f=t.el=e?e.el:i(""),p=t.anchor=e?e.anchor:i("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:v}=t;h&&(a=!0),v&&(u=u?u.concat(v):v),null==e?(n(f,o,r),n(p,o,r),T(t.children,o,p,s,l,c,u,a)):d>0&&64&d&&h&&e.dynamicChildren?(N(e.dynamicChildren,h,o,s,l,c,u),(null!=t.key||s&&t===s.subTree)&&zn(e,t,!0)):G(e,t,o,p,s,l,c,u,a)},B=(e,t,n,o,r,s,l,i,c)=>{t.slotScopeIds=i,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,l,c):D(t,n,o,r,s,l,c):W(e,t,c)},D=(e,t,n,o,r,s,l)=>{const i=e.component=function(e,t,n){const o=e.type,r=(t?t.appContext:e.appContext)||ko,s={uid:Eo++,vnode:e,type:o,parent:t,appContext:r,root:null,next:null,subTree:null,update:null,render:null,proxy:null,exposed:null,withProxy:null,effects:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Sn(o,r),emitsOptions:Ot(o,r),emit:null,emitted:null,propsDefaults:c,inheritAttrs:o.inheritAttrs,ctx:c,data:c,props:c,attrs:c,slots:c,refs:c,setupState:c,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return s.ctx={_:s},s.root=t?t.root:s,s.emit=Et.bind(null,s),s}(e,o,r);if(Ht(e)&&(i.ctx.renderer=ce),function(e,t=!1){Po=t;const{props:n,children:o}=e.vnode,r=Ro(e);xn(e,n,r,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=qe(t),$(t,"_",n)):Mn(t,e.slots={})}else e.slots={},t&&Tn(e,t);$(e.slots,lo,1)})(e,o);const s=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Co);const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?function(e){const t=t=>{e.exposed=Ye(t)};return{attrs:e.attrs,slots:e.slots,emit:e.emit,expose:t}}(e):null;Oo=e,Q();const r=nt(o,e,0,[e.props,n]);if(Y(),Oo=null,k(r)){if(t)return r.then((t=>{Ao(e,t)})).catch((t=>{rt(t,e,0)}));e.asyncDep=r}else Ao(e,r)}else Mo(e)}(e,t):void 0;Po=!1}(i),i.asyncDep){if(r&&r.registerDep(i,z),!e.el){const e=i.subTree=uo(Xn);C(null,e,t,n)}}else z(i,e,t,n,r,s,l)},W=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:l,children:i,patchFlag:c}=t,u=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!r&&!i||i&&i.$stable)||o!==l&&(o?!l||Nt(o,l,u):!!l);if(1024&c)return!0;if(16&c)return o?Nt(o,l,u):!!l;if(8&c){const e=t.dynamicProps;for(let t=0;tct&&it.splice(t,1)}(o.update),o.update()}else t.component=e.component,t.el=e.el,o.vnode=t},z=(e,t,n,o,r,s,l)=>{e.update=H((function(){if(e.isMounted){let t,{next:n,bu:o,u:i,parent:c,vnode:u}=e,a=n;n?(n.el=u.el,K(e,n,l)):n=u,o&&V(o),(t=n.props&&n.props.onVnodeBeforeUpdate)&&Wn(t,c,n,u);const f=Tt(e),p=e.subTree;e.subTree=f,x(p,f,h(p.el),le(p),e,r,s),n.el=f.el,null===a&&function({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}(e,f.el),i&&Ln(i,r),(t=n.props&&n.props.onVnodeUpdated)&&Ln((()=>Wn(t,c,n,u)),r)}else{let l;const{el:i,props:c}=t,{bm:u,m:a,parent:f}=e;if(u&&V(u),(l=c&&c.onVnodeBeforeMount)&&Wn(l,f,t),i&&ae){const n=()=>{e.subTree=Tt(e),ae(i,e.subTree,e,r,null)};Kt(t)?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const l=e.subTree=Tt(e);x(null,l,n,o,e,r,s),t.el=l.el}if(a&&Ln(a,r),l=c&&c.onVnodeMounted){const e=t;Ln((()=>Wn(l,f,e)),r)}256&t.shapeFlag&&e.a&&Ln(e.a,r),e.isMounted=!0,t=n=o=null}}),$n)},K=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:l}}=e,i=qe(r),[c]=e.propsOptions;let u=!1;if(!(o||l>0)||16&l){let o;wn(e,t,r,s)&&(u=!0);for(const s in i)t&&(_(t,s)||(o=j(s))!==s&&_(t,o))||(c?!n||void 0===n[s]&&void 0===n[o]||(r[s]=Cn(c,i,s,void 0,e,!0)):delete r[s]);if(s!==i)for(const e in s)t&&_(t,e)||(delete s[e],u=!0)}else if(8&l){const n=e.vnode.dynamicProps;for(let o=0;o{const{vnode:o,slots:r}=e;let s=!0,l=c;if(32&o.shapeFlag){const e=t._;e?n&&1===e?s=!1:(v(r,t),n||1!==e||delete r._):(s=!t.$stable,Mn(t,r)),l=t}else t&&(Tn(e,t),l={default:1});if(s)for(const i in r)Rn(i)||i in l||delete r[i]})(e,t.children,n),Q(),wt(void 0,e.update),Y()},G=(e,t,n,o,r,s,l,i,c=!1)=>{const u=e&&e.children,a=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:h}=t;if(p>0){if(128&p)return void X(u,f,n,o,r,s,l,i,c);if(256&p)return void J(u,f,n,o,r,s,l,i,c)}8&h?(16&a&&se(u,r,s),f!==u&&d(n,f)):16&a?16&h?X(u,f,n,o,r,s,l,i,c):se(u,r,s,!0):(8&a&&d(n,""),16&h&&T(f,n,o,r,s,l,i,c))},J=(e,t,n,o,r,s,l,i,c)=>{t=t||u;const a=(e=e||u).length,f=t.length,p=Math.min(a,f);let d;for(d=0;df?se(e,r,s,!0,!1,p):T(t,n,o,r,s,l,i,c,p)},X=(e,t,n,o,r,s,l,i,c)=>{let a=0;const f=t.length;let p=e.length-1,d=f-1;for(;a<=p&&a<=d;){const o=e[a],u=t[a]=c?mo(t[a]):vo(t[a]);if(!so(o,u))break;x(o,u,n,null,r,s,l,i,c),a++}for(;a<=p&&a<=d;){const o=e[p],u=t[d]=c?mo(t[d]):vo(t[d]);if(!so(o,u))break;x(o,u,n,null,r,s,l,i,c),p--,d--}if(a>p){if(a<=d){const e=d+1,u=ed)for(;a<=p;)ee(e[a],r,s,!0),a++;else{const h=a,v=a,m=new Map;for(a=v;a<=d;a++){const e=t[a]=c?mo(t[a]):vo(t[a]);null!=e.key&&m.set(e.key,a)}let g,_=0;const y=d-v+1;let b=!1,w=0;const C=new Array(y);for(a=0;a=y){ee(o,r,s,!0);continue}let u;if(null!=o.key)u=m.get(o.key);else for(g=v;g<=d;g++)if(0===C[g-v]&&so(o,t[g])){u=g;break}void 0===u?ee(o,r,s,!0):(C[u-v]=a+1,u>=w?w=u:b=!0,x(o,t[u],n,null,r,s,l,i,c),_++)}const S=b?function(e){const t=e.slice(),n=[0];let o,r,s,l,i;const c=e.length;for(o=0;o0&&(t[o]=n[s-1]),n[s]=o)}}s=n.length,l=n[s-1];for(;s-- >0;)n[s]=l,l=t[l];return n}(C):u;for(g=S.length-1,a=y-1;a>=0;a--){const e=v+a,u=t[e],p=e+1{const{el:l,type:i,transition:c,children:u,shapeFlag:a}=e;if(6&a)return void Z(e.component.subTree,t,o,r);if(128&a)return void e.suspense.move(t,o,r);if(64&a)return void i.move(e,t,o,ce);if(i===Gn){n(l,t,o);for(let e=0;ec.enter(l)),s);else{const{leave:e,delayLeave:r,afterLeave:s}=c,i=()=>n(l,t,o),u=()=>{e(l,(()=>{i(),s&&s()}))};r?r(l,i,u):u()}else n(l,t,o)},ee=(e,t,n,o=!1,r=!1)=>{const{type:s,props:l,ref:i,children:c,dynamicChildren:u,shapeFlag:a,patchFlag:f,dirs:p}=e;if(null!=i&&Bn(i,null,n,e,!0),256&a)return void t.ctx.deactivate(e);const d=1&a&&p;let h;if((h=l&&l.onVnodeBeforeUnmount)&&Wn(h,t,e),6&a)re(e.component,n,o);else{if(128&a)return void e.suspense.unmount(n,o);d&&In(e,null,t,"beforeUnmount"),64&a?e.type.remove(e,t,n,r,ce,o):u&&(s!==Gn||f>0&&64&f)?se(u,t,n,!1,!0):(s===Gn&&(128&f||256&f)||!r&&16&a)&&se(c,t,n),o&&ne(e)}((h=l&&l.onVnodeUnmounted)||d)&&Ln((()=>{h&&Wn(h,t,e),d&&In(e,null,t,"unmounted")}),n)},ne=e=>{const{type:t,el:n,anchor:r,transition:s}=e;if(t===Gn)return void oe(n,r);if(t===Zn)return void O(e);const l=()=>{o(n),s&&!s.persisted&&s.afterLeave&&s.afterLeave()};if(1&e.shapeFlag&&s&&!s.persisted){const{leave:t,delayLeave:o}=s,r=()=>t(n,l);o?o(e.el,l,r):r()}else l()},oe=(e,t)=>{let n;for(;e!==t;)n=m(e),o(e),e=n;o(t)},re=(e,t,n)=>{const{bum:o,effects:r,update:s,subTree:l,um:i}=e;if(o&&V(o),r)for(let c=0;c{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},se=(e,t,n,o=!1,r=!1,s=0)=>{for(let l=s;l6&e.shapeFlag?le(e.component.subTree):128&e.shapeFlag?e.suspense.next():m(e.anchor||e.el),ie=(e,t,n)=>{null==e?t._vnode&&ee(t._vnode,null,null,!0):x(t._vnode||null,e,t,null,null,null,n),Ct(),t._vnode=e},ce={p:x,um:ee,m:Z,r:ne,mt:D,mc:T,pc:G,pbc:N,n:le,o:e};let ue,ae;t&&([ue,ae]=t(ce));return{render:ie,hydrate:ue,createApp:Vn(ie,ue)}}(e)}function Wn(e,t,n,o=null){ot(e,t,7,[n,o])}function zn(e,t,n=!1){const o=e.children,r=t.children;if(y(o)&&y(r))for(let s=0;s0?Yn||u:null,Qn.pop(),Yn=Qn[Qn.length-1]||null,to>0&&Yn&&Yn.push(s),s}function ro(e){return!!e&&!0===e.__v_isVNode}function so(e,t){return e.type===t.type&&e.key===t.key}const lo="__vInternal",io=({key:e})=>null!=e?e:null,co=({ref:e})=>null!=e?w(e)||Je(e)||x(e)?{i:Rt,r:e}:e:null,uo=function(e,t=null,n=null,r=0,s=null,l=!1){e&&e!==Hn||(e=Xn);if(ro(e)){const o=ao(e,t,!0);return n&&go(o,n),o}c=e,x(c)&&"__vccOpts"in c&&(e=e.__vccOpts);var c;if(t){(He(t)||lo in t)&&(t=v({},t));let{class:e,style:n}=t;e&&!w(e)&&(t.class=i(e)),S(n)&&(He(n)&&!y(n)&&(n=v({},n)),t.style=o(n))}const u=w(e)?1:(e=>e.__isSuspense)(e)?128:(e=>e.__isTeleport)(e)?64:S(e)?4:x(e)?2:0,a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&io(t),ref:t&&co(t),scopeId:Pt,slotScopeIds:null,children:null,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:u,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null};go(a,n),128&u&&e.normalize(a);to>0&&!l&&Yn&&(r>0||6&u)&&32!==r&&Yn.push(a);return a};function ao(e,t,n=!1){const{props:r,ref:s,patchFlag:l,children:c}=e,u=t?function(...e){const t=v({},e[0]);for(let n=1;n!ro(e)||e.type!==Xn&&!(e.type===Gn&&!bo(e.children))))?e:null}const xo=e=>e?Ro(e)?e.exposed?e.exposed:e.proxy:xo(e.parent):null,wo=v(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>xo(e.parent),$root:e=>xo(e.root),$emit:e=>e.emit,$options:e=>hn(e),$forceUpdate:e=>()=>yt(e.update),$nextTick:e=>_t.bind(e.proxy),$watch:e=>Dt.bind(e)}),Co={get({_:e},t){const{ctx:n,setupState:o,data:r,props:s,accessCache:l,type:i,appContext:u}=e;if("__v_skip"===t)return!0;let a;if("$"!==t[0]){const i=l[t];if(void 0!==i)switch(i){case 0:return o[t];case 1:return r[t];case 3:return n[t];case 2:return s[t]}else{if(o!==c&&_(o,t))return l[t]=0,o[t];if(r!==c&&_(r,t))return l[t]=1,r[t];if((a=e.propsOptions[0])&&_(a,t))return l[t]=2,s[t];if(n!==c&&_(n,t))return l[t]=3,n[t];an&&(l[t]=4)}}const f=wo[t];let p,d;return f?("$attrs"===t&&ee(e,0,t),f(e)):(p=i.__cssModules)&&(p=p[t])?p:n!==c&&_(n,t)?(l[t]=3,n[t]):(d=u.config.globalProperties,_(d,t)?d[t]:void 0)},set({_:e},t,n){const{data:o,setupState:r,ctx:s}=e;if(r!==c&&_(r,t))r[t]=n;else if(o!==c&&_(o,t))o[t]=n;else if(_(e.props,t))return!1;return("$"!==t[0]||!(t.slice(1)in e))&&(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:s}},l){let i;return void 0!==n[l]||e!==c&&_(e,l)||t!==c&&_(t,l)||(i=s[0])&&_(i,l)||_(o,l)||_(wo,l)||_(r.config.globalProperties,l)}},So=v({},Co,{get(e,t){if(t!==Symbol.unscopables)return Co.get(e,t,e)},has:(e,n)=>"_"!==n[0]&&!t(n)}),ko=Nn();let Eo=0;let Oo=null;const Fo=e=>{Oo=e};function Ro(e){return 4&e.vnode.shapeFlag}let Po=!1;function Ao(e,t,n){x(t)?e.render=t:S(t)&&(e.setupState=Ye(t)),Mo(e)}function Mo(e,t,n){const o=e.type;e.render||(e.render=o.render||a,e.render._rc&&(e.withProxy=new Proxy(e.ctx,So))),Oo=e,Q(),fn(e),Y(),Oo=null}function To(e,t=Oo){t&&(t.effects||(t.effects=[])).push(e)}function jo(e){return x(e)&&e.displayName||e.name}function Io(e){const t=function(e){let t,n;return x(e)?(t=e,n=a):(t=e.get,n=e.set),new tt(t,n,x(e)||!e.set)}(e);return To(t.effect),t}const No="3.1.1",Uo="http://www.w3.org/2000/svg",Vo="undefined"!=typeof document?document:null;let $o,Lo;const Bo={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t?Vo.createElementNS(Uo,e):Vo.createElement(e,n?{is:n}:void 0);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>Vo.createTextNode(e),createComment:e=>Vo.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Vo.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,o){const r=o?Lo||(Lo=Vo.createElementNS(Uo,"svg")):$o||($o=Vo.createElement("div"));r.innerHTML=e;const s=r.firstChild;let l=s,i=l;for(;l;)i=l,Bo.insert(l,t,n),l=r.firstChild;return[s,i]}};const Do=/\s*!important$/;function Wo(e,t,n){if(y(n))n.forEach((n=>Wo(e,t,n)));else if(t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=Ko[t];if(n)return n;let o=M(t);if("filter"!==o&&o in e)return Ko[t]=o;o=I(o);for(let r=0;rdocument.createEvent("Event").timeStamp&&(qo=()=>performance.now());const e=navigator.userAgent.match(/firefox\/(\d+)/i);Go=!!(e&&Number(e[1])<=53)}let Jo=0;const Xo=Promise.resolve(),Zo=()=>{Jo=0};function Qo(e,t,n,o,r=null){const s=e._vei||(e._vei={}),l=s[t];if(o&&l)l.value=o;else{const[n,i]=function(e){let t;if(Yo.test(e)){let n;for(t={};n=e.match(Yo);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[j(e.slice(2)),t]}(t);if(o){!function(e,t,n,o){e.addEventListener(t,n,o)}(e,n,s[t]=function(e,t){const n=e=>{const o=e.timeStamp||qo();(Go||o>=n.attached-1)&&ot(function(e,t){if(y(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=(()=>Jo||(Xo.then(Zo),Jo=qo()))(),n}(o,r),i)}else l&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,l,i),s[t]=void 0)}}const Yo=/(?:Once|Passive|Capture)$/;const er=/^on[a-z]/;const tr=["ctrl","shift","alt","meta"],nr={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>tr.some((n=>e[`${n}Key`]&&!t.includes(n)))},or=(e,t)=>(n,...o)=>{for(let e=0;e{sr(e,!1)})):sr(e,t))},beforeUnmount(e,{value:t}){sr(e,t)}};function sr(e,t){e.style.display=t?e._vod:"none"}const lr=v({patchProp:(e,t,o,r,s=!1,l,i,c,u)=>{switch(t){case"class":!function(e,t,n){if(null==t&&(t=""),n)e.setAttribute("class",t);else{const n=e._vtc;n&&(t=(t?[t,...n]:[...n]).join(" ")),e.className=t}}(e,r,s);break;case"style":!function(e,t,n){const o=e.style;if(n)if(w(n)){if(t!==n){const t=o.display;o.cssText=n,"_vod"in e&&(o.display=t)}}else{for(const e in n)Wo(o,e,n[e]);if(t&&!w(t))for(const e in t)null==n[e]&&Wo(o,e,"")}else e.removeAttribute("style")}(e,o,r);break;default:d(t)?h(t)||Qo(e,t,0,r,i):function(e,t,n,o){if(o)return"innerHTML"===t||!!(t in e&&er.test(t)&&x(n));if("spellcheck"===t||"draggable"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if(er.test(t)&&w(n))return!1;return t in e}(e,t,r,s)?function(e,t,n,o,r,s,l){if("innerHTML"===t||"textContent"===t)return o&&l(o,r,s),void(e[t]=null==n?"":n);if("value"===t&&"PROGRESS"!==e.tagName){e._value=n;const o=null==n?"":n;return e.value!==o&&(e.value=o),void(null==n&&e.removeAttribute(t))}if(""===n||null==n){const o=typeof e[t];if(""===n&&"boolean"===o)return void(e[t]=!0);if(null==n&&"string"===o)return e[t]="",void e.removeAttribute(t);if("number"===o)return e[t]=0,void e.removeAttribute(t)}try{e[t]=n}catch(i){}}(e,t,r,l,i,c,u):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),function(e,t,o,r,s){if(r&&t.startsWith("xlink:"))null==o?e.removeAttributeNS(Ho,t.slice(6,t.length)):e.setAttributeNS(Ho,t,o);else{const r=n(t);null==o||r&&!1===o?e.removeAttribute(t):e.setAttribute(t,r?"":o)}}(e,t,r,s))}},forcePatchProp:(e,t)=>"value"===t},Bo);let ir;const cr=(...e)=>{const t=(ir||(ir=Dn(lr))).createApp(...e),{mount:n}=t;return t.mount=e=>{const o=function(e){if(w(e)){return document.querySelector(e)}return e}(e);if(!o)return;const r=t._component;x(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t};export{Gn as F,uo as a,_o as b,oo as c,po as d,fo as e,or as f,Io as g,jn as h,Xe as i,en as j,tn as k,on as l,Lt as m,_t as n,eo as o,Ut as p,yo as q,Kn as r,ho as s,Vt as t,cr as u,rr as v,Mt as w}; 2 | --------------------------------------------------------------------------------