diff --git a/.gitignore b/.gitignore
index 625046f4e..a7862633d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,5 +3,5 @@
node_modules
components
explorations
-test/seed.test.js
-test/seed.test-cov.js
\ No newline at end of file
+test/vue.test.js
+test/vue.test-cov.js
\ No newline at end of file
diff --git a/.npmignore b/.npmignore
index be94db084..3bff68d48 100644
--- a/.npmignore
+++ b/.npmignore
@@ -6,6 +6,9 @@ components
node_modules
.jshintrc
.gitignore
+.travis.yml
+.sass-cache
+.npmignore
bower.json
component.json
Gruntfile.js
diff --git a/README.md b/README.md
index a59e037a0..8d8a0bd15 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
-# Seed.js
+# VueJS
-Modular & Lightweight JavaScript MVVM
+Data-driven, modular & lightweight ViewModels
-[](https://travis-ci.org/yyx990803/seed)
+[](https://travis-ci.org/yyx990803/vue)
## Features
@@ -27,15 +27,15 @@ Modular & Lightweight JavaScript MVVM
**Component**
- $ component install yyx990803/seed
+ $ component install yyx990803/vue
**Browserify**
- $ npm install seed-mvvm
+ $ npm install vue
**Bower**
- $ bower install seed
+ $ bower install vue
**Module Loaders, e.g. RequireJS, SeaJS**
@@ -43,7 +43,7 @@ Built versions in `/dist` or installed via Bower can be used directly as a Commo
**Standalone**
-Simply include a built version in `/dist` or installed via Bower with a script tag. `seed` will be registered as a global variable.
+Simply include a built version in `/dist` or installed via Bower with a script tag. `Vue` will be registered as a global variable.
## Development
@@ -74,20 +74,20 @@ $ grunt test
**HTML**
~~~ html
-
-
+
+
~~~
**JavaScript**
~~~ js
-new Seed({
+new Vue({
el: '#demo',
scope: {
hello: 'Hello World!',
changeText: function () {
- this.hello = 'Hello Seed!'
+ this.hello = 'Hello VueJS!'
}
}
})
diff --git a/dist/vue.js b/dist/vue.js
index 52b618eb2..0608c402c 100644
--- a/dist/vue.js
+++ b/dist/vue.js
@@ -200,23 +200,8 @@ require.relative = function(parent) {
return localRequire;
};
-require.register("component-indexof/index.js", function(exports, require, module){
-module.exports = function(arr, obj){
- if (arr.indexOf) return arr.indexOf(obj);
- for (var i = 0; i < arr.length; ++i) {
- if (arr[i] === obj) return i;
- }
- return -1;
-};
-});
require.register("component-emitter/index.js", function(exports, require, module){
-/**
- * Module dependencies.
- */
-
-var index = require('indexof');
-
/**
* Expose `Emitter`.
*/
@@ -257,7 +242,8 @@ function mixin(obj) {
* @api public
*/
-Emitter.prototype.on = function(event, fn){
+Emitter.prototype.on =
+Emitter.prototype.addEventListener = function(event, fn){
this._callbacks = this._callbacks || {};
(this._callbacks[event] = this._callbacks[event] || [])
.push(fn);
@@ -283,7 +269,7 @@ Emitter.prototype.once = function(event, fn){
fn.apply(this, arguments);
}
- fn._off = on;
+ on.fn = fn;
this.on(event, on);
return this;
};
@@ -300,7 +286,8 @@ Emitter.prototype.once = function(event, fn){
Emitter.prototype.off =
Emitter.prototype.removeListener =
-Emitter.prototype.removeAllListeners = function(event, fn){
+Emitter.prototype.removeAllListeners =
+Emitter.prototype.removeEventListener = function(event, fn){
this._callbacks = this._callbacks || {};
// all
@@ -320,8 +307,14 @@ Emitter.prototype.removeAllListeners = function(event, fn){
}
// remove specific handler
- var i = index(callbacks, fn._off || fn);
- if (~i) callbacks.splice(i, 1);
+ var cb;
+ for (var i = 0; i < callbacks.length; i++) {
+ cb = callbacks[i];
+ if (cb === fn || cb.fn === fn) {
+ callbacks.splice(i, 1);
+ break;
+ }
+ }
return this;
};
@@ -548,9 +541,17 @@ try {
// unable to parse the dependency, thus preventing it from
// stopping the compilation after a failed lookup.
Emitter = require(componentEmitter)
-} catch (e) {}
+} catch (e) {
+ Emitter = require('events').EventEmitter
+ Emitter.prototype.off = function () {
+ var method = arguments.length > 1
+ ? this.removeListener
+ : this.removeAllListeners
+ return method.apply(this, arguments)
+ }
+}
-module.exports = Emitter || require('events').EventEmitter
+module.exports = Emitter
});
require.register("vue/src/config.js", function(exports, require, module){
module.exports = {
@@ -3170,7 +3171,6 @@ module.exports = {
});
require.alias("component-emitter/index.js", "vue/deps/emitter/index.js");
require.alias("component-emitter/index.js", "emitter/index.js");
-require.alias("component-indexof/index.js", "component-emitter/deps/indexof/index.js");
require.alias("vue/src/main.js", "vue/index.js");if (typeof exports == "object") {
module.exports = require("vue");
diff --git a/dist/vue.min.js b/dist/vue.min.js
index 28e18b879..c20d6406d 100644
--- a/dist/vue.min.js
+++ b/dist/vue.min.js
@@ -1,4 +1,4 @@
// 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;dd;++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){}c.exports=d||b("events").EventEmitter}),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("component-indexof/index.js","component-emitter/deps/indexof/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")}();
\ No newline at end of file
+!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;dd;++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")}();
\ No newline at end of file
diff --git a/src/emitter.js b/src/emitter.js
index 218622c38..2604f78c2 100644
--- a/src/emitter.js
+++ b/src/emitter.js
@@ -7,6 +7,14 @@ try {
// unable to parse the dependency, thus preventing it from
// stopping the compilation after a failed lookup.
Emitter = require(componentEmitter)
-} catch (e) {}
+} catch (e) {
+ Emitter = require('events').EventEmitter
+ Emitter.prototype.off = function () {
+ var method = arguments.length > 1
+ ? this.removeListener
+ : this.removeAllListeners
+ return method.apply(this, arguments)
+ }
+}
-module.exports = Emitter || require('events').EventEmitter
\ No newline at end of file
+module.exports = Emitter
\ No newline at end of file
diff --git a/test/vue.test-cov.js b/test/vue.test-cov.js
deleted file mode 100644
index 927570687..000000000
--- a/test/vue.test-cov.js
+++ /dev/null
@@ -1,3272 +0,0 @@
-// instrument by jscoverage, do not modifly this file
-(function () {
- var BASE;
- if (typeof global === 'object') {
- BASE = global;
- } else if (typeof window === 'object') {
- BASE = window;
- } else {
- throw new Error('[jscoverage] unknow ENV!');
- }
- if (!BASE._$jscoverage) {
- BASE._$jscoverage = {};
- BASE._$jscoverage_cond = {};
- BASE._$jscoverage_done = function (file, line, express) {
- if (arguments.length === 2) {
- BASE._$jscoverage[file][line] ++;
- } else {
- BASE._$jscoverage_cond[file][line] ++;
- return express;
- }
- };
- BASE._$jscoverage_init = function (base, file, lines) {
- var tmp = [];
- for (var i = 0; i < lines.length; i ++) {
- tmp[lines[i]] = 0;
- }
- base[file] = tmp;
- };
- }
-})();
-_$jscoverage_init(_$jscoverage, "./test/vue.test.js",[11,14,15,16,17,18,19,20,21,24,29,30,31,32,33,34,35,36,39,46,52,68,69,69,71,79,80,81,81,82,82,95,96,98,98,100,101,103,104,105,106,107,111,122,123,134,135,136,138,149,150,157,158,159,159,161,169,170,177,178,179,179,180,180,185,186,187,187,188,189,196,197,200,202,203,204,204,205,206,206,208,211,217,223,232,232,244,245,247,259,260,261,263,276,277,278,281,282,285,286,287,300,303,306,307,308,312,313,313,316,317,318,322,323,323,324,335,336,337,340,341,342,343,347,358,359,360,371,372,376,377,386,387,388,389,389,391,397,398,398,399,400,406,407,407,408,409,415,416,416,417,418,424,425,425,426,427,433,434,434,435,436,442,443,443,444,445,448,456,459,460,462,463,464,468,469,472,473,474,475,476,482,483,484,485,502,503,503,504,505,505,506,507,508,509,512,519,530,534,537,538,540,542,545,549,552,554,555,566,567,579,582,597,599,599,600,609,609,610,622,630,631,641,652,653,653,654,662,665,666,667,667,668,669,671,678,679,681,682,683,683,684,686,689,691,692,694,702,703,711,712,719,724,725,726,729,730,731,734,735,736,739,740,748,749,757,758,759,764,765,790,794,797,798,799,802,803,806,807,807,809,810,811,812,816,817,818,819,824,828,829,832,838,839,840,841,842,843,848,851,852,856,857,858,859,860,866,867,868,869,874,879,880,881,882,885,885,888,891,897,899,903,904,907,908,909,910,911,913,915,916,921,921,922,922,923,924,925,926,930,938,940,946,949,951,952,955,956,957,960,961,962,966,967,975,977,979,982,982,985,999,1002,1003,1004,1008,1010,1013,1015,1016,1016,1021,1024,1025,1026,1027,1028,1029,1034,1037,1039,1044,1045,1052,1055,1063,1064,1066,1067,1069,1070,1071,1072,1073,1076,1077,1078,1079,1080,1081,1082,1085,1085,1089,1090,1091,1092,1100,1101,1102,1102,1103,1105,1106,1107,1108,1109,1111,1112,1113,1116,1117,1118,1119,1123,1125,1127,1133,1136,1140,1141,1141,1142,1146,1152,1154,1155,1159,1166,1169,1170,1172,1174,1175,1179,1180,1181,1183,1191,1193,1197,1200,1201,1202,1203,1206,1207,1210,1211,1214,1215,1217,1219,1220,1223,1227,1234,1236,1238,1244,1246,1247,1251,1254,1257,1258,1262,1264,1269,1270,1271,1272,1274,1276,1278,1279,1280,1283,1292,1293,1295,1297,1298,1300,1301,1302,1306,1312,1313,1314,1320,1322,1331,1331,1334,1335,1338,1339,1340,1344,1345,1346,1346,1348,1352,1353,1354,1358,1359,1360,1361,1362,1364,1369,1371,1372,1373,1374,1379,1380,1381,1382,1383,1394,1395,1396,1397,1399,1400,1401,1404,1411,1414,1416,1417,1427,1432,1438,1439,1441,1441,1442,1443,1445,1452,1453,1459,1463,1465,1465,1466,1472,1473,1479,1480,1483,1484,1485,1486,1493,1494,1497,1498,1499,1500,1507,1508,1509,1510,1519,1521,1526,1528,1537,1538,1539,1540,1541,1542,1543,1544,1545,1548,1553,1554,1555,1556,1557,1559,1566,1567,1568,1569,1571,1578,1579,1580,1581,1588,1589,1590,1591,1593,1594,1595,1596,1597,1601,1603,1606,1626,1629,1630,1631,1632,1637,1642,1644,1645,1647,1648,1649,1652,1654,1655,1657,1658,1663,1664,1667,1668,1669,1670,1673,1675,1676,1678,1679,1685,1686,1693,1694,1695,1696,1697,1705,1706,1707,1708,1718,1719,1720,1721,1723,1724,1735,1739,1743,1744,1748,1749,1751,1754,1755,1756,1757,1760,1767,1768,1778,1779,1781,1782,1783,1784,1796,1797,1798,1799,1809,1809,1810,1811,1812,1813,1813,1814,1816,1817,1818,1818,1822,1834,1835,1837,1838,1840,1841,1842,1844,1847,1852,1853,1855,1856,1857,1861,1865,1866,1868,1877,1877,1878,1879,1880,1884,1888,1889,1915,1916,1917,1919,1922,1923,1925,1926,1927,1929,1935,1936,1937,1940,1941,1943,1945,1947,1948,1949,1950,1951,1952,1953,1953,1955,1955,1957,1961,1968,1969,1970,1971,1974,1980,1981,1982,1986,1987,1988,1989,1992,2000,2001,2001,2002,2003,2006,2008,2009,2010,2013,2027,2028,2028,2029,2030,2037,2040,2040,2042,2043,2045,2046,2046,2047,2049,2055,2056,2066,2067,2068,2069,2070,2072,2082,2084,2084,2085,2085,2086,2086,2095,2096,2105,2107,2108,2108,2109,2111,2112,2112,2114,2115,2116,2117,2118,2121,2125,2130,2132,2133,2138,2163,2169,2186,2192,2193,2194,2196,2197,2198,2200,2204,2205,2209,2211,2221,2222,2223,2225,2227,2234,2239,2248,2249,2250,2252,2253,2264,2265,2266,2267,2269,2271,2272,2276,2277,2279,2285,2285,2286,2288,2289,2290,2290,2291,2292,2294,2294,2295,2300,2301,2310,2310,2311,2312,2313,2314,2314,2315,2316,2317,2318,2320,2321,2324,2335,2336,2337,2338,2339,2344,2345,2356,2362,2362,2363,2364,2371,2380,2389,2389,2390,2395,2408,2418,2418,2419,2420,2421,2423,2424,2425,2431,2432,2455,2457,2458,2459,2462,2464,2465,2472,2473,2479,2480,2485,2492,2493,2494,2497,2500,2503,2504,2505,2509,2511,2514,2516,2517,2522,2523,2524,2525,2526,2528,2529,2533,2534,2535,2543,2544,2545,2546,2549,2552,2553,2554,2555,2557,2558,2560,2561,2562,2564,2565,2574,2581,2582,2583,2588,2589,2592,2600,2604,2608,2612,2616,2619,2621,2625,2626,2628,2629,2631,2632,2633,2640,2643,2651,2653,2653,2654,2655,2659,2660,2663,2666,2667,2668,2673,2675,2676,2677,2679,2684,2688,2689,2691,2695,2695,2697,2698,2699,2701,2703,2707,2707,2708,2709,2714,2718,2719,2730,2733,2735,2736,2741,2742,2742,2746,2747,2748,2753,2754,2754,2758,2763,2764,2766,2767,2772,2778,2779,2780,2781,2782,2783,2784,2788,2789,2791,2795,2796,2797,2798,2803,2807,2812,2813,2814,2817,2820,2821,2822,2824,2825,2826,2827,2828,2829,2830,2831,2832,2834,2841,2843,2847,2848,2849,2851,2852,2856,2856,2857,2860,2861,2862,2863,2865,2876,2883,2884,2888,2888,2890,2891,2892,2897,2898,2911,2914,2916,2924,2925,2926,2935,2935,2936,2938,2939,2939,2943,2943,2944,2947,2947,2948,2949,2951,2956,2957,2958,2959,2960,2963,2965,2966,2968,2972,2973,2976,2977,2977,2978,2982,2987,2990,2992,2997,2998,2999,3002,3006,3014,3018,3018,3021,3022,3023,3024,3025,3026,3027,3030,3031,3036,3037,3038,3039,3040,3041,3043,3045,3051,3052,3053,3053,3057,3058,3061,3065,3069,3072,3081,3086,3094,3095,3096,3101,3102,3103,3104,3110,3111,3112,3114,3118,3119,3121,3122,3125,3126,3127,3130,3131,3136,3136,3138,3140,3142,3145,3146,3147,3148,3151,3152,3153,3154,3155,3157,3162,3163,3164,3165,3170,3171,3172,3174]);
-_$jscoverage_init(_$jscoverage_cond, "./test/vue.test.js",[14,29,29,69,81,82,98,104,106,106,135,159,179,180,187,204,206,232,306,313,316,323,340,387,389,398,407,416,425,434,443,473,475,503,505,505,506,508,508,599,599,609,653,653,667,678,681,683,724,729,734,739,748,748,757,757,807,839,841,851,859,859,866,885,904,907,907,909,921,922,924,966,979,982,999,1003,1008,1008,1013,1013,1016,1025,1027,1037,1044,1066,1066,1080,1085,1089,1102,1107,1108,1111,1118,1140,1141,1152,1155,1174,1179,1180,1197,1201,1215,1220,1244,1244,1247,1247,1258,1258,1258,1258,1258,1270,1271,1274,1297,1301,1331,1344,1344,1346,1359,1361,1371,1373,1379,1381,1394,1399,1441,1465,1498,1644,1648,1654,1657,1663,1669,1675,1678,1694,1696,1707,1707,1720,1748,1748,1778,1798,1809,1813,1816,1818,1834,1837,1856,1856,1865,1877,1877,1922,1926,1926,1935,1948,1953,1955,1969,1986,1988,2001,2008,2028,2028,2040,2042,2046,2046,2084,2085,2086,2108,2112,2115,2117,2193,2196,2205,2205,2249,2285,2290,2294,2310,2314,2362,2362,2389,2389,2418,2420,2424,2457,2464,2472,2492,2500,2503,2524,2544,2552,2553,2560,2582,2625,2628,2631,2653,2675,2676,2688,2695,2698,2707,2742,2754,2782,2831,2831,2847,2847,2847,2856,2860,2883,2888,2911,2935,2939,2943,2947,2948,2956,2977,2987,2998,3006,3006,3006,3006,3018,3023,3040,3053,3103,3118,3126,3126,3136,3140,3146,3152,3154,3163]);
-_$jscoverage["./test/vue.test.js"].source = ["","/**"," * Require the given path."," *"," * @param {String} path"," * @return {Object} exports"," * @api public"," */","","function require(path, parent, orig) {"," var resolved = require.resolve(path);",""," // lookup failed"," if (null == resolved) {"," orig = orig || path;"," parent = parent || 'root';"," var err = new Error('Failed to require \"' + orig + '\" from \"' + parent + '\"');"," err.path = orig;"," err.parent = parent;"," err.require = true;"," throw err;"," }",""," var module = require.modules[resolved];",""," // perform real require()"," // by invoking the module's"," // registered function"," if (!module._resolving && !module.exports) {"," var mod = {};"," mod.exports = {};"," mod.client = mod.component = true;"," module._resolving = true;"," module.call(this, mod.exports, require.relative(resolved), mod);"," delete module._resolving;"," module.exports = mod.exports;"," }",""," return module.exports;","}","","/**"," * Registered modules."," */","","require.modules = {};","","/**"," * Registered aliases."," */","","require.aliases = {};","","/**"," * Resolve `path`."," *"," * Lookup:"," *"," * - PATH/index.js"," * - PATH.js"," * - PATH"," *"," * @param {String} path"," * @return {String} path or null"," * @api private"," */","","require.resolve = function(path) {"," if (path.charAt(0) === '/') path = path.slice(1);",""," var paths = ["," path,"," path + '.js',"," path + '.json',"," path + '/index.js',"," path + '/index.json'"," ];",""," for (var i = 0; i < paths.length; i++) {"," var path = paths[i];"," if (require.modules.hasOwnProperty(path)) return path;"," if (require.aliases.hasOwnProperty(path)) return require.aliases[path];"," }","};","","/**"," * Normalize `path` relative to the current path."," *"," * @param {String} curr"," * @param {String} path"," * @return {String}"," * @api private"," */","","require.normalize = function(curr, path) {"," var segs = [];",""," if ('.' != path.charAt(0)) return path;",""," curr = curr.split('/');"," path = path.split('/');",""," for (var i = 0; i < path.length; ++i) {"," if ('..' == path[i]) {"," curr.pop();"," } else if ('.' != path[i] && '' != path[i]) {"," segs.push(path[i]);"," }"," }",""," return curr.concat(segs).join('/');","};","","/**"," * Register module at `path` with callback `definition`."," *"," * @param {String} path"," * @param {Function} definition"," * @api private"," */","","require.register = function(path, definition) {"," require.modules[path] = definition;","};","","/**"," * Alias a module definition."," *"," * @param {String} from"," * @param {String} to"," * @api private"," */","","require.alias = function(from, to) {"," if (!require.modules.hasOwnProperty(from)) {"," throw new Error('Failed to alias \"' + from + '\", it does not exist');"," }"," require.aliases[to] = from;","};","","/**"," * Return a require function relative to the `parent` path."," *"," * @param {String} parent"," * @return {Function}"," * @api private"," */","","require.relative = function(parent) {"," var p = require.normalize(parent, '..');",""," /**"," * lastIndexOf helper."," */",""," function lastIndexOf(arr, obj) {"," var i = arr.length;"," while (i--) {"," if (arr[i] === obj) return i;"," }"," return -1;"," }",""," /**"," * The relative require() itself."," */",""," function localRequire(path) {"," var resolved = localRequire.resolve(path);"," return require(resolved, parent, path);"," }",""," /**"," * Resolve relative to the parent."," */",""," localRequire.resolve = function(path) {"," var c = path.charAt(0);"," if ('/' == c) return path.slice(1);"," if ('.' == c) return require.normalize(p, path);",""," // resolve deps by returning"," // the dep in the nearest \"deps\""," // directory"," var segs = parent.split('/');"," var i = lastIndexOf(segs, 'deps') + 1;"," if (!i) i = 0;"," path = segs.slice(0, i + 1).join('/') + '/deps/' + path;"," return path;"," };",""," /**"," * Check if module is defined at `path`."," */",""," localRequire.exists = function(path) {"," return require.modules.hasOwnProperty(localRequire.resolve(path));"," };",""," return localRequire;","};","require.register(\"component-indexof/index.js\", function(exports, require, module){","module.exports = function(arr, obj){"," if (arr.indexOf) return arr.indexOf(obj);"," for (var i = 0; i < arr.length; ++i) {"," if (arr[i] === obj) return i;"," }"," return -1;","};","});","require.register(\"component-emitter/index.js\", function(exports, require, module){","","/**"," * Module dependencies."," */","","var index = require('indexof');","","/**"," * Expose `Emitter`."," */","","module.exports = Emitter;","","/**"," * Initialize a new `Emitter`."," *"," * @api public"," */","","function Emitter(obj) {"," if (obj) return mixin(obj);","};","","/**"," * Mixin the emitter properties."," *"," * @param {Object} obj"," * @return {Object}"," * @api private"," */","","function mixin(obj) {"," for (var key in Emitter.prototype) {"," obj[key] = Emitter.prototype[key];"," }"," return obj;","}","","/**"," * Listen on the given `event` with `fn`."," *"," * @param {String} event"," * @param {Function} fn"," * @return {Emitter}"," * @api public"," */","","Emitter.prototype.on = function(event, fn){"," this._callbacks = this._callbacks || {};"," (this._callbacks[event] = this._callbacks[event] || [])"," .push(fn);"," return this;","};","","/**"," * Adds an `event` listener that will be invoked a single"," * time then automatically removed."," *"," * @param {String} event"," * @param {Function} fn"," * @return {Emitter}"," * @api public"," */","","Emitter.prototype.once = function(event, fn){"," var self = this;"," this._callbacks = this._callbacks || {};",""," function on() {"," self.off(event, on);"," fn.apply(this, arguments);"," }",""," fn._off = on;"," this.on(event, on);"," return this;","};","","/**"," * Remove the given callback for `event` or all"," * registered callbacks."," *"," * @param {String} event"," * @param {Function} fn"," * @return {Emitter}"," * @api public"," */","","Emitter.prototype.off =","Emitter.prototype.removeListener =","Emitter.prototype.removeAllListeners = function(event, fn){"," this._callbacks = this._callbacks || {};",""," // all"," if (0 == arguments.length) {"," this._callbacks = {};"," return this;"," }",""," // specific event"," var callbacks = this._callbacks[event];"," if (!callbacks) return this;",""," // remove all handlers"," if (1 == arguments.length) {"," delete this._callbacks[event];"," return this;"," }",""," // remove specific handler"," var i = index(callbacks, fn._off || fn);"," if (~i) callbacks.splice(i, 1);"," return this;","};","","/**"," * Emit `event` with the given args."," *"," * @param {String} event"," * @param {Mixed} ..."," * @return {Emitter}"," */","","Emitter.prototype.emit = function(event){"," this._callbacks = this._callbacks || {};"," var args = [].slice.call(arguments, 1)"," , callbacks = this._callbacks[event];",""," if (callbacks) {"," callbacks = callbacks.slice(0);"," for (var i = 0, len = callbacks.length; i < len; ++i) {"," callbacks[i].apply(this, args);"," }"," }",""," return this;","};","","/**"," * Return array of callbacks for `event`."," *"," * @param {String} event"," * @return {Array}"," * @api public"," */","","Emitter.prototype.listeners = function(event){"," this._callbacks = this._callbacks || {};"," return this._callbacks[event] || [];","};","","/**"," * Check if this emitter has `event` handlers."," *"," * @param {String} event"," * @return {Boolean}"," * @api public"," */","","Emitter.prototype.hasListeners = function(event){"," return !! this.listeners(event).length;","};","","});","require.register(\"vue/src/main.js\", function(exports, require, module){","var config = require('./config'),"," ViewModel = require('./viewmodel'),"," directives = require('./directives'),"," filters = require('./filters'),"," utils = require('./utils')","","/**"," * Set config options"," */","ViewModel.config = function (opts) {"," if (opts) {"," utils.extend(config, opts)"," if (opts.prefix) updatePrefix()"," }"," return this","}","","/**"," * Allows user to register/retrieve a directive definition"," */","ViewModel.directive = function (id, fn) {"," if (!fn) return directives[id]"," directives[id] = fn"," return this","}","","/**"," * Allows user to register/retrieve a filter function"," */","ViewModel.filter = function (id, fn) {"," if (!fn) return filters[id]"," filters[id] = fn"," return this","}","","/**"," * Allows user to register/retrieve a ViewModel constructor"," */","ViewModel.component = function (id, Ctor) {"," if (!Ctor) return utils.components[id]"," utils.components[id] = utils.toConstructor(Ctor)"," return this","}","","/**"," * Allows user to register/retrieve a Custom element constructor"," */","ViewModel.element = function (id, Ctor) {"," if (!Ctor) return utils.elements[id]"," utils.elements[id] = utils.toConstructor(Ctor)"," return this","}","","/**"," * Allows user to register/retrieve a template partial"," */","ViewModel.partial = function (id, partial) {"," if (!partial) return utils.partials[id]"," utils.partials[id] = utils.toFragment(partial)"," return this","}","","/**"," * Allows user to register/retrieve a transition definition object"," */","ViewModel.transition = function (id, transition) {"," if (!transition) return utils.transitions[id]"," utils.transitions[id] = transition"," return this","}","","ViewModel.extend = extend","","/**"," * Expose the main ViewModel class"," * and add extend method"," */","function extend (options) {",""," var ParentVM = this",""," // inherit options"," options = inheritOptions(options, ParentVM.options, true)"," utils.processOptions(options)",""," var ExtendedVM = function (opts) {"," opts = inheritOptions(opts, options, true)"," ParentVM.call(this, opts)"," }",""," // inherit prototype props"," var proto = ExtendedVM.prototype = Object.create(ParentVM.prototype)"," utils.defProtected(proto, 'constructor', ExtendedVM)",""," // copy prototype props"," var protoMixins = options.proto"," if (protoMixins) {"," for (var key in protoMixins) {"," if (!(key in ViewModel.prototype)) {"," proto[key] = protoMixins[key]"," }"," }"," }",""," // allow extended VM to be further extended"," ExtendedVM.extend = extend"," ExtendedVM.super = ParentVM"," ExtendedVM.options = options"," return ExtendedVM","}","","/**"," * Inherit options"," *"," * For options such as `scope`, `vms`, `directives`, 'partials',"," * they should be further extended. However extending should only"," * be done at top level."," * "," * `proto` is an exception because it's handled directly on the"," * prototype."," *"," * `el` is an exception because it's not allowed as an"," * extension option, but only as an instance option."," */","function inheritOptions (child, parent, topLevel) {"," child = child || utils.hash()"," if (!parent) return child"," for (var key in parent) {"," if (key === 'el' || key === 'proto') continue"," if (!child[key]) { // child has priority"," child[key] = parent[key]"," } else if (topLevel && utils.typeOf(child[key]) === 'Object') {"," inheritOptions(child[key], parent[key], false)"," }"," }"," return child","}","","/**"," * Update prefix for some special directives"," * that are used in compilation."," */","var specialAttributes = ["," 'id',"," 'pre',"," 'text',"," 'repeat',"," 'partial',"," 'component',"," 'transition'","]","","function updatePrefix () {"," specialAttributes.forEach(setPrefix)","}","","function setPrefix (attr) {"," config.attrs[attr] = config.prefix + '-' + attr","}","","updatePrefix()","module.exports = ViewModel","});","require.register(\"vue/src/emitter.js\", function(exports, require, module){","// shiv to make this work for Component, Browserify and Node at the same time.","var Emitter,"," componentEmitter = 'emitter'","","try {"," // Requiring without a string literal will make browserify"," // unable to parse the dependency, thus preventing it from"," // stopping the compilation after a failed lookup."," Emitter = require(componentEmitter)","} catch (e) {}","","module.exports = Emitter || require('events').EventEmitter","});","require.register(\"vue/src/config.js\", function(exports, require, module){","module.exports = {",""," prefix : 'v',"," debug : false,"," silent : false,"," enterClass : 'v-enter',"," leaveClass : 'v-leave',"," attrs : {}"," ","}","});","require.register(\"vue/src/utils.js\", function(exports, require, module){","var config = require('./config'),"," attrs = config.attrs,"," toString = Object.prototype.toString,"," join = Array.prototype.join,"," console = window.console,"," ViewModel // late def","","/**"," * Create a prototype-less object"," * which is a better hash/map"," */","function makeHash () {"," return Object.create(null)","}","","var utils = module.exports = {",""," hash: makeHash,",""," // global storage for user-registered"," // vms, partials and transitions"," components : makeHash(),"," partials : makeHash(),"," transitions : makeHash(),"," elements : makeHash(),",""," /**"," * get an attribute and remove it."," */"," attr: function (el, type, noRemove) {"," var attr = attrs[type],"," val = el.getAttribute(attr)"," if (!noRemove && val !== null) el.removeAttribute(attr)"," return val"," },",""," /**"," * Define an ienumerable property"," * This avoids it being included in JSON.stringify"," * or for...in loops."," */"," defProtected: function (obj, key, val, enumerable, configurable) {"," if (obj.hasOwnProperty(key)) return"," Object.defineProperty(obj, key, {"," value : val,"," enumerable : !!enumerable,"," configurable : !!configurable"," })"," },",""," /**"," * Accurate type check"," * internal use only, so no need to check for NaN"," */"," typeOf: function (obj) {"," return toString.call(obj).slice(8, -1)"," },",""," /**"," * Most simple bind"," * enough for the usecase and fast than native bind()"," */"," bind: function (fn, ctx) {"," return function (arg) {"," return fn.call(ctx, arg)"," }"," },",""," /**"," * Make sure only strings and numbers are output to html"," * output empty string is value is not string or number"," */"," toText: function (value) {"," /* jshint eqeqeq: false */"," return (typeof value === 'string' ||"," typeof value === 'boolean' ||"," (typeof value === 'number' && value == value)) // deal with NaN"," ? value"," : ''"," },",""," /**"," * simple extend"," */"," extend: function (obj, ext, protective) {"," for (var key in ext) {"," if (protective && obj[key]) continue"," obj[key] = ext[key]"," }"," },",""," /**"," * filter an array with duplicates into uniques"," */"," unique: function (arr) {"," var hash = utils.hash(),"," i = arr.length,"," key, res = []"," while (i--) {"," key = arr[i]"," if (hash[key]) continue"," hash[key] = 1"," res.push(key)"," }"," return res"," },",""," /**"," * Convert a string template to a dom fragment"," */"," toFragment: function (template) {"," if (typeof template !== 'string') {"," return template"," }"," if (template.charAt(0) === '#') {"," var templateNode = document.getElementById(template.slice(1))"," if (!templateNode) return"," template = templateNode.innerHTML"," }"," var node = document.createElement('div'),"," frag = document.createDocumentFragment(),"," child"," node.innerHTML = template.trim()"," /* jshint boss: true */"," while (child = node.firstChild) {"," frag.appendChild(child)"," }"," return frag"," },",""," /**"," * Convert the object to a ViewModel constructor"," * if it is not already one"," */"," toConstructor: function (obj) {"," ViewModel = ViewModel || require('./viewmodel')"," return utils.typeOf(obj) === 'Object'"," ? ViewModel.extend(obj)"," : typeof obj === 'function'"," ? obj"," : null"," },",""," isConstructor: function (obj) {"," ViewModel = ViewModel || require('./viewmodel')"," return obj.prototype instanceof ViewModel || obj === ViewModel"," },",""," /**"," * convert certain option values to the desired format."," */"," processOptions: function (options) {"," var components = options.components,"," partials = options.partials,"," template = options.template,"," elements = options.elements,"," key"," if (components) {"," for (key in components) {"," components[key] = utils.toConstructor(components[key])"," }"," }"," if (elements) {"," for (key in elements) {"," elements[key] = utils.toConstructor(elements[key])"," }"," }"," if (partials) {"," for (key in partials) {"," partials[key] = utils.toFragment(partials[key])"," }"," }"," if (template) {"," options.template = utils.toFragment(template)"," }"," },",""," /**"," * log for debugging"," */"," log: function () {"," if (config.debug && console) {"," console.log(join.call(arguments, ' '))"," }"," },"," "," /**"," * warnings, thrown in all cases"," */"," warn: function() {"," if (!config.silent && console) {"," console.trace()"," console.warn(join.call(arguments, ' '))"," }"," }","}","});","require.register(\"vue/src/compiler.js\", function(exports, require, module){","var Emitter = require('./emitter'),"," Observer = require('./observer'),"," config = require('./config'),"," utils = require('./utils'),"," Binding = require('./binding'),"," Directive = require('./directive'),"," TextParser = require('./text-parser'),"," DepsParser = require('./deps-parser'),"," ExpParser = require('./exp-parser'),"," transition = require('./transition'),"," // cache deps ob"," depsOb = DepsParser.observer,"," // cache methods"," slice = Array.prototype.slice,"," log = utils.log,"," makeHash = utils.hash,"," def = utils.defProtected,"," hasOwn = Object.prototype.hasOwnProperty","","/**"," * The DOM compiler"," * scans a DOM node and compile bindings for a ViewModel"," */","function Compiler (vm, options) {",""," var compiler = this",""," // indicate that we are intiating this instance"," // so we should not run any transitions"," compiler.init = true",""," // extend options"," options = compiler.options = options || makeHash()"," utils.processOptions(options)"," utils.extend(compiler, options.compilerOptions)",""," // initialize element"," var el = compiler.setupElement(options)"," log('\\nnew VM instance:', el.tagName, '\\n')",""," // copy scope properties to vm"," var scope = options.scope"," if (scope) utils.extend(vm, scope, true)",""," compiler.vm = vm"," def(vm, '$', makeHash())"," def(vm, '$el', el)"," def(vm, '$compiler', compiler)",""," // keep track of directives and expressions"," // so they can be unbound during destroy()"," compiler.dirs = []"," compiler.exps = []"," compiler.childCompilers = [] // keep track of child compilers"," compiler.emitter = new Emitter() // the emitter used for nested VM communication",""," // Store things during parsing to be processed afterwards,"," // because we want to have created all bindings before"," // observing values / parsing dependencies."," var observables = compiler.observables = [],"," computed = compiler.computed = []",""," // prototypal inheritance of bindings"," var parent = compiler.parentCompiler"," compiler.bindings = parent"," ? Object.create(parent.bindings)"," : makeHash()"," compiler.rootCompiler = parent"," ? getRoot(parent)"," : compiler",""," // set parent VM"," // and register child id on parent"," var childId = utils.attr(el, 'id')"," if (parent) {"," def(vm, '$parent', parent.vm)"," if (childId) {"," compiler.childId = childId"," parent.vm.$[childId] = vm"," }"," }",""," // setup observer"," compiler.setupObserver()",""," // call user init. this will capture some initial values."," if (options.init) {"," options.init.apply(vm, options.args || [])"," }",""," // create bindings for keys set on the vm by the user"," var key, keyPrefix"," for (key in vm) {"," keyPrefix = key.charAt(0)"," if (keyPrefix !== '$' && keyPrefix !== '_') {"," compiler.createBinding(key)"," }"," }",""," // for repeated items, create an index binding"," // which should be inenumerable but configurable"," if (compiler.repeat) {"," vm.$index = compiler.repeatIndex"," def(vm, '$collection', compiler.repeatCollection)"," compiler.createBinding('$index')"," }",""," // now parse the DOM, during which we will create necessary bindings"," // and bind the parsed directives"," compiler.compile(el, true)",""," // observe root values so that they emit events when"," // their nested values change (for an Object)"," // or when they mutate (for an Array)"," var i = observables.length, binding"," while (i--) {"," binding = observables[i]"," Observer.observe(binding.value, binding.key, compiler.observer)"," }"," // extract dependencies for computed properties"," if (computed.length) DepsParser.parse(computed)",""," // done!"," compiler.init = false","}","","var CompilerProto = Compiler.prototype","","/**"," * Initialize the VM/Compiler's element."," * Fill it in with the template if necessary."," */","CompilerProto.setupElement = function (options) {"," // create the node first"," var el = this.el = typeof options.el === 'string'"," ? document.querySelector(options.el)"," : options.el || document.createElement(options.tagName || 'div')",""," var template = options.template"," if (template) {"," // replace option: use the first node in"," // the template directly"," if (options.replace && template.childNodes.length === 1) {"," var replacer = template.childNodes[0].cloneNode(true)"," if (el.parentNode) {"," el.parentNode.insertBefore(replacer, el)"," el.parentNode.removeChild(el)"," }"," el = replacer"," } else {"," el.innerHTML = ''"," el.appendChild(template.cloneNode(true))"," }"," }",""," // apply element options"," if (options.id) el.id = options.id"," if (options.className) el.className = options.className"," var attrs = options.attributes"," if (attrs) {"," for (var attr in attrs) {"," el.setAttribute(attr, attrs[attr])"," }"," }",""," return el","}","","/**"," * Setup observer."," * The observer listens for get/set/mutate events on all VM"," * values/objects and trigger corresponding binding updates."," */","CompilerProto.setupObserver = function () {",""," var compiler = this,"," bindings = compiler.bindings,"," observer = compiler.observer = new Emitter()",""," // a hash to hold event proxies for each root level key"," // so they can be referenced and removed later"," observer.proxies = makeHash()",""," // add own listeners which trigger binding updates"," observer"," .on('get', function (key) {"," check(key)"," depsOb.emit('get', bindings[key])"," })"," .on('set', function (key, val) {"," observer.emit('change:' + key, val)"," check(key)"," bindings[key].update(val)"," })"," .on('mutate', function (key, val, mutation) {"," observer.emit('change:' + key, val, mutation)"," check(key)"," bindings[key].pub()"," })",""," function check (key) {"," if (!bindings[key]) {"," compiler.createBinding(key)"," }"," }","}","","/**"," * Compile a DOM node (recursive)"," */","CompilerProto.compile = function (node, root) {",""," var compiler = this",""," if (node.nodeType === 1) { // a normal node",""," // skip anything with v-pre"," if (utils.attr(node, 'pre') !== null) return",""," // special attributes to check"," var repeatExp,"," componentId,"," partialId,"," customElementFn = compiler.getOption('elements', node.tagName.toLowerCase())",""," // It is important that we access these attributes"," // procedurally because the order matters."," //"," // `utils.attr` removes the attribute once it gets the"," // value, so we should not access them all at once.",""," // v-repeat has the highest priority"," // and we need to preserve all other attributes for it."," /* jshint boss: true */"," if (repeatExp = utils.attr(node, 'repeat')) {",""," // repeat block cannot have v-id at the same time."," var directive = Directive.parse(config.attrs.repeat, repeatExp, compiler, node)"," if (directive) {"," compiler.bindDirective(directive)"," }",""," // custom elements has 2nd highest priority"," } else if (!root && customElementFn) {",""," addChild(customElementFn)",""," // v-component has 3rd highest priority"," } else if (!root && (componentId = utils.attr(node, 'component'))) {",""," var ChildVM = compiler.getOption('components', componentId)"," if (ChildVM) addChild(ChildVM)",""," } else {",""," // check transition property"," node.vue_trans = utils.attr(node, 'transition')"," "," // replace innerHTML with partial"," partialId = utils.attr(node, 'partial')"," if (partialId) {"," var partial = compiler.getOption('partials', partialId)"," if (partial) {"," node.innerHTML = ''"," node.appendChild(partial.cloneNode(true))"," }"," }",""," // finally, only normal directives left!"," compiler.compileNode(node)"," }",""," } else if (node.nodeType === 3) { // text node",""," compiler.compileTextNode(node)",""," }",""," function addChild (Ctor) {"," if (utils.isConstructor(Ctor)) {"," var child = new Ctor({"," el: node,"," child: true,"," compilerOptions: {"," parentCompiler: compiler"," }"," })"," compiler.childCompilers.push(child.$compiler)"," } else {"," // simply call the function"," Ctor(node)"," }"," }","}","","/**"," * Compile a normal node"," */","CompilerProto.compileNode = function (node) {"," var i, j, attrs = node.attributes"," // parse if has attributes"," if (attrs && attrs.length) {"," var attr, valid, exps, exp"," // loop through all attributes"," i = attrs.length"," while (i--) {"," attr = attrs[i]"," valid = false"," exps = Directive.split(attr.value)"," // loop through clauses (separated by \",\")"," // inside each attribute"," j = exps.length"," while (j--) {"," exp = exps[j]"," var directive = Directive.parse(attr.name, exp, this, node)"," if (directive) {"," valid = true"," this.bindDirective(directive)"," }"," }"," if (valid) node.removeAttribute(attr.name)"," }"," }"," // recursively compile childNodes"," if (node.childNodes.length) {"," var nodes = slice.call(node.childNodes)"," for (i = 0, j = nodes.length; i < j; i++) {"," this.compile(nodes[i])"," }"," }","}","","/**"," * Compile a text node"," */","CompilerProto.compileTextNode = function (node) {"," var tokens = TextParser.parse(node.nodeValue)"," if (!tokens) return"," var dirname = config.attrs.text,"," el, token, directive"," for (var i = 0, l = tokens.length; i < l; i++) {"," token = tokens[i]"," if (token.key) { // a binding"," if (token.key.charAt(0) === '>') { // a partial"," var partialId = token.key.slice(1).trim(),"," partial = this.getOption('partials', partialId)"," if (partial) {"," el = partial.cloneNode(true)"," this.compileNode(el)"," }"," } else { // a binding"," el = document.createTextNode('')"," directive = Directive.parse(dirname, token.key, this, el)"," if (directive) {"," this.bindDirective(directive)"," }"," }"," } else { // a plain string"," el = document.createTextNode(token)"," }"," node.parentNode.insertBefore(el, node)"," }"," node.parentNode.removeChild(node)","}","","/**"," * Add a directive instance to the correct binding & viewmodel"," */","CompilerProto.bindDirective = function (directive) {",""," // keep track of it so we can unbind() later"," this.dirs.push(directive)",""," // for a simple directive, simply call its bind() or _update()"," // and we're done."," if (directive.isSimple) {"," if (directive.bind) directive.bind()"," return"," }",""," // otherwise, we got more work to do..."," var binding,"," compiler = this,"," key = directive.key,"," baseKey = key.split('.')[0],"," ownerCompiler = traceOwnerCompiler(directive, compiler)",""," if (directive.isExp) {"," // expression bindings are always created on current compiler"," binding = compiler.createBinding(key, true, directive.isFn)"," } else if (ownerCompiler.vm.hasOwnProperty(baseKey)) {"," // If the directive's owner compiler's VM has the key,"," // it belongs there. Create the binding if it's not already"," // created, and return it."," binding = hasOwn.call(ownerCompiler.bindings, key)"," ? ownerCompiler.bindings[key]"," : ownerCompiler.createBinding(key)"," } else {"," // due to prototypal inheritance of bindings, if a key doesn't exist"," // on the owner compiler's VM, then it doesn't exist in the whole"," // prototype chain. In this case we create the new binding at the root level."," binding = ownerCompiler.bindings[key] || compiler.rootCompiler.createBinding(key)"," }",""," binding.instances.push(directive)"," directive.binding = binding",""," var value = binding.value"," // invoke bind hook if exists"," if (directive.bind) {"," directive.bind(value)"," }",""," // set initial value"," if (value !== undefined) {"," if (binding.isComputed) {"," directive.refresh(value)"," } else {"," directive.update(value, true)"," }"," }","}","","/**"," * Create binding and attach getter/setter for a key to the viewmodel object"," */","CompilerProto.createBinding = function (key, isExp, isFn) {",""," var compiler = this,"," bindings = compiler.bindings,"," binding = new Binding(compiler, key, isExp, isFn)",""," if (isExp) {"," // a complex expression binding"," // we need to generate an anonymous computed property for it"," var getter = ExpParser.parse(key, compiler)"," if (getter) {"," log(' created expression binding: ' + key)"," binding.value = isFn"," ? getter"," : { $get: getter }"," compiler.markComputed(binding)"," compiler.exps.push(binding)"," }"," } else {"," log(' created binding: ' + key)"," bindings[key] = binding"," // make sure the key exists in the object so it can be observed"," // by the Observer!"," Observer.ensurePath(compiler.vm, key)"," if (binding.root) {"," // this is a root level binding. we need to define getter/setters for it."," compiler.define(key, binding)"," } else {"," var parentKey = key.slice(0, key.lastIndexOf('.'))"," if (!hasOwn.call(bindings, parentKey)) {"," // this is a nested value binding, but the binding for its parent"," // has not been created yet. We better create that one too."," compiler.createBinding(parentKey)"," }"," }"," }"," return binding","}","","/**"," * Defines the getter/setter for a root-level binding on the VM"," * and observe the initial value"," */","CompilerProto.define = function (key, binding) {",""," log(' defined root binding: ' + key)",""," var compiler = this,"," vm = compiler.vm,"," ob = compiler.observer,"," value = binding.value = vm[key], // save the value before redefinening it"," type = utils.typeOf(value)",""," if (type === 'Object' && value.$get) {"," // computed property"," compiler.markComputed(binding)"," } else if (type === 'Object' || type === 'Array') {"," // observe objects later, becase there might be more keys"," // to be added to it. we also want to emit all the set events"," // after all values are available."," compiler.observables.push(binding)"," }",""," Object.defineProperty(vm, key, {"," enumerable: true,"," get: function () {"," var value = binding.value"," if (depsOb.active && (!binding.isComputed && (!value || !value.__observer__)) ||"," Array.isArray(value)) {"," // only emit non-computed, non-observed (primitive) values, or Arrays."," // because these are the cleanest dependencies"," ob.emit('get', key)"," }"," return binding.isComputed"," ? value.$get()"," : value"," },"," set: function (newVal) {"," var value = binding.value"," if (binding.isComputed) {"," if (value.$set) {"," value.$set(newVal)"," }"," } else if (newVal !== value) {"," // unwatch the old value"," Observer.unobserve(value, key, ob)"," // set new value"," binding.value = newVal"," ob.emit('set', key, newVal)"," Observer.ensurePaths(key, newVal, compiler.bindings)"," // now watch the new value, which in turn emits 'set'"," // for all its nested values"," Observer.observe(newVal, key, ob)"," }"," }"," })","}","","/**"," * Process a computed property binding"," */","CompilerProto.markComputed = function (binding) {"," var value = binding.value,"," vm = this.vm"," binding.isComputed = true"," // bind the accessors to the vm"," if (binding.isFn) {"," binding.value = utils.bind(value, vm)"," } else {"," value.$get = utils.bind(value.$get, vm)"," if (value.$set) {"," value.$set = utils.bind(value.$set, vm)"," }"," }"," // keep track for dep parsing later"," this.computed.push(binding)","}","","/**"," * Retrive an option from the compiler"," */","CompilerProto.getOption = function (type, id) {"," var opts = this.options"," return (opts[type] && opts[type][id]) || (utils[type] && utils[type][id])","}","","/**"," * Unbind and remove element"," */","CompilerProto.destroy = function () {",""," var compiler = this,"," i, key, dir, instances, binding,"," el = compiler.el,"," directives = compiler.dirs,"," exps = compiler.exps,"," bindings = compiler.bindings,"," teardown = compiler.options.teardown",""," // call user teardown first"," if (teardown) teardown()",""," // unwatch"," compiler.observer.off()"," compiler.emitter.off()",""," // unbind all direcitves"," i = directives.length"," while (i--) {"," dir = directives[i]"," // if this directive is an instance of an external binding"," // e.g. a directive that refers to a variable on the parent VM"," // we need to remove it from that binding's instances"," if (!dir.isSimple && dir.binding.compiler !== compiler) {"," instances = dir.binding.instances"," if (instances) instances.splice(instances.indexOf(dir), 1)"," }"," dir.unbind()"," }",""," // unbind all expressions (anonymous bindings)"," i = exps.length"," while (i--) {"," exps[i].unbind()"," }",""," // unbind/unobserve all own bindings"," for (key in bindings) {"," if (hasOwn.call(bindings, key)) {"," binding = bindings[key]"," if (binding.root) {"," Observer.unobserve(binding.value, binding.key, compiler.observer)"," }"," binding.unbind()"," }"," }",""," // remove self from parentCompiler"," var parent = compiler.parentCompiler,"," childId = compiler.childId"," if (parent) {"," parent.childCompilers.splice(parent.childCompilers.indexOf(compiler), 1)"," if (childId) {"," delete parent.vm.$[childId]"," }"," }",""," // finally remove dom element"," if (el === document.body) {"," el.innerHTML = ''"," } else if (el.parentNode) {"," transition(el, -1, function () {"," el.parentNode.removeChild(el)"," }, this)"," }","}","","// Helpers --------------------------------------------------------------------","","/**"," * determine which viewmodel a key belongs to based on nesting symbols"," */","function traceOwnerCompiler (key, compiler) {"," if (key.nesting) {"," var levels = key.nesting"," while (compiler.parentCompiler && levels--) {"," compiler = compiler.parentCompiler"," }"," } else if (key.root) {"," while (compiler.parentCompiler) {"," compiler = compiler.parentCompiler"," }"," }"," return compiler","}","","/**"," * shorthand for getting root compiler"," */","function getRoot (compiler) {"," return traceOwnerCompiler({ root: true }, compiler)","}","","module.exports = Compiler","});","require.register(\"vue/src/viewmodel.js\", function(exports, require, module){","var Compiler = require('./compiler'),"," def = require('./utils').defProtected","","/**"," * ViewModel exposed to the user that holds data,"," * computed properties, event handlers"," * and a few reserved methods"," */","function ViewModel (options) {"," // just compile. options are passed directly to compiler"," new Compiler(this, options)","}","","// All VM prototype methods are inenumerable","// so it can be stringified/looped through as raw data","var VMProto = ViewModel.prototype","","/**"," * Convenience function to set an actual nested value"," * from a flat key string. Used in directives."," */","def(VMProto, '$set', function (key, value) {"," var path = key.split('.'),"," obj = getTargetVM(this, path)"," if (!obj) return"," for (var d = 0, l = path.length - 1; d < l; d++) {"," obj = obj[path[d]]"," }"," obj[path[d]] = value","})","","/**"," * watch a key on the viewmodel for changes"," * fire callback with new value"," */","def(VMProto, '$watch', function (key, callback) {"," this.$compiler.observer.on('change:' + key, callback)","})","","/**"," * unwatch a key"," */","def(VMProto, '$unwatch', function (key, callback) {"," // workaround here"," // since the emitter module checks callback existence"," // by checking the length of arguments"," var args = ['change:' + key],"," ob = this.$compiler.observer"," if (callback) args.push(callback)"," ob.off.apply(ob, args)","})","","/**"," * unbind everything, remove everything"," */","def(VMProto, '$destroy', function () {"," this.$compiler.destroy()","})","","/**"," * broadcast an event to all child VMs recursively."," */","def(VMProto, '$broadcast', function () {"," var children = this.$compiler.childCompilers,"," i = children.length,"," child"," while (i--) {"," child = children[i]"," child.emitter.emit.apply(child.emitter, arguments)"," child.vm.$broadcast.apply(child.vm, arguments)"," }","})","","/**"," * emit an event that propagates all the way up to parent VMs."," */","def(VMProto, '$emit', function () {"," var compiler = this.$compiler,"," emitter = compiler.emitter,"," parent = compiler.parentCompiler"," emitter.emit.apply(emitter, arguments)"," if (parent) {"," parent.emitter.emit.apply(parent.emitter, arguments)"," parent.vm.$emit.apply(parent.vm, arguments)"," }","})","","/**"," * delegate on/off/once to the compiler's emitter"," */",";['on', 'off', 'once'].forEach(function (method) {"," def(VMProto, '$' + method, function () {"," var emitter = this.$compiler.emitter"," emitter[method].apply(emitter, arguments)"," })","})","","/**"," * If a VM doesn't contain a path, go up the prototype chain"," * to locate the ancestor that has it."," */","function getTargetVM (vm, path) {"," var baseKey = path[0],"," binding = vm.$compiler.bindings[baseKey]"," return binding"," ? binding.compiler.vm"," : null","}","","module.exports = ViewModel","});","require.register(\"vue/src/binding.js\", function(exports, require, module){","/**"," * Binding class."," *"," * each property on the viewmodel has one corresponding Binding object"," * which has multiple directive instances on the DOM"," * and multiple computed property dependents"," */","function Binding (compiler, key, isExp, isFn) {"," this.value = undefined"," this.isExp = !!isExp"," this.isFn = isFn"," this.root = !this.isExp && key.indexOf('.') === -1"," this.compiler = compiler"," this.key = key"," this.instances = []"," this.subs = []"," this.deps = []","}","","var BindingProto = Binding.prototype","","/**"," * Process the value, then trigger updates on all dependents"," */","BindingProto.update = function (value) {"," this.value = value"," var i = this.instances.length"," while (i--) {"," this.instances[i].update(value)"," }"," this.pub()","}","","/**"," * -- computed property only -- "," * Force all instances to re-evaluate themselves"," */","BindingProto.refresh = function () {"," var i = this.instances.length"," while (i--) {"," this.instances[i].refresh()"," }"," this.pub()","}","","/**"," * Notify computed properties that depend on this binding"," * to update themselves"," */","BindingProto.pub = function () {"," var i = this.subs.length"," while (i--) {"," this.subs[i].refresh()"," }","}","","/**"," * Unbind the binding, remove itself from all of its dependencies"," */","BindingProto.unbind = function () {"," var i = this.instances.length"," while (i--) {"," this.instances[i].unbind()"," }"," i = this.deps.length"," var subs"," while (i--) {"," subs = this.deps[i].subs"," subs.splice(subs.indexOf(this), 1)"," }","}","","module.exports = Binding","});","require.register(\"vue/src/observer.js\", function(exports, require, module){","/* jshint proto:true */","","var Emitter = require('./emitter'),"," utils = require('./utils'),"," depsOb = require('./deps-parser').observer,",""," // cache methods"," typeOf = utils.typeOf,"," def = utils.defProtected,"," slice = Array.prototype.slice,",""," // Array mutation methods to wrap"," methods = ['push','pop','shift','unshift','splice','sort','reverse'],",""," // fix for IE + __proto__ problem"," // define methods as inenumerable if __proto__ is present,"," // otherwise enumerable so we can loop through and manually"," // attach to array instances"," hasProto = ({}).__proto__","","// The proxy prototype to replace the __proto__ of","// an observed array","var ArrayProxy = Object.create(Array.prototype)","","// Define mutation interceptors so we can emit the mutation info","methods.forEach(function (method) {"," def(ArrayProxy, method, function () {"," var result = Array.prototype[method].apply(this, arguments)"," this.__observer__.emit('mutate', this.__observer__.path, this, {"," method: method,"," args: slice.call(arguments),"," result: result"," })"," return result"," }, !hasProto)","})","","// Augment it with several convenience methods","var extensions = {"," remove: function (index) {"," if (typeof index === 'function') {"," var i = this.length,"," removed = []"," while (i--) {"," if (index(this[i])) {"," removed.push(this.splice(i, 1)[0])"," }"," }"," return removed.reverse()"," } else {"," if (typeof index !== 'number') {"," index = this.indexOf(index)"," }"," if (index > -1) {"," return this.splice(index, 1)[0]"," }"," }"," },"," replace: function (index, data) {"," if (typeof index === 'function') {"," var i = this.length,"," replaced = [],"," replacer"," while (i--) {"," replacer = index(this[i])"," if (replacer !== undefined) {"," replaced.push(this.splice(i, 1, replacer)[0])"," }"," }"," return replaced.reverse()"," } else {"," if (typeof index !== 'number') {"," index = this.indexOf(index)"," }"," if (index > -1) {"," return this.splice(index, 1, data)[0]"," }"," }"," }","}","","for (var method in extensions) {"," def(ArrayProxy, method, extensions[method], !hasProto)","}","","/**"," * Watch an object based on type"," */","function watch (obj, path, observer) {"," var type = typeOf(obj)"," if (type === 'Object') {"," watchObject(obj, path, observer)"," } else if (type === 'Array') {"," watchArray(obj, path, observer)"," }","}","","/**"," * Watch an Object, recursive."," */","function watchObject (obj, path, observer) {"," for (var key in obj) {"," var keyPrefix = key.charAt(0)"," if (keyPrefix !== '$' && keyPrefix !== '_') {"," bind(obj, key, path, observer)"," }"," }","}","","/**"," * Watch an Array, overload mutation methods"," * and add augmentations by intercepting the prototype chain"," */","function watchArray (arr, path, observer) {"," def(arr, '__observer__', observer)"," observer.path = path"," if (hasProto) {"," arr.__proto__ = ArrayProxy"," } else {"," for (var key in ArrayProxy) {"," def(arr, key, ArrayProxy[key])"," }"," }","}","","/**"," * Define accessors for a property on an Object"," * so it emits get/set events."," * Then watch the value itself."," */","function bind (obj, key, path, observer) {"," var val = obj[key],"," watchable = isWatchable(val),"," values = observer.values,"," fullKey = (path ? path + '.' : '') + key"," values[fullKey] = val"," // emit set on bind"," // this means when an object is observed it will emit"," // a first batch of set events."," observer.emit('set', fullKey, val)"," Object.defineProperty(obj, key, {"," enumerable: true,"," get: function () {"," // only emit get on tip values"," if (depsOb.active && !watchable) {"," observer.emit('get', fullKey)"," }"," return values[fullKey]"," },"," set: function (newVal) {"," values[fullKey] = newVal"," ensurePaths(key, newVal, values)"," observer.emit('set', fullKey, newVal)"," watch(newVal, fullKey, observer)"," }"," })"," watch(val, fullKey, observer)","}","","/**"," * Check if a value is watchable"," */","function isWatchable (obj) {"," var type = typeOf(obj)"," return type === 'Object' || type === 'Array'","}","","/**"," * When a value that is already converted is"," * observed again by another observer, we can skip"," * the watch conversion and simply emit set event for"," * all of its properties."," */","function emitSet (obj, observer, set) {"," if (typeOf(obj) === 'Array') {"," set('length', obj.length)"," } else {"," var key, val, values = observer.values"," for (key in observer.values) {"," val = values[key]"," set(key, val)"," }"," }","}","","/**"," * Sometimes when a binding is found in the template, the value might"," * have not been set on the VM yet. To ensure computed properties and"," * dependency extraction can work, we have to create a dummy value for"," * any given path."," */","function ensurePaths (key, val, paths) {"," key += '.'"," for (var path in paths) {"," if (!path.indexOf(key)) {"," ensurePath(val, path.replace(key, ''))"," }"," }","}","","/**"," * walk along a path and make sure it can be accessed"," * and enumerated in that object"," */","function ensurePath (obj, key) {"," if (typeOf(obj) !== 'Object') return"," var path = key.split('.'), sec"," for (var i = 0, d = path.length - 1; i < d; i++) {"," sec = path[i]"," if (!obj[sec]) obj[sec] = {}"," obj = obj[sec]"," }"," if (typeOf(obj) === 'Object') {"," sec = path[i]"," if (!(sec in obj)) obj[sec] = undefined"," }","}","","module.exports = {",""," // used in v-repeat"," watchArray: watchArray,"," ensurePath: ensurePath,"," ensurePaths: ensurePaths,",""," /**"," * Observe an object with a given path,"," * and proxy get/set/mutate events to the provided observer."," */"," observe: function (obj, rawPath, observer) {"," if (isWatchable(obj)) {"," var path = rawPath + '.',"," ob, alreadyConverted = !!obj.__observer__"," if (!alreadyConverted) {"," def(obj, '__observer__', new Emitter())"," }"," ob = obj.__observer__"," ob.values = ob.values || utils.hash()"," var proxies = observer.proxies[path] = {"," get: function (key) {"," observer.emit('get', path + key)"," },"," set: function (key, val) {"," observer.emit('set', path + key, val)"," },"," mutate: function (key, val, mutation) {"," // if the Array is a root value"," // the key will be null"," var fixedPath = key ? path + key : rawPath"," observer.emit('mutate', fixedPath, val, mutation)"," // also emit set for Array's length when it mutates"," var m = mutation.method"," if (m !== 'sort' && m !== 'reverse') {"," observer.emit('set', fixedPath + '.length', val.length)"," }"," }"," }"," ob"," .on('get', proxies.get)"," .on('set', proxies.set)"," .on('mutate', proxies.mutate)"," if (alreadyConverted) {"," emitSet(obj, ob, proxies.set)"," } else {"," watch(obj, null, ob)"," }"," }"," },",""," /**"," * Cancel observation, turn off the listeners."," */"," unobserve: function (obj, path, observer) {"," if (!obj || !obj.__observer__) return"," path = path + '.'"," var proxies = observer.proxies[path]"," obj.__observer__"," .off('get', proxies.get)"," .off('set', proxies.set)"," .off('mutate', proxies.mutate)"," observer.proxies[path] = null"," }","}","});","require.register(\"vue/src/directive.js\", function(exports, require, module){","var config = require('./config'),"," utils = require('./utils'),"," directives = require('./directives'),"," filters = require('./filters'),",""," // Regexes!",""," // regex to split multiple directive expressions"," // split by commas, but ignore commas within quotes, parens and escapes."," SPLIT_RE = /(?:['\"](?:\\\\.|[^'\"])*['\"]|\\((?:\\\\.|[^\\)])*\\)|\\\\.|[^,])+/g,",""," // match up to the first single pipe, ignore those within quotes."," KEY_RE = /^(?:['\"](?:\\\\.|[^'\"])*['\"]|\\\\.|[^\\|]|\\|\\|)+/,",""," ARG_RE = /^([\\w- ]+):(.+)$/,"," FILTERS_RE = /\\|[^\\|]+/g,"," FILTER_TOKEN_RE = /[^\\s']+|'[^']+'/g,"," NESTING_RE = /^\\^+/,"," SINGLE_VAR_RE = /^[\\w\\.\\$]+$/","","/**"," * Directive class"," * represents a single directive instance in the DOM"," */","function Directive (definition, expression, rawKey, compiler, node) {",""," this.compiler = compiler"," this.vm = compiler.vm"," this.el = node",""," var isSimple = expression === ''",""," // mix in properties from the directive definition"," if (typeof definition === 'function') {"," this[isSimple ? 'bind' : '_update'] = definition"," } else {"," for (var prop in definition) {"," if (prop === 'unbind' || prop === 'update') {"," this['_' + prop] = definition[prop]"," } else {"," this[prop] = definition[prop]"," }"," }"," }",""," // empty expression, we're done."," if (isSimple) {"," this.isSimple = true"," return"," }",""," this.expression = expression.trim()"," this.rawKey = rawKey"," "," parseKey(this, rawKey)",""," this.isExp = !SINGLE_VAR_RE.test(this.key)"," "," var filterExps = this.expression.slice(rawKey.length).match(FILTERS_RE)"," if (filterExps) {"," this.filters = []"," var i = 0, l = filterExps.length, filter"," for (; i < l; i++) {"," filter = parseFilter(filterExps[i], this.compiler)"," if (filter) this.filters.push(filter)"," }"," if (!this.filters.length) this.filters = null"," } else {"," this.filters = null"," }","}","","var DirProto = Directive.prototype","","/**"," * parse a key, extract argument and nesting/root info"," */","function parseKey (dir, rawKey) {",""," var key = rawKey"," if (rawKey.indexOf(':') > -1) {"," var argMatch = rawKey.match(ARG_RE)"," key = argMatch"," ? argMatch[2].trim()"," : key"," dir.arg = argMatch"," ? argMatch[1].trim()"," : null"," }",""," // nesting"," var firstChar = key.charAt(0)"," dir.root = firstChar === '*'"," dir.nesting = firstChar === '^'"," ? key.match(NESTING_RE)[0].length"," : false",""," if (dir.nesting) {"," key = key.slice(dir.nesting)"," } else if (dir.root) {"," key = key.slice(1)"," }",""," dir.key = key","}","","/**"," * parse a filter expression"," */","function parseFilter (filter, compiler) {",""," var tokens = filter.slice(1).match(FILTER_TOKEN_RE)"," if (!tokens) return"," tokens = tokens.map(function (token) {"," return token.replace(/'/g, '').trim()"," })",""," var name = tokens[0],"," apply = compiler.getOption('filters', name) || filters[name]"," if (!apply) {"," utils.warn('Unknown filter: ' + name)"," return"," }",""," return {"," name : name,"," apply : apply,"," args : tokens.length > 1"," ? tokens.slice(1)"," : null"," }","}","","/**"," * called when a new value is set "," * for computed properties, this will only be called once"," * during initialization."," */","DirProto.update = function (value, init) {"," if (!init && value === this.value) return"," this.value = value"," this.apply(value)","}","","/**"," * -- computed property only --"," * called when a dependency has changed"," */","DirProto.refresh = function (value) {"," // pass element and viewmodel info to the getter"," // enables context-aware bindings"," if (value) this.value = value",""," if (this.isFn) {"," value = this.value"," } else {"," value = this.value.$get()"," if (value !== undefined && value === this.computedValue) return"," this.computedValue = value"," }"," this.apply(value)","}","","/**"," * Actually invoking the _update from the directive's definition"," */","DirProto.apply = function (value) {"," this._update("," this.filters"," ? this.applyFilters(value)"," : value"," )","}","","/**"," * pipe the value through filters"," */","DirProto.applyFilters = function (value) {"," var filtered = value, filter"," for (var i = 0, l = this.filters.length; i < l; i++) {"," filter = this.filters[i]"," filtered = filter.apply.call(this.vm, filtered, filter.args)"," }"," return filtered","}","","/**"," * Unbind diretive"," * @ param {Boolean} update"," * Sometimes we call unbind before an update (i.e. not destroy)"," * just to teardown previous stuff, in that case we do not want"," * to null everything."," */","DirProto.unbind = function (update) {"," // this can be called before the el is even assigned..."," if (!this.el) return"," if (this._unbind) this._unbind(update)"," if (!update) this.vm = this.el = this.binding = this.compiler = null","}","","// exposed methods ------------------------------------------------------------","","/**"," * split a unquoted-comma separated expression into"," * multiple clauses"," */","Directive.split = function (exp) {"," return exp.indexOf(',') > -1"," ? exp.match(SPLIT_RE) || ['']"," : [exp]","}","","/**"," * make sure the directive and expression is valid"," * before we create an instance"," */","Directive.parse = function (dirname, expression, compiler, node) {",""," var prefix = config.prefix + '-'"," if (dirname.indexOf(prefix) !== 0) return"," dirname = dirname.slice(prefix.length)",""," var dir = compiler.getOption('directives', dirname) || directives[dirname]"," if (!dir) return utils.warn('unknown directive: ' + dirname)",""," var rawKey"," if (expression.indexOf('|') > -1) {"," var keyMatch = expression.match(KEY_RE)"," if (keyMatch) {"," rawKey = keyMatch[0].trim()"," }"," } else {"," rawKey = expression.trim()"," }"," "," // have a valid raw key, or be an empty directive"," return (rawKey || expression === '')"," ? new Directive(dir, expression, rawKey, compiler, node)"," : utils.warn('invalid directive expression: ' + expression)","}","","module.exports = Directive","});","require.register(\"vue/src/exp-parser.js\", function(exports, require, module){","var utils = require('./utils'),"," hasOwn = Object.prototype.hasOwnProperty","","// Variable extraction scooped from https://github.com/RubyLouvre/avalon","","var KEYWORDS ="," // keywords"," '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' +"," // reserved"," ',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' +"," // ECMA 5 - use strict"," ',arguments,let,yield' +"," // allow using Math in expressions"," ',Math',"," "," KEYWORDS_RE = new RegExp([\"\\\\b\" + KEYWORDS.replace(/,/g, '\\\\b|\\\\b') + \"\\\\b\"].join('|'), 'g'),"," REMOVE_RE = /\\/\\*(?:.|\\n)*?\\*\\/|\\/\\/[^\\n]*\\n|\\/\\/[^\\n]*$|'[^']*'|\"[^\"]*\"|[\\s\\t\\n]*\\.[\\s\\t\\n]*[$\\w\\.]+/g,"," SPLIT_RE = /[^\\w$]+/g,"," NUMBER_RE = /\\b\\d[^,]*/g,"," BOUNDARY_RE = /^,+|,+$/g","","/**"," * Strip top level variable names from a snippet of JS expression"," */","function getVariables (code) {"," code = code"," .replace(REMOVE_RE, '')"," .replace(SPLIT_RE, ',')"," .replace(KEYWORDS_RE, '')"," .replace(NUMBER_RE, '')"," .replace(BOUNDARY_RE, '')"," return code"," ? code.split(/,+/)"," : []","}","","/**"," * A given path could potentially exist not on the"," * current compiler, but up in the parent chain somewhere."," * This function generates an access relationship string"," * that can be used in the getter function by walking up"," * the parent chain to check for key existence."," *"," * It stops at top parent if no vm in the chain has the"," * key. It then creates any missing bindings on the"," * final resolved vm."," */","function getRel (path, compiler) {"," var rel = '',"," vm = compiler.vm,"," dot = path.indexOf('.'),"," key = dot > -1"," ? path.slice(0, dot)"," : path"," while (true) {"," if (hasOwn.call(vm, key)) {"," break"," } else {"," if (vm.$parent) {"," vm = vm.$parent"," rel += '$parent.'"," } else {"," break"," }"," }"," }"," compiler = vm.$compiler"," if ("," !hasOwn.call(compiler.bindings, path) &&"," path.charAt(0) !== '$'"," ) {"," compiler.createBinding(path)"," }"," return rel","}","","/**"," * Create a function from a string..."," * this looks like evil magic but since all variables are limited"," * to the VM's scope it's actually properly sandboxed"," */","function makeGetter (exp, raw) {"," /* jshint evil: true */"," var fn"," try {"," fn = new Function(exp)"," } catch (e) {"," utils.warn('Invalid expression: ' + raw)"," }"," return fn","}","","/**"," * Escape a leading dollar sign for regex construction"," */","function escapeDollar (v) {"," return v.charAt(0) === '$'"," ? '\\\\' + v"," : v","}","","module.exports = {",""," /**"," * Parse and return an anonymous computed property getter function"," * from an arbitrary expression, together with a list of paths to be"," * created as bindings."," */"," parse: function (exp, compiler) {"," // extract variable names"," var vars = getVariables(exp)"," if (!vars.length) {"," return makeGetter('return ' + exp, exp)"," }"," vars = utils.unique(vars)"," var accessors = '',"," // construct a regex to extract all valid variable paths"," // ones that begin with \"$\" are particularly tricky"," // because we can't use \\b for them"," pathRE = new RegExp("," \"[^$\\\\w\\\\.](\" +"," vars.map(escapeDollar).join('|') +"," \")[$\\\\w\\\\.]*\\\\b\", 'g'"," ),"," body = ('return ' + exp).replace(pathRE, function (path) {"," // keep track of the first char"," var c = path.charAt(0)"," path = path.slice(1)"," var val = 'this.' + getRel(path, compiler) + path"," accessors += val + ';'"," // don't forget to put that first char back"," return c + val"," })"," body = accessors + body"," return makeGetter(body, exp)"," }","}","});","require.register(\"vue/src/text-parser.js\", function(exports, require, module){","var BINDING_RE = /\\{\\{(.+?)\\}\\}/","","module.exports = {",""," /**"," * Parse a piece of text, return an array of tokens"," */"," parse: function (text) {"," if (!BINDING_RE.test(text)) return null"," var m, i, tokens = []"," /* jshint boss: true */"," while (m = text.match(BINDING_RE)) {"," i = m.index"," if (i > 0) tokens.push(text.slice(0, i))"," tokens.push({ key: m[1].trim() })"," text = text.slice(i + m[0].length)"," }"," if (text.length) tokens.push(text)"," return tokens"," }"," ","}","});","require.register(\"vue/src/deps-parser.js\", function(exports, require, module){","var Emitter = require('./emitter'),"," utils = require('./utils'),"," observer = new Emitter()","","/**"," * Auto-extract the dependencies of a computed property"," * by recording the getters triggered when evaluating it."," */","function catchDeps (binding) {"," if (binding.isFn) return"," utils.log('\\n─ ' + binding.key)"," var depsHash = utils.hash()"," observer.on('get', function (dep) {"," if (depsHash[dep.key]) return"," depsHash[dep.key] = 1"," utils.log(' └─ ' + dep.key)"," binding.deps.push(dep)"," dep.subs.push(binding)"," })"," binding.value.$get()"," observer.off('get')","}","","module.exports = {",""," /**"," * the observer that catches events triggered by getters"," */"," observer: observer,",""," /**"," * parse a list of computed property bindings"," */"," parse: function (bindings) {"," utils.log('\\nparsing dependencies...')"," observer.active = true"," bindings.forEach(catchDeps)"," observer.active = false"," utils.log('\\ndone.')"," }"," ","}","});","require.register(\"vue/src/filters.js\", function(exports, require, module){","var keyCodes = {"," enter : 13,"," tab : 9,"," 'delete' : 46,"," up : 38,"," left : 37,"," right : 39,"," down : 40,"," esc : 27","}","","module.exports = {",""," /**"," * 'abc' => 'Abc'"," */"," capitalize: function (value) {"," if (!value && value !== 0) return ''"," value = value.toString()"," return value.charAt(0).toUpperCase() + value.slice(1)"," },",""," /**"," * 'abc' => 'ABC'"," */"," uppercase: function (value) {"," return (value || value === 0)"," ? value.toString().toUpperCase()"," : ''"," },",""," /**"," * 'AbC' => 'abc'"," */"," lowercase: function (value) {"," return (value || value === 0)"," ? value.toString().toLowerCase()"," : ''"," },",""," /**"," * 12345 => $12,345.00"," */"," currency: function (value, args) {"," if (!value && value !== 0) return ''"," var sign = (args && args[0]) || '$',"," s = Math.floor(value).toString(),"," i = s.length % 3,"," h = i > 0 ? (s.slice(0, i) + (s.length > 3 ? ',' : '')) : '',"," f = '.' + value.toFixed(2).slice(-2)"," return sign + h + s.slice(i).replace(/(\\d{3})(?=\\d)/g, '$1,') + f"," },",""," /**"," * args: an array of strings corresponding to"," * the single, double, triple ... forms of the word to"," * be pluralized. When the number to be pluralized"," * exceeds the length of the args, it will use the last"," * entry in the array."," *"," * e.g. ['single', 'double', 'triple', 'multiple']"," */"," pluralize: function (value, args) {"," return args.length > 1"," ? (args[value - 1] || args[args.length - 1])"," : (args[value - 1] || args[0] + 's')"," },",""," /**"," * A special filter that takes a handler function,"," * wraps it so it only gets triggered on specific keypresses."," */"," key: function (handler, args) {"," if (!handler) return"," var code = keyCodes[args[0]]"," if (!code) {"," code = parseInt(args[0], 10)"," }"," return function (e) {"," if (e.keyCode === code) {"," handler.call(this, e)"," }"," }"," }","}","});","require.register(\"vue/src/transition.js\", function(exports, require, module){","var endEvent = sniffTransitionEndEvent(),"," config = require('./config'),"," enterClass = config.enterClass,"," leaveClass = config.leaveClass,"," // exit codes for testing"," codes = {"," 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"," }","","/**"," * stage:"," * 1 = enter"," * 2 = leave"," */","var transition = module.exports = function (el, stage, changeState, compiler) {",""," if (compiler.init) {"," changeState()"," return codes.INIT"," }",""," var transitionId = el.vue_trans",""," if (transitionId) {"," return applyTransitionFunctions("," el,"," stage,"," changeState,"," transitionId,"," compiler"," )"," } else if (transitionId === '') {"," return applyTransitionClass("," el,"," stage,"," changeState"," )"," } else {"," changeState()"," return codes.SKIP"," }","","}","","transition.codes = codes","","/**"," * Togggle a CSS class to trigger transition"," */","function applyTransitionClass (el, stage, changeState) {",""," if (!endEvent) {"," changeState()"," return codes.CSS_SKIP"," }",""," var classList = el.classList,"," lastLeaveCallback = el.vue_trans_cb",""," if (stage > 0) { // enter",""," // cancel unfinished leave transition"," if (lastLeaveCallback) {"," el.removeEventListener(endEvent, lastLeaveCallback)"," el.vue_trans_cb = null"," }",""," // set to hidden state before appending"," classList.add(enterClass)"," // append"," changeState()"," // force a layout so transition can be triggered"," /* jshint unused: false */"," var forceLayout = el.clientHeight"," // trigger transition"," classList.remove(enterClass)"," return codes.CSS_E",""," } else { // leave",""," // trigger hide transition"," classList.add(leaveClass)"," var onEnd = function (e) {"," if (e.target === el) {"," el.removeEventListener(endEvent, onEnd)"," el.vue_trans_cb = null"," // actually remove node here"," changeState()"," classList.remove(leaveClass)"," }"," }"," // attach transition end listener"," el.addEventListener(endEvent, onEnd)"," el.vue_trans_cb = onEnd"," return codes.CSS_L"," "," }","","}","","function applyTransitionFunctions (el, stage, changeState, functionId, compiler) {",""," var funcs = compiler.getOption('transitions', functionId)"," if (!funcs) {"," changeState()"," return codes.JS_SKIP"," }",""," var enter = funcs.enter,"," leave = funcs.leave",""," if (stage > 0) { // enter"," if (typeof enter !== 'function') {"," changeState()"," return codes.JS_SKIP_E"," }"," enter(el, changeState)"," return codes.JS_E"," } else { // leave"," if (typeof leave !== 'function') {"," changeState()"," return codes.JS_SKIP_L"," }"," leave(el, changeState)"," return codes.JS_L"," }","","}","","/**"," * Sniff proper transition end event name"," */","function sniffTransitionEndEvent () {"," var el = document.createElement('vue'),"," defaultEvent = 'transitionend',"," events = {"," 'transition' : defaultEvent,"," 'MozTransition' : defaultEvent,"," 'WebkitTransition' : 'webkitTransitionEnd'"," }"," for (var name in events) {"," if (el.style[name] !== undefined) {"," return events[name]"," }"," }","}","});","require.register(\"vue/src/directives/index.js\", function(exports, require, module){","var utils = require('../utils'),"," transition = require('../transition')","","module.exports = {",""," on : require('./on'),"," repeat : require('./repeat'),"," model : require('./model'),"," 'if' : require('./if'),",""," attr: function (value) {"," this.el.setAttribute(this.arg, value)"," },",""," text: function (value) {"," this.el.textContent = utils.toText(value)"," },",""," html: function (value) {"," this.el.innerHTML = utils.toText(value)"," },",""," visible: function (value) {"," this.el.style.visibility = value ? '' : 'hidden'"," },",""," show: function (value) {"," var el = this.el,"," target = value ? '' : 'none',"," change = function () {"," el.style.display = target"," }"," transition(el, value ? 1 : -1, change, this.compiler)"," },",""," 'class': function (value) {"," if (this.arg) {"," this.el.classList[value ? 'add' : 'remove'](this.arg)"," } else {"," if (this.lastVal) {"," this.el.classList.remove(this.lastVal)"," }"," if (value) {"," this.el.classList.add(value)"," this.lastVal = value"," }"," }"," },",""," style: {"," bind: function () {"," this.arg = convertCSSProperty(this.arg)"," },"," update: function (value) {"," this.el.style[this.arg] = value"," }"," }","}","","/**"," * convert hyphen style CSS property to Camel style"," */","var CONVERT_RE = /-(.)/g","function convertCSSProperty (prop) {"," if (prop.charAt(0) === '-') prop = prop.slice(1)"," return prop.replace(CONVERT_RE, function (m, char) {"," return char.toUpperCase()"," })","}","});","require.register(\"vue/src/directives/if.js\", function(exports, require, module){","var config = require('../config'),"," transition = require('../transition')","","module.exports = {",""," bind: function () {"," this.parent = this.el.parentNode"," this.ref = document.createComment(config.prefix + '-if-' + this.key)"," this.el.vue_ref = this.ref"," },",""," update: function (value) {",""," var el = this.el",""," if (!this.parent) { // the node was detached when bound"," if (!el.parentNode) {"," return"," } else {"," this.parent = el.parentNode"," }"," }",""," // should always have this.parent if we reach here"," var parent = this.parent,"," ref = this.ref,"," compiler = this.compiler",""," if (!value) {"," transition(el, -1, remove, compiler)"," } else {"," transition(el, 1, insert, compiler)"," }",""," function remove () {"," if (!el.parentNode) return"," // insert the reference node"," var next = el.nextSibling"," if (next) {"," parent.insertBefore(ref, next)"," } else {"," parent.appendChild(ref)"," }"," parent.removeChild(el)"," }",""," function insert () {"," if (el.parentNode) return"," parent.insertBefore(el, ref)"," parent.removeChild(ref)"," }"," },",""," unbind: function () {"," this.el.vue_ref = null"," }","}","});","require.register(\"vue/src/directives/repeat.js\", function(exports, require, module){","var Observer = require('../observer'),"," Emitter = require('../emitter'),"," utils = require('../utils'),"," config = require('../config'),"," transition = require('../transition'),"," ViewModel // lazy def to avoid circular dependency","","/**"," * Mathods that perform precise DOM manipulation"," * based on mutator method triggered"," */","var mutationHandlers = {",""," push: function (m) {"," var i, l = m.args.length,"," base = this.collection.length - l"," for (i = 0; i < l; i++) {"," this.buildItem(m.args[i], base + i)"," }"," },",""," pop: function () {"," var vm = this.vms.pop()"," if (vm) vm.$destroy()"," },",""," unshift: function (m) {"," var i, l = m.args.length"," for (i = 0; i < l; i++) {"," this.buildItem(m.args[i], i)"," }"," },",""," shift: function () {"," var vm = this.vms.shift()"," if (vm) vm.$destroy()"," },",""," splice: function (m) {"," var i, l,"," index = m.args[0],"," removed = m.args[1],"," added = m.args.length - 2,"," removedVMs = this.vms.splice(index, removed)"," for (i = 0, l = removedVMs.length; i < l; i++) {"," removedVMs[i].$destroy()"," }"," for (i = 0; i < added; i++) {"," this.buildItem(m.args[i + 2], index + i)"," }"," },",""," sort: function () {"," var key = this.arg,"," vms = this.vms,"," col = this.collection,"," l = col.length,"," sorted = new Array(l),"," i, j, vm, data"," for (i = 0; i < l; i++) {"," data = col[i]"," for (j = 0; j < l; j++) {"," vm = vms[j]"," if (vm[key] === data) {"," sorted[i] = vm"," break"," }"," }"," }"," for (i = 0; i < l; i++) {"," this.container.insertBefore(sorted[i].$el, this.ref)"," }"," this.vms = sorted"," },",""," reverse: function () {"," var vms = this.vms"," vms.reverse()"," for (var i = 0, l = vms.length; i < l; i++) {"," this.container.insertBefore(vms[i].$el, this.ref)"," }"," }","}","","module.exports = {",""," bind: function () {",""," var self = this,"," el = self.el,"," ctn = self.container = el.parentNode",""," // extract child VM information, if any"," ViewModel = ViewModel || require('../viewmodel')"," var componentId = utils.attr(el, 'component')"," self.ChildVM = self.compiler.getOption('components', componentId) || ViewModel",""," // extract transition information"," self.hasTrans = el.hasAttribute(config.attrs.transition)",""," // create a comment node as a reference node for DOM insertions"," self.ref = document.createComment(config.prefix + '-repeat-' + self.arg)"," ctn.insertBefore(self.ref, el)"," ctn.removeChild(el)",""," self.initiated = false"," self.collection = null"," self.vms = null"," self.mutationListener = function (path, arr, mutation) {"," self.detach()"," var method = mutation.method"," mutationHandlers[method].call(self, mutation)"," if (method !== 'push' && method !== 'pop') {"," self.updateIndexes()"," }"," self.retach()"," }",""," },",""," update: function (collection) {",""," this.unbind(true)"," // attach an object to container to hold handlers"," this.container.vue_dHandlers = utils.hash()"," // if initiating with an empty collection, we need to"," // force a compile so that we get all the bindings for"," // dependency extraction."," if (!this.initiated && (!collection || !collection.length)) {"," this.buildItem()"," this.initiated = true"," }"," collection = this.collection = collection || []"," this.vms = []",""," // listen for collection mutation events"," // the collection has been augmented during Binding.set()"," if (!collection.__observer__) Observer.watchArray(collection, null, new Emitter())"," collection.__observer__.on('mutate', this.mutationListener)",""," // create child-vms and append to DOM"," if (collection.length) {"," this.detach()"," for (var i = 0, l = collection.length; i < l; i++) {"," this.buildItem(collection[i], i)"," }"," this.retach()"," }"," },",""," /**"," * Create a new child VM from a data object"," * passing along compiler options indicating this"," * is a v-repeat item."," */"," buildItem: function (data, index) {",""," var node = this.el.cloneNode(true),"," ctn = this.container,"," scope = {},"," ref, item",""," // append node into DOM first"," // so v-if can get access to parentNode"," if (data) {"," ref = this.vms.length > index"," ? this.vms[index].$el"," : this.ref"," // make sure it works with v-if"," if (!ref.parentNode) ref = ref.vue_ref"," // process transition info before appending"," node.vue_trans = utils.attr(node, 'transition', true)"," transition(node, 1, function () {"," ctn.insertBefore(node, ref)"," }, this.compiler)"," }",""," // set data on scope and compile"," scope[this.arg] = data || {}"," item = new this.ChildVM({"," el: node,"," scope: scope,"," compilerOptions: {"," repeat: true,"," repeatIndex: index,"," repeatCollection: this.collection,"," repeatPrefix: this.arg,"," parentCompiler: this.compiler,"," delegator: ctn"," }"," })",""," if (!data) {"," // this is a forced compile for an empty collection."," // let's remove it..."," item.$destroy()"," } else {"," this.vms.splice(index, 0, item)"," }"," },",""," /**"," * Update index of each item after a mutation"," */"," updateIndexes: function () {"," var i = this.vms.length"," while (i--) {"," this.vms[i].$index = i"," }"," },",""," /**"," * Detach/retach the container from the DOM before mutation"," * so that batch DOM updates are done in-memory and faster"," */"," detach: function () {"," if (this.hasTrans) return"," var c = this.container,"," p = this.parent = c.parentNode"," this.next = c.nextSibling"," if (p) p.removeChild(c)"," },",""," retach: function () {"," if (this.hasTrans) return"," var n = this.next,"," p = this.parent,"," c = this.container"," if (!p) return"," if (n) {"," p.insertBefore(c, n)"," } else {"," p.appendChild(c)"," }"," },",""," unbind: function () {"," if (this.collection) {"," this.collection.__observer__.off('mutate', this.mutationListener)"," var i = this.vms.length"," while (i--) {"," this.vms[i].$destroy()"," }"," }"," var ctn = this.container,"," handlers = ctn.vue_dHandlers"," for (var key in handlers) {"," ctn.removeEventListener(handlers[key].event, handlers[key])"," }"," ctn.vue_dHandlers = null"," }","}","});","require.register(\"vue/src/directives/on.js\", function(exports, require, module){","var utils = require('../utils')","","function delegateCheck (el, root, identifier) {"," while (el && el !== root) {"," if (el[identifier]) return el"," el = el.parentNode"," }","}","","module.exports = {",""," isFn: true,",""," bind: function () {"," if (this.compiler.repeat) {"," // attach an identifier to the el"," // so it can be matched during event delegation"," this.el[this.expression] = true"," // attach the owner viewmodel of this directive"," this.el.vue_viewmodel = this.vm"," }"," },",""," update: function (handler) {"," this.unbind(true)"," if (typeof handler !== 'function') {"," return utils.warn('Directive \"on\" expects a function value.')"," }",""," var compiler = this.compiler,"," event = this.arg,"," ownerVM = this.binding.compiler.vm",""," if (compiler.repeat &&"," // do not delegate if the repeat is combined with an extended VM"," !this.vm.constructor.super &&"," // blur and focus events do not bubble"," event !== 'blur' && event !== 'focus') {",""," // for each blocks, delegate for better performance"," // focus and blur events dont bubble so exclude them"," var delegator = compiler.delegator,"," identifier = this.expression,"," dHandler = delegator.vue_dHandlers[identifier]",""," if (dHandler) return",""," // the following only gets run once for the entire each block"," dHandler = delegator.vue_dHandlers[identifier] = function (e) {"," var target = delegateCheck(e.target, delegator, identifier)"," if (target) {"," e.el = target"," e.vm = target.vue_viewmodel"," e.item = e.vm[compiler.repeatPrefix]"," handler.call(ownerVM, e)"," }"," }"," dHandler.event = event"," delegator.addEventListener(event, dHandler)",""," } else {",""," // a normal, single element handler"," var vm = this.vm"," this.handler = function (e) {"," e.el = e.currentTarget"," e.vm = vm"," if (compiler.repeat) {"," e.item = vm[compiler.repeatPrefix]"," }"," handler.call(ownerVM, e)"," }"," this.el.addEventListener(event, this.handler)",""," }"," },",""," unbind: function (update) {"," this.el.removeEventListener(this.arg, this.handler)"," this.handler = null"," if (!update) this.el.vue_viewmodel = null"," }","}","});","require.register(\"vue/src/directives/model.js\", function(exports, require, module){","var utils = require('../utils'),"," isIE9 = navigator.userAgent.indexOf('MSIE 9.0') > 0","","module.exports = {",""," bind: function () {",""," var self = this,"," el = self.el,"," type = el.type",""," self.lock = false",""," // determine what event to listen to"," self.event ="," (self.compiler.options.lazy ||"," el.tagName === 'SELECT' ||"," type === 'checkbox' ||"," type === 'radio')"," ? 'change'"," : 'input'",""," // determin the attribute to change when updating"," var attr = type === 'checkbox'"," ? 'checked'"," : 'value'",""," // attach listener"," self.set = self.filters"," ? function () {"," // if this directive has filters"," // we need to let the vm.$set trigger"," // update() so filters are applied."," // therefore we have to record cursor position"," // so that after vm.$set changes the input"," // value we can put the cursor back at where it is"," var cursorPos"," try {"," cursorPos = el.selectionStart"," } catch (e) {}"," // `input` event has weird updating issue with"," // International (e.g. Chinese) input methods,"," // have to use a Timeout to hack around it..."," setTimeout(function () {"," self.vm.$set(self.key, el[attr])"," if (cursorPos !== undefined) {"," el.setSelectionRange(cursorPos, cursorPos)"," }"," }, 0)"," }"," : function () {"," // no filters, don't let it trigger update()"," self.lock = true"," self.vm.$set(self.key, el[attr])"," self.lock = false"," }"," el.addEventListener(self.event, self.set)",""," // fix shit for IE9"," // since it doesn't fire input on backspace / del / cut"," if (isIE9) {"," self.onCut = function () {"," // cut event fires before the value actually changes"," setTimeout(function () {"," self.set()"," }, 0)"," }"," self.onDel = function (e) {"," if (e.keyCode === 46 || e.keyCode === 8) {"," self.set()"," }"," }"," el.addEventListener('cut', self.onCut)"," el.addEventListener('keyup', self.onDel)"," }"," },",""," update: function (value) {"," if (this.lock) return"," /* jshint eqeqeq: false */"," var self = this,"," el = self.el"," if (el.tagName === 'SELECT') { // select dropdown"," // setting