├── .yarnrc.yml ├── .prettierrc ├── .gitignore ├── .editorconfig ├── example ├── index.js ├── index.html └── App.vue ├── vite.config.js ├── .babelrc ├── src ├── index.js └── vue-cookie-accept-decline.vue ├── LICENSE ├── docs ├── index.html └── assets │ ├── index.2f68f6de.css │ └── index.d553c29d.js ├── rollup.config.js ├── CHANGELOG.md ├── package.json ├── test └── VueCookieAcceptDecline.spec.js ├── dist ├── vue-cookie-accept-decline.min.js ├── vue-cookie-accept-decline.css ├── vue-cookie-accept-decline.esm.js └── vue-cookie-accept-decline.umd.js └── README.md /.yarnrc.yml: -------------------------------------------------------------------------------- 1 | enableTelemetry: false 2 | nodeLinker: node-modules 3 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 100, 3 | "semi": true, 4 | "singleQuote": true, 5 | "tabWidth": 2, 6 | "trailingComma": "all", 7 | "useTabs": false 8 | } 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | 4 | # https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored 5 | .pnp.* 6 | .yarn/* 7 | !.yarn/patches 8 | !.yarn/plugins 9 | !.yarn/releases 10 | !.yarn/sdks 11 | !.yarn/versions 12 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 2 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | -------------------------------------------------------------------------------- /example/index.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue'; 2 | import VueCookieAcceptDecline from '../src/index.js'; 3 | import App from './App.vue'; 4 | 5 | const app = createApp(App); 6 | 7 | app.component('vue-cookie-accept-decline', VueCookieAcceptDecline); 8 | 9 | app.mount('#app'); 10 | -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import vue from '@vitejs/plugin-vue'; 3 | 4 | export default defineConfig({ 5 | base: '/vue-cookie-accept-decline/', // For GitHub docs support 6 | build: { 7 | outDir: '../docs', 8 | }, 9 | plugins: [vue()], 10 | root: 'example', 11 | }); 12 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/preset-env", 5 | { 6 | "modules": false 7 | } 8 | ] 9 | ], 10 | "env": { 11 | "test": { 12 | "presets": [ 13 | [ 14 | "@babel/preset-env", 15 | { 16 | "targets": { 17 | "node": "current" 18 | } 19 | } 20 | ] 21 | ] 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | // Import vue component 2 | import component from './vue-cookie-accept-decline.vue'; 3 | 4 | export function install(app) { 5 | if (install.installed) return; 6 | 7 | install.installed = true; 8 | app.component('VueCookieAcceptDecline', component); 9 | } 10 | 11 | const plugin = { install }; 12 | 13 | // To auto-install when Vue is found 14 | let GlobalVue = null; 15 | if (typeof window !== 'undefined') { 16 | GlobalVue = window.Vue; 17 | } else if (typeof global !== 'undefined') { 18 | GlobalVue = global.Vue; 19 | } 20 | if (GlobalVue && 'use' in GlobalVue) { 21 | GlobalVue.use(plugin); 22 | } 23 | 24 | // To allow use as module (npm/webpack/etc.) export component 25 | export default component; 26 | 27 | // It's possible to expose named exports when writing components that can 28 | // also be used as directives, etc. - eg. import { RollupDemoDirective } from 'rollup-demo'; 29 | // export const RollupDemoDirective = component; 30 | -------------------------------------------------------------------------------- /example/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | 12 | vue-cookie-accept-decline 13 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 John Datserakis 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | 12 | vue-cookie-accept-decline 13 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import { terser } from 'rollup-plugin-terser'; 2 | import buble from 'rollup-plugin-buble'; 3 | import commonjs from 'rollup-plugin-commonjs'; 4 | import minimist from 'minimist'; 5 | import resolve from 'rollup-plugin-node-resolve'; 6 | import scss from 'rollup-plugin-scss'; 7 | import vue from 'rollup-plugin-vue'; 8 | 9 | const argv = minimist(process.argv.slice(2)); 10 | 11 | const config = { 12 | input: './src/index.js', 13 | output: { 14 | name: 'VueCookieAcceptDecline', 15 | exports: 'named', 16 | globals: { 17 | vue: 'Vue', 18 | 'tiny-cookie': 'tinyCookie', 19 | }, 20 | }, 21 | plugins: [ 22 | vue({ 23 | css: false, 24 | compileTemplate: true, 25 | }), 26 | scss({ output: 'dist/vue-cookie-accept-decline.css' }), 27 | resolve(), 28 | buble(), 29 | commonjs(), 30 | ], 31 | external: ['vue', 'tiny-cookie'], 32 | }; 33 | 34 | // Only minify browser (iife) version 35 | if (argv.format === 'iife') { 36 | config.plugins.push(terser()); 37 | 38 | // Here we remove our `external` dependency that we have in this project 39 | // Be careful with the index here - it has to match any dependency that 40 | // you want to be built into to the iife output 41 | config.external.splice(1); 42 | } 43 | 44 | export default config; 45 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # CHANGELOG.md 2 | 3 | ## 6.1.0 (2022-08-29) 4 | 5 | - Update install method to avoid `.use` issue. Thank you @queengooborg. 6 | 7 | ## 6.0.3 8 | 9 | - Upgrade package to support Vue 3. Vue 2 support can be found at `v5.4.0`. 10 | 11 | ## 5.2.0 (2020-10-07) 12 | 13 | - Added `forceCookies` option. Thank you @YannikFirre. 14 | 15 | ## 5.1.1 (2019-02-19) 16 | 17 | - Adjusting iife build 18 | 19 | ## 5.1.0 (2019-01-07) 20 | 21 | - Removing the `scoped` prop from the `style` tags to allow for proper overwrite of styles. 22 | 23 | ## 5.0.2 (2018-12-13) 24 | 25 | - Fixing scrollbar issue on Windows in Chrome and Firefox. 26 | 27 | ## 5.0.0 (2018-11-15) 28 | 29 | - Adjusted the way that events were emitted (now all snake-case). [issue](https://github.com/johndatserakis/vue-cookie-accept-decline/issues/10) 30 | - Added new way to postpone and hide the popup. [issue](https://github.com/johndatserakis/vue-cookie-accept-decline/issues/11) 31 | - Fixed Windows scrollbar issue. 32 | 33 | ## 4.0.0 (2018-11-02) 34 | 35 | - Adjusted build output - there will now be an additional `css` file that needs to be imported along with the `js`. This allows the `css` to be handled nicely by webpack or your app's build system. 36 | 37 | ## 3.0.2 (2018-10-24) 38 | 39 | - Fixed button bug on some older iPads. 40 | 41 | ## 3.0.1 (2018-10-23) 42 | 43 | - Added Codesandbox example. Updated readme. 44 | 45 | ## 3.0.0 (2018-10-23) 46 | 47 | - Added new default display option of `floating`. 48 | - Added new required `elementId` property to allow for multiple instances of `vue-cookie-accept-decline` on the same page. 49 | - Exposed a `removeCookie` method that can be used to clear the cookie the component creates. Also exposed the `init` method to allow devs to show the panel back to the user if they remove the cookie using `removeCookie`. 50 | - Updated readme to account for these new changes. 51 | - Added unit tests for the component. 52 | 53 | ## 2.0.2 (2018-10-10) 54 | 55 | - Decreased box-shadow opacity and adjusted border-top color. 56 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "John Datserakis ", 3 | "browser": { 4 | "./sfc": "src/vue-cookie-accept-decline.vue" 5 | }, 6 | "bugs": { 7 | "url": "https://github.com/johndatserakis/vue-cookie-accept-decline/issues" 8 | }, 9 | "dependencies": { 10 | "tiny-cookie": "^2.3.2" 11 | }, 12 | "description": "Show a banner with text, a decline button, and an accept button on your page.", 13 | "devDependencies": { 14 | "@babel/cli": "^7.4.4", 15 | "@babel/core": "^7.4.5", 16 | "@babel/preset-env": "^7.4.5", 17 | "@vitejs/plugin-vue": "^2.3.3", 18 | "@vue/compiler-sfc": "^3.2.31", 19 | "@vue/test-utils": "^2.0.0-rc.18", 20 | "babel-core": "^7.0.0-bridge.0", 21 | "babel-jest": "^24.8.0", 22 | "jest": "^24.8.0", 23 | "jest-serializer-vue": "^2.0.2", 24 | "minimist": "^1.2.0", 25 | "regenerator-runtime": "^0.13.2", 26 | "rimraf": "^3.0.2", 27 | "rollup": "^1.15.6", 28 | "rollup-plugin-buble": "^0.19.6", 29 | "rollup-plugin-commonjs": "^10.0.0", 30 | "rollup-plugin-node-resolve": "^5.0.3", 31 | "rollup-plugin-scss": "^3.0.0", 32 | "rollup-plugin-terser": "^5.0.0", 33 | "rollup-plugin-vue": "^6.0.0", 34 | "sass": "^1.49.9", 35 | "vite": "^2.9.9", 36 | "vue": "^3.2.31", 37 | "vue-jest": "^5.0.0-alpha.10" 38 | }, 39 | "jest": { 40 | "moduleFileExtensions": [ 41 | "js", 42 | "vue" 43 | ], 44 | "moduleNameMapper": { 45 | "^@/(.*)$": "/src/$1" 46 | }, 47 | "snapshotSerializers": [ 48 | "/node_modules/jest-serializer-vue" 49 | ], 50 | "transform": { 51 | ".*\\.(vue)$": "/node_modules/vue-jest", 52 | "^.+\\.js$": "/node_modules/babel-jest" 53 | } 54 | }, 55 | "keywords": [ 56 | "vue", 57 | "gdpr", 58 | "banner", 59 | "accept", 60 | "decline", 61 | "cookie" 62 | ], 63 | "license": "MIT", 64 | "main": "dist/vue-cookie-accept-decline.umd.js", 65 | "module": "dist/vue-cookie-accept-decline.esm.js", 66 | "name": "vue-cookie-accept-decline", 67 | "peerDependencies": { 68 | "vue": "^3.2.31" 69 | }, 70 | "repository": { 71 | "type": "git", 72 | "url": "git+https://github.com/johndatserakis/vue-cookie-accept-decline.git" 73 | }, 74 | "scripts": { 75 | "build": "npm run test && npm run build:example && npm run build:library", 76 | "build:es": "rollup --config rollup.config.js --format es --file dist/vue-cookie-accept-decline.esm.js", 77 | "build:example": "rimraf docs && vite build", 78 | "build:library": "rimraf dist && npm run build:umd & npm run build:es & npm run build:umd & npm run build:unpkg", 79 | "build:umd": "rollup --config rollup.config.js --format umd --file dist/vue-cookie-accept-decline.umd.js", 80 | "build:unpkg": "rollup --config rollup.config.js --format iife --file dist/vue-cookie-accept-decline.min.js", 81 | "test": "jest", 82 | "dev": "vite" 83 | }, 84 | "sideEffects": false, 85 | "unpkg": "dist/vue-cookie-accept-decline.min.js", 86 | "version": "6.1.0" 87 | } 88 | -------------------------------------------------------------------------------- /test/VueCookieAcceptDecline.spec.js: -------------------------------------------------------------------------------- 1 | import VueCookieAcceptDecline from '@/vue-cookie-accept-decline.vue'; 2 | import { shallowMount } from '@vue/test-utils'; 3 | 4 | describe('VueCookieAcceptDecline.vue', () => { 5 | it('Sets props correctly', async () => { 6 | let initialProps = { 7 | elementId: 'myPanel1', 8 | debug: false, 9 | position: 'bottom-left', 10 | type: 'floating', 11 | disableDecline: false, 12 | transitionName: 'slideFromBottom', 13 | }; 14 | 15 | const wrapper = shallowMount(VueCookieAcceptDecline, { 16 | props: { 17 | elementId: initialProps.elementId, 18 | debug: initialProps.debug, 19 | position: initialProps.position, 20 | type: initialProps.type, 21 | disableDecline: initialProps.disableDecline, 22 | transitionName: initialProps.transitionName, 23 | }, 24 | }); 25 | 26 | expect(wrapper.vm.elementId).toBe(initialProps.elementId); 27 | expect(wrapper.vm.debug).toBe(initialProps.debug); 28 | expect(wrapper.vm.position).toBe(initialProps.position); 29 | expect(wrapper.vm.type).toBe(initialProps.type); 30 | expect(wrapper.vm.disableDecline).toBe(initialProps.disableDecline); 31 | expect(wrapper.vm.transitionName).toBe(initialProps.transitionName); 32 | }); 33 | 34 | it('Sets the accept cookie correctly', async () => { 35 | let initialProps = { 36 | elementId: 'myPanel1', 37 | debug: false, 38 | position: 'bottom-left', 39 | type: 'floating', 40 | disableDecline: false, 41 | transitionName: 'slideFromBottom', 42 | }; 43 | 44 | const wrapper = shallowMount(VueCookieAcceptDecline, { 45 | props: { 46 | elementId: initialProps.elementId, 47 | debug: initialProps.debug, 48 | position: initialProps.position, 49 | type: initialProps.type, 50 | disableDecline: initialProps.disableDecline, 51 | transitionName: initialProps.transitionName, 52 | }, 53 | }); 54 | 55 | // Run the accept function 56 | wrapper.vm.accept(); 57 | expect(wrapper.vm.status).toBe('accept'); 58 | 59 | // Check the event was emitted properly 60 | expect(wrapper.emitted('clicked-accept')).toBeTruthy(); 61 | }); 62 | 63 | it('Sets the decline cookie correctly', async () => { 64 | let initialProps = { 65 | elementId: 'myPanel1', 66 | debug: false, 67 | position: 'bottom-left', 68 | type: 'floating', 69 | disableDecline: false, 70 | transitionName: 'slideFromBottom', 71 | }; 72 | 73 | const wrapper = shallowMount(VueCookieAcceptDecline, { 74 | props: { 75 | elementId: initialProps.elementId, 76 | debug: initialProps.debug, 77 | position: initialProps.position, 78 | type: initialProps.type, 79 | disableDecline: initialProps.disableDecline, 80 | transitionName: initialProps.transitionName, 81 | }, 82 | }); 83 | 84 | // Run the decline function 85 | wrapper.vm.decline(); 86 | expect(wrapper.vm.status).toBe('decline'); 87 | 88 | // Check the event was emitted properly 89 | expect(wrapper.emitted('clicked-decline')).toBeTruthy(); 90 | }); 91 | 92 | it('Sets the postpone cookie correctly', async () => { 93 | let initialProps = { 94 | elementId: 'myPanel1', 95 | debug: false, 96 | position: 'bottom-left', 97 | type: 'floating', 98 | disableDecline: false, 99 | transitionName: 'slideFromBottom', 100 | }; 101 | 102 | const wrapper = shallowMount(VueCookieAcceptDecline, { 103 | props: { 104 | elementId: initialProps.elementId, 105 | debug: initialProps.debug, 106 | position: initialProps.position, 107 | type: initialProps.type, 108 | disableDecline: initialProps.disableDecline, 109 | transitionName: initialProps.transitionName, 110 | }, 111 | }); 112 | 113 | // Run the postpone function 114 | wrapper.vm.postpone(); 115 | expect(wrapper.vm.status).toBe('postpone'); 116 | 117 | // Check the event was emitted properly 118 | expect(wrapper.emitted('clicked-postpone')).toBeTruthy(); 119 | }); 120 | 121 | it('Removes cookie correctly', async () => { 122 | let initialProps = { 123 | elementId: 'myPanel1', 124 | debug: false, 125 | position: 'bottom-left', 126 | type: 'floating', 127 | disableDecline: false, 128 | transitionName: 'slideFromBottom', 129 | }; 130 | 131 | const wrapper = shallowMount(VueCookieAcceptDecline, { 132 | props: { 133 | elementId: initialProps.elementId, 134 | debug: initialProps.debug, 135 | position: initialProps.position, 136 | type: initialProps.type, 137 | disableDecline: initialProps.disableDecline, 138 | transitionName: initialProps.transitionName, 139 | }, 140 | }); 141 | 142 | // Run the decline function 143 | wrapper.vm.decline(); 144 | expect(wrapper.vm.status).toBe('decline'); 145 | 146 | // Now delete the cookie 147 | wrapper.vm.removeCookie(); 148 | expect(wrapper.vm.status).toBe(null); 149 | 150 | // Check the event was emitted properly 151 | expect(wrapper.emitted('removed-cookie')).toBeTruthy(); 152 | }); 153 | }); 154 | -------------------------------------------------------------------------------- /docs/assets/index.2f68f6de.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8";@import"https://fonts.googleapis.com/css?family=Noto+Sans";.cookie__bar{-ms-overflow-style:none;position:fixed;overflow:hidden;box-sizing:border-box;z-index:9999;width:100%;background:#eee;padding:20px;align-items:center;box-shadow:0 -4px 4px #c6c6c60d;border-top:1px solid #ddd;border-bottom:1px solid #ddd;font-size:1rem;font-family:-apple-system,BlinkMacSystemFont,Roboto,Oxygen,Ubuntu,Cantarell,\201c Fira Sans\201d,\201c Droid Sans\201d,\201cHelvetica Neue\201d,Arial,sans-serif;line-height:1.5}.cookie__bar--bottom{bottom:0;left:0;right:0}.cookie__bar--top{top:0;left:0;right:0}.cookie__bar__wrap{display:flex;justify-content:space-between;flex-direction:column;align-items:center;width:100%}@media (min-width: 768px){.cookie__bar__wrap{flex-direction:row}}.cookie__bar__postpone-button{margin-right:auto;-ms-flex:1 1 auto}@media (min-width: 768px){.cookie__bar__postpone-button{margin-right:10px}}.cookie__bar__postpone-button:hover{opacity:.8;cursor:pointer}.cookie__bar__content{margin-right:0;margin-bottom:20px;font-size:.9rem;max-height:103px;overflow:auto;width:100%;-ms-flex:1 1 auto}@media (min-width: 768px){.cookie__bar__content{margin-right:auto;margin-bottom:0}}.cookie__bar__buttons{transition:all .2s ease;display:flex;flex-direction:column;width:100%}@media (min-width: 768px){.cookie__bar__buttons{flex-direction:row;width:auto}}.cookie__bar__buttons__button{display:inline-block;font-weight:400;text-align:center;white-space:nowrap;vertical-align:middle;user-select:none;border:1px solid transparent;padding:.375rem .75rem;line-height:1.5;border-radius:3px;font-size:.9rem}.cookie__bar__buttons__button:hover{cursor:pointer;text-decoration:none}.cookie__bar__buttons__button--accept{-ms-flex:1 1 auto;background:#4caf50;background:linear-gradient(#5cb860,#4caf50);color:#fff}.cookie__bar__buttons__button--accept:hover{background:#409343}.cookie__bar__buttons__button--decline{-ms-flex:1 1 auto;background:#f44336;background:linear-gradient(#f55a4e,#f44336);color:#fff;margin-bottom:10px}.cookie__bar__buttons__button--decline:hover{background:#f21f0f}@media (min-width: 768px){.cookie__bar__buttons__button--decline{margin-bottom:0;margin-right:10px}}.cookie__floating{-ms-overflow-style:none;position:fixed;overflow:hidden;box-sizing:border-box;z-index:9999;width:90%;background:#fafafa;display:flex;justify-content:space-between;flex-direction:column;box-shadow:0 4px 8px #c6c6c64d;border:1px solid #ddd;font-size:1rem;font-family:-apple-system,BlinkMacSystemFont,Roboto,Oxygen,Ubuntu,Cantarell,\201c Fira Sans\201d,\201c Droid Sans\201d,\201cHelvetica Neue\201d,Arial,sans-serif;line-height:1.5;border-radius:6px;bottom:10px;left:0;right:0;margin:0 auto}@media (min-width: 768px){.cookie__floating{max-width:300px}}@media (min-width: 768px){.cookie__floating--bottom-left{bottom:20px;left:20px;right:auto;margin:0}}@media (min-width: 768px){.cookie__floating--bottom-right{bottom:20px;right:20px;left:auto;margin:0}}@media (min-width: 768px){.cookie__floating--top-right{top:20px;bottom:auto;right:20px;left:auto;margin:0}}@media (min-width: 768px){.cookie__floating--top-left{top:20px;bottom:auto;right:auto;left:20px;margin:0}}.cookie__floating__postpone-button{display:inline-flex;padding:5px 0 0 20px;margin-bottom:-10px;margin-right:auto}.cookie__floating__postpone-button:hover{opacity:.8;cursor:pointer}.cookie__floating__content{font-size:.95rem;margin-bottom:5px;padding:15px 20px;max-height:105px;overflow:auto}@media (min-width: 768px){.cookie__floating__content{margin-bottom:10px}}.cookie__floating__buttons{transition:all .2s ease;display:flex;flex-direction:row;height:auto;width:100%}.cookie__floating__buttons__button{background-color:#eee;font-weight:700;font-size:.9rem;width:100%;min-height:40px;white-space:nowrap;user-select:none;border-bottom:1px solid #ddd;border-top:1px solid #ddd;border-left:none;border-right:none;padding:.375rem .75rem}.cookie__floating__buttons__button:first-child{border-right:1px solid #ddd}.cookie__floating__buttons__button:hover{cursor:pointer;text-decoration:none}.cookie__floating__buttons__button--accept{color:#4caf50;-ms-flex:1 1 auto}.cookie__floating__buttons__button--accept:hover{background:#409343;color:#fff}.cookie__floating__buttons__button--decline{color:#f44336;-ms-flex:1 1 auto}.cookie__floating__buttons__button--decline:hover{background:#f21f0f;color:#fff}.slideFromBottom-enter,.slideFromBottom-leave-to{transform:translateY(10em)}.slideFromBottom-enter-to,.slideFromBottom-leave{transform:translate(0)}.slideFromBottom-enter-active{transition:transform .2s ease-out}.slideFromBottom-leave-active{transition:transform .2s ease-in}.slideFromTop-enter,.slideFromTop-leave-to{transform:translateY(-10em)}.slideFromTop-enter-to,.slideFromTop-leave{transform:translate(0)}.slideFromTop-enter-active{transition:transform .2s ease-out}.slideFromTop-leave-active{transition:transform .2s ease-in}.fade-enter-active,.fade-leave-active{transition:opacity .5s}.fade-enter,.fade-leave-to{opacity:0}html{width:100%;font-size:18px;color:#333}body{margin:0;height:100%;height:100vh;width:100%;font-family:Noto Sans,sans-serif}#app{height:100%;height:100vh;width:100%;line-height:1.5}.code-text{background:#eee;border:1px solid #ddd;padding:10px 20px;border-radius:4px;margin-bottom:20px;text-align:center}@media (min-width: 992px){.code-text{margin-bottom:0}}.btn{text-transform:uppercase;font-weight:700}.github-corner:hover .octo-arm{animation:octocat-wave .56s ease-in-out}@keyframes octocat-wave{0%,to{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width: 500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave .56s ease-in-out}} 2 | -------------------------------------------------------------------------------- /dist/vue-cookie-accept-decline.min.js: -------------------------------------------------------------------------------- 1 | var VueCookieAcceptDecline=function(e,t){"use strict";function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function n(e){var t=e.charAt(e.length-1),o=parseInt(e,10),n=new Date;switch(t){case"Y":n.setFullYear(n.getFullYear()+o);break;case"M":n.setMonth(n.getMonth()+o);break;case"D":n.setDate(n.getDate()+o);break;case"h":n.setHours(n.getHours()+o);break;case"m":n.setMinutes(n.getMinutes()+o);break;case"s":n.setSeconds(n.getSeconds()+o);break;default:n=new Date(e)}return n}function c(e,t,c,i){void 0===c&&(c=encodeURIComponent),"object"==typeof c&&null!==c&&(i=c,c=encodeURIComponent);var s=function(e){var t="";for(var c in e)if(o(e,c))if(/^expires$/i.test(c)){var i=e[c];"object"!=typeof i&&(i=n(i+="number"==typeof i?"D":"")),t+=";"+c+"="+i.toUTCString()}else/^secure$/.test(c)?e[c]&&(t+=";"+c):t+=";"+c+"="+e[c];return o(e,"path")||(t+=";path=/"),t}(i||{}),a=e+"="+("function"==typeof c?c(t):t)+s;document.cookie=a}var i={name:"vue-cookie-accept-decline",props:{elementId:{type:String,required:!0},debug:{type:Boolean,default:!1},disableDecline:{type:Boolean,default:!1},position:{type:String,default:"bottom-left"},type:{type:String,default:"floating"},transitionName:{type:String,default:"slideFromBottom"},showPostponeButton:{type:Boolean,default:!1},forceCookies:{type:Boolean,default:!1}},data:function(){return{status:null,supportsLocalStorage:!0,isOpen:!1}},computed:{containerPosition:function(){return"cookie--"+this.position},containerType:function(){return"cookie--"+this.type}},mounted:function(){this.checkLocalStorageFunctionality(),this.init()},methods:{init:function(){var e=this.getCookieStatus();!e||"accept"!==e&&"decline"!==e&&"postpone"!==e||(this.isOpen=!1),e||(this.isOpen=!0),this.status=e,this.$emit("status",e)},checkLocalStorageFunctionality:function(){if(this.forceCookies)this.supportsLocalStorage=!1;else try{var e="__vue-cookie-accept-decline-check-localStorage";window.localStorage.setItem(e,e),window.localStorage.removeItem(e)}catch(e){console.error("Local storage is not supported, falling back to cookie use"),this.supportsLocalStorage=!1}},setCookieStatus:function(e){this.supportsLocalStorage?("accept"===e&&localStorage.setItem("vue-cookie-accept-decline-"+this.elementId,"accept"),"decline"===e&&localStorage.setItem("vue-cookie-accept-decline-"+this.elementId,"decline"),"postpone"===e&&localStorage.setItem("vue-cookie-accept-decline-"+this.elementId,"postpone")):("accept"===e&&c("vue-cookie-accept-decline-"+this.elementId,"accept"),"decline"===e&&c("vue-cookie-accept-decline-"+this.elementId,"decline"),"postpone"===e&&c("vue-cookie-accept-decline-"+this.elementId,"postpone"))},getCookieStatus:function(){return this.supportsLocalStorage?localStorage.getItem("vue-cookie-accept-decline-"+this.elementId):function(e,t){if(void 0===t&&(t=decodeURIComponent),"string"!=typeof e||!e)return null;var o=new RegExp("(?:^|; )"+(e.replace(/[.*+?^$|[\](){}\\-]/g,"\\$&")+"(?:=([^;]*))?(?:;|$)")).exec(document.cookie);return null===o?null:"function"==typeof t?t(o[1]):o[1]}("vue-cookie-accept-decline-"+this.elementId)},accept:function(){this.debug||this.setCookieStatus("accept"),this.status="accept",this.isOpen=!1,this.$emit("clicked-accept")},decline:function(){this.debug||this.setCookieStatus("decline"),this.status="decline",this.isOpen=!1,this.$emit("clicked-decline")},postpone:function(){this.debug||this.setCookieStatus("postpone"),this.status="postpone",this.isOpen=!1,this.$emit("clicked-postpone")},removeCookie:function(){localStorage.removeItem("vue-cookie-accept-decline-"+this.elementId),this.status=null,this.$emit("removed-cookie")}}},s=["id"],a=t.createTextVNode("×"),l=t.createTextVNode(" We use cookies to ensure you get the best experience on our website. "),r=t.createElementVNode("a",{href:"https://cookiesandyou.com/",target:"_blank"},"Learn More...",-1),u=t.createTextVNode("Opt Out"),p=t.createTextVNode("Got It!");function d(e){d.installed||(d.installed=!0,e.component("VueCookieAcceptDecline",i))}i.render=function(e,o,n,c,i,d){return t.openBlock(),t.createBlock(t.Transition,{appear:"",name:n.transitionName},{default:t.withCtx((function(){return[i.isOpen?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["cookie",["cookie__"+n.type,"cookie__"+n.type+"--"+n.position]]),id:n.elementId},[t.createElementVNode("div",{class:t.normalizeClass("cookie__"+n.type+"__wrap")},[!0===n.showPostponeButton?(t.openBlock(),t.createElementBlock("div",{key:0,onClick:o[0]||(o[0]=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return d.postpone&&d.postpone.apply(d,e)}),class:t.normalizeClass("cookie__"+n.type+"__postpone-button"),title:"Close"},[t.renderSlot(e.$slots,"postponeContent",{},(function(){return[a]}))],2)):t.createCommentVNode("v-if",!0),t.createElementVNode("div",{class:t.normalizeClass("cookie__"+n.type+"__content")},[t.renderSlot(e.$slots,"message",{},(function(){return[l,r]}))],2),t.createElementVNode("div",{class:t.normalizeClass("cookie__"+n.type+"__buttons")},[!1===n.disableDecline?(t.openBlock(),t.createElementBlock("button",{key:0,onClick:o[1]||(o[1]=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return d.decline&&d.decline.apply(d,e)}),class:t.normalizeClass(["cookie__"+n.type+"__buttons__button","cookie__"+n.type+"__buttons__button--decline"])},[t.renderSlot(e.$slots,"declineContent",{},(function(){return[u]}))],2)):t.createCommentVNode("v-if",!0),t.createElementVNode("button",{onClick:o[2]||(o[2]=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return d.accept&&d.accept.apply(d,e)}),class:t.normalizeClass(["cookie__"+n.type+"__buttons__button","cookie__"+n.type+"__buttons__button--accept"])},[t.renderSlot(e.$slots,"acceptContent",{},(function(){return[p]}))],2)],2)],2)],10,s)):t.createCommentVNode("v-if",!0)]})),_:3},8,["name"])},i.__file="src/vue-cookie-accept-decline.vue";var k={install:d},m=null;return"undefined"!=typeof window?m=window.Vue:"undefined"!=typeof global&&(m=global.Vue),m&&"use"in m&&m.use(k),e.default=i,e.install=d,e}({},Vue); 2 | -------------------------------------------------------------------------------- /example/App.vue: -------------------------------------------------------------------------------- 1 | 126 | 127 | 169 | 170 | 240 | -------------------------------------------------------------------------------- /dist/vue-cookie-accept-decline.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | .cookie__bar { 3 | -ms-overflow-style: none; 4 | position: fixed; 5 | overflow: hidden; 6 | box-sizing: border-box; 7 | z-index: 9999; 8 | width: 100%; 9 | background: #eee; 10 | padding: 20px 20px; 11 | align-items: center; 12 | box-shadow: 0 -4px 4px rgba(198, 198, 198, 0.05); 13 | border-top: 1px solid #ddd; 14 | border-bottom: 1px solid #ddd; 15 | font-size: 1rem; 16 | font-family: -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, “Fira Sans”, “Droid Sans”, “Helvetica Neue”, Arial, sans-serif; 17 | line-height: 1.5; 18 | } 19 | .cookie__bar--bottom { 20 | bottom: 0; 21 | left: 0; 22 | right: 0; 23 | } 24 | .cookie__bar--top { 25 | top: 0; 26 | left: 0; 27 | right: 0; 28 | } 29 | .cookie__bar__wrap { 30 | display: flex; 31 | justify-content: space-between; 32 | flex-direction: column; 33 | align-items: center; 34 | width: 100%; 35 | } 36 | @media (min-width: 768px) { 37 | .cookie__bar__wrap { 38 | flex-direction: row; 39 | } 40 | } 41 | .cookie__bar__postpone-button { 42 | margin-right: auto; 43 | -ms-flex: 1 1 auto; 44 | } 45 | @media (min-width: 768px) { 46 | .cookie__bar__postpone-button { 47 | margin-right: 10px; 48 | } 49 | } 50 | .cookie__bar__postpone-button:hover { 51 | opacity: 0.8; 52 | cursor: pointer; 53 | } 54 | .cookie__bar__content { 55 | margin-right: 0; 56 | margin-bottom: 20px; 57 | font-size: 0.9rem; 58 | max-height: 103px; 59 | overflow: auto; 60 | width: 100%; 61 | -ms-flex: 1 1 auto; 62 | } 63 | @media (min-width: 768px) { 64 | .cookie__bar__content { 65 | margin-right: auto; 66 | margin-bottom: 0; 67 | } 68 | } 69 | .cookie__bar__buttons { 70 | transition: all 0.2s ease; 71 | display: flex; 72 | flex-direction: column; 73 | width: 100%; 74 | } 75 | @media (min-width: 768px) { 76 | .cookie__bar__buttons { 77 | flex-direction: row; 78 | width: auto; 79 | } 80 | } 81 | .cookie__bar__buttons__button { 82 | display: inline-block; 83 | font-weight: 400; 84 | text-align: center; 85 | white-space: nowrap; 86 | vertical-align: middle; 87 | user-select: none; 88 | border: 1px solid transparent; 89 | padding: 0.375rem 0.75rem; 90 | line-height: 1.5; 91 | border-radius: 3px; 92 | font-size: 0.9rem; 93 | } 94 | .cookie__bar__buttons__button:hover { 95 | cursor: pointer; 96 | text-decoration: none; 97 | } 98 | .cookie__bar__buttons__button--accept { 99 | -ms-flex: 1 1 auto; 100 | background: #4caf50; 101 | background: linear-gradient(#5cb860, #4caf50); 102 | color: #fff; 103 | } 104 | .cookie__bar__buttons__button--accept:hover { 105 | background: #409343; 106 | } 107 | .cookie__bar__buttons__button--decline { 108 | -ms-flex: 1 1 auto; 109 | background: #f44336; 110 | background: linear-gradient(#f55a4e, #f44336); 111 | color: #fff; 112 | margin-bottom: 10px; 113 | } 114 | .cookie__bar__buttons__button--decline:hover { 115 | background: #f21f0f; 116 | } 117 | @media (min-width: 768px) { 118 | .cookie__bar__buttons__button--decline { 119 | margin-bottom: 0; 120 | margin-right: 10px; 121 | } 122 | } 123 | .cookie__floating { 124 | -ms-overflow-style: none; 125 | position: fixed; 126 | overflow: hidden; 127 | box-sizing: border-box; 128 | z-index: 9999; 129 | width: 90%; 130 | background: #fafafa; 131 | display: flex; 132 | justify-content: space-between; 133 | flex-direction: column; 134 | box-shadow: 0 4px 8px rgba(198, 198, 198, 0.3); 135 | border: 1px solid #ddd; 136 | font-size: 1rem; 137 | font-family: -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, “Fira Sans”, “Droid Sans”, “Helvetica Neue”, Arial, sans-serif; 138 | line-height: 1.5; 139 | border-radius: 6px; 140 | bottom: 10px; 141 | left: 0; 142 | right: 0; 143 | margin: 0 auto; 144 | } 145 | @media (min-width: 768px) { 146 | .cookie__floating { 147 | max-width: 300px; 148 | } 149 | } 150 | @media (min-width: 768px) { 151 | .cookie__floating--bottom-left { 152 | bottom: 20px; 153 | left: 20px; 154 | right: auto; 155 | margin: 0 0; 156 | } 157 | } 158 | @media (min-width: 768px) { 159 | .cookie__floating--bottom-right { 160 | bottom: 20px; 161 | right: 20px; 162 | left: auto; 163 | margin: 0 0; 164 | } 165 | } 166 | @media (min-width: 768px) { 167 | .cookie__floating--top-right { 168 | top: 20px; 169 | bottom: auto; 170 | right: 20px; 171 | left: auto; 172 | margin: 0 0; 173 | } 174 | } 175 | @media (min-width: 768px) { 176 | .cookie__floating--top-left { 177 | top: 20px; 178 | bottom: auto; 179 | right: auto; 180 | left: 20px; 181 | margin: 0 0; 182 | } 183 | } 184 | .cookie__floating__postpone-button { 185 | display: inline-flex; 186 | padding: 5px 0 0 20px; 187 | margin-bottom: -10px; 188 | margin-right: auto; 189 | } 190 | .cookie__floating__postpone-button:hover { 191 | opacity: 0.8; 192 | cursor: pointer; 193 | } 194 | .cookie__floating__content { 195 | font-size: 0.95rem; 196 | margin-bottom: 5px; 197 | padding: 15px 20px; 198 | max-height: 105px; 199 | overflow: auto; 200 | } 201 | @media (min-width: 768px) { 202 | .cookie__floating__content { 203 | margin-bottom: 10px; 204 | } 205 | } 206 | .cookie__floating__buttons { 207 | transition: all 0.2s ease; 208 | display: flex; 209 | flex-direction: row; 210 | height: auto; 211 | width: 100%; 212 | } 213 | .cookie__floating__buttons__button { 214 | background-color: #eee; 215 | font-weight: bold; 216 | font-size: 0.9rem; 217 | width: 100%; 218 | min-height: 40px; 219 | white-space: nowrap; 220 | user-select: none; 221 | border-bottom: 1px solid #ddd; 222 | border-top: 1px solid #ddd; 223 | border-left: none; 224 | border-right: none; 225 | padding: 0.375rem 0.75rem; 226 | } 227 | .cookie__floating__buttons__button:first-child { 228 | border-right: 1px solid #ddd; 229 | } 230 | .cookie__floating__buttons__button:hover { 231 | cursor: pointer; 232 | text-decoration: none; 233 | } 234 | .cookie__floating__buttons__button--accept { 235 | color: #4caf50; 236 | -ms-flex: 1 1 auto; 237 | } 238 | .cookie__floating__buttons__button--accept:hover { 239 | background: #409343; 240 | color: #fff; 241 | } 242 | .cookie__floating__buttons__button--decline { 243 | color: #f44336; 244 | -ms-flex: 1 1 auto; 245 | } 246 | .cookie__floating__buttons__button--decline:hover { 247 | background: #f21f0f; 248 | color: #fff; 249 | } 250 | 251 | .slideFromBottom-enter, 252 | .slideFromBottom-leave-to { 253 | transform: translate(0px, 10em); 254 | } 255 | 256 | .slideFromBottom-enter-to, 257 | .slideFromBottom-leave { 258 | transform: translate(0px, 0px); 259 | } 260 | 261 | .slideFromBottom-enter-active { 262 | transition: transform 0.2s ease-out; 263 | } 264 | 265 | .slideFromBottom-leave-active { 266 | transition: transform 0.2s ease-in; 267 | } 268 | 269 | .slideFromTop-enter, 270 | .slideFromTop-leave-to { 271 | transform: translate(0px, -10em); 272 | } 273 | 274 | .slideFromTop-enter-to, 275 | .slideFromTop-leave { 276 | transform: translate(0px, 0px); 277 | } 278 | 279 | .slideFromTop-enter-active { 280 | transition: transform 0.2s ease-out; 281 | } 282 | 283 | .slideFromTop-leave-active { 284 | transition: transform 0.2s ease-in; 285 | } 286 | 287 | .fade-enter-active, 288 | .fade-leave-active { 289 | transition: opacity 0.5s; 290 | } 291 | 292 | .fade-enter, 293 | .fade-leave-to { 294 | opacity: 0; 295 | } -------------------------------------------------------------------------------- /dist/vue-cookie-accept-decline.esm.js: -------------------------------------------------------------------------------- 1 | import { set, get } from 'tiny-cookie'; 2 | import { openBlock, createBlock, Transition, withCtx, createElementBlock, normalizeClass, createElementVNode, renderSlot, createCommentVNode, createTextVNode } from 'vue'; 3 | 4 | var script = { 5 | name: 'vue-cookie-accept-decline', 6 | props: { 7 | elementId: { 8 | type: String, 9 | required: true, 10 | }, 11 | 12 | debug: { 13 | type: Boolean, 14 | default: false, 15 | }, 16 | 17 | disableDecline: { 18 | type: Boolean, 19 | default: false, 20 | }, 21 | 22 | // floating: bottom-left, bottom-right, top-left, top-rigt 23 | // bar: bottom, top 24 | position: { 25 | type: String, 26 | default: 'bottom-left', 27 | }, 28 | 29 | // floating, bar 30 | type: { 31 | type: String, 32 | default: 'floating', 33 | }, 34 | 35 | // slideFromBottom, slideFromTop, fade 36 | transitionName: { 37 | type: String, 38 | default: 'slideFromBottom', 39 | }, 40 | 41 | showPostponeButton: { 42 | type: Boolean, 43 | default: false, 44 | }, 45 | 46 | forceCookies: { 47 | type: Boolean, 48 | default: false, 49 | }, 50 | }, 51 | data: function data () { 52 | return { 53 | status: null, 54 | supportsLocalStorage: true, 55 | isOpen: false, 56 | }; 57 | }, 58 | computed: { 59 | containerPosition: function containerPosition () { 60 | return ("cookie--" + (this.position)); 61 | }, 62 | containerType: function containerType () { 63 | return ("cookie--" + (this.type)); 64 | }, 65 | }, 66 | mounted: function mounted () { 67 | this.checkLocalStorageFunctionality(); 68 | this.init(); 69 | }, 70 | methods: { 71 | init: function init () { 72 | var visitedType = this.getCookieStatus(); 73 | 74 | if ( 75 | visitedType && 76 | (visitedType === 'accept' || visitedType === 'decline' || visitedType === 'postpone') 77 | ) { 78 | this.isOpen = false; 79 | } 80 | 81 | if (!visitedType) { 82 | this.isOpen = true; 83 | } 84 | 85 | this.status = visitedType; 86 | this.$emit('status', visitedType); 87 | }, 88 | checkLocalStorageFunctionality: function checkLocalStorageFunctionality () { 89 | if (this.forceCookies) { 90 | this.supportsLocalStorage = false; 91 | return; 92 | } 93 | 94 | // Check for availability of localStorage 95 | try { 96 | var test = '__vue-cookie-accept-decline-check-localStorage'; 97 | window.localStorage.setItem(test, test); 98 | window.localStorage.removeItem(test); 99 | } catch (e) { 100 | console.error('Local storage is not supported, falling back to cookie use'); 101 | this.supportsLocalStorage = false; 102 | } 103 | }, 104 | setCookieStatus: function setCookieStatus (type) { 105 | if (this.supportsLocalStorage) { 106 | if (type === 'accept') { 107 | localStorage.setItem(("vue-cookie-accept-decline-" + (this.elementId)), 'accept'); 108 | } 109 | if (type === 'decline') { 110 | localStorage.setItem(("vue-cookie-accept-decline-" + (this.elementId)), 'decline'); 111 | } 112 | if (type === 'postpone') { 113 | localStorage.setItem(("vue-cookie-accept-decline-" + (this.elementId)), 'postpone'); 114 | } 115 | } else { 116 | if (type === 'accept') { 117 | set(("vue-cookie-accept-decline-" + (this.elementId)), 'accept'); 118 | } 119 | if (type === 'decline') { 120 | set(("vue-cookie-accept-decline-" + (this.elementId)), 'decline'); 121 | } 122 | if (type === 'postpone') { 123 | set(("vue-cookie-accept-decline-" + (this.elementId)), 'postpone'); 124 | } 125 | } 126 | }, 127 | getCookieStatus: function getCookieStatus () { 128 | if (this.supportsLocalStorage) { 129 | return localStorage.getItem(("vue-cookie-accept-decline-" + (this.elementId))); 130 | } else { 131 | return get(("vue-cookie-accept-decline-" + (this.elementId))); 132 | } 133 | }, 134 | accept: function accept () { 135 | if (!this.debug) { 136 | this.setCookieStatus('accept'); 137 | } 138 | 139 | this.status = 'accept'; 140 | this.isOpen = false; 141 | this.$emit('clicked-accept'); 142 | }, 143 | decline: function decline () { 144 | if (!this.debug) { 145 | this.setCookieStatus('decline'); 146 | } 147 | 148 | this.status = 'decline'; 149 | this.isOpen = false; 150 | this.$emit('clicked-decline'); 151 | }, 152 | postpone: function postpone () { 153 | if (!this.debug) { 154 | this.setCookieStatus('postpone'); 155 | } 156 | 157 | this.status = 'postpone'; 158 | this.isOpen = false; 159 | this.$emit('clicked-postpone'); 160 | }, 161 | removeCookie: function removeCookie () { 162 | localStorage.removeItem(("vue-cookie-accept-decline-" + (this.elementId))); 163 | this.status = null; 164 | this.$emit('removed-cookie'); 165 | }, 166 | }, 167 | }; 168 | 169 | var _hoisted_1 = ["id"]; 170 | var _hoisted_2 = /*#__PURE__*/createTextVNode("×"); 171 | var _hoisted_3 = /*#__PURE__*/createTextVNode(" We use cookies to ensure you get the best experience on our website. "); 172 | var _hoisted_4 = /*#__PURE__*/createElementVNode("a", { 173 | href: "https://cookiesandyou.com/", 174 | target: "_blank" 175 | }, "Learn More...", -1 /* HOISTED */); 176 | var _hoisted_5 = /*#__PURE__*/createTextVNode("Opt Out"); 177 | var _hoisted_6 = /*#__PURE__*/createTextVNode("Got It!"); 178 | 179 | function render(_ctx, _cache, $props, $setup, $data, $options) { 180 | return (openBlock(), createBlock(Transition, { 181 | appear: "", 182 | name: $props.transitionName 183 | }, { 184 | default: withCtx(function () { return [ 185 | ($data.isOpen) 186 | ? (openBlock(), createElementBlock("div", { 187 | key: 0, 188 | class: normalizeClass(["cookie", ['cookie__' + $props.type, 'cookie__' + $props.type + '--' + $props.position]]), 189 | id: $props.elementId 190 | }, [ 191 | createElementVNode("div", { 192 | class: normalizeClass('cookie__' + $props.type + '__wrap') 193 | }, [ 194 | ($props.showPostponeButton === true) 195 | ? (openBlock(), createElementBlock("div", { 196 | key: 0, 197 | onClick: _cache[0] || (_cache[0] = function () { 198 | var args = [], len = arguments.length; 199 | while ( len-- ) args[ len ] = arguments[ len ]; 200 | 201 | return ($options.postpone && $options.postpone.apply($options, args)); 202 | }), 203 | class: normalizeClass('cookie__' + $props.type + '__postpone-button'), 204 | title: "Close" 205 | }, [ 206 | renderSlot(_ctx.$slots, "postponeContent", {}, function () { return [ 207 | _hoisted_2 208 | ]; }) 209 | ], 2 /* CLASS */)) 210 | : createCommentVNode("v-if", true), 211 | createElementVNode("div", { 212 | class: normalizeClass('cookie__' + $props.type + '__content') 213 | }, [ 214 | renderSlot(_ctx.$slots, "message", {}, function () { return [ 215 | _hoisted_3, 216 | _hoisted_4 217 | ]; }) 218 | ], 2 /* CLASS */), 219 | createElementVNode("div", { 220 | class: normalizeClass('cookie__' + $props.type + '__buttons') 221 | }, [ 222 | ($props.disableDecline === false) 223 | ? (openBlock(), createElementBlock("button", { 224 | key: 0, 225 | onClick: _cache[1] || (_cache[1] = function () { 226 | var args = [], len = arguments.length; 227 | while ( len-- ) args[ len ] = arguments[ len ]; 228 | 229 | return ($options.decline && $options.decline.apply($options, args)); 230 | }), 231 | class: normalizeClass([ 232 | 'cookie__' + $props.type + '__buttons__button', 233 | 'cookie__' + $props.type + '__buttons__button--decline' ]) 234 | }, [ 235 | renderSlot(_ctx.$slots, "declineContent", {}, function () { return [ 236 | _hoisted_5 237 | ]; }) 238 | ], 2 /* CLASS */)) 239 | : createCommentVNode("v-if", true), 240 | createElementVNode("button", { 241 | onClick: _cache[2] || (_cache[2] = function () { 242 | var args = [], len = arguments.length; 243 | while ( len-- ) args[ len ] = arguments[ len ]; 244 | 245 | return ($options.accept && $options.accept.apply($options, args)); 246 | }), 247 | class: normalizeClass([ 248 | 'cookie__' + $props.type + '__buttons__button', 249 | 'cookie__' + $props.type + '__buttons__button--accept' ]) 250 | }, [ 251 | renderSlot(_ctx.$slots, "acceptContent", {}, function () { return [ 252 | _hoisted_6 253 | ]; }) 254 | ], 2 /* CLASS */) 255 | ], 2 /* CLASS */) 256 | ], 2 /* CLASS */) 257 | ], 10 /* CLASS, PROPS */, _hoisted_1)) 258 | : createCommentVNode("v-if", true) 259 | ]; }), 260 | _: 3 /* FORWARDED */ 261 | }, 8 /* PROPS */, ["name"])) 262 | } 263 | 264 | script.render = render; 265 | script.__file = "src/vue-cookie-accept-decline.vue"; 266 | 267 | // Import vue component 268 | 269 | function install(app) { 270 | if (install.installed) { return; } 271 | 272 | install.installed = true; 273 | app.component('VueCookieAcceptDecline', script); 274 | } 275 | 276 | var plugin = { install: install }; 277 | 278 | // To auto-install when Vue is found 279 | var GlobalVue = null; 280 | if (typeof window !== 'undefined') { 281 | GlobalVue = window.Vue; 282 | } else if (typeof global !== 'undefined') { 283 | GlobalVue = global.Vue; 284 | } 285 | if (GlobalVue && 'use' in GlobalVue) { 286 | GlobalVue.use(plugin); 287 | } 288 | 289 | // It's possible to expose named exports when writing components that can 290 | // also be used as directives, etc. - eg. import { RollupDemoDirective } from 'rollup-demo'; 291 | // export const RollupDemoDirective = component; 292 | 293 | export default script; 294 | export { install }; 295 | -------------------------------------------------------------------------------- /dist/vue-cookie-accept-decline.umd.js: -------------------------------------------------------------------------------- 1 | (function (global, factory) { 2 | typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('tiny-cookie'), require('vue')) : 3 | typeof define === 'function' && define.amd ? define(['exports', 'tiny-cookie', 'vue'], factory) : 4 | (global = global || self, factory(global.VueCookieAcceptDecline = {}, global.tinyCookie, global.Vue)); 5 | }(this, (function (exports, tinyCookie, vue) { 'use strict'; 6 | 7 | var script = { 8 | name: 'vue-cookie-accept-decline', 9 | props: { 10 | elementId: { 11 | type: String, 12 | required: true, 13 | }, 14 | 15 | debug: { 16 | type: Boolean, 17 | default: false, 18 | }, 19 | 20 | disableDecline: { 21 | type: Boolean, 22 | default: false, 23 | }, 24 | 25 | // floating: bottom-left, bottom-right, top-left, top-rigt 26 | // bar: bottom, top 27 | position: { 28 | type: String, 29 | default: 'bottom-left', 30 | }, 31 | 32 | // floating, bar 33 | type: { 34 | type: String, 35 | default: 'floating', 36 | }, 37 | 38 | // slideFromBottom, slideFromTop, fade 39 | transitionName: { 40 | type: String, 41 | default: 'slideFromBottom', 42 | }, 43 | 44 | showPostponeButton: { 45 | type: Boolean, 46 | default: false, 47 | }, 48 | 49 | forceCookies: { 50 | type: Boolean, 51 | default: false, 52 | }, 53 | }, 54 | data: function data () { 55 | return { 56 | status: null, 57 | supportsLocalStorage: true, 58 | isOpen: false, 59 | }; 60 | }, 61 | computed: { 62 | containerPosition: function containerPosition () { 63 | return ("cookie--" + (this.position)); 64 | }, 65 | containerType: function containerType () { 66 | return ("cookie--" + (this.type)); 67 | }, 68 | }, 69 | mounted: function mounted () { 70 | this.checkLocalStorageFunctionality(); 71 | this.init(); 72 | }, 73 | methods: { 74 | init: function init () { 75 | var visitedType = this.getCookieStatus(); 76 | 77 | if ( 78 | visitedType && 79 | (visitedType === 'accept' || visitedType === 'decline' || visitedType === 'postpone') 80 | ) { 81 | this.isOpen = false; 82 | } 83 | 84 | if (!visitedType) { 85 | this.isOpen = true; 86 | } 87 | 88 | this.status = visitedType; 89 | this.$emit('status', visitedType); 90 | }, 91 | checkLocalStorageFunctionality: function checkLocalStorageFunctionality () { 92 | if (this.forceCookies) { 93 | this.supportsLocalStorage = false; 94 | return; 95 | } 96 | 97 | // Check for availability of localStorage 98 | try { 99 | var test = '__vue-cookie-accept-decline-check-localStorage'; 100 | window.localStorage.setItem(test, test); 101 | window.localStorage.removeItem(test); 102 | } catch (e) { 103 | console.error('Local storage is not supported, falling back to cookie use'); 104 | this.supportsLocalStorage = false; 105 | } 106 | }, 107 | setCookieStatus: function setCookieStatus (type) { 108 | if (this.supportsLocalStorage) { 109 | if (type === 'accept') { 110 | localStorage.setItem(("vue-cookie-accept-decline-" + (this.elementId)), 'accept'); 111 | } 112 | if (type === 'decline') { 113 | localStorage.setItem(("vue-cookie-accept-decline-" + (this.elementId)), 'decline'); 114 | } 115 | if (type === 'postpone') { 116 | localStorage.setItem(("vue-cookie-accept-decline-" + (this.elementId)), 'postpone'); 117 | } 118 | } else { 119 | if (type === 'accept') { 120 | tinyCookie.set(("vue-cookie-accept-decline-" + (this.elementId)), 'accept'); 121 | } 122 | if (type === 'decline') { 123 | tinyCookie.set(("vue-cookie-accept-decline-" + (this.elementId)), 'decline'); 124 | } 125 | if (type === 'postpone') { 126 | tinyCookie.set(("vue-cookie-accept-decline-" + (this.elementId)), 'postpone'); 127 | } 128 | } 129 | }, 130 | getCookieStatus: function getCookieStatus () { 131 | if (this.supportsLocalStorage) { 132 | return localStorage.getItem(("vue-cookie-accept-decline-" + (this.elementId))); 133 | } else { 134 | return tinyCookie.get(("vue-cookie-accept-decline-" + (this.elementId))); 135 | } 136 | }, 137 | accept: function accept () { 138 | if (!this.debug) { 139 | this.setCookieStatus('accept'); 140 | } 141 | 142 | this.status = 'accept'; 143 | this.isOpen = false; 144 | this.$emit('clicked-accept'); 145 | }, 146 | decline: function decline () { 147 | if (!this.debug) { 148 | this.setCookieStatus('decline'); 149 | } 150 | 151 | this.status = 'decline'; 152 | this.isOpen = false; 153 | this.$emit('clicked-decline'); 154 | }, 155 | postpone: function postpone () { 156 | if (!this.debug) { 157 | this.setCookieStatus('postpone'); 158 | } 159 | 160 | this.status = 'postpone'; 161 | this.isOpen = false; 162 | this.$emit('clicked-postpone'); 163 | }, 164 | removeCookie: function removeCookie () { 165 | localStorage.removeItem(("vue-cookie-accept-decline-" + (this.elementId))); 166 | this.status = null; 167 | this.$emit('removed-cookie'); 168 | }, 169 | }, 170 | }; 171 | 172 | var _hoisted_1 = ["id"]; 173 | var _hoisted_2 = /*#__PURE__*/vue.createTextVNode("×"); 174 | var _hoisted_3 = /*#__PURE__*/vue.createTextVNode(" We use cookies to ensure you get the best experience on our website. "); 175 | var _hoisted_4 = /*#__PURE__*/vue.createElementVNode("a", { 176 | href: "https://cookiesandyou.com/", 177 | target: "_blank" 178 | }, "Learn More...", -1 /* HOISTED */); 179 | var _hoisted_5 = /*#__PURE__*/vue.createTextVNode("Opt Out"); 180 | var _hoisted_6 = /*#__PURE__*/vue.createTextVNode("Got It!"); 181 | 182 | function render(_ctx, _cache, $props, $setup, $data, $options) { 183 | return (vue.openBlock(), vue.createBlock(vue.Transition, { 184 | appear: "", 185 | name: $props.transitionName 186 | }, { 187 | default: vue.withCtx(function () { return [ 188 | ($data.isOpen) 189 | ? (vue.openBlock(), vue.createElementBlock("div", { 190 | key: 0, 191 | class: vue.normalizeClass(["cookie", ['cookie__' + $props.type, 'cookie__' + $props.type + '--' + $props.position]]), 192 | id: $props.elementId 193 | }, [ 194 | vue.createElementVNode("div", { 195 | class: vue.normalizeClass('cookie__' + $props.type + '__wrap') 196 | }, [ 197 | ($props.showPostponeButton === true) 198 | ? (vue.openBlock(), vue.createElementBlock("div", { 199 | key: 0, 200 | onClick: _cache[0] || (_cache[0] = function () { 201 | var args = [], len = arguments.length; 202 | while ( len-- ) args[ len ] = arguments[ len ]; 203 | 204 | return ($options.postpone && $options.postpone.apply($options, args)); 205 | }), 206 | class: vue.normalizeClass('cookie__' + $props.type + '__postpone-button'), 207 | title: "Close" 208 | }, [ 209 | vue.renderSlot(_ctx.$slots, "postponeContent", {}, function () { return [ 210 | _hoisted_2 211 | ]; }) 212 | ], 2 /* CLASS */)) 213 | : vue.createCommentVNode("v-if", true), 214 | vue.createElementVNode("div", { 215 | class: vue.normalizeClass('cookie__' + $props.type + '__content') 216 | }, [ 217 | vue.renderSlot(_ctx.$slots, "message", {}, function () { return [ 218 | _hoisted_3, 219 | _hoisted_4 220 | ]; }) 221 | ], 2 /* CLASS */), 222 | vue.createElementVNode("div", { 223 | class: vue.normalizeClass('cookie__' + $props.type + '__buttons') 224 | }, [ 225 | ($props.disableDecline === false) 226 | ? (vue.openBlock(), vue.createElementBlock("button", { 227 | key: 0, 228 | onClick: _cache[1] || (_cache[1] = function () { 229 | var args = [], len = arguments.length; 230 | while ( len-- ) args[ len ] = arguments[ len ]; 231 | 232 | return ($options.decline && $options.decline.apply($options, args)); 233 | }), 234 | class: vue.normalizeClass([ 235 | 'cookie__' + $props.type + '__buttons__button', 236 | 'cookie__' + $props.type + '__buttons__button--decline' ]) 237 | }, [ 238 | vue.renderSlot(_ctx.$slots, "declineContent", {}, function () { return [ 239 | _hoisted_5 240 | ]; }) 241 | ], 2 /* CLASS */)) 242 | : vue.createCommentVNode("v-if", true), 243 | vue.createElementVNode("button", { 244 | onClick: _cache[2] || (_cache[2] = function () { 245 | var args = [], len = arguments.length; 246 | while ( len-- ) args[ len ] = arguments[ len ]; 247 | 248 | return ($options.accept && $options.accept.apply($options, args)); 249 | }), 250 | class: vue.normalizeClass([ 251 | 'cookie__' + $props.type + '__buttons__button', 252 | 'cookie__' + $props.type + '__buttons__button--accept' ]) 253 | }, [ 254 | vue.renderSlot(_ctx.$slots, "acceptContent", {}, function () { return [ 255 | _hoisted_6 256 | ]; }) 257 | ], 2 /* CLASS */) 258 | ], 2 /* CLASS */) 259 | ], 2 /* CLASS */) 260 | ], 10 /* CLASS, PROPS */, _hoisted_1)) 261 | : vue.createCommentVNode("v-if", true) 262 | ]; }), 263 | _: 3 /* FORWARDED */ 264 | }, 8 /* PROPS */, ["name"])) 265 | } 266 | 267 | script.render = render; 268 | script.__file = "src/vue-cookie-accept-decline.vue"; 269 | 270 | // Import vue component 271 | 272 | function install(app) { 273 | if (install.installed) { return; } 274 | 275 | install.installed = true; 276 | app.component('VueCookieAcceptDecline', script); 277 | } 278 | 279 | var plugin = { install: install }; 280 | 281 | // To auto-install when Vue is found 282 | var GlobalVue = null; 283 | if (typeof window !== 'undefined') { 284 | GlobalVue = window.Vue; 285 | } else if (typeof global !== 'undefined') { 286 | GlobalVue = global.Vue; 287 | } 288 | if (GlobalVue && 'use' in GlobalVue) { 289 | GlobalVue.use(plugin); 290 | } 291 | 292 | // It's possible to expose named exports when writing components that can 293 | // also be used as directives, etc. - eg. import { RollupDemoDirective } from 'rollup-demo'; 294 | // export const RollupDemoDirective = component; 295 | 296 | exports.default = script; 297 | exports.install = install; 298 | 299 | Object.defineProperty(exports, '__esModule', { value: true }); 300 | 301 | }))); 302 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-cookie-accept-decline 2 | 3 | Show a banner with text, a decline button, and an accept button on your page. Remembers selection using cookies. Emits an event with current selection on creation. Good for GDPR requirements or telling your users something that they can act on and then not see again. 4 | 5 |

