From e6dfcb24cf48ff9e942a7e0e52c4ce015a226545 Mon Sep 17 00:00:00 2001 From: Manuel Mujica Date: Thu, 21 Sep 2017 17:05:49 -0300 Subject: [PATCH 1/2] Warn if a module is loaded at the same path twice Closes #1264 --- Gruntfile.js | 2 + src/system-extension-module-loaded-twice.js | 48 ++++++++++++++++++++ steal-sans-promises.js | 49 +++++++++++++++++++++ steal-sans-promises.production.js | 4 +- steal.js | 49 +++++++++++++++++++++ steal.production.js | 2 +- test/load_module_twice/dev.html | 30 +++++++++++++ test/load_module_twice/foo.js | 1 + test/load_module_twice/main.js | 7 +++ test/load_module_twice/package.json | 5 +++ test/test.js | 4 ++ 11 files changed, 198 insertions(+), 3 deletions(-) create mode 100644 src/system-extension-module-loaded-twice.js create mode 100644 test/load_module_twice/dev.html create mode 100644 test/load_module_twice/foo.js create mode 100644 test/load_module_twice/main.js create mode 100644 test/load_module_twice/package.json diff --git a/Gruntfile.js b/Gruntfile.js index 64189357a..2c9c8febb 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -92,6 +92,7 @@ module.exports = function (grunt) { "src/system-extension-contextual.js", "src/system-extension-script-module.js", "src/system-extension-steal.js", + "src/system-extension-module-loaded-twice.js", "src/trace/trace.js", "src/json/json.js", "src/cache-bust/cache-bust.js", @@ -117,6 +118,7 @@ module.exports = function (grunt) { "src/system-extension-contextual.js", "src/system-extension-script-module.js", "src/system-extension-steal.js", + "src/system-extension-module-loaded-twice.js", "src/trace/trace.js", "src/json/json.js", "src/cache-bust/cache-bust.js", diff --git a/src/system-extension-module-loaded-twice.js b/src/system-extension-module-loaded-twice.js new file mode 100644 index 000000000..adf5f71e1 --- /dev/null +++ b/src/system-extension-module-loaded-twice.js @@ -0,0 +1,48 @@ +/** + * Extension to warn users when a module is instantiated twice + * + * Multiple module instantiation might cause unexpected side effects + */ +addStealExtension(function(loader) { + var superInstantiate = loader.instantiate; + + var warn = console && typeof console.warn === "function" ? + console.warn.bind(console) : + null; + + loader._instantiatedModules = loader._instantiatedModules || {}; + + loader.instantiate = function(load) { + var instantiated = loader._instantiatedModules; + + if (warn && instantiated[load.address]) { + var loads = (loader._traceData && loader._traceData.loads) || {}; + var map = (loader._traceData && loader._traceData.parentMap) || {}; + + var parents = (map[load.name] ? Object.keys(map[load.name]) : []) + .map(function(parent) { + // module names might confuse people + return "\t " + loads[parent].address; + }) + .join("\n"); + + warn( + [ + "The module with address " + load.address + + " is being instantiated twice", + "This happens when module identifiers normalize to different module names.\n", + "HINT: Import the module using the ~/[modulePath] identifier" + + (parents ? " in " : ""), + (parents || "") + "\n", + "Learn more at https://stealjs.com/docs/moduleName.html and " + + "https://stealjs.com/docs/tilde.html" + ].join("\n") + ); + } else { + instantiated[load.address] = load; + } + + return superInstantiate.apply(loader, arguments); + }; +}); + diff --git a/steal-sans-promises.js b/steal-sans-promises.js index 99e369f71..03ab7cd6e 100644 --- a/steal-sans-promises.js +++ b/steal-sans-promises.js @@ -4982,6 +4982,55 @@ addStealExtension(function (loader) { return loaderInstantiate.call(loader, load); }; }); +/** + * Extension to warn users when a module is instantiated twice + * + * Multiple module instantiation might cause unexpected side effects + */ +addStealExtension(function(loader) { + var superInstantiate = loader.instantiate; + + var warn = console && typeof console.warn === "function" ? + console.warn.bind(console) : + null; + + loader._instantiatedModules = loader._instantiatedModules || {}; + + loader.instantiate = function(load) { + var instantiated = loader._instantiatedModules; + + if (warn && instantiated[load.address]) { + var loads = (loader._traceData && loader._traceData.loads) || {}; + var map = (loader._traceData && loader._traceData.parentMap) || {}; + + var parents = (map[load.name] ? Object.keys(map[load.name]) : []) + .map(function(parent) { + // module names might confuse people + return "\t " + loads[parent].address; + }) + .join("\n"); + + warn( + [ + "The module with address " + load.address + + " is being instantiated twice", + "This happens when module identifiers normalize to different module names.\n", + "HINT: Import the module using the ~/[modulePath] identifier" + + (parents ? " in " : ""), + (parents || "") + "\n", + "Learn more at https://stealjs.com/docs/moduleName.html and " + + "https://stealjs.com/docs/tilde.html" + ].join("\n") + ); + } else { + instantiated[load.address] = load; + } + + return superInstantiate.apply(loader, arguments); + }; +}); + + addStealExtension(function applyTraceExtension(loader) { if(loader._extensions) { loader._extensions.push(applyTraceExtension); diff --git a/steal-sans-promises.production.js b/steal-sans-promises.production.js index 9638bc449..ee1573e68 100644 --- a/steal-sans-promises.production.js +++ b/steal-sans-promises.production.js @@ -1,7 +1,7 @@ /* - * steal v1.5.9 + * steal v1.5.13 * * Copyright (c) 2017 Bitovi; Licensed MIT */ -!function(__global){function __eval(__source,__global,__load){try{eval('(function() { var __moduleName = "'+(__load.name||"").replace('"','"')+'"; '+__source+" \n }).call(__global);")}catch(e){throw"SyntaxError"!=e.name&&"TypeError"!=e.name||(e.message="Evaluating "+(__load.name||load.address)+"\n\t"+e.message),e}}__global.$__Object$getPrototypeOf=Object.getPrototypeOf||function(e){return e.__proto__};var $__Object$defineProperty;!function(){try{Object.defineProperty({},"a",{})&&($__Object$defineProperty=Object.defineProperty)}catch(e){$__Object$defineProperty=function(e,t,n){try{e[t]=n.value||n.get.call(e)}catch(e){}}}}(),__global.$__Object$create=Object.create||function(e,t){function n(){}if(n.prototype=e,"object"==typeof t)for(prop in t)t.hasOwnProperty(prop)&&(n[prop]=t[prop]);return new n},function(){function e(e){return{status:"loading",name:e,linkSets:[],dependencies:[],metadata:{}}}function t(e,t,n){return new P(i({step:n.address?"fetch":"locate",loader:e,moduleName:t,moduleMetadata:n&&n.metadata||{},moduleSource:n.source,moduleAddress:n.address}))}function n(t,n,a,o){return new P(function(e,r){e(t.loaderObj.normalize(n,a,o))}).then(function(n){var a;if(t.modules[n])return a=e(n),a.status="linked",a.module=t.modules[n],a;for(var o=0,i=t.loads.length;o",t.isDeclarative=!0,e.loaderObj.transpile(t).then(function(e){var n=__global.System,r=n.register;n.register=function(e,n,r){var a=r,o=n;"string"!=typeof e&&(a=o,o=e),t.declare=a,t.depsList=o},__eval(e,__global,t),n.register=r});if("object"!=typeof n)throw TypeError("Invalid instantiate return value");t.depsList=n.deps||[],t.execute=n.execute,t.isDeclarative=!1}}).then(function(){if("loading"==t.status){t.dependencies=[];for(var r=t.depsList,a=[],o=0,i=r.length;o0)){var n=e.startingLoad;if(!1===e.loader.loaderObj.execute){for(var r=[].concat(e.loads),a=0,o=r.length;a")+"\n")),a=w(a,'Error loading "'+t.name+'" at '+(t.address||"")+"\n");for(var o=e.loads.concat([]),i=0,s=o.length;i=0;i--){for(var s=r[i],l=0;l=0;r-=1){var a=n[r];-1===t.indexOf(a)&&t.unshift(a)}else t=["es2015-no-commonjs","react","stage-0"];return t}function d(e){return(e.version?+e.version.split(".")[0]:6)||6}function c(e,t){var n=this.babelOptions||{};return n.sourceMap="inline",n.filename=e.address,n.code=!0,n.ast=!1,d(t)>=6?(delete n.optional,delete n.whitelist,delete n.blacklist,n.presets=u(n.presets),n.plugins=l(n.plugins)):(n.modules="system",n.blacklist||(n.blacklist=["react"])),n}function f(e){var t=e.types;return{visitor:{Program:function(e,n){e.unshiftContainer("body",[t.exportNamedDeclaration(null,[t.exportSpecifier(t.identifier("true"),t.identifier("__esModule"))])])}}}}function p(e,t){var n=t.Babel||t.babel||t,r=d(n),a=c.call(this,e,n);return Promise.all([v.call(this,n,a),g.call(this,n,a)]).then(function(t){return r>=6&&(a.plugins=[f].concat(t[0]),a.presets=t[1]),n.transform(e.source,a).code+"\n//# sourceURL="+e.address+"!eval"})}var m=__global,h="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process);e.prototype.transpiler="babel",e.prototype.transpile=function(e){var n=this;return n.transpilerHasRun||(m.traceur&&!n.has("traceur")&&n.set("traceur",t(n,"traceur")),m.Babel&&!n.has("babel")&&n.set("babel",t(n,"Babel")),n.transpilerHasRun=!0),n.import(n.transpiler).then(function(t){var a=t;return a.__useDefault&&(a=a.default),(a.Compiler?r:p).call(n,e,a)}).then(function(t){return'var __moduleAddress = "'+e.address+'";'+t})},e.prototype.instantiate=function(e){var r=this;return Promise.resolve(r.normalize(r.transpiler)).then(function(a){if(e.name===a)return{deps:[],execute:function(){var a=m.System,o=m.Reflect.Loader;return __eval("(function(require,exports,module){"+e.source+"})();",m,e),m.System=a,m.Reflect.Loader=o,t(r,n(e.name))}}})};var v=function(){function e(e,r){var a=[];return(r||[]).forEach(function(r){var o=i(r);if(!s(r)||t(e,o))a.push(r);else if(!t(e,o)){var l=this.configMain||"package.json!npm",u=n(o);a.push(this.import(u,{name:l}).then(function(e){var t=e.__esModule?e.default:e;return"string"==typeof r?t:[t,r[1]]}))}},this),Promise.all(a)}function t(e,t){var n=/^(?:babel-plugin-)/;return!!(e.availablePlugins||{})[n.test(t)?t.replace("babel-plugin-",""):t]}function n(e){var t=/^(?:babel-plugin-)/;return/\//.test(e)||t.test(e)?e:"babel-plugin-"+e}return function(t,n){var r=o.call(this),a=n.env||{},i=[e.call(this,t,n.plugins)];for(var s in a)if(r===s){var l=a[s].plugins||[];i.push(e.call(this,t,l))}return Promise.all(i).then(function(e){var t=[];return e.forEach(function(e){t=t.concat(e)}),t})}}(),g=function(){function e(e,r){var a=[];return(r||[]).forEach(function(r){var o=i(r);if(!s(r)||t(e,o))a.push(r);else if(!t(e,o)){var l=this.configMain||"package.json!npm",u=n(o);a.push(this.import(u,{name:l}).then(function(e){var t=e.__esModule?e.default:e;return"string"==typeof r?t:[t,r[1]]}))}},this),Promise.all(a)}function t(e,t){var n=/^(?:babel-preset-)/;return!!(e.availablePresets||{})[n.test(t)?t.replace("babel-preset-",""):t]}function n(e){var t=/^(?:babel-preset-)/;return/\//.test(e)||t.test(e)?e:"babel-preset-"+e}return function(t,n){var r=o.call(this),a=n.env||{},i=[e.call(this,t,n.presets)];for(var s in a)if(r===s){var l=a[s].presets||[];i.push(e.call(this,t,l))}return Promise.all(i).then(function(e){var t=[];return e.forEach(function(e){t=t.concat(e)}),t})}}()}(__global.LoaderPolyfill),function(){function e(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@\/?#]*(?::[^:@\/?#]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}function t(e){var t=[];return e.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?t.pop():t.push(e)}),t.join("").replace(/^\//,"/"===e.charAt(0)?"/":"")}function n(n,r){var a=r,o=n;return i&&(a=a.replace(/\\/g,"/")),a=e(a||""),o=e(o||""),a&&o?(a.protocol||o.protocol)+(a.protocol||a.authority?a.authority:o.authority)+t(a.protocol||a.authority||"/"===a.pathname.charAt(0)?a.pathname:a.pathname?(o.authority&&!o.pathname?"/":"")+o.pathname.slice(0,o.pathname.lastIndexOf("/")+1)+a.pathname:o.pathname)+(a.protocol||a.authority||a.pathname?a.search:a.search||o.search)+a.hash:null}var r,a="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,o="undefined"!=typeof window&&!a,i="undefined"!=typeof process&&!!process.platform.match(/^win/),s=__global.Promise||require("when/es6-shim/Promise");if("undefined"!=typeof XMLHttpRequest)r=function(e,t,n){function r(){t(o.responseText)}function a(){var t=o.statusText+": "+e||"XHR error",r=new Error(t);r.statusCode=o.status,n(r)}var o=new XMLHttpRequest,i=!0,s=!1;if(!("withCredentials"in o)){var l=/^(\w+:)?\/\/([^\/]+)/.exec(e);l&&(i=l[2]===window.location.host,l[1]&&(i&=l[1]===window.location.protocol))}i||"undefined"==typeof XDomainRequest||((o=new XDomainRequest).onload=r,o.onerror=a,o.ontimeout=a,o.onprogress=function(){},o.timeout=0,s=!0),o.onreadystatechange=function(){4===o.readyState&&(200===o.status||0==o.status&&o.responseText?r():a())},o.open("GET",e,!0),s&&setTimeout(function(){o.send()},0),o.send(null)};else if("undefined"!=typeof require){var l,u=/ENOENT/;r=function(e,t,n){if("file:"!=e.substr(0,5))throw"Only file URLs of the form file: allowed running in Node.";l=l||require("fs");var r=e.substr(5);return i&&(r=r.replace(/\//g,"\\")),l.readFile(r,function(e,r){if(e)return u.test(e.message)&&(e.statusCode=404),n(e);t(r+"")})}}else{if("function"!=typeof fetch)throw new TypeError("No environment fetch API available.");r=function(e,t,n){fetch(e).then(function(e){return e.text()}).then(function(e){t(e)}).then(null,function(e){n(e)})}}var d=new(function(e){function t(t){if(e.call(this,t||{}),"undefined"!=typeof location&&location.href){var n=__global.location.href.split("#")[0].split("?")[0];this.baseURL=n.substring(0,n.lastIndexOf("/")+1)}else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURL");this.baseURL="file:"+process.cwd()+"/",i&&(this.baseURL=this.baseURL.replace(/\\/g,"/"))}this.paths={"*":"*.js"}}return t.__proto__=null!==e?e:Function.prototype,t.prototype=$__Object$create(null!==e?e.prototype:null),$__Object$defineProperty(t.prototype,"constructor",{value:t}),$__Object$defineProperty(t.prototype,"global",{get:function(){return o?window:a?self:__global},enumerable:!1}),$__Object$defineProperty(t.prototype,"strict",{get:function(){return!0},enumerable:!1}),$__Object$defineProperty(t.prototype,"normalize",{value:function(e,t,n){if("string"!=typeof e)throw new TypeError("Module name must be a string");var r=e.split("/");if(0==r.length)throw new TypeError("No module name provided");var a=0,o=!1,i=0;if("."==r[0]){if(++a==r.length)throw new TypeError('Illegal module name "'+e+'"');o=!0}else{for(;".."==r[a];)if(++a==r.length)throw new TypeError('Illegal module name "'+e+'"');a&&(o=!0),i=a}for(var s=a;s2)throw new TypeError("Only one wildcard in a path is permitted");if(1==s.length){if(r==i&&i.length>a.length){a=i;break}}else r.substr(0,s[0].length)==s[0]&&r.substr(r.length-s[1].length)==s[1]&&(a=i,t=r.substr(s[0].length,r.length-s[1].length-s[0].length))}var l=this.paths[a];return t&&(l=l.replace("*",t)),o&&(l=l.replace(/#/g,"%23")),n(this.baseURL,l)},enumerable:!1,writable:!0}),$__Object$defineProperty(t.prototype,"fetch",{value:function(e){var t=this;return new s(function(a,o){r(n(t.baseURL,e.address),function(e){a(e)},o)})},enumerable:!1,writable:!0}),t}(__global.LoaderPolyfill));"object"==typeof exports&&(module.exports=d),__global.System=d}()}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:global),function(e){e.upgradeSystemLoader=function(){function t(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@\/?#]*(?::[^:@\/?#]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}function r(e,n){var r=e,a=n;return x&&(a=a.replace(/\\/g,"/")),a=t(a||""),r=t(r||""),a&&r?(a.protocol||r.protocol)+(a.protocol||a.authority?a.authority:r.authority)+function(e){var t=[];return e.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?t.pop():t.push(e)}),t.join("").replace(/^\//,"/"===e.charAt(0)?"/":"")}(a.protocol||a.authority||"/"===a.pathname.charAt(0)?a.pathname:a.pathname?(r.authority&&!r.pathname?"/":"")+r.pathname.slice(0,r.pathname.lastIndexOf("/")+1)+a.pathname:r.pathname)+(a.protocol||a.authority||a.pathname?a.search:a.search||r.search)+a.hash:null}function a(t){var n={};if(("object"==typeof t||"function"==typeof t)&&t!==e)if(_)for(var r in t)"default"!==r&&o(n,t,r);else i(n,t);return n.default=t,w(n,"__useDefault",{value:!0}),n}function o(e,t,n){try{var r;(r=Object.getOwnPropertyDescriptor(t,n))&&w(e,n,r)}catch(r){return e[n]=t[n],!1}}function i(e,t,n){var r=t&&t.hasOwnProperty;for(var a in t)r&&!t.hasOwnProperty(a)||n&&a in e||(e[a]=t[a]);return e}function s(e){function t(e,t){t._extensions=[];for(var n=0,r=e.length;n=0;o--){for(var i=r[o],s=0;st.index)return!0;return!1}r.lastIndex=a.lastIndex=o.lastIndex=0;var n,i=[],s=[],l=[];if(e.length/e.split("\n").length<200){for(;n=o.exec(e);)s.push([n.index,n.index+n[0].length]);for(;n=a.exec(e);)t(s,n)||l.push([n.index,n.index+n[0].length])}for(;n=r.exec(e);)if(!t(s,n)&&!t(l,n)){var u=n[1].substr(1,n[1].length-2);if(u.match(/"|'/))continue;i.push(u)}return i}e._extensions.push(f);var n=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])(exports\s*(\[['"]|\.)|module(\.exports|\['exports'\]|\["exports"\])\s*(\[['"]|[=,\.])|Object.defineProperty\(\s*module\s*,\s*(?:'|")exports(?:'|"))/,r=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF."'])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')\s*\)/g,a=/(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,o=/("[^"\\\n\r]*(\\.[^"\\\n\r]*)*"|'[^'\\\n\r]*(\\.[^'\\\n\r]*)*')/g,i=e.instantiate;e.instantiate=function(a){return a.metadata.format||(n.lastIndex=0,r.lastIndex=0,(r.exec(a.source)||n.exec(a.source))&&(a.metadata.format="cjs")),"cjs"==a.metadata.format&&(a.metadata.deps=a.metadata.deps?a.metadata.deps.concat(t(a.source)):t(a.source),a.metadata.executingRequire=!0,a.metadata.execute=function(t,n,r){var o=(a.address||"").split("/");o.pop(),o=o.join("/"),b._nodeRequire&&(o=o.substr(5));e.global._g={global:e.global,exports:n,module:r,require:t,__filename:b._nodeRequire?a.address.substr(5):a.address,__dirname:o};var i=e.global.define;e.global.define=void 0;var s={name:a.name,source:"(function() {\n(function(global, exports, module, require, __filename, __dirname){\n"+a.source+"\n}).call(_g.exports, _g.global, _g.exports, _g.module, _g.require, _g.__filename, _g.__dirname);})();",address:a.address};e.__exec(s),e.global.define=i,e.global._g=void 0}),i.call(this,a)}}function p(e){function t(e,t){function n(e,t){for(var n=0;nt)return!0;return!1}d.lastIndex=f.lastIndex=0;for(var r,a=[],o=[];r=f.exec(e);)a.push([r.index,r.index+r[0].length]);for(;r=d.exec(e);)n(a,r.index+1)||o.push([r.index,r.index+r[0].length]);var i=(e.match(g)[1].split(",")[t]||"require").replace(b,""),s=x[i]||(x[i]=new RegExp(h+i+v,"g"));s.lastIndex=0;for(var l=[];r=s.exec(e);)if(!n(a,r.index)&&!n(o,r.index)){var u=r[1].substr(1,r[1].length-2);u&&l.push(u)}return l}function n(e,t,r,a){var o=this;if("object"==typeof e&&!(e instanceof Array))return n.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1));if(!(e instanceof Array)){if("string"==typeof e){var i=o.get(e);return i.__useDefault?i.default:i}throw new TypeError("Invalid require")}Promise.all(e.map(function(e){return o.import(e,a)})).then(function(e){t&&t.apply(null,e)},r)}function r(e,t,r){return function(a,o,i){return"string"==typeof a?t(a):n.call(r,a,o,i,{name:e})}}function a(e){function n(n,a,o){var i=n,s=a,l=o;"string"!=typeof i&&(l=s,s=i,i=null),s instanceof Array||(l=s,s=["require","exports","module"]),"function"!=typeof l&&(l=function(e){return function(){return e}}(l)),void 0===s[s.length-1]&&s.pop();var u,d,f;if(-1!=(u=y.call(s,"require"))){s.splice(u,1);var p=l.toString();s=s.concat(t(p,u))}-1!=(d=y.call(s,"exports"))&&s.splice(d,1),-1!=(f=y.call(s,"module"))&&s.splice(f,1);var m={deps:s,execute:function(t,n,a){for(var o=[],i=0;i=0;a--)e.source=e.source.substr(0,r[a].start)+r[a].postLocate(t[a])+e.source.substr(r[a].end,e.source.length);return o.call(n,e)})}}),x(function(e){e._contextualModules={},e.setContextual=function(e,t){this._contextualModules[e]=t};var t=e.normalize;e.normalize=function(e,n){var r=this,a=r.pluginLoader||r;if(n){var o=this._contextualModules[e];if(o){var i=e+"/"+n;return r.has(i)?Promise.resolve(i):("string"==typeof o&&(o=a.import(o)),Promise.resolve(o).then(function(e){var t=e;return t.default&&(t=t.default),Promise.resolve(t.call(r,n))}).then(function(e){return r.set(i,r.newModule(e)),i}))}}return t.apply(this,arguments)}}),x(function(e){function t(){document.removeEventListener("DOMContentLoaded",t,!1),window.removeEventListener("load",t,!1),n()}function n(){for(var t=document.getElementsByTagName("script"),n=0;nt.index)return!0;return!1}function n(e){for(;a=e.exec(r);)if(!t(i,a)){var n=a[1];o.push(n)}}var r=e.replace(c,"");u.lastIndex=c.lastIndex=d.lastIndex=f.lastIndex=0;var a,o=[],i=[];if(e.length/e.split("\n").length<200)for(;a=f.exec(r);)i.push([a.index,a.index+a[0].length]);return n(u),n(d),o}t._extensions&&t._extensions.push(e),t._traceData={loads:{},parentMap:{}},t.getDependencies=function(e){var t=this.getModuleLoad(e);return t?t.metadata.dependencies:void 0},t.getDependants=function(e){var t=[];return n(this._traceData.parentMap[e]||{},function(e){t.push(e)}),t},t.getModuleLoad=function(e){return this._traceData.loads[e]},t.getBundles=function(e,t){var r=t||{};r[e]=!0;var a=this,o=a._traceData.parentMap[e];if(!o)return[e];var i=[];return n(o,function(e,t){r[e]||(i=i.concat(a.getBundles(e,r)))}),i},t._allowModuleExecution={},t.allowModuleExecution=function(e){var t=this;return t.normalize(e).then(function(e){t._allowModuleExecution[e]=!0})};var a=t.normalize;t.normalize=function(e,t){var n=a.apply(this,arguments);if(t){var r=this._traceData.parentMap;return n.then(function(e){return r[e]||(r[e]={}),r[e][t]=!0,e})}return n};var o=function(){return t.newModule({})},i={traceur:!0,babel:!0},s=function(e){return i[e.name]||this._allowModuleExecution[e.name]},l=[].map||function(e){for(var t=[],n=0,r=this.length;n-1||o.indexOf("steal-sans-promises.production")>-1&&!n.env)&&this.config({env:s+"-production"}),(this.isEnv("production")||this.loadBundles)&&D.call(this),q.stealPath.set.call(this,i,n)}},devBundle:{order:16,set:function(e,t){var n=!0===e?"dev-bundle":e;n&&(this.devBundle=n)}},depsBundle:{order:17,set:function(e,t){var n=!0===e?"dev-bundle":e;n&&(this.depsBundle=n)}}};n(q,function(e,t){e.order?T.splice(e.order,0,t):T.push(t)}),function(e,t,r){var a=e.config;e.config=function(i){var s=o({},i);n(t,function(t){var n=r[t];if(n.set&&s[t]){var a=n.set.call(e,s[t],i);void 0!==a&&(e[t]=a),delete s[t]}}),a.call(this,s)}}(e,T,q),O.config=function(e){if("string"==typeof e)return this.loader[e];this.loader.config(e)},x(function(e){e.getEnv=function(){return(this.env||"").split("-")[1]||this.env},e.getPlatform=function(){var e=(this.env||"").split("-");return 2===e.length?e[0]:void 0},e.isEnv=function(e){return this.getEnv()===e},e.isPlatform=function(e){return this.getPlatform()===e}});var U=function(e){var n={},r=/Url$/,a=e.split("?"),o=a.shift(),i=a.join("?").split("&"),s=o.split("/");s.pop(),s.join("/");if(i.length&&i[0].length)for(var l,u=0;u1){var c=t(d[0]);n[c=c.replace(r,"URL")]=d.slice(1).join("=")}}return n},N=function(e){var r={},a=/Url$/;r.stealURL=e.src,n(e.attributes,function(e){var n=e.nodeName||e.name,o=t(0===n.indexOf("data-")?n.replace("data-",""):n);o=o.replace(a,"URL"),r[o]=""===e.value||e.value});var i=e.innerHTML;return/\S/.test(i)&&(r.mainSource=i),o(U(e.src),r)},B=function(){return new Promise(function(e,t){if(p)e(o({stealURL:location.href},U(location.href)));else if(m||h||v){if(document.currentScript)return void e(N(document.currentScript));var n=document.scripts;n.length&&e(N(n[n.length-1]))}else e({stealPath:__dirname})})};return O.startup=function(e){var t,n,a=this.loader;return w=new Promise(function(e,r){t=e,n=r}),S=B().then(function(i){var s;return s="object"==typeof e?o(e,i):i,a.config(s),z.call(a),a.loadBundles?(a.main||!a.isEnv("production")||a.stealBundled||b("Attribute 'main' is required in production environment. Please add it to the script tag."),a.import(a.configMain).then(t,n),w.then(function(e){return z.call(a),a.main?a.import(a.main):e})):(a.import(a.devBundle).then(function(){return a.import(a.configMain)}).then(function(){return a.import(a.depsBundle)}).then(t,n),(j=w.then(function(){return z.call(a),F.call(a),s&&a.config(s),a.import("@dev")})).then(function(){if(!a.main||a.localLoader)return w;var e=a.main;return"string"==typeof e&&(e=[e]),Promise.all(r(e,function(e){return a.import(e)}))}))}).then(function(e){return a.mainSource?a.module(a.mainSource):(a.loadScriptModules(),e)})},O.done=function(){return S},O.import=function(){var e=arguments,t=this.System;return w||(t.main||(t.main="@empty"),O.startup()),w.then(function(){var r=[];return n(e,function(e){r.push(t.import(e))}),r.length>1?Promise.all(r):r[0]})},O.setContextual=c.call(e.setContextual,e),O.isEnv=c.call(e.isEnv,e),O.isPlatform=c.call(e.isPlatform,e),O};if(!g||h||v){var S=e.steal;e.steal=j(System),e.steal.startup(S&&"object"==typeof S&&S).then(null,function(e){if("undefined"!=typeof console){var t=console;t[t.error?"error":"log"](e)}}),e.steal.clone=w}else e.steal=j(System),e.steal.System=System,e.steal.dev=require("./ext/dev.js"),steal.clone=w,module.exports=e.steal}("undefined"==typeof window?"undefined"==typeof global?this:global:window); \ No newline at end of file +!function(__global){function __eval(__source,__global,__load){try{eval('(function() { var __moduleName = "'+(__load.name||"").replace('"','"')+'"; '+__source+" \n }).call(__global);")}catch(e){throw"SyntaxError"!=e.name&&"TypeError"!=e.name||(e.message="Evaluating "+(__load.name||load.address)+"\n\t"+e.message),e}}__global.$__Object$getPrototypeOf=Object.getPrototypeOf||function(e){return e.__proto__};var $__Object$defineProperty;!function(){try{Object.defineProperty({},"a",{})&&($__Object$defineProperty=Object.defineProperty)}catch(e){$__Object$defineProperty=function(e,t,n){try{e[t]=n.value||n.get.call(e)}catch(e){}}}}(),__global.$__Object$create=Object.create||function(e,t){function n(){}if(n.prototype=e,"object"==typeof t)for(prop in t)t.hasOwnProperty(prop)&&(n[prop]=t[prop]);return new n},function(){function e(e){return{status:"loading",name:e,linkSets:[],dependencies:[],metadata:{}}}function t(e,t,n){return new M(i({step:n.address?"fetch":"locate",loader:e,moduleName:t,moduleMetadata:n&&n.metadata||{},moduleSource:n.source,moduleAddress:n.address}))}function n(t,n,a,o){return new M(function(e,r){e(t.loaderObj.normalize(n,a,o))}).then(function(n){var a;if(t.modules[n])return a=e(n),a.status="linked",a.module=t.modules[n],a;for(var o=0,i=t.loads.length;o",t.isDeclarative=!0,e.loaderObj.transpile(t).then(function(e){var n=__global.System,r=n.register;n.register=function(e,n,r){var a=r,o=n;"string"!=typeof e&&(a=o,o=e),t.declare=a,t.depsList=o},__eval(e,__global,t),n.register=r});if("object"!=typeof n)throw TypeError("Invalid instantiate return value");t.depsList=n.deps||[],t.execute=n.execute,t.isDeclarative=!1}}).then(function(){if("loading"==t.status){t.dependencies=[];for(var r=t.depsList,a=[],o=0,i=r.length;o0)){var n=e.startingLoad;if(!1===e.loader.loaderObj.execute){for(var r=[].concat(e.loads),a=0,o=r.length;a")+"\n")),a=w(a,'Error loading "'+t.name+'" at '+(t.address||"")+"\n");for(var o=e.loads.concat([]),i=0,s=o.length;i=0;i--){for(var s=r[i],l=0;l=0;r-=1){var a=n[r];-1===t.indexOf(a)&&t.unshift(a)}else t=["es2015-no-commonjs","react","stage-0"];return t}function d(e){return(e.version?+e.version.split(".")[0]:6)||6}function c(e,t){var n=this.babelOptions||{};return n.sourceMap="inline",n.filename=e.address,n.code=!0,n.ast=!1,d(t)>=6?(delete n.optional,delete n.whitelist,delete n.blacklist,n.presets=u(n.presets),n.plugins=l(n.plugins)):(n.modules="system",n.blacklist||(n.blacklist=["react"])),n}function f(e){var t=e.types;return{visitor:{Program:function(e,n){e.unshiftContainer("body",[t.exportNamedDeclaration(null,[t.exportSpecifier(t.identifier("true"),t.identifier("__esModule"))])])}}}}function p(e,t){var n=t.Babel||t.babel||t,r=d(n),a=c.call(this,e,n);return Promise.all([v.call(this,n,a),g.call(this,n,a)]).then(function(t){return r>=6&&(a.plugins=[f].concat(t[0]),a.presets=t[1]),n.transform(e.source,a).code+"\n//# sourceURL="+e.address+"!eval"})}var m=__global,h="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process);e.prototype.transpiler="babel",e.prototype.transpile=function(e){var n=this;return n.transpilerHasRun||(m.traceur&&!n.has("traceur")&&n.set("traceur",t(n,"traceur")),m.Babel&&!n.has("babel")&&n.set("babel",t(n,"Babel")),n.transpilerHasRun=!0),n.import(n.transpiler).then(function(t){var a=t;return a.__useDefault&&(a=a.default),(a.Compiler?r:p).call(n,e,a)}).then(function(t){return'var __moduleAddress = "'+e.address+'";'+t})},e.prototype.instantiate=function(e){var r=this;return Promise.resolve(r.normalize(r.transpiler)).then(function(a){if(e.name===a)return{deps:[],execute:function(){var a=m.System,o=m.Reflect.Loader;return __eval("(function(require,exports,module){"+e.source+"})();",m,e),m.System=a,m.Reflect.Loader=o,t(r,n(e.name))}}})};var v=function(){function e(e,r){var a=[];return(r||[]).forEach(function(r){var o=i(r);if(!s(r)||t(e,o))a.push(r);else if(!t(e,o)){var l=this.configMain||"package.json!npm",u=n(o);a.push(this.import(u,{name:l}).then(function(e){var t=e.__esModule?e.default:e;return"string"==typeof r?t:[t,r[1]]}))}},this),Promise.all(a)}function t(e,t){var n=/^(?:babel-plugin-)/;return!!(e.availablePlugins||{})[n.test(t)?t.replace("babel-plugin-",""):t]}function n(e){var t=/^(?:babel-plugin-)/;return/\//.test(e)||t.test(e)?e:"babel-plugin-"+e}return function(t,n){var r=o.call(this),a=n.env||{},i=[e.call(this,t,n.plugins)];for(var s in a)if(r===s){var l=a[s].plugins||[];i.push(e.call(this,t,l))}return Promise.all(i).then(function(e){var t=[];return e.forEach(function(e){t=t.concat(e)}),t})}}(),g=function(){function e(e,r){var a=[];return(r||[]).forEach(function(r){var o=i(r);if(!s(r)||t(e,o))a.push(r);else if(!t(e,o)){var l=this.configMain||"package.json!npm",u=n(o);a.push(this.import(u,{name:l}).then(function(e){var t=e.__esModule?e.default:e;return"string"==typeof r?t:[t,r[1]]}))}},this),Promise.all(a)}function t(e,t){var n=/^(?:babel-preset-)/;return!!(e.availablePresets||{})[n.test(t)?t.replace("babel-preset-",""):t]}function n(e){var t=/^(?:babel-preset-)/;return/\//.test(e)||t.test(e)?e:"babel-preset-"+e}return function(t,n){var r=o.call(this),a=n.env||{},i=[e.call(this,t,n.presets)];for(var s in a)if(r===s){var l=a[s].presets||[];i.push(e.call(this,t,l))}return Promise.all(i).then(function(e){var t=[];return e.forEach(function(e){t=t.concat(e)}),t})}}()}(__global.LoaderPolyfill),function(){function e(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@\/?#]*(?::[^:@\/?#]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}function t(e){var t=[];return e.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?t.pop():t.push(e)}),t.join("").replace(/^\//,"/"===e.charAt(0)?"/":"")}function n(n,r){var a=r,o=n;return i&&(a=a.replace(/\\/g,"/")),a=e(a||""),o=e(o||""),a&&o?(a.protocol||o.protocol)+(a.protocol||a.authority?a.authority:o.authority)+t(a.protocol||a.authority||"/"===a.pathname.charAt(0)?a.pathname:a.pathname?(o.authority&&!o.pathname?"/":"")+o.pathname.slice(0,o.pathname.lastIndexOf("/")+1)+a.pathname:o.pathname)+(a.protocol||a.authority||a.pathname?a.search:a.search||o.search)+a.hash:null}var r,a="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,o="undefined"!=typeof window&&!a,i="undefined"!=typeof process&&!!process.platform.match(/^win/),s=__global.Promise||require("when/es6-shim/Promise");if("undefined"!=typeof XMLHttpRequest)r=function(e,t,n){function r(){t(o.responseText)}function a(){var t=o.statusText+": "+e||"XHR error",r=new Error(t);r.statusCode=o.status,n(r)}var o=new XMLHttpRequest,i=!0,s=!1;if(!("withCredentials"in o)){var l=/^(\w+:)?\/\/([^\/]+)/.exec(e);l&&(i=l[2]===window.location.host,l[1]&&(i&=l[1]===window.location.protocol))}i||"undefined"==typeof XDomainRequest||((o=new XDomainRequest).onload=r,o.onerror=a,o.ontimeout=a,o.onprogress=function(){},o.timeout=0,s=!0),o.onreadystatechange=function(){4===o.readyState&&(200===o.status||0==o.status&&o.responseText?r():a())},o.open("GET",e,!0),s&&setTimeout(function(){o.send()},0),o.send(null)};else if("undefined"!=typeof require){var l,u=/ENOENT/;r=function(e,t,n){if("file:"!=e.substr(0,5))throw"Only file URLs of the form file: allowed running in Node.";l=l||require("fs");var r=e.substr(5);return i&&(r=r.replace(/\//g,"\\")),l.readFile(r,function(e,r){if(e)return u.test(e.message)&&(e.statusCode=404),n(e);t(r+"")})}}else{if("function"!=typeof fetch)throw new TypeError("No environment fetch API available.");r=function(e,t,n){fetch(e).then(function(e){return e.text()}).then(function(e){t(e)}).then(null,function(e){n(e)})}}var d=new(function(e){function t(t){if(e.call(this,t||{}),"undefined"!=typeof location&&location.href){var n=__global.location.href.split("#")[0].split("?")[0];this.baseURL=n.substring(0,n.lastIndexOf("/")+1)}else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURL");this.baseURL="file:"+process.cwd()+"/",i&&(this.baseURL=this.baseURL.replace(/\\/g,"/"))}this.paths={"*":"*.js"}}return t.__proto__=null!==e?e:Function.prototype,t.prototype=$__Object$create(null!==e?e.prototype:null),$__Object$defineProperty(t.prototype,"constructor",{value:t}),$__Object$defineProperty(t.prototype,"global",{get:function(){return o?window:a?self:__global},enumerable:!1}),$__Object$defineProperty(t.prototype,"strict",{get:function(){return!0},enumerable:!1}),$__Object$defineProperty(t.prototype,"normalize",{value:function(e,t,n){if("string"!=typeof e)throw new TypeError("Module name must be a string");var r=e.split("/");if(0==r.length)throw new TypeError("No module name provided");var a=0,o=!1,i=0;if("."==r[0]){if(++a==r.length)throw new TypeError('Illegal module name "'+e+'"');o=!0}else{for(;".."==r[a];)if(++a==r.length)throw new TypeError('Illegal module name "'+e+'"');a&&(o=!0),i=a}for(var s=a;s2)throw new TypeError("Only one wildcard in a path is permitted");if(1==s.length){if(r==i&&i.length>a.length){a=i;break}}else r.substr(0,s[0].length)==s[0]&&r.substr(r.length-s[1].length)==s[1]&&(a=i,t=r.substr(s[0].length,r.length-s[1].length-s[0].length))}var l=this.paths[a];return t&&(l=l.replace("*",t)),o&&(l=l.replace(/#/g,"%23")),n(this.baseURL,l)},enumerable:!1,writable:!0}),$__Object$defineProperty(t.prototype,"fetch",{value:function(e){var t=this;return new s(function(a,o){r(n(t.baseURL,e.address),function(e){a(e)},o)})},enumerable:!1,writable:!0}),t}(__global.LoaderPolyfill));"object"==typeof exports&&(module.exports=d),__global.System=d}()}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:global),function(e){e.upgradeSystemLoader=function(){function t(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@\/?#]*(?::[^:@\/?#]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}function r(e,n){var r=e,a=n;return x&&(a=a.replace(/\\/g,"/")),a=t(a||""),r=t(r||""),a&&r?(a.protocol||r.protocol)+(a.protocol||a.authority?a.authority:r.authority)+function(e){var t=[];return e.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?t.pop():t.push(e)}),t.join("").replace(/^\//,"/"===e.charAt(0)?"/":"")}(a.protocol||a.authority||"/"===a.pathname.charAt(0)?a.pathname:a.pathname?(r.authority&&!r.pathname?"/":"")+r.pathname.slice(0,r.pathname.lastIndexOf("/")+1)+a.pathname:r.pathname)+(a.protocol||a.authority||a.pathname?a.search:a.search||r.search)+a.hash:null}function a(t){var n={};if(("object"==typeof t||"function"==typeof t)&&t!==e)if(_)for(var r in t)"default"!==r&&o(n,t,r);else i(n,t);return n.default=t,w(n,"__useDefault",{value:!0}),n}function o(e,t,n){try{var r;(r=Object.getOwnPropertyDescriptor(t,n))&&w(e,n,r)}catch(r){return e[n]=t[n],!1}}function i(e,t,n){var r=t&&t.hasOwnProperty;for(var a in t)r&&!t.hasOwnProperty(a)||n&&a in e||(e[a]=t[a]);return e}function s(e){function t(e,t){t._extensions=[];for(var n=0,r=e.length;n=0;o--){for(var i=r[o],s=0;st.index)return!0;return!1}r.lastIndex=a.lastIndex=o.lastIndex=0;var n,i=[],s=[],l=[];if(e.length/e.split("\n").length<200){for(;n=o.exec(e);)s.push([n.index,n.index+n[0].length]);for(;n=a.exec(e);)t(s,n)||l.push([n.index,n.index+n[0].length])}for(;n=r.exec(e);)if(!t(s,n)&&!t(l,n)){var u=n[1].substr(1,n[1].length-2);if(u.match(/"|'/))continue;i.push(u)}return i}e._extensions.push(f);var n=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])(exports\s*(\[['"]|\.)|module(\.exports|\['exports'\]|\["exports"\])\s*(\[['"]|[=,\.])|Object.defineProperty\(\s*module\s*,\s*(?:'|")exports(?:'|"))/,r=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF."'])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')\s*\)/g,a=/(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,o=/("[^"\\\n\r]*(\\.[^"\\\n\r]*)*"|'[^'\\\n\r]*(\\.[^'\\\n\r]*)*')/g,i=e.instantiate;e.instantiate=function(a){return a.metadata.format||(n.lastIndex=0,r.lastIndex=0,(r.exec(a.source)||n.exec(a.source))&&(a.metadata.format="cjs")),"cjs"==a.metadata.format&&(a.metadata.deps=a.metadata.deps?a.metadata.deps.concat(t(a.source)):t(a.source),a.metadata.executingRequire=!0,a.metadata.execute=function(t,n,r){var o=(a.address||"").split("/");o.pop(),o=o.join("/"),b._nodeRequire&&(o=o.substr(5));e.global._g={global:e.global,exports:n,module:r,require:t,__filename:b._nodeRequire?a.address.substr(5):a.address,__dirname:o};var i=e.global.define;e.global.define=void 0;var s={name:a.name,source:"(function() {\n(function(global, exports, module, require, __filename, __dirname){\n"+a.source+"\n}).call(_g.exports, _g.global, _g.exports, _g.module, _g.require, _g.__filename, _g.__dirname);})();",address:a.address};e.__exec(s),e.global.define=i,e.global._g=void 0}),i.call(this,a)}}function p(e){function t(e,t){var n=[],r=(e.match(f)[1].split(",")[t]||"require").replace(m,""),a=h[r]||(h[r]=new RegExp("/\\*|//|\"|'|`|(?:^|\\breturn\\b|[([=,;:?><&|^*%~+-])\\s*(?=/)|\\b"+r+"(?=\\s*\\()","g"));a.lastIndex=0,v[r]=v.require;for(var o,i,s,l;o=a.exec(e);)i=o[0],(s=v[i])||(s=v[i="/regexp/"]),s.lastIndex=a.lastIndex,(l=s.exec(e))&&l.index===a.lastIndex&&(a.lastIndex=s.lastIndex,s===v.require&&l[2]&&n.push(l[2]));return n}function n(e,t,r,a){var o=this;if("object"==typeof e&&!(e instanceof Array))return n.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1));if(!(e instanceof Array)){if("string"==typeof e){var i=o.get(e);return i.__useDefault?i.default:i}throw new TypeError("Invalid require")}Promise.all(e.map(function(e){return o.import(e,a)})).then(function(e){t&&t.apply(null,e)},r)}function r(e,t,r){return function(a,o,i){return"string"==typeof a?t(a):n.call(r,a,o,i,{name:e})}}function a(e){function n(n,a,o){var i=n,s=a,l=o;"string"!=typeof i&&(l=s,s=i,i=null),s instanceof Array||(l=s,s=["require","exports","module"]),"function"!=typeof l&&(l=function(e){return function(){return e}}(l)),void 0===s[s.length-1]&&s.pop();var u,d,f;if(-1!=(u=y.call(s,"require"))){s.splice(u,1);var p=l.toString();s=s.concat(t(p,u))}-1!=(d=y.call(s,"exports"))&&s.splice(d,1),-1!=(f=y.call(s,"module"))&&s.splice(f,1);var m={deps:s,execute:function(t,n,a){for(var o=[],i=0;i=0;a--)e.source=e.source.substr(0,r[a].start)+r[a].postLocate(t[a])+e.source.substr(r[a].end,e.source.length);return o.call(n,e)})}}),x(function(e){e._contextualModules={},e.setContextual=function(e,t){this._contextualModules[e]=t};var t=e.normalize;e.normalize=function(e,n){var r=this,a=r.pluginLoader||r;if(n){var o=this._contextualModules[e];if(o){var i=e+"/"+n;return r.has(i)?Promise.resolve(i):("string"==typeof o&&(o=a.import(o)),Promise.resolve(o).then(function(e){var t=e;return t.default&&(t=t.default),Promise.resolve(t.call(r,n))}).then(function(e){return r.set(i,r.newModule(e)),i}))}}return t.apply(this,arguments)}}),x(function(e){function t(){document.removeEventListener("DOMContentLoaded",t,!1),window.removeEventListener("load",t,!1),n()}function n(){for(var t=document.getElementsByTagName("script"),n=0;nt.index)return!0;return!1}function n(e){for(;a=e.exec(r);)if(!t(i,a)){var n=a[1];o.push(n)}}var r=e.replace(c,"");u.lastIndex=c.lastIndex=d.lastIndex=f.lastIndex=0;var a,o=[],i=[];if(e.length/e.split("\n").length<200)for(;a=f.exec(r);)i.push([a.index,a.index+a[0].length]);return n(u),n(d),o}t._extensions&&t._extensions.push(e),t._traceData={loads:{},parentMap:{}},t.getDependencies=function(e){var t=this.getModuleLoad(e);return t?t.metadata.dependencies:void 0},t.getDependants=function(e){var t=[];return n(this._traceData.parentMap[e]||{},function(e){t.push(e)}),t},t.getModuleLoad=function(e){return this._traceData.loads[e]},t.getBundles=function(e,t){var r=t||{};r[e]=!0;var a=this,o=a._traceData.parentMap[e];if(!o)return[e];var i=[];return n(o,function(e,t){r[e]||(i=i.concat(a.getBundles(e,r)))}),i},t._allowModuleExecution={},t.allowModuleExecution=function(e){var t=this;return t.normalize(e).then(function(e){t._allowModuleExecution[e]=!0})};var a=t.normalize;t.normalize=function(e,t){var n=a.apply(this,arguments);if(t){var r=this._traceData.parentMap;return n.then(function(e){return r[e]||(r[e]={}),r[e][t]=!0,e})}return n};var o=function(){return t.newModule({})},i={traceur:!0,babel:!0},s=function(e){return i[e.name]||this._allowModuleExecution[e.name]},l=[].map||function(e){for(var t=[],n=0,r=this.length;n-1||o.indexOf("steal-sans-promises.production")>-1&&!n.env)&&this.config({env:s+"-production"}),(this.isEnv("production")||this.loadBundles)&&D.call(this),N.stealPath.set.call(this,i,n)}},devBundle:{order:16,set:function(e,t){var n=!0===e?"dev-bundle":e;n&&(this.devBundle=n)}},depsBundle:{order:17,set:function(e,t){var n=!0===e?"dev-bundle":e;n&&(this.depsBundle=n)}}};n(N,function(e,t){e.order?q.splice(e.order,0,t):q.push(t)}),function(e,t,r){var a=e.config;e.config=function(i){var s=o({},i);n(t,function(t){var n=r[t];if(n.set&&s[t]){var a=n.set.call(e,s[t],i);void 0!==a&&(e[t]=a),delete s[t]}}),a.call(this,s)}}(e,q,N),O.config=function(e){if("string"==typeof e)return this.loader[e];this.loader.config(e)},x(function(e){e.getEnv=function(){return(this.env||"").split("-")[1]||this.env},e.getPlatform=function(){var e=(this.env||"").split("-");return 2===e.length?e[0]:void 0},e.isEnv=function(e){return this.getEnv()===e},e.isPlatform=function(e){return this.getPlatform()===e}});var U=function(e){var n={},r=/Url$/,a=e.split("?"),o=a.shift(),i=a.join("?").split("&"),s=o.split("/");s.pop(),s.join("/");if(i.length&&i[0].length)for(var l,u=0;u1){var c=t(d[0]);n[c=c.replace(r,"URL")]=d.slice(1).join("=")}}return n},F=function(e){var r={},a=/Url$/;r.stealURL=e.src,n(e.attributes,function(e){var n=e.nodeName||e.name,o=t(0===n.indexOf("data-")?n.replace("data-",""):n);o=o.replace(a,"URL"),r[o]=""===e.value||e.value});var i=e.innerHTML;return/\S/.test(i)&&(r.mainSource=i),o(U(e.src),r)},B=function(){return new Promise(function(e,t){if(p)e(o({stealURL:location.href},U(location.href)));else if(m||h||v){if(document.currentScript)return void e(F(document.currentScript));var n=document.scripts;n.length&&e(F(n[n.length-1]))}else e({stealPath:__dirname})})};return O.startup=function(e){var t,n,a=this.loader;return w=new Promise(function(e,r){t=e,n=r}),S=B().then(function(i){var s;return s="object"==typeof e?o(e,i):i,a.config(s),z.call(a),a.loadBundles?(a.main||!a.isEnv("production")||a.stealBundled||b("Attribute 'main' is required in production environment. Please add it to the script tag."),a.import(a.configMain).then(t,n),w.then(function(e){return z.call(a),a.main?a.import(a.main):e})):(a.import(a.devBundle).then(function(){return a.import(a.configMain)}).then(function(){return a.import(a.depsBundle)}).then(t,n),(j=w.then(function(){return z.call(a),T.call(a),s&&a.config(s),a.import("@dev")})).then(function(){if(!a.main||a.localLoader)return w;var e=a.main;return"string"==typeof e&&(e=[e]),Promise.all(r(e,function(e){return a.import(e)}))}))}).then(function(e){return a.mainSource?a.module(a.mainSource):(a.loadScriptModules(),e)})},O.done=function(){return S},O.import=function(){var e=arguments,t=this.System;return w||(t.main||(t.main="@empty"),O.startup()),w.then(function(){var r=[];return n(e,function(e){r.push(t.import(e))}),r.length>1?Promise.all(r):r[0]})},O.setContextual=c.call(e.setContextual,e),O.isEnv=c.call(e.isEnv,e),O.isPlatform=c.call(e.isPlatform,e),O};if(!g||h||v){var S=e.steal;e.steal=j(System),e.steal.startup(S&&"object"==typeof S&&S).then(null,function(e){if("undefined"!=typeof console){var t=console;t[t.error?"error":"log"](e)}}),e.steal.clone=w}else e.steal=j(System),e.steal.System=System,e.steal.dev=require("./ext/dev.js"),steal.clone=w,module.exports=e.steal}("undefined"==typeof window?"undefined"==typeof global?this:global:window); \ No newline at end of file diff --git a/steal.js b/steal.js index 7eed172d9..227598d90 100644 --- a/steal.js +++ b/steal.js @@ -6252,6 +6252,55 @@ addStealExtension(function (loader) { return loaderInstantiate.call(loader, load); }; }); +/** + * Extension to warn users when a module is instantiated twice + * + * Multiple module instantiation might cause unexpected side effects + */ +addStealExtension(function(loader) { + var superInstantiate = loader.instantiate; + + var warn = console && typeof console.warn === "function" ? + console.warn.bind(console) : + null; + + loader._instantiatedModules = loader._instantiatedModules || {}; + + loader.instantiate = function(load) { + var instantiated = loader._instantiatedModules; + + if (warn && instantiated[load.address]) { + var loads = (loader._traceData && loader._traceData.loads) || {}; + var map = (loader._traceData && loader._traceData.parentMap) || {}; + + var parents = (map[load.name] ? Object.keys(map[load.name]) : []) + .map(function(parent) { + // module names might confuse people + return "\t " + loads[parent].address; + }) + .join("\n"); + + warn( + [ + "The module with address " + load.address + + " is being instantiated twice", + "This happens when module identifiers normalize to different module names.\n", + "HINT: Import the module using the ~/[modulePath] identifier" + + (parents ? " in " : ""), + (parents || "") + "\n", + "Learn more at https://stealjs.com/docs/moduleName.html and " + + "https://stealjs.com/docs/tilde.html" + ].join("\n") + ); + } else { + instantiated[load.address] = load; + } + + return superInstantiate.apply(loader, arguments); + }; +}); + + addStealExtension(function applyTraceExtension(loader) { if(loader._extensions) { loader._extensions.push(applyTraceExtension); diff --git a/steal.production.js b/steal.production.js index 92341109c..f3d6720c4 100644 --- a/steal.production.js +++ b/steal.production.js @@ -4,4 +4,4 @@ * Copyright (c) 2017 Bitovi; Licensed MIT */ -!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.Promise=e():"undefined"!=typeof global?global.Promise=e():"undefined"!=typeof self&&(self.Promise=e())}(function(){return function e(t,n,r){function o(i,s){if(!n[i]){if(!t[i]){var l="function"==typeof require&&require;if(!s&&l)return l(i,!0);if(a)return a(i,!0);throw new Error("Cannot find module '"+i+"'")}var u=n[i]={exports:{}};t[i][0].call(u.exports,function(e){var n=t[i][1][e];return o(n||e)},u,u.exports,e,t,n,r)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;i=0&&(p.splice(t,1),d("Handled previous rejection ["+e.id+"] "+o.formatObject(e.value)))}function s(e,t){f.push(e,t),null===h&&(h=r(l,0))}function l(){for(h=null;f.length>0;)f.shift()(f.shift())}var u,c=n,d=n;"undefined"!=typeof console&&(u=console,c=void 0!==u.error?function(e){u.error(e)}:function(e){u.log(e)},d=void 0!==u.info?function(e){u.info(e)}:function(e){u.log(e)}),e.onPotentiallyUnhandledRejection=function(e){s(a,e)},e.onPotentiallyUnhandledRejectionHandled=function(e){s(i,e)},e.onFatalRejection=function(e){s(t,e.value)};var f=[],p=[],h=null;return e}})}(function(n){t.exports=n(e)})},{"../env":5,"../format":6}],5:[function(e,t,n){!function(e){"use strict";e(function(e){var t,n="undefined"!=typeof setTimeout&&setTimeout,r=function(e,t){return setTimeout(e,t)},o=function(e){return clearTimeout(e)},a=function(e){return n(e,0)};if("undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))a=function(e){return process.nextTick(e)};else if(t="function"==typeof MutationObserver&&MutationObserver||"function"==typeof WebKitMutationObserver&&WebKitMutationObserver)a=function(e){var t,n=document.createTextNode("");new e(function(){var e=t;t=void 0,e()}).observe(n,{characterData:!0});var r=0;return function(e){t=e,n.data=r^=1}}(t);else if(!n){var i=e("vertx");r=function(e,t){return i.setTimer(t,e)},o=i.cancelTimer,a=i.runOnLoop||i.runOnContext}return{setTimer:r,clearTimer:o,asap:a}})}(function(n){t.exports=n(e)})},{}],6:[function(e,t,n){!function(e){"use strict";e(function(){function e(e){var n=String(e);return"[object Object]"===n&&"undefined"!=typeof JSON&&(n=t(e,n)),n}function t(e,t){try{return JSON.stringify(e)}catch(e){return t}}return{formatError:function(t){var n="object"==typeof t&&null!==t&&(t.stack||t.message)?t.stack||t.message:e(t);return t instanceof Error?n:n+" (WARNING: non-Error used)"},formatObject:e,tryStringify:t}})}(function(e){t.exports=e()})},{}],7:[function(e,t,n){!function(e){"use strict";e(function(){return function(e){function t(e,t){this._handler=e===m?t:n(e)}function n(e){function t(e){n.reject(e)}var n=new g;try{e(function(e){n.resolve(e)},t,function(e){n.notify(e)})}catch(e){t(e)}return n}function r(e){return R(e)?e:new t(m,new b(f(e)))}function o(e){return new t(m,new b(new _(e)))}function a(){return W}function i(e,t){return new t(m,new g(e.receiver,e.join().context))}function s(e,n,r){function o(e,t,n){c[e]=t,0==--u&&n.become(new x(c))}for(var a,i="function"==typeof n?function(t,a,i){i.resolved||l(r,o,t,e(n,a,t),i)}:o,s=new g,u=r.length>>>0,c=new Array(u),d=0;d0?t(n,a.value,o):(o.become(a),u(e,n+1,a))}else t(n,r,o)}function u(e,t,n){for(var r=t;r0||"function"!=typeof t&&o<0)return new this.constructor(m,r);var a=this._beget(),i=a._handler;return r.chain(i,r.receiver,e,t,n),a},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype._beget=function(){return i(this._handler,this.constructor)},t.all=function(e){return s(N,null,e)},t.race=function(e){return"object"!=typeof e||null===e?o(new TypeError("non-iterable passed to race()")):0===e.length?a():1===e.length?r(e[0]):d(e)},t._traverse=function(e,t){return s(T,e,t)},t._visitRemaining=u,m.prototype.when=m.prototype.become=m.prototype.notify=m.prototype.fail=m.prototype._unreport=m.prototype._report=A,m.prototype._state=0,m.prototype.state=function(){return this._state},m.prototype.join=function(){for(var e=this;void 0!==e.handler;)e=e.handler;return e},m.prototype.chain=function(e,t,n,r,o){this.when({resolver:e,receiver:t,fulfilled:n,rejected:r,progress:o})},m.prototype.visit=function(e,t,n,r){this.chain(H,e,t,n,r)},m.prototype.fold=function(e,t,n,r){this.when(new L(e,t,n,r))},C(m,v),v.prototype.become=function(e){e.fail()};var H=new v;C(m,g),g.prototype._state=0,g.prototype.resolve=function(e){this.become(f(e))},g.prototype.reject=function(e){this.resolved||this.become(new _(e))},g.prototype.join=function(){if(!this.resolved)return this;for(var e=this;void 0!==e.handler;)if((e=e.handler)===this)return this.handler=S();return e},g.prototype.run=function(){var e=this.consumers,t=this.handler;this.handler=this.handler.join(),this.consumers=void 0;for(var n=0;n",t.isDeclarative=!0,e.loaderObj.transpile(t).then(function(e){var n=__global.System,r=n.register;n.register=function(e,n,r){var o=r,a=n;"string"!=typeof e&&(o=a,a=e),t.declare=o,t.depsList=a},__eval(e,__global,t),n.register=r});if("object"!=typeof n)throw TypeError("Invalid instantiate return value");t.depsList=n.deps||[],t.execute=n.execute,t.isDeclarative=!1}}).then(function(){if("loading"==t.status){t.dependencies=[];for(var r=t.depsList,o=[],a=0,i=r.length;a0)){var n=e.startingLoad;if(!1===e.loader.loaderObj.execute){for(var r=[].concat(e.loads),o=0,a=r.length;o")+"\n")),o=w(o,'Error loading "'+t.name+'" at '+(t.address||"")+"\n");for(var a=e.loads.concat([]),i=0,s=a.length;i=0;i--){for(var s=r[i],l=0;l=0;r-=1){var o=n[r];-1===t.indexOf(o)&&t.unshift(o)}else t=["es2015-no-commonjs","react","stage-0"];return t}function c(e){return(e.version?+e.version.split(".")[0]:6)||6}function d(e,t){var n=this.babelOptions||{};return n.sourceMap="inline",n.filename=e.address,n.code=!0,n.ast=!1,c(t)>=6?(delete n.optional,delete n.whitelist,delete n.blacklist,n.presets=u(n.presets),n.plugins=l(n.plugins)):(n.modules="system",n.blacklist||(n.blacklist=["react"])),n}function f(e){var t=e.types;return{visitor:{Program:function(e,n){e.unshiftContainer("body",[t.exportNamedDeclaration(null,[t.exportSpecifier(t.identifier("true"),t.identifier("__esModule"))])])}}}}function p(e,t){var n=t.Babel||t.babel||t,r=c(n),o=d.call(this,e,n);return Promise.all([v.call(this,n,o),g.call(this,n,o)]).then(function(t){return r>=6&&(o.plugins=[f].concat(t[0]),o.presets=t[1]),n.transform(e.source,o).code+"\n//# sourceURL="+e.address+"!eval"})}var h=__global,m="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process);e.prototype.transpiler="babel",e.prototype.transpile=function(e){var n=this;return n.transpilerHasRun||(h.traceur&&!n.has("traceur")&&n.set("traceur",t(n,"traceur")),h.Babel&&!n.has("babel")&&n.set("babel",t(n,"Babel")),n.transpilerHasRun=!0),n.import(n.transpiler).then(function(t){var o=t;return o.__useDefault&&(o=o.default),(o.Compiler?r:p).call(n,e,o)}).then(function(t){return'var __moduleAddress = "'+e.address+'";'+t})},e.prototype.instantiate=function(e){var r=this;return Promise.resolve(r.normalize(r.transpiler)).then(function(o){if(e.name===o)return{deps:[],execute:function(){var o=h.System,a=h.Reflect.Loader;return __eval("(function(require,exports,module){"+e.source+"})();",h,e),h.System=o,h.Reflect.Loader=a,t(r,n(e.name))}}})};var v=function(){function e(e,r){var o=[];return(r||[]).forEach(function(r){var a=i(r);if(!s(r)||t(e,a))o.push(r);else if(!t(e,a)){var l=this.configMain||"package.json!npm",u=n(a);o.push(this.import(u,{name:l}).then(function(e){var t=e.__esModule?e.default:e;return"string"==typeof r?t:[t,r[1]]}))}},this),Promise.all(o)}function t(e,t){var n=/^(?:babel-plugin-)/;return!!(e.availablePlugins||{})[n.test(t)?t.replace("babel-plugin-",""):t]}function n(e){var t=/^(?:babel-plugin-)/;return/\//.test(e)||t.test(e)?e:"babel-plugin-"+e}return function(t,n){var r=a.call(this),o=n.env||{},i=[e.call(this,t,n.plugins)];for(var s in o)if(r===s){var l=o[s].plugins||[];i.push(e.call(this,t,l))}return Promise.all(i).then(function(e){var t=[];return e.forEach(function(e){t=t.concat(e)}),t})}}(),g=function(){function e(e,r){var o=[];return(r||[]).forEach(function(r){var a=i(r);if(!s(r)||t(e,a))o.push(r);else if(!t(e,a)){var l=this.configMain||"package.json!npm",u=n(a);o.push(this.import(u,{name:l}).then(function(e){var t=e.__esModule?e.default:e;return"string"==typeof r?t:[t,r[1]]}))}},this),Promise.all(o)}function t(e,t){var n=/^(?:babel-preset-)/;return!!(e.availablePresets||{})[n.test(t)?t.replace("babel-preset-",""):t]}function n(e){var t=/^(?:babel-preset-)/;return/\//.test(e)||t.test(e)?e:"babel-preset-"+e}return function(t,n){var r=a.call(this),o=n.env||{},i=[e.call(this,t,n.presets)];for(var s in o)if(r===s){var l=o[s].presets||[];i.push(e.call(this,t,l))}return Promise.all(i).then(function(e){var t=[];return e.forEach(function(e){t=t.concat(e)}),t})}}()}(__global.LoaderPolyfill),function(){function e(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@\/?#]*(?::[^:@\/?#]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}function t(e){var t=[];return e.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?t.pop():t.push(e)}),t.join("").replace(/^\//,"/"===e.charAt(0)?"/":"")}function n(n,r){var o=r,a=n;return i&&(o=o.replace(/\\/g,"/")),o=e(o||""),a=e(a||""),o&&a?(o.protocol||a.protocol)+(o.protocol||o.authority?o.authority:a.authority)+t(o.protocol||o.authority||"/"===o.pathname.charAt(0)?o.pathname:o.pathname?(a.authority&&!a.pathname?"/":"")+a.pathname.slice(0,a.pathname.lastIndexOf("/")+1)+o.pathname:a.pathname)+(o.protocol||o.authority||o.pathname?o.search:o.search||a.search)+o.hash:null}var r,o="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,a="undefined"!=typeof window&&!o,i="undefined"!=typeof process&&!!process.platform.match(/^win/),s=__global.Promise||require("when/es6-shim/Promise");if("undefined"!=typeof XMLHttpRequest)r=function(e,t,n){function r(){t(a.responseText)}function o(){var t=a.statusText+": "+e||"XHR error",r=new Error(t);r.statusCode=a.status,n(r)}var a=new XMLHttpRequest,i=!0,s=!1;if(!("withCredentials"in a)){var l=/^(\w+:)?\/\/([^\/]+)/.exec(e);l&&(i=l[2]===window.location.host,l[1]&&(i&=l[1]===window.location.protocol))}i||"undefined"==typeof XDomainRequest||((a=new XDomainRequest).onload=r,a.onerror=o,a.ontimeout=o,a.onprogress=function(){},a.timeout=0,s=!0),a.onreadystatechange=function(){4===a.readyState&&(200===a.status||0==a.status&&a.responseText?r():o())},a.open("GET",e,!0),s&&setTimeout(function(){a.send()},0),a.send(null)};else if("undefined"!=typeof require){var l,u=/ENOENT/;r=function(e,t,n){if("file:"!=e.substr(0,5))throw"Only file URLs of the form file: allowed running in Node.";l=l||require("fs");var r=e.substr(5);return i&&(r=r.replace(/\//g,"\\")),l.readFile(r,function(e,r){if(e)return u.test(e.message)&&(e.statusCode=404),n(e);t(r+"")})}}else{if("function"!=typeof fetch)throw new TypeError("No environment fetch API available.");r=function(e,t,n){fetch(e).then(function(e){return e.text()}).then(function(e){t(e)}).then(null,function(e){n(e)})}}var c=new(function(e){function t(t){if(e.call(this,t||{}),"undefined"!=typeof location&&location.href){var n=__global.location.href.split("#")[0].split("?")[0];this.baseURL=n.substring(0,n.lastIndexOf("/")+1)}else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURL");this.baseURL="file:"+process.cwd()+"/",i&&(this.baseURL=this.baseURL.replace(/\\/g,"/"))}this.paths={"*":"*.js"}}return t.__proto__=null!==e?e:Function.prototype,t.prototype=$__Object$create(null!==e?e.prototype:null),$__Object$defineProperty(t.prototype,"constructor",{value:t}),$__Object$defineProperty(t.prototype,"global",{get:function(){return a?window:o?self:__global},enumerable:!1}),$__Object$defineProperty(t.prototype,"strict",{get:function(){return!0},enumerable:!1}),$__Object$defineProperty(t.prototype,"normalize",{value:function(e,t,n){if("string"!=typeof e)throw new TypeError("Module name must be a string");var r=e.split("/");if(0==r.length)throw new TypeError("No module name provided");var o=0,a=!1,i=0;if("."==r[0]){if(++o==r.length)throw new TypeError('Illegal module name "'+e+'"');a=!0}else{for(;".."==r[o];)if(++o==r.length)throw new TypeError('Illegal module name "'+e+'"');o&&(a=!0),i=o}for(var s=o;s2)throw new TypeError("Only one wildcard in a path is permitted");if(1==s.length){if(r==i&&i.length>o.length){o=i;break}}else r.substr(0,s[0].length)==s[0]&&r.substr(r.length-s[1].length)==s[1]&&(o=i,t=r.substr(s[0].length,r.length-s[1].length-s[0].length))}var l=this.paths[o];return t&&(l=l.replace("*",t)),a&&(l=l.replace(/#/g,"%23")),n(this.baseURL,l)},enumerable:!1,writable:!0}),$__Object$defineProperty(t.prototype,"fetch",{value:function(e){var t=this;return new s(function(o,a){r(n(t.baseURL,e.address),function(e){o(e)},a)})},enumerable:!1,writable:!0}),t}(__global.LoaderPolyfill));"object"==typeof exports&&(module.exports=c),__global.System=c}()}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:global),function(e){e.upgradeSystemLoader=function(){function t(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@\/?#]*(?::[^:@\/?#]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}function r(e,n){var r=e,o=n;return x&&(o=o.replace(/\\/g,"/")),o=t(o||""),r=t(r||""),o&&r?(o.protocol||r.protocol)+(o.protocol||o.authority?o.authority:r.authority)+function(e){var t=[];return e.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?t.pop():t.push(e)}),t.join("").replace(/^\//,"/"===e.charAt(0)?"/":"")}(o.protocol||o.authority||"/"===o.pathname.charAt(0)?o.pathname:o.pathname?(r.authority&&!r.pathname?"/":"")+r.pathname.slice(0,r.pathname.lastIndexOf("/")+1)+o.pathname:r.pathname)+(o.protocol||o.authority||o.pathname?o.search:o.search||r.search)+o.hash:null}function o(t){var n={};if(("object"==typeof t||"function"==typeof t)&&t!==e)if(_)for(var r in t)"default"!==r&&a(n,t,r);else i(n,t);return n.default=t,w(n,"__useDefault",{value:!0}),n}function a(e,t,n){try{var r;(r=Object.getOwnPropertyDescriptor(t,n))&&w(e,n,r)}catch(r){return e[n]=t[n],!1}}function i(e,t,n){var r=t&&t.hasOwnProperty;for(var o in t)r&&!t.hasOwnProperty(o)||n&&o in e||(e[o]=t[o]);return e}function s(e){function t(e,t){t._extensions=[];for(var n=0,r=e.length;n=0;a--){for(var i=r[a],s=0;st.index)return!0;return!1}r.lastIndex=o.lastIndex=a.lastIndex=0;var n,i=[],s=[],l=[];if(e.length/e.split("\n").length<200){for(;n=a.exec(e);)s.push([n.index,n.index+n[0].length]);for(;n=o.exec(e);)t(s,n)||l.push([n.index,n.index+n[0].length])}for(;n=r.exec(e);)if(!t(s,n)&&!t(l,n)){var u=n[1].substr(1,n[1].length-2);if(u.match(/"|'/))continue;i.push(u)}return i}e._extensions.push(f);var n=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])(exports\s*(\[['"]|\.)|module(\.exports|\['exports'\]|\["exports"\])\s*(\[['"]|[=,\.])|Object.defineProperty\(\s*module\s*,\s*(?:'|")exports(?:'|"))/,r=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF."'])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')\s*\)/g,o=/(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,a=/("[^"\\\n\r]*(\\.[^"\\\n\r]*)*"|'[^'\\\n\r]*(\\.[^'\\\n\r]*)*')/g,i=e.instantiate;e.instantiate=function(o){return o.metadata.format||(n.lastIndex=0,r.lastIndex=0,(r.exec(o.source)||n.exec(o.source))&&(o.metadata.format="cjs")),"cjs"==o.metadata.format&&(o.metadata.deps=o.metadata.deps?o.metadata.deps.concat(t(o.source)):t(o.source),o.metadata.executingRequire=!0,o.metadata.execute=function(t,n,r){var a=(o.address||"").split("/");a.pop(),a=a.join("/"),b._nodeRequire&&(a=a.substr(5));e.global._g={global:e.global,exports:n,module:r,require:t,__filename:b._nodeRequire?o.address.substr(5):o.address,__dirname:a};var i=e.global.define;e.global.define=void 0;var s={name:o.name,source:"(function() {\n(function(global, exports, module, require, __filename, __dirname){\n"+o.source+"\n}).call(_g.exports, _g.global, _g.exports, _g.module, _g.require, _g.__filename, _g.__dirname);})();",address:o.address};e.__exec(s),e.global.define=i,e.global._g=void 0}),i.call(this,o)}}function p(e){function t(e,t){var n=[],r=(e.match(f)[1].split(",")[t]||"require").replace(h,""),o=m[r]||(m[r]=new RegExp("/\\*|//|\"|'|`|(?:^|\\breturn\\b|[([=,;:?><&|^*%~+-])\\s*(?=/)|\\b"+r+"(?=\\s*\\()","g"));o.lastIndex=0,v[r]=v.require;for(var a,i,s,l;a=o.exec(e);)i=a[0],(s=v[i])||(s=v[i="/regexp/"]),s.lastIndex=o.lastIndex,(l=s.exec(e))&&l.index===o.lastIndex&&(o.lastIndex=s.lastIndex,s===v.require&&l[2]&&n.push(l[2]));return n}function n(e,t,r,o){var a=this;if("object"==typeof e&&!(e instanceof Array))return n.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1));if(!(e instanceof Array)){if("string"==typeof e){var i=a.get(e);return i.__useDefault?i.default:i}throw new TypeError("Invalid require")}Promise.all(e.map(function(e){return a.import(e,o)})).then(function(e){t&&t.apply(null,e)},r)}function r(e,t,r){return function(o,a,i){return"string"==typeof o?t(o):n.call(r,o,a,i,{name:e})}}function o(e){function n(n,o,a){var i=n,s=o,l=a;"string"!=typeof i&&(l=s,s=i,i=null),s instanceof Array||(l=s,s=["require","exports","module"]),"function"!=typeof l&&(l=function(e){return function(){return e}}(l)),void 0===s[s.length-1]&&s.pop();var u,c,f;if(-1!=(u=y.call(s,"require"))){s.splice(u,1);var p=l.toString();s=s.concat(t(p,u))}-1!=(c=y.call(s,"exports"))&&s.splice(c,1),-1!=(f=y.call(s,"module"))&&s.splice(f,1);var h={deps:s,execute:function(t,n,o){for(var a=[],i=0;i=0;o--)e.source=e.source.substr(0,r[o].start)+r[o].postLocate(t[o])+e.source.substr(r[o].end,e.source.length);return a.call(n,e)})}}),x(function(e){e._contextualModules={},e.setContextual=function(e,t){this._contextualModules[e]=t};var t=e.normalize;e.normalize=function(e,n){var r=this,o=r.pluginLoader||r;if(n){var a=this._contextualModules[e];if(a){var i=e+"/"+n;return r.has(i)?Promise.resolve(i):("string"==typeof a&&(a=o.import(a)),Promise.resolve(a).then(function(e){var t=e;return t.default&&(t=t.default),Promise.resolve(t.call(r,n))}).then(function(e){return r.set(i,r.newModule(e)),i}))}}return t.apply(this,arguments)}}),x(function(e){function t(){document.removeEventListener("DOMContentLoaded",t,!1),window.removeEventListener("load",t,!1),n()}function n(){for(var t=document.getElementsByTagName("script"),n=0;nt.index)return!0;return!1}function n(e){for(;o=e.exec(r);)if(!t(i,o)){var n=o[1];a.push(n)}}var r=e.replace(d,"");u.lastIndex=d.lastIndex=c.lastIndex=f.lastIndex=0;var o,a=[],i=[];if(e.length/e.split("\n").length<200)for(;o=f.exec(r);)i.push([o.index,o.index+o[0].length]);return n(u),n(c),a}t._extensions&&t._extensions.push(e),t._traceData={loads:{},parentMap:{}},t.getDependencies=function(e){var t=this.getModuleLoad(e);return t?t.metadata.dependencies:void 0},t.getDependants=function(e){var t=[];return n(this._traceData.parentMap[e]||{},function(e){t.push(e)}),t},t.getModuleLoad=function(e){return this._traceData.loads[e]},t.getBundles=function(e,t){var r=t||{};r[e]=!0;var o=this,a=o._traceData.parentMap[e];if(!a)return[e];var i=[];return n(a,function(e,t){r[e]||(i=i.concat(o.getBundles(e,r)))}),i},t._allowModuleExecution={},t.allowModuleExecution=function(e){var t=this;return t.normalize(e).then(function(e){t._allowModuleExecution[e]=!0})};var o=t.normalize;t.normalize=function(e,t){var n=o.apply(this,arguments);if(t){var r=this._traceData.parentMap;return n.then(function(e){return r[e]||(r[e]={}),r[e][t]=!0,e})}return n};var a=function(){return t.newModule({})},i={traceur:!0,babel:!0},s=function(e){return i[e.name]||this._allowModuleExecution[e.name]},l=[].map||function(e){for(var t=[],n=0,r=this.length;n-1||a.indexOf("steal-sans-promises.production")>-1&&!n.env)&&this.config({env:s+"-production"}),(this.isEnv("production")||this.loadBundles)&&$.call(this),C.stealPath.set.call(this,i,n)}},devBundle:{order:16,set:function(e,t){var n=!0===e?"dev-bundle":e;n&&(this.devBundle=n)}},depsBundle:{order:17,set:function(e,t){var n=!0===e?"dev-bundle":e;n&&(this.depsBundle=n)}}};n(C,function(e,t){e.order?z.splice(e.order,0,t):z.push(t)}),function(e,t,r){var o=e.config;e.config=function(i){var s=a({},i);n(t,function(t){var n=r[t];if(n.set&&s[t]){var o=n.set.call(e,s[t],i);void 0!==o&&(e[t]=o),delete s[t]}}),o.call(this,s)}}(e,z,C),O.config=function(e){if("string"==typeof e)return this.loader[e];this.loader.config(e)},x(function(e){e.getEnv=function(){return(this.env||"").split("-")[1]||this.env},e.getPlatform=function(){var e=(this.env||"").split("-");return 2===e.length?e[0]:void 0},e.isEnv=function(e){return this.getEnv()===e},e.isPlatform=function(e){return this.getPlatform()===e}});var N=function(e){var n={},r=/Url$/,o=e.split("?"),a=o.shift(),i=o.join("?").split("&"),s=a.split("/");s.pop(),s.join("/");if(i.length&&i[0].length)for(var l,u=0;u1){var d=t(c[0]);n[d=d.replace(r,"URL")]=c.slice(1).join("=")}}return n},A=function(e){var r={},o=/Url$/;r.stealURL=e.src,n(e.attributes,function(e){var n=e.nodeName||e.name,a=t(0===n.indexOf("data-")?n.replace("data-",""):n);a=a.replace(o,"URL"),r[a]=""===e.value||e.value});var i=e.innerHTML;return/\S/.test(i)&&(r.mainSource=i),a(N(e.src),r)},F=function(){return new Promise(function(e,t){if(p)e(a({stealURL:location.href},N(location.href)));else if(h||m||v){if(document.currentScript)return void e(A(document.currentScript));var n=document.scripts;n.length&&e(A(n[n.length-1]))}else e({stealPath:__dirname})})};return O.startup=function(e){var t,n,o=this.loader;return w=new Promise(function(e,r){t=e,n=r}),S=F().then(function(i){var s;return s="object"==typeof e?a(e,i):i,o.config(s),T.call(o),o.loadBundles?(o.main||!o.isEnv("production")||o.stealBundled||b("Attribute 'main' is required in production environment. Please add it to the script tag."),o.import(o.configMain).then(t,n),w.then(function(e){return T.call(o),o.main?o.import(o.main):e})):(o.import(o.devBundle).then(function(){return o.import(o.configMain)}).then(function(){return o.import(o.depsBundle)}).then(t,n),(j=w.then(function(){return T.call(o),D.call(o),s&&o.config(s),o.import("@dev")})).then(function(){if(!o.main||o.localLoader)return w;var e=o.main;return"string"==typeof e&&(e=[e]),Promise.all(r(e,function(e){return o.import(e)}))}))}).then(function(e){return o.mainSource?o.module(o.mainSource):(o.loadScriptModules(),e)})},O.done=function(){return S},O.import=function(){var e=arguments,t=this.System;return w||(t.main||(t.main="@empty"),O.startup()),w.then(function(){var r=[];return n(e,function(e){r.push(t.import(e))}),r.length>1?Promise.all(r):r[0]})},O.setContextual=d.call(e.setContextual,e),O.isEnv=d.call(e.isEnv,e),O.isPlatform=d.call(e.isPlatform,e),O};if(!g||m||v){var S=e.steal;e.steal=j(System),e.steal.startup(S&&"object"==typeof S&&S).then(null,function(e){if("undefined"!=typeof console){var t=console;t[t.error?"error":"log"](e)}}),e.steal.clone=w}else e.steal=j(System),e.steal.System=System,e.steal.dev=require("./ext/dev.js"),steal.clone=w,module.exports=e.steal}("undefined"==typeof window?"undefined"==typeof global?this:global:window); \ No newline at end of file +!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.Promise=e():"undefined"!=typeof global?global.Promise=e():"undefined"!=typeof self&&(self.Promise=e())}(function(){return function e(t,n,r){function o(i,s){if(!n[i]){if(!t[i]){var l="function"==typeof require&&require;if(!s&&l)return l(i,!0);if(a)return a(i,!0);throw new Error("Cannot find module '"+i+"'")}var u=n[i]={exports:{}};t[i][0].call(u.exports,function(e){var n=t[i][1][e];return o(n||e)},u,u.exports,e,t,n,r)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;i=0&&(p.splice(t,1),d("Handled previous rejection ["+e.id+"] "+o.formatObject(e.value)))}function s(e,t){f.push(e,t),null===h&&(h=r(l,0))}function l(){for(h=null;f.length>0;)f.shift()(f.shift())}var u,c=n,d=n;"undefined"!=typeof console&&(u=console,c=void 0!==u.error?function(e){u.error(e)}:function(e){u.log(e)},d=void 0!==u.info?function(e){u.info(e)}:function(e){u.log(e)}),e.onPotentiallyUnhandledRejection=function(e){s(a,e)},e.onPotentiallyUnhandledRejectionHandled=function(e){s(i,e)},e.onFatalRejection=function(e){s(t,e.value)};var f=[],p=[],h=null;return e}})}(function(n){t.exports=n(e)})},{"../env":5,"../format":6}],5:[function(e,t,n){!function(e){"use strict";e(function(e){var t,n="undefined"!=typeof setTimeout&&setTimeout,r=function(e,t){return setTimeout(e,t)},o=function(e){return clearTimeout(e)},a=function(e){return n(e,0)};if("undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))a=function(e){return process.nextTick(e)};else if(t="function"==typeof MutationObserver&&MutationObserver||"function"==typeof WebKitMutationObserver&&WebKitMutationObserver)a=function(e){var t,n=document.createTextNode("");new e(function(){var e=t;t=void 0,e()}).observe(n,{characterData:!0});var r=0;return function(e){t=e,n.data=r^=1}}(t);else if(!n){var i=e("vertx");r=function(e,t){return i.setTimer(t,e)},o=i.cancelTimer,a=i.runOnLoop||i.runOnContext}return{setTimer:r,clearTimer:o,asap:a}})}(function(n){t.exports=n(e)})},{}],6:[function(e,t,n){!function(e){"use strict";e(function(){function e(e){var n=String(e);return"[object Object]"===n&&"undefined"!=typeof JSON&&(n=t(e,n)),n}function t(e,t){try{return JSON.stringify(e)}catch(e){return t}}return{formatError:function(t){var n="object"==typeof t&&null!==t&&(t.stack||t.message)?t.stack||t.message:e(t);return t instanceof Error?n:n+" (WARNING: non-Error used)"},formatObject:e,tryStringify:t}})}(function(e){t.exports=e()})},{}],7:[function(e,t,n){!function(e){"use strict";e(function(){return function(e){function t(e,t){this._handler=e===m?t:n(e)}function n(e){function t(e){n.reject(e)}var n=new g;try{e(function(e){n.resolve(e)},t,function(e){n.notify(e)})}catch(e){t(e)}return n}function r(e){return R(e)?e:new t(m,new b(f(e)))}function o(e){return new t(m,new b(new _(e)))}function a(){return W}function i(e,t){return new t(m,new g(e.receiver,e.join().context))}function s(e,n,r){function o(e,t,n){c[e]=t,0==--u&&n.become(new x(c))}for(var a,i="function"==typeof n?function(t,a,i){i.resolved||l(r,o,t,e(n,a,t),i)}:o,s=new g,u=r.length>>>0,c=new Array(u),d=0;d0?t(n,a.value,o):(o.become(a),u(e,n+1,a))}else t(n,r,o)}function u(e,t,n){for(var r=t;r0||"function"!=typeof t&&o<0)return new this.constructor(m,r);var a=this._beget(),i=a._handler;return r.chain(i,r.receiver,e,t,n),a},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype._beget=function(){return i(this._handler,this.constructor)},t.all=function(e){return s(C,null,e)},t.race=function(e){return"object"!=typeof e||null===e?o(new TypeError("non-iterable passed to race()")):0===e.length?a():1===e.length?r(e[0]):d(e)},t._traverse=function(e,t){return s($,e,t)},t._visitRemaining=u,m.prototype.when=m.prototype.become=m.prototype.notify=m.prototype.fail=m.prototype._unreport=m.prototype._report=A,m.prototype._state=0,m.prototype.state=function(){return this._state},m.prototype.join=function(){for(var e=this;void 0!==e.handler;)e=e.handler;return e},m.prototype.chain=function(e,t,n,r,o){this.when({resolver:e,receiver:t,fulfilled:n,rejected:r,progress:o})},m.prototype.visit=function(e,t,n,r){this.chain(H,e,t,n,r)},m.prototype.fold=function(e,t,n,r){this.when(new L(e,t,n,r))},U(m,v),v.prototype.become=function(e){e.fail()};var H=new v;U(m,g),g.prototype._state=0,g.prototype.resolve=function(e){this.become(f(e))},g.prototype.reject=function(e){this.resolved||this.become(new _(e))},g.prototype.join=function(){if(!this.resolved)return this;for(var e=this;void 0!==e.handler;)if((e=e.handler)===this)return this.handler=O();return e},g.prototype.run=function(){var e=this.consumers,t=this.handler;this.handler=this.handler.join(),this.consumers=void 0;for(var n=0;n",t.isDeclarative=!0,e.loaderObj.transpile(t).then(function(e){var n=__global.System,r=n.register;n.register=function(e,n,r){var o=r,a=n;"string"!=typeof e&&(o=a,a=e),t.declare=o,t.depsList=a},__eval(e,__global,t),n.register=r});if("object"!=typeof n)throw TypeError("Invalid instantiate return value");t.depsList=n.deps||[],t.execute=n.execute,t.isDeclarative=!1}}).then(function(){if("loading"==t.status){t.dependencies=[];for(var r=t.depsList,o=[],a=0,i=r.length;a0)){var n=e.startingLoad;if(!1===e.loader.loaderObj.execute){for(var r=[].concat(e.loads),o=0,a=r.length;o")+"\n")),o=w(o,'Error loading "'+t.name+'" at '+(t.address||"")+"\n");for(var a=e.loads.concat([]),i=0,s=a.length;i=0;i--){for(var s=r[i],l=0;l=0;r-=1){var o=n[r];-1===t.indexOf(o)&&t.unshift(o)}else t=["es2015-no-commonjs","react","stage-0"];return t}function c(e){return(e.version?+e.version.split(".")[0]:6)||6}function d(e,t){var n=this.babelOptions||{};return n.sourceMap="inline",n.filename=e.address,n.code=!0,n.ast=!1,c(t)>=6?(delete n.optional,delete n.whitelist,delete n.blacklist,n.presets=u(n.presets),n.plugins=l(n.plugins)):(n.modules="system",n.blacklist||(n.blacklist=["react"])),n}function f(e){var t=e.types;return{visitor:{Program:function(e,n){e.unshiftContainer("body",[t.exportNamedDeclaration(null,[t.exportSpecifier(t.identifier("true"),t.identifier("__esModule"))])])}}}}function p(e,t){var n=t.Babel||t.babel||t,r=c(n),o=d.call(this,e,n);return Promise.all([v.call(this,n,o),g.call(this,n,o)]).then(function(t){return r>=6&&(o.plugins=[f].concat(t[0]),o.presets=t[1]),n.transform(e.source,o).code+"\n//# sourceURL="+e.address+"!eval"})}var h=__global,m="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process);e.prototype.transpiler="babel",e.prototype.transpile=function(e){var n=this;return n.transpilerHasRun||(h.traceur&&!n.has("traceur")&&n.set("traceur",t(n,"traceur")),h.Babel&&!n.has("babel")&&n.set("babel",t(n,"Babel")),n.transpilerHasRun=!0),n.import(n.transpiler).then(function(t){var o=t;return o.__useDefault&&(o=o.default),(o.Compiler?r:p).call(n,e,o)}).then(function(t){return'var __moduleAddress = "'+e.address+'";'+t})},e.prototype.instantiate=function(e){var r=this;return Promise.resolve(r.normalize(r.transpiler)).then(function(o){if(e.name===o)return{deps:[],execute:function(){var o=h.System,a=h.Reflect.Loader;return __eval("(function(require,exports,module){"+e.source+"})();",h,e),h.System=o,h.Reflect.Loader=a,t(r,n(e.name))}}})};var v=function(){function e(e,r){var o=[];return(r||[]).forEach(function(r){var a=i(r);if(!s(r)||t(e,a))o.push(r);else if(!t(e,a)){var l=this.configMain||"package.json!npm",u=n(a);o.push(this.import(u,{name:l}).then(function(e){var t=e.__esModule?e.default:e;return"string"==typeof r?t:[t,r[1]]}))}},this),Promise.all(o)}function t(e,t){var n=/^(?:babel-plugin-)/;return!!(e.availablePlugins||{})[n.test(t)?t.replace("babel-plugin-",""):t]}function n(e){var t=/^(?:babel-plugin-)/;return/\//.test(e)||t.test(e)?e:"babel-plugin-"+e}return function(t,n){var r=a.call(this),o=n.env||{},i=[e.call(this,t,n.plugins)];for(var s in o)if(r===s){var l=o[s].plugins||[];i.push(e.call(this,t,l))}return Promise.all(i).then(function(e){var t=[];return e.forEach(function(e){t=t.concat(e)}),t})}}(),g=function(){function e(e,r){var o=[];return(r||[]).forEach(function(r){var a=i(r);if(!s(r)||t(e,a))o.push(r);else if(!t(e,a)){var l=this.configMain||"package.json!npm",u=n(a);o.push(this.import(u,{name:l}).then(function(e){var t=e.__esModule?e.default:e;return"string"==typeof r?t:[t,r[1]]}))}},this),Promise.all(o)}function t(e,t){var n=/^(?:babel-preset-)/;return!!(e.availablePresets||{})[n.test(t)?t.replace("babel-preset-",""):t]}function n(e){var t=/^(?:babel-preset-)/;return/\//.test(e)||t.test(e)?e:"babel-preset-"+e}return function(t,n){var r=a.call(this),o=n.env||{},i=[e.call(this,t,n.presets)];for(var s in o)if(r===s){var l=o[s].presets||[];i.push(e.call(this,t,l))}return Promise.all(i).then(function(e){var t=[];return e.forEach(function(e){t=t.concat(e)}),t})}}()}(__global.LoaderPolyfill),function(){function e(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@\/?#]*(?::[^:@\/?#]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}function t(e){var t=[];return e.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?t.pop():t.push(e)}),t.join("").replace(/^\//,"/"===e.charAt(0)?"/":"")}function n(n,r){var o=r,a=n;return i&&(o=o.replace(/\\/g,"/")),o=e(o||""),a=e(a||""),o&&a?(o.protocol||a.protocol)+(o.protocol||o.authority?o.authority:a.authority)+t(o.protocol||o.authority||"/"===o.pathname.charAt(0)?o.pathname:o.pathname?(a.authority&&!a.pathname?"/":"")+a.pathname.slice(0,a.pathname.lastIndexOf("/")+1)+o.pathname:a.pathname)+(o.protocol||o.authority||o.pathname?o.search:o.search||a.search)+o.hash:null}var r,o="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,a="undefined"!=typeof window&&!o,i="undefined"!=typeof process&&!!process.platform.match(/^win/),s=__global.Promise||require("when/es6-shim/Promise");if("undefined"!=typeof XMLHttpRequest)r=function(e,t,n){function r(){t(a.responseText)}function o(){var t=a.statusText+": "+e||"XHR error",r=new Error(t);r.statusCode=a.status,n(r)}var a=new XMLHttpRequest,i=!0,s=!1;if(!("withCredentials"in a)){var l=/^(\w+:)?\/\/([^\/]+)/.exec(e);l&&(i=l[2]===window.location.host,l[1]&&(i&=l[1]===window.location.protocol))}i||"undefined"==typeof XDomainRequest||((a=new XDomainRequest).onload=r,a.onerror=o,a.ontimeout=o,a.onprogress=function(){},a.timeout=0,s=!0),a.onreadystatechange=function(){4===a.readyState&&(200===a.status||0==a.status&&a.responseText?r():o())},a.open("GET",e,!0),s&&setTimeout(function(){a.send()},0),a.send(null)};else if("undefined"!=typeof require){var l,u=/ENOENT/;r=function(e,t,n){if("file:"!=e.substr(0,5))throw"Only file URLs of the form file: allowed running in Node.";l=l||require("fs");var r=e.substr(5);return i&&(r=r.replace(/\//g,"\\")),l.readFile(r,function(e,r){if(e)return u.test(e.message)&&(e.statusCode=404),n(e);t(r+"")})}}else{if("function"!=typeof fetch)throw new TypeError("No environment fetch API available.");r=function(e,t,n){fetch(e).then(function(e){return e.text()}).then(function(e){t(e)}).then(null,function(e){n(e)})}}var c=new(function(e){function t(t){if(e.call(this,t||{}),"undefined"!=typeof location&&location.href){var n=__global.location.href.split("#")[0].split("?")[0];this.baseURL=n.substring(0,n.lastIndexOf("/")+1)}else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURL");this.baseURL="file:"+process.cwd()+"/",i&&(this.baseURL=this.baseURL.replace(/\\/g,"/"))}this.paths={"*":"*.js"}}return t.__proto__=null!==e?e:Function.prototype,t.prototype=$__Object$create(null!==e?e.prototype:null),$__Object$defineProperty(t.prototype,"constructor",{value:t}),$__Object$defineProperty(t.prototype,"global",{get:function(){return a?window:o?self:__global},enumerable:!1}),$__Object$defineProperty(t.prototype,"strict",{get:function(){return!0},enumerable:!1}),$__Object$defineProperty(t.prototype,"normalize",{value:function(e,t,n){if("string"!=typeof e)throw new TypeError("Module name must be a string");var r=e.split("/");if(0==r.length)throw new TypeError("No module name provided");var o=0,a=!1,i=0;if("."==r[0]){if(++o==r.length)throw new TypeError('Illegal module name "'+e+'"');a=!0}else{for(;".."==r[o];)if(++o==r.length)throw new TypeError('Illegal module name "'+e+'"');o&&(a=!0),i=o}for(var s=o;s2)throw new TypeError("Only one wildcard in a path is permitted");if(1==s.length){if(r==i&&i.length>o.length){o=i;break}}else r.substr(0,s[0].length)==s[0]&&r.substr(r.length-s[1].length)==s[1]&&(o=i,t=r.substr(s[0].length,r.length-s[1].length-s[0].length))}var l=this.paths[o];return t&&(l=l.replace("*",t)),a&&(l=l.replace(/#/g,"%23")),n(this.baseURL,l)},enumerable:!1,writable:!0}),$__Object$defineProperty(t.prototype,"fetch",{value:function(e){var t=this;return new s(function(o,a){r(n(t.baseURL,e.address),function(e){o(e)},a)})},enumerable:!1,writable:!0}),t}(__global.LoaderPolyfill));"object"==typeof exports&&(module.exports=c),__global.System=c}()}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:global),function(e){e.upgradeSystemLoader=function(){function t(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@\/?#]*(?::[^:@\/?#]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}function r(e,n){var r=e,o=n;return x&&(o=o.replace(/\\/g,"/")),o=t(o||""),r=t(r||""),o&&r?(o.protocol||r.protocol)+(o.protocol||o.authority?o.authority:r.authority)+function(e){var t=[];return e.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?t.pop():t.push(e)}),t.join("").replace(/^\//,"/"===e.charAt(0)?"/":"")}(o.protocol||o.authority||"/"===o.pathname.charAt(0)?o.pathname:o.pathname?(r.authority&&!r.pathname?"/":"")+r.pathname.slice(0,r.pathname.lastIndexOf("/")+1)+o.pathname:r.pathname)+(o.protocol||o.authority||o.pathname?o.search:o.search||r.search)+o.hash:null}function o(t){var n={};if(("object"==typeof t||"function"==typeof t)&&t!==e)if(_)for(var r in t)"default"!==r&&a(n,t,r);else i(n,t);return n.default=t,w(n,"__useDefault",{value:!0}),n}function a(e,t,n){try{var r;(r=Object.getOwnPropertyDescriptor(t,n))&&w(e,n,r)}catch(r){return e[n]=t[n],!1}}function i(e,t,n){var r=t&&t.hasOwnProperty;for(var o in t)r&&!t.hasOwnProperty(o)||n&&o in e||(e[o]=t[o]);return e}function s(e){function t(e,t){t._extensions=[];for(var n=0,r=e.length;n=0;a--){for(var i=r[a],s=0;st.index)return!0;return!1}r.lastIndex=o.lastIndex=a.lastIndex=0;var n,i=[],s=[],l=[];if(e.length/e.split("\n").length<200){for(;n=a.exec(e);)s.push([n.index,n.index+n[0].length]);for(;n=o.exec(e);)t(s,n)||l.push([n.index,n.index+n[0].length])}for(;n=r.exec(e);)if(!t(s,n)&&!t(l,n)){var u=n[1].substr(1,n[1].length-2);if(u.match(/"|'/))continue;i.push(u)}return i}e._extensions.push(f);var n=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])(exports\s*(\[['"]|\.)|module(\.exports|\['exports'\]|\["exports"\])\s*(\[['"]|[=,\.])|Object.defineProperty\(\s*module\s*,\s*(?:'|")exports(?:'|"))/,r=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF."'])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')\s*\)/g,o=/(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,a=/("[^"\\\n\r]*(\\.[^"\\\n\r]*)*"|'[^'\\\n\r]*(\\.[^'\\\n\r]*)*')/g,i=e.instantiate;e.instantiate=function(o){return o.metadata.format||(n.lastIndex=0,r.lastIndex=0,(r.exec(o.source)||n.exec(o.source))&&(o.metadata.format="cjs")),"cjs"==o.metadata.format&&(o.metadata.deps=o.metadata.deps?o.metadata.deps.concat(t(o.source)):t(o.source),o.metadata.executingRequire=!0,o.metadata.execute=function(t,n,r){var a=(o.address||"").split("/");a.pop(),a=a.join("/"),b._nodeRequire&&(a=a.substr(5));e.global._g={global:e.global,exports:n,module:r,require:t,__filename:b._nodeRequire?o.address.substr(5):o.address,__dirname:a};var i=e.global.define;e.global.define=void 0;var s={name:o.name,source:"(function() {\n(function(global, exports, module, require, __filename, __dirname){\n"+o.source+"\n}).call(_g.exports, _g.global, _g.exports, _g.module, _g.require, _g.__filename, _g.__dirname);})();",address:o.address};e.__exec(s),e.global.define=i,e.global._g=void 0}),i.call(this,o)}}function p(e){function t(e,t){var n=[],r=(e.match(f)[1].split(",")[t]||"require").replace(h,""),o=m[r]||(m[r]=new RegExp("/\\*|//|\"|'|`|(?:^|\\breturn\\b|[([=,;:?><&|^*%~+-])\\s*(?=/)|\\b"+r+"(?=\\s*\\()","g"));o.lastIndex=0,v[r]=v.require;for(var a,i,s,l;a=o.exec(e);)i=a[0],(s=v[i])||(s=v[i="/regexp/"]),s.lastIndex=o.lastIndex,(l=s.exec(e))&&l.index===o.lastIndex&&(o.lastIndex=s.lastIndex,s===v.require&&l[2]&&n.push(l[2]));return n}function n(e,t,r,o){var a=this;if("object"==typeof e&&!(e instanceof Array))return n.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1));if(!(e instanceof Array)){if("string"==typeof e){var i=a.get(e);return i.__useDefault?i.default:i}throw new TypeError("Invalid require")}Promise.all(e.map(function(e){return a.import(e,o)})).then(function(e){t&&t.apply(null,e)},r)}function r(e,t,r){return function(o,a,i){return"string"==typeof o?t(o):n.call(r,o,a,i,{name:e})}}function o(e){function n(n,o,a){var i=n,s=o,l=a;"string"!=typeof i&&(l=s,s=i,i=null),s instanceof Array||(l=s,s=["require","exports","module"]),"function"!=typeof l&&(l=function(e){return function(){return e}}(l)),void 0===s[s.length-1]&&s.pop();var u,c,f;if(-1!=(u=y.call(s,"require"))){s.splice(u,1);var p=l.toString();s=s.concat(t(p,u))}-1!=(c=y.call(s,"exports"))&&s.splice(c,1),-1!=(f=y.call(s,"module"))&&s.splice(f,1);var h={deps:s,execute:function(t,n,o){for(var a=[],i=0;i=0;o--)e.source=e.source.substr(0,r[o].start)+r[o].postLocate(t[o])+e.source.substr(r[o].end,e.source.length);return a.call(n,e)})}}),x(function(e){e._contextualModules={},e.setContextual=function(e,t){this._contextualModules[e]=t};var t=e.normalize;e.normalize=function(e,n){var r=this,o=r.pluginLoader||r;if(n){var a=this._contextualModules[e];if(a){var i=e+"/"+n;return r.has(i)?Promise.resolve(i):("string"==typeof a&&(a=o.import(a)),Promise.resolve(a).then(function(e){var t=e;return t.default&&(t=t.default),Promise.resolve(t.call(r,n))}).then(function(e){return r.set(i,r.newModule(e)),i}))}}return t.apply(this,arguments)}}),x(function(e){function t(){document.removeEventListener("DOMContentLoaded",t,!1),window.removeEventListener("load",t,!1),n()}function n(){for(var t=document.getElementsByTagName("script"),n=0;nt.index)return!0;return!1}function n(e){for(;o=e.exec(r);)if(!t(i,o)){var n=o[1];a.push(n)}}var r=e.replace(d,"");u.lastIndex=d.lastIndex=c.lastIndex=f.lastIndex=0;var o,a=[],i=[];if(e.length/e.split("\n").length<200)for(;o=f.exec(r);)i.push([o.index,o.index+o[0].length]);return n(u),n(c),a}t._extensions&&t._extensions.push(e),t._traceData={loads:{},parentMap:{}},t.getDependencies=function(e){var t=this.getModuleLoad(e);return t?t.metadata.dependencies:void 0},t.getDependants=function(e){var t=[];return n(this._traceData.parentMap[e]||{},function(e){t.push(e)}),t},t.getModuleLoad=function(e){return this._traceData.loads[e]},t.getBundles=function(e,t){var r=t||{};r[e]=!0;var o=this,a=o._traceData.parentMap[e];if(!a)return[e];var i=[];return n(a,function(e,t){r[e]||(i=i.concat(o.getBundles(e,r)))}),i},t._allowModuleExecution={},t.allowModuleExecution=function(e){var t=this;return t.normalize(e).then(function(e){t._allowModuleExecution[e]=!0})};var o=t.normalize;t.normalize=function(e,t){var n=o.apply(this,arguments);if(t){var r=this._traceData.parentMap;return n.then(function(e){return r[e]||(r[e]={}),r[e][t]=!0,e})}return n};var a=function(){return t.newModule({})},i={traceur:!0,babel:!0},s=function(e){return i[e.name]||this._allowModuleExecution[e.name]},l=[].map||function(e){for(var t=[],n=0,r=this.length;n-1||a.indexOf("steal-sans-promises.production")>-1&&!n.env)&&this.config({env:s+"-production"}),(this.isEnv("production")||this.loadBundles)&&T.call(this),U.stealPath.set.call(this,i,n)}},devBundle:{order:16,set:function(e,t){var n=!0===e?"dev-bundle":e;n&&(this.devBundle=n)}},depsBundle:{order:17,set:function(e,t){var n=!0===e?"dev-bundle":e;n&&(this.depsBundle=n)}}};n(U,function(e,t){e.order?z.splice(e.order,0,t):z.push(t)}),function(e,t,r){var o=e.config;e.config=function(i){var s=a({},i);n(t,function(t){var n=r[t];if(n.set&&s[t]){var o=n.set.call(e,s[t],i);void 0!==o&&(e[t]=o),delete s[t]}}),o.call(this,s)}}(e,z,U),S.config=function(e){if("string"==typeof e)return this.loader[e];this.loader.config(e)},x(function(e){e.getEnv=function(){return(this.env||"").split("-")[1]||this.env},e.getPlatform=function(){var e=(this.env||"").split("-");return 2===e.length?e[0]:void 0},e.isEnv=function(e){return this.getEnv()===e},e.isPlatform=function(e){return this.getPlatform()===e}});var C=function(e){var n={},r=/Url$/,o=e.split("?"),a=o.shift(),i=o.join("?").split("&"),s=a.split("/");s.pop(),s.join("/");if(i.length&&i[0].length)for(var l,u=0;u1){var d=t(c[0]);n[d=d.replace(r,"URL")]=c.slice(1).join("=")}}return n},A=function(e){var r={},o=/Url$/;r.stealURL=e.src,n(e.attributes,function(e){var n=e.nodeName||e.name,a=t(0===n.indexOf("data-")?n.replace("data-",""):n);a=a.replace(o,"URL"),r[a]=""===e.value||e.value});var i=e.innerHTML;return/\S/.test(i)&&(r.mainSource=i),a(C(e.src),r)},F=function(){return new Promise(function(e,t){if(p)e(a({stealURL:location.href},C(location.href)));else if(h||m||v){if(document.currentScript)return void e(A(document.currentScript));var n=document.scripts;n.length&&e(A(n[n.length-1]))}else e({stealPath:__dirname})})};return S.startup=function(e){var t,n,o=this.loader;return w=new Promise(function(e,r){t=e,n=r}),O=F().then(function(i){var s;return s="object"==typeof e?a(e,i):i,o.config(s),$.call(o),o.loadBundles?(o.main||!o.isEnv("production")||o.stealBundled||b("Attribute 'main' is required in production environment. Please add it to the script tag."),o.import(o.configMain).then(t,n),w.then(function(e){return $.call(o),o.main?o.import(o.main):e})):(o.import(o.devBundle).then(function(){return o.import(o.configMain)}).then(function(){return o.import(o.depsBundle)}).then(t,n),(j=w.then(function(){return $.call(o),D.call(o),s&&o.config(s),o.import("@dev")})).then(function(){if(!o.main||o.localLoader)return w;var e=o.main;return"string"==typeof e&&(e=[e]),Promise.all(r(e,function(e){return o.import(e)}))}))}).then(function(e){return o.mainSource?o.module(o.mainSource):(o.loadScriptModules(),e)})},S.done=function(){return O},S.import=function(){var e=arguments,t=this.System;return w||(t.main||(t.main="@empty"),S.startup()),w.then(function(){var r=[];return n(e,function(e){r.push(t.import(e))}),r.length>1?Promise.all(r):r[0]})},S.setContextual=d.call(e.setContextual,e),S.isEnv=d.call(e.isEnv,e),S.isPlatform=d.call(e.isPlatform,e),S};if(!g||m||v){var O=e.steal;e.steal=j(System),e.steal.startup(O&&"object"==typeof O&&O).then(null,function(e){if("undefined"!=typeof console){var t=console;t[t.error?"error":"log"](e)}}),e.steal.clone=w}else e.steal=j(System),e.steal.System=System,e.steal.dev=require("./ext/dev.js"),steal.clone=w,module.exports=e.steal}("undefined"==typeof window?"undefined"==typeof global?this:global:window); \ No newline at end of file diff --git a/test/load_module_twice/dev.html b/test/load_module_twice/dev.html new file mode 100644 index 000000000..a6f8bc6b6 --- /dev/null +++ b/test/load_module_twice/dev.html @@ -0,0 +1,30 @@ + + + + + module is loaded twice with different paths + + + + + + diff --git a/test/load_module_twice/foo.js b/test/load_module_twice/foo.js new file mode 100644 index 000000000..f053ebf79 --- /dev/null +++ b/test/load_module_twice/foo.js @@ -0,0 +1 @@ +module.exports = {}; diff --git a/test/load_module_twice/main.js b/test/load_module_twice/main.js new file mode 100644 index 000000000..defaf6c9a --- /dev/null +++ b/test/load_module_twice/main.js @@ -0,0 +1,7 @@ +var foo = require("./foo"); +var foo2 = require("foo"); + +if (!window || !window.assert) { + console.log("foo: ", foo); + console.log("foo2: ", foo2); +} diff --git a/test/load_module_twice/package.json b/test/load_module_twice/package.json new file mode 100644 index 000000000..185c7d5f3 --- /dev/null +++ b/test/load_module_twice/package.json @@ -0,0 +1,5 @@ +{ + "name": "load_module_twice", + "version": "0.0.1", + "main": "main.js" +} diff --git a/test/test.js b/test/test.js index a047bf09f..aeb25447b 100644 --- a/test/test.js +++ b/test/test.js @@ -242,6 +242,10 @@ if (hasConsole) { QUnit.test("warn in production when main is not set (#537)", function(assert) { makeIframe("basics/no_main_warning.html", assert); }); + + QUnit.test("warns when module is loaded twice with different paths", function(assert) { + makeIframe("load_module_twice/dev.html", assert); + }); } QUnit.test("can load a bundle with an amd module depending on a global", function(assert) { From 988994334b356bb298b47f1df1df69eca904e8f5 Mon Sep 17 00:00:00 2001 From: Manuel Mujica Date: Mon, 25 Sep 2017 10:09:02 -0600 Subject: [PATCH 2/2] Use Function::bind instead of console.warn.bind --- src/system-extension-module-loaded-twice.js | 4 ++-- steal-sans-promises.js | 4 ++-- steal-sans-promises.production.js | 2 +- steal.js | 4 ++-- steal.production.js | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/system-extension-module-loaded-twice.js b/src/system-extension-module-loaded-twice.js index adf5f71e1..1226a960b 100644 --- a/src/system-extension-module-loaded-twice.js +++ b/src/system-extension-module-loaded-twice.js @@ -6,8 +6,8 @@ addStealExtension(function(loader) { var superInstantiate = loader.instantiate; - var warn = console && typeof console.warn === "function" ? - console.warn.bind(console) : + var warn = typeof console === "object" ? + Function.prototype.bind.call(console.warn, console) : null; loader._instantiatedModules = loader._instantiatedModules || {}; diff --git a/steal-sans-promises.js b/steal-sans-promises.js index 03ab7cd6e..98200ddab 100644 --- a/steal-sans-promises.js +++ b/steal-sans-promises.js @@ -4990,8 +4990,8 @@ addStealExtension(function (loader) { addStealExtension(function(loader) { var superInstantiate = loader.instantiate; - var warn = console && typeof console.warn === "function" ? - console.warn.bind(console) : + var warn = typeof console === "object" ? + Function.prototype.bind.call(console.warn, console) : null; loader._instantiatedModules = loader._instantiatedModules || {}; diff --git a/steal-sans-promises.production.js b/steal-sans-promises.production.js index ee1573e68..e97d965ff 100644 --- a/steal-sans-promises.production.js +++ b/steal-sans-promises.production.js @@ -4,4 +4,4 @@ * Copyright (c) 2017 Bitovi; Licensed MIT */ -!function(__global){function __eval(__source,__global,__load){try{eval('(function() { var __moduleName = "'+(__load.name||"").replace('"','"')+'"; '+__source+" \n }).call(__global);")}catch(e){throw"SyntaxError"!=e.name&&"TypeError"!=e.name||(e.message="Evaluating "+(__load.name||load.address)+"\n\t"+e.message),e}}__global.$__Object$getPrototypeOf=Object.getPrototypeOf||function(e){return e.__proto__};var $__Object$defineProperty;!function(){try{Object.defineProperty({},"a",{})&&($__Object$defineProperty=Object.defineProperty)}catch(e){$__Object$defineProperty=function(e,t,n){try{e[t]=n.value||n.get.call(e)}catch(e){}}}}(),__global.$__Object$create=Object.create||function(e,t){function n(){}if(n.prototype=e,"object"==typeof t)for(prop in t)t.hasOwnProperty(prop)&&(n[prop]=t[prop]);return new n},function(){function e(e){return{status:"loading",name:e,linkSets:[],dependencies:[],metadata:{}}}function t(e,t,n){return new M(i({step:n.address?"fetch":"locate",loader:e,moduleName:t,moduleMetadata:n&&n.metadata||{},moduleSource:n.source,moduleAddress:n.address}))}function n(t,n,a,o){return new M(function(e,r){e(t.loaderObj.normalize(n,a,o))}).then(function(n){var a;if(t.modules[n])return a=e(n),a.status="linked",a.module=t.modules[n],a;for(var o=0,i=t.loads.length;o",t.isDeclarative=!0,e.loaderObj.transpile(t).then(function(e){var n=__global.System,r=n.register;n.register=function(e,n,r){var a=r,o=n;"string"!=typeof e&&(a=o,o=e),t.declare=a,t.depsList=o},__eval(e,__global,t),n.register=r});if("object"!=typeof n)throw TypeError("Invalid instantiate return value");t.depsList=n.deps||[],t.execute=n.execute,t.isDeclarative=!1}}).then(function(){if("loading"==t.status){t.dependencies=[];for(var r=t.depsList,a=[],o=0,i=r.length;o0)){var n=e.startingLoad;if(!1===e.loader.loaderObj.execute){for(var r=[].concat(e.loads),a=0,o=r.length;a")+"\n")),a=w(a,'Error loading "'+t.name+'" at '+(t.address||"")+"\n");for(var o=e.loads.concat([]),i=0,s=o.length;i=0;i--){for(var s=r[i],l=0;l=0;r-=1){var a=n[r];-1===t.indexOf(a)&&t.unshift(a)}else t=["es2015-no-commonjs","react","stage-0"];return t}function d(e){return(e.version?+e.version.split(".")[0]:6)||6}function c(e,t){var n=this.babelOptions||{};return n.sourceMap="inline",n.filename=e.address,n.code=!0,n.ast=!1,d(t)>=6?(delete n.optional,delete n.whitelist,delete n.blacklist,n.presets=u(n.presets),n.plugins=l(n.plugins)):(n.modules="system",n.blacklist||(n.blacklist=["react"])),n}function f(e){var t=e.types;return{visitor:{Program:function(e,n){e.unshiftContainer("body",[t.exportNamedDeclaration(null,[t.exportSpecifier(t.identifier("true"),t.identifier("__esModule"))])])}}}}function p(e,t){var n=t.Babel||t.babel||t,r=d(n),a=c.call(this,e,n);return Promise.all([v.call(this,n,a),g.call(this,n,a)]).then(function(t){return r>=6&&(a.plugins=[f].concat(t[0]),a.presets=t[1]),n.transform(e.source,a).code+"\n//# sourceURL="+e.address+"!eval"})}var m=__global,h="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process);e.prototype.transpiler="babel",e.prototype.transpile=function(e){var n=this;return n.transpilerHasRun||(m.traceur&&!n.has("traceur")&&n.set("traceur",t(n,"traceur")),m.Babel&&!n.has("babel")&&n.set("babel",t(n,"Babel")),n.transpilerHasRun=!0),n.import(n.transpiler).then(function(t){var a=t;return a.__useDefault&&(a=a.default),(a.Compiler?r:p).call(n,e,a)}).then(function(t){return'var __moduleAddress = "'+e.address+'";'+t})},e.prototype.instantiate=function(e){var r=this;return Promise.resolve(r.normalize(r.transpiler)).then(function(a){if(e.name===a)return{deps:[],execute:function(){var a=m.System,o=m.Reflect.Loader;return __eval("(function(require,exports,module){"+e.source+"})();",m,e),m.System=a,m.Reflect.Loader=o,t(r,n(e.name))}}})};var v=function(){function e(e,r){var a=[];return(r||[]).forEach(function(r){var o=i(r);if(!s(r)||t(e,o))a.push(r);else if(!t(e,o)){var l=this.configMain||"package.json!npm",u=n(o);a.push(this.import(u,{name:l}).then(function(e){var t=e.__esModule?e.default:e;return"string"==typeof r?t:[t,r[1]]}))}},this),Promise.all(a)}function t(e,t){var n=/^(?:babel-plugin-)/;return!!(e.availablePlugins||{})[n.test(t)?t.replace("babel-plugin-",""):t]}function n(e){var t=/^(?:babel-plugin-)/;return/\//.test(e)||t.test(e)?e:"babel-plugin-"+e}return function(t,n){var r=o.call(this),a=n.env||{},i=[e.call(this,t,n.plugins)];for(var s in a)if(r===s){var l=a[s].plugins||[];i.push(e.call(this,t,l))}return Promise.all(i).then(function(e){var t=[];return e.forEach(function(e){t=t.concat(e)}),t})}}(),g=function(){function e(e,r){var a=[];return(r||[]).forEach(function(r){var o=i(r);if(!s(r)||t(e,o))a.push(r);else if(!t(e,o)){var l=this.configMain||"package.json!npm",u=n(o);a.push(this.import(u,{name:l}).then(function(e){var t=e.__esModule?e.default:e;return"string"==typeof r?t:[t,r[1]]}))}},this),Promise.all(a)}function t(e,t){var n=/^(?:babel-preset-)/;return!!(e.availablePresets||{})[n.test(t)?t.replace("babel-preset-",""):t]}function n(e){var t=/^(?:babel-preset-)/;return/\//.test(e)||t.test(e)?e:"babel-preset-"+e}return function(t,n){var r=o.call(this),a=n.env||{},i=[e.call(this,t,n.presets)];for(var s in a)if(r===s){var l=a[s].presets||[];i.push(e.call(this,t,l))}return Promise.all(i).then(function(e){var t=[];return e.forEach(function(e){t=t.concat(e)}),t})}}()}(__global.LoaderPolyfill),function(){function e(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@\/?#]*(?::[^:@\/?#]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}function t(e){var t=[];return e.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?t.pop():t.push(e)}),t.join("").replace(/^\//,"/"===e.charAt(0)?"/":"")}function n(n,r){var a=r,o=n;return i&&(a=a.replace(/\\/g,"/")),a=e(a||""),o=e(o||""),a&&o?(a.protocol||o.protocol)+(a.protocol||a.authority?a.authority:o.authority)+t(a.protocol||a.authority||"/"===a.pathname.charAt(0)?a.pathname:a.pathname?(o.authority&&!o.pathname?"/":"")+o.pathname.slice(0,o.pathname.lastIndexOf("/")+1)+a.pathname:o.pathname)+(a.protocol||a.authority||a.pathname?a.search:a.search||o.search)+a.hash:null}var r,a="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,o="undefined"!=typeof window&&!a,i="undefined"!=typeof process&&!!process.platform.match(/^win/),s=__global.Promise||require("when/es6-shim/Promise");if("undefined"!=typeof XMLHttpRequest)r=function(e,t,n){function r(){t(o.responseText)}function a(){var t=o.statusText+": "+e||"XHR error",r=new Error(t);r.statusCode=o.status,n(r)}var o=new XMLHttpRequest,i=!0,s=!1;if(!("withCredentials"in o)){var l=/^(\w+:)?\/\/([^\/]+)/.exec(e);l&&(i=l[2]===window.location.host,l[1]&&(i&=l[1]===window.location.protocol))}i||"undefined"==typeof XDomainRequest||((o=new XDomainRequest).onload=r,o.onerror=a,o.ontimeout=a,o.onprogress=function(){},o.timeout=0,s=!0),o.onreadystatechange=function(){4===o.readyState&&(200===o.status||0==o.status&&o.responseText?r():a())},o.open("GET",e,!0),s&&setTimeout(function(){o.send()},0),o.send(null)};else if("undefined"!=typeof require){var l,u=/ENOENT/;r=function(e,t,n){if("file:"!=e.substr(0,5))throw"Only file URLs of the form file: allowed running in Node.";l=l||require("fs");var r=e.substr(5);return i&&(r=r.replace(/\//g,"\\")),l.readFile(r,function(e,r){if(e)return u.test(e.message)&&(e.statusCode=404),n(e);t(r+"")})}}else{if("function"!=typeof fetch)throw new TypeError("No environment fetch API available.");r=function(e,t,n){fetch(e).then(function(e){return e.text()}).then(function(e){t(e)}).then(null,function(e){n(e)})}}var d=new(function(e){function t(t){if(e.call(this,t||{}),"undefined"!=typeof location&&location.href){var n=__global.location.href.split("#")[0].split("?")[0];this.baseURL=n.substring(0,n.lastIndexOf("/")+1)}else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURL");this.baseURL="file:"+process.cwd()+"/",i&&(this.baseURL=this.baseURL.replace(/\\/g,"/"))}this.paths={"*":"*.js"}}return t.__proto__=null!==e?e:Function.prototype,t.prototype=$__Object$create(null!==e?e.prototype:null),$__Object$defineProperty(t.prototype,"constructor",{value:t}),$__Object$defineProperty(t.prototype,"global",{get:function(){return o?window:a?self:__global},enumerable:!1}),$__Object$defineProperty(t.prototype,"strict",{get:function(){return!0},enumerable:!1}),$__Object$defineProperty(t.prototype,"normalize",{value:function(e,t,n){if("string"!=typeof e)throw new TypeError("Module name must be a string");var r=e.split("/");if(0==r.length)throw new TypeError("No module name provided");var a=0,o=!1,i=0;if("."==r[0]){if(++a==r.length)throw new TypeError('Illegal module name "'+e+'"');o=!0}else{for(;".."==r[a];)if(++a==r.length)throw new TypeError('Illegal module name "'+e+'"');a&&(o=!0),i=a}for(var s=a;s2)throw new TypeError("Only one wildcard in a path is permitted");if(1==s.length){if(r==i&&i.length>a.length){a=i;break}}else r.substr(0,s[0].length)==s[0]&&r.substr(r.length-s[1].length)==s[1]&&(a=i,t=r.substr(s[0].length,r.length-s[1].length-s[0].length))}var l=this.paths[a];return t&&(l=l.replace("*",t)),o&&(l=l.replace(/#/g,"%23")),n(this.baseURL,l)},enumerable:!1,writable:!0}),$__Object$defineProperty(t.prototype,"fetch",{value:function(e){var t=this;return new s(function(a,o){r(n(t.baseURL,e.address),function(e){a(e)},o)})},enumerable:!1,writable:!0}),t}(__global.LoaderPolyfill));"object"==typeof exports&&(module.exports=d),__global.System=d}()}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:global),function(e){e.upgradeSystemLoader=function(){function t(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@\/?#]*(?::[^:@\/?#]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}function r(e,n){var r=e,a=n;return x&&(a=a.replace(/\\/g,"/")),a=t(a||""),r=t(r||""),a&&r?(a.protocol||r.protocol)+(a.protocol||a.authority?a.authority:r.authority)+function(e){var t=[];return e.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?t.pop():t.push(e)}),t.join("").replace(/^\//,"/"===e.charAt(0)?"/":"")}(a.protocol||a.authority||"/"===a.pathname.charAt(0)?a.pathname:a.pathname?(r.authority&&!r.pathname?"/":"")+r.pathname.slice(0,r.pathname.lastIndexOf("/")+1)+a.pathname:r.pathname)+(a.protocol||a.authority||a.pathname?a.search:a.search||r.search)+a.hash:null}function a(t){var n={};if(("object"==typeof t||"function"==typeof t)&&t!==e)if(_)for(var r in t)"default"!==r&&o(n,t,r);else i(n,t);return n.default=t,w(n,"__useDefault",{value:!0}),n}function o(e,t,n){try{var r;(r=Object.getOwnPropertyDescriptor(t,n))&&w(e,n,r)}catch(r){return e[n]=t[n],!1}}function i(e,t,n){var r=t&&t.hasOwnProperty;for(var a in t)r&&!t.hasOwnProperty(a)||n&&a in e||(e[a]=t[a]);return e}function s(e){function t(e,t){t._extensions=[];for(var n=0,r=e.length;n=0;o--){for(var i=r[o],s=0;st.index)return!0;return!1}r.lastIndex=a.lastIndex=o.lastIndex=0;var n,i=[],s=[],l=[];if(e.length/e.split("\n").length<200){for(;n=o.exec(e);)s.push([n.index,n.index+n[0].length]);for(;n=a.exec(e);)t(s,n)||l.push([n.index,n.index+n[0].length])}for(;n=r.exec(e);)if(!t(s,n)&&!t(l,n)){var u=n[1].substr(1,n[1].length-2);if(u.match(/"|'/))continue;i.push(u)}return i}e._extensions.push(f);var n=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])(exports\s*(\[['"]|\.)|module(\.exports|\['exports'\]|\["exports"\])\s*(\[['"]|[=,\.])|Object.defineProperty\(\s*module\s*,\s*(?:'|")exports(?:'|"))/,r=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF."'])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')\s*\)/g,a=/(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,o=/("[^"\\\n\r]*(\\.[^"\\\n\r]*)*"|'[^'\\\n\r]*(\\.[^'\\\n\r]*)*')/g,i=e.instantiate;e.instantiate=function(a){return a.metadata.format||(n.lastIndex=0,r.lastIndex=0,(r.exec(a.source)||n.exec(a.source))&&(a.metadata.format="cjs")),"cjs"==a.metadata.format&&(a.metadata.deps=a.metadata.deps?a.metadata.deps.concat(t(a.source)):t(a.source),a.metadata.executingRequire=!0,a.metadata.execute=function(t,n,r){var o=(a.address||"").split("/");o.pop(),o=o.join("/"),b._nodeRequire&&(o=o.substr(5));e.global._g={global:e.global,exports:n,module:r,require:t,__filename:b._nodeRequire?a.address.substr(5):a.address,__dirname:o};var i=e.global.define;e.global.define=void 0;var s={name:a.name,source:"(function() {\n(function(global, exports, module, require, __filename, __dirname){\n"+a.source+"\n}).call(_g.exports, _g.global, _g.exports, _g.module, _g.require, _g.__filename, _g.__dirname);})();",address:a.address};e.__exec(s),e.global.define=i,e.global._g=void 0}),i.call(this,a)}}function p(e){function t(e,t){var n=[],r=(e.match(f)[1].split(",")[t]||"require").replace(m,""),a=h[r]||(h[r]=new RegExp("/\\*|//|\"|'|`|(?:^|\\breturn\\b|[([=,;:?><&|^*%~+-])\\s*(?=/)|\\b"+r+"(?=\\s*\\()","g"));a.lastIndex=0,v[r]=v.require;for(var o,i,s,l;o=a.exec(e);)i=o[0],(s=v[i])||(s=v[i="/regexp/"]),s.lastIndex=a.lastIndex,(l=s.exec(e))&&l.index===a.lastIndex&&(a.lastIndex=s.lastIndex,s===v.require&&l[2]&&n.push(l[2]));return n}function n(e,t,r,a){var o=this;if("object"==typeof e&&!(e instanceof Array))return n.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1));if(!(e instanceof Array)){if("string"==typeof e){var i=o.get(e);return i.__useDefault?i.default:i}throw new TypeError("Invalid require")}Promise.all(e.map(function(e){return o.import(e,a)})).then(function(e){t&&t.apply(null,e)},r)}function r(e,t,r){return function(a,o,i){return"string"==typeof a?t(a):n.call(r,a,o,i,{name:e})}}function a(e){function n(n,a,o){var i=n,s=a,l=o;"string"!=typeof i&&(l=s,s=i,i=null),s instanceof Array||(l=s,s=["require","exports","module"]),"function"!=typeof l&&(l=function(e){return function(){return e}}(l)),void 0===s[s.length-1]&&s.pop();var u,d,f;if(-1!=(u=y.call(s,"require"))){s.splice(u,1);var p=l.toString();s=s.concat(t(p,u))}-1!=(d=y.call(s,"exports"))&&s.splice(d,1),-1!=(f=y.call(s,"module"))&&s.splice(f,1);var m={deps:s,execute:function(t,n,a){for(var o=[],i=0;i=0;a--)e.source=e.source.substr(0,r[a].start)+r[a].postLocate(t[a])+e.source.substr(r[a].end,e.source.length);return o.call(n,e)})}}),x(function(e){e._contextualModules={},e.setContextual=function(e,t){this._contextualModules[e]=t};var t=e.normalize;e.normalize=function(e,n){var r=this,a=r.pluginLoader||r;if(n){var o=this._contextualModules[e];if(o){var i=e+"/"+n;return r.has(i)?Promise.resolve(i):("string"==typeof o&&(o=a.import(o)),Promise.resolve(o).then(function(e){var t=e;return t.default&&(t=t.default),Promise.resolve(t.call(r,n))}).then(function(e){return r.set(i,r.newModule(e)),i}))}}return t.apply(this,arguments)}}),x(function(e){function t(){document.removeEventListener("DOMContentLoaded",t,!1),window.removeEventListener("load",t,!1),n()}function n(){for(var t=document.getElementsByTagName("script"),n=0;nt.index)return!0;return!1}function n(e){for(;a=e.exec(r);)if(!t(i,a)){var n=a[1];o.push(n)}}var r=e.replace(c,"");u.lastIndex=c.lastIndex=d.lastIndex=f.lastIndex=0;var a,o=[],i=[];if(e.length/e.split("\n").length<200)for(;a=f.exec(r);)i.push([a.index,a.index+a[0].length]);return n(u),n(d),o}t._extensions&&t._extensions.push(e),t._traceData={loads:{},parentMap:{}},t.getDependencies=function(e){var t=this.getModuleLoad(e);return t?t.metadata.dependencies:void 0},t.getDependants=function(e){var t=[];return n(this._traceData.parentMap[e]||{},function(e){t.push(e)}),t},t.getModuleLoad=function(e){return this._traceData.loads[e]},t.getBundles=function(e,t){var r=t||{};r[e]=!0;var a=this,o=a._traceData.parentMap[e];if(!o)return[e];var i=[];return n(o,function(e,t){r[e]||(i=i.concat(a.getBundles(e,r)))}),i},t._allowModuleExecution={},t.allowModuleExecution=function(e){var t=this;return t.normalize(e).then(function(e){t._allowModuleExecution[e]=!0})};var a=t.normalize;t.normalize=function(e,t){var n=a.apply(this,arguments);if(t){var r=this._traceData.parentMap;return n.then(function(e){return r[e]||(r[e]={}),r[e][t]=!0,e})}return n};var o=function(){return t.newModule({})},i={traceur:!0,babel:!0},s=function(e){return i[e.name]||this._allowModuleExecution[e.name]},l=[].map||function(e){for(var t=[],n=0,r=this.length;n-1||o.indexOf("steal-sans-promises.production")>-1&&!n.env)&&this.config({env:s+"-production"}),(this.isEnv("production")||this.loadBundles)&&D.call(this),N.stealPath.set.call(this,i,n)}},devBundle:{order:16,set:function(e,t){var n=!0===e?"dev-bundle":e;n&&(this.devBundle=n)}},depsBundle:{order:17,set:function(e,t){var n=!0===e?"dev-bundle":e;n&&(this.depsBundle=n)}}};n(N,function(e,t){e.order?q.splice(e.order,0,t):q.push(t)}),function(e,t,r){var a=e.config;e.config=function(i){var s=o({},i);n(t,function(t){var n=r[t];if(n.set&&s[t]){var a=n.set.call(e,s[t],i);void 0!==a&&(e[t]=a),delete s[t]}}),a.call(this,s)}}(e,q,N),O.config=function(e){if("string"==typeof e)return this.loader[e];this.loader.config(e)},x(function(e){e.getEnv=function(){return(this.env||"").split("-")[1]||this.env},e.getPlatform=function(){var e=(this.env||"").split("-");return 2===e.length?e[0]:void 0},e.isEnv=function(e){return this.getEnv()===e},e.isPlatform=function(e){return this.getPlatform()===e}});var U=function(e){var n={},r=/Url$/,a=e.split("?"),o=a.shift(),i=a.join("?").split("&"),s=o.split("/");s.pop(),s.join("/");if(i.length&&i[0].length)for(var l,u=0;u1){var c=t(d[0]);n[c=c.replace(r,"URL")]=d.slice(1).join("=")}}return n},F=function(e){var r={},a=/Url$/;r.stealURL=e.src,n(e.attributes,function(e){var n=e.nodeName||e.name,o=t(0===n.indexOf("data-")?n.replace("data-",""):n);o=o.replace(a,"URL"),r[o]=""===e.value||e.value});var i=e.innerHTML;return/\S/.test(i)&&(r.mainSource=i),o(U(e.src),r)},B=function(){return new Promise(function(e,t){if(p)e(o({stealURL:location.href},U(location.href)));else if(m||h||v){if(document.currentScript)return void e(F(document.currentScript));var n=document.scripts;n.length&&e(F(n[n.length-1]))}else e({stealPath:__dirname})})};return O.startup=function(e){var t,n,a=this.loader;return w=new Promise(function(e,r){t=e,n=r}),S=B().then(function(i){var s;return s="object"==typeof e?o(e,i):i,a.config(s),z.call(a),a.loadBundles?(a.main||!a.isEnv("production")||a.stealBundled||b("Attribute 'main' is required in production environment. Please add it to the script tag."),a.import(a.configMain).then(t,n),w.then(function(e){return z.call(a),a.main?a.import(a.main):e})):(a.import(a.devBundle).then(function(){return a.import(a.configMain)}).then(function(){return a.import(a.depsBundle)}).then(t,n),(j=w.then(function(){return z.call(a),T.call(a),s&&a.config(s),a.import("@dev")})).then(function(){if(!a.main||a.localLoader)return w;var e=a.main;return"string"==typeof e&&(e=[e]),Promise.all(r(e,function(e){return a.import(e)}))}))}).then(function(e){return a.mainSource?a.module(a.mainSource):(a.loadScriptModules(),e)})},O.done=function(){return S},O.import=function(){var e=arguments,t=this.System;return w||(t.main||(t.main="@empty"),O.startup()),w.then(function(){var r=[];return n(e,function(e){r.push(t.import(e))}),r.length>1?Promise.all(r):r[0]})},O.setContextual=c.call(e.setContextual,e),O.isEnv=c.call(e.isEnv,e),O.isPlatform=c.call(e.isPlatform,e),O};if(!g||h||v){var S=e.steal;e.steal=j(System),e.steal.startup(S&&"object"==typeof S&&S).then(null,function(e){if("undefined"!=typeof console){var t=console;t[t.error?"error":"log"](e)}}),e.steal.clone=w}else e.steal=j(System),e.steal.System=System,e.steal.dev=require("./ext/dev.js"),steal.clone=w,module.exports=e.steal}("undefined"==typeof window?"undefined"==typeof global?this:global:window); \ No newline at end of file +!function(__global){function __eval(__source,__global,__load){try{eval('(function() { var __moduleName = "'+(__load.name||"").replace('"','"')+'"; '+__source+" \n }).call(__global);")}catch(e){throw"SyntaxError"!=e.name&&"TypeError"!=e.name||(e.message="Evaluating "+(__load.name||load.address)+"\n\t"+e.message),e}}__global.$__Object$getPrototypeOf=Object.getPrototypeOf||function(e){return e.__proto__};var $__Object$defineProperty;!function(){try{Object.defineProperty({},"a",{})&&($__Object$defineProperty=Object.defineProperty)}catch(e){$__Object$defineProperty=function(e,t,n){try{e[t]=n.value||n.get.call(e)}catch(e){}}}}(),__global.$__Object$create=Object.create||function(e,t){function n(){}if(n.prototype=e,"object"==typeof t)for(prop in t)t.hasOwnProperty(prop)&&(n[prop]=t[prop]);return new n},function(){function e(e){return{status:"loading",name:e,linkSets:[],dependencies:[],metadata:{}}}function t(e,t,n){return new M(i({step:n.address?"fetch":"locate",loader:e,moduleName:t,moduleMetadata:n&&n.metadata||{},moduleSource:n.source,moduleAddress:n.address}))}function n(t,n,a,o){return new M(function(e,r){e(t.loaderObj.normalize(n,a,o))}).then(function(n){var a;if(t.modules[n])return a=e(n),a.status="linked",a.module=t.modules[n],a;for(var o=0,i=t.loads.length;o",t.isDeclarative=!0,e.loaderObj.transpile(t).then(function(e){var n=__global.System,r=n.register;n.register=function(e,n,r){var a=r,o=n;"string"!=typeof e&&(a=o,o=e),t.declare=a,t.depsList=o},__eval(e,__global,t),n.register=r});if("object"!=typeof n)throw TypeError("Invalid instantiate return value");t.depsList=n.deps||[],t.execute=n.execute,t.isDeclarative=!1}}).then(function(){if("loading"==t.status){t.dependencies=[];for(var r=t.depsList,a=[],o=0,i=r.length;o0)){var n=e.startingLoad;if(!1===e.loader.loaderObj.execute){for(var r=[].concat(e.loads),a=0,o=r.length;a")+"\n")),a=w(a,'Error loading "'+t.name+'" at '+(t.address||"")+"\n");for(var o=e.loads.concat([]),i=0,s=o.length;i=0;i--){for(var s=r[i],l=0;l=0;r-=1){var a=n[r];-1===t.indexOf(a)&&t.unshift(a)}else t=["es2015-no-commonjs","react","stage-0"];return t}function d(e){return(e.version?+e.version.split(".")[0]:6)||6}function c(e,t){var n=this.babelOptions||{};return n.sourceMap="inline",n.filename=e.address,n.code=!0,n.ast=!1,d(t)>=6?(delete n.optional,delete n.whitelist,delete n.blacklist,n.presets=u(n.presets),n.plugins=l(n.plugins)):(n.modules="system",n.blacklist||(n.blacklist=["react"])),n}function f(e){var t=e.types;return{visitor:{Program:function(e,n){e.unshiftContainer("body",[t.exportNamedDeclaration(null,[t.exportSpecifier(t.identifier("true"),t.identifier("__esModule"))])])}}}}function p(e,t){var n=t.Babel||t.babel||t,r=d(n),a=c.call(this,e,n);return Promise.all([v.call(this,n,a),g.call(this,n,a)]).then(function(t){return r>=6&&(a.plugins=[f].concat(t[0]),a.presets=t[1]),n.transform(e.source,a).code+"\n//# sourceURL="+e.address+"!eval"})}var m=__global,h="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process);e.prototype.transpiler="babel",e.prototype.transpile=function(e){var n=this;return n.transpilerHasRun||(m.traceur&&!n.has("traceur")&&n.set("traceur",t(n,"traceur")),m.Babel&&!n.has("babel")&&n.set("babel",t(n,"Babel")),n.transpilerHasRun=!0),n.import(n.transpiler).then(function(t){var a=t;return a.__useDefault&&(a=a.default),(a.Compiler?r:p).call(n,e,a)}).then(function(t){return'var __moduleAddress = "'+e.address+'";'+t})},e.prototype.instantiate=function(e){var r=this;return Promise.resolve(r.normalize(r.transpiler)).then(function(a){if(e.name===a)return{deps:[],execute:function(){var a=m.System,o=m.Reflect.Loader;return __eval("(function(require,exports,module){"+e.source+"})();",m,e),m.System=a,m.Reflect.Loader=o,t(r,n(e.name))}}})};var v=function(){function e(e,r){var a=[];return(r||[]).forEach(function(r){var o=i(r);if(!s(r)||t(e,o))a.push(r);else if(!t(e,o)){var l=this.configMain||"package.json!npm",u=n(o);a.push(this.import(u,{name:l}).then(function(e){var t=e.__esModule?e.default:e;return"string"==typeof r?t:[t,r[1]]}))}},this),Promise.all(a)}function t(e,t){var n=/^(?:babel-plugin-)/;return!!(e.availablePlugins||{})[n.test(t)?t.replace("babel-plugin-",""):t]}function n(e){var t=/^(?:babel-plugin-)/;return/\//.test(e)||t.test(e)?e:"babel-plugin-"+e}return function(t,n){var r=o.call(this),a=n.env||{},i=[e.call(this,t,n.plugins)];for(var s in a)if(r===s){var l=a[s].plugins||[];i.push(e.call(this,t,l))}return Promise.all(i).then(function(e){var t=[];return e.forEach(function(e){t=t.concat(e)}),t})}}(),g=function(){function e(e,r){var a=[];return(r||[]).forEach(function(r){var o=i(r);if(!s(r)||t(e,o))a.push(r);else if(!t(e,o)){var l=this.configMain||"package.json!npm",u=n(o);a.push(this.import(u,{name:l}).then(function(e){var t=e.__esModule?e.default:e;return"string"==typeof r?t:[t,r[1]]}))}},this),Promise.all(a)}function t(e,t){var n=/^(?:babel-preset-)/;return!!(e.availablePresets||{})[n.test(t)?t.replace("babel-preset-",""):t]}function n(e){var t=/^(?:babel-preset-)/;return/\//.test(e)||t.test(e)?e:"babel-preset-"+e}return function(t,n){var r=o.call(this),a=n.env||{},i=[e.call(this,t,n.presets)];for(var s in a)if(r===s){var l=a[s].presets||[];i.push(e.call(this,t,l))}return Promise.all(i).then(function(e){var t=[];return e.forEach(function(e){t=t.concat(e)}),t})}}()}(__global.LoaderPolyfill),function(){function e(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@\/?#]*(?::[^:@\/?#]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}function t(e){var t=[];return e.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?t.pop():t.push(e)}),t.join("").replace(/^\//,"/"===e.charAt(0)?"/":"")}function n(n,r){var a=r,o=n;return i&&(a=a.replace(/\\/g,"/")),a=e(a||""),o=e(o||""),a&&o?(a.protocol||o.protocol)+(a.protocol||a.authority?a.authority:o.authority)+t(a.protocol||a.authority||"/"===a.pathname.charAt(0)?a.pathname:a.pathname?(o.authority&&!o.pathname?"/":"")+o.pathname.slice(0,o.pathname.lastIndexOf("/")+1)+a.pathname:o.pathname)+(a.protocol||a.authority||a.pathname?a.search:a.search||o.search)+a.hash:null}var r,a="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,o="undefined"!=typeof window&&!a,i="undefined"!=typeof process&&!!process.platform.match(/^win/),s=__global.Promise||require("when/es6-shim/Promise");if("undefined"!=typeof XMLHttpRequest)r=function(e,t,n){function r(){t(o.responseText)}function a(){var t=o.statusText+": "+e||"XHR error",r=new Error(t);r.statusCode=o.status,n(r)}var o=new XMLHttpRequest,i=!0,s=!1;if(!("withCredentials"in o)){var l=/^(\w+:)?\/\/([^\/]+)/.exec(e);l&&(i=l[2]===window.location.host,l[1]&&(i&=l[1]===window.location.protocol))}i||"undefined"==typeof XDomainRequest||((o=new XDomainRequest).onload=r,o.onerror=a,o.ontimeout=a,o.onprogress=function(){},o.timeout=0,s=!0),o.onreadystatechange=function(){4===o.readyState&&(200===o.status||0==o.status&&o.responseText?r():a())},o.open("GET",e,!0),s&&setTimeout(function(){o.send()},0),o.send(null)};else if("undefined"!=typeof require){var l,u=/ENOENT/;r=function(e,t,n){if("file:"!=e.substr(0,5))throw"Only file URLs of the form file: allowed running in Node.";l=l||require("fs");var r=e.substr(5);return i&&(r=r.replace(/\//g,"\\")),l.readFile(r,function(e,r){if(e)return u.test(e.message)&&(e.statusCode=404),n(e);t(r+"")})}}else{if("function"!=typeof fetch)throw new TypeError("No environment fetch API available.");r=function(e,t,n){fetch(e).then(function(e){return e.text()}).then(function(e){t(e)}).then(null,function(e){n(e)})}}var d=new(function(e){function t(t){if(e.call(this,t||{}),"undefined"!=typeof location&&location.href){var n=__global.location.href.split("#")[0].split("?")[0];this.baseURL=n.substring(0,n.lastIndexOf("/")+1)}else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURL");this.baseURL="file:"+process.cwd()+"/",i&&(this.baseURL=this.baseURL.replace(/\\/g,"/"))}this.paths={"*":"*.js"}}return t.__proto__=null!==e?e:Function.prototype,t.prototype=$__Object$create(null!==e?e.prototype:null),$__Object$defineProperty(t.prototype,"constructor",{value:t}),$__Object$defineProperty(t.prototype,"global",{get:function(){return o?window:a?self:__global},enumerable:!1}),$__Object$defineProperty(t.prototype,"strict",{get:function(){return!0},enumerable:!1}),$__Object$defineProperty(t.prototype,"normalize",{value:function(e,t,n){if("string"!=typeof e)throw new TypeError("Module name must be a string");var r=e.split("/");if(0==r.length)throw new TypeError("No module name provided");var a=0,o=!1,i=0;if("."==r[0]){if(++a==r.length)throw new TypeError('Illegal module name "'+e+'"');o=!0}else{for(;".."==r[a];)if(++a==r.length)throw new TypeError('Illegal module name "'+e+'"');a&&(o=!0),i=a}for(var s=a;s2)throw new TypeError("Only one wildcard in a path is permitted");if(1==s.length){if(r==i&&i.length>a.length){a=i;break}}else r.substr(0,s[0].length)==s[0]&&r.substr(r.length-s[1].length)==s[1]&&(a=i,t=r.substr(s[0].length,r.length-s[1].length-s[0].length))}var l=this.paths[a];return t&&(l=l.replace("*",t)),o&&(l=l.replace(/#/g,"%23")),n(this.baseURL,l)},enumerable:!1,writable:!0}),$__Object$defineProperty(t.prototype,"fetch",{value:function(e){var t=this;return new s(function(a,o){r(n(t.baseURL,e.address),function(e){a(e)},o)})},enumerable:!1,writable:!0}),t}(__global.LoaderPolyfill));"object"==typeof exports&&(module.exports=d),__global.System=d}()}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:global),function(e){e.upgradeSystemLoader=function(){function t(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@\/?#]*(?::[^:@\/?#]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}function r(e,n){var r=e,a=n;return x&&(a=a.replace(/\\/g,"/")),a=t(a||""),r=t(r||""),a&&r?(a.protocol||r.protocol)+(a.protocol||a.authority?a.authority:r.authority)+function(e){var t=[];return e.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?t.pop():t.push(e)}),t.join("").replace(/^\//,"/"===e.charAt(0)?"/":"")}(a.protocol||a.authority||"/"===a.pathname.charAt(0)?a.pathname:a.pathname?(r.authority&&!r.pathname?"/":"")+r.pathname.slice(0,r.pathname.lastIndexOf("/")+1)+a.pathname:r.pathname)+(a.protocol||a.authority||a.pathname?a.search:a.search||r.search)+a.hash:null}function a(t){var n={};if(("object"==typeof t||"function"==typeof t)&&t!==e)if(_)for(var r in t)"default"!==r&&o(n,t,r);else i(n,t);return n.default=t,w(n,"__useDefault",{value:!0}),n}function o(e,t,n){try{var r;(r=Object.getOwnPropertyDescriptor(t,n))&&w(e,n,r)}catch(r){return e[n]=t[n],!1}}function i(e,t,n){var r=t&&t.hasOwnProperty;for(var a in t)r&&!t.hasOwnProperty(a)||n&&a in e||(e[a]=t[a]);return e}function s(e){function t(e,t){t._extensions=[];for(var n=0,r=e.length;n=0;o--){for(var i=r[o],s=0;st.index)return!0;return!1}r.lastIndex=a.lastIndex=o.lastIndex=0;var n,i=[],s=[],l=[];if(e.length/e.split("\n").length<200){for(;n=o.exec(e);)s.push([n.index,n.index+n[0].length]);for(;n=a.exec(e);)t(s,n)||l.push([n.index,n.index+n[0].length])}for(;n=r.exec(e);)if(!t(s,n)&&!t(l,n)){var u=n[1].substr(1,n[1].length-2);if(u.match(/"|'/))continue;i.push(u)}return i}e._extensions.push(f);var n=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])(exports\s*(\[['"]|\.)|module(\.exports|\['exports'\]|\["exports"\])\s*(\[['"]|[=,\.])|Object.defineProperty\(\s*module\s*,\s*(?:'|")exports(?:'|"))/,r=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF."'])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')\s*\)/g,a=/(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,o=/("[^"\\\n\r]*(\\.[^"\\\n\r]*)*"|'[^'\\\n\r]*(\\.[^'\\\n\r]*)*')/g,i=e.instantiate;e.instantiate=function(a){return a.metadata.format||(n.lastIndex=0,r.lastIndex=0,(r.exec(a.source)||n.exec(a.source))&&(a.metadata.format="cjs")),"cjs"==a.metadata.format&&(a.metadata.deps=a.metadata.deps?a.metadata.deps.concat(t(a.source)):t(a.source),a.metadata.executingRequire=!0,a.metadata.execute=function(t,n,r){var o=(a.address||"").split("/");o.pop(),o=o.join("/"),b._nodeRequire&&(o=o.substr(5));e.global._g={global:e.global,exports:n,module:r,require:t,__filename:b._nodeRequire?a.address.substr(5):a.address,__dirname:o};var i=e.global.define;e.global.define=void 0;var s={name:a.name,source:"(function() {\n(function(global, exports, module, require, __filename, __dirname){\n"+a.source+"\n}).call(_g.exports, _g.global, _g.exports, _g.module, _g.require, _g.__filename, _g.__dirname);})();",address:a.address};e.__exec(s),e.global.define=i,e.global._g=void 0}),i.call(this,a)}}function p(e){function t(e,t){var n=[],r=(e.match(f)[1].split(",")[t]||"require").replace(m,""),a=h[r]||(h[r]=new RegExp("/\\*|//|\"|'|`|(?:^|\\breturn\\b|[([=,;:?><&|^*%~+-])\\s*(?=/)|\\b"+r+"(?=\\s*\\()","g"));a.lastIndex=0,v[r]=v.require;for(var o,i,s,l;o=a.exec(e);)i=o[0],(s=v[i])||(s=v[i="/regexp/"]),s.lastIndex=a.lastIndex,(l=s.exec(e))&&l.index===a.lastIndex&&(a.lastIndex=s.lastIndex,s===v.require&&l[2]&&n.push(l[2]));return n}function n(e,t,r,a){var o=this;if("object"==typeof e&&!(e instanceof Array))return n.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1));if(!(e instanceof Array)){if("string"==typeof e){var i=o.get(e);return i.__useDefault?i.default:i}throw new TypeError("Invalid require")}Promise.all(e.map(function(e){return o.import(e,a)})).then(function(e){t&&t.apply(null,e)},r)}function r(e,t,r){return function(a,o,i){return"string"==typeof a?t(a):n.call(r,a,o,i,{name:e})}}function a(e){function n(n,a,o){var i=n,s=a,l=o;"string"!=typeof i&&(l=s,s=i,i=null),s instanceof Array||(l=s,s=["require","exports","module"]),"function"!=typeof l&&(l=function(e){return function(){return e}}(l)),void 0===s[s.length-1]&&s.pop();var u,d,f;if(-1!=(u=y.call(s,"require"))){s.splice(u,1);var p=l.toString();s=s.concat(t(p,u))}-1!=(d=y.call(s,"exports"))&&s.splice(d,1),-1!=(f=y.call(s,"module"))&&s.splice(f,1);var m={deps:s,execute:function(t,n,a){for(var o=[],i=0;i=0;a--)e.source=e.source.substr(0,r[a].start)+r[a].postLocate(t[a])+e.source.substr(r[a].end,e.source.length);return o.call(n,e)})}}),x(function(e){e._contextualModules={},e.setContextual=function(e,t){this._contextualModules[e]=t};var t=e.normalize;e.normalize=function(e,n){var r=this,a=r.pluginLoader||r;if(n){var o=this._contextualModules[e];if(o){var i=e+"/"+n;return r.has(i)?Promise.resolve(i):("string"==typeof o&&(o=a.import(o)),Promise.resolve(o).then(function(e){var t=e;return t.default&&(t=t.default),Promise.resolve(t.call(r,n))}).then(function(e){return r.set(i,r.newModule(e)),i}))}}return t.apply(this,arguments)}}),x(function(e){function t(){document.removeEventListener("DOMContentLoaded",t,!1),window.removeEventListener("load",t,!1),n()}function n(){for(var t=document.getElementsByTagName("script"),n=0;nt.index)return!0;return!1}function n(e){for(;a=e.exec(r);)if(!t(i,a)){var n=a[1];o.push(n)}}var r=e.replace(c,"");u.lastIndex=c.lastIndex=d.lastIndex=f.lastIndex=0;var a,o=[],i=[];if(e.length/e.split("\n").length<200)for(;a=f.exec(r);)i.push([a.index,a.index+a[0].length]);return n(u),n(d),o}t._extensions&&t._extensions.push(e),t._traceData={loads:{},parentMap:{}},t.getDependencies=function(e){var t=this.getModuleLoad(e);return t?t.metadata.dependencies:void 0},t.getDependants=function(e){var t=[];return n(this._traceData.parentMap[e]||{},function(e){t.push(e)}),t},t.getModuleLoad=function(e){return this._traceData.loads[e]},t.getBundles=function(e,t){var r=t||{};r[e]=!0;var a=this,o=a._traceData.parentMap[e];if(!o)return[e];var i=[];return n(o,function(e,t){r[e]||(i=i.concat(a.getBundles(e,r)))}),i},t._allowModuleExecution={},t.allowModuleExecution=function(e){var t=this;return t.normalize(e).then(function(e){t._allowModuleExecution[e]=!0})};var a=t.normalize;t.normalize=function(e,t){var n=a.apply(this,arguments);if(t){var r=this._traceData.parentMap;return n.then(function(e){return r[e]||(r[e]={}),r[e][t]=!0,e})}return n};var o=function(){return t.newModule({})},i={traceur:!0,babel:!0},s=function(e){return i[e.name]||this._allowModuleExecution[e.name]},l=[].map||function(e){for(var t=[],n=0,r=this.length;n-1||o.indexOf("steal-sans-promises.production")>-1&&!n.env)&&this.config({env:s+"-production"}),(this.isEnv("production")||this.loadBundles)&&D.call(this),N.stealPath.set.call(this,i,n)}},devBundle:{order:16,set:function(e,t){var n=!0===e?"dev-bundle":e;n&&(this.devBundle=n)}},depsBundle:{order:17,set:function(e,t){var n=!0===e?"dev-bundle":e;n&&(this.depsBundle=n)}}};n(N,function(e,t){e.order?q.splice(e.order,0,t):q.push(t)}),function(e,t,r){var a=e.config;e.config=function(i){var s=o({},i);n(t,function(t){var n=r[t];if(n.set&&s[t]){var a=n.set.call(e,s[t],i);void 0!==a&&(e[t]=a),delete s[t]}}),a.call(this,s)}}(e,q,N),O.config=function(e){if("string"==typeof e)return this.loader[e];this.loader.config(e)},x(function(e){e.getEnv=function(){return(this.env||"").split("-")[1]||this.env},e.getPlatform=function(){var e=(this.env||"").split("-");return 2===e.length?e[0]:void 0},e.isEnv=function(e){return this.getEnv()===e},e.isPlatform=function(e){return this.getPlatform()===e}});var U=function(e){var n={},r=/Url$/,a=e.split("?"),o=a.shift(),i=a.join("?").split("&"),s=o.split("/");s.pop(),s.join("/");if(i.length&&i[0].length)for(var l,u=0;u1){var c=t(d[0]);n[c=c.replace(r,"URL")]=d.slice(1).join("=")}}return n},F=function(e){var r={},a=/Url$/;r.stealURL=e.src,n(e.attributes,function(e){var n=e.nodeName||e.name,o=t(0===n.indexOf("data-")?n.replace("data-",""):n);o=o.replace(a,"URL"),r[o]=""===e.value||e.value});var i=e.innerHTML;return/\S/.test(i)&&(r.mainSource=i),o(U(e.src),r)},B=function(){return new Promise(function(e,t){if(p)e(o({stealURL:location.href},U(location.href)));else if(m||h||v){if(document.currentScript)return void e(F(document.currentScript));var n=document.scripts;n.length&&e(F(n[n.length-1]))}else e({stealPath:__dirname})})};return O.startup=function(e){var t,n,a=this.loader;return w=new Promise(function(e,r){t=e,n=r}),S=B().then(function(i){var s;return s="object"==typeof e?o(e,i):i,a.config(s),z.call(a),a.loadBundles?(a.main||!a.isEnv("production")||a.stealBundled||b("Attribute 'main' is required in production environment. Please add it to the script tag."),a.import(a.configMain).then(t,n),w.then(function(e){return z.call(a),a.main?a.import(a.main):e})):(a.import(a.devBundle).then(function(){return a.import(a.configMain)}).then(function(){return a.import(a.depsBundle)}).then(t,n),(j=w.then(function(){return z.call(a),T.call(a),s&&a.config(s),a.import("@dev")})).then(function(){if(!a.main||a.localLoader)return w;var e=a.main;return"string"==typeof e&&(e=[e]),Promise.all(r(e,function(e){return a.import(e)}))}))}).then(function(e){return a.mainSource?a.module(a.mainSource):(a.loadScriptModules(),e)})},O.done=function(){return S},O.import=function(){var e=arguments,t=this.System;return w||(t.main||(t.main="@empty"),O.startup()),w.then(function(){var r=[];return n(e,function(e){r.push(t.import(e))}),r.length>1?Promise.all(r):r[0]})},O.setContextual=c.call(e.setContextual,e),O.isEnv=c.call(e.isEnv,e),O.isPlatform=c.call(e.isPlatform,e),O};if(!g||h||v){var S=e.steal;e.steal=j(System),e.steal.startup(S&&"object"==typeof S&&S).then(null,function(e){if("undefined"!=typeof console){var t=console;t[t.error?"error":"log"](e)}}),e.steal.clone=w}else e.steal=j(System),e.steal.System=System,e.steal.dev=require("./ext/dev.js"),steal.clone=w,module.exports=e.steal}("undefined"==typeof window?"undefined"==typeof global?this:global:window); \ No newline at end of file diff --git a/steal.js b/steal.js index 227598d90..eda204cf9 100644 --- a/steal.js +++ b/steal.js @@ -6260,8 +6260,8 @@ addStealExtension(function (loader) { addStealExtension(function(loader) { var superInstantiate = loader.instantiate; - var warn = console && typeof console.warn === "function" ? - console.warn.bind(console) : + var warn = typeof console === "object" ? + Function.prototype.bind.call(console.warn, console) : null; loader._instantiatedModules = loader._instantiatedModules || {}; diff --git a/steal.production.js b/steal.production.js index f3d6720c4..67302d8e0 100644 --- a/steal.production.js +++ b/steal.production.js @@ -4,4 +4,4 @@ * Copyright (c) 2017 Bitovi; Licensed MIT */ -!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.Promise=e():"undefined"!=typeof global?global.Promise=e():"undefined"!=typeof self&&(self.Promise=e())}(function(){return function e(t,n,r){function o(i,s){if(!n[i]){if(!t[i]){var l="function"==typeof require&&require;if(!s&&l)return l(i,!0);if(a)return a(i,!0);throw new Error("Cannot find module '"+i+"'")}var u=n[i]={exports:{}};t[i][0].call(u.exports,function(e){var n=t[i][1][e];return o(n||e)},u,u.exports,e,t,n,r)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;i=0&&(p.splice(t,1),d("Handled previous rejection ["+e.id+"] "+o.formatObject(e.value)))}function s(e,t){f.push(e,t),null===h&&(h=r(l,0))}function l(){for(h=null;f.length>0;)f.shift()(f.shift())}var u,c=n,d=n;"undefined"!=typeof console&&(u=console,c=void 0!==u.error?function(e){u.error(e)}:function(e){u.log(e)},d=void 0!==u.info?function(e){u.info(e)}:function(e){u.log(e)}),e.onPotentiallyUnhandledRejection=function(e){s(a,e)},e.onPotentiallyUnhandledRejectionHandled=function(e){s(i,e)},e.onFatalRejection=function(e){s(t,e.value)};var f=[],p=[],h=null;return e}})}(function(n){t.exports=n(e)})},{"../env":5,"../format":6}],5:[function(e,t,n){!function(e){"use strict";e(function(e){var t,n="undefined"!=typeof setTimeout&&setTimeout,r=function(e,t){return setTimeout(e,t)},o=function(e){return clearTimeout(e)},a=function(e){return n(e,0)};if("undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))a=function(e){return process.nextTick(e)};else if(t="function"==typeof MutationObserver&&MutationObserver||"function"==typeof WebKitMutationObserver&&WebKitMutationObserver)a=function(e){var t,n=document.createTextNode("");new e(function(){var e=t;t=void 0,e()}).observe(n,{characterData:!0});var r=0;return function(e){t=e,n.data=r^=1}}(t);else if(!n){var i=e("vertx");r=function(e,t){return i.setTimer(t,e)},o=i.cancelTimer,a=i.runOnLoop||i.runOnContext}return{setTimer:r,clearTimer:o,asap:a}})}(function(n){t.exports=n(e)})},{}],6:[function(e,t,n){!function(e){"use strict";e(function(){function e(e){var n=String(e);return"[object Object]"===n&&"undefined"!=typeof JSON&&(n=t(e,n)),n}function t(e,t){try{return JSON.stringify(e)}catch(e){return t}}return{formatError:function(t){var n="object"==typeof t&&null!==t&&(t.stack||t.message)?t.stack||t.message:e(t);return t instanceof Error?n:n+" (WARNING: non-Error used)"},formatObject:e,tryStringify:t}})}(function(e){t.exports=e()})},{}],7:[function(e,t,n){!function(e){"use strict";e(function(){return function(e){function t(e,t){this._handler=e===m?t:n(e)}function n(e){function t(e){n.reject(e)}var n=new g;try{e(function(e){n.resolve(e)},t,function(e){n.notify(e)})}catch(e){t(e)}return n}function r(e){return R(e)?e:new t(m,new b(f(e)))}function o(e){return new t(m,new b(new _(e)))}function a(){return W}function i(e,t){return new t(m,new g(e.receiver,e.join().context))}function s(e,n,r){function o(e,t,n){c[e]=t,0==--u&&n.become(new x(c))}for(var a,i="function"==typeof n?function(t,a,i){i.resolved||l(r,o,t,e(n,a,t),i)}:o,s=new g,u=r.length>>>0,c=new Array(u),d=0;d0?t(n,a.value,o):(o.become(a),u(e,n+1,a))}else t(n,r,o)}function u(e,t,n){for(var r=t;r0||"function"!=typeof t&&o<0)return new this.constructor(m,r);var a=this._beget(),i=a._handler;return r.chain(i,r.receiver,e,t,n),a},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype._beget=function(){return i(this._handler,this.constructor)},t.all=function(e){return s(C,null,e)},t.race=function(e){return"object"!=typeof e||null===e?o(new TypeError("non-iterable passed to race()")):0===e.length?a():1===e.length?r(e[0]):d(e)},t._traverse=function(e,t){return s($,e,t)},t._visitRemaining=u,m.prototype.when=m.prototype.become=m.prototype.notify=m.prototype.fail=m.prototype._unreport=m.prototype._report=A,m.prototype._state=0,m.prototype.state=function(){return this._state},m.prototype.join=function(){for(var e=this;void 0!==e.handler;)e=e.handler;return e},m.prototype.chain=function(e,t,n,r,o){this.when({resolver:e,receiver:t,fulfilled:n,rejected:r,progress:o})},m.prototype.visit=function(e,t,n,r){this.chain(H,e,t,n,r)},m.prototype.fold=function(e,t,n,r){this.when(new L(e,t,n,r))},U(m,v),v.prototype.become=function(e){e.fail()};var H=new v;U(m,g),g.prototype._state=0,g.prototype.resolve=function(e){this.become(f(e))},g.prototype.reject=function(e){this.resolved||this.become(new _(e))},g.prototype.join=function(){if(!this.resolved)return this;for(var e=this;void 0!==e.handler;)if((e=e.handler)===this)return this.handler=O();return e},g.prototype.run=function(){var e=this.consumers,t=this.handler;this.handler=this.handler.join(),this.consumers=void 0;for(var n=0;n",t.isDeclarative=!0,e.loaderObj.transpile(t).then(function(e){var n=__global.System,r=n.register;n.register=function(e,n,r){var o=r,a=n;"string"!=typeof e&&(o=a,a=e),t.declare=o,t.depsList=a},__eval(e,__global,t),n.register=r});if("object"!=typeof n)throw TypeError("Invalid instantiate return value");t.depsList=n.deps||[],t.execute=n.execute,t.isDeclarative=!1}}).then(function(){if("loading"==t.status){t.dependencies=[];for(var r=t.depsList,o=[],a=0,i=r.length;a0)){var n=e.startingLoad;if(!1===e.loader.loaderObj.execute){for(var r=[].concat(e.loads),o=0,a=r.length;o")+"\n")),o=w(o,'Error loading "'+t.name+'" at '+(t.address||"")+"\n");for(var a=e.loads.concat([]),i=0,s=a.length;i=0;i--){for(var s=r[i],l=0;l=0;r-=1){var o=n[r];-1===t.indexOf(o)&&t.unshift(o)}else t=["es2015-no-commonjs","react","stage-0"];return t}function c(e){return(e.version?+e.version.split(".")[0]:6)||6}function d(e,t){var n=this.babelOptions||{};return n.sourceMap="inline",n.filename=e.address,n.code=!0,n.ast=!1,c(t)>=6?(delete n.optional,delete n.whitelist,delete n.blacklist,n.presets=u(n.presets),n.plugins=l(n.plugins)):(n.modules="system",n.blacklist||(n.blacklist=["react"])),n}function f(e){var t=e.types;return{visitor:{Program:function(e,n){e.unshiftContainer("body",[t.exportNamedDeclaration(null,[t.exportSpecifier(t.identifier("true"),t.identifier("__esModule"))])])}}}}function p(e,t){var n=t.Babel||t.babel||t,r=c(n),o=d.call(this,e,n);return Promise.all([v.call(this,n,o),g.call(this,n,o)]).then(function(t){return r>=6&&(o.plugins=[f].concat(t[0]),o.presets=t[1]),n.transform(e.source,o).code+"\n//# sourceURL="+e.address+"!eval"})}var h=__global,m="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process);e.prototype.transpiler="babel",e.prototype.transpile=function(e){var n=this;return n.transpilerHasRun||(h.traceur&&!n.has("traceur")&&n.set("traceur",t(n,"traceur")),h.Babel&&!n.has("babel")&&n.set("babel",t(n,"Babel")),n.transpilerHasRun=!0),n.import(n.transpiler).then(function(t){var o=t;return o.__useDefault&&(o=o.default),(o.Compiler?r:p).call(n,e,o)}).then(function(t){return'var __moduleAddress = "'+e.address+'";'+t})},e.prototype.instantiate=function(e){var r=this;return Promise.resolve(r.normalize(r.transpiler)).then(function(o){if(e.name===o)return{deps:[],execute:function(){var o=h.System,a=h.Reflect.Loader;return __eval("(function(require,exports,module){"+e.source+"})();",h,e),h.System=o,h.Reflect.Loader=a,t(r,n(e.name))}}})};var v=function(){function e(e,r){var o=[];return(r||[]).forEach(function(r){var a=i(r);if(!s(r)||t(e,a))o.push(r);else if(!t(e,a)){var l=this.configMain||"package.json!npm",u=n(a);o.push(this.import(u,{name:l}).then(function(e){var t=e.__esModule?e.default:e;return"string"==typeof r?t:[t,r[1]]}))}},this),Promise.all(o)}function t(e,t){var n=/^(?:babel-plugin-)/;return!!(e.availablePlugins||{})[n.test(t)?t.replace("babel-plugin-",""):t]}function n(e){var t=/^(?:babel-plugin-)/;return/\//.test(e)||t.test(e)?e:"babel-plugin-"+e}return function(t,n){var r=a.call(this),o=n.env||{},i=[e.call(this,t,n.plugins)];for(var s in o)if(r===s){var l=o[s].plugins||[];i.push(e.call(this,t,l))}return Promise.all(i).then(function(e){var t=[];return e.forEach(function(e){t=t.concat(e)}),t})}}(),g=function(){function e(e,r){var o=[];return(r||[]).forEach(function(r){var a=i(r);if(!s(r)||t(e,a))o.push(r);else if(!t(e,a)){var l=this.configMain||"package.json!npm",u=n(a);o.push(this.import(u,{name:l}).then(function(e){var t=e.__esModule?e.default:e;return"string"==typeof r?t:[t,r[1]]}))}},this),Promise.all(o)}function t(e,t){var n=/^(?:babel-preset-)/;return!!(e.availablePresets||{})[n.test(t)?t.replace("babel-preset-",""):t]}function n(e){var t=/^(?:babel-preset-)/;return/\//.test(e)||t.test(e)?e:"babel-preset-"+e}return function(t,n){var r=a.call(this),o=n.env||{},i=[e.call(this,t,n.presets)];for(var s in o)if(r===s){var l=o[s].presets||[];i.push(e.call(this,t,l))}return Promise.all(i).then(function(e){var t=[];return e.forEach(function(e){t=t.concat(e)}),t})}}()}(__global.LoaderPolyfill),function(){function e(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@\/?#]*(?::[^:@\/?#]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}function t(e){var t=[];return e.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?t.pop():t.push(e)}),t.join("").replace(/^\//,"/"===e.charAt(0)?"/":"")}function n(n,r){var o=r,a=n;return i&&(o=o.replace(/\\/g,"/")),o=e(o||""),a=e(a||""),o&&a?(o.protocol||a.protocol)+(o.protocol||o.authority?o.authority:a.authority)+t(o.protocol||o.authority||"/"===o.pathname.charAt(0)?o.pathname:o.pathname?(a.authority&&!a.pathname?"/":"")+a.pathname.slice(0,a.pathname.lastIndexOf("/")+1)+o.pathname:a.pathname)+(o.protocol||o.authority||o.pathname?o.search:o.search||a.search)+o.hash:null}var r,o="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,a="undefined"!=typeof window&&!o,i="undefined"!=typeof process&&!!process.platform.match(/^win/),s=__global.Promise||require("when/es6-shim/Promise");if("undefined"!=typeof XMLHttpRequest)r=function(e,t,n){function r(){t(a.responseText)}function o(){var t=a.statusText+": "+e||"XHR error",r=new Error(t);r.statusCode=a.status,n(r)}var a=new XMLHttpRequest,i=!0,s=!1;if(!("withCredentials"in a)){var l=/^(\w+:)?\/\/([^\/]+)/.exec(e);l&&(i=l[2]===window.location.host,l[1]&&(i&=l[1]===window.location.protocol))}i||"undefined"==typeof XDomainRequest||((a=new XDomainRequest).onload=r,a.onerror=o,a.ontimeout=o,a.onprogress=function(){},a.timeout=0,s=!0),a.onreadystatechange=function(){4===a.readyState&&(200===a.status||0==a.status&&a.responseText?r():o())},a.open("GET",e,!0),s&&setTimeout(function(){a.send()},0),a.send(null)};else if("undefined"!=typeof require){var l,u=/ENOENT/;r=function(e,t,n){if("file:"!=e.substr(0,5))throw"Only file URLs of the form file: allowed running in Node.";l=l||require("fs");var r=e.substr(5);return i&&(r=r.replace(/\//g,"\\")),l.readFile(r,function(e,r){if(e)return u.test(e.message)&&(e.statusCode=404),n(e);t(r+"")})}}else{if("function"!=typeof fetch)throw new TypeError("No environment fetch API available.");r=function(e,t,n){fetch(e).then(function(e){return e.text()}).then(function(e){t(e)}).then(null,function(e){n(e)})}}var c=new(function(e){function t(t){if(e.call(this,t||{}),"undefined"!=typeof location&&location.href){var n=__global.location.href.split("#")[0].split("?")[0];this.baseURL=n.substring(0,n.lastIndexOf("/")+1)}else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURL");this.baseURL="file:"+process.cwd()+"/",i&&(this.baseURL=this.baseURL.replace(/\\/g,"/"))}this.paths={"*":"*.js"}}return t.__proto__=null!==e?e:Function.prototype,t.prototype=$__Object$create(null!==e?e.prototype:null),$__Object$defineProperty(t.prototype,"constructor",{value:t}),$__Object$defineProperty(t.prototype,"global",{get:function(){return a?window:o?self:__global},enumerable:!1}),$__Object$defineProperty(t.prototype,"strict",{get:function(){return!0},enumerable:!1}),$__Object$defineProperty(t.prototype,"normalize",{value:function(e,t,n){if("string"!=typeof e)throw new TypeError("Module name must be a string");var r=e.split("/");if(0==r.length)throw new TypeError("No module name provided");var o=0,a=!1,i=0;if("."==r[0]){if(++o==r.length)throw new TypeError('Illegal module name "'+e+'"');a=!0}else{for(;".."==r[o];)if(++o==r.length)throw new TypeError('Illegal module name "'+e+'"');o&&(a=!0),i=o}for(var s=o;s2)throw new TypeError("Only one wildcard in a path is permitted");if(1==s.length){if(r==i&&i.length>o.length){o=i;break}}else r.substr(0,s[0].length)==s[0]&&r.substr(r.length-s[1].length)==s[1]&&(o=i,t=r.substr(s[0].length,r.length-s[1].length-s[0].length))}var l=this.paths[o];return t&&(l=l.replace("*",t)),a&&(l=l.replace(/#/g,"%23")),n(this.baseURL,l)},enumerable:!1,writable:!0}),$__Object$defineProperty(t.prototype,"fetch",{value:function(e){var t=this;return new s(function(o,a){r(n(t.baseURL,e.address),function(e){o(e)},a)})},enumerable:!1,writable:!0}),t}(__global.LoaderPolyfill));"object"==typeof exports&&(module.exports=c),__global.System=c}()}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:global),function(e){e.upgradeSystemLoader=function(){function t(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@\/?#]*(?::[^:@\/?#]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}function r(e,n){var r=e,o=n;return x&&(o=o.replace(/\\/g,"/")),o=t(o||""),r=t(r||""),o&&r?(o.protocol||r.protocol)+(o.protocol||o.authority?o.authority:r.authority)+function(e){var t=[];return e.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?t.pop():t.push(e)}),t.join("").replace(/^\//,"/"===e.charAt(0)?"/":"")}(o.protocol||o.authority||"/"===o.pathname.charAt(0)?o.pathname:o.pathname?(r.authority&&!r.pathname?"/":"")+r.pathname.slice(0,r.pathname.lastIndexOf("/")+1)+o.pathname:r.pathname)+(o.protocol||o.authority||o.pathname?o.search:o.search||r.search)+o.hash:null}function o(t){var n={};if(("object"==typeof t||"function"==typeof t)&&t!==e)if(_)for(var r in t)"default"!==r&&a(n,t,r);else i(n,t);return n.default=t,w(n,"__useDefault",{value:!0}),n}function a(e,t,n){try{var r;(r=Object.getOwnPropertyDescriptor(t,n))&&w(e,n,r)}catch(r){return e[n]=t[n],!1}}function i(e,t,n){var r=t&&t.hasOwnProperty;for(var o in t)r&&!t.hasOwnProperty(o)||n&&o in e||(e[o]=t[o]);return e}function s(e){function t(e,t){t._extensions=[];for(var n=0,r=e.length;n=0;a--){for(var i=r[a],s=0;st.index)return!0;return!1}r.lastIndex=o.lastIndex=a.lastIndex=0;var n,i=[],s=[],l=[];if(e.length/e.split("\n").length<200){for(;n=a.exec(e);)s.push([n.index,n.index+n[0].length]);for(;n=o.exec(e);)t(s,n)||l.push([n.index,n.index+n[0].length])}for(;n=r.exec(e);)if(!t(s,n)&&!t(l,n)){var u=n[1].substr(1,n[1].length-2);if(u.match(/"|'/))continue;i.push(u)}return i}e._extensions.push(f);var n=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])(exports\s*(\[['"]|\.)|module(\.exports|\['exports'\]|\["exports"\])\s*(\[['"]|[=,\.])|Object.defineProperty\(\s*module\s*,\s*(?:'|")exports(?:'|"))/,r=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF."'])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')\s*\)/g,o=/(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,a=/("[^"\\\n\r]*(\\.[^"\\\n\r]*)*"|'[^'\\\n\r]*(\\.[^'\\\n\r]*)*')/g,i=e.instantiate;e.instantiate=function(o){return o.metadata.format||(n.lastIndex=0,r.lastIndex=0,(r.exec(o.source)||n.exec(o.source))&&(o.metadata.format="cjs")),"cjs"==o.metadata.format&&(o.metadata.deps=o.metadata.deps?o.metadata.deps.concat(t(o.source)):t(o.source),o.metadata.executingRequire=!0,o.metadata.execute=function(t,n,r){var a=(o.address||"").split("/");a.pop(),a=a.join("/"),b._nodeRequire&&(a=a.substr(5));e.global._g={global:e.global,exports:n,module:r,require:t,__filename:b._nodeRequire?o.address.substr(5):o.address,__dirname:a};var i=e.global.define;e.global.define=void 0;var s={name:o.name,source:"(function() {\n(function(global, exports, module, require, __filename, __dirname){\n"+o.source+"\n}).call(_g.exports, _g.global, _g.exports, _g.module, _g.require, _g.__filename, _g.__dirname);})();",address:o.address};e.__exec(s),e.global.define=i,e.global._g=void 0}),i.call(this,o)}}function p(e){function t(e,t){var n=[],r=(e.match(f)[1].split(",")[t]||"require").replace(h,""),o=m[r]||(m[r]=new RegExp("/\\*|//|\"|'|`|(?:^|\\breturn\\b|[([=,;:?><&|^*%~+-])\\s*(?=/)|\\b"+r+"(?=\\s*\\()","g"));o.lastIndex=0,v[r]=v.require;for(var a,i,s,l;a=o.exec(e);)i=a[0],(s=v[i])||(s=v[i="/regexp/"]),s.lastIndex=o.lastIndex,(l=s.exec(e))&&l.index===o.lastIndex&&(o.lastIndex=s.lastIndex,s===v.require&&l[2]&&n.push(l[2]));return n}function n(e,t,r,o){var a=this;if("object"==typeof e&&!(e instanceof Array))return n.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1));if(!(e instanceof Array)){if("string"==typeof e){var i=a.get(e);return i.__useDefault?i.default:i}throw new TypeError("Invalid require")}Promise.all(e.map(function(e){return a.import(e,o)})).then(function(e){t&&t.apply(null,e)},r)}function r(e,t,r){return function(o,a,i){return"string"==typeof o?t(o):n.call(r,o,a,i,{name:e})}}function o(e){function n(n,o,a){var i=n,s=o,l=a;"string"!=typeof i&&(l=s,s=i,i=null),s instanceof Array||(l=s,s=["require","exports","module"]),"function"!=typeof l&&(l=function(e){return function(){return e}}(l)),void 0===s[s.length-1]&&s.pop();var u,c,f;if(-1!=(u=y.call(s,"require"))){s.splice(u,1);var p=l.toString();s=s.concat(t(p,u))}-1!=(c=y.call(s,"exports"))&&s.splice(c,1),-1!=(f=y.call(s,"module"))&&s.splice(f,1);var h={deps:s,execute:function(t,n,o){for(var a=[],i=0;i=0;o--)e.source=e.source.substr(0,r[o].start)+r[o].postLocate(t[o])+e.source.substr(r[o].end,e.source.length);return a.call(n,e)})}}),x(function(e){e._contextualModules={},e.setContextual=function(e,t){this._contextualModules[e]=t};var t=e.normalize;e.normalize=function(e,n){var r=this,o=r.pluginLoader||r;if(n){var a=this._contextualModules[e];if(a){var i=e+"/"+n;return r.has(i)?Promise.resolve(i):("string"==typeof a&&(a=o.import(a)),Promise.resolve(a).then(function(e){var t=e;return t.default&&(t=t.default),Promise.resolve(t.call(r,n))}).then(function(e){return r.set(i,r.newModule(e)),i}))}}return t.apply(this,arguments)}}),x(function(e){function t(){document.removeEventListener("DOMContentLoaded",t,!1),window.removeEventListener("load",t,!1),n()}function n(){for(var t=document.getElementsByTagName("script"),n=0;nt.index)return!0;return!1}function n(e){for(;o=e.exec(r);)if(!t(i,o)){var n=o[1];a.push(n)}}var r=e.replace(d,"");u.lastIndex=d.lastIndex=c.lastIndex=f.lastIndex=0;var o,a=[],i=[];if(e.length/e.split("\n").length<200)for(;o=f.exec(r);)i.push([o.index,o.index+o[0].length]);return n(u),n(c),a}t._extensions&&t._extensions.push(e),t._traceData={loads:{},parentMap:{}},t.getDependencies=function(e){var t=this.getModuleLoad(e);return t?t.metadata.dependencies:void 0},t.getDependants=function(e){var t=[];return n(this._traceData.parentMap[e]||{},function(e){t.push(e)}),t},t.getModuleLoad=function(e){return this._traceData.loads[e]},t.getBundles=function(e,t){var r=t||{};r[e]=!0;var o=this,a=o._traceData.parentMap[e];if(!a)return[e];var i=[];return n(a,function(e,t){r[e]||(i=i.concat(o.getBundles(e,r)))}),i},t._allowModuleExecution={},t.allowModuleExecution=function(e){var t=this;return t.normalize(e).then(function(e){t._allowModuleExecution[e]=!0})};var o=t.normalize;t.normalize=function(e,t){var n=o.apply(this,arguments);if(t){var r=this._traceData.parentMap;return n.then(function(e){return r[e]||(r[e]={}),r[e][t]=!0,e})}return n};var a=function(){return t.newModule({})},i={traceur:!0,babel:!0},s=function(e){return i[e.name]||this._allowModuleExecution[e.name]},l=[].map||function(e){for(var t=[],n=0,r=this.length;n-1||a.indexOf("steal-sans-promises.production")>-1&&!n.env)&&this.config({env:s+"-production"}),(this.isEnv("production")||this.loadBundles)&&T.call(this),U.stealPath.set.call(this,i,n)}},devBundle:{order:16,set:function(e,t){var n=!0===e?"dev-bundle":e;n&&(this.devBundle=n)}},depsBundle:{order:17,set:function(e,t){var n=!0===e?"dev-bundle":e;n&&(this.depsBundle=n)}}};n(U,function(e,t){e.order?z.splice(e.order,0,t):z.push(t)}),function(e,t,r){var o=e.config;e.config=function(i){var s=a({},i);n(t,function(t){var n=r[t];if(n.set&&s[t]){var o=n.set.call(e,s[t],i);void 0!==o&&(e[t]=o),delete s[t]}}),o.call(this,s)}}(e,z,U),S.config=function(e){if("string"==typeof e)return this.loader[e];this.loader.config(e)},x(function(e){e.getEnv=function(){return(this.env||"").split("-")[1]||this.env},e.getPlatform=function(){var e=(this.env||"").split("-");return 2===e.length?e[0]:void 0},e.isEnv=function(e){return this.getEnv()===e},e.isPlatform=function(e){return this.getPlatform()===e}});var C=function(e){var n={},r=/Url$/,o=e.split("?"),a=o.shift(),i=o.join("?").split("&"),s=a.split("/");s.pop(),s.join("/");if(i.length&&i[0].length)for(var l,u=0;u1){var d=t(c[0]);n[d=d.replace(r,"URL")]=c.slice(1).join("=")}}return n},A=function(e){var r={},o=/Url$/;r.stealURL=e.src,n(e.attributes,function(e){var n=e.nodeName||e.name,a=t(0===n.indexOf("data-")?n.replace("data-",""):n);a=a.replace(o,"URL"),r[a]=""===e.value||e.value});var i=e.innerHTML;return/\S/.test(i)&&(r.mainSource=i),a(C(e.src),r)},F=function(){return new Promise(function(e,t){if(p)e(a({stealURL:location.href},C(location.href)));else if(h||m||v){if(document.currentScript)return void e(A(document.currentScript));var n=document.scripts;n.length&&e(A(n[n.length-1]))}else e({stealPath:__dirname})})};return S.startup=function(e){var t,n,o=this.loader;return w=new Promise(function(e,r){t=e,n=r}),O=F().then(function(i){var s;return s="object"==typeof e?a(e,i):i,o.config(s),$.call(o),o.loadBundles?(o.main||!o.isEnv("production")||o.stealBundled||b("Attribute 'main' is required in production environment. Please add it to the script tag."),o.import(o.configMain).then(t,n),w.then(function(e){return $.call(o),o.main?o.import(o.main):e})):(o.import(o.devBundle).then(function(){return o.import(o.configMain)}).then(function(){return o.import(o.depsBundle)}).then(t,n),(j=w.then(function(){return $.call(o),D.call(o),s&&o.config(s),o.import("@dev")})).then(function(){if(!o.main||o.localLoader)return w;var e=o.main;return"string"==typeof e&&(e=[e]),Promise.all(r(e,function(e){return o.import(e)}))}))}).then(function(e){return o.mainSource?o.module(o.mainSource):(o.loadScriptModules(),e)})},S.done=function(){return O},S.import=function(){var e=arguments,t=this.System;return w||(t.main||(t.main="@empty"),S.startup()),w.then(function(){var r=[];return n(e,function(e){r.push(t.import(e))}),r.length>1?Promise.all(r):r[0]})},S.setContextual=d.call(e.setContextual,e),S.isEnv=d.call(e.isEnv,e),S.isPlatform=d.call(e.isPlatform,e),S};if(!g||m||v){var O=e.steal;e.steal=j(System),e.steal.startup(O&&"object"==typeof O&&O).then(null,function(e){if("undefined"!=typeof console){var t=console;t[t.error?"error":"log"](e)}}),e.steal.clone=w}else e.steal=j(System),e.steal.System=System,e.steal.dev=require("./ext/dev.js"),steal.clone=w,module.exports=e.steal}("undefined"==typeof window?"undefined"==typeof global?this:global:window); \ No newline at end of file +!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.Promise=e():"undefined"!=typeof global?global.Promise=e():"undefined"!=typeof self&&(self.Promise=e())}(function(){return function e(t,n,r){function o(i,s){if(!n[i]){if(!t[i]){var l="function"==typeof require&&require;if(!s&&l)return l(i,!0);if(a)return a(i,!0);throw new Error("Cannot find module '"+i+"'")}var u=n[i]={exports:{}};t[i][0].call(u.exports,function(e){var n=t[i][1][e];return o(n||e)},u,u.exports,e,t,n,r)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;i=0&&(p.splice(t,1),d("Handled previous rejection ["+e.id+"] "+o.formatObject(e.value)))}function s(e,t){f.push(e,t),null===h&&(h=r(l,0))}function l(){for(h=null;f.length>0;)f.shift()(f.shift())}var u,c=n,d=n;"undefined"!=typeof console&&(u=console,c=void 0!==u.error?function(e){u.error(e)}:function(e){u.log(e)},d=void 0!==u.info?function(e){u.info(e)}:function(e){u.log(e)}),e.onPotentiallyUnhandledRejection=function(e){s(a,e)},e.onPotentiallyUnhandledRejectionHandled=function(e){s(i,e)},e.onFatalRejection=function(e){s(t,e.value)};var f=[],p=[],h=null;return e}})}(function(n){t.exports=n(e)})},{"../env":5,"../format":6}],5:[function(e,t,n){!function(e){"use strict";e(function(e){var t,n="undefined"!=typeof setTimeout&&setTimeout,r=function(e,t){return setTimeout(e,t)},o=function(e){return clearTimeout(e)},a=function(e){return n(e,0)};if("undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))a=function(e){return process.nextTick(e)};else if(t="function"==typeof MutationObserver&&MutationObserver||"function"==typeof WebKitMutationObserver&&WebKitMutationObserver)a=function(e){var t,n=document.createTextNode("");new e(function(){var e=t;t=void 0,e()}).observe(n,{characterData:!0});var r=0;return function(e){t=e,n.data=r^=1}}(t);else if(!n){var i=e("vertx");r=function(e,t){return i.setTimer(t,e)},o=i.cancelTimer,a=i.runOnLoop||i.runOnContext}return{setTimer:r,clearTimer:o,asap:a}})}(function(n){t.exports=n(e)})},{}],6:[function(e,t,n){!function(e){"use strict";e(function(){function e(e){var n=String(e);return"[object Object]"===n&&"undefined"!=typeof JSON&&(n=t(e,n)),n}function t(e,t){try{return JSON.stringify(e)}catch(e){return t}}return{formatError:function(t){var n="object"==typeof t&&null!==t&&(t.stack||t.message)?t.stack||t.message:e(t);return t instanceof Error?n:n+" (WARNING: non-Error used)"},formatObject:e,tryStringify:t}})}(function(e){t.exports=e()})},{}],7:[function(e,t,n){!function(e){"use strict";e(function(){return function(e){function t(e,t){this._handler=e===m?t:n(e)}function n(e){function t(e){n.reject(e)}var n=new g;try{e(function(e){n.resolve(e)},t,function(e){n.notify(e)})}catch(e){t(e)}return n}function r(e){return R(e)?e:new t(m,new b(f(e)))}function o(e){return new t(m,new b(new _(e)))}function a(){return W}function i(e,t){return new t(m,new g(e.receiver,e.join().context))}function s(e,n,r){function o(e,t,n){c[e]=t,0==--u&&n.become(new x(c))}for(var a,i="function"==typeof n?function(t,a,i){i.resolved||l(r,o,t,e(n,a,t),i)}:o,s=new g,u=r.length>>>0,c=new Array(u),d=0;d0?t(n,a.value,o):(o.become(a),u(e,n+1,a))}else t(n,r,o)}function u(e,t,n){for(var r=t;r0||"function"!=typeof t&&o<0)return new this.constructor(m,r);var a=this._beget(),i=a._handler;return r.chain(i,r.receiver,e,t,n),a},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype._beget=function(){return i(this._handler,this.constructor)},t.all=function(e){return s(C,null,e)},t.race=function(e){return"object"!=typeof e||null===e?o(new TypeError("non-iterable passed to race()")):0===e.length?a():1===e.length?r(e[0]):d(e)},t._traverse=function(e,t){return s($,e,t)},t._visitRemaining=u,m.prototype.when=m.prototype.become=m.prototype.notify=m.prototype.fail=m.prototype._unreport=m.prototype._report=A,m.prototype._state=0,m.prototype.state=function(){return this._state},m.prototype.join=function(){for(var e=this;void 0!==e.handler;)e=e.handler;return e},m.prototype.chain=function(e,t,n,r,o){this.when({resolver:e,receiver:t,fulfilled:n,rejected:r,progress:o})},m.prototype.visit=function(e,t,n,r){this.chain(H,e,t,n,r)},m.prototype.fold=function(e,t,n,r){this.when(new L(e,t,n,r))},U(m,v),v.prototype.become=function(e){e.fail()};var H=new v;U(m,g),g.prototype._state=0,g.prototype.resolve=function(e){this.become(f(e))},g.prototype.reject=function(e){this.resolved||this.become(new _(e))},g.prototype.join=function(){if(!this.resolved)return this;for(var e=this;void 0!==e.handler;)if((e=e.handler)===this)return this.handler=O();return e},g.prototype.run=function(){var e=this.consumers,t=this.handler;this.handler=this.handler.join(),this.consumers=void 0;for(var n=0;n",t.isDeclarative=!0,e.loaderObj.transpile(t).then(function(e){var n=__global.System,r=n.register;n.register=function(e,n,r){var o=r,a=n;"string"!=typeof e&&(o=a,a=e),t.declare=o,t.depsList=a},__eval(e,__global,t),n.register=r});if("object"!=typeof n)throw TypeError("Invalid instantiate return value");t.depsList=n.deps||[],t.execute=n.execute,t.isDeclarative=!1}}).then(function(){if("loading"==t.status){t.dependencies=[];for(var r=t.depsList,o=[],a=0,i=r.length;a0)){var n=e.startingLoad;if(!1===e.loader.loaderObj.execute){for(var r=[].concat(e.loads),o=0,a=r.length;o")+"\n")),o=w(o,'Error loading "'+t.name+'" at '+(t.address||"")+"\n");for(var a=e.loads.concat([]),i=0,s=a.length;i=0;i--){for(var s=r[i],l=0;l=0;r-=1){var o=n[r];-1===t.indexOf(o)&&t.unshift(o)}else t=["es2015-no-commonjs","react","stage-0"];return t}function c(e){return(e.version?+e.version.split(".")[0]:6)||6}function d(e,t){var n=this.babelOptions||{};return n.sourceMap="inline",n.filename=e.address,n.code=!0,n.ast=!1,c(t)>=6?(delete n.optional,delete n.whitelist,delete n.blacklist,n.presets=u(n.presets),n.plugins=l(n.plugins)):(n.modules="system",n.blacklist||(n.blacklist=["react"])),n}function f(e){var t=e.types;return{visitor:{Program:function(e,n){e.unshiftContainer("body",[t.exportNamedDeclaration(null,[t.exportSpecifier(t.identifier("true"),t.identifier("__esModule"))])])}}}}function p(e,t){var n=t.Babel||t.babel||t,r=c(n),o=d.call(this,e,n);return Promise.all([v.call(this,n,o),g.call(this,n,o)]).then(function(t){return r>=6&&(o.plugins=[f].concat(t[0]),o.presets=t[1]),n.transform(e.source,o).code+"\n//# sourceURL="+e.address+"!eval"})}var h=__global,m="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process);e.prototype.transpiler="babel",e.prototype.transpile=function(e){var n=this;return n.transpilerHasRun||(h.traceur&&!n.has("traceur")&&n.set("traceur",t(n,"traceur")),h.Babel&&!n.has("babel")&&n.set("babel",t(n,"Babel")),n.transpilerHasRun=!0),n.import(n.transpiler).then(function(t){var o=t;return o.__useDefault&&(o=o.default),(o.Compiler?r:p).call(n,e,o)}).then(function(t){return'var __moduleAddress = "'+e.address+'";'+t})},e.prototype.instantiate=function(e){var r=this;return Promise.resolve(r.normalize(r.transpiler)).then(function(o){if(e.name===o)return{deps:[],execute:function(){var o=h.System,a=h.Reflect.Loader;return __eval("(function(require,exports,module){"+e.source+"})();",h,e),h.System=o,h.Reflect.Loader=a,t(r,n(e.name))}}})};var v=function(){function e(e,r){var o=[];return(r||[]).forEach(function(r){var a=i(r);if(!s(r)||t(e,a))o.push(r);else if(!t(e,a)){var l=this.configMain||"package.json!npm",u=n(a);o.push(this.import(u,{name:l}).then(function(e){var t=e.__esModule?e.default:e;return"string"==typeof r?t:[t,r[1]]}))}},this),Promise.all(o)}function t(e,t){var n=/^(?:babel-plugin-)/;return!!(e.availablePlugins||{})[n.test(t)?t.replace("babel-plugin-",""):t]}function n(e){var t=/^(?:babel-plugin-)/;return/\//.test(e)||t.test(e)?e:"babel-plugin-"+e}return function(t,n){var r=a.call(this),o=n.env||{},i=[e.call(this,t,n.plugins)];for(var s in o)if(r===s){var l=o[s].plugins||[];i.push(e.call(this,t,l))}return Promise.all(i).then(function(e){var t=[];return e.forEach(function(e){t=t.concat(e)}),t})}}(),g=function(){function e(e,r){var o=[];return(r||[]).forEach(function(r){var a=i(r);if(!s(r)||t(e,a))o.push(r);else if(!t(e,a)){var l=this.configMain||"package.json!npm",u=n(a);o.push(this.import(u,{name:l}).then(function(e){var t=e.__esModule?e.default:e;return"string"==typeof r?t:[t,r[1]]}))}},this),Promise.all(o)}function t(e,t){var n=/^(?:babel-preset-)/;return!!(e.availablePresets||{})[n.test(t)?t.replace("babel-preset-",""):t]}function n(e){var t=/^(?:babel-preset-)/;return/\//.test(e)||t.test(e)?e:"babel-preset-"+e}return function(t,n){var r=a.call(this),o=n.env||{},i=[e.call(this,t,n.presets)];for(var s in o)if(r===s){var l=o[s].presets||[];i.push(e.call(this,t,l))}return Promise.all(i).then(function(e){var t=[];return e.forEach(function(e){t=t.concat(e)}),t})}}()}(__global.LoaderPolyfill),function(){function e(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@\/?#]*(?::[^:@\/?#]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}function t(e){var t=[];return e.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?t.pop():t.push(e)}),t.join("").replace(/^\//,"/"===e.charAt(0)?"/":"")}function n(n,r){var o=r,a=n;return i&&(o=o.replace(/\\/g,"/")),o=e(o||""),a=e(a||""),o&&a?(o.protocol||a.protocol)+(o.protocol||o.authority?o.authority:a.authority)+t(o.protocol||o.authority||"/"===o.pathname.charAt(0)?o.pathname:o.pathname?(a.authority&&!a.pathname?"/":"")+a.pathname.slice(0,a.pathname.lastIndexOf("/")+1)+o.pathname:a.pathname)+(o.protocol||o.authority||o.pathname?o.search:o.search||a.search)+o.hash:null}var r,o="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,a="undefined"!=typeof window&&!o,i="undefined"!=typeof process&&!!process.platform.match(/^win/),s=__global.Promise||require("when/es6-shim/Promise");if("undefined"!=typeof XMLHttpRequest)r=function(e,t,n){function r(){t(a.responseText)}function o(){var t=a.statusText+": "+e||"XHR error",r=new Error(t);r.statusCode=a.status,n(r)}var a=new XMLHttpRequest,i=!0,s=!1;if(!("withCredentials"in a)){var l=/^(\w+:)?\/\/([^\/]+)/.exec(e);l&&(i=l[2]===window.location.host,l[1]&&(i&=l[1]===window.location.protocol))}i||"undefined"==typeof XDomainRequest||((a=new XDomainRequest).onload=r,a.onerror=o,a.ontimeout=o,a.onprogress=function(){},a.timeout=0,s=!0),a.onreadystatechange=function(){4===a.readyState&&(200===a.status||0==a.status&&a.responseText?r():o())},a.open("GET",e,!0),s&&setTimeout(function(){a.send()},0),a.send(null)};else if("undefined"!=typeof require){var l,u=/ENOENT/;r=function(e,t,n){if("file:"!=e.substr(0,5))throw"Only file URLs of the form file: allowed running in Node.";l=l||require("fs");var r=e.substr(5);return i&&(r=r.replace(/\//g,"\\")),l.readFile(r,function(e,r){if(e)return u.test(e.message)&&(e.statusCode=404),n(e);t(r+"")})}}else{if("function"!=typeof fetch)throw new TypeError("No environment fetch API available.");r=function(e,t,n){fetch(e).then(function(e){return e.text()}).then(function(e){t(e)}).then(null,function(e){n(e)})}}var c=new(function(e){function t(t){if(e.call(this,t||{}),"undefined"!=typeof location&&location.href){var n=__global.location.href.split("#")[0].split("?")[0];this.baseURL=n.substring(0,n.lastIndexOf("/")+1)}else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURL");this.baseURL="file:"+process.cwd()+"/",i&&(this.baseURL=this.baseURL.replace(/\\/g,"/"))}this.paths={"*":"*.js"}}return t.__proto__=null!==e?e:Function.prototype,t.prototype=$__Object$create(null!==e?e.prototype:null),$__Object$defineProperty(t.prototype,"constructor",{value:t}),$__Object$defineProperty(t.prototype,"global",{get:function(){return a?window:o?self:__global},enumerable:!1}),$__Object$defineProperty(t.prototype,"strict",{get:function(){return!0},enumerable:!1}),$__Object$defineProperty(t.prototype,"normalize",{value:function(e,t,n){if("string"!=typeof e)throw new TypeError("Module name must be a string");var r=e.split("/");if(0==r.length)throw new TypeError("No module name provided");var o=0,a=!1,i=0;if("."==r[0]){if(++o==r.length)throw new TypeError('Illegal module name "'+e+'"');a=!0}else{for(;".."==r[o];)if(++o==r.length)throw new TypeError('Illegal module name "'+e+'"');o&&(a=!0),i=o}for(var s=o;s2)throw new TypeError("Only one wildcard in a path is permitted");if(1==s.length){if(r==i&&i.length>o.length){o=i;break}}else r.substr(0,s[0].length)==s[0]&&r.substr(r.length-s[1].length)==s[1]&&(o=i,t=r.substr(s[0].length,r.length-s[1].length-s[0].length))}var l=this.paths[o];return t&&(l=l.replace("*",t)),a&&(l=l.replace(/#/g,"%23")),n(this.baseURL,l)},enumerable:!1,writable:!0}),$__Object$defineProperty(t.prototype,"fetch",{value:function(e){var t=this;return new s(function(o,a){r(n(t.baseURL,e.address),function(e){o(e)},a)})},enumerable:!1,writable:!0}),t}(__global.LoaderPolyfill));"object"==typeof exports&&(module.exports=c),__global.System=c}()}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:global),function(e){e.upgradeSystemLoader=function(){function t(e){var t=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(\/\/(?:[^:@\/?#]*(?::[^:@\/?#]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);return t?{href:t[0]||"",protocol:t[1]||"",authority:t[2]||"",host:t[3]||"",hostname:t[4]||"",port:t[5]||"",pathname:t[6]||"",search:t[7]||"",hash:t[8]||""}:null}function r(e,n){var r=e,o=n;return x&&(o=o.replace(/\\/g,"/")),o=t(o||""),r=t(r||""),o&&r?(o.protocol||r.protocol)+(o.protocol||o.authority?o.authority:r.authority)+function(e){var t=[];return e.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?t.pop():t.push(e)}),t.join("").replace(/^\//,"/"===e.charAt(0)?"/":"")}(o.protocol||o.authority||"/"===o.pathname.charAt(0)?o.pathname:o.pathname?(r.authority&&!r.pathname?"/":"")+r.pathname.slice(0,r.pathname.lastIndexOf("/")+1)+o.pathname:r.pathname)+(o.protocol||o.authority||o.pathname?o.search:o.search||r.search)+o.hash:null}function o(t){var n={};if(("object"==typeof t||"function"==typeof t)&&t!==e)if(_)for(var r in t)"default"!==r&&a(n,t,r);else i(n,t);return n.default=t,w(n,"__useDefault",{value:!0}),n}function a(e,t,n){try{var r;(r=Object.getOwnPropertyDescriptor(t,n))&&w(e,n,r)}catch(r){return e[n]=t[n],!1}}function i(e,t,n){var r=t&&t.hasOwnProperty;for(var o in t)r&&!t.hasOwnProperty(o)||n&&o in e||(e[o]=t[o]);return e}function s(e){function t(e,t){t._extensions=[];for(var n=0,r=e.length;n=0;a--){for(var i=r[a],s=0;st.index)return!0;return!1}r.lastIndex=o.lastIndex=a.lastIndex=0;var n,i=[],s=[],l=[];if(e.length/e.split("\n").length<200){for(;n=a.exec(e);)s.push([n.index,n.index+n[0].length]);for(;n=o.exec(e);)t(s,n)||l.push([n.index,n.index+n[0].length])}for(;n=r.exec(e);)if(!t(s,n)&&!t(l,n)){var u=n[1].substr(1,n[1].length-2);if(u.match(/"|'/))continue;i.push(u)}return i}e._extensions.push(f);var n=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])(exports\s*(\[['"]|\.)|module(\.exports|\['exports'\]|\["exports"\])\s*(\[['"]|[=,\.])|Object.defineProperty\(\s*module\s*,\s*(?:'|")exports(?:'|"))/,r=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF."'])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')\s*\)/g,o=/(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,a=/("[^"\\\n\r]*(\\.[^"\\\n\r]*)*"|'[^'\\\n\r]*(\\.[^'\\\n\r]*)*')/g,i=e.instantiate;e.instantiate=function(o){return o.metadata.format||(n.lastIndex=0,r.lastIndex=0,(r.exec(o.source)||n.exec(o.source))&&(o.metadata.format="cjs")),"cjs"==o.metadata.format&&(o.metadata.deps=o.metadata.deps?o.metadata.deps.concat(t(o.source)):t(o.source),o.metadata.executingRequire=!0,o.metadata.execute=function(t,n,r){var a=(o.address||"").split("/");a.pop(),a=a.join("/"),b._nodeRequire&&(a=a.substr(5));e.global._g={global:e.global,exports:n,module:r,require:t,__filename:b._nodeRequire?o.address.substr(5):o.address,__dirname:a};var i=e.global.define;e.global.define=void 0;var s={name:o.name,source:"(function() {\n(function(global, exports, module, require, __filename, __dirname){\n"+o.source+"\n}).call(_g.exports, _g.global, _g.exports, _g.module, _g.require, _g.__filename, _g.__dirname);})();",address:o.address};e.__exec(s),e.global.define=i,e.global._g=void 0}),i.call(this,o)}}function p(e){function t(e,t){var n=[],r=(e.match(f)[1].split(",")[t]||"require").replace(h,""),o=m[r]||(m[r]=new RegExp("/\\*|//|\"|'|`|(?:^|\\breturn\\b|[([=,;:?><&|^*%~+-])\\s*(?=/)|\\b"+r+"(?=\\s*\\()","g"));o.lastIndex=0,v[r]=v.require;for(var a,i,s,l;a=o.exec(e);)i=a[0],(s=v[i])||(s=v[i="/regexp/"]),s.lastIndex=o.lastIndex,(l=s.exec(e))&&l.index===o.lastIndex&&(o.lastIndex=s.lastIndex,s===v.require&&l[2]&&n.push(l[2]));return n}function n(e,t,r,o){var a=this;if("object"==typeof e&&!(e instanceof Array))return n.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1));if(!(e instanceof Array)){if("string"==typeof e){var i=a.get(e);return i.__useDefault?i.default:i}throw new TypeError("Invalid require")}Promise.all(e.map(function(e){return a.import(e,o)})).then(function(e){t&&t.apply(null,e)},r)}function r(e,t,r){return function(o,a,i){return"string"==typeof o?t(o):n.call(r,o,a,i,{name:e})}}function o(e){function n(n,o,a){var i=n,s=o,l=a;"string"!=typeof i&&(l=s,s=i,i=null),s instanceof Array||(l=s,s=["require","exports","module"]),"function"!=typeof l&&(l=function(e){return function(){return e}}(l)),void 0===s[s.length-1]&&s.pop();var u,c,f;if(-1!=(u=y.call(s,"require"))){s.splice(u,1);var p=l.toString();s=s.concat(t(p,u))}-1!=(c=y.call(s,"exports"))&&s.splice(c,1),-1!=(f=y.call(s,"module"))&&s.splice(f,1);var h={deps:s,execute:function(t,n,o){for(var a=[],i=0;i=0;o--)e.source=e.source.substr(0,r[o].start)+r[o].postLocate(t[o])+e.source.substr(r[o].end,e.source.length);return a.call(n,e)})}}),x(function(e){e._contextualModules={},e.setContextual=function(e,t){this._contextualModules[e]=t};var t=e.normalize;e.normalize=function(e,n){var r=this,o=r.pluginLoader||r;if(n){var a=this._contextualModules[e];if(a){var i=e+"/"+n;return r.has(i)?Promise.resolve(i):("string"==typeof a&&(a=o.import(a)),Promise.resolve(a).then(function(e){var t=e;return t.default&&(t=t.default),Promise.resolve(t.call(r,n))}).then(function(e){return r.set(i,r.newModule(e)),i}))}}return t.apply(this,arguments)}}),x(function(e){function t(){document.removeEventListener("DOMContentLoaded",t,!1),window.removeEventListener("load",t,!1),n()}function n(){for(var t=document.getElementsByTagName("script"),n=0;nt.index)return!0;return!1}function n(e){for(;o=e.exec(r);)if(!t(i,o)){var n=o[1];a.push(n)}}var r=e.replace(d,"");u.lastIndex=d.lastIndex=c.lastIndex=f.lastIndex=0;var o,a=[],i=[];if(e.length/e.split("\n").length<200)for(;o=f.exec(r);)i.push([o.index,o.index+o[0].length]);return n(u),n(c),a}t._extensions&&t._extensions.push(e),t._traceData={loads:{},parentMap:{}},t.getDependencies=function(e){var t=this.getModuleLoad(e);return t?t.metadata.dependencies:void 0},t.getDependants=function(e){var t=[];return n(this._traceData.parentMap[e]||{},function(e){t.push(e)}),t},t.getModuleLoad=function(e){return this._traceData.loads[e]},t.getBundles=function(e,t){var r=t||{};r[e]=!0;var o=this,a=o._traceData.parentMap[e];if(!a)return[e];var i=[];return n(a,function(e,t){r[e]||(i=i.concat(o.getBundles(e,r)))}),i},t._allowModuleExecution={},t.allowModuleExecution=function(e){var t=this;return t.normalize(e).then(function(e){t._allowModuleExecution[e]=!0})};var o=t.normalize;t.normalize=function(e,t){var n=o.apply(this,arguments);if(t){var r=this._traceData.parentMap;return n.then(function(e){return r[e]||(r[e]={}),r[e][t]=!0,e})}return n};var a=function(){return t.newModule({})},i={traceur:!0,babel:!0},s=function(e){return i[e.name]||this._allowModuleExecution[e.name]},l=[].map||function(e){for(var t=[],n=0,r=this.length;n-1||a.indexOf("steal-sans-promises.production")>-1&&!n.env)&&this.config({env:s+"-production"}),(this.isEnv("production")||this.loadBundles)&&T.call(this),U.stealPath.set.call(this,i,n)}},devBundle:{order:16,set:function(e,t){var n=!0===e?"dev-bundle":e;n&&(this.devBundle=n)}},depsBundle:{order:17,set:function(e,t){var n=!0===e?"dev-bundle":e;n&&(this.depsBundle=n)}}};n(U,function(e,t){e.order?z.splice(e.order,0,t):z.push(t)}),function(e,t,r){var o=e.config;e.config=function(i){var s=a({},i);n(t,function(t){var n=r[t];if(n.set&&s[t]){var o=n.set.call(e,s[t],i);void 0!==o&&(e[t]=o),delete s[t]}}),o.call(this,s)}}(e,z,U),S.config=function(e){if("string"==typeof e)return this.loader[e];this.loader.config(e)},x(function(e){e.getEnv=function(){return(this.env||"").split("-")[1]||this.env},e.getPlatform=function(){var e=(this.env||"").split("-");return 2===e.length?e[0]:void 0},e.isEnv=function(e){return this.getEnv()===e},e.isPlatform=function(e){return this.getPlatform()===e}});var C=function(e){var n={},r=/Url$/,o=e.split("?"),a=o.shift(),i=o.join("?").split("&"),s=a.split("/");s.pop(),s.join("/");if(i.length&&i[0].length)for(var l,u=0;u1){var d=t(c[0]);n[d=d.replace(r,"URL")]=c.slice(1).join("=")}}return n},A=function(e){var r={},o=/Url$/;r.stealURL=e.src,n(e.attributes,function(e){var n=e.nodeName||e.name,a=t(0===n.indexOf("data-")?n.replace("data-",""):n);a=a.replace(o,"URL"),r[a]=""===e.value||e.value});var i=e.innerHTML;return/\S/.test(i)&&(r.mainSource=i),a(C(e.src),r)},F=function(){return new Promise(function(e,t){if(p)e(a({stealURL:location.href},C(location.href)));else if(h||m||v){if(document.currentScript)return void e(A(document.currentScript));var n=document.scripts;n.length&&e(A(n[n.length-1]))}else e({stealPath:__dirname})})};return S.startup=function(e){var t,n,o=this.loader;return w=new Promise(function(e,r){t=e,n=r}),O=F().then(function(i){var s;return s="object"==typeof e?a(e,i):i,o.config(s),$.call(o),o.loadBundles?(o.main||!o.isEnv("production")||o.stealBundled||b("Attribute 'main' is required in production environment. Please add it to the script tag."),o.import(o.configMain).then(t,n),w.then(function(e){return $.call(o),o.main?o.import(o.main):e})):(o.import(o.devBundle).then(function(){return o.import(o.configMain)}).then(function(){return o.import(o.depsBundle)}).then(t,n),(j=w.then(function(){return $.call(o),D.call(o),s&&o.config(s),o.import("@dev")})).then(function(){if(!o.main||o.localLoader)return w;var e=o.main;return"string"==typeof e&&(e=[e]),Promise.all(r(e,function(e){return o.import(e)}))}))}).then(function(e){return o.mainSource?o.module(o.mainSource):(o.loadScriptModules(),e)})},S.done=function(){return O},S.import=function(){var e=arguments,t=this.System;return w||(t.main||(t.main="@empty"),S.startup()),w.then(function(){var r=[];return n(e,function(e){r.push(t.import(e))}),r.length>1?Promise.all(r):r[0]})},S.setContextual=d.call(e.setContextual,e),S.isEnv=d.call(e.isEnv,e),S.isPlatform=d.call(e.isPlatform,e),S};if(!g||m||v){var O=e.steal;e.steal=j(System),e.steal.startup(O&&"object"==typeof O&&O).then(null,function(e){if("undefined"!=typeof console){var t=console;t[t.error?"error":"log"](e)}}),e.steal.clone=w}else e.steal=j(System),e.steal.System=System,e.steal.dev=require("./ext/dev.js"),steal.clone=w,module.exports=e.steal}("undefined"==typeof window?"undefined"==typeof global?this:global:window); \ No newline at end of file