├── .flaskenv
├── backend
├── blueprints
│ ├── __init__.py
│ ├── todos.py
│ └── auth.py
├── settings.py
├── models.py
└── __init__.py
├── migrations
├── README
├── script.py.mako
├── alembic.ini
├── versions
│ └── 2bf70104f880_.py
└── env.py
├── preview.png
├── frontend
├── dist
│ ├── flask.png
│ ├── logo.png
│ └── build.js
├── .babelrc
├── src
│ ├── assets
│ │ ├── flask.png
│ │ └── logo.png
│ ├── store
│ │ ├── todos
│ │ │ ├── index.js
│ │ │ ├── mutations.js
│ │ │ └── actions.js
│ │ └── index.js
│ ├── main.js
│ ├── router.js
│ ├── components
│ │ ├── Home.vue
│ │ ├── Login.vue
│ │ ├── Register.vue
│ │ ├── TodoItem.vue
│ │ └── Todo.vue
│ ├── api
│ │ └── index.js
│ └── App.vue
├── .editorconfig
├── index.html
├── package.json
└── webpack.config.js
├── Procfile
├── .gitignore
├── Pipfile
├── app.json
├── LICENSE
├── README.md
└── Pipfile.lock
/.flaskenv:
--------------------------------------------------------------------------------
1 | FLASK_APP=backend
2 |
--------------------------------------------------------------------------------
/backend/blueprints/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/migrations/README:
--------------------------------------------------------------------------------
1 | Generic single-database configuration.
--------------------------------------------------------------------------------
/preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/frostming/flask-vue-todo/HEAD/preview.png
--------------------------------------------------------------------------------
/frontend/dist/flask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/frostming/flask-vue-todo/HEAD/frontend/dist/flask.png
--------------------------------------------------------------------------------
/frontend/dist/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/frostming/flask-vue-todo/HEAD/frontend/dist/logo.png
--------------------------------------------------------------------------------
/Procfile:
--------------------------------------------------------------------------------
1 | web: flask db upgrade && gunicorn --access-logfile - --error-logfile - -w 4 "backend:create_app()"
2 |
--------------------------------------------------------------------------------
/frontend/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", { "modules": false }],
4 | "stage-3"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/frontend/src/assets/flask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/frostming/flask-vue-todo/HEAD/frontend/src/assets/flask.png
--------------------------------------------------------------------------------
/frontend/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/frostming/flask-vue-todo/HEAD/frontend/src/assets/logo.png
--------------------------------------------------------------------------------
/frontend/src/store/todos/index.js:
--------------------------------------------------------------------------------
1 | import mutations from './mutations'
2 | import actions from './actions'
3 |
4 | export default {
5 | state: [],
6 | mutations,
7 | actions
8 | }
9 |
--------------------------------------------------------------------------------
/frontend/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/frontend/src/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 | import todos from './todos'
4 |
5 | Vue.use(Vuex)
6 |
7 | export default new Vuex.Store({
8 | modules: { todos }
9 | })
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 |
4 | npm-debug.log
5 | yarn-error.log
6 |
7 | # Editor directories and files
8 | .idea
9 | *.suo
10 | *.ntvs*
11 | *.njsproj
12 | *.sln
13 |
14 | .py[cod]
15 | .vscode/
16 | __pycache__/
17 | db.sqlite3
18 |
--------------------------------------------------------------------------------
/backend/settings.py:
--------------------------------------------------------------------------------
1 | import os
2 |
3 | here = os.path.dirname(__file__)
4 |
5 | SECRET_KEY = 'flask-vue-todo-app'
6 | WTF_CSRF_ENABLED = True
7 | SQLALCHEMY_TRACK_MODIFICATIONS = False
8 |
9 | if 'DATABASE_URL' in os.environ:
10 | SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL')
11 | else:
12 | SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(here, 'db.sqlite3')
13 |
--------------------------------------------------------------------------------
/Pipfile:
--------------------------------------------------------------------------------
1 | [[source]]
2 | url = "https://pypi.org/simple"
3 | verify_ssl = true
4 | name = "pypi"
5 |
6 | [packages]
7 | flask = "*"
8 | flask-sqlalchemy = "*"
9 | flask-wtf = "*"
10 | flask-login = "*"
11 | flask-migrate = "*"
12 | python-dotenv = "*"
13 | flask-cors = "*"
14 | psycopg2 = "*"
15 | gunicorn = "*"
16 |
17 | [dev-packages]
18 |
19 | [requires]
20 | python_version = "3.7"
21 |
--------------------------------------------------------------------------------
/frontend/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | flask-vue-todo
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/frontend/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App.vue'
3 | import store from './store'
4 | import VueFlashMessage from 'vue-flash-message';
5 | import VueRouter from 'vue-router'
6 | import router from './router'
7 | Vue.use(VueFlashMessage, {
8 | messageOptions: {
9 | timeout: 3000
10 | }
11 | })
12 | Vue.use(VueRouter)
13 |
14 | new Vue({
15 | store,
16 | router,
17 | el: '#app',
18 | render: h => h(App)
19 | })
20 |
--------------------------------------------------------------------------------
/frontend/src/store/todos/mutations.js:
--------------------------------------------------------------------------------
1 | export default {
2 | addTodo (state, todo) {
3 | state.push(todo)
4 | },
5 |
6 | removeTodo (state, todo) {
7 | state.splice(state.indexOf(todo), 1)
8 | },
9 |
10 | editTodo (state, { todo, text = todo.text, done = todo.done }) {
11 | todo.text = text
12 | todo.done = done
13 | },
14 |
15 | setTodos (state, todos) {
16 | state.splice(0, state.length, ...todos)
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/frontend/src/router.js:
--------------------------------------------------------------------------------
1 | import VueRouter from 'vue-router'
2 |
3 | import Home from './components/Home.vue'
4 | import Login from './components/Login.vue'
5 | import Register from './components/Register.vue'
6 |
7 |
8 | const router = new VueRouter({
9 | routes: [
10 | { path: '/', component: Home },
11 | { path: '/login', component: Login },
12 | { path: '/register', component: Register },
13 | ]
14 | })
15 |
16 | export default router
17 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Flask-Vue-Todo",
3 | "description": "A todo app with Vue and backed by Flask",
4 | "keywords": [
5 | "Vue",
6 | "Flask",
7 | "Todo"
8 | ],
9 | "repository": "https://github.com/frostming/flask-vue-todo",
10 | "logo": "https://frostming.com/static/images/favicon.png",
11 | "buildpacks": [
12 | {
13 | "url": "heroku/python"
14 | }
15 | ],
16 | "image": "heroku/heroku:16",
17 | "addons": [
18 | "heroku-postgresql"
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/migrations/script.py.mako:
--------------------------------------------------------------------------------
1 | """${message}
2 |
3 | Revision ID: ${up_revision}
4 | Revises: ${down_revision | comma,n}
5 | Create Date: ${create_date}
6 |
7 | """
8 | from alembic import op
9 | import sqlalchemy as sa
10 | ${imports if imports else ""}
11 |
12 | # revision identifiers, used by Alembic.
13 | revision = ${repr(up_revision)}
14 | down_revision = ${repr(down_revision)}
15 | branch_labels = ${repr(branch_labels)}
16 | depends_on = ${repr(depends_on)}
17 |
18 |
19 | def upgrade():
20 | ${upgrades if upgrades else "pass"}
21 |
22 |
23 | def downgrade():
24 | ${downgrades if downgrades else "pass"}
25 |
--------------------------------------------------------------------------------
/migrations/alembic.ini:
--------------------------------------------------------------------------------
1 | # A generic, single database configuration.
2 |
3 | [alembic]
4 | # template used to generate migration files
5 | # file_template = %%(rev)s_%%(slug)s
6 |
7 | # set to 'true' to run the environment during
8 | # the 'revision' command, regardless of autogenerate
9 | # revision_environment = false
10 |
11 |
12 | # Logging configuration
13 | [loggers]
14 | keys = root,sqlalchemy,alembic
15 |
16 | [handlers]
17 | keys = console
18 |
19 | [formatters]
20 | keys = generic
21 |
22 | [logger_root]
23 | level = WARN
24 | handlers = console
25 | qualname =
26 |
27 | [logger_sqlalchemy]
28 | level = WARN
29 | handlers =
30 | qualname = sqlalchemy.engine
31 |
32 | [logger_alembic]
33 | level = INFO
34 | handlers =
35 | qualname = alembic
36 |
37 | [handler_console]
38 | class = StreamHandler
39 | args = (sys.stderr,)
40 | level = NOTSET
41 | formatter = generic
42 |
43 | [formatter_generic]
44 | format = %(levelname)-5.5s [%(name)s] %(message)s
45 | datefmt = %H:%M:%S
46 |
--------------------------------------------------------------------------------
/frontend/src/components/Home.vue:
--------------------------------------------------------------------------------
1 |
27 |
28 |
29 |
30 |
31 | Login
32 | Register
33 |
34 |
35 |
36 |
45 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Frost Ming
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 |
--------------------------------------------------------------------------------
/frontend/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "flask-vue-todo",
3 | "description": "A todo app with Vue and backed by Flask",
4 | "version": "1.0.0",
5 | "author": "frostming ",
6 | "license": "MIT",
7 | "private": true,
8 | "scripts": {
9 | "dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
10 | "build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
11 | },
12 | "dependencies": {
13 | "axios": "^0.18.0",
14 | "vue": "^2.5.11",
15 | "vue-flash-message": "^0.6.2",
16 | "vue-router": "^3.0.1",
17 | "vuex": "^3.0.1"
18 | },
19 | "browserslist": [
20 | "> 1%",
21 | "last 2 versions",
22 | "not ie <= 8"
23 | ],
24 | "devDependencies": {
25 | "babel-core": "^6.26.0",
26 | "babel-loader": "^7.1.2",
27 | "babel-preset-env": "^1.6.0",
28 | "babel-preset-stage-3": "^6.24.1",
29 | "cross-env": "^5.0.5",
30 | "css-loader": "^0.28.7",
31 | "file-loader": "^1.1.4",
32 | "vue-loader": "^13.0.5",
33 | "vue-template-compiler": "^2.4.4",
34 | "webpack": "^3.6.0",
35 | "webpack-dev-server": "^2.9.1"
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/backend/models.py:
--------------------------------------------------------------------------------
1 | from flask_sqlalchemy import SQLAlchemy
2 | from flask_login import UserMixin
3 | from werkzeug.security import generate_password_hash, check_password_hash
4 |
5 |
6 | db = SQLAlchemy()
7 |
8 |
9 | class Todo(db.Model):
10 | id = db.Column(db.Integer, primary_key=True)
11 | text = db.Column(db.String(80), nullable=False)
12 | done = db.Column(db.Boolean, default=False)
13 | user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
14 |
15 | def to_json(self):
16 | return {k: getattr(self, k) for k in ('id', 'text', 'done')}
17 |
18 |
19 | class User(db.Model, UserMixin):
20 | id = db.Column(db.Integer, primary_key=True)
21 | username = db.Column(db.String(64), unique=True)
22 | password = db.Column(db.String(200))
23 | todos = db.relationship('Todo', backref='user')
24 |
25 | def __init__(self, **kwargs):
26 | password = kwargs.pop('password')
27 | password = generate_password_hash(password)
28 | kwargs['password'] = password
29 | super(User, self).__init__(**kwargs)
30 |
31 | def check_password(self, password):
32 | return check_password_hash(self.password, password)
33 |
34 | def to_json(self):
35 | return {'id': self.id, 'username': self.username}
36 |
--------------------------------------------------------------------------------
/migrations/versions/2bf70104f880_.py:
--------------------------------------------------------------------------------
1 | """empty message
2 |
3 | Revision ID: 2bf70104f880
4 | Revises:
5 | Create Date: 2018-09-17 17:13:21.322605
6 |
7 | """
8 | from alembic import op
9 | import sqlalchemy as sa
10 |
11 |
12 | # revision identifiers, used by Alembic.
13 | revision = '2bf70104f880'
14 | down_revision = None
15 | branch_labels = None
16 | depends_on = None
17 |
18 |
19 | def upgrade():
20 | # ### commands auto generated by Alembic - please adjust! ###
21 | op.create_table('user',
22 | sa.Column('id', sa.Integer(), nullable=False),
23 | sa.Column('username', sa.String(length=64), nullable=True),
24 | sa.Column('password', sa.String(length=200), nullable=True),
25 | sa.PrimaryKeyConstraint('id'),
26 | sa.UniqueConstraint('username')
27 | )
28 | op.create_table('todo',
29 | sa.Column('id', sa.Integer(), nullable=False),
30 | sa.Column('text', sa.String(length=80), nullable=False),
31 | sa.Column('done', sa.Boolean(), nullable=True),
32 | sa.Column('user_id', sa.Integer(), nullable=True),
33 | sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
34 | sa.PrimaryKeyConstraint('id')
35 | )
36 | # ### end Alembic commands ###
37 |
38 |
39 | def downgrade():
40 | # ### commands auto generated by Alembic - please adjust! ###
41 | op.drop_table('todo')
42 | op.drop_table('user')
43 | # ### end Alembic commands ###
44 |
--------------------------------------------------------------------------------
/backend/__init__.py:
--------------------------------------------------------------------------------
1 | import os
2 | from werkzeug.exceptions import HTTPException
3 | from flask import Flask, jsonify, render_template
4 | from flask_wtf import CSRFProtect
5 | from flask_migrate import Migrate
6 | from flask_cors import CORS
7 | from flask_login import LoginManager
8 |
9 | from backend.models import db, User
10 | from backend.blueprints import todos, auth
11 |
12 | FRONTEND_FOLDER = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'frontend')
13 |
14 |
15 | def create_app():
16 | app = Flask(
17 | __name__, static_folder=os.path.join(FRONTEND_FOLDER, 'dist'),
18 | template_folder=FRONTEND_FOLDER
19 | )
20 | app.config.from_pyfile('settings.py')
21 | db.init_app(app)
22 | CSRFProtect(app)
23 | Migrate(app, db)
24 | CORS(app)
25 | lm = LoginManager(app)
26 |
27 | @lm.user_loader
28 | def load_user(uid):
29 | return User.query.get(uid)
30 |
31 | @app.route('/')
32 | def index():
33 | return render_template('index.html')
34 |
35 | app.register_blueprint(todos.bp, url_prefix="/")
36 | app.register_blueprint(auth.bp, url_prefix="/auth")
37 | register_error_handlers(app)
38 | return app
39 |
40 |
41 | def register_error_handlers(app):
42 |
43 | @app.errorhandler(HTTPException)
44 | def handle_http_error(exc):
45 | return jsonify({'status': 'error', 'description': exc.description}), exc.code
46 |
--------------------------------------------------------------------------------
/backend/blueprints/todos.py:
--------------------------------------------------------------------------------
1 | from flask import Blueprint, jsonify, request
2 | from flask.views import MethodView
3 | from flask_login import login_required, current_user
4 |
5 | from backend.models import Todo, db
6 |
7 |
8 | bp = Blueprint('todo', __name__)
9 |
10 |
11 | @bp.route('/todos')
12 | @login_required
13 | def get_todos():
14 | return jsonify([todo.to_json() for todo in current_user.todos])
15 |
16 |
17 | class TodoView(MethodView):
18 |
19 | def post(self):
20 | todo = Todo(**request.get_json())
21 | todo.user = current_user
22 | db.session.add(todo)
23 | db.session.commit()
24 | return jsonify({'status': 'success', 'todo': todo.to_json()})
25 |
26 | def put(self, todo_id):
27 | todo = Todo.query.get_or_404(todo_id)
28 | data = request.get_json()
29 | for k, v in data.items():
30 | setattr(todo, k, v)
31 | db.session.commit()
32 | return jsonify({'status': 'success', 'todo': todo.to_json()})
33 |
34 | def delete(self, todo_id):
35 | todo = Todo.query.get_or_404(todo_id)
36 | db.session.delete(todo)
37 | db.session.commit()
38 | return jsonify({'status': 'success'})
39 |
40 | todo_api = login_required(TodoView.as_view('todo'))
41 | bp.add_url_rule('/todo', view_func=todo_api, methods=['POST'])
42 | bp.add_url_rule('/todo/', view_func=todo_api, methods=['PUT', 'DELETE'])
43 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # flask-vue-todo
2 |
3 | > A todo app with Vue and backed by Flask
4 |
5 | 🚀 [Live Demo](https://fv-todo.herokuapp.com)
6 | 
7 |
8 | The demo is deployed on Heroku's free dyno and provides an interface of register/login for the use of a small group of users.
9 |
10 | ## Start frontend development server
11 |
12 | ``` bash
13 | cd frontend
14 | # install dependencies
15 | yarn install
16 |
17 | # serve with hot reload at localhost:8080
18 | yarn run dev
19 |
20 | # build for production with minification
21 | yarn run build
22 | ```
23 | Replace `yarn` with `npm` if you are using `npm`. Frontend pages will be served at http://localhost:8080
24 |
25 | ***Note**: In this mode, the backend is not available yet, any server request will fail on the page. It is only for frontend debugging.*
26 |
27 | ## Start flask development server
28 |
29 | ``` bash
30 | # In the repo root, install all dependencies
31 | pipenv install
32 |
33 | # Init DB
34 | pipenv run flask db upgrade
35 |
36 | # Start development server
37 | FLASK_ENV=development pipenv run flask run
38 | ```
39 | Pages will be served at http://localhost:5000.
40 |
41 | ***Note**: In this mode, all pages are served by Flask, so you need to build the frontend before this step.*
42 |
43 | ## Deploy to Heroku
44 |
45 | [](https://heroku.com/deploy)
46 |
47 | ## License
48 |
49 | This work is released under MIT License, originated by @frostming. See more details: [LICENSE](/LICENSE)
50 |
--------------------------------------------------------------------------------
/frontend/src/store/todos/actions.js:
--------------------------------------------------------------------------------
1 | import todoApi from '../../api'
2 |
3 | export const types = {
4 | ADD_TODO: 'addTodo',
5 | REMOVE_TODO: 'removeTodo',
6 | TOGGLE_TODO: 'toggleTodo',
7 | EDIT_TODO: 'editTodo',
8 | GET_TODOS: 'getTodos'
9 | }
10 |
11 | export default {
12 | [types.ADD_TODO] ({commit}, text) {
13 | const todo = {text, done: false}
14 | const vm = this
15 | return todoApi.addTodo(todo).then(data => {
16 | commit('addTodo', data.todo)
17 | }).catch(e => {
18 | vm.error(e.response.data.description)
19 | })
20 | },
21 | [types.REMOVE_TODO] ({commit}, todo) {
22 | commit('removeTodo', todo)
23 | const vm = this
24 | return todoApi.removeTodo(todo).catch(e => {
25 | vm.error(e.response.data.description)
26 | })
27 | },
28 | [types.TOGGLE_TODO] ({commit}, todo) {
29 | commit('editTodo', {todo, done:!todo.done})
30 | const vm = this
31 | return todoApi.editTodo(todo).catch(e => {
32 | vm.error(e.response.data.description)
33 | })
34 | },
35 | [types.EDIT_TODO] ({commit}, {todo, value}) {
36 | commit('editTodo', {todo, text:value})
37 | const vm = this
38 | return todoApi.editTodo(todo).catch(e => {
39 | vm.error(e.response.data.description)
40 | })
41 | },
42 | [types.GET_TODOS] ({commit}) {
43 | const vm = this
44 | return todoApi.getTodos().then(data => {
45 | commit('setTodos', data)
46 | }).catch(e => {
47 | vm.error(e.response.data.description)
48 | })
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/frontend/src/api/index.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios'
2 |
3 |
4 | const mockTodos = [
5 | {id: 1, text: 'Item 1', done: false},
6 | {id: 2, text: 'Item 2', done: true}
7 | ]
8 |
9 | const mockRequest = ()=>{
10 | return new Promise((resolve, reject)=>{
11 | setTimeout(()=>{
12 | Math.random() < 0.85 ? resolve(mockTodos) : reject(new Error("Get Todo list error!"))
13 | }, 100)
14 | })
15 | }
16 |
17 | const api = axios.create({
18 | headers: {
19 | 'Content-Type': 'application/json',
20 | 'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').getAttribute('content')}
21 | })
22 |
23 | export default {
24 | getTodos () {
25 | return api.get('/todos').then(response => response.data)
26 | },
27 | addTodo (todo) {
28 | return api.post('/todo', todo).then(response => response.data)
29 | },
30 | removeTodo (todo) {
31 | return api.delete('/todo/' + todo.id).then(response => response.data)
32 | },
33 | editTodo (todo) {
34 | return api.put('/todo/' + todo.id, todo).then(response => response.data)
35 | },
36 | login({username, password, remember}) {
37 | return api.post('/auth/login', {username, password, remember}).then(response => response.data)
38 | },
39 | logout() {
40 | return api.get('/auth/logout').then(response => response.data)
41 | },
42 | register({username, password}) {
43 | return api.post('/auth/register', {username, password}).then(response => response.data)
44 | },
45 | getSession() {
46 | return api.get('/auth/session').then(response => response.data)
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/frontend/src/components/Login.vue:
--------------------------------------------------------------------------------
1 |
34 |
35 |
36 |
57 |
58 |
59 |
61 |
--------------------------------------------------------------------------------
/frontend/webpack.config.js:
--------------------------------------------------------------------------------
1 | var path = require('path')
2 | var webpack = require('webpack')
3 |
4 | module.exports = {
5 | entry: './src/main.js',
6 | output: {
7 | path: path.resolve(__dirname, './dist'),
8 | publicPath: '/dist/',
9 | filename: 'build.js'
10 | },
11 | module: {
12 | rules: [
13 | {
14 | test: /\.css$/,
15 | use: [
16 | 'vue-style-loader',
17 | 'css-loader'
18 | ],
19 | }, {
20 | test: /\.vue$/,
21 | loader: 'vue-loader',
22 | options: {
23 | loaders: {
24 | }
25 | // other vue-loader options go here
26 | }
27 | },
28 | {
29 | test: /\.js$/,
30 | loader: 'babel-loader',
31 | exclude: /node_modules/
32 | },
33 | {
34 | test: /\.(png|jpg|gif|svg)$/,
35 | loader: 'file-loader',
36 | options: {
37 | name: '[name].[ext]?[hash]'
38 | }
39 | }
40 | ]
41 | },
42 | resolve: {
43 | alias: {
44 | 'vue$': 'vue/dist/vue.esm.js'
45 | },
46 | extensions: ['*', '.js', '.vue', '.json']
47 | },
48 | devServer: {
49 | historyApiFallback: true,
50 | noInfo: true,
51 | overlay: true
52 | },
53 | performance: {
54 | hints: false
55 | },
56 | devtool: '#eval-source-map'
57 | }
58 |
59 | if (process.env.NODE_ENV === 'production') {
60 | module.exports.devtool = '#source-map'
61 | // http://vue-loader.vuejs.org/en/workflow/production.html
62 | module.exports.plugins = (module.exports.plugins || []).concat([
63 | new webpack.DefinePlugin({
64 | 'process.env': {
65 | NODE_ENV: '"production"'
66 | }
67 | }),
68 | new webpack.optimize.UglifyJsPlugin({
69 | sourceMap: true,
70 | compress: {
71 | warnings: false
72 | }
73 | }),
74 | new webpack.LoaderOptionsPlugin({
75 | minimize: true
76 | })
77 | ])
78 | }
79 |
--------------------------------------------------------------------------------
/frontend/src/components/Register.vue:
--------------------------------------------------------------------------------
1 |
38 |
39 |
40 |
59 |
60 |
61 |
64 |
--------------------------------------------------------------------------------
/frontend/src/components/TodoItem.vue:
--------------------------------------------------------------------------------
1 |
14 |
15 |
16 |
17 |
18 |
25 |
26 |
27 |
28 |
29 |
30 |
89 |
--------------------------------------------------------------------------------
/frontend/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |

5 |

6 |
Flask Vue Todo
7 |
10 |
16 |
17 |
18 |
19 |
26 |
27 |
105 |
--------------------------------------------------------------------------------
/frontend/src/components/Todo.vue:
--------------------------------------------------------------------------------
1 |
40 |
41 |
42 |
57 |
58 |
59 |
97 |
--------------------------------------------------------------------------------
/backend/blueprints/auth.py:
--------------------------------------------------------------------------------
1 | from flask import Blueprint, jsonify, request
2 | from flask_login import current_user, login_user, logout_user
3 | from flask_wtf import FlaskForm
4 | from wtforms import StringField, PasswordField, BooleanField
5 | from wtforms.validators import ValidationError, Length
6 |
7 | from backend.models import User, db
8 |
9 | bp = Blueprint('auth', __name__)
10 |
11 |
12 | class RegisterForm(FlaskForm):
13 | username = StringField('Username', validators=[Length(max=64)])
14 | password = PasswordField('Password', validators=[Length(8, 16)])
15 | confirm = PasswordField('Confirm Password')
16 |
17 | def validate_username(self, field):
18 | if User.query.filter_by(username=field.data).count() > 0:
19 | raise ValidationError('Username %s already exists!' % field.data)
20 |
21 |
22 | class LoginForm(FlaskForm):
23 | username = StringField('Username', validators=[Length(max=64)])
24 | password = PasswordField('Password', validators=[Length(8, 16)])
25 | remember = BooleanField('Remember Me')
26 |
27 | def validate_username(self, field):
28 | if not self.get_user():
29 | raise ValidationError('Invalid username!')
30 |
31 | def validate_password(self, field):
32 | if not self.get_user():
33 | return
34 | if not self.get_user().check_password(field.data):
35 | raise ValidationError('Incorrect password!')
36 |
37 | def get_user(self):
38 | return User.query.filter_by(username=self.username.data).first()
39 |
40 |
41 | @bp.route('/register', methods=['POST'])
42 | def register():
43 | user_data = request.get_json()
44 | form = RegisterForm(data=user_data)
45 | if form.validate():
46 | user = User(username=user_data['username'], password=user_data['password'])
47 | db.session.add(user)
48 | db.session.commit()
49 | return jsonify({'status': 'success'})
50 | return jsonify({'status': 'error', 'message': form.errors}), 400
51 |
52 |
53 | @bp.route('/login', methods=['POST'])
54 | def login():
55 | user_data = request.get_json()
56 | form = LoginForm(data=user_data)
57 | if form.validate():
58 | user = form.get_user()
59 | login_user(user, remember=form.remember.data)
60 | return jsonify({'status': 'success', 'user': user.to_json()})
61 | return jsonify({'status': 'error', 'message': form.errors}), 403
62 |
63 |
64 | @bp.route('/session')
65 | def get_session():
66 | if not current_user.is_authenticated:
67 | return jsonify({'status': 'error'}), 401
68 | return jsonify({'status': 'success', 'user': current_user.to_json()})
69 |
70 |
71 | @bp.route('/logout')
72 | def logout():
73 | logout_user()
74 | return jsonify({'status': 'success'})
75 |
--------------------------------------------------------------------------------
/migrations/env.py:
--------------------------------------------------------------------------------
1 | from __future__ import with_statement
2 | from alembic import context
3 | from sqlalchemy import engine_from_config, pool
4 | from logging.config import fileConfig
5 | import logging
6 |
7 | # this is the Alembic Config object, which provides
8 | # access to the values within the .ini file in use.
9 | config = context.config
10 |
11 | # Interpret the config file for Python logging.
12 | # This line sets up loggers basically.
13 | fileConfig(config.config_file_name)
14 | logger = logging.getLogger('alembic.env')
15 |
16 | # add your model's MetaData object here
17 | # for 'autogenerate' support
18 | # from myapp import mymodel
19 | # target_metadata = mymodel.Base.metadata
20 | from flask import current_app
21 | config.set_main_option('sqlalchemy.url',
22 | current_app.config.get('SQLALCHEMY_DATABASE_URI'))
23 | target_metadata = current_app.extensions['migrate'].db.metadata
24 |
25 | # other values from the config, defined by the needs of env.py,
26 | # can be acquired:
27 | # my_important_option = config.get_main_option("my_important_option")
28 | # ... etc.
29 |
30 |
31 | def run_migrations_offline():
32 | """Run migrations in 'offline' mode.
33 |
34 | This configures the context with just a URL
35 | and not an Engine, though an Engine is acceptable
36 | here as well. By skipping the Engine creation
37 | we don't even need a DBAPI to be available.
38 |
39 | Calls to context.execute() here emit the given string to the
40 | script output.
41 |
42 | """
43 | url = config.get_main_option("sqlalchemy.url")
44 | context.configure(url=url)
45 |
46 | with context.begin_transaction():
47 | context.run_migrations()
48 |
49 |
50 | def run_migrations_online():
51 | """Run migrations in 'online' mode.
52 |
53 | In this scenario we need to create an Engine
54 | and associate a connection with the context.
55 |
56 | """
57 |
58 | # this callback is used to prevent an auto-migration from being generated
59 | # when there are no changes to the schema
60 | # reference: http://alembic.zzzcomputing.com/en/latest/cookbook.html
61 | def process_revision_directives(context, revision, directives):
62 | if getattr(config.cmd_opts, 'autogenerate', False):
63 | script = directives[0]
64 | if script.upgrade_ops.is_empty():
65 | directives[:] = []
66 | logger.info('No changes in schema detected.')
67 |
68 | engine = engine_from_config(config.get_section(config.config_ini_section),
69 | prefix='sqlalchemy.',
70 | poolclass=pool.NullPool)
71 |
72 | connection = engine.connect()
73 | context.configure(connection=connection,
74 | target_metadata=target_metadata,
75 | process_revision_directives=process_revision_directives,
76 | **current_app.extensions['migrate'].configure_args)
77 |
78 | try:
79 | with context.begin_transaction():
80 | context.run_migrations()
81 | finally:
82 | connection.close()
83 |
84 | if context.is_offline_mode():
85 | run_migrations_offline()
86 | else:
87 | run_migrations_online()
88 |
--------------------------------------------------------------------------------
/Pipfile.lock:
--------------------------------------------------------------------------------
1 | {
2 | "_meta": {
3 | "hash": {
4 | "sha256": "9be7597d86ec4f3944d72c721d8871388955e963a363159b923631cc8aad8d7b"
5 | },
6 | "pipfile-spec": 6,
7 | "requires": {
8 | "python_version": "3.7"
9 | },
10 | "sources": [
11 | {
12 | "name": "pypi",
13 | "url": "https://pypi.org/simple",
14 | "verify_ssl": true
15 | }
16 | ]
17 | },
18 | "default": {
19 | "alembic": {
20 | "hashes": [
21 | "sha256:52d73b1d750f1414fa90c25a08da47b87de1e4ad883935718a8f36396e19e78e",
22 | "sha256:eb7db9b4510562ec37c91d00b00d95fde076c1030d3f661aea882eec532b3565"
23 | ],
24 | "version": "==1.0.0"
25 | },
26 | "click": {
27 | "hashes": [
28 | "sha256:29f99fc6125fbc931b758dc053b3114e55c77a6e4c6c3a2674a2dc986016381d",
29 | "sha256:f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b"
30 | ],
31 | "version": "==6.7"
32 | },
33 | "flask": {
34 | "hashes": [
35 | "sha256:2271c0070dbcb5275fad4a82e29f23ab92682dc45f9dfbc22c02ba9b9322ce48",
36 | "sha256:a080b744b7e345ccfcbc77954861cb05b3c63786e93f2b3875e0913d44b43f05"
37 | ],
38 | "index": "pypi",
39 | "version": "==1.0.2"
40 | },
41 | "flask-cors": {
42 | "hashes": [
43 | "sha256:e4c8fc15d3e4b4cce6d3b325f2bab91e0e09811a61f50d7a53493bc44242a4f1",
44 | "sha256:ecc016c5b32fa5da813ec8d272941cfddf5f6bba9060c405a70285415cbf24c9"
45 | ],
46 | "index": "pypi",
47 | "version": "==3.0.6"
48 | },
49 | "flask-login": {
50 | "hashes": [
51 | "sha256:c815c1ac7b3e35e2081685e389a665f2c74d7e077cb93cecabaea352da4752ec"
52 | ],
53 | "index": "pypi",
54 | "version": "==0.4.1"
55 | },
56 | "flask-migrate": {
57 | "hashes": [
58 | "sha256:83ebc105f87357ddd3968f83510d2b1092f006660b1c6ba07a4efce036ca567d",
59 | "sha256:cd1b4e6cb829eeb41c02ad9202d83bef5f4b7a036dd9fad72ce96ad1e22efb07"
60 | ],
61 | "index": "pypi",
62 | "version": "==2.2.1"
63 | },
64 | "flask-sqlalchemy": {
65 | "hashes": [
66 | "sha256:3bc0fac969dd8c0ace01b32060f0c729565293302f0c4269beed154b46bec50b",
67 | "sha256:5971b9852b5888655f11db634e87725a9031e170f37c0ce7851cf83497f56e53"
68 | ],
69 | "index": "pypi",
70 | "version": "==2.3.2"
71 | },
72 | "flask-wtf": {
73 | "hashes": [
74 | "sha256:5d14d55cfd35f613d99ee7cba0fc3fbbe63ba02f544d349158c14ca15561cc36",
75 | "sha256:d9a9e366b32dcbb98ef17228e76be15702cd2600675668bca23f63a7947fd5ac"
76 | ],
77 | "index": "pypi",
78 | "version": "==0.14.2"
79 | },
80 | "gunicorn": {
81 | "hashes": [
82 | "sha256:aa8e0b40b4157b36a5df5e599f45c9c76d6af43845ba3b3b0efe2c70473c2471",
83 | "sha256:fa2662097c66f920f53f70621c6c58ca4a3c4d3434205e608e121b5b3b71f4f3"
84 | ],
85 | "index": "pypi",
86 | "version": "==19.9.0"
87 | },
88 | "itsdangerous": {
89 | "hashes": [
90 | "sha256:cbb3fcf8d3e33df861709ecaf89d9e6629cff0a217bc2848f1b41cd30d360519"
91 | ],
92 | "version": "==0.24"
93 | },
94 | "jinja2": {
95 | "hashes": [
96 | "sha256:74c935a1b8bb9a3947c50a54766a969d4846290e1e788ea44c1392163723c3bd",
97 | "sha256:f84be1bb0040caca4cea721fcbbbbd61f9be9464ca236387158b0feea01914a4"
98 | ],
99 | "version": "==2.10"
100 | },
101 | "mako": {
102 | "hashes": [
103 | "sha256:4e02fde57bd4abb5ec400181e4c314f56ac3e49ba4fb8b0d50bba18cb27d25ae"
104 | ],
105 | "version": "==1.0.7"
106 | },
107 | "markupsafe": {
108 | "hashes": [
109 | "sha256:a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665"
110 | ],
111 | "version": "==1.0"
112 | },
113 | "psycopg2": {
114 | "hashes": [
115 | "sha256:0b9e48a1c1505699a64ac58815ca99104aacace8321e455072cee4f7fe7b2698",
116 | "sha256:0f4c784e1b5a320efb434c66a50b8dd7e30a7dc047e8f45c0a8d2694bfe72781",
117 | "sha256:0fdbaa32c9eb09ef09d425dc154628fca6fa69d2f7c1a33f889abb7e0efb3909",
118 | "sha256:11fbf688d5c953c0a5ba625cc42dea9aeb2321942c7c5ed9341a68f865dc8cb1",
119 | "sha256:19eaac4eb25ab078bd0f28304a0cb08702d120caadfe76bb1e6846ed1f68635e",
120 | "sha256:3232ec1a3bf4dba97fbf9b03ce12e4b6c1d01ea3c85773903a67ced725728232",
121 | "sha256:36f8f9c216fcca048006f6dd60e4d3e6f406afde26cfb99e063f137070139eaf",
122 | "sha256:59c1a0e4f9abe970062ed35d0720935197800a7ef7a62b3a9e3a70588d9ca40b",
123 | "sha256:6506c5ff88750948c28d41852c09c5d2a49f51f28c6d90cbf1b6808e18c64e88",
124 | "sha256:6bc3e68ee16f571681b8c0b6d5c0a77bef3c589012352b3f0cf5520e674e9d01",
125 | "sha256:6dbbd7aabbc861eec6b910522534894d9dbb507d5819bc982032c3ea2e974f51",
126 | "sha256:6e737915de826650d1a5f7ff4ac6cf888a26f021a647390ca7bafdba0e85462b",
127 | "sha256:6ed9b2cfe85abc720e8943c1808eeffd41daa73e18b7c1e1a228b0b91f768ccc",
128 | "sha256:711ec617ba453fdfc66616db2520db3a6d9a891e3bf62ef9aba4c95bb4e61230",
129 | "sha256:844dacdf7530c5c612718cf12bc001f59b2d9329d35b495f1ff25045161aa6af",
130 | "sha256:86b52e146da13c896e50c5a3341a9448151f1092b1a4153e425d1e8b62fec508",
131 | "sha256:985c06c2a0f227131733ae58d6a541a5bc8b665e7305494782bebdb74202b793",
132 | "sha256:a86dfe45f4f9c55b1a2312ff20a59b30da8d39c0e8821d00018372a2a177098f",
133 | "sha256:aa3cd07f7f7e3183b63d48300666f920828a9dbd7d7ec53d450df2c4953687a9",
134 | "sha256:b1964ed645ef8317806d615d9ff006c0dadc09dfc54b99ae67f9ba7a1ec9d5d2",
135 | "sha256:b2abbff9e4141484bb89b96eb8eae186d77bc6d5ffbec6b01783ee5c3c467351",
136 | "sha256:cc33c3a90492e21713260095f02b12bee02b8d1f2c03a221d763ce04fa90e2e9",
137 | "sha256:d7de3bf0986d777807611c36e809b77a13bf1888f5c8db0ebf24b47a52d10726",
138 | "sha256:db5e3c52576cc5b93a959a03ccc3b02cb8f0af1fbbdc80645f7a215f0b864f3a",
139 | "sha256:e168aa795ffbb11379c942cf95bf813c7db9aa55538eb61de8c6815e092416f5",
140 | "sha256:e9ca911f8e2d3117e5241d5fa9aaa991cb22fb0792627eeada47425d706b5ec8",
141 | "sha256:eccf962d41ca46e6326b97c8fe0a6687b58dfc1a5f6540ed071ff1474cea749e",
142 | "sha256:efa19deae6b9e504a74347fe5e25c2cb9343766c489c2ae921b05f37338b18d1",
143 | "sha256:f4b0460a21f784abe17b496f66e74157a6c36116fa86da8bf6aa028b9e8ad5fe",
144 | "sha256:f93d508ca64d924d478fb11e272e09524698f0c581d9032e68958cfbdd41faef"
145 | ],
146 | "index": "pypi",
147 | "version": "==2.7.5"
148 | },
149 | "python-dateutil": {
150 | "hashes": [
151 | "sha256:1adb80e7a782c12e52ef9a8182bebeb73f1d7e24e374397af06fb4956c8dc5c0",
152 | "sha256:e27001de32f627c22380a688bcc43ce83504a7bc5da472209b4c70f02829f0b8"
153 | ],
154 | "version": "==2.7.3"
155 | },
156 | "python-dotenv": {
157 | "hashes": [
158 | "sha256:122290a38ece9fe4f162dc7c95cae3357b983505830a154d3c98ef7f6c6cea77",
159 | "sha256:4a205787bc829233de2a823aa328e44fd9996fedb954989a21f1fc67c13d7a77"
160 | ],
161 | "index": "pypi",
162 | "version": "==0.9.1"
163 | },
164 | "python-editor": {
165 | "hashes": [
166 | "sha256:a3c066acee22a1c94f63938341d4fb374e3fdd69366ed6603d7b24bed1efc565"
167 | ],
168 | "version": "==1.0.3"
169 | },
170 | "six": {
171 | "hashes": [
172 | "sha256:70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9",
173 | "sha256:832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb"
174 | ],
175 | "version": "==1.11.0"
176 | },
177 | "sqlalchemy": {
178 | "hashes": [
179 | "sha256:ef6569ad403520ee13e180e1bfd6ed71a0254192a934ec1dbd3dbf48f4aa9524"
180 | ],
181 | "version": "==1.2.11"
182 | },
183 | "werkzeug": {
184 | "hashes": [
185 | "sha256:c3fd7a7d41976d9f44db327260e263132466836cef6f91512889ed60ad26557c",
186 | "sha256:d5da73735293558eb1651ee2fddc4d0dedcfa06538b8813a2e20011583c9e49b"
187 | ],
188 | "version": "==0.14.1"
189 | },
190 | "wtforms": {
191 | "hashes": [
192 | "sha256:0cdbac3e7f6878086c334aa25dc5a33869a3954e9d1e015130d65a69309b3b61",
193 | "sha256:e3ee092c827582c50877cdbd49e9ce6d2c5c1f6561f849b3b068c1b8029626f1"
194 | ],
195 | "version": "==2.2.1"
196 | }
197 | },
198 | "develop": {}
199 | }
200 |
--------------------------------------------------------------------------------
/frontend/dist/build.js:
--------------------------------------------------------------------------------
1 | !function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=24)}([function(t,e,n){"use strict";function r(t){return"[object Array]"===k.call(t)}function o(t){return"[object ArrayBuffer]"===k.call(t)}function i(t){return"undefined"!=typeof FormData&&t instanceof FormData}function a(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer}function s(t){return"string"==typeof t}function c(t){return"number"==typeof t}function u(t){return void 0===t}function f(t){return null!==t&&"object"==typeof t}function l(t){return"[object Date]"===k.call(t)}function p(t){return"[object File]"===k.call(t)}function d(t){return"[object Blob]"===k.call(t)}function h(t){return"[object Function]"===k.call(t)}function v(t){return f(t)&&h(t.pipe)}function m(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams}function y(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function g(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function b(t,e){if(null!==t&&void 0!==t)if("object"!=typeof t&&(t=[t]),r(t))for(var n=0,o=t.length;nn.parts.length&&(r.parts.length=n.parts.length)}else{for(var a=[],o=0;o=200&&t<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],function(t){s.headers[t]={}}),o.forEach(["post","put","patch"],function(t){s.headers[t]=o.merge(a)}),t.exports=s}).call(e,n(8))},function(t,e,n){"use strict";(function(t,n){function r(t){return void 0===t||null===t}function o(t){return void 0!==t&&null!==t}function i(t){return!0===t}function a(t){return!1===t}function s(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function c(t){return null!==t&&"object"==typeof t}function u(t){return"[object Object]"===ci.call(t)}function f(t){return"[object RegExp]"===ci.call(t)}function l(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function p(t){return null==t?"":"object"==typeof t?JSON.stringify(t,null,2):String(t)}function d(t){var e=parseFloat(t);return isNaN(e)?t:e}function h(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}function m(t,e){return li.call(t,e)}function y(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}function g(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function b(t,e){return t.bind(e)}function _(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function w(t,e){for(var n in e)t[n]=e[n];return t}function x(t){for(var e={},n=0;n-1)if(i&&!m(o,"default"))a=!1;else if(""===a||a===mi(t)){var c=nt(String,o.type);(c<0||s0&&(a=bt(a,(e||"")+"_"+n),gt(a[0])&>(u)&&(f[c]=I(u.text+a[0].text),a.shift()),f.push.apply(f,a)):s(a)?gt(u)?f[c]=I(u.text+a):""!==a&&f.push(I(a)):gt(a)&>(u)?f[c]=I(u.text+a.text):(i(t._isVList)&&o(a.tag)&&r(a.key)&&o(e)&&(a.key="__vlist"+e+"_"+n+"__"),f.push(a)));return f}function _t(t,e){return(t.__esModule||Bi&&"Module"===t[Symbol.toStringTag])&&(t=t.default),c(t)?e.extend(t):t}function wt(t,e,n,r,o){var i=Ji();return i.asyncFactory=t,i.asyncMeta={data:e,context:n,children:r,tag:o},i}function xt(t,e,n){if(i(t.error)&&o(t.errorComp))return t.errorComp;if(o(t.resolved))return t.resolved;if(i(t.loading)&&o(t.loadingComp))return t.loadingComp;if(!o(t.contexts)){var a=t.contexts=[n],s=!0,u=function(){for(var t=0,e=a.length;tba&&ha[n].id>t.id;)n--;ha.splice(n+1,0,t)}else ha.push(t);ya||(ya=!0,ct(Ut))}}function Vt(t,e,n){xa.get=function(){return this[e][n]},xa.set=function(t){this[e][n]=t},Object.defineProperty(t,n,xa)}function Gt(t){t._watchers=[];var e=t.$options;e.props&&Kt(t,e.props),e.methods&&Qt(t,e.methods),e.data?Jt(t):D(t._data={},!0),e.computed&&Xt(t,e.computed),e.watch&&e.watch!==Ri&&te(t,e.watch)}function Kt(t,e){var n=t.$options.propsData||{},r=t._props={},o=t.$options._propKeys=[];!t.$parent||L(!1);for(var i in e)!function(i){o.push(i);var a=Y(i,e,n,t);F(r,i,a),i in t||Vt(t,"_props",i)}(i);L(!0)}function Jt(t){var e=t.$options.data;e=t._data="function"==typeof e?Wt(e,t):e||{},u(e)||(e={});for(var n=Object.keys(e),r=t.$options.props,o=(t.$options.methods,n.length);o--;){var i=n[o];r&&m(r,i)||T(i)||Vt(t,"_data",i)}D(e,!0)}function Wt(t,e){j();try{return t.call(e,e)}catch(t){return rt(t,e,"data()"),{}}finally{M()}}function Xt(t,e){var n=t._computedWatchers=Object.create(null),r=Fi();for(var o in e){var i=e[o],a="function"==typeof i?i:i.get;r||(n[o]=new wa(t,a||C,C,Ca)),o in t||Zt(t,o,i)}}function Zt(t,e,n){var r=!Fi();"function"==typeof n?(xa.get=r?Yt(e):n,xa.set=C):(xa.get=n.get?r&&!1!==n.cache?Yt(e):n.get:C,xa.set=n.set?n.set:C),Object.defineProperty(t,e,xa)}function Yt(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),zi.target&&e.depend(),e.value}}function Qt(t,e){t.$options.props;for(var n in e)t[n]=null==e[n]?C:yi(e[n],t)}function te(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var o=0;o=0||n.indexOf(t[o])<0)&&r.push(t[o]);return r}return t}function Re(t){this._init(t)}function Le(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=_(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}function Pe(t){t.mixin=function(t){return this.options=X(this.options,t),this}}function Ne(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,o=t._Ctor||(t._Ctor={});if(o[r])return o[r];var i=t.name||n.options.name,a=function(t){this._init(t)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=e++,a.options=X(n.options,t),a.super=n,a.options.props&&De(a),a.options.computed&&Fe(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,wi.forEach(function(t){a[t]=n[t]}),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=w({},a.options),o[r]=a,a}}function De(t){var e=t.options.props;for(var n in e)Vt(t.prototype,"_props",n)}function Fe(t){var e=t.options.computed;for(var n in e)Zt(t.prototype,n,e[n])}function Ue(t){wi.forEach(function(e){t[e]=function(t,n){return n?("component"===e&&u(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}})}function Be(t){return t&&(t.Ctor.options.name||t.tag)}function He(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!f(t)&&t.test(e)}function qe(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var s=Be(a.componentOptions);s&&!e(s)&&ze(n,i,r,o)}}}function ze(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,v(n,e)}function Ve(t){for(var e=t.data,n=t,r=t;o(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(e=Ge(r.data,e));for(;o(n=n.parent);)n&&n.data&&(e=Ge(e,n.data));return Ke(e.staticClass,e.class)}function Ge(t,e){return{staticClass:Je(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function Ke(t,e){return o(t)||o(e)?Je(t,We(e)):""}function Je(t,e){return t?e?t+" "+e:t:e||""}function We(t){return Array.isArray(t)?Xe(t):c(t)?Ze(t):"string"==typeof t?t:""}function Xe(t){for(var e,n="",r=0,i=t.length;r-1?es[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:es[t]=/HTMLUnknownElement/.test(e.toString())}function tn(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function en(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function nn(t,e){return document.createElementNS(Xa[t],e)}function rn(t){return document.createTextNode(t)}function on(t){return document.createComment(t)}function an(t,e,n){t.insertBefore(e,n)}function sn(t,e){t.removeChild(e)}function cn(t,e){t.appendChild(e)}function un(t){return t.parentNode}function fn(t){return t.nextSibling}function ln(t){return t.tagName}function pn(t,e){t.textContent=e}function dn(t,e){t.setAttribute(e,"")}function hn(t,e){var n=t.data.ref;if(o(n)){var r=t.context,i=t.componentInstance||t.elm,a=r.$refs;e?Array.isArray(a[n])?v(a[n],i):a[n]===i&&(a[n]=void 0):t.data.refInFor?Array.isArray(a[n])?a[n].indexOf(i)<0&&a[n].push(i):a[n]=[i]:a[n]=i}}function vn(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&o(t.data)===o(e.data)&&mn(t,e)||i(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&r(e.asyncFactory.error))}function mn(t,e){if("input"!==t.tag)return!0;var n,r=o(n=t.data)&&o(n=n.attrs)&&n.type,i=o(n=e.data)&&o(n=n.attrs)&&n.type;return r===i||ns(r)&&ns(i)}function yn(t,e,n){var r,i,a={};for(r=e;r<=n;++r)i=t[r].key,o(i)&&(a[i]=r);return a}function gn(t,e){(t.data.directives||e.data.directives)&&bn(t,e)}function bn(t,e){var n,r,o,i=t===is,a=e===is,s=_n(t.data.directives,t.context),c=_n(e.data.directives,e.context),u=[],f=[];for(n in c)r=s[n],o=c[n],r?(o.oldValue=r.value,xn(o,"update",e,t),o.def&&o.def.componentUpdated&&f.push(o)):(xn(o,"bind",e,t),o.def&&o.def.inserted&&u.push(o));if(u.length){var l=function(){for(var n=0;n-1?$n(t,e,n):Va(e)?Wa(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):za(e)?t.setAttribute(e,Wa(n)||"false"===n?"false":"true"):Ka(e)?Wa(n)?t.removeAttributeNS(Ga,Ja(e)):t.setAttributeNS(Ga,e,n):$n(t,e,n)}function $n(t,e,n){if(Wa(n))t.removeAttribute(e);else{if(Ei&&!ji&&"TEXTAREA"===t.tagName&&"placeholder"===e&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}function On(t,e){var n=e.elm,i=e.data,a=t.data;if(!(r(i.staticClass)&&r(i.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=Ve(e),c=n._transitionClasses;o(c)&&(s=Je(s,We(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}function Tn(t){function e(){(a||(a=[])).push(t.slice(h,o).trim()),h=o+1}var n,r,o,i,a,s=!1,c=!1,u=!1,f=!1,l=0,p=0,d=0,h=0;for(o=0;o=0&&" "===(m=t.charAt(v));v--);m&&ps.test(m)||(f=!0)}}else void 0===i?(h=o+1,i=t.slice(0,o).trim()):e();if(void 0===i?i=t.slice(0,o).trim():0!==h&&e(),a)for(o=0;o-1?{exp:t.slice(0,La),key:'"'+t.slice(La+1)+'"'}:{exp:t,key:null};for(Ia=t,La=Pa=Na=0;!Hn();)Ra=Bn(),qn(Ra)?Vn(Ra):91===Ra&&zn(Ra);return{exp:t.slice(0,Pa),key:t.slice(Pa+1,Na)}}function Bn(){return Ia.charCodeAt(++La)}function Hn(){return La>=Ma}function qn(t){return 34===t||39===t}function zn(t){var e=1;for(Pa=La;!Hn();)if(t=Bn(),qn(t))Vn(t);else if(91===t&&e++,93===t&&e--,0===e){Na=La;break}}function Vn(t){for(var e=t;!Hn()&&(t=Bn())!==e;);}function Gn(t,e,n){Da=n;var r=e.value,o=e.modifiers,i=t.tag,a=t.attrsMap.type;if(t.component)return Dn(t,r,o),!1;if("select"===i)Wn(t,r,o);else if("input"===i&&"checkbox"===a)Kn(t,r,o);else if("input"===i&&"radio"===a)Jn(t,r,o);else if("input"===i||"textarea"===i)Xn(t,r,o);else if(!Ci.isReservedTag(i))return Dn(t,r,o),!1;return!0}function Kn(t,e,n){var r=n&&n.number,o=Pn(t,"value")||"null",i=Pn(t,"true-value")||"true",a=Pn(t,"false-value")||"false";jn(t,"checked","Array.isArray("+e+")?_i("+e+","+o+")>-1"+("true"===i?":("+e+")":":_q("+e+","+i+")")),Ln(t,"change","var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+i+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+o+")":o)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Fn(e,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Fn(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Fn(e,"$$c")+"}",null,!0)}function Jn(t,e,n){var r=n&&n.number,o=Pn(t,"value")||"null";o=r?"_n("+o+")":o,jn(t,"checked","_q("+e+","+o+")"),Ln(t,"change",Fn(e,o),null,!0)}function Wn(t,e,n){var r=n&&n.number,o='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})",i="var $$selectedVal = "+o+";";i=i+" "+Fn(e,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),Ln(t,"change",i,null,!0)}function Xn(t,e,n){var r=t.attrsMap.type,o=n||{},i=o.lazy,a=o.number,s=o.trim,c=!i&&"range"!==r,u=i?"change":"range"===r?ds:"input",f="$event.target.value";s&&(f="$event.target.value.trim()"),a&&(f="_n("+f+")");var l=Fn(e,f);c&&(l="if($event.target.composing)return;"+l),jn(t,"value","("+e+")"),Ln(t,u,l,null,!0),(s||a)&&Ln(t,"blur","$forceUpdate()")}function Zn(t){if(o(t[ds])){var e=Ei?"change":"input";t[e]=[].concat(t[ds],t[e]||[]),delete t[ds]}o(t[hs])&&(t.change=[].concat(t[hs],t.change||[]),delete t[hs])}function Yn(t,e,n){var r=Fa;return function o(){null!==t.apply(null,arguments)&&tr(e,o,n,r)}}function Qn(t,e,n,r,o){e=st(e),n&&(e=Yn(e,t,r)),Fa.addEventListener(t,e,Li?{capture:r,passive:o}:r)}function tr(t,e,n,r){(r||Fa).removeEventListener(t,e._withTask||e,n)}function er(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},o=t.data.on||{};Fa=e.elm,Zn(n),pt(n,o,Qn,tr,e.context),Fa=void 0}}function nr(t,e){if(!r(t.data.domProps)||!r(e.data.domProps)){var n,i,a=e.elm,s=t.data.domProps||{},c=e.data.domProps||{};o(c.__ob__)&&(c=e.data.domProps=w({},c));for(n in s)r(c[n])&&(a[n]="");for(n in c){if(i=c[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),i===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n){a._value=i;var u=r(i)?"":String(i);rr(a,u)&&(a.value=u)}else a[n]=i}}}function rr(t,e){return!t.composing&&("OPTION"===t.tagName||or(t,e)||ir(t,e))}function or(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}function ir(t,e){var n=t.value,r=t._vModifiers;if(o(r)){if(r.lazy)return!1;if(r.number)return d(n)!==d(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}function ar(t){var e=sr(t.style);return t.staticStyle?w(t.staticStyle,e):e}function sr(t){return Array.isArray(t)?x(t):"string"==typeof t?ys(t):t}function cr(t,e){var n,r={};if(e)for(var o=t;o.componentInstance;)(o=o.componentInstance._vnode)&&o.data&&(n=ar(o.data))&&w(r,n);(n=ar(t.data))&&w(r,n);for(var i=t;i=i.parent;)i.data&&(n=ar(i.data))&&w(r,n);return r}function ur(t,e){var n=e.data,i=t.data;if(!(r(n.staticStyle)&&r(n.style)&&r(i.staticStyle)&&r(i.style))){var a,s,c=e.elm,u=i.staticStyle,f=i.normalizedStyle||i.style||{},l=u||f,p=sr(e.data.style)||{};e.data.normalizedStyle=o(p.__ob__)?w({},p):p;var d=cr(e,!0);for(s in l)r(d[s])&&_s(c,s,"");for(s in d)(a=d[s])!==l[s]&&_s(c,s,null==a?"":a)}}function fr(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function lr(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function pr(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&w(e,ks(t.name||"v")),w(e,t),e}return"string"==typeof t?ks(t):void 0}}function dr(t){Ms(function(){Ms(t)})}function hr(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),fr(t,e))}function vr(t,e){t._transitionClasses&&v(t._transitionClasses,e),lr(t,e)}function mr(t,e,n){var r=yr(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===Os?Ss:js,c=0,u=function(){t.removeEventListener(s,f),n()},f=function(e){e.target===t&&++c>=a&&u()};setTimeout(function(){c0&&(n=Os,f=a,l=i.length):e===Ts?u>0&&(n=Ts,f=u,l=c.length):(f=Math.max(a,u),n=f>0?a>u?Os:Ts:null,l=n?n===Os?i.length:c.length:0),{type:n,timeout:f,propCount:l,hasTransform:n===Os&&Is.test(r[As+"Property"])}}function gr(t,e){for(;t.length1}function kr(t,e){!0!==e.data.show&&_r(e)}function $r(t,e,n){Or(t,e,n),(Ei||Mi)&&setTimeout(function(){Or(t,e,n)},0)}function Or(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=t.options.length;s-1,a.selected!==i&&(a.selected=i);else if(k(Ar(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function Tr(t,e){return e.every(function(e){return!k(e,t)})}function Ar(t){return"_value"in t?t._value:t.value}function Sr(t){t.target.composing=!0}function Er(t){t.target.composing&&(t.target.composing=!1,jr(t.target,"input"))}function jr(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Mr(t){return!t.componentInstance||t.data&&t.data.transition?t:Mr(t.componentInstance._vnode)}function Ir(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Ir(kt(e.children)):t}function Rr(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var i in o)e[di(i)]=o[i];return e}function Lr(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function Pr(t){for(;t=t.parent;)if(t.data.transition)return!0}function Nr(t,e){return e.key===t.key&&e.tag===t.tag}function Dr(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Fr(t){t.data.newPos=t.elm.getBoundingClientRect()}function Ur(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,o=e.top-n.top;if(r||o){t.data.moved=!0;var i=t.elm.style;i.transform=i.WebkitTransform="translate("+r+"px,"+o+"px)",i.transitionDuration="0s"}}function Br(t,e){var n=e?Ws(e):Ks;if(n.test(t)){for(var r,o,i,a=[],s=[],c=n.lastIndex=0;r=n.exec(t);){o=r.index,o>c&&(s.push(i=t.slice(c,o)),a.push(JSON.stringify(i)));var u=Tn(r[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),c=o+r[0].length}return c=0&&a[o].lowerCasedTag!==s;o--);else o=0;if(o>=0){for(var c=a.length-1;c>=o;c--)e.end&&e.end(a[c].tag,n,r);a.length=o,i=o&&a[o-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,r):"p"===s&&(e.start&&e.start(t,[],!1,n,r),e.end&&e.end(t,n,r))}for(var o,i,a=[],s=e.expectHTML,c=e.isUnaryTag||gi,u=e.canBeLeftOpenTag||gi,f=0;t;){if(o=t,i&&Cc(i)){var l=0,p=i.toLowerCase(),d=kc[p]||(kc[p]=new RegExp("([\\s\\S]*?)("+p+"[^>]*>)","i")),h=t.replace(d,function(t,n,r){return l=r.length,Cc(p)||"noscript"===p||(n=n.replace(//g,"$1").replace(//g,"$1")),Sc(p,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""});f+=t.length-h.length,t=h,r(p,f-l,f)}else{var v=t.indexOf("<");if(0===v){if(uc.test(t)){var m=t.indexOf("--\x3e");if(m>=0){e.shouldKeepComment&&e.comment(t.substring(4,m)),n(m+3);continue}}if(fc.test(t)){var y=t.indexOf("]>");if(y>=0){n(y+2);continue}}var g=t.match(cc);if(g){n(g[0].length);continue}var b=t.match(sc);if(b){var _=f;n(b[0].length),r(b[1],_,f);continue}var w=function(){var e=t.match(ic);if(e){var r={tagName:e[1],attrs:[],start:f};n(e[0].length);for(var o,i;!(o=t.match(ac))&&(i=t.match(nc));)n(i[0].length),r.attrs.push(i);if(o)return r.unarySlash=o[1],n(o[0].length),r.end=f,r}}();if(w){!function(t){var n=t.tagName,o=t.unarySlash;s&&("p"===i&&ec(n)&&r(i),u(n)&&i===n&&r(n));for(var f=c(n)||!!o,l=t.attrs.length,p=new Array(l),d=0;d=0){for(C=t.slice(v);!(sc.test(C)||ic.test(C)||uc.test(C)||fc.test(C)||(k=C.indexOf("<",1))<0);)v+=k,C=t.slice(v);x=t.substring(0,v),n(v)}v<0&&(x=t,t=""),e.chars&&x&&e.chars(x)}if(t===o){e.chars&&e.chars(t);break}}r()}function Jr(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:ho(e),parent:n,children:[]}}function Wr(t,e){function n(t){t.pre&&(s=!1),yc(t.tag)&&(c=!1);for(var n=0;n':'',xc.innerHTML.indexOf("
")>0}function ai(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}/*!
2 | * Vue.js v2.5.17
3 | * (c) 2014-2018 Evan You
4 | * Released under the MIT License.
5 | */
6 | var si=Object.freeze({}),ci=Object.prototype.toString,ui=h("slot,component",!0),fi=h("key,ref,slot,slot-scope,is"),li=Object.prototype.hasOwnProperty,pi=/-(\w)/g,di=y(function(t){return t.replace(pi,function(t,e){return e?e.toUpperCase():""})}),hi=y(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),vi=/\B([A-Z])/g,mi=y(function(t){return t.replace(vi,"-$1").toLowerCase()}),yi=Function.prototype.bind?b:g,gi=function(t,e,n){return!1},bi=function(t){return t},_i="data-server-rendered",wi=["component","directive","filter"],xi=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],Ci={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:gi,isReservedAttr:gi,isUnknownElement:gi,getTagNamespace:C,parsePlatformTagName:bi,mustUseProp:gi,_lifecycleHooks:xi},ki=/[^\w.$]/,$i="__proto__"in{},Oi="undefined"!=typeof window,Ti="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,Ai=Ti&&WXEnvironment.platform.toLowerCase(),Si=Oi&&window.navigator.userAgent.toLowerCase(),Ei=Si&&/msie|trident/.test(Si),ji=Si&&Si.indexOf("msie 9.0")>0,Mi=Si&&Si.indexOf("edge/")>0,Ii=(Si&&Si.indexOf("android"),Si&&/iphone|ipad|ipod|ios/.test(Si)||"ios"===Ai),Ri=(Si&&/chrome\/\d+/.test(Si),{}.watch),Li=!1;if(Oi)try{var Pi={};Object.defineProperty(Pi,"passive",{get:function(){Li=!0}}),window.addEventListener("test-passive",null,Pi)}catch(t){}var Ni,Di,Fi=function(){return void 0===Ni&&(Ni=!Oi&&!Ti&&void 0!==t&&"server"===t.process.env.VUE_ENV),Ni},Ui=Oi&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Bi="undefined"!=typeof Symbol&&E(Symbol)&&"undefined"!=typeof Reflect&&E(Reflect.ownKeys);Di="undefined"!=typeof Set&&E(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var Hi=C,qi=0,zi=function(){this.id=qi++,this.subs=[]};zi.prototype.addSub=function(t){this.subs.push(t)},zi.prototype.removeSub=function(t){v(this.subs,t)},zi.prototype.depend=function(){zi.target&&zi.target.addDep(this)},zi.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;e1?_(n):n;for(var r=_(arguments,1),o=0,i=n.length;oparseInt(this.max)&&ze(c,u[0],u,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}},ja={KeepAlive:Ea};!function(t){var e={};e.get=function(){return Ci},Object.defineProperty(t,"config",e),t.util={warn:Hi,extend:w,mergeOptions:X,defineReactive:F},t.set=U,t.delete=B,t.nextTick=ct,t.options=Object.create(null),wi.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,w(t.options.components,ja),Le(t),Pe(t),Ne(t),Ue(t)}(Re),Object.defineProperty(Re.prototype,"$isServer",{get:Fi}),Object.defineProperty(Re.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Re,"FunctionalRenderContext",{value:ye}),Re.version="2.5.17";var Ma,Ia,Ra,La,Pa,Na,Da,Fa,Ua,Ba=h("style,class"),Ha=h("input,textarea,option,select,progress"),qa=function(t,e,n){return"value"===n&&Ha(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},za=h("contenteditable,draggable,spellcheck"),Va=h("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Ga="http://www.w3.org/1999/xlink",Ka=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Ja=function(t){return Ka(t)?t.slice(6,t.length):""},Wa=function(t){return null==t||!1===t},Xa={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Za=h("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Ya=h("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Qa=function(t){return"pre"===t},ts=function(t){return Za(t)||Ya(t)},es=Object.create(null),ns=h("text,number,password,search,email,tel,url"),rs=Object.freeze({createElement:en,createElementNS:nn,createTextNode:rn,createComment:on,insertBefore:an,removeChild:sn,appendChild:cn,parentNode:un,nextSibling:fn,tagName:ln,setTextContent:pn,setStyleScope:dn}),os={create:function(t,e){hn(e)},update:function(t,e){t.data.ref!==e.data.ref&&(hn(t,!0),hn(e))},destroy:function(t){hn(t,!0)}},is=new Gi("",{},[]),as=["create","activate","update","remove","destroy"],ss={create:gn,update:gn,destroy:function(t){gn(t,is)}},cs=Object.create(null),us=[os,ss],fs={create:Cn,update:Cn},ls={create:On,update:On},ps=/[\w).+\-_$\]]/,ds="__r",hs="__c",vs={create:er,update:er},ms={create:nr,update:nr},ys=y(function(t){var e={},n=/;(?![^(]*\))/g,r=/:(.+)/;return t.split(n).forEach(function(t){if(t){var n=t.split(r);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}),gs=/^--/,bs=/\s*!important$/,_s=function(t,e,n){if(gs.test(e))t.style.setProperty(e,n);else if(bs.test(n))t.style.setProperty(e,n.replace(bs,""),"important");else{var r=xs(e);if(Array.isArray(n))for(var o=0,i=n.length;oh?(l=r(n[y+1])?null:n[y+1].elm,g(t,l,n,d,y,i)):d>y&&_(t,e,p,h)}function C(t,e,n,r){for(var i=n;i\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,rc="[a-zA-Z_][\\w\\-\\.]*",oc="((?:"+rc+"\\:)?"+rc+")",ic=new RegExp("^<"+oc),ac=/^\s*(\/?)>/,sc=new RegExp("^<\\/"+oc+"[^>]*>"),cc=/^]+>/i,uc=/^",""":'"',"&":"&","
":"\n"," ":"\t"},Oc=/&(?:lt|gt|quot|amp);/g,Tc=/&(?:lt|gt|quot|amp|#10|#9);/g,Ac=h("pre,textarea",!0),Sc=function(t,e){return t&&Ac(t)&&"\n"===e[0]},Ec=/^@|^v-on:/,jc=/^v-|^@|^:/,Mc=/([^]*?)\s+(?:in|of)\s+([^]*)/,Ic=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Rc=/^\(|\)$/g,Lc=/:(.*)$/,Pc=/^:|^v-bind:/,Nc=/\.[^.]+/g,Dc=y(Ys.decode),Fc=/^xmlns:NS\d+/,Uc=/^NS\d+:/,Bc={preTransformNode:go},Hc=[Xs,Zs,Bc],qc={model:Gn,text:_o,html:wo},zc={expectHTML:!0,modules:Hc,directives:qc,isPreTag:Qa,isUnaryTag:Qs,mustUseProp:qa,canBeLeftOpenTag:tc,isReservedTag:ts,getTagNamespace:Ye,staticKeys:function(t){return t.reduce(function(t,e){return t.concat(e.staticKeys||[])},[]).join(",")}(Hc)},Vc=y(Co),Gc=/^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/,Kc=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Jc={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Wc={esc:"Escape",tab:"Tab",enter:"Enter",space:" ",up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete"]},Xc=function(t){return"if("+t+")return null;"},Zc={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Xc("$event.target !== $event.currentTarget"),ctrl:Xc("!$event.ctrlKey"),shift:Xc("!$event.shiftKey"),alt:Xc("!$event.altKey"),meta:Xc("!$event.metaKey"),left:Xc("'button' in $event && $event.button !== 0"),middle:Xc("'button' in $event && $event.button !== 1"),right:Xc("'button' in $event && $event.button !== 2")},Yc={on:Mo,bind:Io,cloak:C},Qc=function(t){this.options=t,this.warn=t.warn||Sn,this.transforms=En(t.modules,"transformCode"),this.dataGenFns=En(t.modules,"genData"),this.directives=w(w({},Yc),t.directives);var e=t.isReservedTag||gi;this.maybeComponent=function(t){return!e(t.tag)},this.onceId=0,this.staticRenderFns=[]},tu=(new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)"),function(t){return function(e){function n(n,r){var o=Object.create(e),i=[],a=[];if(o.warn=function(t,e){(e?a:i).push(t)},r){r.modules&&(o.modules=(e.modules||[]).concat(r.modules)),r.directives&&(o.directives=w(Object.create(e.directives||null),r.directives));for(var s in r)"modules"!==s&&"directives"!==s&&(o[s]=r[s])}var c=t(n,o);return c.errors=i,c.tips=a,c}return{compile:n,compileToFunctions:oi(n)}}}(function(t,e){var n=Wr(t.trim(),e);!1!==e.optimize&&xo(n,e);var r=Ro(n,e);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}})),eu=tu(zc),nu=eu.compileToFunctions,ru=!!Oi&&ii(!1),ou=!!Oi&&ii(!0),iu=y(function(t){var e=tn(t);return e&&e.innerHTML}),au=Re.prototype.$mount;Re.prototype.$mount=function(t,e){if((t=t&&tn(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=iu(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=ai(t));if(r){var o=nu(r,{shouldDecodeNewlines:ru,shouldDecodeNewlinesForHref:ou,delimiters:n.delimiters,comments:n.comments},this),i=o.render,a=o.staticRenderFns;n.render=i,n.staticRenderFns=a}}return au.call(this,t,e)},Re.compile=nu,e.a=Re}).call(e,n(5),n(25).setImmediate)},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(f===setTimeout)return setTimeout(t,0);if((f===n||!f)&&setTimeout)return f=setTimeout,setTimeout(t,0);try{return f(t,0)}catch(e){try{return f.call(null,t,0)}catch(e){return f.call(this,t,0)}}}function i(t){if(l===clearTimeout)return clearTimeout(t);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(t);try{return l(t)}catch(e){try{return l.call(null,t)}catch(e){return l.call(this,t)}}}function a(){v&&d&&(v=!1,d.length?h=d.concat(h):m=-1,h.length&&s())}function s(){if(!v){var t=o(a);v=!0;for(var e=h.length;e;){for(d=h,h=[];++m1)for(var n=1;n-1&&e.splice(n,1)}}function u(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;l(t,n,[],t._modules.root,!0),f(t,n,e)}function f(t,e,n){var r=t._vm;t.getters={};var i=t._wrappedGetters,a={};o(i,function(e,n){a[n]=function(){return e(t)},Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})});var s=S.config.silent;S.config.silent=!0,t._vm=new S({data:{$$state:e},computed:a}),S.config.silent=s,t.strict&&y(t),r&&(n&&t._withCommit(function(){r._data.$$state=null}),S.nextTick(function(){return r.$destroy()}))}function l(t,e,n,r,o){var i=!n.length,a=t._modules.getNamespace(n);if(r.namespaced&&(t._modulesNamespaceMap[a]=r),!i&&!o){var s=g(e,n.slice(0,-1)),c=n[n.length-1];t._withCommit(function(){S.set(s,c,r.state)})}var u=r.context=p(t,a,n);r.forEachMutation(function(e,n){h(t,a+n,e,u)}),r.forEachAction(function(e,n){var r=e.root?n:a+n,o=e.handler||e;v(t,r,o,u)}),r.forEachGetter(function(e,n){m(t,a+n,e,u)}),r.forEachChild(function(r,i){l(t,e,n.concat(i),r,o)})}function p(t,e,n){var r=""===e,o={dispatch:r?t.dispatch:function(n,r,o){var i=b(n,r,o),a=i.payload,s=i.options,c=i.type;return s&&s.root||(c=e+c),t.dispatch(c,a)},commit:r?t.commit:function(n,r,o){var i=b(n,r,o),a=i.payload,s=i.options,c=i.type;s&&s.root||(c=e+c),t.commit(c,a,s)}};return Object.defineProperties(o,{getters:{get:r?function(){return t.getters}:function(){return d(t,e)}},state:{get:function(){return g(t.state,n)}}}),o}function d(t,e){var n={},r=e.length;return Object.keys(t.getters).forEach(function(o){if(o.slice(0,r)===e){var i=o.slice(r);Object.defineProperty(n,i,{get:function(){return t.getters[o]},enumerable:!0})}}),n}function h(t,e,n,r){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){n.call(t,r.state,e)})}function v(t,e,n,r){(t._actions[e]||(t._actions[e]=[])).push(function(e,o){var i=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},e,o);return a(i)||(i=Promise.resolve(i)),t._devtoolHook?i.catch(function(e){throw t._devtoolHook.emit("vuex:error",e),e}):i})}function m(t,e,n,r){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(t){return n(r.state,r.getters,t.state,t.getters)})}function y(t){t._vm.$watch(function(){return this._data.$$state},function(){},{deep:!0,sync:!0})}function g(t,e){return e.length?e.reduce(function(t,e){return t[e]},t):t}function b(t,e,n){return i(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function _(t){S&&t===S||(S=t,k(S))}function w(t){return Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}})}function x(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function C(t,e,n){return t._modulesNamespaceMap[n]}n.d(e,"b",function(){return L});/**
7 | * vuex v3.0.1
8 | * (c) 2017 Evan You
9 | * @license MIT
10 | */
11 | var k=function(t){function e(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:e});else{var n=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[e].concat(t.init):e,n.call(this,t)}}},$="undefined"!=typeof window&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,O=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},T={namespaced:{configurable:!0}};T.namespaced.get=function(){return!!this._rawModule.namespaced},O.prototype.addChild=function(t,e){this._children[t]=e},O.prototype.removeChild=function(t){delete this._children[t]},O.prototype.getChild=function(t){return this._children[t]},O.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},O.prototype.forEachChild=function(t){o(this._children,t)},O.prototype.forEachGetter=function(t){this._rawModule.getters&&o(this._rawModule.getters,t)},O.prototype.forEachAction=function(t){this._rawModule.actions&&o(this._rawModule.actions,t)},O.prototype.forEachMutation=function(t){this._rawModule.mutations&&o(this._rawModule.mutations,t)},Object.defineProperties(O.prototype,T);var A=function(t){this.register([],t,!1)};A.prototype.get=function(t){return t.reduce(function(t,e){return t.getChild(e)},this.root)},A.prototype.getNamespace=function(t){var e=this.root;return t.reduce(function(t,n){return e=e.getChild(n),t+(e.namespaced?n+"/":"")},"")},A.prototype.update=function(t){s([],this.root,t)},A.prototype.register=function(t,e,n){var r=this;void 0===n&&(n=!0);var i=new O(e,n);if(0===t.length)this.root=i;else{this.get(t.slice(0,-1)).addChild(t[t.length-1],i)}e.modules&&o(e.modules,function(e,o){r.register(t.concat(o),e,n)})},A.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)};var S,E=function(t){var e=this;void 0===t&&(t={}),!S&&"undefined"!=typeof window&&window.Vue&&_(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var o=t.strict;void 0===o&&(o=!1);var i=t.state;void 0===i&&(i={}),"function"==typeof i&&(i=i()||{}),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new A(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new S;var a=this,s=this,c=s.dispatch,u=s.commit;this.dispatch=function(t,e){return c.call(a,t,e)},this.commit=function(t,e,n){return u.call(a,t,e,n)},this.strict=o,l(this,i,[],this._modules.root),f(this,i),n.forEach(function(t){return t(e)}),S.config.devtools&&r(this)},j={state:{configurable:!0}};j.state.get=function(){return this._vm._data.$$state},j.state.set=function(t){},E.prototype.commit=function(t,e,n){var r=this,o=b(t,e,n),i=o.type,a=o.payload,s=(o.options,{type:i,payload:a}),c=this._mutations[i];c&&(this._withCommit(function(){c.forEach(function(t){t(a)})}),this._subscribers.forEach(function(t){return t(s,r.state)}))},E.prototype.dispatch=function(t,e){var n=this,r=b(t,e),o=r.type,i=r.payload,a={type:o,payload:i},s=this._actions[o];if(s)return this._actionSubscribers.forEach(function(t){return t(a,n.state)}),s.length>1?Promise.all(s.map(function(t){return t(i)})):s[0](i)},E.prototype.subscribe=function(t){return c(t,this._subscribers)},E.prototype.subscribeAction=function(t){return c(t,this._actionSubscribers)},E.prototype.watch=function(t,e,n){var r=this;return this._watcherVM.$watch(function(){return t(r.state,r.getters)},e,n)},E.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm._data.$$state=t})},E.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),l(this,this.state,t,this._modules.get(t),n.preserveState),f(this,this.state)},E.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var n=g(e.state,t.slice(0,-1));S.delete(n,t[t.length-1])}),u(this)},E.prototype.hotUpdate=function(t){this._modules.update(t),u(this,!0)},E.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(E.prototype,j);var M=x(function(t,e){var n={};return w(e).forEach(function(e){var r=e.key,o=e.val;n[r]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var r=C(this.$store,"mapState",t);if(!r)return;e=r.context.state,n=r.context.getters}return"function"==typeof o?o.call(this,e,n):e[o]},n[r].vuex=!0}),n}),I=x(function(t,e){var n={};return w(e).forEach(function(e){var r=e.key,o=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.commit;if(t){var i=C(this.$store,"mapMutations",t);if(!i)return;r=i.context.commit}return"function"==typeof o?o.apply(this,[r].concat(e)):r.apply(this.$store,[o].concat(e))}}),n}),R=x(function(t,e){var n={};return w(e).forEach(function(e){var r=e.key,o=e.val;o=t+o,n[r]=function(){if(!t||C(this.$store,"mapGetters",t))return this.$store.getters[o]},n[r].vuex=!0}),n}),L=x(function(t,e){var n={};return w(e).forEach(function(e){var r=e.key,o=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.dispatch;if(t){var i=C(this.$store,"mapActions",t);if(!i)return;r=i.context.dispatch}return"function"==typeof o?o.apply(this,[r].concat(e)):r.apply(this.$store,[o].concat(e))}}),n}),P=function(t){return{mapState:M.bind(null,t),mapGetters:R.bind(null,t),mapMutations:I.bind(null,t),mapActions:L.bind(null,t)}},N={Store:E,install:_,version:"3.0.1",mapState:M,mapMutations:I,mapGetters:R,mapActions:L,createNamespacedHelpers:P};e.a=N},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r-1}function i(t,e){switch(typeof e){case"undefined":return;case"object":return e;case"function":return e(t);case"boolean":return e?t.params:void 0}}function a(t,e){for(var n in e)t[n]=e[n];return t}function s(t,e,n){void 0===e&&(e={});var r,o=n||c;try{r=o(t||"")}catch(t){r={}}for(var i in e)r[i]=e[i];return r}function c(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach(function(t){var n=t.replace(/\+/g," ").split("="),r=Ut(n.shift()),o=n.length>0?Ut(n.join("=")):null;void 0===e[r]?e[r]=o:Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]}),e):e}function u(t){var e=t?Object.keys(t).map(function(e){var n=t[e];if(void 0===n)return"";if(null===n)return Ft(e);if(Array.isArray(n)){var r=[];return n.forEach(function(t){void 0!==t&&(null===t?r.push(Ft(e)):r.push(Ft(e)+"="+Ft(t)))}),r.join("&")}return Ft(e)+"="+Ft(n)}).filter(function(t){return t.length>0}).join("&"):null;return e?"?"+e:""}function f(t,e,n,r){var o=r&&r.options.stringifyQuery,i=e.query||{};try{i=l(i)}catch(t){}var a={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:i,params:e.params||{},fullPath:d(e,o),matched:t?p(t):[]};return n&&(a.redirectedFrom=d(n,o)),Object.freeze(a)}function l(t){if(Array.isArray(t))return t.map(l);if(t&&"object"==typeof t){var e={};for(var n in t)e[n]=l(t[n]);return e}return t}function p(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function d(t,e){var n=t.path,r=t.query;void 0===r&&(r={});var o=t.hash;void 0===o&&(o="");var i=e||u;return(n||"/")+i(r)+o}function h(t,e){return e===Ht?t===e:!!e&&(t.path&&e.path?t.path.replace(Bt,"")===e.path.replace(Bt,"")&&t.hash===e.hash&&v(t.query,e.query):!(!t.name||!e.name)&&(t.name===e.name&&t.hash===e.hash&&v(t.query,e.query)&&v(t.params,e.params)))}function v(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(n){var r=t[n],o=e[n];return"object"==typeof r&&"object"==typeof o?v(r,o):String(r)===String(o)})}function m(t,e){return 0===t.path.replace(Bt,"/").indexOf(e.path.replace(Bt,"/"))&&(!e.hash||t.hash===e.hash)&&y(t.query,e.query)}function y(t,e){for(var n in e)if(!(n in t))return!1;return!0}function g(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||void 0!==t.button&&0!==t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){if(/\b_blank\b/i.test(t.currentTarget.getAttribute("target")))return}return t.preventDefault&&t.preventDefault(),!0}}function b(t){if(t)for(var e,n=0;n=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}function C(t){return t.replace(/\/\//g,"/")}function k(t,e){for(var n,r=[],o=0,i=0,a="",s=e&&e.delimiter||"/";null!=(n=Qt.exec(t));){var c=n[0],u=n[1],f=n.index;if(a+=t.slice(i,f),i=f+c.length,u)a+=u[1];else{var l=t[i],p=n[2],d=n[3],h=n[4],v=n[5],m=n[6],y=n[7];a&&(r.push(a),a="");var g=null!=p&&null!=l&&l!==p,b="+"===m||"*"===m,_="?"===m||"*"===m,w=n[2]||s,x=h||v;r.push({name:d||o++,prefix:p||"",delimiter:w,optional:_,repeat:b,partial:g,asterisk:!!y,pattern:x?E(x):y?".*":"[^"+S(w)+"]+?"})}}return i-1&&(o.params[p]=n.params[p]);if(s)return o.path=D(s.path,o.params,'named route "'+i+'"'),a(s,o,r)}else if(o.path){o.params={};for(var d=0;d=t.length?n():t[o]?e(t[o],function(){r(o+1)}):r(o+1)};r(0)}function ft(t){return function(e,n,r){var i=!1,a=0,s=null;lt(t,function(t,e,n,c){if("function"==typeof t&&void 0===t.cid){i=!0,a++;var u,f=ht(function(e){dt(e)&&(e=e.default),t.resolved="function"==typeof e?e:Rt.extend(e),n.components[c]=e,--a<=0&&r()}),l=ht(function(t){var e="Failed to resolve async component "+c+": "+t;s||(s=o(t)?t:new Error(e),r(s))});try{u=t(f,l)}catch(t){l(t)}if(u)if("function"==typeof u.then)u.then(f,l);else{var p=u.component;p&&"function"==typeof p.then&&p.then(f,l)}}}),i||r()}}function lt(t,e){return pt(t.map(function(t){return Object.keys(t.components).map(function(n){return e(t.components[n],t.instances[n],t,n)})}))}function pt(t){return Array.prototype.concat.apply([],t)}function dt(t){return t.__esModule||ie&&"Module"===t[Symbol.toStringTag]}function ht(t){var e=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}function vt(t){if(!t)if(Gt){var e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^https?:\/\/[^\/]+/,"")}else t="/";return"/"!==t.charAt(0)&&(t="/"+t),t.replace(/\/$/,"")}function mt(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n=0?e.slice(0,n):e)+"#"+t}function Et(t){ne?st(St(t)):window.location.hash=t}function jt(t){ne?ct(St(t)):window.location.replace(St(t))}function Mt(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function It(t,e,n){var r="hash"===n?"#"+e:e;return t?C(t+"/"+r):r}var Rt,Lt={name:"router-view",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,e){var n=e.props,r=e.children,o=e.parent,s=e.data;s.routerView=!0;for(var c=o.$createElement,u=n.name,f=o.$route,l=o._routerViewCache||(o._routerViewCache={}),p=0,d=!1;o&&o._routerRoot!==o;)o.$vnode&&o.$vnode.data.routerView&&p++,o._inactive&&(d=!0),o=o.$parent;if(s.routerViewDepth=p,d)return c(l[u],s,r);var h=f.matched[p];if(!h)return l[u]=null,c();var v=l[u]=h.components[u];s.registerRouteInstance=function(t,e){var n=h.instances[u];(e&&n!==t||!e&&n===t)&&(h.instances[u]=e)},(s.hook||(s.hook={})).prepatch=function(t,e){h.instances[u]=e.componentInstance};var m=s.props=i(f,h.props&&h.props[u]);if(m){m=s.props=a({},m);var y=s.attrs=s.attrs||{};for(var g in m)v.props&&g in v.props||(y[g]=m[g],delete m[g])}return c(v,s,r)}},Pt=/[!'()*]/g,Nt=function(t){return"%"+t.charCodeAt(0).toString(16)},Dt=/%2C/g,Ft=function(t){return encodeURIComponent(t).replace(Pt,Nt).replace(Dt,",")},Ut=decodeURIComponent,Bt=/\/?$/,Ht=f(null,{path:"/"}),qt=[String,Object],zt=[String,Array],Vt={name:"router-link",props:{to:{type:qt,required:!0},tag:{type:String,default:"a"},exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,event:{type:zt,default:"click"}},render:function(t){var e=this,n=this.$router,r=this.$route,o=n.resolve(this.to,r,this.append),i=o.location,a=o.route,s=o.href,c={},u=n.options.linkActiveClass,l=n.options.linkExactActiveClass,p=null==u?"router-link-active":u,d=null==l?"router-link-exact-active":l,v=null==this.activeClass?p:this.activeClass,y=null==this.exactActiveClass?d:this.exactActiveClass,_=i.path?f(null,i,null,n):a;c[y]=h(r,_),c[v]=this.exact?c[y]:m(r,_);var w=function(t){g(t)&&(e.replace?n.replace(i):n.push(i))},x={click:g};Array.isArray(this.event)?this.event.forEach(function(t){x[t]=w}):x[this.event]=w;var C={class:c};if("a"===this.tag)C.on=x,C.attrs={href:s};else{var k=b(this.$slots.default);if(k){k.isStatic=!1;var $=Rt.util.extend;(k.data=$({},k.data)).on=x;(k.data.attrs=$({},k.data.attrs)).href=s}else C.on=x}return t(this.tag,C,this.$slots.default)}},Gt="undefined"!=typeof window,Kt=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},Jt=N,Wt=k,Xt=$,Zt=A,Yt=P,Qt=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");Jt.parse=Wt,Jt.compile=Xt,Jt.tokensToFunction=Zt,Jt.tokensToRegExp=Yt;var te=Object.create(null),ee=Object.create(null),ne=Gt&&function(){var t=window.navigator.userAgent;return(-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)}(),re=Gt&&window.performance&&window.performance.now?window.performance:Date,oe=ot(),ie="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,ae=function(t,e){this.router=t,this.base=vt(e),this.current=Ht,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[]};ae.prototype.listen=function(t){this.cb=t},ae.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},ae.prototype.onError=function(t){this.errorCbs.push(t)},ae.prototype.transitionTo=function(t,e,n){var r=this,o=this.router.match(t,this.current);this.confirmTransition(o,function(){r.updateRoute(o),e&&e(o),r.ensureURL(),r.ready||(r.ready=!0,r.readyCbs.forEach(function(t){t(o)}))},function(t){n&&n(t),t&&!r.ready&&(r.ready=!0,r.readyErrorCbs.forEach(function(e){e(t)}))})},ae.prototype.confirmTransition=function(t,e,n){var i=this,a=this.current,s=function(t){o(t)&&(i.errorCbs.length?i.errorCbs.forEach(function(e){e(t)}):(r(!1,"uncaught error during route navigation:"),console.error(t))),n&&n(t)};if(h(t,a)&&t.matched.length===a.matched.length)return this.ensureURL(),s();var c=mt(this.current.matched,t.matched),u=c.updated,f=c.deactivated,l=c.activated,p=[].concat(bt(f),this.router.beforeHooks,_t(u),l.map(function(t){return t.beforeEnter}),ft(l));this.pending=t;var d=function(e,n){if(i.pending!==t)return s();try{e(t,a,function(t){!1===t||o(t)?(i.ensureURL(!0),s(t)):"string"==typeof t||"object"==typeof t&&("string"==typeof t.path||"string"==typeof t.name)?(s(),"object"==typeof t&&t.replace?i.replace(t):i.push(t)):n(t)})}catch(t){s(t)}};ut(p,d,function(){var n=[];ut(xt(l,n,function(){return i.current===t}).concat(i.router.resolveHooks),d,function(){if(i.pending!==t)return s();i.pending=null,e(t),i.router.app&&i.router.app.$nextTick(function(){n.forEach(function(t){t()})})})})},ae.prototype.updateRoute=function(t){var e=this.current;this.current=t,this.cb&&this.cb(t),this.router.afterHooks.forEach(function(n){n&&n(t,e)})};var se=function(t){function e(e,n){var r=this;t.call(this,e,n);var o=e.options.scrollBehavior;o&&J();var i=$t(this.base);window.addEventListener("popstate",function(t){var n=r.current,a=$t(r.base);r.current===Ht&&a===i||r.transitionTo(a,function(t){o&&W(e,t,n,!0)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,function(t){st(C(r.base+t.fullPath)),W(r.router,t,i,!1),e&&e(t)},n)},e.prototype.replace=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,function(t){ct(C(r.base+t.fullPath)),W(r.router,t,i,!1),e&&e(t)},n)},e.prototype.ensureURL=function(t){if($t(this.base)!==this.current.fullPath){var e=C(this.base+this.current.fullPath);t?st(e):ct(e)}},e.prototype.getCurrentLocation=function(){return $t(this.base)},e}(ae),ce=function(t){function e(e,n,r){t.call(this,e,n),r&&Ot(this.base)||Tt()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this,e=this.router,n=e.options.scrollBehavior,r=ne&&n;r&&J(),window.addEventListener(ne?"popstate":"hashchange",function(){var e=t.current;Tt()&&t.transitionTo(At(),function(n){r&&W(t.router,n,e,!0),ne||jt(n.fullPath)})})},e.prototype.push=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,function(t){Et(t.fullPath),W(r.router,t,i,!1),e&&e(t)},n)},e.prototype.replace=function(t,e,n){var r=this,o=this,i=o.current;this.transitionTo(t,function(t){jt(t.fullPath),W(r.router,t,i,!1),e&&e(t)},n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;At()!==e&&(t?Et(e):jt(e))},e.prototype.getCurrentLocation=function(){return At()},e}(ae),ue=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)},n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)},n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,function(){e.index=n,e.updateRoute(r)})}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(ae),fe=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=V(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!ne&&!1!==t.fallback,this.fallback&&(e="hash"),Gt||(e="abstract"),this.mode=e,e){case"history":this.history=new se(this,t.base);break;case"hash":this.history=new ce(this,t.base,this.fallback);break;case"abstract":this.history=new ue(this,t.base)}},le={currentRoute:{configurable:!0}};fe.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},le.currentRoute.get=function(){return this.history&&this.history.current},fe.prototype.init=function(t){var e=this;if(this.apps.push(t),!this.app){this.app=t;var n=this.history;if(n instanceof se)n.transitionTo(n.getCurrentLocation());else if(n instanceof ce){var r=function(){n.setupListeners()};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen(function(t){e.apps.forEach(function(e){e._route=t})})}},fe.prototype.beforeEach=function(t){return Mt(this.beforeHooks,t)},fe.prototype.beforeResolve=function(t){return Mt(this.resolveHooks,t)},fe.prototype.afterEach=function(t){return Mt(this.afterHooks,t)},fe.prototype.onReady=function(t,e){this.history.onReady(t,e)},fe.prototype.onError=function(t){this.history.onError(t)},fe.prototype.push=function(t,e,n){this.history.push(t,e,n)},fe.prototype.replace=function(t,e,n){this.history.replace(t,e,n)},fe.prototype.go=function(t){this.history.go(t)},fe.prototype.back=function(){this.go(-1)},fe.prototype.forward=function(){this.go(1)},fe.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map(function(t){return Object.keys(t.components).map(function(e){return t.components[e]})})):[]},fe.prototype.resolve=function(t,e,n){var r=q(t,e||this.history.current,n,this),o=this.match(r,e),i=o.redirectedFrom||o.fullPath;return{location:r,route:o,href:It(this.history.base,i,this.mode),normalizedTo:r,resolved:o}},fe.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==Ht&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(fe.prototype,le),fe.install=_,fe.version="3.0.1",Gt&&window.Vue&&window.Vue.use(fe),e.a=fe},function(t,e,n){"use strict";var r=(n(18),n(20),n(70)),o=n(4);e.a={components:{Todo:r.a},data:function(){return{isLoggedIn:!1}},mounted:function(){var t=this;o.a.getSession().then(function(e){t.isLoggedIn=!0})},watch:{isLoggedIn:function(t){this.$store.dispatch("getTodos")}}}},function(t,e,n){"use strict";function r(t){n(64)}var o=n(19),i=n(66),a=n(3),s=r,c=a(o.a,i.a,!1,s,null,null);e.a=c.exports},function(t,e,n){"use strict";var r=n(4);e.a={data:function(){return{username:"",password:"",remember:!1}},methods:{checkForm:function(t){t.preventDefault();var e=this;r.a.login({username:this.username,password:this.password,remember:this.remember}).then(function(t){e.$router.push({path:"/"},function(){e.success("Logged in successfully!")})}).catch(function(t){var n=t.response.data.message;for(var r in n)!function(t){n[t].forEach(function(n){e.error(t+": "+n)})}(r)})}}}},function(t,e,n){"use strict";function r(t){n(67)}var o=n(21),i=n(69),a=n(3),s=r,c=a(o.a,i.a,!1,s,null,null);e.a=c.exports},function(t,e,n){"use strict";var r=n(4);e.a={data:function(){return{username:"",password:"",confirm:""}},methods:{checkForm:function(t){t.preventDefault();var e=this;this.password!==this.confirm?(console.log("Two passwords are different!"),this.error("Two passwords are different!")):r.a.register({username:this.username,password:this.password}).then(function(t){e.$router.push({path:"/"},function(){e.success("Register successfully, please login!")})}).catch(function(t){var n=t.response.data.message;for(var r in n)!function(t){n[t].forEach(function(n){e.error(t+": "+n)})}(r)})}}}},function(t,e,n){"use strict";var r=n(73),o={all:function(t){return t},undone:function(t){return t.filter(function(t){return!t.done})},completed:function(t){return t.filter(function(t){return t.done})}};e.a={components:{TodoItem:r.a},data:function(){return{visibility:"all",filters:o}},computed:{todos:function(){return this.$store.state.todos},visibleTodos:function(){return o[this.visibility](this.todos)}},methods:{addTodo:function(t){var e=t.target.value;e.trim()&&this.$store.dispatch("addTodo",e),t.target.value=""}},filters:{capitalize:function(t){return t.charAt(0).toUpperCase()+t.slice(1)}}}},function(t,e,n){"use strict";var r=n(10);e.a={props:["todo"],data:function(){return{editing:!1}},methods:Object(r.b)(["toggleTodo","removeTodo"])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7),o=n(27),i=n(36),a=n(59),s=n.n(a),c=n(16),u=n(60);r.a.use(s.a,{messageOptions:{timeout:3e3}}),r.a.use(c.a),new r.a({store:i.a,router:u.a,el:"#app",render:function(t){return t(o.a)}})},function(t,e,n){(function(t){function r(t,e){this._id=t,this._clearFn=e}var o=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;e.setTimeout=function(){return new r(i.call(setTimeout,o,arguments),clearTimeout)},e.setInterval=function(){return new r(i.call(setInterval,o,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(o,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(26),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(e,n(5))},function(t,e,n){(function(t,e){!function(t,n){"use strict";function r(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;nul>li{display:inline-block;padding-right:.5em}footer a{color:inherit}footer li+li{padding-left:.5em;padding-right:0;border-left:1px solid #e6e6e6}form{text-align:left}input[type=password],input[type=text]{margin:10px 0;padding:12px 12px 12px 20px;width:100%;border:1px solid #ddd;box-shadow:3px 3px 1px rgba(0,0,0,.06)}.btn:focus,input[type=password]:focus,input[type=text]:focus{outline:none}.btn{text-decoration:none;color:#fff;padding:10px;background-color:#42b983;border:none;font-size:1em;cursor:pointer}.form-footer{display:flex;justify-content:space-between;margin:10px 0}",""])},function(t,e){t.exports=function(t,e){for(var n=[],r={},o=0;o
15 | * @license MIT
16 | */
17 | t.exports=function(t){return null!=t&&(n(t)||r(t)||!!t._isBuffer)}},function(t,e,n){"use strict";function r(t){this.defaults=t,this.interceptors={request:new a,response:new a}}var o=n(6),i=n(0),a=n(52),s=n(53);r.prototype.request=function(t){"string"==typeof t&&(t=i.merge({url:arguments[0]},arguments[1])),t=i.merge(o,{method:"get"},this.defaults,t),t.method=t.method.toLowerCase();var e=[s,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},i.forEach(["delete","get","head","options"],function(t){r.prototype[t]=function(e,n){return this.request(i.merge(n||{},{method:t,url:e}))}}),i.forEach(["post","put","patch"],function(t){r.prototype[t]=function(e,n,r){return this.request(i.merge(r||{},{method:t,url:e,data:n}))}}),t.exports=r},function(t,e,n){"use strict";var r=n(0);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){"use strict";var r=n(13);t.exports=function(t,e,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t}},function(t,e,n){"use strict";function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=n(0);t.exports=function(t,e,n){if(!e)return t;var i;if(n)i=n(e);else if(o.isURLSearchParams(e))i=e.toString();else{var a=[];o.forEach(e,function(t,e){null!==t&&void 0!==t&&(o.isArray(t)?e+="[]":t=[t],o.forEach(t,function(t){o.isDate(t)?t=t.toISOString():o.isObject(t)&&(t=JSON.stringify(t)),a.push(r(e)+"="+r(t))}))}),i=a.join("&")}return i&&(t+=(-1===t.indexOf("?")?"?":"&")+i),t}},function(t,e,n){"use strict";var r=n(0),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,i,a={};return t?(r.forEach(t.split("\n"),function(t){if(i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e){if(a[e]&&o.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}}),a):a}},function(t,e,n){"use strict";var r=n(0);t.exports=r.isStandardBrowserEnv()?function(){function t(t){var e=t;return n&&(o.setAttribute("href",e),e=o.href),o.setAttribute("href",e),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var e,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return e=t(window.location.href),function(n){var o=r.isString(n)?t(n):n;return o.protocol===e.protocol&&o.host===e.host}}():function(){return function(){return!0}}()},function(t,e,n){"use strict";function r(){this.message="String contains an invalid character"}function o(t){for(var e,n,o=String(t),a="",s=0,c=i;o.charAt(0|s)||(c="=",s%1);a+=c.charAt(63&e>>8-s%1*8)){if((n=o.charCodeAt(s+=.75))>255)throw new r;e=e<<8|n}return a}var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.prototype=new Error,r.prototype.code=5,r.prototype.name="InvalidCharacterError",t.exports=o},function(t,e,n){"use strict";var r=n(0);t.exports=r.isStandardBrowserEnv()?function(){return{write:function(t,e,n,o,i,a){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(t,e,n){"use strict";function r(){this.handlers=[]}var o=n(0);r.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},r.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},r.prototype.forEach=function(t){o.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=r},function(t,e,n){"use strict";function r(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var o=n(0),i=n(54),a=n(14),s=n(6),c=n(55),u=n(56);t.exports=function(t){return r(t),t.baseURL&&!c(t.url)&&(t.url=u(t.baseURL,t.url)),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=o.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||s.adapter)(t).then(function(e){return r(t),e.data=i(e.data,e.headers,t.transformResponse),e},function(e){return a(e)||(r(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";function r(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new o(t),e(n.reason))})}var o=n(15);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var t;return{token:new r(function(e){t=e}),cancel:t}},t.exports=r},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){!function(e,n){t.exports=n()}(window,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(e){return t[e]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="dist/",e(e.s=51)}([function(t,e,n){t.exports={default:n(40),__esModule:!0}},function(t,e,n){t.exports=!n(2)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){var n=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){(function(t){function r(t,e){this._id=t,this._clearFn=e}var o=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;e.setTimeout=function(){return new r(i.call(setTimeout,o,arguments),clearTimeout)},e.setInterval=function(){return new r(i.call(setInterval,o,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(o,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(23),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(7))},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(34);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(10),o=n(9);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(45),o=n(44),i=n(42),a=Object.defineProperty;e.f=n(1)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(5),o=n(4),i=n(48),a=n(46),s=function(t,e,n){var c,u,f,l=t&s.F,p=t&s.G,d=t&s.S,h=t&s.P,v=t&s.B,m=t&s.W,y=p?o:o[e]||(o[e]={}),g=y.prototype,b=p?r:d?r[e]:(r[e]||{}).prototype;for(c in p&&(n=e),n)(u=!l&&b&&void 0!==b[c])&&c in y||(f=u?b[c]:n[c],y[c]=p&&"function"!=typeof b[c]?n[c]:v&&u?i(f,r):m&&b[c]==f?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(f):h&&"function"==typeof f?i(Function.call,f):f,h&&((y.virtual||(y.virtual={}))[c]=f,t&s.R&&g&&!g[c]&&a(g,c,f)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e,n){t.exports={default:n(50),__esModule:!0}},function(t,e,n){"use strict";e.__esModule=!0;var r,o=n(14),i=(r=o)&&r.__esModule?r:{default:r};e.default=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},e=t.duration,n=void 0===e?3e3:e,r=t.template,o=void 0===r?'\n\n \n\n':r,i=t.css,a=void 0===i?null:i,s=arguments[1];return{template:o,props:{transitionName:{type:String,default:"flash-transition"},outerClass:{type:String,default:"flash__wrapper"}},data:function(){return u()({message:null,closed:!1,_timeout:null},{duration:n,css:a})},computed:{storage:function(){return s.storage}},methods:{cssClasses:function(t){return this.getFlash(t).type},getFlash:function(t){return this.storage[t]},destroyFlash:function(t){this.getFlash(t).destroy()},onMouseOver:function(t){var e=this.getFlash(t);void 0!==e&&e.onStartInteract()},onMouseOut:function(t){var e=this.getFlash(t);void 0!==e&&e.onCompleteInteract()}}}};n.d(e,"FlashMessageComponent",function(){return v}),n(21);var m=function(){function t(e,n,r,o,i){l()(this,t);var a;this.storage=e,this.content=n,this.options=u()({autoEmit:!0,important:!1,pauseOnInteract:!1,timeout:0,beforeDestroy:null,onStartInteract:null,onCompleteInteract:null},i,o),this.type=r,this.id=(a=(new Date).getTime(),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=(a+16*Math.random())%16|0;return a=Math.floor(a/16),("x"===t?e:3&e|8).toString(16)})),this.timer=null,this.options.autoEmit&&this.emit()}return d()(t,[{key:"emit",value:function(){this.storage.push(this.id,this),this.startSelfDestructTimer()}},{key:"destroy",value:function(){this.killSelfDestructTimer(),this.beforeDestroy(),this.storage.destroy(this.id)}},{key:"setSelfDestructTimeout",value:function(t){this.options.timeout=t}},{key:"startSelfDestructTimer",value:function(){var t=this;this.options.timeout>0&&Object(h.setTimeout)(function(){t.destroy()},this.options.timeout)}},{key:"killSelfDestructTimer",value:function(){Object(h.clearTimeout)(this.timer)}},{key:"beforeDestroy",value:function(){r(this.options.beforeDestroy)&&this.options.beforeDestroy()}},{key:"onStartInteract",value:function(){this.options.pauseOnInteract&&this.killSelfDestructTimer(),r(this.options.onStartInteract)&&this.options.onStartInteract()}},{key:"onCompleteInteract",value:function(){this.options.pauseOnInteract&&this.startSelfDestructTimer(),r(this.options.onCompleteInteract)&&this.options.onCompleteInteract()}}]),t}();e.default={install:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=u()({method:"flash",storage:"$flashStorage",createShortcuts:!0,name:"flash-message"},e),r=new t({data:function(){return{storage:{}}},methods:{flash:function(t,e,n){return new m(r,t,e,n)},push:function(e,n){t.set(this.storage,e,n)},destroy:function(e){t.delete(this.storage,e)},destroyAll:function(){t.set(this,"storage",{})}}}),o=n.createShortcuts?{info:function(t,e){return this[n.method](t,"info",e)},error:function(t,e){return this[n.method](t,"error",e)},warning:function(t,e){return this[n.method](t,"warning",e)},success:function(t,e){return this[n.method](t,"success",e)}}:{};t.mixin({methods:s()(i()({},n.method,function(t,e,o){return arguments.length>0?new m(r,t,e,o,n.messageOptions):r}),o)}),t.prototype[n.storage]=r,t.component(n.name,v(n,r))}}},,function(t,e,n){},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(u===setTimeout)return setTimeout(t,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(t,0);try{return u(t,0)}catch(e){try{return u.call(null,t,0)}catch(e){return u.call(this,t,0)}}}function i(){h&&p&&(h=!1,p.length?d=p.concat(d):v=-1,d.length&&a())}function a(){if(!h){var t=o(i);h=!0;for(var e=d.length;e;){for(p=d,d=[];++v1)for(var n=1;n0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(11),o=n(32),i=n(31);t.exports=function(t){return function(e,n,a){var s,c=r(e),u=o(c.length),f=i(a,u);if(t&&n!=n){for(;u>f;)if((s=c[f++])!=s)return!0}else for(;u>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(35),o=n(11),i=n(33)(!1),a=n(30)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},function(t,e,n){var r=n(36),o=n(27);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){"use strict";var r=n(37),o=n(26),i=n(25),a=n(24),s=n(10),c=Object.assign;t.exports=!c||n(2)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r})?function(t,e){for(var n=a(t),c=arguments.length,u=1,f=o.f,l=i.f;c>u;)for(var p,d=s(arguments[u++]),h=f?r(d).concat(f(d)):r(d),v=h.length,m=0;v>m;)l.call(d,p=h[m++])&&(n[p]=d[p]);return n}:c},function(t,e,n){var r=n(13);r(r.S+r.F,"Object",{assign:n(38)})},function(t,e,n){n(39),t.exports=n(4).Object.assign},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(3);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(3),o=n(5).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){t.exports=!n(1)&&!n(2)(function(){return 7!=Object.defineProperty(n(43)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(3);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var r=n(12),o=n(41);t.exports=n(1)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(47);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(13);r(r.S+r.F*!n(1),"Object",{defineProperty:n(12).f})},function(t,e,n){n(49);var r=n(4).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){t.exports=n(19)}])})},function(t,e,n){"use strict";var r=n(16),o=n(61),i=n(18),a=n(20),s=new r.a({routes:[{path:"/",component:o.a},{path:"/login",component:i.a},{path:"/register",component:a.a}]});e.a=s},function(t,e,n){"use strict";function r(t){n(62)}var o=n(17),i=n(78),a=n(3),s=r,c=a(o.a,i.a,!1,s,null,null);e.a=c.exports},function(t,e,n){var r=n(63);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(2)("76d35bb8",r,!0,{})},function(t,e,n){e=t.exports=n(1)(!1),e.push([t.i,".btn{text-decoration:none;color:#fff;padding:10px;background-color:#42b983}",""])},function(t,e,n){var r=n(65);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(2)("1b8a869c",r,!0,{})},function(t,e,n){e=t.exports=n(1)(!1),e.push([t.i,"",""])},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{attrs:{action:"/auth/login",method:"post"},on:{submit:t.checkForm}},[n("h2",[t._v("Login")]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"username"}},[t._v("Username")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.username,expression:"username"}],attrs:{type:"text",id:"username",name:"username",required:""},domProps:{value:t.username},on:{input:function(e){e.target.composing||(t.username=e.target.value)}}})]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"password"}},[t._v("Password")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.password,expression:"password"}],attrs:{type:"password",id:"password",name:"password",required:""},domProps:{value:t.password},on:{input:function(e){e.target.composing||(t.password=e.target.value)}}})]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"remember"}},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.remember,expression:"remember"}],attrs:{type:"checkbox",id:"remember",name:"remember"},domProps:{checked:Array.isArray(t.remember)?t._i(t.remember,null)>-1:t.remember},on:{change:function(e){var n=t.remember,r=e.target,o=!!r.checked;if(Array.isArray(n)){var i=t._i(n,null);r.checked?i<0&&(t.remember=n.concat([null])):i>-1&&(t.remember=n.slice(0,i).concat(n.slice(i+1)))}else t.remember=o}}}),t._v("\n Remember Me\n ")])]),t._v(" "),n("div",{staticClass:"form-footer"},[n("button",{staticClass:"btn",attrs:{type:"submit",name:"submit"}},[t._v("Submit")]),t._v(" "),n("router-link",{staticClass:"btn",attrs:{to:"/"}},[t._v("Return Home")])],1)])},o=[],i={render:r,staticRenderFns:o};e.a=i},function(t,e,n){var r=n(68);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(2)("4521bcc6",r,!0,{})},function(t,e,n){e=t.exports=n(1)(!1),e.push([t.i,"",""])},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{attrs:{action:"/auth/login",method:"post"},on:{submit:t.checkForm}},[n("h2",[t._v("Register")]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"username"}},[t._v("Username")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.username,expression:"username"}],attrs:{type:"text",id:"username",name:"username",required:""},domProps:{value:t.username},on:{input:function(e){e.target.composing||(t.username=e.target.value)}}})]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{attrs:{for:"password"}},[t._v("Password")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.password,expression:"password"}],attrs:{type:"password",id:"password",name:"password",required:""},domProps:{value:t.password},on:{input:function(e){e.target.composing||(t.password=e.target.value)}}})]),t._v(" "),n("div",{staticClass:"form-group"},[n("label",{attrs:{for:""}},[t._v("Confirm Password")]),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.confirm,expression:"confirm"}],attrs:{type:"password",id:"confirm",name:"confirm",required:""},domProps:{value:t.confirm},on:{input:function(e){e.target.composing||(t.confirm=e.target.value)}}})]),t._v(" "),n("div",{staticClass:"form-footer"},[n("button",{staticClass:"btn",attrs:{type:"submit",name:"submit"}},[t._v("Submit")]),t._v(" "),n("router-link",{staticClass:"btn",attrs:{to:"/"}},[t._v("Return Home")])],1)])},o=[],i={render:r,staticRenderFns:o};e.a=i},function(t,e,n){"use strict";function r(t){n(71)}var o=n(22),i=n(77),a=n(3),s=r,c=a(o.a,i.a,!1,s,null,null);e.a=c.exports},function(t,e,n){var r=n(72);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(2)("3bb79ba5",r,!0,{})},function(t,e,n){e=t.exports=n(1)(!1),e.push([t.i,"*{box-sizing:border-box}#todo-input{margin:10px 0;padding:12px 12px 12px 20px;font-size:1.5em;width:100%;border:1px solid #ddd;box-shadow:3px 3px 1px rgba(0,0,0,.06)}#todo-input:focus{outline:none}.nav-link{padding:8px;box-sizing:border-box;color:#2c3e50;text-decoration:none}.nav-link.active,.nav-link:hover{border-bottom:3px solid #42b983}.nav-link.active{color:#42b983;font-weight:700}ul{list-style-type:none;padding:0}.nav>li{display:inline-block;margin:0 10px}",""])},function(t,e,n){"use strict";function r(t){n(74)}var o=n(23),i=n(76),a=n(3),s=r,c=a(o.a,i.a,!1,s,null,null);e.a=c.exports},function(t,e,n){var r=n(75);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(2)("0202aeae",r,!0,{})},function(t,e,n){e=t.exports=n(1)(!1),e.push([t.i,'.todo-item{font-size:1.5em;text-align:left;padding:5px 0}.todo-item:hover{background:#f7f7f7}.todo-item:hover .edit-item,.todo-item:hover .remove-item{display:block}.complete .todo-label{text-decoration:line-through}.checkbox,.complete .todo-label{position:relative;cursor:pointer}.checkbox{margin-right:2.5em;-webkit-appearance:none;top:-.375em}.checkbox:focus{outline:none}.checkbox:before{transition:all .3s ease-in-out;content:"";position:absolute;left:0;top:-.875em;z-index:1;width:1.5em;height:1.5em;border:2px solid #f2f2f2}.checkbox:checked:before{transform:rotate(-45deg);height:.75em;border-color:#42b983;border-top-style:none;border-right-style:none}.edit-item,.remove-item{-webkit-appearance:none;float:right;font-size:1.1em;background:none;border:none;cursor:pointer;margin-top:-2px;display:none}.remove-item:focus{outline:none}',""])},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("li",{staticClass:"todo-item",class:{complete:t.todo.done}},[n("div",{staticClass:"view"},[n("label",{staticClass:"todo-label"},[n("input",{staticClass:"checkbox",attrs:{type:"checkbox"},domProps:{checked:t.todo.done},on:{change:function(e){t.toggleTodo(t.todo)}}}),t._v("\n "+t._s(t.todo.text)+"\n ")]),t._v(" "),n("button",{staticClass:"remove-item",on:{click:function(e){t.removeTodo(t.todo)}}},[n("i",{staticClass:"fa fa-times"})])])])},o=[],i={render:r,staticRenderFns:o};e.a=i},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"todo"}},[n("input",{attrs:{placeholder:"What needs to be done?",id:"todo-input"},on:{keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.addTodo(e):null}}}),t._v(" "),n("ul",{staticClass:"nav"},t._l(t.filters,function(e,r){return n("li",{key:r},[n("a",{staticClass:"nav-link",class:{active:t.visibility===r},attrs:{href:"javascript:void(0)"},on:{click:function(e){t.visibility=r}}},[t._v(t._s(t._f("capitalize")(r)))])])})),t._v(" "),n("ul",{staticClass:"todo-list"},t._l(t.visibleTodos,function(t,e){return n("TodoItem",{key:e,attrs:{todo:t}})}))])},o=[],i={render:r,staticRenderFns:o};e.a=i},function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isLoggedIn?n("Todo"):n("div",{staticClass:"auth"},[n("router-link",{staticClass:"btn",attrs:{to:"/login"}},[t._v("Login")]),t._v(" "),n("router-link",{staticClass:"btn",attrs:{to:"/register"}},[t._v("Register")])],1)},o=[],i={render:r,staticRenderFns:o};e.a=i}]);
18 | //# sourceMappingURL=build.js.map
--------------------------------------------------------------------------------