├── .gitattributes ├── .gitignore ├── .travis.yml ├── README.md ├── __pycache__ └── wsgi.cpython-36.pyc ├── app ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-36.pyc │ ├── config.cpython-36.pyc │ ├── factory.cpython-36.pyc │ ├── utils.cpython-36.pyc │ └── views.cpython-36.pyc ├── config.py ├── factory.py ├── models │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-36.pyc │ │ ├── base.cpython-36.pyc │ │ ├── database.cpython-36.pyc │ │ └── datastore.cpython-36.pyc │ ├── base.py │ ├── database.py │ └── datastore.py ├── resources │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-36.pyc │ │ └── example.cpython-36.pyc │ └── example.py ├── static │ ├── css │ │ └── app.e2713bb0.css │ ├── img │ │ └── logo.82b9c7a5.png │ └── js │ │ ├── app.c249faaa.js │ │ ├── app.c249faaa.js.map │ │ ├── chunk-vendors.b10d6c99.js │ │ └── chunk-vendors.b10d6c99.js.map ├── templates │ ├── favicon.ico │ └── index.html ├── utils.py └── views.py ├── bin ├── phantomjs-linux ├── phantomjs-mac └── phantomjs.exe ├── pytest.ini ├── requirements.txt ├── settings.py ├── tests ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-36.pyc │ ├── conftest.cpython-36-PYTEST.pyc │ ├── test_app.cpython-36-PYTEST.pyc │ ├── test_models.cpython-36-PYTEST.pyc │ ├── test_resources.cpython-36-PYTEST.pyc │ ├── test_vue_integration.cpython-36-PYTEST.pyc │ └── utils.cpython-36.pyc ├── conftest.py ├── test_app.py ├── test_models.py ├── test_resources.py ├── test_vue_integration.py └── utils.py ├── unit-tests.sh ├── wait-for-it.sh ├── web ├── .gitignore ├── README.md ├── babel.config.js ├── package.json ├── public │ ├── favicon.ico │ └── index.html ├── src │ ├── App.vue │ ├── assets │ │ └── logo.png │ ├── components │ │ └── HelloWorld.vue │ └── main.js ├── vue.config.js └── yarn.lock └── wsgi.py /.gitattributes: -------------------------------------------------------------------------------- 1 | phantomjs* filter=lfs diff=lfs merge=lfs -text 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | venv 3 | *.log -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | dist: trusty 3 | language: python 4 | python: 5 | - "3.6" 6 | env: 7 | - CI_TEST=true, FLASK_APP=wsgi:app 8 | before_install: 9 | - curl -sL https://deb.nodesource.com/setup_8.x | sudo bash - 10 | - sudo apt-get install nodejs 11 | install: 12 | - pip install -r requirements.txt 13 | - cd web 14 | - npm install 15 | - npm run build 16 | - cd .. 17 | before_script: 18 | - chmod +x wait-for-it.sh 19 | - flask run & 20 | - ./wait-for-it.sh -h localhost -p 5000 -t 10 21 | script: 22 | - pytest tests/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://travis-ci.org/michaelbukachi/flask-vuejs-tutorial.svg?branch=master)](https://travis-ci.org/michaelbukachi/flask-vuejs-tutorial) 2 | 3 | ## flask-vuejs-tutorial 4 | 5 | A tutorial to integrate Vue.js with flask 6 | 7 | ### Installation 8 | 1. Clone the repo 9 | 2. Run `pip install -r requirements` 10 | 3. Run `export FLASK_APP=wsgi:app` 11 | 4. Run `flask run` 12 | 13 | ### Build Web App 14 | In order to rebuild the web app (Vue) 15 | 1. Navigate to the `web` folder 16 | 2. Run `yarn install` 17 | 3. Run `yarn build` 18 | 19 | 20 | The tutorial can be found [here](https://dev.to/michaelbukachi/flask-vue-js-integration-tutorial-2g90). -------------------------------------------------------------------------------- /__pycache__/wsgi.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/__pycache__/wsgi.cpython-36.pyc -------------------------------------------------------------------------------- /app/__init__.py: -------------------------------------------------------------------------------- 1 | import click 2 | from werkzeug.middleware.proxy_fix import ProxyFix 3 | 4 | from .factory import Factory 5 | 6 | 7 | def create_app(environment='development'): 8 | f = Factory(environment) 9 | f.set_flask() 10 | f.set_db() 11 | f.set_migration() 12 | f.set_api() 13 | 14 | # from models import Example 15 | 16 | app = f.flask 17 | 18 | from .views import sample_page 19 | 20 | app.register_blueprint(sample_page, url_prefix='/views') 21 | 22 | if app.config['TESTING']: # pragma: no cover 23 | # Setup app for testing 24 | @app.before_first_request 25 | def initialize_app(): 26 | pass 27 | 28 | @app.after_request 29 | def after_request(response): 30 | response.headers.add('Access-Control-Allow-Origin', '*') 31 | response.headers.add('Access-Control-Allow-Headers', 32 | 'Content-Type,Authorization') 33 | response.headers.add('Access-Control-Allow-Methods', 34 | 'GET,PUT,POST,DELETE') 35 | 36 | return response 37 | 38 | app.wsgi_app = ProxyFix(app.wsgi_app) 39 | 40 | @app.cli.command() 41 | @click.argument('command') 42 | def setup(command): 43 | pass 44 | 45 | return app 46 | 47 | -------------------------------------------------------------------------------- /app/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/app/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /app/__pycache__/config.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/app/__pycache__/config.cpython-36.pyc -------------------------------------------------------------------------------- /app/__pycache__/factory.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/app/__pycache__/factory.cpython-36.pyc -------------------------------------------------------------------------------- /app/__pycache__/utils.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/app/__pycache__/utils.cpython-36.pyc -------------------------------------------------------------------------------- /app/__pycache__/views.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/app/__pycache__/views.cpython-36.pyc -------------------------------------------------------------------------------- /app/config.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | 4 | class Config: 5 | ERROR_404_HELP = False 6 | 7 | SECRET_KEY = os.getenv('APP_SECRET', 'secret key') 8 | 9 | SQLALCHEMY_DATABASE_URI = 'sqlite:///tutorial.db' 10 | SQLALCHEMY_TRACK_MODIFICATIONS = False 11 | 12 | DOC_USERNAME = 'api' 13 | DOC_PASSWORD = 'password' 14 | 15 | 16 | class DevConfig(Config): 17 | DEBUG = True 18 | 19 | 20 | class TestConfig(Config): 21 | SQLALCHEMY_DATABASE_URI = 'sqlite://' 22 | TESTING = True 23 | DEBUG = True 24 | 25 | 26 | class ProdConfig(Config): 27 | DEBUG = False 28 | 29 | 30 | config = { 31 | 'development': DevConfig, 32 | 'testing': TestConfig, 33 | 'production': ProdConfig 34 | } 35 | -------------------------------------------------------------------------------- /app/factory.py: -------------------------------------------------------------------------------- 1 | import logging 2 | import os 3 | import sys 4 | from logging.handlers import RotatingFileHandler 5 | 6 | from flask import Flask 7 | 8 | from .config import config 9 | 10 | 11 | class Factory: 12 | 13 | def __init__(self, environment='development'): 14 | self._environment = os.environ.get('APP_ENVIRONMENT', environment) 15 | self.flask = None 16 | 17 | @property 18 | def environment(self): 19 | return self._environment 20 | 21 | @environment.setter 22 | def environment(self, env): 23 | self._environment = env 24 | 25 | def set_flask(self, **kwargs): 26 | self.flask = Flask(__name__, **kwargs) 27 | self.flask.config.from_object(config[self._environment]) 28 | # setup logging 29 | file_handler = RotatingFileHandler('api.log', maxBytes=10000, backupCount=1) 30 | file_handler.setLevel(logging.INFO) 31 | self.flask.logger.addHandler(file_handler) 32 | stdout = logging.StreamHandler(sys.stdout) 33 | stdout.setLevel(logging.DEBUG) 34 | self.flask.logger.addHandler(stdout) 35 | 36 | return self.flask 37 | 38 | def set_db(self): 39 | from .models.database import db 40 | db.init_app(self.flask) 41 | 42 | def set_migration(self): 43 | from .models.database import db, migrate 44 | migrate.init_app(self.flask, db) 45 | 46 | def set_api(self): 47 | from .resources import api 48 | api.init_app(self.flask, version='1.0.0', title='api') 49 | -------------------------------------------------------------------------------- /app/models/__init__.py: -------------------------------------------------------------------------------- 1 | from .base import Example -------------------------------------------------------------------------------- /app/models/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/app/models/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /app/models/__pycache__/base.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/app/models/__pycache__/base.cpython-36.pyc -------------------------------------------------------------------------------- /app/models/__pycache__/database.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/app/models/__pycache__/database.cpython-36.pyc -------------------------------------------------------------------------------- /app/models/__pycache__/datastore.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/app/models/__pycache__/datastore.cpython-36.pyc -------------------------------------------------------------------------------- /app/models/base.py: -------------------------------------------------------------------------------- 1 | from sqlalchemy import Column, DateTime, func, Integer, String 2 | 3 | from .database import db 4 | 5 | 6 | class Base(db.Model): 7 | __abstract__ = True 8 | 9 | id = Column(Integer, primary_key=True) 10 | created_at = Column(DateTime, default=func.now()) 11 | updated_at = Column(DateTime, onupdate=func.now()) 12 | 13 | 14 | class Example(Base): 15 | name = Column(String) -------------------------------------------------------------------------------- /app/models/database.py: -------------------------------------------------------------------------------- 1 | from flask_migrate import Migrate 2 | from flask_sqlalchemy import SQLAlchemy 3 | 4 | db = SQLAlchemy() 5 | migrate = Migrate() 6 | -------------------------------------------------------------------------------- /app/models/datastore.py: -------------------------------------------------------------------------------- 1 | from abc import ABC 2 | 3 | from .base import Example 4 | 5 | 6 | class Datastore(ABC): 7 | 8 | def __init__(self, _db=None): 9 | self.session = None 10 | if _db: 11 | self.session = _db.session 12 | 13 | 14 | class ExampleDatastore(Datastore): 15 | 16 | def __init__(self, _db): 17 | super().__init__(_db) 18 | 19 | def create_example(self, name): 20 | ex = Example(name=name) 21 | self.session.add(ex) 22 | self.session.commit() 23 | -------------------------------------------------------------------------------- /app/resources/__init__.py: -------------------------------------------------------------------------------- 1 | from .example import ns as example_ns 2 | from ..utils import PatchedApi 3 | 4 | api = PatchedApi() 5 | 6 | api.add_namespace(example_ns) 7 | -------------------------------------------------------------------------------- /app/resources/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/app/resources/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /app/resources/__pycache__/example.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/app/resources/__pycache__/example.cpython-36.pyc -------------------------------------------------------------------------------- /app/resources/example.py: -------------------------------------------------------------------------------- 1 | from flask_restplus import Namespace, Resource, fields 2 | 3 | ns = Namespace('example', description='Examples') 4 | 5 | success_model = ns.model('Success', { 6 | 'message': fields.String 7 | }) 8 | 9 | 10 | @ns.route('', endpoint='index') 11 | class IndexPage(Resource): 12 | 13 | @ns.marshal_with(success_model) 14 | def get(self): 15 | """ 16 | Example url 17 | """ 18 | return {'message': 'Success'} 19 | -------------------------------------------------------------------------------- /app/static/css/app.e2713bb0.css: -------------------------------------------------------------------------------- 1 | h3[data-v-b9167eee]{margin:40px 0 0}ul[data-v-b9167eee]{list-style-type:none;padding:0}li[data-v-b9167eee]{display:inline-block;margin:0 10px}a[data-v-b9167eee]{color:#42b983}#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50;margin-top:60px} -------------------------------------------------------------------------------- /app/static/img/logo.82b9c7a5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/app/static/img/logo.82b9c7a5.png -------------------------------------------------------------------------------- /app/static/js/app.c249faaa.js: -------------------------------------------------------------------------------- 1 | (function(e){function t(t){for(var n,l,u=t[0],s=t[1],i=t[2],p=0,v=[];p\n
\n

