From 3d4d69deccbe333de6f265a3a3e1a4b7a930454d Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Wed, 15 Nov 2017 06:55:15 -0800 Subject: [PATCH] Sessions, log in-out, app settings GUI --- Makefile | 6 + core/admin.go | 69 +++----- core/app.go | 25 ++- core/auth.go | 6 - core/forms/setup.go | 2 +- core/initial-setup.go | 58 +++++++ core/jsondb/jsondb.go | 12 +- core/middleware.go | 40 ++++- core/pages.go | 16 +- core/responses.go | 4 + core/templates.go | 17 +- root/.layout.gohtml | 7 +- root/admin/settings.gohtml | 154 ++++++++++++++++++ root/admin/settings.js | 19 +++ .../setup.gohtml => initial-setup.gohtml} | 2 +- root/js/vue.min.js | 6 + 16 files changed, 356 insertions(+), 87 deletions(-) create mode 100644 core/initial-setup.go create mode 100644 root/admin/settings.gohtml create mode 100644 root/admin/settings.js rename root/{admin/setup.gohtml => initial-setup.gohtml} (97%) create mode 100644 root/js/vue.min.js diff --git a/Makefile b/Makefile index 705f758..e7cbf79 100644 --- a/Makefile +++ b/Makefile @@ -32,3 +32,9 @@ test: .PHONY: clean clean: rm -rf bin dist + +# `make hardclean` cleans EVERY THING, including root/.private, resetting +# your database in the local dev environment. Be careful! +.PHONY: hardclean +hardclean: clean + rm -rf root/.private diff --git a/core/admin.go b/core/admin.go index 26ff2e2..f3874ae 100644 --- a/core/admin.go +++ b/core/admin.go @@ -3,61 +3,34 @@ package core import ( "net/http" - "github.com/gorilla/sessions" - "github.com/kirsle/blog/core/forms" + "github.com/gorilla/mux" "github.com/kirsle/blog/core/models/settings" - "github.com/kirsle/blog/core/models/users" + "github.com/urfave/negroni" ) +// AdminRoutes attaches the admin routes to the app. +func (b *Blog) AdminRoutes(r *mux.Router) { + adminRouter := mux.NewRouter().PathPrefix("/admin").Subrouter().StrictSlash(false) + r.HandleFunc("/admin", b.AdminHandler) // so as to not be "/admin/" + adminRouter.HandleFunc("/settings", b.SettingsHandler) + adminRouter.PathPrefix("/").HandlerFunc(b.PageHandler) + r.PathPrefix("/admin").Handler(negroni.New( + negroni.HandlerFunc(b.LoginRequired), + negroni.Wrap(adminRouter), + )) +} + // AdminHandler is the admin landing page. func (b *Blog) AdminHandler(w http.ResponseWriter, r *http.Request) { b.RenderTemplate(w, r, "admin/index", nil) } -// SetupHandler is the initial blog setup route. -func (b *Blog) SetupHandler(w http.ResponseWriter, r *http.Request) { - vars := &Vars{ - Form: forms.Setup{}, - } +// SettingsHandler lets you configure the app from the frontend. +func (b *Blog) SettingsHandler(w http.ResponseWriter, r *http.Request) { + v := NewVars() - if r.Method == "POST" { - form := forms.Setup{ - Username: r.FormValue("username"), - Password: r.FormValue("password"), - Confirm: r.FormValue("confirm"), - } - vars.Form = form - err := form.Validate() - if err != nil { - vars.Error = err - } else { - // Save the site config. - log.Info("Creating default website config file") - s := settings.Defaults() - s.Save() - - // Re-initialize the cookie store with the new secret key. - b.store = sessions.NewCookieStore([]byte(s.Security.SecretKey)) - - log.Info("Creating admin account %s", form.Username) - user := &users.User{ - Username: form.Username, - Password: form.Password, - Admin: true, - Name: "Administrator", - } - err := users.Create(user) - if err != nil { - log.Error("Error: %v", err) - vars.Error = err - } - - // All set! - b.Login(w, r, user) - b.Redirect(w, "/admin") - return - } - } - - b.RenderTemplate(w, r, "admin/setup", vars) + // Get the current settings. + settings, _ := settings.Load() + v.Data["s"] = settings + b.RenderTemplate(w, r, "admin/settings", v) } diff --git a/core/app.go b/core/app.go index 058c4aa..956cb08 100644 --- a/core/app.go +++ b/core/app.go @@ -53,31 +53,26 @@ func New(documentRoot, userRoot string) *Blog { // Initialize the router. r := mux.NewRouter() - blog.r = r - - // Blog setup. - r.HandleFunc("/admin/setup", blog.SetupHandler) - - // Admin pages that require a logged-in user. - admin := mux.NewRouter() - admin.HandleFunc("/admin", blog.AdminHandler) - r.PathPrefix("/admin").Handler(negroni.New( - negroni.HandlerFunc(blog.LoginRequired), - negroni.Wrap(admin), - )) + r.HandleFunc("/initial-setup", blog.SetupHandler) r.HandleFunc("/login", blog.LoginHandler) r.HandleFunc("/logout", blog.LogoutHandler) - r.HandleFunc("/", blog.PageHandler) + blog.AdminRoutes(r) + + r.PathPrefix("/").HandlerFunc(blog.PageHandler) r.NotFoundHandler = http.HandlerFunc(blog.PageHandler) n := negroni.New( negroni.NewRecovery(), negroni.NewLogger(), + negroni.HandlerFunc(blog.SessionLoader), + negroni.HandlerFunc(blog.AuthMiddleware), ) - blog.n = n - n.Use(negroni.HandlerFunc(blog.AuthMiddleware)) n.UseHandler(r) + // Keep references handy elsewhere in the app. + blog.n = n + blog.r = r + return blog } diff --git a/core/auth.go b/core/auth.go index c92a28f..aa7d175 100644 --- a/core/auth.go +++ b/core/auth.go @@ -8,12 +8,6 @@ import ( "github.com/kirsle/blog/core/models/users" ) -type key int - -const ( - userKey key = iota -) - // Login logs the browser in as the given user. func (b *Blog) Login(w http.ResponseWriter, r *http.Request, u *users.User) error { session, err := b.store.Get(r, "session") // TODO session name diff --git a/core/forms/setup.go b/core/forms/setup.go index d88a7e6..dd76a08 100644 --- a/core/forms/setup.go +++ b/core/forms/setup.go @@ -4,7 +4,7 @@ import ( "errors" ) -// Setup is for the initial blog setup page at /admin/setup. +// Setup is for the initial blog setup page at /initial-setup. type Setup struct { Username string Password string diff --git a/core/initial-setup.go b/core/initial-setup.go new file mode 100644 index 0000000..86ef3c7 --- /dev/null +++ b/core/initial-setup.go @@ -0,0 +1,58 @@ +package core + +import ( + "net/http" + + "github.com/gorilla/sessions" + "github.com/kirsle/blog/core/forms" + "github.com/kirsle/blog/core/models/settings" + "github.com/kirsle/blog/core/models/users" +) + +// SetupHandler is the initial blog setup route. +func (b *Blog) SetupHandler(w http.ResponseWriter, r *http.Request) { + vars := &Vars{ + Form: forms.Setup{}, + } + + if r.Method == "POST" { + form := forms.Setup{ + Username: r.FormValue("username"), + Password: r.FormValue("password"), + Confirm: r.FormValue("confirm"), + } + vars.Form = form + err := form.Validate() + if err != nil { + vars.Error = err + } else { + // Save the site config. + log.Info("Creating default website config file") + s := settings.Defaults() + s.Save() + + // Re-initialize the cookie store with the new secret key. + b.store = sessions.NewCookieStore([]byte(s.Security.SecretKey)) + + log.Info("Creating admin account %s", form.Username) + user := &users.User{ + Username: form.Username, + Password: form.Password, + Admin: true, + Name: "Administrator", + } + err := users.Create(user) + if err != nil { + log.Error("Error: %v", err) + vars.Error = err + } + + // All set! + b.Login(w, r, user) + b.Redirect(w, "/admin") + return + } + } + + b.RenderTemplate(w, r, "initial-setup", vars) +} diff --git a/core/jsondb/jsondb.go b/core/jsondb/jsondb.go index eab1d61..6e61b38 100644 --- a/core/jsondb/jsondb.go +++ b/core/jsondb/jsondb.go @@ -33,7 +33,7 @@ func New(root string) *DB { // Get a document by path and load it into the object `v`. func (db *DB) Get(document string, v interface{}) error { - log.Debug("GET %s", document) + log.Debug("[JsonDB] GET %s", document) if !db.Exists(document) { return ErrNotFound } @@ -56,7 +56,7 @@ func (db *DB) Get(document string, v interface{}) error { // Commit writes a JSON object to the database. func (db *DB) Commit(document string, v interface{}) error { - log.Debug("COMMIT %s", document) + log.Debug("[JsonDB] COMMIT %s", document) path := db.toPath(document) // Ensure the directory tree is ready. @@ -73,7 +73,7 @@ func (db *DB) Commit(document string, v interface{}) error { // Delete removes a JSON document from the database. func (db *DB) Delete(document string) error { - log.Debug("DELETE %s", document) + log.Debug("[JsonDB] DELETE %s", document) path := db.toPath(document) if _, err := os.Stat(path); os.IsNotExist(err) { @@ -106,15 +106,11 @@ func (db *DB) ListAll(path string) ([]string, error) { // path: the filesystem path like from toPath(). func (db *DB) makePath(path string) error { parts := strings.Split(path, string(filepath.Separator)) - log.Debug("%v", parts) parts = parts[:len(parts)-1] // pop off the filename - log.Debug("%v", parts) directory := filepath.Join(parts...) - log.Debug("Ensure exists: %s (from orig path %s)", directory, path) - if _, err := os.Stat(directory); err != nil { - log.Debug("Create directory: %s", directory) + log.Debug("[JsonDB] Create directory: %s", directory) err = os.MkdirAll(directory, 0755) return err } diff --git a/core/middleware.go b/core/middleware.go index ddbfd9f..71be2c5 100644 --- a/core/middleware.go +++ b/core/middleware.go @@ -4,13 +4,46 @@ import ( "context" "net/http" + "github.com/gorilla/sessions" "github.com/kirsle/blog/core/models/users" ) +type key int + +const ( + sessionKey key = iota + userKey +) + +// SessionLoader gets the Gorilla session store and makes it available on the +// Request context. +func (b *Blog) SessionLoader(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) { + session, _ := b.store.Get(r, "session") + + log.Debug("REQUEST START: %s %s", r.Method, r.URL.Path) + ctx := context.WithValue(r.Context(), sessionKey, session) + next(w, r.WithContext(ctx)) +} + +// Session returns the current request's session. +func (b *Blog) Session(r *http.Request) *sessions.Session { + ctx := r.Context() + if session, ok := ctx.Value(sessionKey).(*sessions.Session); ok { + return session + } + + log.Error( + "Session(): didn't find session in request context! Getting it " + + "from the session store instead.", + ) + session, _ := b.store.Get(r, "session") + return session +} + // AuthMiddleware loads the user's authentication state. func (b *Blog) AuthMiddleware(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) { - session, _ := b.store.Get(r, "session") - log.Info("Session: %v", session.Values) + session := b.Session(r) + log.Debug("AuthMiddleware() -- session values: %v", session.Values) if loggedIn, ok := session.Values["logged-in"].(bool); ok && loggedIn { // They seem to be logged in. Get their user object. id := session.Values["user-id"].(int) @@ -23,6 +56,7 @@ func (b *Blog) AuthMiddleware(w http.ResponseWriter, r *http.Request, next http. ctx := context.WithValue(r.Context(), userKey, u) next(w, r.WithContext(ctx)) + return } next(w, r) } @@ -33,8 +67,10 @@ func (b *Blog) LoginRequired(w http.ResponseWriter, r *http.Request, next http.H if user, ok := ctx.Value(userKey).(*users.User); ok { if user.ID > 0 { next(w, r) + return } } + log.Info("Redirect away!") b.Redirect(w, "/login?next="+r.URL.Path) } diff --git a/core/pages.go b/core/pages.go index 1afd8ab..b39844f 100644 --- a/core/pages.go +++ b/core/pages.go @@ -11,6 +11,7 @@ import ( // PageHandler is the catch-all route handler, for serving static web pages. func (b *Blog) PageHandler(w http.ResponseWriter, r *http.Request) { path := r.URL.Path + log.Debug("Catch-all page handler invoked for request URI: %s", path) // Remove trailing slashes by redirecting them away. if len(path) > 1 && path[len(path)-1] == '/' { @@ -65,7 +66,14 @@ func (b *Blog) ResolvePath(path string) (Filepath, error) { path = strings.TrimPrefix(path, "/") } - log.Debug("Resolving filepath for URI: %s", path) + // If you need to debug this function, edit this block. + debug := func(tmpl string, args ...interface{}) { + if false { + log.Debug(tmpl, args...) + } + } + + debug("Resolving filepath for URI: %s", path) for _, root := range []string{b.DocumentRoot, b.UserRoot} { if len(root) == 0 { continue @@ -78,11 +86,11 @@ func (b *Blog) ResolvePath(path string) (Filepath, error) { log.Error("%v", err) } - log.Debug("Expected filepath: %s", absPath) + debug("Expected filepath: %s", absPath) // Found an exact hit? if stat, err := os.Stat(absPath); !os.IsNotExist(err) && !stat.IsDir() { - log.Debug("Exact filepath found: %s", absPath) + debug("Exact filepath found: %s", absPath) return Filepath{path, relPath, absPath}, nil } @@ -98,7 +106,7 @@ func (b *Blog) ResolvePath(path string) (Filepath, error) { for _, suffix := range suffixes { test := absPath + suffix if stat, err := os.Stat(test); !os.IsNotExist(err) && !stat.IsDir() { - log.Debug("Filepath found via suffix %s: %s", suffix, test) + debug("Filepath found via suffix %s: %s", suffix, test) return Filepath{path + suffix, relPath + suffix, test}, nil } } diff --git a/core/responses.go b/core/responses.go index ca748ed..c282741 100644 --- a/core/responses.go +++ b/core/responses.go @@ -6,6 +6,7 @@ import ( // Redirect sends an HTTP redirect response. func (b *Blog) Redirect(w http.ResponseWriter, location string) { + log.Error("Redirect: %s", location) w.Header().Set("Location", location) w.WriteHeader(http.StatusFound) } @@ -16,6 +17,7 @@ func (b *Blog) NotFound(w http.ResponseWriter, r *http.Request, message ...strin message = []string{"The page you were looking for was not found."} } + log.Error("HERE 2") w.WriteHeader(http.StatusNotFound) err := b.RenderTemplate(w, r, ".errors/404", &Vars{ Message: message[0], @@ -28,6 +30,7 @@ func (b *Blog) NotFound(w http.ResponseWriter, r *http.Request, message ...strin // Forbidden sends an HTTP 403 Forbidden response. func (b *Blog) Forbidden(w http.ResponseWriter, r *http.Request, message ...string) { + log.Error("HERE 3") w.WriteHeader(http.StatusForbidden) err := b.RenderTemplate(w, r, ".errors/403", nil) if err != nil { @@ -38,6 +41,7 @@ func (b *Blog) Forbidden(w http.ResponseWriter, r *http.Request, message ...stri // BadRequest sends an HTTP 400 Bad Request. func (b *Blog) BadRequest(w http.ResponseWriter, r *http.Request, message ...string) { + log.Error("HERE 4") w.WriteHeader(http.StatusBadRequest) err := b.RenderTemplate(w, r, ".errors/400", &Vars{ Message: message[0], diff --git a/core/templates.go b/core/templates.go index 8829f5c..722b4fe 100644 --- a/core/templates.go +++ b/core/templates.go @@ -25,9 +25,24 @@ type Vars struct { Message string Flash string Error error + Data map[interface{}]interface{} Form forms.Form } +// NewVars initializes a Vars struct with the custom Data map initialized. +// You may pass in an initial value for this map if you want. +func NewVars(data ...map[interface{}]interface{}) *Vars { + var value map[interface{}]interface{} + if len(data) > 0 { + value = data[0] + } else { + value = make(map[interface{}]interface{}) + } + return &Vars{ + Data: value, + } +} + // LoadDefaults combines template variables with default, globally available vars. func (v *Vars) LoadDefaults(r *http.Request) { // Get the site settings. @@ -36,7 +51,7 @@ func (v *Vars) LoadDefaults(r *http.Request) { s = settings.Defaults() } - if s.Initialized == false && !strings.HasPrefix(r.URL.Path, "/admin/setup") { + if s.Initialized == false && !strings.HasPrefix(r.URL.Path, "/initial-setup") { v.SetupNeeded = true } v.Title = s.Site.Title diff --git a/root/.layout.gohtml b/root/.layout.gohtml index c21f740..4e99c0e 100644 --- a/root/.layout.gohtml +++ b/root/.layout.gohtml @@ -1,4 +1,6 @@ {{ define "title" }}Untitled{{ end }} +{{ define "scripts" }}Default Scripts{{ end }} + {{ define "layout" }} @@ -52,7 +54,7 @@ {{ if .SetupNeeded }}
Your web blog needs to be set up! - Please click here to + Please click here to configure your blog.
{{ end }} @@ -157,6 +159,9 @@ + +{{ template "scripts" or "" }} + {{ end }} diff --git a/root/admin/settings.gohtml b/root/admin/settings.gohtml new file mode 100644 index 0000000..871ca50 --- /dev/null +++ b/root/admin/settings.gohtml @@ -0,0 +1,154 @@ +{{ define "title" }}Website Settings{{ end }} +{{ define "content" }} +
+
+
+ +
+ + {{ with .Data.s }} +
+

