/* * es6-module-loader v0.5.4 * https://github.com/ModuleLoader/es6-module-loader * Implemented to the 2013-12-02 ES6 module specification draft * Copyright (c) 2014 Guy Bedford, Luke Hoban, Addy Osmani; Licensed MIT */ /* * ES6 Promises shim from when.js, Copyright (c) 2010-2014 Brian Cavalier, John Hann, MIT License */ !function(){return"undefined"!=typeof Promise&&Promise.all&&Promise.resolve&&Promise.reject}()&&!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.Promise=a():"undefined"!=typeof global?global.Promise=a():"undefined"!=typeof self&&(self.Promise=a())}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};a[g][0].call(j.exports,function(b){var c=a[g][1][b];return e(c?c:b)},j,j.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gf;++f)e[f]=d[f];else{for(a=d.length,b=this.tail;a>c;++f,++c)e[f]=d[c];for(c=0;b>c;++f,++c)e[f]=d[c]}this.buffer=e,this.head=0,this.tail=this.length},a})}("function"==typeof a&&a.amd?a:function(a){c.exports=a()})},{}],4:[function(b,c){!function(a){"use strict";a(function(a){var b,c;return b="undefined"!=typeof process&&null!==process&&"function"==typeof process.nextTick?function(a){process.nextTick(a)}:(c="function"==typeof MutationObserver&&MutationObserver||"function"==typeof WebKitMutationObserver&&WebKitMutationObserver)?function(a,b){function c(){var a=d;d=void 0,a()}var d,e=a.createElement("div"),f=new b(c);return f.observe(e,{attributes:!0}),function(a){d=a,e.setAttribute("class","x")}}(document,c):function(a){try{return a("vertx").runOnLoop||a("vertx").runOnContext}catch(b){}var c=setTimeout;return function(a){c(a,0)}}(a)})}("function"==typeof a&&a.amd?a:function(a){c.exports=a(b)})},{}],5:[function(b,c){!function(a){"use strict";a(function(){return function(a){function b(a){function b(a){f._handler.resolve(a)}function d(a){f._handler.reject(a)}function e(a){f._handler.notify(a)}var f=this;this._handler=new q,c(a,b,d,e)}function c(a,b,c,d){try{a(b,c,d)}catch(e){c(e)}}function d(a){return a instanceof b?a:new j(new r(k(a)))}function e(a){return new j(new r(new v(a)))}function f(){return G}function g(){return new j(new q)}function h(a){function b(a,b,c,d){c.when(F,F,void 0,a,function(a){b[d]=a,0===--g&&this.resolve(b)},a.reject,a.notify)}var c,d,e=new q,f=a.length>>>0,g=f,h=[];for(c=0;f>c;++c)c in a?(d=a[c],C(d)?b(e,h,l(d),c):(h[c]=d,--g)):--g;return 0===g&&e.resolve(h),new j(e)}function i(a){if(Object(a)===a&&0===a.length)return f();for(var b=new q,c=0;c0;)a.shift().run()},b})}("function"==typeof a&&a.amd?a:function(a){c.exports=a(b)})},{"./Queue":3}]},{},[1])(1)}),function(global){function __eval(__source,global,__sourceURL,__moduleName){try{eval('var __moduleName = "'+(__moduleName||"").replace('"','"')+'"; with(global) { (function() { '+__source+" \n }).call(global); }"+(__sourceURL&&!__source.match(/\/\/[@#] ?(sourceURL|sourceMappingURL)=([^\n]+)/)?"\n//# sourceURL="+__sourceURL:""))}catch(e){throw"SyntaxError"==e.name&&(e.message="Evaluating "+__sourceURL+"\n "+e.message),e}}!function(){function a(a){return{status:"loading",name:a,metadata:{},linkSets:[]}}function b(b,d,e,f){return new v(function(a){a(b.normalize(d,e,f))}).then(function(d){var e;if(b._modules[d])return e=a(d),e.status="linked",e;for(var f=0,g=b._loads.length;g>f;f++)if(e=b._loads[f],e.name==d)return e;return e=a(d),b._loads.push(e),c(b,e),e})}function c(a,b){d(a,b,v.resolve().then(function(){return a.locate({name:b.name,metadata:b.metadata})}))}function d(a,b,c){e(a,b,c.then(function(c){return"failed"==b.status?void 0:(b.address=c,a.fetch({name:b.name,metadata:b.metadata,address:c}))}))}function e(a,c,d){d.then(function(b){return"failed"==c.status?void 0:a.translate({name:c.name,metadata:c.metadata,address:c.address,source:b})}).then(function(b){return"failed"==c.status?void 0:(c.source=b,a.instantiate({name:c.name,metadata:c.metadata,address:c.address,source:b}))}).then(function(d){if("failed"==c.status)return void 0;var e;if(void 0===d){if(!global.traceur)throw new TypeError("Include Traceur for module syntax support");t||(t=global.traceur,$traceurRuntime.ModuleStore.get=$traceurRuntime.getModuleImpl=function(a){return System.get(a)}),c.address=c.address||"anon"+ ++z;var f=new t.syntax.Parser(new t.syntax.SourceFile(c.address,c.source));c.body=f.parseModule(),e=r(c.body),c.kind="declarative"}else{if("object"!=typeof d)throw TypeError("Invalid instantiate return value");e=d.deps||[],c.execute=d.execute,c.kind="dynamic"}c.dependencies={},c.depsList=e;for(var h=[],i=0,j=e.length;j>i;i++)(function(d){var e=b(a,d,c.name,c.address);e.then(function(a){if(c.dependencies[d]=a.name,"linked"!=a.status)for(var b=c.linkSets.concat([]),e=0,f=b.length;f>e;e++)g(b[e],a)}),h.push(e)})(e[i]);return v.all(h)}).then(function(){c.status="loaded";for(var a=c.linkSets.concat([]),b=0,d=a.length;d>b;b++)h(a[b],c)},function(a){c.status="failed",c.exception=a;for(var b=0,d=c.linkSets.length;d>b;b++)i(c.linkSets[b],a)})}function f(a,b){var c,d,e=new v(function(a,b){c=a,d=b}),f={loader:a,loads:[],done:e,resolve:c,reject:d,loadingCount:0};return g(f,b),f}function g(a,b){for(var c=0,d=a.loads.length;d>c;c++)if(a.loads[c]==b)return;a.loads.push(b),b.linkSets.push(a),"loaded"!=b.status&&a.loadingCount++;var e=a.loader;for(var f in b.dependencies){var h=b.dependencies[f];if(!e._modules[h])for(var c=0,d=e._loads.length;d>c;c++)if(e._loads[c].name==h){g(a,e._loads[c]);break}}}function h(a,b){if(a.loadingCount--,!(a.loadingCount>0)){var c=a.loads[0];try{o(a.loads,a.loader)}catch(d){return i(a,d)}a.resolve(c)}}function i(a,b){for(var c=a.loads.concat([]),d=0,e=c.length;e>d;d++){var f=c[d],g=x.call(f.linkSets,a);if(f.linkSets.splice(g,1),0==f.linkSets.length){var h=x.call(a.loader._loads,f);-1!=h&&a.loader._loads.splice(h,1)}}a.reject(b)}function j(a,b){b.name&&(a._modules[b.name]=b.module);var c=x.call(a._loads,b);-1!=c&&a._loads.splice(c,1);for(var d=0,e=b.linkSets.length;e>d;d++)c=x.call(b.linkSets[d].loads,b),b.linkSets[d].loads.splice(c,1);b.linkSets=[]}function k(a,b,c){return new v(l(a,b,c&&c.address?"fetch":"locate",void 0,c&&c.address,void 0)).then(function(a){return a})}function l(b,g,h,i,j,k){return function(l,m){if(b._modules[g])throw new TypeError('Module "'+g+'" already exists in the module table');for(var n=0,o=b._loads.length;o>n;n++)if(b._loads[n].name==g)throw new TypeError('Module "'+g+'" is already loading');var p=a(g);i&&(p.metadata=i);var q=f(b,p);b._loads.push(p),q.done.then(l,m),"locate"==h?c(b,p):"fetch"==h?d(b,p,v.resolve(j)):(p.address=j,e(b,p,v.resolve(k)))}}function m(a,b){return n(b.module,a),b.module.module}function n(a,b){if(a.module)return a.module;for(var c in a.dependencies){var d=a.dependencies[c];b._modules[d].module||n(b._modules[d],b)}t.options.sourceMaps=!0,t.options.modules="instantiate";var e=new t.util.ErrorReporter;e.reportMessageInternal=function(a,b){throw b+"\n"+a};var f=global.System;global.System=global.traceurSystem;var g=new t.codegeneration.module.AttachModuleNameTransformer(a.name).transformAny(a.body);g=new t.codegeneration.FromOptionsTransformer(e).transform(g),global.System=f,delete a.body;var h=new t.outputgeneration.SourceMapGenerator({file:a.address}),i={sourceMapGenerator:h},j=t.outputgeneration.TreeWriter.write(g,i);global.btoa&&(j+="\n//# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(i.sourceMap)))+"\n");var k=System.register;System.register=function(b,c,d){for(var e=0;eb;b++)if(this[b]===a)return b;return-1},y={};p.prototype={define:function(a,b,c){if(y[a])throw new TypeError("Module is already loading.");return y[a]=new v(l(this,a,c&&c.address?"fetch":"translate",c&&c.meta||{},c&&c.address,b)),y[a].then(function(){delete y[a]})},load:function(a,b){return this._modules[a]?(n(this._modules[a],this),v.resolve(this._modules[a].module)):y[a]?y[a]:(y[a]=k(this,a,b),y[a].then(function(){delete y[a]}))},module:function(b,c){var d=a();d.address=c&&c.address;var g=f(this,d),h=v.resolve(b),i=this,j=g.done.then(function(){return m(i,d)});return e(this,d,h),j},"import":function(a,b){if(this._modules[a])return n(this._modules[a],this),v.resolve(this._modules[a].module);var c=this;return(y[a]||(y[a]=k(this,a,b))).then(function(b){return delete y[a],m(c,b)})},eval:function(){throw new TypeError("Eval not implemented in polyfill")},get:function(a){return n(this._modules[a],this),this._modules[a].module},has:function(a){return!!this._modules[a]},set:function(a,b){if(!(b instanceof s))throw new TypeError("Set must be a module");this._modules[a]={module:b}},"delete":function(a){return this._modules[a]?delete this._modules[a]:!1},entries:function(){throw new TypeError("Iteration not yet implemented in the polyfill")},keys:function(){throw new TypeError("Iteration not yet implemented in the polyfill")},values:function(){throw new TypeError("Iteration not yet implemented in the polyfill")},normalize:function(a){return a},locate:function(a){return a.name},fetch:function(){throw new TypeError("Fetch not implemented")},translate:function(a){return a.source},instantiate:function(){}};var z=0;"object"==typeof exports&&(module.exports=p),global.Loader||(global.Loader=p),global.LoaderPolyfill=p,global.Module=s}()}("undefined"!=typeof global?global:this),function(a){function b(a){var b=String(a).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return b?{href:b[0]||"",protocol:b[1]||"",authority:b[2]||"",host:b[3]||"",hostname:b[4]||"",port:b[5]||"",pathname:b[6]||"",search:b[7]||"",hash:b[8]||""}:null}function c(a,c){function d(a){var b=[];return a.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(a){"/.."===a?b.pop():b.push(a)}),b.join("").replace(/^\//,"/"===a.charAt(0)?"/":"")}return c=b(c||""),a=b(a||""),c&&a?(c.protocol||a.protocol)+(c.protocol||c.authority?c.authority:a.authority)+d(c.protocol||c.authority||"/"===c.pathname.charAt(0)?c.pathname:c.pathname?(a.authority&&!a.pathname?"/":"")+a.pathname.slice(0,a.pathname.lastIndexOf("/")+1)+c.pathname:a.pathname)+(c.protocol||c.authority||c.pathname?c.search:c.search||a.search)+c.hash:null}function d(){document.removeEventListener("DOMContentLoaded",d,!1),window.removeEventListener("load",d,!1),e()}function e(){for(var a=document.getElementsByTagName("script"),b=0;b2)throw new TypeError("Only one wildcard in a path is permitted");1==g.length?d==f&&f.length>e.length&&(e=f):d.substr(0,g[0].length)==g[0]&&d.substr(d.length-g[1].length)==g[1]&&(e=f,b=d.substr(g[0].length,d.length-g[1].length-g[0].length))}var h=this.paths[e];return b&&(h=h.replace("*",b)),c(this.baseURL,h)},fetch:function(a){var b,d,e=new i(function(a,c){b=a,d=c});return f(c(this.baseURL,a.address),function(a){b(a)},d),e}});if(g){var l=window.location.href.split("#")[0].split("?")[0];k.baseURL=l.substring(0,l.lastIndexOf("/")+1)}else k.baseURL="./";if(k.paths={"*":"*.js"},a.System&&a.traceur&&(a.traceurSystem=a.System),a.System=k,g){var m=document.getElementsByTagName("script");m=m[m.length-1],"complete"===document.readyState?setTimeout(e):document.addEventListener&&(document.addEventListener("DOMContentLoaded",d,!1),window.addEventListener("load",d,!1)),m.getAttribute("data-init")&&window[m.getAttribute("data-init")]()}"object"==typeof exports&&(module.exports=k)}("undefined"!=typeof global?global:this);