{{ msg }}

\n

\n For a guide and recipes on how to configure / customize this project,
\n check out the\n vue-cli documentation.\n

\n

Installed CLI Plugins

\n \n

Essential Links

\n \n

Ecosystem

\n \n
\n\n\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HelloWorld.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HelloWorld.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./HelloWorld.vue?vue&type=template&id=b9167eee&scoped=true&\"\nimport script from \"./HelloWorld.vue?vue&type=script&lang=js&\"\nexport * from \"./HelloWorld.vue?vue&type=script&lang=js&\"\nimport style0 from \"./HelloWorld.vue?vue&type=style&index=0&id=b9167eee&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"b9167eee\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=7a951895&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Vue from 'vue'\nimport App from './App.vue'\n\nVue.config.productionTip = false\n\nnew Vue({\n render: h => h(App),\n}).$mount('#app')\n","module.exports = __webpack_public_path__ + \"../static/img/logo.82b9c7a5.png\";"],"sourceRoot":""} -------------------------------------------------------------------------------- /app/static/js/chunk-vendors.b10d6c99.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"01f9":function(t,e,n){"use strict";var r=n("2d00"),o=n("5ca1"),i=n("2aba"),a=n("32e9"),s=n("84f2"),c=n("41a0"),u=n("7f20"),f=n("38fd"),l=n("2b4c")("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",v="keys",h="values",y=function(){return this};t.exports=function(t,e,n,m,_,g,b){c(n,e,m);var w,x,C,O=function(t){if(!p&&t in S)return S[t];switch(t){case v:return function(){return new n(this,t)};case h:return function(){return new n(this,t)}}return function(){return new n(this,t)}},$=e+" Iterator",A=_==h,k=!1,S=t.prototype,j=S[l]||S[d]||_&&S[_],E=j||O(_),T=_?A?O("entries"):E:void 0,I="Array"==e&&S.entries||j;if(I&&(C=f(I.call(new t)),C!==Object.prototype&&C.next&&(u(C,$,!0),r||"function"==typeof C[l]||a(C,l,y))),A&&j&&j.name!==h&&(k=!0,E=function(){return j.call(this)}),r&&!b||!p&&!k&&S[l]||a(S,l,E),s[e]=E,s[$]=y,_)if(w={values:A?E:O(h),keys:g?E:O(v),entries:T},b)for(x in w)x in S||i(S,x,w[x]);else o(o.P+o.F*(p||k),e,w);return w}},"097d":function(t,e,n){"use strict";var r=n("5ca1"),o=n("8378"),i=n("7726"),a=n("ebd6"),s=n("bcaa");r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},"0d58":function(t,e,n){var r=n("ce10"),o=n("e11e");t.exports=Object.keys||function(t){return r(t,o)}},1495:function(t,e,n){var r=n("86cc"),o=n("cb7c"),i=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){o(t);var n,a=i(e),s=a.length,c=0;while(s>c)r.f(t,n=a[c++],e[n]);return t}},1991:function(t,e,n){var r,o,i,a=n("9b43"),s=n("31f4"),c=n("fab2"),u=n("230e"),f=n("7726"),l=f.process,p=f.setImmediate,d=f.clearImmediate,v=f.MessageChannel,h=f.Dispatch,y=0,m={},_="onreadystatechange",g=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},b=function(t){g.call(t.data)};p&&d||(p=function(t){var e=[],n=1;while(arguments.length>n)e.push(arguments[n++]);return m[++y]=function(){s("function"==typeof t?t:Function(t),e)},r(y),y},d=function(t){delete m[t]},"process"==n("2d95")(l)?r=function(t){l.nextTick(a(g,t,1))}:h&&h.now?r=function(t){h.now(a(g,t,1))}:v?(o=new v,i=o.port2,o.port1.onmessage=b,r=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",b,!1)):r=_ in u("script")?function(t){c.appendChild(u("script"))[_]=function(){c.removeChild(this),g.call(t)}}:function(t){setTimeout(a(g,t,1),0)}),t.exports={set:p,clear:d}},"1fa8":function(t,e,n){var r=n("cb7c");t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(a){var i=t["return"];throw void 0!==i&&r(i.call(t)),a}}},"230e":function(t,e,n){var r=n("d3f4"),o=n("7726").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"23c6":function(t,e,n){var r=n("2d95"),o=n("2b4c")("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:i?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},2621:function(t,e){e.f=Object.getOwnPropertySymbols},"27ee":function(t,e,n){var r=n("23c6"),o=n("2b4c")("iterator"),i=n("84f2");t.exports=n("8378").getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},2877:function(t,e,n){"use strict";function r(t,e,n,r,o,i,a,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var f=u.render;u.render=function(t,e){return c.call(e),f(t,e)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,c):[c]}return{exports:t,options:u}}n.d(e,"a",function(){return r})},"2aba":function(t,e,n){var r=n("7726"),o=n("32e9"),i=n("69a8"),a=n("ca5a")("src"),s=n("fa5b"),c="toString",u=(""+s).split(c);n("8378").inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var c="function"==typeof n;c&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(c&&(i(n,a)||o(n,a,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,c,function(){return"function"==typeof this&&this[a]||s.call(this)})},"2aeb":function(t,e,n){var r=n("cb7c"),o=n("1495"),i=n("e11e"),a=n("613b")("IE_PROTO"),s=function(){},c="prototype",u=function(){var t,e=n("230e")("iframe"),r=i.length,o="<",a=">";e.style.display="none",n("fab2").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),u=t.F;while(r--)delete u[c][i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[c]=r(t),n=new s,s[c]=null,n[a]=t):n=u(),void 0===e?n:o(n,e)}},"2b0e":function(t,e,n){"use strict";(function(t){ 2 | /*! 3 | * Vue.js v2.6.10 4 | * (c) 2014-2019 Evan You 5 | * Released under the MIT License. 6 | */ 7 | var n=Object.freeze({});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}var u=Object.prototype.toString;function f(t){return"[object Object]"===u.call(t)}function l(t){return"[object RegExp]"===u.call(t)}function p(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function d(t){return o(t)&&"function"===typeof t.then&&"function"===typeof t.catch}function v(t){return null==t?"":Array.isArray(t)||f(t)&&t.toString===u?JSON.stringify(t,null,2):String(t)}function h(t){var e=parseFloat(t);return isNaN(e)?t:e}function y(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}var g=Object.prototype.hasOwnProperty;function b(t,e){return g.call(t,e)}function w(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var x=/-(\w)/g,C=w(function(t){return t.replace(x,function(t,e){return e?e.toUpperCase():""})}),O=w(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),$=/\B([A-Z])/g,A=w(function(t){return t.replace($,"-$1").toLowerCase()});function k(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 S(t,e){return t.bind(e)}var j=Function.prototype.bind?S:k;function E(t,e){e=e||0;var n=t.length-e,r=new Array(n);while(n--)r[n]=t[n+e];return r}function T(t,e){for(var n in e)t[n]=e[n];return t}function I(t){for(var e={},n=0;n0,nt=Y&&Y.indexOf("edge/")>0,rt=(Y&&Y.indexOf("android"),Y&&/iphone|ipad|ipod|ios/.test(Y)||"ios"===Q),ot=(Y&&/chrome\/\d+/.test(Y),Y&&/phantomjs/.test(Y),Y&&Y.match(/firefox\/(\d+)/)),it={}.watch,at=!1;if(J)try{var st={};Object.defineProperty(st,"passive",{get:function(){at=!0}}),window.addEventListener("test-passive",null,st)}catch(Ca){}var ct=function(){return void 0===G&&(G=!J&&!Z&&"undefined"!==typeof t&&(t["process"]&&"server"===t["process"].env.VUE_ENV)),G},ut=J&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ft(t){return"function"===typeof t&&/native code/.test(t.toString())}var lt,pt="undefined"!==typeof Symbol&&ft(Symbol)&&"undefined"!==typeof Reflect&&ft(Reflect.ownKeys);lt="undefined"!==typeof Set&&ft(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 dt=P,vt=0,ht=function(){this.id=vt++,this.subs=[]};ht.prototype.addSub=function(t){this.subs.push(t)},ht.prototype.removeSub=function(t){_(this.subs,t)},ht.prototype.depend=function(){ht.target&&ht.target.addDep(this)},ht.prototype.notify=function(){var t=this.subs.slice();for(var e=0,n=t.length;e-1)if(i&&!b(o,"default"))a=!1;else if(""===a||a===A(t)){var c=te(String,o.type);(c<0||s0&&(a=ke(a,(e||"")+"_"+n),Ae(a[0])&&Ae(u)&&(f[c]=xt(u.text+a[0].text),a.shift()),f.push.apply(f,a)):s(a)?Ae(u)?f[c]=xt(u.text+a):""!==a&&f.push(xt(a)):Ae(a)&&Ae(u)?f[c]=xt(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 Se(t){var e=t.$options.provide;e&&(t._provided="function"===typeof e?e.call(t):e)}function je(t){var e=Ee(t.$options.inject,t);e&&(jt(!1),Object.keys(e).forEach(function(n){Dt(t,n,e[n])}),jt(!0))}function Ee(t,e){if(t){for(var n=Object.create(null),r=pt?Reflect.ownKeys(t):Object.keys(t),o=0;o0,a=t?!!t.$stable:!i,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==n&&s===r.$key&&!i&&!r.$hasNormal)return r;for(var c in o={},t)t[c]&&"$"!==c[0]&&(o[c]=De(e,c,t[c]))}else o={};for(var u in e)u in o||(o[u]=Me(e,u));return t&&Object.isExtensible(t)&&(t._normalized=o),W(o,"$stable",a),W(o,"$key",s),W(o,"$hasNormal",i),o}function De(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({});return t=t&&"object"===typeof t&&!Array.isArray(t)?[t]:$e(t),t&&(0===t.length||1===t.length&&t[0].isComment)?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function Me(t,e){return function(){return t[e]}}function Ne(t,e){var n,r,i,a,s;if(Array.isArray(t)||"string"===typeof t)for(n=new Array(t.length),r=0,i=t.length;r1?E(n):n;for(var r=E(arguments,1),o='event handler for "'+t+'"',i=0,a=n.length;idocument.createEvent("Event").timeStamp&&(Gn=function(){return Xn.now()})}function Jn(){var t,e;for(qn=Gn(),zn=!0,Un.sort(function(t,e){return t.id-e.id}),Wn=0;WnWn&&Un[n].id>t.id)n--;Un.splice(n+1,0,t)}else Un.push(t);Vn||(Vn=!0,ve(Jn))}}var er=0,nr=function(t,e,n,r,o){this.vm=t,o&&(t._watcher=this),t._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++er,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new lt,this.newDepIds=new lt,this.expression="","function"===typeof e?this.getter=e:(this.getter=q(e),this.getter||(this.getter=P)),this.value=this.lazy?void 0:this.get()};nr.prototype.get=function(){var t;mt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(Ca){if(!this.user)throw Ca;ee(Ca,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&ye(t),_t(),this.cleanupDeps()}return t},nr.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},nr.prototype.cleanupDeps=function(){var t=this.deps.length;while(t--){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},nr.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():tr(this)},nr.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||c(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(Ca){ee(Ca,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},nr.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},nr.prototype.depend=function(){var t=this.deps.length;while(t--)this.deps[t].depend()},nr.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||_(this.vm._watchers,this);var t=this.deps.length;while(t--)this.deps[t].removeSub(this);this.active=!1}};var rr={enumerable:!0,configurable:!0,get:P,set:P};function or(t,e,n){rr.get=function(){return this[e][n]},rr.set=function(t){this[e][n]=t},Object.defineProperty(t,n,rr)}function ir(t){t._watchers=[];var e=t.$options;e.props&&ar(t,e.props),e.methods&&vr(t,e.methods),e.data?sr(t):Pt(t._data={},!0),e.computed&&fr(t,e.computed),e.watch&&e.watch!==it&&hr(t,e.watch)}function ar(t,e){var n=t.$options.propsData||{},r=t._props={},o=t.$options._propKeys=[],i=!t.$parent;i||jt(!1);var a=function(i){o.push(i);var a=Jt(i,e,n,t);Dt(r,i,a),i in t||or(t,"_props",i)};for(var s in e)a(s);jt(!0)}function sr(t){var e=t.$options.data;e=t._data="function"===typeof e?cr(e,t):e||{},f(e)||(e={});var n=Object.keys(e),r=t.$options.props,o=(t.$options.methods,n.length);while(o--){var i=n[o];0,r&&b(r,i)||z(i)||or(t,"_data",i)}Pt(e,!0)}function cr(t,e){mt();try{return t.call(e,e)}catch(Ca){return ee(Ca,e,"data()"),{}}finally{_t()}}var ur={lazy:!0};function fr(t,e){var n=t._computedWatchers=Object.create(null),r=ct();for(var o in e){var i=e[o],a="function"===typeof i?i:i.get;0,r||(n[o]=new nr(t,a||P,P,ur)),o in t||lr(t,o,i)}}function lr(t,e,n){var r=!ct();"function"===typeof n?(rr.get=r?pr(e):dr(n),rr.set=P):(rr.get=n.get?r&&!1!==n.cache?pr(e):dr(n.get):P,rr.set=n.set||P),Object.defineProperty(t,e,rr)}function pr(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),ht.target&&e.depend(),e.value}}function dr(t){return function(){return t.call(this,this)}}function vr(t,e){t.$options.props;for(var n in e)t[n]="function"!==typeof e[n]?P:j(e[n],t)}function hr(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var o=0;o-1)return this;var n=E(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 $r(t){t.mixin=function(t){return this.options=Gt(this.options,t),this}}function Ar(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;var a=function(t){this._init(t)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=e++,a.options=Gt(n.options,t),a["super"]=n,a.options.props&&kr(a),a.options.computed&&Sr(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,U.forEach(function(t){a[t]=n[t]}),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=T({},a.options),o[r]=a,a}}function kr(t){var e=t.options.props;for(var n in e)or(t.prototype,"_props",n)}function Sr(t){var e=t.options.computed;for(var n in e)lr(t.prototype,n,e[n])}function jr(t){U.forEach(function(e){t[e]=function(t,n){return n?("component"===e&&f(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 Er(t){return t&&(t.Ctor.options.name||t.tag)}function Tr(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"===typeof t?t.split(",").indexOf(e)>-1:!!l(t)&&t.test(e)}function Ir(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=Er(a.componentOptions);s&&!e(s)&&Pr(n,i,r,o)}}}function Pr(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,_(n,e)}gr(Cr),mr(Cr),jn(Cr),Pn(Cr),_n(Cr);var Dr=[String,RegExp,Array],Mr={name:"keep-alive",abstract:!0,props:{include:Dr,exclude:Dr,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Pr(this.cache,t,this.keys)},mounted:function(){var t=this;this.$watch("include",function(e){Ir(t,function(t){return Tr(e,t)})}),this.$watch("exclude",function(e){Ir(t,function(t){return!Tr(e,t)})})},render:function(){var t=this.$slots.default,e=Cn(t),n=e&&e.componentOptions;if(n){var r=Er(n),o=this,i=o.include,a=o.exclude;if(i&&(!r||!Tr(i,r))||a&&r&&Tr(a,r))return e;var s=this,c=s.cache,u=s.keys,f=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;c[f]?(e.componentInstance=c[f].componentInstance,_(u,f),u.push(f)):(c[f]=e,u.push(f),this.max&&u.length>parseInt(this.max)&&Pr(c,u[0],u,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}},Nr={KeepAlive:Mr};function Fr(t){var e={get:function(){return H}};Object.defineProperty(t,"config",e),t.util={warn:dt,extend:T,mergeOptions:Gt,defineReactive:Dt},t.set=Mt,t.delete=Nt,t.nextTick=ve,t.observable=function(t){return Pt(t),t},t.options=Object.create(null),U.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,T(t.options.components,Nr),Or(t),$r(t),Ar(t),jr(t)}Fr(Cr),Object.defineProperty(Cr.prototype,"$isServer",{get:ct}),Object.defineProperty(Cr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Cr,"FunctionalRenderContext",{value:Ze}),Cr.version="2.6.10";var Lr=y("style,class"),Rr=y("input,textarea,option,select,progress"),Ur=function(t,e,n){return"value"===n&&Rr(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Br=y("contenteditable,draggable,spellcheck"),Hr=y("events,caret,typing,plaintext-only"),Vr=function(t,e){return Gr(e)||"false"===e?"false":"contenteditable"===t&&Hr(e)?e:"true"},zr=y("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"),Wr="http://www.w3.org/1999/xlink",Kr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},qr=function(t){return Kr(t)?t.slice(6,t.length):""},Gr=function(t){return null==t||!1===t};function Xr(t){var e=t.data,n=t,r=t;while(o(r.componentInstance))r=r.componentInstance._vnode,r&&r.data&&(e=Jr(r.data,e));while(o(n=n.parent))n&&n.data&&(e=Jr(e,n.data));return Zr(e.staticClass,e.class)}function Jr(t,e){return{staticClass:Qr(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function Zr(t,e){return o(t)||o(e)?Qr(t,Yr(e)):""}function Qr(t,e){return t?e?t+" "+e:t:e||""}function Yr(t){return Array.isArray(t)?to(t):c(t)?eo(t):"string"===typeof t?t:""}function to(t){for(var e,n="",r=0,i=t.length;r-1?so[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:so[t]=/HTMLUnknownElement/.test(e.toString())}var uo=y("text,number,password,search,email,tel,url");function fo(t){if("string"===typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function lo(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 po(t,e){return document.createElementNS(no[t],e)}function vo(t){return document.createTextNode(t)}function ho(t){return document.createComment(t)}function yo(t,e,n){t.insertBefore(e,n)}function mo(t,e){t.removeChild(e)}function _o(t,e){t.appendChild(e)}function go(t){return t.parentNode}function bo(t){return t.nextSibling}function wo(t){return t.tagName}function xo(t,e){t.textContent=e}function Co(t,e){t.setAttribute(e,"")}var Oo=Object.freeze({createElement:lo,createElementNS:po,createTextNode:vo,createComment:ho,insertBefore:yo,removeChild:mo,appendChild:_o,parentNode:go,nextSibling:bo,tagName:wo,setTextContent:xo,setStyleScope:Co}),$o={create:function(t,e){Ao(e)},update:function(t,e){t.data.ref!==e.data.ref&&(Ao(t,!0),Ao(e))},destroy:function(t){Ao(t,!0)}};function Ao(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])?_(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}}var ko=new gt("",{},[]),So=["create","activate","update","remove","destroy"];function jo(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&o(t.data)===o(e.data)&&Eo(t,e)||i(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&r(e.asyncFactory.error))}function Eo(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||uo(r)&&uo(i)}function To(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 Io(t){var e,n,a={},c=t.modules,u=t.nodeOps;for(e=0;eh?(l=r(n[_+1])?null:n[_+1].elm,C(t,l,n,v,_,i)):v>_&&$(t,e,p,h)}function S(t,e,n,r){for(var i=n;i-1?Vo(t,e,n):zr(e)?Gr(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Br(e)?t.setAttribute(e,Vr(e,n)):Kr(e)?Gr(n)?t.removeAttributeNS(Wr,qr(e)):t.setAttributeNS(Wr,e,n):Vo(t,e,n)}function Vo(t,e,n){if(Gr(n))t.removeAttribute(e);else{if(tt&&!et&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var zo={create:Bo,update:Bo};function Wo(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=Xr(e),c=n._transitionClasses;o(c)&&(s=Qr(s,Yr(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var Ko,qo={create:Wo,update:Wo},Go="__r",Xo="__c";function Jo(t){if(o(t[Go])){var e=tt?"change":"input";t[e]=[].concat(t[Go],t[e]||[]),delete t[Go]}o(t[Xo])&&(t.change=[].concat(t[Xo],t.change||[]),delete t[Xo])}function Zo(t,e,n){var r=Ko;return function o(){var i=e.apply(null,arguments);null!==i&&ti(t,o,n,r)}}var Qo=ae&&!(ot&&Number(ot[1])<=53);function Yo(t,e,n,r){if(Qo){var o=qn,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}Ko.addEventListener(t,e,at?{capture:n,passive:r}:n)}function ti(t,e,n,r){(r||Ko).removeEventListener(t,e._wrapper||e,n)}function ei(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},o=t.data.on||{};Ko=e.elm,Jo(n),be(n,o,Yo,ti,Zo,e.context),Ko=void 0}}var ni,ri={create:ei,update:ei};function oi(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||{};for(n in o(c.__ob__)&&(c=e.data.domProps=T({},c)),s)n in c||(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&&"PROGRESS"!==a.tagName){a._value=i;var u=r(i)?"":String(i);ii(a,u)&&(a.value=u)}else if("innerHTML"===n&&oo(a.tagName)&&r(a.innerHTML)){ni=ni||document.createElement("div"),ni.innerHTML=""+i+"";var f=ni.firstChild;while(a.firstChild)a.removeChild(a.firstChild);while(f.firstChild)a.appendChild(f.firstChild)}else if(i!==s[n])try{a[n]=i}catch(Ca){}}}}function ii(t,e){return!t.composing&&("OPTION"===t.tagName||ai(t,e)||si(t,e))}function ai(t,e){var n=!0;try{n=document.activeElement!==t}catch(Ca){}return n&&t.value!==e}function si(t,e){var n=t.value,r=t._vModifiers;if(o(r)){if(r.number)return h(n)!==h(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}var ci={create:oi,update:oi},ui=w(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});function fi(t){var e=li(t.style);return t.staticStyle?T(t.staticStyle,e):e}function li(t){return Array.isArray(t)?I(t):"string"===typeof t?ui(t):t}function pi(t,e){var n,r={};if(e){var o=t;while(o.componentInstance)o=o.componentInstance._vnode,o&&o.data&&(n=fi(o.data))&&T(r,n)}(n=fi(t.data))&&T(r,n);var i=t;while(i=i.parent)i.data&&(n=fi(i.data))&&T(r,n);return r}var di,vi=/^--/,hi=/\s*!important$/,yi=function(t,e,n){if(vi.test(e))t.style.setProperty(e,n);else if(hi.test(n))t.style.setProperty(A(e),n.replace(hi,""),"important");else{var r=_i(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(wi).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 Ci(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(wi).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";while(n.indexOf(r)>=0)n=n.replace(r," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function Oi(t){if(t){if("object"===typeof t){var e={};return!1!==t.css&&T(e,$i(t.name||"v")),T(e,t),e}return"string"===typeof t?$i(t):void 0}}var $i=w(function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}}),Ai=J&&!et,ki="transition",Si="animation",ji="transition",Ei="transitionend",Ti="animation",Ii="animationend";Ai&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(ji="WebkitTransition",Ei="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Ti="WebkitAnimation",Ii="webkitAnimationEnd"));var Pi=J?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Di(t){Pi(function(){Pi(t)})}function Mi(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),xi(t,e))}function Ni(t,e){t._transitionClasses&&_(t._transitionClasses,e),Ci(t,e)}function Fi(t,e,n){var r=Ri(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===ki?Ei:Ii,c=0,u=function(){t.removeEventListener(s,f),n()},f=function(e){e.target===t&&++c>=a&&u()};setTimeout(function(){c0&&(n=ki,f=a,l=i.length):e===Si?u>0&&(n=Si,f=u,l=c.length):(f=Math.max(a,u),n=f>0?a>u?ki:Si:null,l=n?n===ki?i.length:c.length:0);var p=n===ki&&Li.test(r[ji+"Property"]);return{type:n,timeout:f,propCount:l,hasTransform:p}}function Ui(t,e){while(t.length1}function Ki(t,e){!0!==e.data.show&&Hi(e)}var qi=J?{create:Ki,activate:Ki,remove:function(t,e){!0!==t.data.show?Vi(t,e):e()}}:{},Gi=[zo,qo,ri,ci,bi,qi],Xi=Gi.concat(Uo),Ji=Io({nodeOps:Oo,modules:Xi});et&&document.addEventListener("selectionchange",function(){var t=document.activeElement;t&&t.vmodel&&oa(t,"input")});var Zi={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?we(n,"postpatch",function(){Zi.componentUpdated(t,e,n)}):Qi(t,e,n.context),t._vOptions=[].map.call(t.options,ea)):("textarea"===n.tag||uo(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",na),t.addEventListener("compositionend",ra),t.addEventListener("change",ra),et&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){Qi(t,e,n.context);var r=t._vOptions,o=t._vOptions=[].map.call(t.options,ea);if(o.some(function(t,e){return!N(t,r[e])})){var i=t.multiple?e.value.some(function(t){return ta(t,o)}):e.value!==e.oldValue&&ta(e.value,o);i&&oa(t,"change")}}}};function Qi(t,e,n){Yi(t,e,n),(tt||nt)&&setTimeout(function(){Yi(t,e,n)},0)}function Yi(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(N(ea(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function ta(t,e){return e.every(function(e){return!N(e,t)})}function ea(t){return"_value"in t?t._value:t.value}function na(t){t.target.composing=!0}function ra(t){t.target.composing&&(t.target.composing=!1,oa(t.target,"input"))}function oa(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function ia(t){return!t.componentInstance||t.data&&t.data.transition?t:ia(t.componentInstance._vnode)}var aa={bind:function(t,e,n){var r=e.value;n=ia(n);var o=n.data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Hi(n,function(){t.style.display=i})):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value,o=e.oldValue;if(!r!==!o){n=ia(n);var i=n.data&&n.data.transition;i?(n.data.show=!0,r?Hi(n,function(){t.style.display=t.__vOriginalDisplay}):Vi(n,function(){t.style.display="none"})):t.style.display=r?t.__vOriginalDisplay:"none"}},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}},sa={model:Zi,show:aa},ca={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function ua(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?ua(Cn(e.children)):t}function fa(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[C(i)]=o[i];return e}function la(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function pa(t){while(t=t.parent)if(t.data.transition)return!0}function da(t,e){return e.key===t.key&&e.tag===t.tag}var va=function(t){return t.tag||xn(t)},ha=function(t){return"show"===t.name},ya={name:"transition",props:ca,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(va),n.length)){0;var r=this.mode;0;var o=n[0];if(pa(this.$vnode))return o;var i=ua(o);if(!i)return o;if(this._leaving)return la(t,o);var a="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?a+"comment":a+i.tag:s(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var c=(i.data||(i.data={})).transition=fa(this),u=this._vnode,f=ua(u);if(i.data.directives&&i.data.directives.some(ha)&&(i.data.show=!0),f&&f.data&&!da(i,f)&&!xn(f)&&(!f.componentInstance||!f.componentInstance._vnode.isComment)){var l=f.data.transition=T({},c);if("out-in"===r)return this._leaving=!0,we(l,"afterLeave",function(){e._leaving=!1,e.$forceUpdate()}),la(t,o);if("in-out"===r){if(xn(i))return u;var p,d=function(){p()};we(c,"afterEnter",d),we(c,"enterCancelled",d),we(l,"delayLeave",function(t){p=t})}}return o}}},ma=T({tag:String,moveClass:String},ca);delete ma.mode;var _a={props:ma,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Tn(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=fa(this),s=0;s0?r:n)(t)}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"4a59":function(t,e,n){var r=n("9b43"),o=n("1fa8"),i=n("33a4"),a=n("cb7c"),s=n("9def"),c=n("27ee"),u={},f={};e=t.exports=function(t,e,n,l,p){var d,v,h,y,m=p?function(){return t}:c(t),_=r(n,l,e?2:1),g=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(i(m)){for(d=s(t.length);d>g;g++)if(y=e?_(a(v=t[g])[0],v[1]):_(t[g]),y===u||y===f)return y}else for(h=m.call(t);!(v=h.next()).done;)if(y=o(h,_,v.value,e),y===u||y===f)return y};e.BREAK=u,e.RETURN=f},"4bf8":function(t,e,n){var r=n("be13");t.exports=function(t){return Object(r(t))}},"52a7":function(t,e){e.f={}.propertyIsEnumerable},"551c":function(t,e,n){"use strict";var r,o,i,a,s=n("2d00"),c=n("7726"),u=n("9b43"),f=n("23c6"),l=n("5ca1"),p=n("d3f4"),d=n("d8e8"),v=n("f605"),h=n("4a59"),y=n("ebd6"),m=n("1991").set,_=n("8079")(),g=n("a5b8"),b=n("9c80"),w=n("a25f"),x=n("bcaa"),C="Promise",O=c.TypeError,$=c.process,A=$&&$.versions,k=A&&A.v8||"",S=c[C],j="process"==f($),E=function(){},T=o=g.f,I=!!function(){try{var t=S.resolve(1),e=(t.constructor={})[n("2b4c")("species")]=function(t){t(E,E)};return(j||"function"==typeof PromiseRejectionEvent)&&t.then(E)instanceof e&&0!==k.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(r){}}(),P=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},D=function(t,e){if(!t._n){t._n=!0;var n=t._c;_(function(){var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,s=o?e.ok:e.fail,c=e.resolve,u=e.reject,f=e.domain;try{s?(o||(2==t._h&&F(t),t._h=1),!0===s?n=r:(f&&f.enter(),n=s(r),f&&(f.exit(),a=!0)),n===e.promise?u(O("Promise-chain cycle")):(i=P(n))?i.call(n,c,u):c(n)):u(r)}catch(l){f&&!a&&f.exit(),u(l)}};while(n.length>i)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&M(t)})}},M=function(t){m.call(c,function(){var e,n,r,o=t._v,i=N(t);if(i&&(e=b(function(){j?$.emit("unhandledRejection",o,t):(n=c.onunhandledrejection)?n({promise:t,reason:o}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=j||N(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},N=function(t){return 1!==t._h&&0===(t._a||t._c).length},F=function(t){m.call(c,function(){var e;j?$.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},L=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),D(e,!0))},R=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw O("Promise can't be resolved itself");(e=P(t))?_(function(){var r={_w:n,_d:!1};try{e.call(t,u(R,r,1),u(L,r,1))}catch(o){L.call(r,o)}}):(n._v=t,n._s=1,D(n,!1))}catch(r){L.call({_w:n,_d:!1},r)}}};I||(S=function(t){v(this,S,C,"_h"),d(t),r.call(this);try{t(u(R,this,1),u(L,this,1))}catch(e){L.call(this,e)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n("dcbc")(S.prototype,{then:function(t,e){var n=T(y(this,S));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=j?$.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&D(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=u(R,t,1),this.reject=u(L,t,1)},g.f=T=function(t){return t===S||t===a?new i(t):o(t)}),l(l.G+l.W+l.F*!I,{Promise:S}),n("7f20")(S,C),n("7a56")(C),a=n("8378")[C],l(l.S+l.F*!I,C,{reject:function(t){var e=T(this),n=e.reject;return n(t),e.promise}}),l(l.S+l.F*(s||!I),C,{resolve:function(t){return x(s&&this===a?S:this,t)}}),l(l.S+l.F*!(I&&n("5cc5")(function(t){S.all(t)["catch"](E)})),C,{all:function(t){var e=this,n=T(e),r=n.resolve,o=n.reject,i=b(function(){var n=[],i=0,a=1;h(t,!1,function(t){var s=i++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=T(e),r=n.reject,o=b(function(){h(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},5537:function(t,e,n){var r=n("8378"),o=n("7726"),i="__core-js_shared__",a=o[i]||(o[i]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},"5ca1":function(t,e,n){var r=n("7726"),o=n("8378"),i=n("32e9"),a=n("2aba"),s=n("9b43"),c="prototype",u=function(t,e,n){var f,l,p,d,v=t&u.F,h=t&u.G,y=t&u.S,m=t&u.P,_=t&u.B,g=h?r:y?r[e]||(r[e]={}):(r[e]||{})[c],b=h?o:o[e]||(o[e]={}),w=b[c]||(b[c]={});for(f in h&&(n=e),n)l=!v&&g&&void 0!==g[f],p=(l?g:n)[f],d=_&&l?s(p,r):m&&"function"==typeof p?s(Function.call,p):p,g&&a(g,f,p,t&u.U),b[f]!=p&&i(b,f,d),m&&w[f]!=p&&(w[f]=p)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},"5cc5":function(t,e,n){var r=n("2b4c")("iterator"),o=!1;try{var i=[7][r]();i["return"]=function(){o=!0},Array.from(i,function(){throw 2})}catch(a){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],s=i[r]();s.next=function(){return{done:n=!0}},i[r]=function(){return s},t(i)}catch(a){}return n}},"613b":function(t,e,n){var r=n("5537")("keys"),o=n("ca5a");t.exports=function(t){return r[t]||(r[t]=o(t))}},"626a":function(t,e,n){var r=n("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},6821:function(t,e,n){var r=n("626a"),o=n("be13");t.exports=function(t){return r(o(t))}},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"6a99":function(t,e,n){var r=n("d3f4");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")}},7333:function(t,e,n){"use strict";var r=n("9e1e"),o=n("0d58"),i=n("2621"),a=n("52a7"),s=n("4bf8"),c=n("626a"),u=Object.assign;t.exports=!u||n("79e5")(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r})?function(t,e){var n=s(t),u=arguments.length,f=1,l=i.f,p=a.f;while(u>f){var d,v=c(arguments[f++]),h=l?o(v).concat(l(v)):o(v),y=h.length,m=0;while(y>m)d=h[m++],r&&!p.call(v,d)||(n[d]=v[d])}return n}:u},7726: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)},"77f1":function(t,e,n){var r=n("4588"),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"7a56":function(t,e,n){"use strict";var r=n("7726"),o=n("86cc"),i=n("9e1e"),a=n("2b4c")("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},"7f20":function(t,e,n){var r=n("86cc").f,o=n("69a8"),i=n("2b4c")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},8079:function(t,e,n){var r=n("7726"),o=n("1991").set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==n("2d95")(a);t.exports=function(){var t,e,n,u=function(){var r,o;c&&(r=a.domain)&&r.exit();while(t){o=t.fn,t=t.next;try{o()}catch(i){throw t?n():e=void 0,i}}e=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(u)};else if(!i||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var f=s.resolve(void 0);n=function(){f.then(u)}}else n=function(){o.call(r,u)};else{var l=!0,p=document.createTextNode("");new i(u).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},8378:function(t,e){var n=t.exports={version:"2.6.8"};"number"==typeof __e&&(__e=n)},"84f2":function(t,e){t.exports={}},"86cc":function(t,e,n){var r=n("cb7c"),o=n("c69a"),i=n("6a99"),a=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"9b43":function(t,e,n){var r=n("d8e8");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)}}},"9c6c":function(t,e,n){var r=n("2b4c")("unscopables"),o=Array.prototype;void 0==o[r]&&n("32e9")(o,r,{}),t.exports=function(t){o[r][t]=!0}},"9c80":function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(e){return{e:!0,v:e}}}},"9def":function(t,e,n){var r=n("4588"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},"9e1e":function(t,e,n){t.exports=!n("79e5")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},a25f:function(t,e,n){var r=n("7726"),o=r.navigator;t.exports=o&&o.userAgent||""},a5b8:function(t,e,n){"use strict";var r=n("d8e8");function o(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},bcaa:function(t,e,n){var r=n("cb7c"),o=n("d3f4"),i=n("a5b8");t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t),a=n.resolve;return a(e),n.promise}},be13:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},c366:function(t,e,n){var r=n("6821"),o=n("9def"),i=n("77f1");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){while(u>f)if(s=c[f++],s!=s)return!0}else for(;u>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},c69a:function(t,e,n){t.exports=!n("9e1e")&&!n("79e5")(function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a})},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},ca5a:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},cadf:function(t,e,n){"use strict";var r=n("9c6c"),o=n("d53b"),i=n("84f2"),a=n("6821");t.exports=n("01f9")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},cb7c:function(t,e,n){var r=n("d3f4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},ce10:function(t,e,n){var r=n("69a8"),o=n("6821"),i=n("c366")(!1),a=n("613b")("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);while(e.length>c)r(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},d3f4:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},d53b:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},dcbc:function(t,e,n){var r=n("2aba");t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},e11e:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},ebd6:function(t,e,n){var r=n("cb7c"),o=n("d8e8"),i=n("2b4c")("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[i])?e:o(n)}},f605:function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},f751:function(t,e,n){var r=n("5ca1");r(r.S+r.F,"Object",{assign:n("7333")})},fa5b:function(t,e,n){t.exports=n("5537")("native-function-to-string",Function.toString)},fab2:function(t,e,n){var r=n("7726").document;t.exports=r&&r.documentElement}}]); 8 | //# sourceMappingURL=chunk-vendors.b10d6c99.js.map -------------------------------------------------------------------------------- /app/templates/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/app/templates/favicon.ico -------------------------------------------------------------------------------- /app/templates/index.html: -------------------------------------------------------------------------------- 1 | web
-------------------------------------------------------------------------------- /app/utils.py: -------------------------------------------------------------------------------- 1 | from functools import wraps 2 | 3 | from flask import url_for, current_app, request, Response, Blueprint 4 | from flask_restplus import Api 5 | 6 | 7 | def add_basic_auth(blueprint: Blueprint, username, password, realm='api'): 8 | """ 9 | Add HTTP Basic Auth to a blueprint. 10 | Note this is only for casual use! 11 | """ 12 | 13 | @blueprint.before_request 14 | def basic_http_auth(*args, **kwargs): 15 | auth = request.authorization 16 | if auth is None or auth.password != password or auth.username != username: 17 | return Response('Please login', 401, {'WWW-Authenticate': f'Basic realm="{realm}"'}) 18 | 19 | 20 | def check_auth(username, password): 21 | """ 22 | This function is called to check if a username / 23 | password combination is valid. 24 | """ 25 | return username == current_app.config['DOC_USERNAME'] and password == current_app.config['DOC_PASSWORD'] 26 | 27 | 28 | def authenticate(): 29 | """ 30 | Sends a 401 response that enables basic auth 31 | """ 32 | return Response('Not Authorized', 401, {'WWW-Authenticate': 'Basic realm="api"'}) 33 | 34 | 35 | def requires_auth(f): 36 | @wraps(f) 37 | def decorated(*args, **kwargs): 38 | auth = request.authorization 39 | if not auth or not check_auth(auth.username, auth.password): 40 | return authenticate() 41 | return f(*args, **kwargs) 42 | 43 | return decorated 44 | 45 | 46 | class PatchedApi(Api): 47 | 48 | @property 49 | def specs_url(self): 50 | """Monkey patch for HTTPS""" 51 | scheme = 'https' if self.is_prod() else 'http' 52 | return url_for(self.endpoint('specs'), _external=True, _scheme=scheme) 53 | 54 | @staticmethod 55 | def is_prod(): 56 | return not current_app.config['TESTING'] 57 | 58 | def _register_apidoc(self, app): 59 | app.view_functions['doc'] = requires_auth(app.view_functions['doc']) 60 | return super()._register_apidoc(app) 61 | 62 | def handle_error(self, e): 63 | if current_app.config['TESTING'] or current_app.config['APP_ENVIRONMENT'] == 'development': 64 | print(e) 65 | super().handle_error(e) -------------------------------------------------------------------------------- /app/views.py: -------------------------------------------------------------------------------- 1 | from flask import Blueprint, render_template, abort 2 | from jinja2 import TemplateNotFound 3 | 4 | sample_page = Blueprint('sample_page', 'sample_page', template_folder='templates') 5 | 6 | 7 | @sample_page.route('/sample') 8 | def get_sample(): 9 | try: 10 | return render_template('index.html') 11 | except TemplateNotFound: 12 | abort(404) 13 | -------------------------------------------------------------------------------- /bin/phantomjs-linux: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/bin/phantomjs-linux -------------------------------------------------------------------------------- /bin/phantomjs-mac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/bin/phantomjs-mac -------------------------------------------------------------------------------- /bin/phantomjs.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/bin/phantomjs.exe -------------------------------------------------------------------------------- /pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | addopts = -p no:warnings 3 | env = 4 | APP_ENVIRONMENT=testing 5 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Flask==1.0.2 2 | flask-restplus==0.12.1 3 | Flask-SQLAlchemy==2.4.0 4 | Flask-Migrate==2.4.0 5 | psycopg2-binary==2.7.7 6 | gunicorn==19.9.0 7 | gevent==1.4.0 8 | psycogreen==1.0.1 9 | pytest==5.2.1 10 | pytest-cov==2.8.1 11 | pytest-mock==1.10.1 12 | selenium==3.141.0 13 | -------------------------------------------------------------------------------- /settings.py: -------------------------------------------------------------------------------- 1 | import multiprocessing 2 | 3 | import gunicorn 4 | from gevent import monkey 5 | 6 | monkey.patch_all() 7 | 8 | bind = '0.0.0.0:8000' 9 | worker_class = 'gevent' 10 | workers = multiprocessing.cpu_count() * 2 + 1 11 | loglevel = 'debug' 12 | keepalive = 10 13 | timeout = 3600 14 | preload_app = True 15 | 16 | gunicorn.SERVER_SOFTWARE = 'Microsoft-IIS/6.0' 17 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/tests/__init__.py -------------------------------------------------------------------------------- /tests/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/tests/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /tests/__pycache__/conftest.cpython-36-PYTEST.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/tests/__pycache__/conftest.cpython-36-PYTEST.pyc -------------------------------------------------------------------------------- /tests/__pycache__/test_app.cpython-36-PYTEST.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/tests/__pycache__/test_app.cpython-36-PYTEST.pyc -------------------------------------------------------------------------------- /tests/__pycache__/test_models.cpython-36-PYTEST.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/tests/__pycache__/test_models.cpython-36-PYTEST.pyc -------------------------------------------------------------------------------- /tests/__pycache__/test_resources.cpython-36-PYTEST.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/tests/__pycache__/test_resources.cpython-36-PYTEST.pyc -------------------------------------------------------------------------------- /tests/__pycache__/test_vue_integration.cpython-36-PYTEST.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/tests/__pycache__/test_vue_integration.cpython-36-PYTEST.pyc -------------------------------------------------------------------------------- /tests/__pycache__/utils.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/tests/__pycache__/utils.cpython-36.pyc -------------------------------------------------------------------------------- /tests/conftest.py: -------------------------------------------------------------------------------- 1 | import os 2 | import platform 3 | 4 | from gevent import monkey 5 | from selenium import webdriver 6 | 7 | monkey.patch_all(thread=False) 8 | 9 | import psycogreen.gevent 10 | 11 | psycogreen.gevent.patch_psycopg() 12 | 13 | 14 | import pytest 15 | from flask.testing import FlaskClient 16 | 17 | from app import create_app 18 | from .utils import JSONResponse 19 | 20 | 21 | @pytest.fixture(scope='module') 22 | def flask_app(): 23 | app = create_app(environment='testing') 24 | from app.models.database import db 25 | 26 | with app.app_context(): 27 | db.create_all() 28 | yield app 29 | db.session.close_all() 30 | db.drop_all() 31 | 32 | 33 | @pytest.fixture(scope='module') 34 | def client(flask_app): 35 | app = flask_app 36 | ctx = flask_app.test_request_context() 37 | ctx.push() 38 | app.test_client_class = FlaskClient 39 | app.response_class = JSONResponse 40 | return app.test_client() 41 | 42 | 43 | @pytest.fixture(scope='module') 44 | def db(flask_app): 45 | from app.models.database import db as db_instance 46 | yield db_instance 47 | 48 | 49 | @pytest.fixture(scope='session') 50 | def path(): 51 | if platform.system() == 'Linux': 52 | return 'bin/phantomjs-linux' 53 | elif platform.system() == 'Darwin': 54 | return 'bin/phantomjs-mac' 55 | elif platform.system() == 'Windows': 56 | return 'bin/phantomjs.exe' 57 | 58 | 59 | @pytest.fixture(scope='session') 60 | def driver(path): 61 | if os.getenv('CI_TEST', None): 62 | driver_ = webdriver.PhantomJS() 63 | else: 64 | driver_ = webdriver.PhantomJS(path) 65 | yield driver_ 66 | driver_.quit() -------------------------------------------------------------------------------- /tests/test_app.py: -------------------------------------------------------------------------------- 1 | from flask.testing import FlaskClient 2 | 3 | from app.factory import Factory 4 | 5 | 6 | def test_factory_env_configuration(): 7 | factory_app = Factory('testing') 8 | assert factory_app.environment == 'testing' 9 | factory_app.set_flask() 10 | factory_app.environment = 'development' 11 | assert factory_app.environment == 'development' 12 | 13 | -------------------------------------------------------------------------------- /tests/test_models.py: -------------------------------------------------------------------------------- 1 | from app.models import Example 2 | from app.models.datastore import ExampleDatastore 3 | 4 | 5 | def test_create_example(db): 6 | datastore = ExampleDatastore(db) 7 | datastore.create_example('test') 8 | 9 | ex = db.session.query(Example).filter_by(name='test').first() 10 | assert ex 11 | -------------------------------------------------------------------------------- /tests/test_resources.py: -------------------------------------------------------------------------------- 1 | from flask.testing import FlaskClient 2 | 3 | 4 | def test_example_page(client: FlaskClient): 5 | res = client.get('/example') 6 | assert res.ok 7 | assert res.json == {'message': 'Success'} 8 | -------------------------------------------------------------------------------- /tests/test_vue_integration.py: -------------------------------------------------------------------------------- 1 | def test_text_is_show(driver): 2 | driver.get('http://localhost:5000/views/sample') 3 | assert 'Welcome to Your Vue.js App' in driver.page_source 4 | -------------------------------------------------------------------------------- /tests/utils.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | from flask import Response 4 | from werkzeug.utils import cached_property 5 | 6 | 7 | class JSONResponse(Response): 8 | 9 | @cached_property 10 | def json(self): 11 | return json.loads(self.get_data(as_text=True)) 12 | 13 | @cached_property 14 | def conflict(self): 15 | return self.status_code == 409 16 | 17 | @cached_property 18 | def not_found(self): 19 | return self.status_code == 404 20 | 21 | @cached_property 22 | def bad_args(self): 23 | return self.status_code == 400 24 | 25 | @cached_property 26 | def unauthorized(self): 27 | return self.status_code in {401, 403} 28 | 29 | @cached_property 30 | def ok(self): 31 | return self.status_code in {200, 201} 32 | 33 | @cached_property 34 | def oops(self): 35 | return self.status_code == 422 36 | 37 | 38 | def do_nothing(*args, **kwargs): 39 | pass 40 | -------------------------------------------------------------------------------- /unit-tests.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | pytest --cov-report term-missing:skip-covered --cov=app --capture=sys tests -------------------------------------------------------------------------------- /wait-for-it.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Use this script to test if a given TCP host/port are available 3 | 4 | cmdname=$(basename $0) 5 | 6 | echoerr() { if [[ $QUIET -ne 1 ]]; then echo "$@" 1>&2; fi } 7 | 8 | usage() 9 | { 10 | cat << USAGE >&2 11 | Usage: 12 | $cmdname host:port [-s] [-t timeout] [-- command args] 13 | -h HOST | --host=HOST Host or IP under test 14 | -p PORT | --port=PORT TCP port under test 15 | Alternatively, you specify the host and port as host:port 16 | -s | --strict Only execute subcommand if the test succeeds 17 | -q | --quiet Don't output any status messages 18 | -t TIMEOUT | --timeout=TIMEOUT 19 | Timeout in seconds, zero for no timeout 20 | -- COMMAND ARGS Execute command with args after the test finishes 21 | USAGE 22 | exit 1 23 | } 24 | 25 | wait_for() 26 | { 27 | if [[ $TIMEOUT -gt 0 ]]; then 28 | echoerr "$cmdname: waiting $TIMEOUT seconds for $HOST:$PORT" 29 | else 30 | echoerr "$cmdname: waiting for $HOST:$PORT without a timeout" 31 | fi 32 | start_ts=$(date +%s) 33 | while : 34 | do 35 | if [[ $ISBUSY -eq 1 ]]; then 36 | nc -z $HOST $PORT 37 | result=$? 38 | else 39 | (echo > /dev/tcp/$HOST/$PORT) >/dev/null 2>&1 40 | result=$? 41 | fi 42 | if [[ $result -eq 0 ]]; then 43 | end_ts=$(date +%s) 44 | echoerr "$cmdname: $HOST:$PORT is available after $((end_ts - start_ts)) seconds" 45 | break 46 | fi 47 | sleep 1 48 | done 49 | return $result 50 | } 51 | 52 | wait_for_wrapper() 53 | { 54 | # In order to support SIGINT during timeout: http://unix.stackexchange.com/a/57692 55 | if [[ $QUIET -eq 1 ]]; then 56 | timeout $BUSYTIMEFLAG $TIMEOUT $0 --quiet --child --host=$HOST --port=$PORT --timeout=$TIMEOUT & 57 | else 58 | timeout $BUSYTIMEFLAG $TIMEOUT $0 --child --host=$HOST --port=$PORT --timeout=$TIMEOUT & 59 | fi 60 | PID=$! 61 | trap "kill -INT -$PID" INT 62 | wait $PID 63 | RESULT=$? 64 | if [[ $RESULT -ne 0 ]]; then 65 | echoerr "$cmdname: timeout occurred after waiting $TIMEOUT seconds for $HOST:$PORT" 66 | fi 67 | return $RESULT 68 | } 69 | 70 | # process arguments 71 | while [[ $# -gt 0 ]] 72 | do 73 | case "$1" in 74 | *:* ) 75 | hostport=(${1//:/ }) 76 | HOST=${hostport[0]} 77 | PORT=${hostport[1]} 78 | shift 1 79 | ;; 80 | --child) 81 | CHILD=1 82 | shift 1 83 | ;; 84 | -q | --quiet) 85 | QUIET=1 86 | shift 1 87 | ;; 88 | -s | --strict) 89 | STRICT=1 90 | shift 1 91 | ;; 92 | -h) 93 | HOST="$2" 94 | if [[ $HOST == "" ]]; then break; fi 95 | shift 2 96 | ;; 97 | --host=*) 98 | HOST="${1#*=}" 99 | shift 1 100 | ;; 101 | -p) 102 | PORT="$2" 103 | if [[ $PORT == "" ]]; then break; fi 104 | shift 2 105 | ;; 106 | --port=*) 107 | PORT="${1#*=}" 108 | shift 1 109 | ;; 110 | -t) 111 | TIMEOUT="$2" 112 | if [[ $TIMEOUT == "" ]]; then break; fi 113 | shift 2 114 | ;; 115 | --timeout=*) 116 | TIMEOUT="${1#*=}" 117 | shift 1 118 | ;; 119 | --) 120 | shift 121 | CLI=("$@") 122 | break 123 | ;; 124 | --help) 125 | usage 126 | ;; 127 | *) 128 | echoerr "Unknown argument: $1" 129 | usage 130 | ;; 131 | esac 132 | done 133 | 134 | if [[ "$HOST" == "" || "$PORT" == "" ]]; then 135 | echoerr "Error: you need to provide a host and port to test." 136 | usage 137 | fi 138 | 139 | TIMEOUT=${TIMEOUT:-15} 140 | STRICT=${STRICT:-0} 141 | CHILD=${CHILD:-0} 142 | QUIET=${QUIET:-0} 143 | 144 | # check to see if timeout is from busybox? 145 | # check to see if timeout is from busybox? 146 | TIMEOUT_PATH=$(realpath $(which timeout)) 147 | if [[ $TIMEOUT_PATH =~ "busybox" ]]; then 148 | ISBUSY=1 149 | BUSYTIMEFLAG="-t" 150 | else 151 | ISBUSY=0 152 | BUSYTIMEFLAG="" 153 | fi 154 | 155 | if [[ $CHILD -gt 0 ]]; then 156 | wait_for 157 | RESULT=$? 158 | exit $RESULT 159 | else 160 | if [[ $TIMEOUT -gt 0 ]]; then 161 | wait_for_wrapper 162 | RESULT=$? 163 | else 164 | wait_for 165 | RESULT=$? 166 | fi 167 | fi 168 | 169 | if [[ $CLI != "" ]]; then 170 | if [[ $RESULT -ne 0 && $STRICT -eq 1 ]]; then 171 | echoerr "$cmdname: strict mode, refusing to execute subprocess" 172 | exit $RESULT 173 | fi 174 | exec "${CLI[@]}" 175 | else 176 | exit $RESULT 177 | fi 178 | -------------------------------------------------------------------------------- /web/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw? 22 | -------------------------------------------------------------------------------- /web/README.md: -------------------------------------------------------------------------------- 1 | # web 2 | 3 | ## Project setup 4 | ``` 5 | yarn install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | yarn run serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | yarn run build 16 | ``` 17 | 18 | ### Lints and fixes files 19 | ``` 20 | yarn run lint 21 | ``` 22 | -------------------------------------------------------------------------------- /web/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/app' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /web/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "core-js": "^2.6.5", 12 | "vue": "^2.6.10" 13 | }, 14 | "devDependencies": { 15 | "@vue/cli-plugin-babel": "^3.0.1", 16 | "@vue/cli-plugin-eslint": "^3.0.1", 17 | "@vue/cli-service": "^3.0.1", 18 | "babel-eslint": "^10.0.1", 19 | "eslint": "^5.16.0", 20 | "eslint-plugin-vue": "^5.0.0", 21 | "vue-template-compiler": "^2.5.21" 22 | }, 23 | "eslintConfig": { 24 | "root": true, 25 | "env": { 26 | "node": true 27 | }, 28 | "extends": [ 29 | "plugin:vue/essential", 30 | "eslint:recommended" 31 | ], 32 | "rules": {}, 33 | "parserOptions": { 34 | "parser": "babel-eslint" 35 | } 36 | }, 37 | "postcss": { 38 | "plugins": { 39 | "autoprefixer": {} 40 | } 41 | }, 42 | "browserslist": [ 43 | "> 1%", 44 | "last 2 versions" 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /web/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/web/public/favicon.ico -------------------------------------------------------------------------------- /web/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | web 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /web/src/App.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 18 | 19 | 29 | -------------------------------------------------------------------------------- /web/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbukachi/flask-vuejs-tutorial/e32a887476fa886a97192e93aa58fddb2e053eb3/web/src/assets/logo.png -------------------------------------------------------------------------------- /web/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 41 | 42 | 43 | 59 | -------------------------------------------------------------------------------- /web/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | 4 | Vue.config.productionTip = false 5 | 6 | new Vue({ 7 | render: h => h(App), 8 | }).$mount('#app') 9 | -------------------------------------------------------------------------------- /web/vue.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | assetsDir: '../static', 5 | baseUrl: '', 6 | publicPath: undefined, 7 | outputDir: path.resolve(__dirname, '../app/templates'), 8 | runtimeCompiler: undefined, 9 | productionSourceMap: undefined, 10 | parallel: undefined, 11 | css: undefined 12 | }; -------------------------------------------------------------------------------- /wsgi.py: -------------------------------------------------------------------------------- 1 | from gevent import monkey 2 | 3 | monkey.patch_all() 4 | 5 | import psycogreen.gevent 6 | 7 | psycogreen.gevent.patch_psycopg() 8 | 9 | import logging 10 | 11 | from app import create_app 12 | 13 | app = create_app() 14 | 15 | if __name__ == '__main__': 16 | app.run() 17 | else: 18 | gunicorn_logger = logging.getLogger('gunicorn.error') 19 | app.logger.handler = gunicorn_logger.handlers 20 | app.logger.setLevel(gunicorn_logger.level) 21 | --------------------------------------------------------------------------------