6 | NPM Version 7 | NPM Downloads 8 | License 9 | 10 | Tweet 11 |

12 | 13 | ## Vue 3 Support 14 | 15 | Vue 3 is supported from `v6.0.0` and beyond (current `master`). To use `vue-cookie-accept-decline` with Vue 2, use `v5.4.0`. 16 | 17 | ## Links 18 | 19 | - [Demo](https://johndatserakis.github.io/vue-cookie-accept-decline) 20 | - [GitHub](https://github.com/johndatserakis/vue-cookie-accept-decline) 21 | - [npm](https://www.npmjs.com/package/vue-cookie-accept-decline) 22 | 23 | ## Install 24 | 25 | ``` 26 | yarn add vue-cookie-accept-decline 27 | ``` 28 | 29 | Or you can include it through the browser at the bottom of your page along with the css: 30 | 31 | ```html 32 | 33 | 34 | 39 | ``` 40 | 41 | ## About 42 | 43 | We needed a component to show a privacy banners on pages - came across the awesome [vue-cookie-law](https://github.com/apertureless/vue-cookie-law) by [apertureless](https://github.com/apertureless) and it was almost what was needed, except we needed to track the option of an opt-out/decline which seemed a bit out of scope for that project - so `vue-cookie-accept-decline` is the result. 44 | 45 | The big difference here is that `vue-cookie-accept-decline` allows the user to decline the text on the banner - this is important because you may want to _not_ uses cookies in your app if they have declined the oppurtunity to be tracked. 46 | 47 | When the decline or accept buttons are clicked, they will emit the events `clicked-accept` and `clicked-declined` respectively. Also, on creation, the component will emit a `status` event with a value of the current setting, `null` for nothing set, `accept` for an accepted banner, and `decline` for a declined banner. You can listen to this event on the component and do something like disable cookies if you see they have declined the banner. The component also has an optional `postpone` close button that will let the users dismiss the message without selecting an option. 48 | 49 | Each instance of the component requires the prop of `elementId` - this is to allow for the use of multiple instances of `vue-cookie-accept-decline` on the same page. To delete the cookie for a specific instance, set the `ref` property on your instance and call the exposed `removeCookie` method like this: `this.$refs.myPanel1.removeCookie()`. You can then call `this.$refs.myPanel1.init()` to show the user the panel again. See the demo page for a detailed example. 50 | 51 | ## Usage Example 52 | 53 | ```js 54 | import { createApp } from 'vue'; 55 | import VueCookieAcceptDecline from 'vue-cookie-accept-decline'; 56 | import 'vue-cookie-accept-decline/dist/vue-cookie-accept-decline.css'; 57 | 58 | const app = createApp(App); 59 | 60 | app.component('vue-cookie-accept-decline', VueCookieAcceptDecline); 61 | ``` 62 | 63 | ```vue 64 | 79 | 80 | 81 | 82 | 83 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | ``` 95 | 96 | ## Props 97 | 98 | | prop | type | required | default | possible values | description | 99 | | ------------------ | ------- | -------- | --------------- | ------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- | 100 | | ref | String | no | none | Any String | Unique string that gives you control over the component | 101 | | elementId | string | yes | none | Any String | The unique id for the instance. This string will be appened to the string 'vue-cookie-accept-decline-' to allow for multiple components. | 102 | | debug | boolean | no | false | true, false | If true, the cookie is never saved, only the events will be emitted | 103 | | position | string | no | bottom | For floating: bottom-left, bottom-right, top-left, top-right -- For bar: bottom, top | Position of the banner | 104 | | type | string | no | floating | floating, bar | Type of banner | 105 | | disableDecline | boolean | no | false | true, false | If true, the 'opt out' button is not shown | 106 | | transitionName | string | no | slideFromBottom | slideFromBottom, slideFromTop, fade | Banner animation type | 107 | | showPostponeButton | boolean | no | false | true, false | Optionally show a close button that allows the user to postpone selecting an option. | 108 | | forceCookies | boolean | no | false | true, false | Optionally force cookies storage | 109 | 110 | ## Events 111 | 112 | | event | value | description | 113 | | ---------------- | ------------------------------------- | ----------------------------------------------------------------------------------------- | 114 | | status | 'accept', 'decline', 'postpone', null | Event will be emitted when component is created. | 115 | | clicked-accept | none | Event will be emitted when accept is clicked on the banner. | 116 | | clicked-decline | none | Event will be emitted when declined is clicked on the banner. | 117 | | clicked-postpone | none | Event will be emitted when postponed is clicked on the banner. | 118 | | removed-cookie | none | Event will be emitted when the cookie has been removed using the `removeCookie()` method. | 119 | 120 | ## Slots 121 | 122 | There are slots for your own custom `message`, `declineContent`, `acceptContent`, this is good for providing your own link or whatever HTML content you want in your message/buttons - like icons. 123 | 124 | | name | default value | 125 | | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | 126 | | message | We use cookies to ensure you get the best experience on our website. Learn More... | 127 | | declineContent | Opt Out | 128 | | acceptContent | Got It! | 129 | | postponeContent | `×` | 130 | 131 | ## Methods 132 | 133 | Note - call these methods through the `ref` you set up with your component. Example: `this.$refs.myPanel1.removeCookie()`. 134 | 135 | | method | parameters | description | 136 | | ------------ | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | 137 | | removeCookie | none | Used to delete the unique cookie for the instance you are acting on. | 138 | | init | none | Evaluates the cookie status and shows the panel if proper conditions are met. Useful for re-showing the panel after someone uses the `removeCookie` method. | 139 | 140 | ## SASS Structure 141 | 142 | ```sass 143 | .cookie { 144 | // Bar style 145 | &__bar { 146 | &--bottom { 147 | } 148 | 149 | &--top { 150 | } 151 | 152 | &__postpone-button { 153 | } 154 | 155 | &__content { 156 | } 157 | 158 | &__buttons { 159 | 160 | &__button { 161 | &--accept { 162 | } 163 | 164 | &--decline { 165 | } 166 | } 167 | } 168 | } 169 | 170 | // Floating style 171 | &__floating { 172 | &--bottom-left { 173 | } 174 | 175 | &--bottom-right { 176 | } 177 | 178 | &--top-right { 179 | } 180 | 181 | &--top-left { 182 | } 183 | 184 | &__postpone-button { 185 | } 186 | 187 | &__content { 188 | } 189 | 190 | &__buttons { 191 | 192 | &__button { 193 | &--accept { 194 | } 195 | 196 | &--decline { 197 | } 198 | } 199 | } 200 | } 201 | } 202 | ``` 203 | 204 | ## Development 205 | 206 | ```bash 207 | # Install dependencies 208 | yarn 209 | 210 | # Serve with hot reload 211 | yarn dev 212 | 213 | # Run the tests 214 | yarn test 215 | 216 | # Build demo page 217 | yarn build:example 218 | 219 | # Build library 220 | yarn build:library 221 | 222 | # Build everything and run tests 223 | yarn build 224 | ``` 225 | 226 | ## Thank You 227 | 228 | Thank you [apertureless](https://github.com/apertureless) for [vue-cookie-law](https://github.com/apertureless/vue-cookie-law). Go check out `vue-cookie-law` and his other projects. Also, thank you [insites](https://github.com/insites) for [cookieconsent](https://github.com/insites/cookieconsent). 229 | 230 | ## Other 231 | 232 | Go ahead and fork the project! Submit an issue if needed. Have fun! 233 | 234 | ## License 235 | 236 | [MIT](http://opensource.org/licenses/MIT) 237 | -------------------------------------------------------------------------------- /src/vue-cookie-accept-decline.vue: -------------------------------------------------------------------------------- 1 | 54 | 55 | 223 | 224 | 558 | -------------------------------------------------------------------------------- /docs/assets/index.d553c29d.js: -------------------------------------------------------------------------------- 1 | const Zo=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const r of i.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerpolicy&&(i.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?i.credentials="include":o.crossorigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}};Zo();function Ln(e,t){const n=Object.create(null),s=e.split(",");for(let o=0;o!!n[o.toLowerCase()]:o=>!!n[o]}const Xo="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Qo=Ln(Xo);function Us(e){return!!e||e===""}function Rn(e){if(O(e)){const t={};for(let n=0;n{if(n){const s=n.split(ei);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Te(e){let t="";if(ee(e))t=e;else if(O(e))for(let n=0;nee(e)?e:e==null?"":O(e)||Z(e)&&(e.toString===zs||!M(e.toString))?JSON.stringify(e,Ks,2):String(e),Ks=(e,t)=>t&&t.__v_isRef?Ks(e,t.value):at(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o])=>(n[`${s} =>`]=o,n),{})}:Ws(t)?{[`Set(${t.size})`]:[...t.values()]}:Z(t)&&!O(t)&&!qs(t)?String(t):t,j={},ut=[],ve=()=>{},si=()=>!1,oi=/^on[^a-z]/,Jt=e=>oi.test(e),Bn=e=>e.startsWith("onUpdate:"),G=Object.assign,$n=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},ii=Object.prototype.hasOwnProperty,N=(e,t)=>ii.call(e,t),O=Array.isArray,at=e=>Zt(e)==="[object Map]",Ws=e=>Zt(e)==="[object Set]",M=e=>typeof e=="function",ee=e=>typeof e=="string",Dn=e=>typeof e=="symbol",Z=e=>e!==null&&typeof e=="object",Vs=e=>Z(e)&&M(e.then)&&M(e.catch),zs=Object.prototype.toString,Zt=e=>zs.call(e),ri=e=>Zt(e).slice(8,-1),qs=e=>Zt(e)==="[object Object]",jn=e=>ee(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Rt=Ln(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Xt=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},li=/-(\w)/g,ke=Xt(e=>e.replace(li,(t,n)=>n?n.toUpperCase():"")),ci=/\B([A-Z])/g,ht=Xt(e=>e.replace(ci,"-$1").toLowerCase()),Qt=Xt(e=>e.charAt(0).toUpperCase()+e.slice(1)),fn=Xt(e=>e?`on${Qt(e)}`:""),jt=(e,t)=>!Object.is(e,t),un=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Ys=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let fs;const fi=()=>fs||(fs=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let Ee;class ui{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&Ee&&(this.parent=Ee,this.index=(Ee.scopes||(Ee.scopes=[])).push(this)-1)}run(t){if(this.active){const n=Ee;try{return Ee=this,t()}finally{Ee=n}}}on(){Ee=this}off(){Ee=this.parent}stop(t){if(this.active){let n,s;for(n=0,s=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},Js=e=>(e.w&Ke)>0,Zs=e=>(e.n&Ke)>0,di=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let s=0;s{(a==="length"||a>=s)&&c.push(u)});else switch(n!==void 0&&c.push(r.get(n)),t){case"add":O(e)?jn(n)&&c.push(r.get("length")):(c.push(r.get(Xe)),at(e)&&c.push(r.get(yn)));break;case"delete":O(e)||(c.push(r.get(Xe)),at(e)&&c.push(r.get(yn)));break;case"set":at(e)&&c.push(r.get(Xe));break}if(c.length===1)c[0]&&xn(c[0]);else{const u=[];for(const a of c)a&&u.push(...a);xn(Hn(u))}}function xn(e,t){for(const n of O(e)?e:[...e])(n!==Ce||n.allowRecurse)&&(n.scheduler?n.scheduler():n.run())}const hi=Ln("__proto__,__v_isRef,__isVue"),Gs=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(Dn)),gi=Kn(),mi=Kn(!1,!0),_i=Kn(!0),as=bi();function bi(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const s=$(this);for(let i=0,r=this.length;i{e[t]=function(...n){gt();const s=$(this)[t].apply(this,n);return mt(),s}}),e}function Kn(e=!1,t=!1){return function(s,o,i){if(o==="__v_isReactive")return!e;if(o==="__v_isReadonly")return e;if(o==="__v_isShallow")return t;if(o==="__v_raw"&&i===(e?t?Ni:oo:t?so:no).get(s))return s;const r=O(s);if(!e&&r&&N(as,o))return Reflect.get(as,o,i);const c=Reflect.get(s,o,i);return(Dn(o)?Gs.has(o):hi(o))||(e||pe(s,"get",o),t)?c:ne(c)?!r||!jn(o)?c.value:c:Z(c)?e?io(c):zn(c):c}}const Ci=eo(),vi=eo(!0);function eo(e=!1){return function(n,s,o,i){let r=n[s];if(It(r)&&ne(r)&&!ne(o))return!1;if(!e&&!It(o)&&(ro(o)||(o=$(o),r=$(r)),!O(n)&&ne(r)&&!ne(o)))return r.value=o,!0;const c=O(n)&&jn(s)?Number(s)e,Gt=e=>Reflect.getPrototypeOf(e);function Pt(e,t,n=!1,s=!1){e=e.__v_raw;const o=$(e),i=$(t);t!==i&&!n&&pe(o,"get",t),!n&&pe(o,"get",i);const{has:r}=Gt(o),c=s?Wn:n?Jn:Yn;if(r.call(o,t))return c(e.get(t));if(r.call(o,i))return c(e.get(i));e!==o&&e.get(t)}function Mt(e,t=!1){const n=this.__v_raw,s=$(n),o=$(e);return e!==o&&!t&&pe(s,"has",e),!t&&pe(s,"has",o),e===o?n.has(e):n.has(e)||n.has(o)}function Ft(e,t=!1){return e=e.__v_raw,!t&&pe($(e),"iterate",Xe),Reflect.get(e,"size",e)}function ds(e){e=$(e);const t=$(this);return Gt(t).has.call(t,e)||(t.add(e),Se(t,"add",e,e)),this}function ps(e,t){t=$(t);const n=$(this),{has:s,get:o}=Gt(n);let i=s.call(n,e);i||(e=$(e),i=s.call(n,e));const r=o.call(n,e);return n.set(e,t),i?jt(t,r)&&Se(n,"set",e,t):Se(n,"add",e,t),this}function hs(e){const t=$(this),{has:n,get:s}=Gt(t);let o=n.call(t,e);o||(e=$(e),o=n.call(t,e)),s&&s.call(t,e);const i=t.delete(e);return o&&Se(t,"delete",e,void 0),i}function gs(){const e=$(this),t=e.size!==0,n=e.clear();return t&&Se(e,"clear",void 0,void 0),n}function St(e,t){return function(s,o){const i=this,r=i.__v_raw,c=$(r),u=t?Wn:e?Jn:Yn;return!e&&pe(c,"iterate",Xe),r.forEach((a,p)=>s.call(o,u(a),u(p),i))}}function Nt(e,t,n){return function(...s){const o=this.__v_raw,i=$(o),r=at(i),c=e==="entries"||e===Symbol.iterator&&r,u=e==="keys"&&r,a=o[e](...s),p=n?Wn:t?Jn:Yn;return!t&&pe(i,"iterate",u?yn:Xe),{next(){const{value:b,done:v}=a.next();return v?{value:b,done:v}:{value:c?[p(b[0]),p(b[1])]:p(b),done:v}},[Symbol.iterator](){return this}}}}function Re(e){return function(...t){return e==="delete"?!1:this}}function Ii(){const e={get(i){return Pt(this,i)},get size(){return Ft(this)},has:Mt,add:ds,set:ps,delete:hs,clear:gs,forEach:St(!1,!1)},t={get(i){return Pt(this,i,!1,!0)},get size(){return Ft(this)},has:Mt,add:ds,set:ps,delete:hs,clear:gs,forEach:St(!1,!0)},n={get(i){return Pt(this,i,!0)},get size(){return Ft(this,!0)},has(i){return Mt.call(this,i,!0)},add:Re("add"),set:Re("set"),delete:Re("delete"),clear:Re("clear"),forEach:St(!0,!1)},s={get(i){return Pt(this,i,!0,!0)},get size(){return Ft(this,!0)},has(i){return Mt.call(this,i,!0)},add:Re("add"),set:Re("set"),delete:Re("delete"),clear:Re("clear"),forEach:St(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=Nt(i,!1,!1),n[i]=Nt(i,!0,!1),t[i]=Nt(i,!1,!0),s[i]=Nt(i,!0,!0)}),[e,n,t,s]}const[ki,Ai,Oi,Pi]=Ii();function Vn(e,t){const n=t?e?Pi:Oi:e?Ai:ki;return(s,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(N(n,o)&&o in s?n:s,o,i)}const Mi={get:Vn(!1,!1)},Fi={get:Vn(!1,!0)},Si={get:Vn(!0,!1)},no=new WeakMap,so=new WeakMap,oo=new WeakMap,Ni=new WeakMap;function Li(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ri(e){return e.__v_skip||!Object.isExtensible(e)?0:Li(ri(e))}function zn(e){return It(e)?e:qn(e,!1,to,Mi,no)}function Bi(e){return qn(e,!1,Ti,Fi,so)}function io(e){return qn(e,!0,Ei,Si,oo)}function qn(e,t,n,s,o){if(!Z(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=o.get(e);if(i)return i;const r=Ri(e);if(r===0)return e;const c=new Proxy(e,r===2?s:n);return o.set(e,c),c}function dt(e){return It(e)?dt(e.__v_raw):!!(e&&e.__v_isReactive)}function It(e){return!!(e&&e.__v_isReadonly)}function ro(e){return!!(e&&e.__v_isShallow)}function lo(e){return dt(e)||It(e)}function $(e){const t=e&&e.__v_raw;return t?$(t):e}function co(e){return Ht(e,"__v_skip",!0),e}const Yn=e=>Z(e)?zn(e):e,Jn=e=>Z(e)?io(e):e;function $i(e){He&&Ce&&(e=$(e),Qs(e.dep||(e.dep=Hn())))}function Di(e,t){e=$(e),e.dep&&xn(e.dep)}function ne(e){return!!(e&&e.__v_isRef===!0)}function ji(e){return ne(e)?e.value:e}const Hi={get:(e,t,n)=>ji(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return ne(o)&&!ne(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function fo(e){return dt(e)?e:new Proxy(e,Hi)}class Ui{constructor(t,n,s,o){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new Un(t,()=>{this._dirty||(this._dirty=!0,Di(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=s}get value(){const t=$(this);return $i(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function Ki(e,t,n=!1){let s,o;const i=M(e);return i?(s=e,o=ve):(s=e.get,o=e.set),new Ui(s,o,i||!o,n)}function Ue(e,t,n,s){let o;try{o=s?e(...s):e()}catch(i){en(i,t,n)}return o}function me(e,t,n,s){if(M(e)){const i=Ue(e,t,n,s);return i&&Vs(i)&&i.catch(r=>{en(r,t,n)}),i}const o=[];for(let i=0;i>>1;kt(de[s])Fe&&de.splice(t,1)}function ho(e,t,n,s){O(e)?n.push(...e):(!t||!t.includes(e,e.allowRecurse?s+1:s))&&n.push(e),po()}function Yi(e){ho(e,yt,xt,rt)}function Ji(e){ho(e,De,wt,lt)}function Xn(e,t=null){if(xt.length){for(En=t,yt=[...new Set(xt)],xt.length=0,rt=0;rtkt(n)-kt(s)),lt=0;lte.id==null?1/0:e.id;function mo(e){wn=!1,Ut=!0,Xn(e),de.sort((n,s)=>kt(n)-kt(s));const t=ve;try{for(Fe=0;Fek.trim()):b&&(o=n.map(Ys))}let c,u=s[c=fn(t)]||s[c=fn(ke(t))];!u&&i&&(u=s[c=fn(ht(t))]),u&&me(u,e,6,o);const a=s[c+"Once"];if(a){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,me(a,e,6,o)}}function _o(e,t,n=!1){const s=t.emitsCache,o=s.get(e);if(o!==void 0)return o;const i=e.emits;let r={},c=!1;if(!M(e)){const u=a=>{const p=_o(a,t,!0);p&&(c=!0,G(r,p))};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!i&&!c?(s.set(e,null),null):(O(i)?i.forEach(u=>r[u]=null):G(r,i),s.set(e,r),r)}function tn(e,t){return!e||!Jt(t)?!1:(t=t.slice(2).replace(/Once$/,""),N(e,t[0].toLowerCase()+t.slice(1))||N(e,ht(t))||N(e,t))}let ce=null,bo=null;function Kt(e){const t=ce;return ce=e,bo=e&&e.type.__scopeId||null,t}function ct(e,t=ce,n){if(!t||e._n)return e;const s=(...o)=>{s._d&&Is(-1);const i=Kt(t),r=e(...o);return Kt(i),s._d&&Is(1),r};return s._n=!0,s._c=!0,s._d=!0,s}function an(e){const{type:t,vnode:n,proxy:s,withProxy:o,props:i,propsOptions:[r],slots:c,attrs:u,emit:a,render:p,renderCache:b,data:v,setupState:k,ctx:F,inheritAttrs:S}=e;let P,L;const oe=Kt(e);try{if(n.shapeFlag&4){const W=o||s;P=Ie(p.call(W,W,b,i,k,v,F)),L=u}else{const W=t;P=Ie(W.length>1?W(i,{attrs:u,slots:c,emit:a}):W(i,null)),L=t.props?u:Xi(u)}}catch(W){Et.length=0,en(W,e,1),P=se(_e)}let q=P;if(L&&S!==!1){const W=Object.keys(L),{shapeFlag:ie}=q;W.length&&ie&7&&(r&&W.some(Bn)&&(L=Qi(L,r)),q=et(q,L))}return n.dirs&&(q.dirs=q.dirs?q.dirs.concat(n.dirs):n.dirs),n.transition&&(q.transition=n.transition),P=q,Kt(oe),P}const Xi=e=>{let t;for(const n in e)(n==="class"||n==="style"||Jt(n))&&((t||(t={}))[n]=e[n]);return t},Qi=(e,t)=>{const n={};for(const s in e)(!Bn(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Gi(e,t,n){const{props:s,children:o,component:i}=e,{props:r,children:c,patchFlag:u}=t,a=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&u>=0){if(u&1024)return!0;if(u&16)return s?ms(s,r,a):!!r;if(u&8){const p=t.dynamicProps;for(let b=0;be.__isSuspense;function nr(e,t){t&&t.pendingBranch?O(e)?t.effects.push(...e):t.effects.push(e):Ji(e)}function sr(e,t){if(X){let n=X.provides;const s=X.parent&&X.parent.provides;s===n&&(n=X.provides=Object.create(s)),n[e]=t}}function dn(e,t,n=!1){const s=X||ce;if(s){const o=s.parent==null?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides;if(o&&e in o)return o[e];if(arguments.length>1)return n&&M(t)?t.call(s.proxy):t}}const _s={};function pn(e,t,n){return Co(e,t,n)}function Co(e,t,{immediate:n,deep:s,flush:o,onTrack:i,onTrigger:r}=j){const c=X;let u,a=!1,p=!1;if(ne(e)?(u=()=>e.value,a=ro(e)):dt(e)?(u=()=>e,s=!0):O(e)?(p=!0,a=e.some(dt),u=()=>e.map(L=>{if(ne(L))return L.value;if(dt(L))return ft(L);if(M(L))return Ue(L,c,2)})):M(e)?t?u=()=>Ue(e,c,2):u=()=>{if(!(c&&c.isUnmounted))return b&&b(),me(e,c,3,[v])}:u=ve,t&&s){const L=u;u=()=>ft(L())}let b,v=L=>{b=P.onStop=()=>{Ue(L,c,4)}};if(At)return v=ve,t?n&&me(t,c,3,[u(),p?[]:void 0,v]):u(),ve;let k=p?[]:_s;const F=()=>{if(!!P.active)if(t){const L=P.run();(s||a||(p?L.some((oe,q)=>jt(oe,k[q])):jt(L,k)))&&(b&&b(),me(t,c,3,[L,k===_s?void 0:k,v]),k=L)}else P.run()};F.allowRecurse=!!t;let S;o==="sync"?S=F:o==="post"?S=()=>ue(F,c&&c.suspense):S=()=>{!c||c.isMounted?Yi(F):F()};const P=new Un(u,S);return t?n?F():k=P.run():o==="post"?ue(P.run.bind(P),c&&c.suspense):P.run(),()=>{P.stop(),c&&c.scope&&$n(c.scope.effects,P)}}function or(e,t,n){const s=this.proxy,o=ee(e)?e.includes(".")?vo(s,e):()=>s[e]:e.bind(s,s);let i;M(t)?i=t:(i=t.handler,n=t);const r=X;pt(this);const c=Co(o,i.bind(s),n);return r?pt(r):Ge(),c}function vo(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;o{ft(n,t)});else if(qs(e))for(const n in e)ft(e[n],t);return e}function ir(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return To(()=>{e.isMounted=!0}),Io(()=>{e.isUnmounting=!0}),e}const he=[Function,Array],rr={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:he,onEnter:he,onAfterEnter:he,onEnterCancelled:he,onBeforeLeave:he,onLeave:he,onAfterLeave:he,onLeaveCancelled:he,onBeforeAppear:he,onAppear:he,onAfterAppear:he,onAppearCancelled:he},setup(e,{slots:t}){const n=Vr(),s=ir();let o;return()=>{const i=t.default&&wo(t.default(),!0);if(!i||!i.length)return;let r=i[0];if(i.length>1){for(const S of i)if(S.type!==_e){r=S;break}}const c=$(e),{mode:u}=c;if(s.isLeaving)return hn(r);const a=bs(r);if(!a)return hn(r);const p=Tn(a,c,s,n);In(a,p);const b=n.subTree,v=b&&bs(b);let k=!1;const{getTransitionKey:F}=a.type;if(F){const S=F();o===void 0?o=S:S!==o&&(o=S,k=!0)}if(v&&v.type!==_e&&(!Ye(a,v)||k)){const S=Tn(v,c,s,n);if(In(v,S),u==="out-in")return s.isLeaving=!0,S.afterLeave=()=>{s.isLeaving=!1,n.update()},hn(r);u==="in-out"&&a.type!==_e&&(S.delayLeave=(P,L,oe)=>{const q=xo(s,v);q[String(v.key)]=v,P._leaveCb=()=>{L(),P._leaveCb=void 0,delete p.delayedLeave},p.delayedLeave=oe})}return r}}},yo=rr;function xo(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Tn(e,t,n,s){const{appear:o,mode:i,persisted:r=!1,onBeforeEnter:c,onEnter:u,onAfterEnter:a,onEnterCancelled:p,onBeforeLeave:b,onLeave:v,onAfterLeave:k,onLeaveCancelled:F,onBeforeAppear:S,onAppear:P,onAfterAppear:L,onAppearCancelled:oe}=t,q=String(e.key),W=xo(n,e),ie=(B,J)=>{B&&me(B,s,9,J)},Oe={mode:i,persisted:r,beforeEnter(B){let J=c;if(!n.isMounted)if(o)J=S||c;else return;B._leaveCb&&B._leaveCb(!0);const V=W[q];V&&Ye(e,V)&&V.el._leaveCb&&V.el._leaveCb(),ie(J,[B])},enter(B){let J=u,V=a,fe=p;if(!n.isMounted)if(o)J=P||u,V=L||a,fe=oe||p;else return;let te=!1;const I=B._enterCb=Y=>{te||(te=!0,Y?ie(fe,[B]):ie(V,[B]),Oe.delayedLeave&&Oe.delayedLeave(),B._enterCb=void 0)};J?(J(B,I),J.length<=1&&I()):I()},leave(B,J){const V=String(e.key);if(B._enterCb&&B._enterCb(!0),n.isUnmounting)return J();ie(b,[B]);let fe=!1;const te=B._leaveCb=I=>{fe||(fe=!0,J(),I?ie(F,[B]):ie(k,[B]),B._leaveCb=void 0,W[V]===e&&delete W[V])};W[V]=e,v?(v(B,te),v.length<=1&&te()):te()},clone(B){return Tn(B,t,n,s)}};return Oe}function hn(e){if(nn(e))return e=et(e),e.children=null,e}function bs(e){return nn(e)?e.children?e.children[0]:void 0:e}function In(e,t){e.shapeFlag&6&&e.component?In(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function wo(e,t=!1,n){let s=[],o=0;for(let i=0;i1)for(let i=0;i!!e.type.__asyncLoader,nn=e=>e.type.__isKeepAlive;function lr(e,t){Eo(e,"a",t)}function cr(e,t){Eo(e,"da",t)}function Eo(e,t,n=X){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(sn(t,s,n),n){let o=n.parent;for(;o&&o.parent;)nn(o.parent.vnode)&&fr(s,t,n,o),o=o.parent}}function fr(e,t,n,s){const o=sn(t,e,s,!0);ko(()=>{$n(s[t],o)},n)}function sn(e,t,n=X,s=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...r)=>{if(n.isUnmounted)return;gt(),pt(n);const c=me(t,n,e,r);return Ge(),mt(),c});return s?o.unshift(i):o.push(i),i}}const Ne=e=>(t,n=X)=>(!At||e==="sp")&&sn(e,t,n),ur=Ne("bm"),To=Ne("m"),ar=Ne("bu"),dr=Ne("u"),Io=Ne("bum"),ko=Ne("um"),pr=Ne("sp"),hr=Ne("rtg"),gr=Ne("rtc");function mr(e,t=X){sn("ec",e,t)}let kn=!0;function _r(e){const t=Oo(e),n=e.proxy,s=e.ctx;kn=!1,t.beforeCreate&&Cs(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:r,watch:c,provide:u,inject:a,created:p,beforeMount:b,mounted:v,beforeUpdate:k,updated:F,activated:S,deactivated:P,beforeDestroy:L,beforeUnmount:oe,destroyed:q,unmounted:W,render:ie,renderTracked:Oe,renderTriggered:B,errorCaptured:J,serverPrefetch:V,expose:fe,inheritAttrs:te,components:I,directives:Y,filters:ye}=t;if(a&&br(a,s,null,e.appContext.config.unwrapInjectedRef),r)for(const z in r){const H=r[z];M(H)&&(s[z]=H.bind(n))}if(o){const z=o.call(n,n);Z(z)&&(e.data=zn(z))}if(kn=!0,i)for(const z in i){const H=i[z],Pe=M(H)?H.bind(n,n):M(H.get)?H.get.bind(n,n):ve,rn=!M(H)&&M(H.set)?H.set.bind(n):ve,_t=Qr({get:Pe,set:rn});Object.defineProperty(s,z,{enumerable:!0,configurable:!0,get:()=>_t.value,set:nt=>_t.value=nt})}if(c)for(const z in c)Ao(c[z],s,n,z);if(u){const z=M(u)?u.call(n):u;Reflect.ownKeys(z).forEach(H=>{sr(H,z[H])})}p&&Cs(p,e,"c");function Q(z,H){O(H)?H.forEach(Pe=>z(Pe.bind(n))):H&&z(H.bind(n))}if(Q(ur,b),Q(To,v),Q(ar,k),Q(dr,F),Q(lr,S),Q(cr,P),Q(mr,J),Q(gr,Oe),Q(hr,B),Q(Io,oe),Q(ko,W),Q(pr,V),O(fe))if(fe.length){const z=e.exposed||(e.exposed={});fe.forEach(H=>{Object.defineProperty(z,H,{get:()=>n[H],set:Pe=>n[H]=Pe})})}else e.exposed||(e.exposed={});ie&&e.render===ve&&(e.render=ie),te!=null&&(e.inheritAttrs=te),I&&(e.components=I),Y&&(e.directives=Y)}function br(e,t,n=ve,s=!1){O(e)&&(e=An(e));for(const o in e){const i=e[o];let r;Z(i)?"default"in i?r=dn(i.from||o,i.default,!0):r=dn(i.from||o):r=dn(i),ne(r)&&s?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:c=>r.value=c}):t[o]=r}}function Cs(e,t,n){me(O(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ao(e,t,n,s){const o=s.includes(".")?vo(n,s):()=>n[s];if(ee(e)){const i=t[e];M(i)&&pn(o,i)}else if(M(e))pn(o,e.bind(n));else if(Z(e))if(O(e))e.forEach(i=>Ao(i,t,n,s));else{const i=M(e.handler)?e.handler.bind(n):t[e.handler];M(i)&&pn(o,i,e)}}function Oo(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:r}}=e.appContext,c=i.get(t);let u;return c?u=c:!o.length&&!n&&!s?u=t:(u={},o.length&&o.forEach(a=>Vt(u,a,r,!0)),Vt(u,t,r)),i.set(t,u),u}function Vt(e,t,n,s=!1){const{mixins:o,extends:i}=t;i&&Vt(e,i,n,!0),o&&o.forEach(r=>Vt(e,r,n,!0));for(const r in t)if(!(s&&r==="expose")){const c=Cr[r]||n&&n[r];e[r]=c?c(e[r],t[r]):t[r]}return e}const Cr={data:vs,props:qe,emits:qe,methods:qe,computed:qe,beforeCreate:re,created:re,beforeMount:re,mounted:re,beforeUpdate:re,updated:re,beforeDestroy:re,beforeUnmount:re,destroyed:re,unmounted:re,activated:re,deactivated:re,errorCaptured:re,serverPrefetch:re,components:qe,directives:qe,watch:yr,provide:vs,inject:vr};function vs(e,t){return t?e?function(){return G(M(e)?e.call(this,this):e,M(t)?t.call(this,this):t)}:t:e}function vr(e,t){return qe(An(e),An(t))}function An(e){if(O(e)){const t={};for(let n=0;n0)&&!(r&16)){if(r&8){const p=e.vnode.dynamicProps;for(let b=0;b{u=!0;const[v,k]=Mo(b,t,!0);G(r,v),k&&c.push(...k)};!n&&t.mixins.length&&t.mixins.forEach(p),e.extends&&p(e.extends),e.mixins&&e.mixins.forEach(p)}if(!i&&!u)return s.set(e,ut),ut;if(O(i))for(let p=0;p-1,k[1]=S<0||F-1||N(k,"default"))&&c.push(b)}}}const a=[r,c];return s.set(e,a),a}function ys(e){return e[0]!=="$"}function xs(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function ws(e,t){return xs(e)===xs(t)}function Es(e,t){return O(t)?t.findIndex(n=>ws(n,e)):M(t)&&ws(t,e)?0:-1}const Fo=e=>e[0]==="_"||e==="$stable",Qn=e=>O(e)?e.map(Ie):[Ie(e)],Er=(e,t,n)=>{const s=ct((...o)=>Qn(t(...o)),n);return s._c=!1,s},So=(e,t,n)=>{const s=e._ctx;for(const o in e){if(Fo(o))continue;const i=e[o];if(M(i))t[o]=Er(o,i,s);else if(i!=null){const r=Qn(i);t[o]=()=>r}}},No=(e,t)=>{const n=Qn(t);e.slots.default=()=>n},Tr=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=$(t),Ht(t,"_",n)):So(t,e.slots={})}else e.slots={},t&&No(e,t);Ht(e.slots,on,1)},Ir=(e,t,n)=>{const{vnode:s,slots:o}=e;let i=!0,r=j;if(s.shapeFlag&32){const c=t._;c?n&&c===1?i=!1:(G(o,t),!n&&c===1&&delete o._):(i=!t.$stable,So(t,o)),r=t}else t&&(No(e,t),r={default:1});if(i)for(const c in o)!Fo(c)&&!(c in r)&&delete o[c]};function We(e,t,n,s){const o=e.dirs,i=t&&t.dirs;for(let r=0;rPn(v,t&&(O(t)?t[k]:t),n,s,o));return}if(Wt(s)&&!o)return;const i=s.shapeFlag&4?ns(s.component)||s.component.proxy:s.el,r=o?null:i,{i:c,r:u}=e,a=t&&t.r,p=c.refs===j?c.refs={}:c.refs,b=c.setupState;if(a!=null&&a!==u&&(ee(a)?(p[a]=null,N(b,a)&&(b[a]=null)):ne(a)&&(a.value=null)),M(u))Ue(u,c,12,[r,p]);else{const v=ee(u),k=ne(u);if(v||k){const F=()=>{if(e.f){const S=v?p[u]:u.value;o?O(S)&&$n(S,i):O(S)?S.includes(i)||S.push(i):v?(p[u]=[i],N(b,u)&&(b[u]=p[u])):(u.value=[i],e.k&&(p[e.k]=u.value))}else v?(p[u]=r,N(b,u)&&(b[u]=r)):ne(u)&&(u.value=r,e.k&&(p[e.k]=r))};r?(F.id=-1,ue(F,n)):F()}}}const ue=nr;function Or(e){return Pr(e)}function Pr(e,t){const n=fi();n.__VUE__=!0;const{insert:s,remove:o,patchProp:i,createElement:r,createText:c,createComment:u,setText:a,setElementText:p,parentNode:b,nextSibling:v,setScopeId:k=ve,cloneNode:F,insertStaticContent:S}=e,P=(l,f,d,g=null,h=null,C=null,x=!1,_=null,y=!!f.dynamicChildren)=>{if(l===f)return;l&&!Ye(l,f)&&(g=Ot(l),Le(l,h,C,!0),l=null),f.patchFlag===-2&&(y=!1,f.dynamicChildren=null);const{type:m,ref:E,shapeFlag:w}=f;switch(m){case Gn:L(l,f,d,g);break;case _e:oe(l,f,d,g);break;case Bt:l==null&&q(f,d,g,x);break;case ge:Y(l,f,d,g,h,C,x,_,y);break;default:w&1?Oe(l,f,d,g,h,C,x,_,y):w&6?ye(l,f,d,g,h,C,x,_,y):(w&64||w&128)&&m.process(l,f,d,g,h,C,x,_,y,st)}E!=null&&h&&Pn(E,l&&l.ref,C,f||l,!f)},L=(l,f,d,g)=>{if(l==null)s(f.el=c(f.children),d,g);else{const h=f.el=l.el;f.children!==l.children&&a(h,f.children)}},oe=(l,f,d,g)=>{l==null?s(f.el=u(f.children||""),d,g):f.el=l.el},q=(l,f,d,g)=>{[l.el,l.anchor]=S(l.children,f,d,g,l.el,l.anchor)},W=({el:l,anchor:f},d,g)=>{let h;for(;l&&l!==f;)h=v(l),s(l,d,g),l=h;s(f,d,g)},ie=({el:l,anchor:f})=>{let d;for(;l&&l!==f;)d=v(l),o(l),l=d;o(f)},Oe=(l,f,d,g,h,C,x,_,y)=>{x=x||f.type==="svg",l==null?B(f,d,g,h,C,x,_,y):fe(l,f,h,C,x,_,y)},B=(l,f,d,g,h,C,x,_)=>{let y,m;const{type:E,props:w,shapeFlag:T,transition:A,patchFlag:R,dirs:K}=l;if(l.el&&F!==void 0&&R===-1)y=l.el=F(l.el);else{if(y=l.el=r(l.type,C,w&&w.is,w),T&8?p(y,l.children):T&16&&V(l.children,y,null,g,h,C&&E!=="foreignObject",x,_),K&&We(l,null,g,"created"),w){for(const U in w)U!=="value"&&!Rt(U)&&i(y,U,null,w[U],C,l.children,g,h,Me);"value"in w&&i(y,"value",null,w.value),(m=w.onVnodeBeforeMount)&&we(m,g,l)}J(y,l,l.scopeId,x,g)}K&&We(l,null,g,"beforeMount");const D=(!h||h&&!h.pendingBranch)&&A&&!A.persisted;D&&A.beforeEnter(y),s(y,f,d),((m=w&&w.onVnodeMounted)||D||K)&&ue(()=>{m&&we(m,g,l),D&&A.enter(y),K&&We(l,null,g,"mounted")},h)},J=(l,f,d,g,h)=>{if(d&&k(l,d),g)for(let C=0;C{for(let m=y;m{const _=f.el=l.el;let{patchFlag:y,dynamicChildren:m,dirs:E}=f;y|=l.patchFlag&16;const w=l.props||j,T=f.props||j;let A;d&&Ve(d,!1),(A=T.onVnodeBeforeUpdate)&&we(A,d,f,l),E&&We(f,l,d,"beforeUpdate"),d&&Ve(d,!0);const R=h&&f.type!=="foreignObject";if(m?te(l.dynamicChildren,m,_,d,g,R,C):x||Pe(l,f,_,null,d,g,R,C,!1),y>0){if(y&16)I(_,f,w,T,d,g,h);else if(y&2&&w.class!==T.class&&i(_,"class",null,T.class,h),y&4&&i(_,"style",w.style,T.style,h),y&8){const K=f.dynamicProps;for(let D=0;D{A&&we(A,d,f,l),E&&We(f,l,d,"updated")},g)},te=(l,f,d,g,h,C,x)=>{for(let _=0;_{if(d!==g){for(const _ in g){if(Rt(_))continue;const y=g[_],m=d[_];y!==m&&_!=="value"&&i(l,_,m,y,x,f.children,h,C,Me)}if(d!==j)for(const _ in d)!Rt(_)&&!(_ in g)&&i(l,_,d[_],null,x,f.children,h,C,Me);"value"in g&&i(l,"value",d.value,g.value)}},Y=(l,f,d,g,h,C,x,_,y)=>{const m=f.el=l?l.el:c(""),E=f.anchor=l?l.anchor:c("");let{patchFlag:w,dynamicChildren:T,slotScopeIds:A}=f;A&&(_=_?_.concat(A):A),l==null?(s(m,d,g),s(E,d,g),V(f.children,d,E,h,C,x,_,y)):w>0&&w&64&&T&&l.dynamicChildren?(te(l.dynamicChildren,T,d,h,C,x,_),(f.key!=null||h&&f===h.subTree)&&Ro(l,f,!0)):Pe(l,f,d,E,h,C,x,_,y)},ye=(l,f,d,g,h,C,x,_,y)=>{f.slotScopeIds=_,l==null?f.shapeFlag&512?h.ctx.activate(f,d,g,x,y):tt(f,d,g,h,C,x,y):Q(l,f,y)},tt=(l,f,d,g,h,C,x)=>{const _=l.component=Wr(l,g,h);if(nn(l)&&(_.ctx.renderer=st),zr(_),_.asyncDep){if(h&&h.registerDep(_,z),!l.el){const y=_.subTree=se(_e);oe(null,y,f,d)}return}z(_,l,f,d,h,C,x)},Q=(l,f,d)=>{const g=f.component=l.component;if(Gi(l,f,d))if(g.asyncDep&&!g.asyncResolved){H(g,f,d);return}else g.next=f,qi(g.update),g.update();else f.component=l.component,f.el=l.el,g.vnode=f},z=(l,f,d,g,h,C,x)=>{const _=()=>{if(l.isMounted){let{next:E,bu:w,u:T,parent:A,vnode:R}=l,K=E,D;Ve(l,!1),E?(E.el=R.el,H(l,E,x)):E=R,w&&un(w),(D=E.props&&E.props.onVnodeBeforeUpdate)&&we(D,A,E,R),Ve(l,!0);const U=an(l),be=l.subTree;l.subTree=U,P(be,U,b(be.el),Ot(be),l,h,C),E.el=U.el,K===null&&er(l,U.el),T&&ue(T,h),(D=E.props&&E.props.onVnodeUpdated)&&ue(()=>we(D,A,E,R),h)}else{let E;const{el:w,props:T}=f,{bm:A,m:R,parent:K}=l,D=Wt(f);if(Ve(l,!1),A&&un(A),!D&&(E=T&&T.onVnodeBeforeMount)&&we(E,K,f),Ve(l,!0),w&&cn){const U=()=>{l.subTree=an(l),cn(w,l.subTree,l,h,null)};D?f.type.__asyncLoader().then(()=>!l.isUnmounted&&U()):U()}else{const U=l.subTree=an(l);P(null,U,d,g,l,h,C),f.el=U.el}if(R&&ue(R,h),!D&&(E=T&&T.onVnodeMounted)){const U=f;ue(()=>we(E,K,U),h)}f.shapeFlag&256&&l.a&&ue(l.a,h),l.isMounted=!0,f=d=g=null}},y=l.effect=new Un(_,()=>ao(l.update),l.scope),m=l.update=y.run.bind(y);m.id=l.uid,Ve(l,!0),m()},H=(l,f,d)=>{f.component=l;const g=l.vnode.props;l.vnode=f,l.next=null,wr(l,f.props,g,d),Ir(l,f.children,d),gt(),Xn(void 0,l.update),mt()},Pe=(l,f,d,g,h,C,x,_,y=!1)=>{const m=l&&l.children,E=l?l.shapeFlag:0,w=f.children,{patchFlag:T,shapeFlag:A}=f;if(T>0){if(T&128){_t(m,w,d,g,h,C,x,_,y);return}else if(T&256){rn(m,w,d,g,h,C,x,_,y);return}}A&8?(E&16&&Me(m,h,C),w!==m&&p(d,w)):E&16?A&16?_t(m,w,d,g,h,C,x,_,y):Me(m,h,C,!0):(E&8&&p(d,""),A&16&&V(w,d,g,h,C,x,_,y))},rn=(l,f,d,g,h,C,x,_,y)=>{l=l||ut,f=f||ut;const m=l.length,E=f.length,w=Math.min(m,E);let T;for(T=0;TE?Me(l,h,C,!0,!1,w):V(f,d,g,h,C,x,_,y,w)},_t=(l,f,d,g,h,C,x,_,y)=>{let m=0;const E=f.length;let w=l.length-1,T=E-1;for(;m<=w&&m<=T;){const A=l[m],R=f[m]=y?je(f[m]):Ie(f[m]);if(Ye(A,R))P(A,R,d,null,h,C,x,_,y);else break;m++}for(;m<=w&&m<=T;){const A=l[w],R=f[T]=y?je(f[T]):Ie(f[T]);if(Ye(A,R))P(A,R,d,null,h,C,x,_,y);else break;w--,T--}if(m>w){if(m<=T){const A=T+1,R=AT)for(;m<=w;)Le(l[m],h,C,!0),m++;else{const A=m,R=m,K=new Map;for(m=R;m<=T;m++){const ae=f[m]=y?je(f[m]):Ie(f[m]);ae.key!=null&&K.set(ae.key,m)}let D,U=0;const be=T-R+1;let ot=!1,rs=0;const bt=new Array(be);for(m=0;m=be){Le(ae,h,C,!0);continue}let xe;if(ae.key!=null)xe=K.get(ae.key);else for(D=R;D<=T;D++)if(bt[D-R]===0&&Ye(ae,f[D])){xe=D;break}xe===void 0?Le(ae,h,C,!0):(bt[xe-R]=m+1,xe>=rs?rs=xe:ot=!0,P(ae,f[xe],d,null,h,C,x,_,y),U++)}const ls=ot?Mr(bt):ut;for(D=ls.length-1,m=be-1;m>=0;m--){const ae=R+m,xe=f[ae],cs=ae+1{const{el:C,type:x,transition:_,children:y,shapeFlag:m}=l;if(m&6){nt(l.component.subTree,f,d,g);return}if(m&128){l.suspense.move(f,d,g);return}if(m&64){x.move(l,f,d,st);return}if(x===ge){s(C,f,d);for(let w=0;w_.enter(C),h);else{const{leave:w,delayLeave:T,afterLeave:A}=_,R=()=>s(C,f,d),K=()=>{w(C,()=>{R(),A&&A()})};T?T(C,R,K):K()}else s(C,f,d)},Le=(l,f,d,g=!1,h=!1)=>{const{type:C,props:x,ref:_,children:y,dynamicChildren:m,shapeFlag:E,patchFlag:w,dirs:T}=l;if(_!=null&&Pn(_,null,d,l,!0),E&256){f.ctx.deactivate(l);return}const A=E&1&&T,R=!Wt(l);let K;if(R&&(K=x&&x.onVnodeBeforeUnmount)&&we(K,f,l),E&6)Jo(l.component,d,g);else{if(E&128){l.suspense.unmount(d,g);return}A&&We(l,null,f,"beforeUnmount"),E&64?l.type.remove(l,f,d,h,st,g):m&&(C!==ge||w>0&&w&64)?Me(m,f,d,!1,!0):(C===ge&&w&384||!h&&E&16)&&Me(y,f,d),g&&os(l)}(R&&(K=x&&x.onVnodeUnmounted)||A)&&ue(()=>{K&&we(K,f,l),A&&We(l,null,f,"unmounted")},d)},os=l=>{const{type:f,el:d,anchor:g,transition:h}=l;if(f===ge){Yo(d,g);return}if(f===Bt){ie(l);return}const C=()=>{o(d),h&&!h.persisted&&h.afterLeave&&h.afterLeave()};if(l.shapeFlag&1&&h&&!h.persisted){const{leave:x,delayLeave:_}=h,y=()=>x(d,C);_?_(l.el,C,y):y()}else C()},Yo=(l,f)=>{let d;for(;l!==f;)d=v(l),o(l),l=d;o(f)},Jo=(l,f,d)=>{const{bum:g,scope:h,update:C,subTree:x,um:_}=l;g&&un(g),h.stop(),C&&(C.active=!1,Le(x,l,f,d)),_&&ue(_,f),ue(()=>{l.isUnmounted=!0},f),f&&f.pendingBranch&&!f.isUnmounted&&l.asyncDep&&!l.asyncResolved&&l.suspenseId===f.pendingId&&(f.deps--,f.deps===0&&f.resolve())},Me=(l,f,d,g=!1,h=!1,C=0)=>{for(let x=C;xl.shapeFlag&6?Ot(l.component.subTree):l.shapeFlag&128?l.suspense.next():v(l.anchor||l.el),is=(l,f,d)=>{l==null?f._vnode&&Le(f._vnode,null,null,!0):P(f._vnode||null,l,f,null,null,null,d),go(),f._vnode=l},st={p:P,um:Le,m:nt,r:os,mt:tt,mc:V,pc:Pe,pbc:te,n:Ot,o:e};let ln,cn;return t&&([ln,cn]=t(st)),{render:is,hydrate:ln,createApp:Ar(is,ln)}}function Ve({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Ro(e,t,n=!1){const s=e.children,o=t.children;if(O(s)&&O(o))for(let i=0;i>1,e[n[c]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,r=n[i-1];i-- >0;)n[i]=r,r=t[r];return n}const Fr=e=>e.__isTeleport,Bo="components";function Sr(e,t){return Lr(Bo,e,!0,t)||e}const Nr=Symbol();function Lr(e,t,n=!0,s=!1){const o=ce||X;if(o){const i=o.type;if(e===Bo){const c=Zr(i);if(c&&(c===t||c===ke(t)||c===Qt(ke(t))))return i}const r=Ts(o[e]||i[e],t)||Ts(o.appContext[e],t);return!r&&s?i:r}}function Ts(e,t){return e&&(e[t]||e[ke(t)]||e[Qt(ke(t))])}const ge=Symbol(void 0),Gn=Symbol(void 0),_e=Symbol(void 0),Bt=Symbol(void 0),Et=[];let Qe=null;function Ze(e=!1){Et.push(Qe=e?null:[])}function Rr(){Et.pop(),Qe=Et[Et.length-1]||null}let zt=1;function Is(e){zt+=e}function $o(e){return e.dynamicChildren=zt>0?Qe||ut:null,Rr(),zt>0&&Qe&&Qe.push(e),e}function $t(e,t,n,s,o,i){return $o(le(e,t,n,s,o,i,!0))}function es(e,t,n,s,o){return $o(se(e,t,n,s,o,!0))}function qt(e){return e?e.__v_isVNode===!0:!1}function Ye(e,t){return e.type===t.type&&e.key===t.key}const on="__vInternal",Do=({key:e})=>e!=null?e:null,Dt=({ref:e,ref_key:t,ref_for:n})=>e!=null?ee(e)||ne(e)||M(e)?{i:ce,r:e,k:t,f:!!n}:e:null;function le(e,t=null,n=null,s=0,o=null,i=e===ge?0:1,r=!1,c=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Do(t),ref:t&&Dt(t),scopeId:bo,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null};return c?(ts(u,n),i&128&&e.normalize(u)):n&&(u.shapeFlag|=ee(n)?8:16),zt>0&&!r&&Qe&&(u.patchFlag>0||i&6)&&u.patchFlag!==32&&Qe.push(u),u}const se=Br;function Br(e,t=null,n=null,s=0,o=null,i=!1){if((!e||e===Nr)&&(e=_e),qt(e)){const c=et(e,t,!0);return n&&ts(c,n),c}if(Xr(e)&&(e=e.__vccOpts),t){t=$r(t);let{class:c,style:u}=t;c&&!ee(c)&&(t.class=Te(c)),Z(u)&&(lo(u)&&!O(u)&&(u=G({},u)),t.style=Rn(u))}const r=ee(e)?1:tr(e)?128:Fr(e)?64:Z(e)?4:M(e)?2:0;return le(e,t,n,s,o,r,i,!0)}function $r(e){return e?lo(e)||on in e?G({},e):e:null}function et(e,t,n=!1){const{props:s,ref:o,patchFlag:i,children:r}=e,c=t?jr(s||{},t):s;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Do(c),ref:t&&t.ref?n&&o?O(o)?o.concat(Dt(t)):[o,Dt(t)]:Dt(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ge?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&et(e.ssContent),ssFallback:e.ssFallback&&et(e.ssFallback),el:e.el,anchor:e.anchor}}function Ae(e=" ",t=0){return se(Gn,null,e,t)}function Dr(e,t){const n=se(Bt,null,e);return n.staticCount=t,n}function gn(e="",t=!1){return t?(Ze(),es(_e,null,e)):se(_e,null,e)}function Ie(e){return e==null||typeof e=="boolean"?se(_e):O(e)?se(ge,null,e.slice()):typeof e=="object"?je(e):se(Gn,null,String(e))}function je(e){return e.el===null||e.memo?e:et(e)}function ts(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(O(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),ts(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!(on in t)?t._ctx=ce:o===3&&ce&&(ce.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else M(t)?(t={default:t,_ctx:ce},n=32):(t=String(t),s&64?(n=16,t=[Ae(t)]):n=8);e.children=t,e.shapeFlag|=n}function jr(...e){const t={};for(let n=0;nqt(t)?!(t.type===_e||t.type===ge&&!jo(t.children)):!0)?e:null}const Mn=e=>e?Ho(e)?ns(e)||e.proxy:Mn(e.parent):null,Yt=G(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=>Mn(e.parent),$root:e=>Mn(e.root),$emit:e=>e.emit,$options:e=>Oo(e),$forceUpdate:e=>()=>ao(e.update),$nextTick:e=>Vi.bind(e.proxy),$watch:e=>or.bind(e)}),Hr={get({_:e},t){const{ctx:n,setupState:s,data:o,props:i,accessCache:r,type:c,appContext:u}=e;let a;if(t[0]!=="$"){const k=r[t];if(k!==void 0)switch(k){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return i[t]}else{if(s!==j&&N(s,t))return r[t]=1,s[t];if(o!==j&&N(o,t))return r[t]=2,o[t];if((a=e.propsOptions[0])&&N(a,t))return r[t]=3,i[t];if(n!==j&&N(n,t))return r[t]=4,n[t];kn&&(r[t]=0)}}const p=Yt[t];let b,v;if(p)return t==="$attrs"&&pe(e,"get",t),p(e);if((b=c.__cssModules)&&(b=b[t]))return b;if(n!==j&&N(n,t))return r[t]=4,n[t];if(v=u.config.globalProperties,N(v,t))return v[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:i}=e;return o!==j&&N(o,t)?(o[t]=n,!0):s!==j&&N(s,t)?(s[t]=n,!0):N(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,propsOptions:i}},r){let c;return!!n[r]||e!==j&&N(e,r)||t!==j&&N(t,r)||(c=i[0])&&N(c,r)||N(s,r)||N(Yt,r)||N(o.config.globalProperties,r)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:N(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},Ur=Lo();let Kr=0;function Wr(e,t,n){const s=e.type,o=(t?t.appContext:e.appContext)||Ur,i={uid:Kr++,vnode:e,type:s,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,scope:new ui(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Mo(s,o),emitsOptions:_o(s,o),emit:null,emitted:null,propsDefaults:j,inheritAttrs:s.inheritAttrs,ctx:j,data:j,props:j,attrs:j,slots:j,refs:j,setupState:j,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 i.ctx={_:i},i.root=t?t.root:i,i.emit=Zi.bind(null,i),e.ce&&e.ce(i),i}let X=null;const Vr=()=>X||ce,pt=e=>{X=e,e.scope.on()},Ge=()=>{X&&X.scope.off(),X=null};function Ho(e){return e.vnode.shapeFlag&4}let At=!1;function zr(e,t=!1){At=t;const{props:n,children:s}=e.vnode,o=Ho(e);xr(e,n,o,t),Tr(e,s);const i=o?qr(e,t):void 0;return At=!1,i}function qr(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=co(new Proxy(e.ctx,Hr));const{setup:s}=n;if(s){const o=e.setupContext=s.length>1?Jr(e):null;pt(e),gt();const i=Ue(s,e,0,[e.props,o]);if(mt(),Ge(),Vs(i)){if(i.then(Ge,Ge),t)return i.then(r=>{ks(e,r,t)}).catch(r=>{en(r,e,0)});e.asyncDep=i}else ks(e,i,t)}else Uo(e,t)}function ks(e,t,n){M(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Z(t)&&(e.setupState=fo(t)),Uo(e,n)}let As;function Uo(e,t,n){const s=e.type;if(!e.render){if(!t&&As&&!s.render){const o=s.template;if(o){const{isCustomElement:i,compilerOptions:r}=e.appContext.config,{delimiters:c,compilerOptions:u}=s,a=G(G({isCustomElement:i,delimiters:c},r),u);s.render=As(o,a)}}e.render=s.render||ve}pt(e),gt(),_r(e),mt(),Ge()}function Yr(e){return new Proxy(e.attrs,{get(t,n){return pe(e,"get","$attrs"),t[n]}})}function Jr(e){const t=s=>{e.exposed=s||{}};let n;return{get attrs(){return n||(n=Yr(e))},slots:e.slots,emit:e.emit,expose:t}}function ns(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(fo(co(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Yt)return Yt[n](e)}}))}function Zr(e){return M(e)&&e.displayName||e.name}function Xr(e){return M(e)&&"__vccOpts"in e}const Qr=(e,t)=>Ki(e,t,At);function Gr(e,t,n){const s=arguments.length;return s===2?Z(t)&&!O(t)?qt(t)?se(e,null,[t]):se(e,t):se(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&qt(n)&&(n=[n]),se(e,t,n))}const el="3.2.33",tl="http://www.w3.org/2000/svg",Je=typeof document!="undefined"?document:null,Os=Je&&Je.createElement("template"),nl={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o=t?Je.createElementNS(tl,e):Je.createElement(e,n?{is:n}:void 0);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>Je.createTextNode(e),createComment:e=>Je.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Je.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,s,o,i){const r=n?n.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===i||!(o=o.nextSibling)););else{Os.innerHTML=s?`${e}`:e;const c=Os.content;if(s){const u=c.firstChild;for(;u.firstChild;)c.appendChild(u.firstChild);c.removeChild(u)}t.insertBefore(c,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function sl(e,t,n){const s=e._vtc;s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function ol(e,t,n){const s=e.style,o=ee(n);if(n&&!o){for(const i in n)Fn(s,i,n[i]);if(t&&!ee(t))for(const i in t)n[i]==null&&Fn(s,i,"")}else{const i=s.display;o?t!==n&&(s.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(s.display=i)}}const Ps=/\s*!important$/;function Fn(e,t,n){if(O(n))n.forEach(s=>Fn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=il(e,t);Ps.test(n)?e.setProperty(ht(s),n.replace(Ps,""),"important"):e[s]=n}}const Ms=["Webkit","Moz","ms"],mn={};function il(e,t){const n=mn[t];if(n)return n;let s=ke(t);if(s!=="filter"&&s in e)return mn[t]=s;s=Qt(s);for(let o=0;o{let e=Date.now,t=!1;if(typeof window!="undefined"){Date.now()>document.createEvent("Event").timeStamp&&(e=()=>performance.now());const n=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(n&&Number(n[1])<=53)}return[e,t]})();let Sn=0;const fl=Promise.resolve(),ul=()=>{Sn=0},al=()=>Sn||(fl.then(ul),Sn=Ko());function dl(e,t,n,s){e.addEventListener(t,n,s)}function pl(e,t,n,s){e.removeEventListener(t,n,s)}function hl(e,t,n,s,o=null){const i=e._vei||(e._vei={}),r=i[t];if(s&&r)r.value=s;else{const[c,u]=gl(t);if(s){const a=i[t]=ml(s,o);dl(e,c,a,u)}else r&&(pl(e,c,r,u),i[t]=void 0)}}const Ss=/(?:Once|Passive|Capture)$/;function gl(e){let t;if(Ss.test(e)){t={};let n;for(;n=e.match(Ss);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[ht(e.slice(2)),t]}function ml(e,t){const n=s=>{const o=s.timeStamp||Ko();(cl||o>=n.attached-1)&&me(_l(s,n.value),t,5,[s])};return n.value=e,n.attached=al(),n}function _l(e,t){if(O(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>o=>!o._stopped&&s&&s(o))}else return t}const Ns=/^on[a-z]/,bl=(e,t,n,s,o=!1,i,r,c,u)=>{t==="class"?sl(e,s,o):t==="style"?ol(e,n,s):Jt(t)?Bn(t)||hl(e,t,n,s,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Cl(e,t,s,o))?ll(e,t,s,i,r,c,u):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),rl(e,t,s,o))};function Cl(e,t,n,s){return s?!!(t==="innerHTML"||t==="textContent"||t in e&&Ns.test(t)&&M(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Ns.test(t)&&ee(n)?!1:t in e}const Be="transition",Ct="animation",ss=(e,{slots:t})=>Gr(yo,vl(e),t);ss.displayName="Transition";const Wo={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};ss.props=G({},yo.props,Wo);const ze=(e,t=[])=>{O(e)?e.forEach(n=>n(...t)):e&&e(...t)},Ls=e=>e?O(e)?e.some(t=>t.length>1):e.length>1:!1;function vl(e){const t={};for(const I in e)I in Wo||(t[I]=e[I]);if(e.css===!1)return t;const{name:n="v",type:s,duration:o,enterFromClass:i=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:u=i,appearActiveClass:a=r,appearToClass:p=c,leaveFromClass:b=`${n}-leave-from`,leaveActiveClass:v=`${n}-leave-active`,leaveToClass:k=`${n}-leave-to`}=e,F=yl(o),S=F&&F[0],P=F&&F[1],{onBeforeEnter:L,onEnter:oe,onEnterCancelled:q,onLeave:W,onLeaveCancelled:ie,onBeforeAppear:Oe=L,onAppear:B=oe,onAppearCancelled:J=q}=t,V=(I,Y,ye)=>{it(I,Y?p:c),it(I,Y?a:r),ye&&ye()},fe=(I,Y)=>{it(I,k),it(I,v),Y&&Y()},te=I=>(Y,ye)=>{const tt=I?B:oe,Q=()=>V(Y,I,ye);ze(tt,[Y,Q]),Rs(()=>{it(Y,I?u:i),$e(Y,I?p:c),Ls(tt)||Bs(Y,s,S,Q)})};return G(t,{onBeforeEnter(I){ze(L,[I]),$e(I,i),$e(I,r)},onBeforeAppear(I){ze(Oe,[I]),$e(I,u),$e(I,a)},onEnter:te(!1),onAppear:te(!0),onLeave(I,Y){const ye=()=>fe(I,Y);$e(I,b),El(),$e(I,v),Rs(()=>{it(I,b),$e(I,k),Ls(W)||Bs(I,s,P,ye)}),ze(W,[I,ye])},onEnterCancelled(I){V(I,!1),ze(q,[I])},onAppearCancelled(I){V(I,!0),ze(J,[I])},onLeaveCancelled(I){fe(I),ze(ie,[I])}})}function yl(e){if(e==null)return null;if(Z(e))return[_n(e.enter),_n(e.leave)];{const t=_n(e);return[t,t]}}function _n(e){return Ys(e)}function $e(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function it(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Rs(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let xl=0;function Bs(e,t,n,s){const o=e._endId=++xl,i=()=>{o===e._endId&&s()};if(n)return setTimeout(i,n);const{type:r,timeout:c,propCount:u}=wl(e,t);if(!r)return s();const a=r+"end";let p=0;const b=()=>{e.removeEventListener(a,v),i()},v=k=>{k.target===e&&++p>=u&&b()};setTimeout(()=>{p(n[F]||"").split(", "),o=s(Be+"Delay"),i=s(Be+"Duration"),r=$s(o,i),c=s(Ct+"Delay"),u=s(Ct+"Duration"),a=$s(c,u);let p=null,b=0,v=0;t===Be?r>0&&(p=Be,b=r,v=i.length):t===Ct?a>0&&(p=Ct,b=a,v=u.length):(b=Math.max(r,a),p=b>0?r>a?Be:Ct:null,v=p?p===Be?i.length:u.length:0);const k=p===Be&&/\b(transform|all)(,|$)/.test(n[Be+"Property"]);return{type:p,timeout:b,propCount:v,hasTransform:k}}function $s(e,t){for(;e.lengthDs(n)+Ds(e[s])))}function Ds(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function El(){return document.body.offsetHeight}const Tl=G({patchProp:bl},nl);let js;function Il(){return js||(js=Or(Tl))}const kl=(...e)=>{const t=Il().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=Al(s);if(!o)return;const i=t._component;!M(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.innerHTML="";const r=n(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),r},t};function Al(e){return ee(e)?document.querySelector(e):e}function Hs(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ol(e){return e.replace(/[.*+?^$|[\](){}\\-]/g,"\\$&")}function Pl(e){var t=e.charAt(e.length-1),n=parseInt(e,10),s=new Date;switch(t){case"Y":s.setFullYear(s.getFullYear()+n);break;case"M":s.setMonth(s.getMonth()+n);break;case"D":s.setDate(s.getDate()+n);break;case"h":s.setHours(s.getHours()+n);break;case"m":s.setMinutes(s.getMinutes()+n);break;case"s":s.setSeconds(s.getSeconds()+n);break;default:s=new Date(e)}return s}function Ml(e){var t="";for(var n in e)if(Hs(e,n))if(/^expires$/i.test(n)){var s=e[n];typeof s!="object"&&(s+=typeof s=="number"?"D":"",s=Pl(s)),t+=";"+n+"="+s.toUTCString()}else/^secure$/.test(n)?e[n]&&(t+=";"+n):t+=";"+n+"="+e[n];return Hs(e,"path")||(t+=";path=/"),t}function Fl(e,t){if(t===void 0&&(t=decodeURIComponent),typeof e!="string"||!e)return null;var n=new RegExp("(?:^|; )"+Ol(e)+"(?:=([^;]*))?(?:;|$)"),s=n.exec(document.cookie);return s===null?null:typeof t=="function"?t(s[1]):s[1]}function bn(e,t,n,s){n===void 0&&(n=encodeURIComponent),typeof n=="object"&&n!==null&&(s=n,n=encodeURIComponent);var o=Ml(s||{}),i=typeof n=="function"?n(t):t,r=e+"="+i+o;document.cookie=r}var Vo=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n};const Sl={name:"vue-cookie-accept-decline",props:{elementId:{type:String,required:!0},debug:{type:Boolean,default:!1},disableDecline:{type:Boolean,default:!1},position:{type:String,default:"bottom-left"},type:{type:String,default:"floating"},transitionName:{type:String,default:"slideFromBottom"},showPostponeButton:{type:Boolean,default:!1},forceCookies:{type:Boolean,default:!1}},data(){return{status:null,supportsLocalStorage:!0,isOpen:!1}},computed:{containerPosition(){return`cookie--${this.position}`},containerType(){return`cookie--${this.type}`}},mounted(){this.checkLocalStorageFunctionality(),this.init()},methods:{init(){let e=this.getCookieStatus();e&&(e==="accept"||e==="decline"||e==="postpone")&&(this.isOpen=!1),e||(this.isOpen=!0),this.status=e,this.$emit("status",e)},checkLocalStorageFunctionality(){if(this.forceCookies){this.supportsLocalStorage=!1;return}try{const e="__vue-cookie-accept-decline-check-localStorage";window.localStorage.setItem(e,e),window.localStorage.removeItem(e)}catch{console.error("Local storage is not supported, falling back to cookie use"),this.supportsLocalStorage=!1}},setCookieStatus(e){this.supportsLocalStorage?(e==="accept"&&localStorage.setItem(`vue-cookie-accept-decline-${this.elementId}`,"accept"),e==="decline"&&localStorage.setItem(`vue-cookie-accept-decline-${this.elementId}`,"decline"),e==="postpone"&&localStorage.setItem(`vue-cookie-accept-decline-${this.elementId}`,"postpone")):(e==="accept"&&bn(`vue-cookie-accept-decline-${this.elementId}`,"accept"),e==="decline"&&bn(`vue-cookie-accept-decline-${this.elementId}`,"decline"),e==="postpone"&&bn(`vue-cookie-accept-decline-${this.elementId}`,"postpone"))},getCookieStatus(){return this.supportsLocalStorage?localStorage.getItem(`vue-cookie-accept-decline-${this.elementId}`):Fl(`vue-cookie-accept-decline-${this.elementId}`)},accept(){this.debug||this.setCookieStatus("accept"),this.status="accept",this.isOpen=!1,this.$emit("clicked-accept")},decline(){this.debug||this.setCookieStatus("decline"),this.status="decline",this.isOpen=!1,this.$emit("clicked-decline")},postpone(){this.debug||this.setCookieStatus("postpone"),this.status="postpone",this.isOpen=!1,this.$emit("clicked-postpone")},removeCookie(){localStorage.removeItem(`vue-cookie-accept-decline-${this.elementId}`),this.status=null,this.$emit("removed-cookie")}}},Nl=["id"],Ll=Ae("\xD7"),Rl=Ae(" We use cookies to ensure you get the best experience on our website. "),Bl=le("a",{href:"https://cookiesandyou.com/",target:"_blank"},"Learn More...",-1),$l=Ae("Opt Out"),Dl=Ae("Got It!");function jl(e,t,n,s,o,i){return Ze(),es(ss,{appear:"",name:n.transitionName},{default:ct(()=>[o.isOpen?(Ze(),$t("div",{key:0,class:Te(["cookie",["cookie__"+n.type,"cookie__"+n.type+"--"+n.position]]),id:n.elementId},[le("div",{class:Te("cookie__"+n.type+"__wrap")},[n.showPostponeButton===!0?(Ze(),$t("div",{key:0,onClick:t[0]||(t[0]=(...r)=>i.postpone&&i.postpone(...r)),class:Te("cookie__"+n.type+"__postpone-button"),title:"Close"},[Lt(e.$slots,"postponeContent",{},()=>[Ll])],2)):gn("",!0),le("div",{class:Te("cookie__"+n.type+"__content")},[Lt(e.$slots,"message",{},()=>[Rl,Bl])],2),le("div",{class:Te("cookie__"+n.type+"__buttons")},[n.disableDecline===!1?(Ze(),$t("button",{key:0,onClick:t[1]||(t[1]=(...r)=>i.decline&&i.decline(...r)),class:Te(["cookie__"+n.type+"__buttons__button","cookie__"+n.type+"__buttons__button--decline"])},[Lt(e.$slots,"declineContent",{},()=>[$l])],2)):gn("",!0),le("button",{onClick:t[2]||(t[2]=(...r)=>i.accept&&i.accept(...r)),class:Te(["cookie__"+n.type+"__buttons__button","cookie__"+n.type+"__buttons__button--accept"])},[Lt(e.$slots,"acceptContent",{},()=>[Dl])],2)],2)],2)],10,Nl)):gn("",!0)]),_:3},8,["name"])}var zo=Vo(Sl,[["render",jl]]);function Nn(e){Nn.installed||(Nn.installed=!0,e.component("VueCookieAcceptDecline",zo))}const Hl={install:Nn};let Tt=null;typeof window!="undefined"?Tt=window.Vue:typeof global!="undefined"&&(Tt=global.Vue);Tt&&"use"in Tt&&Tt.use(Hl);const Ul={name:"app",data(){return{status:null}},methods:{cookieStatus(e){console.log("status: "+e),this.status=e},cookieClickedAccept(){console.log("here in accept"),this.status="accept"},cookieClickedDecline(){console.log("here in decline"),this.status="decline"},cookieClickedPostpone(){console.log("here in postpone"),this.status="postpone"},cookieRemovedCookie(){console.log("here in cookieRemoved"),this.status=null,this.$refs.myPanel1.init()},removeCookie(){console.log("Cookie removed"),this.$refs.myPanel1.removeCookie()}},computed:{statusText(){return this.status||"No cookie set"}}},Kl={id:"app"},Wl=Dr('