The Basics

+ +
+ + +
+ +
+ + For getting notifications about comments, etc. + +
+ +

Redis Cache

+ +

+ Using a Redis cache can + boost the performance of the JSON database by caching documents in + memory instead of always reading from disk. +

+ +
+ +
+ +
+ + (optional) + +
+ +
+ + +
+
+ + +
+
+ + 0-15 + +
+
+ + (optional) + +
+
+ +
+ +
+ +
+
+ +
+ +
+ + (optional) + +
+
+ {{ end }} +
+
+{{ end }} +{{ define "scripts" }} + +{{ end }} diff --git a/root/admin/settings.js b/root/admin/settings.js new file mode 100644 index 0000000..6e41801 --- /dev/null +++ b/root/admin/settings.js @@ -0,0 +1,19 @@ +var app = new Vue({ + el: "#settings-app", + data: { + currentTab: "site", + }, + mounted: function() { + var self = this; + + var m = window.location.hash.match(/^#(\w+?)$/) + if (m) { + self.currentTab = m[1]; + } + }, + methods: { + load: function() { + + }, + } +}) diff --git a/root/admin/setup.gohtml b/root/initial-setup.gohtml similarity index 97% rename from root/admin/setup.gohtml rename to root/initial-setup.gohtml index e7985cc..efbbdcd 100644 --- a/root/admin/setup.gohtml +++ b/root/initial-setup.gohtml @@ -13,7 +13,7 @@ predictable for an attacker to guess.

-
+
=0&&Math.floor(t)===t&&isFinite(e)}function u(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function l(e){var t=parseFloat(e);return isNaN(t)?e:t}function f(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}function p(e,t){return Ei.call(e,t)}function v(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}function h(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function m(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function y(e,t){for(var n in t)e[n]=t[n];return e}function g(e){for(var t={},n=0;n0&&(fe((s=de(s,(o||"")+"_"+a))[0])&&fe(u)&&(l[c]=T(u.text+s[0].text),s.shift()),l.push.apply(l,s)):i(s)?fe(u)?l[c]=T(u.text+s):""!==s&&l.push(T(s)):fe(s)&&fe(u)?l[c]=T(u.text+s.text):(n(r._isVList)&&t(s.tag)&&e(s.key)&&t(o)&&(s.key="__vlist"+o+"_"+a+"__"),l.push(s)));return l}function pe(e,t){return(e.__esModule||oo&&"Module"===e[Symbol.toStringTag])&&(e=e.default),o(e)?t.extend(e):e}function ve(e,t,n,r,i){var o=po();return o.asyncFactory=e,o.asyncMeta={data:t,context:n,children:r,tag:i},o}function he(r,i,a){if(n(r.error)&&t(r.errorComp))return r.errorComp;if(t(r.resolved))return r.resolved;if(n(r.loading)&&t(r.loadingComp))return r.loadingComp;if(!t(r.contexts)){var s=r.contexts=[a],c=!0,u=function(){for(var e=0,t=s.length;ePo&&No[n].id>e.id;)n--;No.splice(n+1,0,e)}else No.push(e);Mo||(Mo=!0,re(Le))}}function Fe(e){Ho.clear(),Re(e,Ho)}function Re(e,t){var n,r,i=Array.isArray(e);if((i||o(e))&&Object.isExtensible(e)){if(e.__ob__){var a=e.__ob__.dep.id;if(t.has(a))return;t.add(a)}if(i)for(n=e.length;n--;)Re(e[n],t);else for(n=(r=Object.keys(e)).length;n--;)Re(e[r[n]],t)}}function He(e,t,n){Bo.get=function(){return this[t][n]},Bo.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Bo)}function Be(e){e._watchers=[];var t=e.$options;t.props&&Ue(e,t.props),t.methods&&We(e,t.methods),t.data?Ve(e):I(e._data={},!0),t.computed&&Ke(e,t.computed),t.watch&&t.watch!==Qi&&Ge(e,t.watch)}function Ue(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[],o=!e.$parent;yo.shouldConvert=o;for(var a in t)!function(o){i.push(o);var a=W(o,t,n,e);M(r,o,a),o in e||He(e,"_props",o)}(a);yo.shouldConvert=!0}function Ve(e){var t=e.$options.data;a(t=e._data="function"==typeof t?ze(t,e):t||{})||(t={});for(var n=Object.keys(t),r=e.$options.props,i=n.length;i--;){var o=n[i];r&&p(r,o)||w(o)||He(e,"_data",o)}I(t,!0)}function ze(e,t){try{return e.call(t,t)}catch(e){return Q(e,t,"data()"),{}}}function Ke(e,t){var n=e._computedWatchers=Object.create(null),r=ro();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;r||(n[i]=new Ro(e,a||_,_,Uo)),i in e||Je(e,i,o)}}function Je(e,t,n){var r=!ro();"function"==typeof n?(Bo.get=r?qe(t):n,Bo.set=_):(Bo.get=n.get?r&&!1!==n.cache?qe(t):n.get:_,Bo.set=n.set?n.set:_),Object.defineProperty(e,t,Bo)}function qe(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),co.target&&t.depend(),t.value}}function We(e,t){for(var n in t)e[n]=null==t[n]?_:h(t[n],e)}function Ge(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i=0||n.indexOf(e[i])<0)&&r.push(e[i]);return r}return e}function Ot(e){this._init(e)}function St(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=m(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}function Tt(e){e.mixin=function(e){return this.options=J(this.options,e),this}}function Et(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name,a=function(e){this._init(e)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=t++,a.options=J(n.options,e),a.super=n,a.options.props&&jt(a),a.options.computed&&Nt(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,Ri.forEach(function(e){a[e]=n[e]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=y({},a.options),i[r]=a,a}}function jt(e){var t=e.options.props;for(var n in t)He(e.prototype,"_props",n)}function Nt(e){var t=e.options.computed;for(var n in t)Je(e.prototype,n,t[n])}function Lt(e){Ri.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&a(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}function It(e){return e&&(e.Ctor.options.name||e.tag)}function Mt(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!s(e)&&e.test(t)}function Dt(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=It(a.componentOptions);s&&!t(s)&&Pt(n,o,r,i)}}}function Pt(e,t,n,r){var i=e[t];i&&i!==r&&i.componentInstance.$destroy(),e[t]=null,d(n,t)}function Ft(e){for(var n=e.data,r=e,i=e;t(i.componentInstance);)(i=i.componentInstance._vnode).data&&(n=Rt(i.data,n));for(;t(r=r.parent);)r.data&&(n=Rt(n,r.data));return Ht(n.staticClass,n.class)}function Rt(e,n){return{staticClass:Bt(e.staticClass,n.staticClass),class:t(e.class)?[e.class,n.class]:n.class}}function Ht(e,n){return t(e)||t(n)?Bt(e,Ut(n)):""}function Bt(e,t){return e?t?e+" "+t:e:t||""}function Ut(e){return Array.isArray(e)?Vt(e):o(e)?zt(e):"string"==typeof e?e:""}function Vt(e){for(var n,r="",i=0,o=e.length;i=0&&" "===(m=e.charAt(h));h--);m&&Sa.test(m)||(l=!0)}}else void 0===o?(v=i+1,o=e.slice(0,i).trim()):t();if(void 0===o?o=e.slice(0,i).trim():0!==v&&t(),a)for(i=0;i-1?{exp:e.slice(0,Xo),key:'"'+e.slice(Xo+1)+'"'}:{exp:e,key:null};for(Yo=e,Xo=ea=ta=0;!bn();)$n(Qo=_n())?wn(Qo):91===Qo&&Cn(Qo);return{exp:e.slice(0,ea),key:e.slice(ea+1,ta)}}function _n(){return Yo.charCodeAt(++Xo)}function bn(){return Xo>=Zo}function $n(e){return 34===e||39===e}function Cn(e){var t=1;for(ea=Xo;!bn();)if(e=_n(),$n(e))wn(e);else if(91===e&&t++,93===e&&t--,0===t){ta=Xo;break}}function wn(e){for(var t=e;!bn()&&(e=_n())!==t;);}function xn(e,t,n){var r=n&&n.number,i=vn(e,"value")||"null",o=vn(e,"true-value")||"true",a=vn(e,"false-value")||"false";ln(e,"checked","Array.isArray("+t+")?_i("+t+","+i+")>-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),pn(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+t+"=$$a.concat([$$v]))}else{$$i>-1&&("+t+"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{"+yn(t,"$$c")+"}",null,!0)}function kn(e,t,n){var r=n&&n.number,i=vn(e,"value")||"null";ln(e,"checked","_q("+t+","+(i=r?"_n("+i+")":i)+")"),pn(e,"change",yn(t,i),null,!0)}function An(e,t,n){var r="var $$selectedVal = "+('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 '+(n&&n.number?"_n(val)":"val")+"})")+";";pn(e,"change",r=r+" "+yn(t,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),null,!0)}function On(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,u=o?"change":"range"===r?Ta:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=yn(t,l);c&&(f="if($event.target.composing)return;"+f),ln(e,"value","("+t+")"),pn(e,u,f,null,!0),(s||a)&&pn(e,"blur","$forceUpdate()")}function Sn(e){if(t(e[Ta])){var n=qi?"change":"input";e[n]=[].concat(e[Ta],e[n]||[]),delete e[Ta]}t(e[Ea])&&(e.change=[].concat(e[Ea],e.change||[]),delete e[Ea])}function Tn(e,t,n){var r=na;return function i(){null!==e.apply(null,arguments)&&jn(t,i,n,r)}}function En(e,t,n,r,i){t=ne(t),n&&(t=Tn(t,e,r)),na.addEventListener(e,t,Xi?{capture:r,passive:i}:r)}function jn(e,t,n,r){(r||na).removeEventListener(e,t._withTask||t,n)}function Nn(t,n){if(!e(t.data.on)||!e(n.data.on)){var r=n.data.on||{},i=t.data.on||{};na=n.elm,Sn(r),oe(r,i,En,jn,n.context),na=void 0}}function Ln(n,r){if(!e(n.data.domProps)||!e(r.data.domProps)){var i,o,a=r.elm,s=n.data.domProps||{},c=r.data.domProps||{};t(c.__ob__)&&(c=r.data.domProps=y({},c));for(i in s)e(c[i])&&(a[i]="");for(i in c){if(o=c[i],"textContent"===i||"innerHTML"===i){if(r.children&&(r.children.length=0),o===s[i])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===i){a._value=o;var u=e(o)?"":String(o);In(a,u)&&(a.value=u)}else a[i]=o}}}function In(e,t){return!e.composing&&("OPTION"===e.tagName||Mn(e,t)||Dn(e,t))}function Mn(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}function Dn(e,n){var r=e.value,i=e._vModifiers;return t(i)&&i.number?l(r)!==l(n):t(i)&&i.trim?r.trim()!==n.trim():r!==n}function Pn(e){var t=Fn(e.style);return e.staticStyle?y(e.staticStyle,t):t}function Fn(e){return Array.isArray(e)?g(e):"string"==typeof e?La(e):e}function Rn(e,t){var n,r={};if(t)for(var i=e;i.componentInstance;)(i=i.componentInstance._vnode).data&&(n=Pn(i.data))&&y(r,n);(n=Pn(e.data))&&y(r,n);for(var o=e;o=o.parent;)o.data&&(n=Pn(o.data))&&y(r,n);return r}function Hn(n,r){var i=r.data,o=n.data;if(!(e(i.staticStyle)&&e(i.style)&&e(o.staticStyle)&&e(o.style))){var a,s,c=r.elm,u=o.staticStyle,l=o.normalizedStyle||o.style||{},f=u||l,d=Fn(r.data.style)||{};r.data.normalizedStyle=t(d.__ob__)?y({},d):d;var p=Rn(r,!0);for(s in f)e(p[s])&&Da(c,s,"");for(s in p)(a=p[s])!==f[s]&&Da(c,s,null==a?"":a)}}function Bn(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function Un(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function Vn(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&y(t,Ha(e.name||"v")),y(t,e),t}return"string"==typeof e?Ha(e):void 0}}function zn(e){Wa(function(){Wa(e)})}function Kn(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),Bn(e,t))}function Jn(e,t){e._transitionClasses&&d(e._transitionClasses,t),Un(e,t)}function qn(e,t,n){var r=Wn(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===Ua?Ka:qa,c=0,u=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++c>=a&&u()};setTimeout(function(){c0&&(n=Ua,l=a,f=o.length):t===Va?u>0&&(n=Va,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?Ua:Va:null)?n===Ua?o.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===Ua&&Ga.test(r[za+"Property"])}}function Gn(e,t){for(;e.length1}function tr(e,t){!0!==t.data.show&&Yn(t)}function nr(e,t,n){rr(e,t,n),(qi||Gi)&&setTimeout(function(){rr(e,t,n)},0)}function rr(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=e.options.length;s-1,a.selected!==o&&(a.selected=o);else if(b(or(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function ir(e,t){return t.every(function(t){return!b(t,e)})}function or(e){return"_value"in e?e._value:e.value}function ar(e){e.target.composing=!0}function sr(e){e.target.composing&&(e.target.composing=!1,cr(e.target,"input"))}function cr(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function ur(e){return!e.componentInstance||e.data&&e.data.transition?e:ur(e.componentInstance._vnode)}function lr(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?lr(ye(t.children)):e}function fr(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[Ni(o)]=i[o];return t}function dr(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}function pr(e){for(;e=e.parent;)if(e.data.transition)return!0}function vr(e,t){return t.key===e.key&&t.tag===e.tag}function hr(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function mr(e){e.data.newPos=e.elm.getBoundingClientRect()}function yr(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}function gr(e,t){var n=t?as(t):is;if(n.test(e)){for(var r,i,o=[],a=n.lastIndex=0;r=n.exec(e);){(i=r.index)>a&&o.push(JSON.stringify(e.slice(a,i)));var s=an(r[1].trim());o.push("_s("+s+")"),a=i+r[0].length}return a=0&&a[i].lowerCasedTag!==s;i--);else i=0;if(i>=0){for(var c=a.length-1;c>=i;c--)t.end&&t.end(a[c].tag,n,r);a.length=i,o=i&&a[i-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,r):"p"===s&&(t.start&&t.start(e,[],!1,n,r),t.end&&t.end(e,n,r))}for(var i,o,a=[],s=t.expectHTML,c=t.isUnaryTag||Di,u=t.canBeLeftOpenTag||Di,l=0;e;){if(i=e,o&&Is(o)){var f=0,d=o.toLowerCase(),p=Ms[d]||(Ms[d]=new RegExp("([\\s\\S]*?)(]*>)","i")),v=e.replace(p,function(e,n,r){return f=r.length,Is(d)||"noscript"===d||(n=n.replace(//g,"$1").replace(//g,"$1")),Hs(d,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""});l+=e.length-v.length,e=v,r(d,l-f,l)}else{var h=e.indexOf("<");if(0===h){if(bs.test(e)){var m=e.indexOf("--\x3e");if(m>=0){t.shouldKeepComment&&t.comment(e.substring(4,m)),n(m+3);continue}}if($s.test(e)){var y=e.indexOf("]>");if(y>=0){n(y+2);continue}}var g=e.match(_s);if(g){n(g[0].length);continue}var _=e.match(gs);if(_){var b=l;n(_[0].length),r(_[1],b,l);continue}var $=function(){var t=e.match(ms);if(t){var r={tagName:t[1],attrs:[],start:l};n(t[0].length);for(var i,o;!(i=e.match(ys))&&(o=e.match(ps));)n(o[0].length),r.attrs.push(o);if(i)return r.unarySlash=i[1],n(i[0].length),r.end=l,r}}();if($){!function(e){var n=e.tagName,i=e.unarySlash;s&&("p"===o&&ds(n)&&r(o),u(n)&&o===n&&r(n));for(var l=c(n)||!!i,f=e.attrs.length,d=new Array(f),p=0;p=0){for(w=e.slice(h);!(gs.test(w)||ms.test(w)||bs.test(w)||$s.test(w)||(x=w.indexOf("<",1))<0);)h+=x,w=e.slice(h);C=e.substring(0,h),n(h)}h<0&&(C=e,e=""),t.chars&&C&&t.chars(C)}if(e===i){t.chars&&t.chars(e);break}}r()}function $r(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:Rr(t),parent:n,children:[]}}function Cr(e,t){function n(e){e.pre&&(s=!1),Ss(e.tag)&&(c=!1)}ws=t.warn||cn,Ss=t.isPreTag||Di,Ts=t.mustUseProp||Di,Es=t.getTagNamespace||Di,ks=un(t.modules,"transformNode"),As=un(t.modules,"preTransformNode"),Os=un(t.modules,"postTransformNode"),xs=t.delimiters;var r,i,o=[],a=!1!==t.preserveWhitespace,s=!1,c=!1;return br(e,{warn:ws,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,start:function(e,a,u){var l=i&&i.ns||Es(e);qi&&"svg"===l&&(a=Ur(a));var f=$r(e,a,i);l&&(f.ns=l),Br(f)&&!ro()&&(f.forbidden=!0);for(var d=0;d':'
',Ls.innerHTML.indexOf(" ")>0}function Ai(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}var Oi=Object.prototype.toString,Si=f("slot,component",!0),Ti=f("key,ref,slot,slot-scope,is"),Ei=Object.prototype.hasOwnProperty,ji=/-(\w)/g,Ni=v(function(e){return e.replace(ji,function(e,t){return t?t.toUpperCase():""})}),Li=v(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),Ii=/\B([A-Z])/g,Mi=v(function(e){return e.replace(Ii,"-$1").toLowerCase()}),Di=function(e,t,n){return!1},Pi=function(e){return e},Fi="data-server-rendered",Ri=["component","directive","filter"],Hi=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],Bi={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:Di,isReservedAttr:Di,isUnknownElement:Di,getTagNamespace:_,parsePlatformTagName:Pi,mustUseProp:Di,_lifecycleHooks:Hi},Ui=Object.freeze({}),Vi=/[^\w.$]/,zi="__proto__"in{},Ki="undefined"!=typeof window,Ji=Ki&&window.navigator.userAgent.toLowerCase(),qi=Ji&&/msie|trident/.test(Ji),Wi=Ji&&Ji.indexOf("msie 9.0")>0,Gi=Ji&&Ji.indexOf("edge/")>0,Zi=Ji&&Ji.indexOf("android")>0,Yi=Ji&&/iphone|ipad|ipod|ios/.test(Ji),Qi=(Ji&&/chrome\/\d+/.test(Ji),{}.watch),Xi=!1;if(Ki)try{var eo={};Object.defineProperty(eo,"passive",{get:function(){Xi=!0}}),window.addEventListener("test-passive",null,eo)}catch(e){}var to,no,ro=function(){return void 0===to&&(to=!Ki&&"undefined"!=typeof global&&"server"===global.process.env.VUE_ENV),to},io=Ki&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,oo="undefined"!=typeof Symbol&&A(Symbol)&&"undefined"!=typeof Reflect&&A(Reflect.ownKeys);no="undefined"!=typeof Set&&A(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ao=_,so=0,co=function(){this.id=so++,this.subs=[]};co.prototype.addSub=function(e){this.subs.push(e)},co.prototype.removeSub=function(e){d(this.subs,e)},co.prototype.depend=function(){co.target&&co.target.addDep(this)},co.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t1?m(n):n;for(var r=m(arguments,1),i=0,o=n.length;iparseInt(this.max)&&Pt(i,o[0],o,this._vnode)),e.data.keepAlive=!0}return e}}};!function(e){var t={};t.get=function(){return Bi},Object.defineProperty(e,"config",t),e.util={warn:ao,extend:y,mergeOptions:J,defineReactive:M},e.set=D,e.delete=P,e.nextTick=re,e.options=Object.create(null),Ri.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,y(e.options.components,Go),St(e),Tt(e),Et(e),Lt(e)}(Ot),Object.defineProperty(Ot.prototype,"$isServer",{get:ro}),Object.defineProperty(Ot.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Ot.version="2.5.3";var Zo,Yo,Qo,Xo,ea,ta,na,ra,ia=f("style,class"),oa=f("input,textarea,option,select,progress"),aa=function(e,t,n){return"value"===n&&oa(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},sa=f("contenteditable,draggable,spellcheck"),ca=f("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"),ua="http://www.w3.org/1999/xlink",la=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},fa=function(e){return la(e)?e.slice(6,e.length):""},da=function(e){return null==e||!1===e},pa={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},va=f("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"),ha=f("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),ma=function(e){return va(e)||ha(e)},ya=Object.create(null),ga=f("text,number,password,search,email,tel,url"),_a=Object.freeze({createElement:function(e,t){var n=document.createElement(e);return"select"!==e?n:(t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)},createElementNS:function(e,t){return document.createElementNS(pa[e],t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},setAttribute:function(e,t,n){e.setAttribute(t,n)}}),ba={create:function(e,t){qt(t)},update:function(e,t){e.data.ref!==t.data.ref&&(qt(e,!0),qt(t))},destroy:function(e){qt(e,!0)}},$a=new lo("",{},[]),Ca=["create","activate","update","remove","destroy"],wa={create:Yt,update:Yt,destroy:function(e){Yt(e,$a)}},xa=Object.create(null),ka=[ba,wa],Aa={create:nn,update:nn},Oa={create:on,update:on},Sa=/[\w).+\-_$\]]/,Ta="__r",Ea="__c",ja={create:Nn,update:Nn},Na={create:Ln,update:Ln},La=v(function(e){var t={},n=/;(?![^(]*\))/g,r=/:(.+)/;return e.split(n).forEach(function(e){if(e){var n=e.split(r);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}),Ia=/^--/,Ma=/\s*!important$/,Da=function(e,t,n){if(Ia.test(t))e.style.setProperty(t,n);else if(Ma.test(n))e.style.setProperty(t,n.replace(Ma,""),"important");else{var r=Fa(t);if(Array.isArray(n))for(var i=0,o=n.length;ip?g(n,e(i[m+1])?null:i[m+1].elm,i,d,m,o):d>m&&b(n,r,f,p)}function w(e,n,r,i){for(var o=r;o-1?ya[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:ya[e]=/HTMLUnknownElement/.test(t.toString())},y(Ot.options.directives,Qa),y(Ot.options.components,ns),Ot.prototype.__patch__=Ki?Za:_,Ot.prototype.$mount=function(e,t){return e=e&&Ki?Jt(e):void 0,Ae(this,e,t)},Ot.nextTick(function(){Bi.devtools&&io&&io.emit("init",Ot)},0);var rs,is=/\{\{((?:.|\n)+?)\}\}/g,os=/[-.*+?^${}()|[\]\/\\]/g,as=v(function(e){var t=e[0].replace(os,"\\$&"),n=e[1].replace(os,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")}),ss={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=hn(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=vn(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}},cs={staticKeys:["staticStyle"],transformNode:function(e,t){var n=hn(e,"style");n&&(e.staticStyle=JSON.stringify(La(n)));var r=vn(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},us={decode:function(e){return rs=rs||document.createElement("div"),rs.innerHTML=e,rs.textContent}},ls=f("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),fs=f("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),ds=f("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),ps=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,vs="[a-zA-Z_][\\w\\-\\.]*",hs="((?:"+vs+"\\:)?"+vs+")",ms=new RegExp("^<"+hs),ys=/^\s*(\/?)>/,gs=new RegExp("^<\\/"+hs+"[^>]*>"),_s=/^]+>/i,bs=/^