mindoc/static/vuejs/vue.runtime.min.js

7 lines
53 KiB
Go
Raw Normal View History

2017-04-19 18:19:27 +08:00
/*!
* Vue.js v2.2.6
* (c) 2014-2017 Evan You
* Released under the MIT License.
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Vue=e()}(this,function(){"use strict";function t(t){return null==t?"":"object"==typeof t?JSON.stringify(t,null,2):String(t)}function e(t){var e=parseFloat(t);return isNaN(e)?t:e}function n(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}function r(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)return t.splice(n,1)}}function o(t,e){return Rn.call(t,e)}function i(t){return"string"==typeof t||"number"==typeof t}function a(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}function s(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 c(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function u(t,e){for(var n in e)t[n]=e[n];return t}function l(t){return null!==t&&"object"==typeof t}function f(t){return zn.call(t)===Fn}function p(t){for(var e={},n=0;n<t.length;n++)t[n]&&u(e,t[n]);return e}function d(){}function v(t,e){var n=l(t),r=l(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{return JSON.stringify(t)===JSON.stringify(e)}catch(n){return t===e}}function h(t,e){for(var n=0;n<t.length;n++)if(v(t[n],e))return n;return-1}function m(t){var e=!1;return function(){e||(e=!0,t())}}function y(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function _(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function g(t){if(!Gn.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}function b(t){return/native code/.test(t.toString())}function C(t){fr.target&&pr.push(fr.target),fr.target=t}function w(){fr.target=pr.pop()}function $(t,e){t.__proto__=e}function A(t,e,n){for(var r=0,o=n.length;r<o;r++){var i=n[r];_(t,i,e[i])}}function k(t,e){if(l(t)){var n;return o(t,"__ob__")&&t.__ob__ instanceof yr?n=t.__ob__:mr.shouldConvert&&!ir()&&(Array.isArray(t)||f(t))&&Object.isExtensible(t)&&!t._isVue&&(n=new yr(t)),e&&n&&n.vmCount++,n}}function x(t,e,n,r){var o=new fr,i=Object.getOwnPropertyDescriptor(t,e);if(!i||i.configurable!==!1){var a=i&&i.get,s=i&&i.set,c=k(n);Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){var e=a?a.call(t):n;return fr.target&&(o.depend(),c&&c.dep.depend(),Array.isArray(e)&&E(e)),e},set:function(e){var r=a?a.call(t):n;e===r||e!==e&&r!==r||(s?s.call(t,e):n=e,c=k(e),o.notify())}})}}function O(t,e,n){if(Array.isArray(t)&&"number"==typeof e)return t.length=Math.max(t.length,e),t.splice(e,1,n),n;if(o(t,e))return t[e]=n,n;var r=t.__ob__;return t._isVue||r&&r.vmCount?n:r?(x(r.value,e,n),r.dep.notify(),n):(t[e]=n,n)}function S(t,e){if(Array.isArray(t)&&"number"==typeof e)return void t.splice(e,1);var n=t.__ob__;t._isVue||n&&n.vmCount||o(t,e)&&(delete t[e],n&&n.dep.notify())}function E(t){for(var e=void 0,n=0,r=t.length;n<r;n++)e=t[n],e&&e.__ob__&&e.__ob__.dep.depend(),Array.isArray(e)&&E(e)}function T(t,e){if(!e)return t;for(var n,r,i,a=Object.keys(e),s=0;s<a.length;s++)n=a[s],r=t[n],i=e[n],o(t,n)?f(r)&&f(i)&&T(r,i):O(t,n,i);return t}function I(t,e){return e?t?t.concat(e):Array.isArray(e)?e:[e]:t}function j(t,e){var n=Object.create(t||null);return e?u(n,e):n}function D(t){var e=t.props;if(e){var n,r,o,i={};if(Array.isArray(e))for(n=e.length;n--;)"string"==typeof(r=e[n])&&(o=Vn(r),i[o]={type:null});else if(f(e))for(var a in e)r=e[a],o=Vn(a),i[o]=f(r)?r:{type:r};t.props=i}}function N(t){var e=t.directives;if(e)for(var n in e){var r=e[n];"function"==typeof r&&(e[n]={bind:r,update:r})}}function L(t,e,n){function r(r){var o=_r[r]||gr;l[r]=o(t[r],e[r],n,r)}D(e),N(e);var i=e.extends;if(i&&(t="function"==typeof i?L(t,i.options,n):L(t,i,n)),e.mixins)for(var a=0,s=e.mixins.length;a<s;a++){var c=e.mixins[a];c.prototype instanceof ne&&(c=c.options),t=L(t,c,n)}var u,l={};for(u in t)r(u);for(u in e)o(t,u)||r(u);return l}function P(t,e,n,r){if("string"==typeof
t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var ur=d,lr=0,fr=function(){this.id=lr++,this.subs=[]};fr.prototype.addSub=function(t){this.subs.push(t)},fr.prototype.removeSub=function(t){r(this.subs,t)},fr.prototype.depend=function(){fr.target&&fr.target.addDep(this)},fr.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;e<n;e++)t[e].update()},fr.target=null;var pr=[],dr=Array.prototype,vr=Object.create(dr);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(t){var e=dr[t];_(vr,t,function(){for(var n=arguments,r=arguments.length,o=new Array(r);r--;)o[r]=n[r];var i,a=e.apply(this,o),s=this.__ob__;switch(t){case"push":i=o;break;case"unshift":i=o;break;case"splice":i=o.slice(2)}return i&&s.observeArray(i),s.dep.notify(),a})});var hr=Object.getOwnPropertyNames(vr),mr={shouldConvert:!0,isSettingProps:!1},yr=function(t){if(this.value=t,this.dep=new fr,this.vmCount=0,_(t,"__ob__",this),Array.isArray(t)){(Zn?$:A)(t,vr,hr),this.observeArray(t)}else this.walk(t)};yr.prototype.walk=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)x(t,e[n],t[e[n]])},yr.prototype.observeArray=function(t){for(var e=0,n=t.length;e<n;e++)k(t[e])};var _r=Kn.optionMergeStrategies;_r.data=function(t,e,n){return n?t||e?function(){var r="function"==typeof e?e.call(n):e,o="function"==typeof t?t.call(n):void 0;return r?T(r,o):o}:void 0:e?"function"!=typeof e?t:t?function(){return T(e.call(this),t.call(this))}:e:t},Kn._lifecycleHooks.forEach(function(t){_r[t]=I}),Kn._assetTypes.forEach(function(t){_r[t+"s"]=j}),_r.watch=function(t,e){if(!e)return Object.create(t||null);if(!t)return e;var n={};u(n,t);for(var r in e){var o=n[r],i=e[r];o&&!Array.isArray(o)&&(o=[o]),n[r]=o?o.concat(i):[i]}return n},_r.props=_r.methods=_r.computed=function(t,e){if(!e)return Object.create(t||null);if(!t)return e;var n=Object.create(null);return u(n,t),u(n,e),n};var gr=function(t,e){return void 0===e?t:e},br=function(t,e,n,r,o,i,a){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.functionalContext=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1},Cr={child:{}};Cr.child.get=function(){return this.componentInstance},Object.defineProperties(br.prototype,Cr);var wr,$r=function(){var t=new br;return t.text="",t.isComment=!0,t},Ar=a(function(t){var e="~"===t.charAt(0);t=e?t.slice(1):t;var n="!"===t.charAt(0);return t=n?t.slice(1):t,{name:t,once:e,capture:n}}),kr=null,xr=[],Or={},Sr=!1,Er=!1,Tr=0,Ir=0,jr=function(t,e,n,r){this.vm=t,t._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Ir,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new Un,this.newDepIds=new Un,this.expression="","function"==typeof e?this.getter=e:(this.getter=g(e),this.getter||(this.getter=function(){})),this.value=this.lazy?void 0:this.get()};jr.prototype.get=function(){C(this);var t,e=this.vm;if(this.user)try{t=this.getter.call(e,e)}catch(t){B(t,e,'getter for watcher "'+this.expression+'"')}else t=this.getter.call(e,e);return this.deep&&ht(t),w(),this.cleanupDeps(),t},jr.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))},jr.prototype.cleanupDeps=function(){for(var t=this,e=this.deps.length;e--;){var n=t.deps[e];t.newDepIds.has(n.id)||n.removeSub(t)}var r=this.depIds;this.depIds=this.newDepIds,this.newDepIds=r,this.newDepIds.clear(),r=this.deps,this.deps=this.newDeps,this.newDeps=r,this.newDeps.length=0},jr.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():vt(this)},jr.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||l(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){B(t,this.vm,'callback