vue-cookie-accept-decline

To install:
yarn add vue-cookie-accept-decline

',4),Vl={class:"container py-3"},zl={class:"row justify-content-center"},ql={class:"col-xl-4"},Yl={class:"col-xl-4"},Jl={class:"code-text"},Zl=Ae(" Status: "),Xl=Ae("\xD7"),Ql=Ae(" We use cookies to ensure you get the best experience on our website. "),Gl=le("a",{href:"https://cookiesandyou.com/",target:"_blank"},"Learn More...",-1),ec=Ae("Opt Out"),tc=Ae("Got It!");function nc(e,t,n,s,o,i){const r=Sr("vue-cookie-accept-decline");return Ze(),$t("div",Kl,[Wl,le("div",Vl,[le("div",zl,[le("div",ql,[le("button",{onClick:t[0]||(t[0]=(...c)=>i.removeCookie&&i.removeCookie(...c)),class:"btn btn-primary btn-block mb-4"},"\xD7 \xA0 Remove Browser Cookie")]),le("div",Yl,[le("div",Jl,[Zl,le("strong",null,ni(i.statusText),1)])])])]),se(r,{debug:!1,disableDecline:!1,showPostponeButton:!1,onClickedAccept:i.cookieClickedAccept,onClickedDecline:i.cookieClickedDecline,onClickedPostpone:i.cookieClickedPostpone,onRemovedCookie:i.cookieRemovedCookie,onStatus:i.cookieStatus,elementId:"myPanel1",position:"bottom-left",ref:"myPanel1",transitionName:"slideFromBottom",type:"floating"},{postponeContent:ct(()=>[Xl]),message:ct(()=>[Ql,Gl]),declineContent:ct(()=>[ec]),acceptContent:ct(()=>[tc]),_:1},8,["onClickedAccept","onClickedDecline","onClickedPostpone","onRemovedCookie","onStatus"])])}var sc=Vo(Ul,[["render",nc]]);const qo=kl(sc);qo.component("vue-cookie-accept-decline",zo);qo.mount("#app"); 2 | --------------------------------------------------------------------------------