8 lines
69 KiB
JavaScript
8 lines
69 KiB
JavaScript
|
/*!
|
||
|
* Vue.js v2.1.6
|
||
|
* (c) 2014-2016 Evan You
|
||
|
* Released under the MIT License.
|
||
|
*/
|
||
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Vue=t()}(this,function(){"use strict";function e(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function t(e){var t=parseFloat(e,10);return t||0===t?t:e}function n(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}function r(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}function i(e,t){return Yr.call(e,t)}function a(e){return"string"==typeof e||"number"==typeof e}function o(e){var t=Object.create(null);return function(n){var r=t[n];return r||(t[n]=e(n))}}function s(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 c(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function l(e,t){for(var n in t)e[n]=t[n];return e}function u(e){return null!==e&&"object"==typeof e}function f(e){return ri.call(e)===ii}function d(e){for(var t={},n=0;n<e.length;n++)e[n]&&l(t,e[n]);return t}function p(){}function v(e){return e.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(",")}function h(e,t){return e==t||!(!u(e)||!u(t))&&JSON.stringify(e)===JSON.stringify(t)}function m(e,t){for(var n=0;n<e.length;n++)if(h(e[n],t))return n;return-1}function g(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function y(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function _(e){if(!ci.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}function b(e){return/native code/.test(e.toString())}function $(e){xi.target&&Ci.push(xi.target),xi.target=e}function w(){xi.target=Ci.pop()}function x(e,t){e.__proto__=t}function C(e,t,n){for(var r=0,i=n.length;r<i;r++){var a=n[r];y(e,a,t[a])}}function k(e,t){if(u(e)){var n;return i(e,"__ob__")&&e.__ob__ instanceof Ti?n=e.__ob__:Si.shouldConvert&&!gi()&&(Array.isArray(e)||f(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new Ti(e)),t&&n&&n.vmCount++,n}}function A(e,t,n,r){var i=new xi,a=Object.getOwnPropertyDescriptor(e,t);if(!a||a.configurable!==!1){var o=a&&a.get,s=a&&a.set,c=k(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=o?o.call(e):n;return xi.target&&(i.depend(),c&&c.dep.depend(),Array.isArray(t)&&T(t)),t},set:function(t){var r=o?o.call(e):n;t===r||t!==t&&r!==r||(s?s.call(e,t):n=t,c=k(t),i.notify())}})}}function O(e,t,n){if(Array.isArray(e))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(i(e,t))return void(e[t]=n);var r=e.__ob__;if(!(e._isVue||r&&r.vmCount))return r?(A(r.value,t,n),r.dep.notify(),n):void(e[t]=n)}function S(e,t){var n=e.__ob__;e._isVue||n&&n.vmCount||i(e,t)&&(delete e[t],n&&n.dep.notify())}function T(e){for(var t=void 0,n=0,r=e.length;n<r;n++)t=e[n],t&&t.__ob__&&t.__ob__.dep.depend(),Array.isArray(t)&&T(t)}function E(e,t){if(!t)return e;for(var n,r,a,o=Object.keys(t),s=0;s<o.length;s++)n=o[s],r=e[n],a=t[n],i(e,n)?f(r)&&f(a)&&E(r,a):O(e,n,a);return e}function j(e,t){return t?e?e.concat(t):Array.isArray(t)?t:[t]:e}function N(e,t){var n=Object.create(e||null);return t?l(n,t):n}function L(e){var t=e.props;if(t){var n,r,i,a={};if(Array.isArray(t))for(n=t.length;n--;)r=t[n],"string"==typeof r&&(i=Xr(r),a[i]={type:null});else if(f(t))for(var o in t)r=t[o],i=Xr(o),a[i]=f(r)?r:{type:r};e.props=a}}function D(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}function M(e,t,n){function r(r){var i=Ei[r]||ji;u[r]=i(e[r],t[r],n,r)}L(t),D(t);var a=t.extends;if(a&&(e="function"==typeof a?M(e,a.options,n):M(e,a,n)),t.mixins)for(var o=0,s=t.mixins.length;o<s;o++){var c=t.mixins[o];c.prototype instanceof Ue&&(c=c.options),e=M(e,c,n)}var l,u={};for(l in e)r(l);for(l in t)i(e,l)||r(l);return u}function P(e,t,n,r){if("string"==typeof n){var a=e[t];if(i(a,n))return a[n];var o=Xr(n);if(i(a,o))return a[o];var s=ei(o);if(i(a,s))ret
|
||
|
A&&A(n)):k&&k(n),n._enterCb=null});e.data.show||ae(e.data.hook||(e.data.hook={}),"insert",function(){var t=n.parentNode,r=t&&t._pending&&t._pending[e.key];r&&r.context===e.context&&r.tag===e.tag&&r.elm._leaveCb&&r.elm._leaveCb(),C&&C(n,T)},"transition-insert"),x&&x(n),O&&(Ht(n,$),Ht(n,w),Ft(function(){Ut(n,$),T.cancelled||S||Bt(n,a,T)})),e.data.show&&(t&&t(),C&&C(n,T)),O||S||T()}}}function qt(e,t){function n(){m.cancelled||(e.data.show||((r.parentNode._pending||(r.parentNode._pending={}))[e.key]=e),l&&l(r),v&&(Ht(r,s),Ht(r,c),Ft(function(){Ut(r,s),m.cancelled||h||Bt(r,o,m)})),u&&u(r,m),v||h||m())}var r=e.elm;r._enterCb&&(r._enterCb.cancelled=!0,r._enterCb());var i=Wt(e.data.transition);if(!i)return t();if(!r._leaveCb&&1===r.nodeType){var a=i.css,o=i.type,s=i.leaveClass,c=i.leaveActiveClass,l=i.beforeLeave,u=i.leave,f=i.afterLeave,d=i.leaveCancelled,p=i.delayLeave,v=a!==!1&&!pi,h=u&&(u._length||u.length)>1,m=r._leaveCb=Zt(function(){r.parentNode&&r.parentNode._pending&&(r.parentNode._pending[e.key]=null),v&&Ut(r,c),m.cancelled?(v&&Ut(r,s),d&&d(r)):(t(),f&&f(r)),r._leaveCb=null});p?p(n):n()}}function Wt(e){if(e){if("object"==typeof e){var t={};return e.css!==!1&&l(t,Ua(e.name||"v")),l(t,e),t}return"string"==typeof e?Ua(e):void 0}}function Zt(e){var t=!1;return function(){t||(t=!0,e())}}function Gt(e,t){t.data.show||Kt(t)}function Yt(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var a,o,s=0,c=e.options.length;s<c;s++)if(o=e.options[s],i)a=m(r,Xt(o))>-1,o.selected!==a&&(o.selected=a);else if(h(Xt(o),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function Qt(e,t){for(var n=0,r=t.length;n<r;n++)if(h(Xt(t[n]),e))return!1;return!0}function Xt(e){return"_value"in e?e._value:e.value}function en(e){e.target.composing=!0}function tn(e){e.target.composing=!1,nn(e.target,"input")}function nn(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function rn(e){return!e.child||e.data&&e.data.transition?e:rn(e.child._vnode)}function an(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?an(fe(t.children)):e}function on(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var a in i)t[Xr(a)]=i[a].fn;return t}function sn(e,t){return/\d-keep-alive$/.test(t.tag)?e("keep-alive"):null}function cn(e){for(;e=e.parent;)if(e.data.transition)return!0}function ln(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function un(e){e.data.newPos=e.elm.getBoundingClientRect()}function fn(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 a=e.elm.style;a.transform=a.WebkitTransform="translate("+r+"px,"+i+"px)",a.transitionDuration="0s"}}function dn(e,t){var n=document.createElement("div");return n.innerHTML='<div a="'+e+'">',n.innerHTML.indexOf(t)>0}function pn(e){return eo=eo||document.createElement("div"),eo.innerHTML=e,eo.textContent}function vn(e,t){return t&&(e=e.replace(Zo,"\n")),e.replace(qo,"<").replace(Wo,">").replace(Go,"&").replace(Yo,'"')}function hn(e,t){function n(t){f+=t,e=e.substring(t)}function r(){var t=e.match(fo);if(t){var r={tagName:t[1],attrs:[],start:f};n(t[0].length);for(var i,a;!(i=e.match(po))&&(a=e.match(co));)n(a[0].length),r.attrs.push(a);if(i)return r.unarySlash=i[1],n(i[0].length),r.end=f,r}}function i(e){var n=e.tagName,r=e.unarySlash;l&&("p"===s&&io(n)&&a("",s),ro(n)&&s===n&&a("",n));for(var i=u(n)||"html"===n&&"head"===s||!!r,o=e.attrs.length,f=new Array(o),d=0;d<o;d++){var p=e.attrs[d];yo&&p[0].indexOf('""')===-1&&(""===p[3]&&delete p[3],""===p[4]&&delete p[4],""===p[5]&&delete p[5]);var v=p[3]||p[4]||p[5]||"";f[d]={name:p[1],value:vn(v,t.shouldDecodeNewlines)}}i||(c.push({tag:n,attrs:f}),s=n,r=""),t.start&&t.start(n,f,i,e.start,e.end)}function a(e,n,r,i){var a;if(null==r&&(r=f),null==i&&(i=f),n){var o=n.toLowerCase();for(a=c.length-1;a>=0&&c[a].tag.toLowerCase()!==o;a--);}else a=0;if(a>=0){for(var l=c.length-1;l>=a;l--)t.end&&t.end(c[l].tag,r,i);c.length=a,s=a&&c[a-1].tag}else"br"===n.toLowerCase()?t.start&&t.start(n,[],!0,r,i):"
|
||
|
nodeOps:va,modules:Va});pi&&document.addEventListener("selectionchange",function(){var e=document.activeElement;e&&e.vmodel&&nn(e,"input")});var Ka={inserted:function(e,t,n){if("select"===n.tag){var r=function(){Yt(e,t,n.context)};r(),(di||vi)&&setTimeout(r,0)}else"textarea"!==n.tag&&"text"!==e.type||(e._vModifiers=t.modifiers,t.modifiers.lazy||(hi||(e.addEventListener("compositionstart",en),e.addEventListener("compositionend",tn)),pi&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){Yt(e,t,n.context);var r=e.multiple?t.value.some(function(t){return Qt(t,e.options)}):t.value!==t.oldValue&&Qt(t.value,e.options);r&&nn(e,"change")}}},qa={bind:function(e,t,n){var r=t.value;n=rn(n);var i=n.data&&n.data.transition,a=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i&&!pi?(n.data.show=!0,Kt(n,function(){e.style.display=a})):e.style.display=r?a:"none"},update:function(e,t,n){var r=t.value,i=t.oldValue;if(r!==i){n=rn(n);var a=n.data&&n.data.transition;a&&!pi?(n.data.show=!0,r?Kt(n,function(){e.style.display=e.__vOriginalDisplay}):qt(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none"}}},Wa={model:Ka,show:qa},Za={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String},Ga={name:"transition",props:Za,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(function(e){return e.tag}),n.length)){var r=this.mode,i=n[0];if(cn(this.$vnode))return i;var a=an(i);if(!a)return i;if(this._leaving)return sn(e,i);var o=a.key=null==a.key||a.isStatic?"__v"+(a.tag+this._uid)+"__":a.key,s=(a.data||(a.data={})).transition=on(this),c=this._vnode,u=an(c);if(a.data.directives&&a.data.directives.some(function(e){return"show"===e.name})&&(a.data.show=!0),u&&u.data&&u.key!==o){var f=u.data.transition=l({},s);if("out-in"===r)return this._leaving=!0,ae(f,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()},o),sn(e,i);if("in-out"===r){var d,p=function(){d()};ae(s,"afterEnter",p,o),ae(s,"enterCancelled",p,o),ae(f,"delayLeave",function(e){d=e},o)}}return i}}},Ya=l({tag:String,moveClass:String},Za);delete Ya.mode;var Qa={props:Ya,render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],a=this.children=[],o=on(this),s=0;s<i.length;s++){var c=i[s];c.tag&&null!=c.key&&0!==String(c.key).indexOf("__vlist")&&(a.push(c),n[c.key]=c,(c.data||(c.data={})).transition=o)}if(r){for(var l=[],u=[],f=0;f<r.length;f++){var d=r[f];d.data.transition=o,d.data.pos=d.elm.getBoundingClientRect(),n[d.key]?l.push(d):u.push(d)}this.kept=e(t,null,l),this.removed=u}return e(t,null,a)},beforeUpdate:function(){this.__patch__(this._vnode,this.kept,!1,!0),this._vnode=this.kept},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";if(e.length&&this.hasMove(e[0].elm,t)){e.forEach(ln),e.forEach(un),e.forEach(fn);document.body.offsetHeight;e.forEach(function(e){if(e.data.moved){var n=e.elm,r=n.style;Ht(n,t),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Pa,n._moveCb=function e(r){r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Pa,e),n._moveCb=null,Ut(n,t))})}})}},methods:{hasMove:function(e,t){if(!Na)return!1;if(null!=this._hasMove)return this._hasMove;Ht(e,t);var n=zt(e);return Ut(e,t),this._hasMove=n.hasTransform}}},Xa={Transition:Ga,TransitionGroup:Qa};Ue.config.isUnknownElement=et,Ue.config.isReservedTag=da,Ue.config.getTagNamespace=Xe,Ue.config.mustUseProp=ta,l(Ue.options.directives,Wa),l(Ue.options.components,Xa),Ue.prototype.__patch__=ui?Ja:p,Ue.prototype.$mount=function(e,t){return e=e&&ui?tt(e):void 0,this._mount(e,t)},setTimeout(function(){si.devtools&&yi&&yi.emit("init",Ue)},0);var eo,to=!!ui&&dn("\n"," "),no=n("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr",!0),ro=n("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source",!0),io=n("address
|