vue2/dist/vue.min.js

4 lines
29 KiB
JavaScript

// Vue.js - v0.6.0
// (c) 2013 Evan You
// https://github.com/yyx990803/vue
!function(){function a(b,c,d){var e=a.resolve(b);if(null==e){d=d||b,c=c||"root";var f=new Error('Failed to require "'+d+'" from "'+c+'"');throw f.path=d,f.parent=c,f.require=!0,f}var g=a.modules[e];if(!g._resolving&&!g.exports){var h={};h.exports={},h.client=h.component=!0,g._resolving=!0,g.call(this,h.exports,a.relative(e),h),delete g._resolving,g.exports=h.exports}return g.exports}a.modules={},a.aliases={},a.resolve=function(b){"/"===b.charAt(0)&&(b=b.slice(1));for(var c=[b,b+".js",b+".json",b+"/index.js",b+"/index.json"],d=0;d<c.length;d++){var b=c[d];if(a.modules.hasOwnProperty(b))return b;if(a.aliases.hasOwnProperty(b))return a.aliases[b]}},a.normalize=function(a,b){var c=[];if("."!=b.charAt(0))return b;a=a.split("/"),b=b.split("/");for(var d=0;d<b.length;++d)".."==b[d]?a.pop():"."!=b[d]&&""!=b[d]&&c.push(b[d]);return a.concat(c).join("/")},a.register=function(b,c){a.modules[b]=c},a.alias=function(b,c){if(!a.modules.hasOwnProperty(b))throw new Error('Failed to alias "'+b+'", it does not exist');a.aliases[c]=b},a.relative=function(b){function c(a,b){for(var c=a.length;c--;)if(a[c]===b)return c;return-1}function d(c){var e=d.resolve(c);return a(e,b,c)}var e=a.normalize(b,"..");return d.resolve=function(d){var f=d.charAt(0);if("/"==f)return d.slice(1);if("."==f)return a.normalize(e,d);var g=b.split("/"),h=c(g,"deps")+1;return h||(h=0),d=g.slice(0,h+1).join("/")+"/deps/"+d},d.exists=function(b){return a.modules.hasOwnProperty(d.resolve(b))},d},a.register("component-emitter/index.js",function(a,b,c){function d(a){return a?e(a):void 0}function e(a){for(var b in d.prototype)a[b]=d.prototype[b];return a}c.exports=d,d.prototype.on=d.prototype.addEventListener=function(a,b){return this._callbacks=this._callbacks||{},(this._callbacks[a]=this._callbacks[a]||[]).push(b),this},d.prototype.once=function(a,b){function c(){d.off(a,c),b.apply(this,arguments)}var d=this;return this._callbacks=this._callbacks||{},c.fn=b,this.on(a,c),this},d.prototype.off=d.prototype.removeListener=d.prototype.removeAllListeners=d.prototype.removeEventListener=function(a,b){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var c=this._callbacks[a];if(!c)return this;if(1==arguments.length)return delete this._callbacks[a],this;for(var d,e=0;e<c.length;e++)if(d=c[e],d===b||d.fn===b){c.splice(e,1);break}return this},d.prototype.emit=function(a){this._callbacks=this._callbacks||{};var b=[].slice.call(arguments,1),c=this._callbacks[a];if(c){c=c.slice(0);for(var d=0,e=c.length;e>d;++d)c[d].apply(this,b)}return this},d.prototype.listeners=function(a){return this._callbacks=this._callbacks||{},this._callbacks[a]||[]},d.prototype.hasListeners=function(a){return!!this.listeners(a).length}}),a.register("vue/src/main.js",function(a,b,c){function d(a){var b=this;a=e(a,b.options,!0),l.processOptions(a);var c=function(c){c=e(c,a,!0),b.call(this,c)},f=c.prototype=Object.create(b.prototype);l.defProtected(f,"constructor",c);var g=a.proto;if(g)for(var h in g)h in i.prototype||(f[h]=g[h]);return c.extend=d,c.super=b,c.options=a,c}function e(a,b,c){if(a=a||l.hash(),!b)return a;for(var d in b)"el"!==d&&"proto"!==d&&(a[d]?c&&"Object"===l.typeOf(a[d])&&e(a[d],b[d],!1):a[d]=b[d]);return a}function f(){m.forEach(g)}function g(a){h.attrs[a]=h.prefix+"-"+a}var h=b("./config"),i=b("./viewmodel"),j=b("./directives"),k=b("./filters"),l=b("./utils");i.config=function(a){return a&&(l.extend(h,a),a.prefix&&f()),this},i.directive=function(a,b){return b?(j[a]=b,this):j[a]},i.filter=function(a,b){return b?(k[a]=b,this):k[a]},i.component=function(a,b){return b?(l.components[a]=l.toConstructor(b),this):l.components[a]},i.element=function(a,b){return b?(l.elements[a]=l.toConstructor(b),this):l.elements[a]},i.partial=function(a,b){return b?(l.partials[a]=l.toFragment(b),this):l.partials[a]},i.transition=function(a,b){return b?(l.transitions[a]=b,this):l.transitions[a]},i.extend=d;var m=["id","pre","text","repeat","partial","component","transition"];f(),c.exports=i}),a.register("vue/src/emitter.js",function(a,b,c){var d,e="emitter";try{d=b(e)}catch(f){d=b("events").EventEmitter,d.prototype.off=function(){var a=arguments.length>1?this.removeListener:this.removeAllListeners;return a.apply(this,arguments)}}c.exports=d}),a.register("vue/src/config.js",function(a,b,c){c.exports={prefix:"v",debug:!1,silent:!1,enterClass:"v-enter",leaveClass:"v-leave",attrs:{}}}),a.register("vue/src/utils.js",function(a,b,c){function d(){return Object.create(null)}var e,f=b("./config"),g=f.attrs,h=Object.prototype.toString,i=Array.prototype.join,j=window.console,k=c.exports={hash:d,components:d(),partials:d(),transitions:d(),elements:d(),attr:function(a,b,c){var d=g[b],e=a.getAttribute(d);return c||null===e||a.removeAttribute(d),e},defProtected:function(a,b,c,d,e){a.hasOwnProperty(b)||Object.defineProperty(a,b,{value:c,enumerable:!!d,configurable:!!e})},typeOf:function(a){return h.call(a).slice(8,-1)},bind:function(a,b){return function(c){return a.call(b,c)}},toText:function(a){return"string"==typeof a||"boolean"==typeof a||"number"==typeof a&&a==a?a:""},extend:function(a,b,c){for(var d in b)c&&a[d]||(a[d]=b[d])},unique:function(a){for(var b,c=k.hash(),d=a.length,e=[];d--;)b=a[d],c[b]||(c[b]=1,e.push(b));return e},toFragment:function(a){if("string"!=typeof a)return a;if("#"===a.charAt(0)){var b=document.getElementById(a.slice(1));if(!b)return;a=b.innerHTML}var c,d=document.createElement("div"),e=document.createDocumentFragment();for(d.innerHTML=a.trim();c=d.firstChild;)e.appendChild(c);return e},toConstructor:function(a){return e=e||b("./viewmodel"),"Object"===k.typeOf(a)?e.extend(a):"function"==typeof a?a:null},isConstructor:function(a){return e=e||b("./viewmodel"),a.prototype instanceof e||a===e},processOptions:function(a){var b,c=a.components,d=a.partials,e=a.template,f=a.elements;if(c)for(b in c)c[b]=k.toConstructor(c[b]);if(f)for(b in f)f[b]=k.toConstructor(f[b]);if(d)for(b in d)d[b]=k.toFragment(d[b]);e&&(a.template=k.toFragment(e))},log:function(){f.debug&&j&&j.log(i.call(arguments," "))},warn:function(){!f.silent&&j&&(j.trace(),j.warn(i.call(arguments," ")))}}}),a.register("vue/src/compiler.js",function(a,b,c){function d(a,b){var c=this;c.init=!0,b=c.options=b||t(),j.processOptions(b),j.extend(c,b.compilerOptions);var d=c.setupElement(b);s("\nnew VM instance:",d.tagName,"\n");var e=b.scope;e&&j.extend(a,e,!0),c.vm=a,u(a,"$",t()),u(a,"$el",d),u(a,"$compiler",c),c.dirs=[],c.exps=[],c.childCompilers=[],c.emitter=new g;var i=c.observables=[],k=c.computed=[],l=c.parentCompiler;c.bindings=l?Object.create(l.bindings):t(),c.rootCompiler=l?f(l):c;var m=j.attr(d,"id");l&&(u(a,"$parent",l.vm),m&&(c.childId=m,l.vm.$[m]=a)),c.setupObserver(),b.init&&b.init.apply(a,b.args||[]);var o,p;for(o in a)p=o.charAt(0),"$"!==p&&"_"!==p&&c.createBinding(o);c.repeat&&(a.$index=c.repeatIndex,u(a,"$collection",c.repeatCollection),c.createBinding("$index")),c.compile(d,!0);for(var q,r=i.length;r--;)q=i[r],h.observe(q.value,q.key,c.observer);k.length&&n.parse(k),c.init=!1}function e(a,b){if(a.nesting)for(var c=a.nesting;b.parentCompiler&&c--;)b=b.parentCompiler;else if(a.root)for(;b.parentCompiler;)b=b.parentCompiler;return b}function f(a){return e({root:!0},a)}var g=b("./emitter"),h=b("./observer"),i=b("./config"),j=b("./utils"),k=b("./binding"),l=b("./directive"),m=b("./text-parser"),n=b("./deps-parser"),o=b("./exp-parser"),p=b("./transition"),q=n.observer,r=Array.prototype.slice,s=j.log,t=j.hash,u=j.defProtected,v=Object.prototype.hasOwnProperty,w=d.prototype;w.setupElement=function(a){var b=this.el="string"==typeof a.el?document.querySelector(a.el):a.el||document.createElement(a.tagName||"div"),c=a.template;if(c)if(a.replace&&1===c.childNodes.length){var d=c.childNodes[0].cloneNode(!0);b.parentNode&&(b.parentNode.insertBefore(d,b),b.parentNode.removeChild(b)),b=d}else b.innerHTML="",b.appendChild(c.cloneNode(!0));a.id&&(b.id=a.id),a.className&&(b.className=a.className);var e=a.attributes;if(e)for(var f in e)b.setAttribute(f,e[f]);return b},w.setupObserver=function(){function a(a){c[a]||b.createBinding(a)}var b=this,c=b.bindings,d=b.observer=new g;d.proxies=t(),d.on("get",function(b){a(b),q.emit("get",c[b])}).on("set",function(b,e){d.emit("change:"+b,e),a(b),c[b].update(e)}).on("mutate",function(b,e,f){d.emit("change:"+b,e,f),a(b),c[b].pub()})},w.compile=function(a,b){function c(b){if(j.isConstructor(b)){var c=new b({el:a,child:!0,compilerOptions:{parentCompiler:d}});d.childCompilers.push(c.$compiler)}else b(a)}var d=this;if(1===a.nodeType){if(null!==j.attr(a,"pre"))return;var e,f,g,h=d.getOption("elements",a.tagName.toLowerCase());if(e=j.attr(a,"repeat")){var k=l.parse(i.attrs.repeat,e,d,a);k&&d.bindDirective(k)}else if(!b&&h)c(h);else if(!b&&(f=j.attr(a,"component"))){var m=d.getOption("components",f);m&&c(m)}else{if(a.vue_trans=j.attr(a,"transition"),g=j.attr(a,"partial")){var n=d.getOption("partials",g);n&&(a.innerHTML="",a.appendChild(n.cloneNode(!0)))}d.compileNode(a)}}else 3===a.nodeType&&d.compileTextNode(a)},w.compileNode=function(a){var b,c,d=a.attributes;if(d&&d.length){var e,f,g,h;for(b=d.length;b--;){for(e=d[b],f=!1,g=l.split(e.value),c=g.length;c--;){h=g[c];var i=l.parse(e.name,h,this,a);i&&(f=!0,this.bindDirective(i))}f&&a.removeAttribute(e.name)}}if(a.childNodes.length){var j=r.call(a.childNodes);for(b=0,c=j.length;c>b;b++)this.compile(j[b])}},w.compileTextNode=function(a){var b=m.parse(a.nodeValue);if(b){for(var c,d,e,f=i.attrs.text,g=0,h=b.length;h>g;g++){if(d=b[g],d.key)if(">"===d.key.charAt(0)){var j=d.key.slice(1).trim(),k=this.getOption("partials",j);k&&(c=k.cloneNode(!0),this.compileNode(c))}else c=document.createTextNode(""),e=l.parse(f,d.key,this,c),e&&this.bindDirective(e);else c=document.createTextNode(d);a.parentNode.insertBefore(c,a)}a.parentNode.removeChild(a)}},w.bindDirective=function(a){if(this.dirs.push(a),a.isSimple)return a.bind&&a.bind(),void 0;var b,c=this,d=a.key,f=d.split(".")[0],g=e(a,c);b=a.isExp?c.createBinding(d,!0,a.isFn):g.vm.hasOwnProperty(f)?v.call(g.bindings,d)?g.bindings[d]:g.createBinding(d):g.bindings[d]||c.rootCompiler.createBinding(d),b.instances.push(a),a.binding=b;var h=b.value;a.bind&&a.bind(h),void 0!==h&&(b.isComputed?a.refresh(h):a.update(h,!0))},w.createBinding=function(a,b,c){var d=this,e=d.bindings,f=new k(d,a,b,c);if(b){var g=o.parse(a,d);g&&(s(" created expression binding: "+a),f.value=c?g:{$get:g},d.markComputed(f),d.exps.push(f))}else if(s(" created binding: "+a),e[a]=f,h.ensurePath(d.vm,a),f.root)d.define(a,f);else{var i=a.slice(0,a.lastIndexOf("."));v.call(e,i)||d.createBinding(i)}return f},w.define=function(a,b){s(" defined root binding: "+a);var c=this,d=c.vm,e=c.observer,f=b.value=d[a],g=j.typeOf(f);"Object"===g&&f.$get?c.markComputed(b):("Object"===g||"Array"===g)&&c.observables.push(b),Object.defineProperty(d,a,{enumerable:!0,get:function(){var c=b.value;return(!q.active||b.isComputed||c&&c.__observer__)&&!Array.isArray(c)||e.emit("get",a),b.isComputed?c.$get():c},set:function(d){var f=b.value;b.isComputed?f.$set&&f.$set(d):d!==f&&(h.unobserve(f,a,e),b.value=d,e.emit("set",a,d),h.ensurePaths(a,d,c.bindings),h.observe(d,a,e))}})},w.markComputed=function(a){var b=a.value,c=this.vm;a.isComputed=!0,a.isFn?a.value=j.bind(b,c):(b.$get=j.bind(b.$get,c),b.$set&&(b.$set=j.bind(b.$set,c))),this.computed.push(a)},w.getOption=function(a,b){var c=this.options;return c[a]&&c[a][b]||j[a]&&j[a][b]},w.destroy=function(){var a,b,c,d,e,f=this,g=f.el,i=f.dirs,j=f.exps,k=f.bindings,l=f.options.teardown;for(l&&l(),f.observer.off(),f.emitter.off(),a=i.length;a--;)c=i[a],c.isSimple||c.binding.compiler===f||(d=c.binding.instances,d&&d.splice(d.indexOf(c),1)),c.unbind();for(a=j.length;a--;)j[a].unbind();for(b in k)v.call(k,b)&&(e=k[b],e.root&&h.unobserve(e.value,e.key,f.observer),e.unbind());var m=f.parentCompiler,n=f.childId;m&&(m.childCompilers.splice(m.childCompilers.indexOf(f),1),n&&delete m.vm.$[n]),g===document.body?g.innerHTML="":g.parentNode&&p(g,-1,function(){g.parentNode.removeChild(g)},this)},c.exports=d}),a.register("vue/src/viewmodel.js",function(a,b,c){function d(a){new f(this,a)}function e(a,b){var c=b[0],d=a.$compiler.bindings[c];return d?d.compiler.vm:null}var f=b("./compiler"),g=b("./utils").defProtected,h=d.prototype;g(h,"$set",function(a,b){var c=a.split("."),d=e(this,c);if(d){for(var f=0,g=c.length-1;g>f;f++)d=d[c[f]];d[c[f]]=b}}),g(h,"$watch",function(a,b){this.$compiler.observer.on("change:"+a,b)}),g(h,"$unwatch",function(a,b){var c=["change:"+a],d=this.$compiler.observer;b&&c.push(b),d.off.apply(d,c)}),g(h,"$destroy",function(){this.$compiler.destroy()}),g(h,"$broadcast",function(){for(var a,b=this.$compiler.childCompilers,c=b.length;c--;)a=b[c],a.emitter.emit.apply(a.emitter,arguments),a.vm.$broadcast.apply(a.vm,arguments)}),g(h,"$emit",function(){var a=this.$compiler,b=a.emitter,c=a.parentCompiler;b.emit.apply(b,arguments),c&&(c.emitter.emit.apply(c.emitter,arguments),c.vm.$emit.apply(c.vm,arguments))}),["on","off","once"].forEach(function(a){g(h,"$"+a,function(){var b=this.$compiler.emitter;b[a].apply(b,arguments)})}),c.exports=d}),a.register("vue/src/binding.js",function(a,b,c){function d(a,b,c,d){this.value=void 0,this.isExp=!!c,this.isFn=d,this.root=!this.isExp&&-1===b.indexOf("."),this.compiler=a,this.key=b,this.instances=[],this.subs=[],this.deps=[]}var e=d.prototype;e.update=function(a){this.value=a;for(var b=this.instances.length;b--;)this.instances[b].update(a);this.pub()},e.refresh=function(){for(var a=this.instances.length;a--;)this.instances[a].refresh();this.pub()},e.pub=function(){for(var a=this.subs.length;a--;)this.subs[a].refresh()},e.unbind=function(){for(var a=this.instances.length;a--;)this.instances[a].unbind();a=this.deps.length;for(var b;a--;)b=this.deps[a].subs,b.splice(b.indexOf(this),1)},c.exports=d}),a.register("vue/src/observer.js",function(a,b,c){function d(a,b,c){var d=o(a);"Object"===d?e(a,b,c):"Array"===d&&f(a,b,c)}function e(a,b,c){for(var d in a){var e=d.charAt(0);"$"!==e&&"_"!==e&&g(a,d,b,c)}}function f(a,b,c){if(p(a,"__observer__",c),c.path=b,s)a.__proto__=t;else for(var d in t)p(a,d,t[d])}function g(a,b,c,e){var f=a[b],g=h(f),i=e.values,k=(c?c+".":"")+b;i[k]=f,e.emit("set",k,f),Object.defineProperty(a,b,{enumerable:!0,get:function(){return n.active&&!g&&e.emit("get",k),i[k]},set:function(a){i[k]=a,j(b,a,i),e.emit("set",k,a),d(a,k,e)}}),d(f,k,e)}function h(a){var b=o(a);return"Object"===b||"Array"===b}function i(a,b,c){if("Array"===o(a))c("length",a.length);else{var d,e,f=b.values;for(d in b.values)e=f[d],c(d,e)}}function j(a,b,c){a+=".";for(var d in c)d.indexOf(a)||k(b,d.replace(a,""))}function k(a,b){if("Object"===o(a)){for(var c,d=b.split("."),e=0,f=d.length-1;f>e;e++)c=d[e],a[c]||(a[c]={}),a=a[c];"Object"===o(a)&&(c=d[e],c in a||(a[c]=void 0))}}var l=b("./emitter"),m=b("./utils"),n=b("./deps-parser").observer,o=m.typeOf,p=m.defProtected,q=Array.prototype.slice,r=["push","pop","shift","unshift","splice","sort","reverse"],s={}.__proto__,t=Object.create(Array.prototype);r.forEach(function(a){p(t,a,function(){var b=Array.prototype[a].apply(this,arguments);return this.__observer__.emit("mutate",this.__observer__.path,this,{method:a,args:q.call(arguments),result:b}),b},!s)});var u={remove:function(a){if("function"==typeof a){for(var b=this.length,c=[];b--;)a(this[b])&&c.push(this.splice(b,1)[0]);return c.reverse()}return"number"!=typeof a&&(a=this.indexOf(a)),a>-1?this.splice(a,1)[0]:void 0},replace:function(a,b){if("function"==typeof a){for(var c,d=this.length,e=[];d--;)c=a(this[d]),void 0!==c&&e.push(this.splice(d,1,c)[0]);return e.reverse()}return"number"!=typeof a&&(a=this.indexOf(a)),a>-1?this.splice(a,1,b)[0]:void 0}};for(var v in u)p(t,v,u[v],!s);c.exports={watchArray:f,ensurePath:k,ensurePaths:j,observe:function(a,b,c){if(h(a)){var e,f=b+".",g=!!a.__observer__;g||p(a,"__observer__",new l),e=a.__observer__,e.values=e.values||m.hash();var j=c.proxies[f]={get:function(a){c.emit("get",f+a)},set:function(a,b){c.emit("set",f+a,b)},mutate:function(a,d,e){var g=a?f+a:b;c.emit("mutate",g,d,e);var h=e.method;"sort"!==h&&"reverse"!==h&&c.emit("set",g+".length",d.length)}};e.on("get",j.get).on("set",j.set).on("mutate",j.mutate),g?i(a,e,j.set):d(a,null,e)}},unobserve:function(a,b,c){if(a&&a.__observer__){b+=".";var d=c.proxies[b];a.__observer__.off("get",d.get).off("set",d.set).off("mutate",d.mutate),c.proxies[b]=null}}}}),a.register("vue/src/directive.js",function(a,b,c){function d(a,b,c,d,g){this.compiler=d,this.vm=d.vm,this.el=g;var h=""===b;if("function"==typeof a)this[h?"bind":"_update"]=a;else for(var i in a)"unbind"===i||"update"===i?this["_"+i]=a[i]:this[i]=a[i];if(h)return this.isSimple=!0,void 0;this.expression=b.trim(),this.rawKey=c,e(this,c),this.isExp=!q.test(this.key);var j=this.expression.slice(c.length).match(n);if(j){this.filters=[];for(var k,l=0,m=j.length;m>l;l++)k=f(j[l],this.compiler),k&&this.filters.push(k);this.filters.length||(this.filters=null)}else this.filters=null}function e(a,b){var c=b;if(b.indexOf(":")>-1){var d=b.match(m);c=d?d[2].trim():c,a.arg=d?d[1].trim():null}var e=c.charAt(0);a.root="*"===e,a.nesting="^"===e?c.match(p)[0].length:!1,a.nesting?c=c.slice(a.nesting):a.root&&(c=c.slice(1)),a.key=c}function f(a,b){var c=a.slice(1).match(o);if(c){c=c.map(function(a){return a.replace(/'/g,"").trim()});var d=c[0],e=b.getOption("filters",d)||j[d];return e?{name:d,apply:e,args:c.length>1?c.slice(1):null}:(h.warn("Unknown filter: "+d),void 0)}}var g=b("./config"),h=b("./utils"),i=b("./directives"),j=b("./filters"),k=/(?:['"](?:\\.|[^'"])*['"]|\((?:\\.|[^\)])*\)|\\.|[^,])+/g,l=/^(?:['"](?:\\.|[^'"])*['"]|\\.|[^\|]|\|\|)+/,m=/^([\w- ]+):(.+)$/,n=/\|[^\|]+/g,o=/[^\s']+|'[^']+'/g,p=/^\^+/,q=/^[\w\.\$]+$/,r=d.prototype;r.update=function(a,b){(b||a!==this.value)&&(this.value=a,this.apply(a))},r.refresh=function(a){if(a&&(this.value=a),this.isFn)a=this.value;else{if(a=this.value.$get(),void 0!==a&&a===this.computedValue)return;this.computedValue=a}this.apply(a)},r.apply=function(a){this._update(this.filters?this.applyFilters(a):a)},r.applyFilters=function(a){for(var b,c=a,d=0,e=this.filters.length;e>d;d++)b=this.filters[d],c=b.apply.call(this.vm,c,b.args);return c},r.unbind=function(a){this.el&&(this._unbind&&this._unbind(a),a||(this.vm=this.el=this.binding=this.compiler=null))},d.split=function(a){return a.indexOf(",")>-1?a.match(k)||[""]:[a]},d.parse=function(a,b,c,e){var f=g.prefix+"-";if(0===a.indexOf(f)){a=a.slice(f.length);var j=c.getOption("directives",a)||i[a];if(!j)return h.warn("unknown directive: "+a);var k;if(b.indexOf("|")>-1){var m=b.match(l);m&&(k=m[0].trim())}else k=b.trim();return k||""===b?new d(j,b,k,c,e):h.warn("invalid directive expression: "+b)}},c.exports=d}),a.register("vue/src/exp-parser.js",function(a,b,c){function d(a){return a=a.replace(l,"").replace(m,",").replace(k,"").replace(n,"").replace(o,""),a?a.split(/,+/):[]}function e(a,b){for(var c="",d=b.vm,e=a.indexOf("."),f=e>-1?a.slice(0,e):a;;){if(i.call(d,f))break;if(!d.$parent)break;d=d.$parent,c+="$parent."}return b=d.$compiler,i.call(b.bindings,a)||"$"===a.charAt(0)||b.createBinding(a),c}function f(a,b){var c;try{c=new Function(a)}catch(d){h.warn("Invalid expression: "+b)}return c}function g(a){return"$"===a.charAt(0)?"\\"+a:a}var h=b("./utils"),i=Object.prototype.hasOwnProperty,j="break,case,catch,continue,debugger,default,delete,do,else,false,finally,for,function,if,in,instanceof,new,null,return,switch,this,throw,true,try,typeof,var,void,while,with,undefined,abstract,boolean,byte,char,class,const,double,enum,export,extends,final,float,goto,implements,import,int,interface,long,native,package,private,protected,public,short,static,super,synchronized,throws,transient,volatile,arguments,let,yield,Math",k=new RegExp(["\\b"+j.replace(/,/g,"\\b|\\b")+"\\b"].join("|"),"g"),l=/\/\*(?:.|\n)*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|'[^']*'|"[^"]*"|[\s\t\n]*\.[\s\t\n]*[$\w\.]+/g,m=/[^\w$]+/g,n=/\b\d[^,]*/g,o=/^,+|,+$/g;c.exports={parse:function(a,b){var c=d(a);if(!c.length)return f("return "+a,a);c=h.unique(c);var i="",j=new RegExp("[^$\\w\\.]("+c.map(g).join("|")+")[$\\w\\.]*\\b","g"),k=("return "+a).replace(j,function(a){var c=a.charAt(0);a=a.slice(1);var d="this."+e(a,b)+a;return i+=d+";",c+d});return k=i+k,f(k,a)}}}),a.register("vue/src/text-parser.js",function(a,b,c){var d=/\{\{(.+?)\}\}/;c.exports={parse:function(a){if(!d.test(a))return null;for(var b,c,e=[];b=a.match(d);)c=b.index,c>0&&e.push(a.slice(0,c)),e.push({key:b[1].trim()}),a=a.slice(c+b[0].length);return a.length&&e.push(a),e}}}),a.register("vue/src/deps-parser.js",function(a,b,c){function d(a){if(!a.isFn){f.log("\n─ "+a.key);var b=f.hash();g.on("get",function(c){b[c.key]||(b[c.key]=1,f.log(" └─ "+c.key),a.deps.push(c),c.subs.push(a))}),a.value.$get(),g.off("get")}}var e=b("./emitter"),f=b("./utils"),g=new e;c.exports={observer:g,parse:function(a){f.log("\nparsing dependencies..."),g.active=!0,a.forEach(d),g.active=!1,f.log("\ndone.")}}}),a.register("vue/src/filters.js",function(a,b,c){var d={enter:13,tab:9,"delete":46,up:38,left:37,right:39,down:40,esc:27};c.exports={capitalize:function(a){return a||0===a?(a=a.toString(),a.charAt(0).toUpperCase()+a.slice(1)):""},uppercase:function(a){return a||0===a?a.toString().toUpperCase():""},lowercase:function(a){return a||0===a?a.toString().toLowerCase():""},currency:function(a,b){if(!a&&0!==a)return"";var c=b&&b[0]||"$",d=Math.floor(a).toString(),e=d.length%3,f=e>0?d.slice(0,e)+(d.length>3?",":""):"",g="."+a.toFixed(2).slice(-2);return c+f+d.slice(e).replace(/(\d{3})(?=\d)/g,"$1,")+g},pluralize:function(a,b){return b.length>1?b[a-1]||b[b.length-1]:b[a-1]||b[0]+"s"},key:function(a,b){if(a){var c=d[b[0]];return c||(c=parseInt(b[0],10)),function(b){b.keyCode===c&&a.call(this,b)}}}}}),a.register("vue/src/transition.js",function(a,b,c){function d(a,b,c){if(!g)return c(),k.CSS_SKIP;var d=a.classList,e=a.vue_trans_cb;if(b>0){e&&(a.removeEventListener(g,e),a.vue_trans_cb=null),d.add(i),c();{a.clientHeight}return d.remove(i),k.CSS_E}d.add(j);var f=function(b){b.target===a&&(a.removeEventListener(g,f),a.vue_trans_cb=null,c(),d.remove(j))};return a.addEventListener(g,f),a.vue_trans_cb=f,k.CSS_L}function e(a,b,c,d,e){var f=e.getOption("transitions",d);if(!f)return c(),k.JS_SKIP;var g=f.enter,h=f.leave;return b>0?"function"!=typeof g?(c(),k.JS_SKIP_E):(g(a,c),k.JS_E):"function"!=typeof h?(c(),k.JS_SKIP_L):(h(a,c),k.JS_L)}function f(){var a=document.createElement("vue"),b="transitionend",c={transition:b,MozTransition:b,WebkitTransition:"webkitTransitionEnd"};for(var d in c)if(void 0!==a.style[d])return c[d]}var g=f(),h=b("./config"),i=h.enterClass,j=h.leaveClass,k={CSS_E:1,CSS_L:2,JS_E:3,JS_L:4,CSS_SKIP:-1,JS_SKIP:-2,JS_SKIP_E:-3,JS_SKIP_L:-4,INIT:-5,SKIP:-6},l=c.exports=function(a,b,c,f){if(f.init)return c(),k.INIT;var g=a.vue_trans;return g?e(a,b,c,g,f):""===g?d(a,b,c):(c(),k.SKIP)};l.codes=k}),a.register("vue/src/directives/index.js",function(a,b,c){function d(a){return"-"===a.charAt(0)&&(a=a.slice(1)),a.replace(g,function(a,b){return b.toUpperCase()})}var e=b("../utils"),f=b("../transition");c.exports={on:b("./on"),repeat:b("./repeat"),model:b("./model"),"if":b("./if"),attr:function(a){this.el.setAttribute(this.arg,a)},text:function(a){this.el.textContent=e.toText(a)},html:function(a){this.el.innerHTML=e.toText(a)},visible:function(a){this.el.style.visibility=a?"":"hidden"},show:function(a){var b=this.el,c=a?"":"none",d=function(){b.style.display=c};f(b,a?1:-1,d,this.compiler)},"class":function(a){this.arg?this.el.classList[a?"add":"remove"](this.arg):(this.lastVal&&this.el.classList.remove(this.lastVal),a&&(this.el.classList.add(a),this.lastVal=a))},style:{bind:function(){this.arg=d(this.arg)},update:function(a){this.el.style[this.arg]=a}}};var g=/-(.)/g}),a.register("vue/src/directives/if.js",function(a,b,c){var d=b("../config"),e=b("../transition");c.exports={bind:function(){this.parent=this.el.parentNode,this.ref=document.createComment(d.prefix+"-if-"+this.key),this.el.vue_ref=this.ref},update:function(a){function b(){if(d.parentNode){var a=d.nextSibling;a?f.insertBefore(g,a):f.appendChild(g),f.removeChild(d)}}function c(){d.parentNode||(f.insertBefore(d,g),f.removeChild(g))}var d=this.el;if(!this.parent){if(!d.parentNode)return;this.parent=d.parentNode}var f=this.parent,g=this.ref,h=this.compiler;a?e(d,1,c,h):e(d,-1,b,h)},unbind:function(){this.el.vue_ref=null}}}),a.register("vue/src/directives/repeat.js",function(a,b,c){var d,e=b("../observer"),f=b("../emitter"),g=b("../utils"),h=b("../config"),i=b("../transition"),j={push:function(a){var b,c=a.args.length,d=this.collection.length-c;for(b=0;c>b;b++)this.buildItem(a.args[b],d+b)},pop:function(){var a=this.vms.pop();a&&a.$destroy()},unshift:function(a){var b,c=a.args.length;for(b=0;c>b;b++)this.buildItem(a.args[b],b)},shift:function(){var a=this.vms.shift();a&&a.$destroy()},splice:function(a){var b,c,d=a.args[0],e=a.args[1],f=a.args.length-2,g=this.vms.splice(d,e);for(b=0,c=g.length;c>b;b++)g[b].$destroy();for(b=0;f>b;b++)this.buildItem(a.args[b+2],d+b)},sort:function(){var a,b,c,d,e=this.arg,f=this.vms,g=this.collection,h=g.length,i=new Array(h);for(a=0;h>a;a++)for(d=g[a],b=0;h>b;b++)if(c=f[b],c[e]===d){i[a]=c;break}for(a=0;h>a;a++)this.container.insertBefore(i[a].$el,this.ref);this.vms=i},reverse:function(){var a=this.vms;a.reverse();for(var b=0,c=a.length;c>b;b++)this.container.insertBefore(a[b].$el,this.ref)}};c.exports={bind:function(){var a=this,c=a.el,e=a.container=c.parentNode;d=d||b("../viewmodel");var f=g.attr(c,"component");a.ChildVM=a.compiler.getOption("components",f)||d,a.hasTrans=c.hasAttribute(h.attrs.transition),a.ref=document.createComment(h.prefix+"-repeat-"+a.arg),e.insertBefore(a.ref,c),e.removeChild(c),a.initiated=!1,a.collection=null,a.vms=null,a.mutationListener=function(b,c,d){a.detach();var e=d.method;j[e].call(a,d),"push"!==e&&"pop"!==e&&a.updateIndexes(),a.retach()}},update:function(a){if(this.unbind(!0),this.container.vue_dHandlers=g.hash(),this.initiated||a&&a.length||(this.buildItem(),this.initiated=!0),a=this.collection=a||[],this.vms=[],a.__observer__||e.watchArray(a,null,new f),a.__observer__.on("mutate",this.mutationListener),a.length){this.detach();for(var b=0,c=a.length;c>b;b++)this.buildItem(a[b],b);this.retach()}},buildItem:function(a,b){var c,d,e=this.el.cloneNode(!0),f=this.container,h={};a&&(c=this.vms.length>b?this.vms[b].$el:this.ref,c.parentNode||(c=c.vue_ref),e.vue_trans=g.attr(e,"transition",!0),i(e,1,function(){f.insertBefore(e,c)},this.compiler)),h[this.arg]=a||{},d=new this.ChildVM({el:e,scope:h,compilerOptions:{repeat:!0,repeatIndex:b,repeatCollection:this.collection,repeatPrefix:this.arg,parentCompiler:this.compiler,delegator:f}}),a?this.vms.splice(b,0,d):d.$destroy()},updateIndexes:function(){for(var a=this.vms.length;a--;)this.vms[a].$index=a},detach:function(){if(!this.hasTrans){var a=this.container,b=this.parent=a.parentNode;this.next=a.nextSibling,b&&b.removeChild(a)}},retach:function(){if(!this.hasTrans){var a=this.next,b=this.parent,c=this.container;b&&(a?b.insertBefore(c,a):b.appendChild(c))}},unbind:function(){if(this.collection){this.collection.__observer__.off("mutate",this.mutationListener);for(var a=this.vms.length;a--;)this.vms[a].$destroy()}var b=this.container,c=b.vue_dHandlers;for(var d in c)b.removeEventListener(c[d].event,c[d]);b.vue_dHandlers=null}}}),a.register("vue/src/directives/on.js",function(a,b,c){function d(a,b,c){for(;a&&a!==b;){if(a[c])return a;a=a.parentNode}}var e=b("../utils");c.exports={isFn:!0,bind:function(){this.compiler.repeat&&(this.el[this.expression]=!0,this.el.vue_viewmodel=this.vm)},update:function(a){if(this.unbind(!0),"function"!=typeof a)return e.warn('Directive "on" expects a function value.');var b=this.compiler,c=this.arg,f=this.binding.compiler.vm;if(b.repeat&&!this.vm.constructor.super&&"blur"!==c&&"focus"!==c){var g=b.delegator,h=this.expression,i=g.vue_dHandlers[h];if(i)return;i=g.vue_dHandlers[h]=function(c){var e=d(c.target,g,h);e&&(c.el=e,c.vm=e.vue_viewmodel,c.item=c.vm[b.repeatPrefix],a.call(f,c))},i.event=c,g.addEventListener(c,i)}else{var j=this.vm;this.handler=function(c){c.el=c.currentTarget,c.vm=j,b.repeat&&(c.item=j[b.repeatPrefix]),a.call(f,c)},this.el.addEventListener(c,this.handler)}},unbind:function(a){this.el.removeEventListener(this.arg,this.handler),this.handler=null,a||(this.el.vue_viewmodel=null)}}}),a.register("vue/src/directives/model.js",function(a,b,c){var d=b("../utils"),e=navigator.userAgent.indexOf("MSIE 9.0")>0;c.exports={bind:function(){var a=this,b=a.el,c=b.type;a.lock=!1,a.event=a.compiler.options.lazy||"SELECT"===b.tagName||"checkbox"===c||"radio"===c?"change":"input";var d="checkbox"===c?"checked":"value";a.set=a.filters?function(){var c;try{c=b.selectionStart}catch(e){}setTimeout(function(){a.vm.$set(a.key,b[d]),void 0!==c&&b.setSelectionRange(c,c)},0)}:function(){a.lock=!0,a.vm.$set(a.key,b[d]),a.lock=!1},b.addEventListener(a.event,a.set),e&&(a.onCut=function(){setTimeout(function(){a.set()},0)},a.onDel=function(b){(46===b.keyCode||8===b.keyCode)&&a.set()},b.addEventListener("cut",a.onCut),b.addEventListener("keyup",a.onDel))},update:function(a){if(!this.lock){var b=this,c=b.el;if("SELECT"===c.tagName){for(var e=c.options,f=e.length,g=-1;f--;)if(e[f].value==a){g=f;break}e.selectedIndex=g}else"radio"===c.type?c.checked=a==c.value:"checkbox"===c.type?c.checked=!!a:c.value=d.toText(a)}},unbind:function(){this.el.removeEventListener(this.event,this.set),e&&(this.el.removeEventListener("cut",this.onCut),this.el.removeEventListener("keyup",this.onDel))}}}),a.alias("component-emitter/index.js","vue/deps/emitter/index.js"),a.alias("component-emitter/index.js","emitter/index.js"),a.alias("vue/src/main.js","vue/index.js"),"object"==typeof exports?module.exports=a("vue"):"function"==typeof define&&define.amd?define(function(){return a("vue")}):this.Vue=a("vue")}();