steal
Version:
Gets JavaScript.
7 lines (6 loc) • 92.7 kB
JavaScript
/*
* steal v2.2.4
*
* Copyright (c) 2021 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 a(i,s){if(!n[i]){if(!t[i]){var l="function"==typeof require&&require;if(!s&&l)return l(i,!0);if(o)return o(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 a(n||e)},u,u.exports,e,t,n,r)}return n[i].exports}for(var o="function"==typeof require&&require,i=0;i<r.length;i++)a(r[i]);return a}({1:[function(e,t,n){var r=e("../lib/decorators/unhandledRejection")(e("../lib/Promise"));t.exports="undefined"!=typeof global?global.Promise=r:"undefined"!=typeof self?self.Promise=r:r},{"../lib/Promise":2,"../lib/decorators/unhandledRejection":4}],2:[function(e,t,n){!function(e){"use strict";e(function(e){return e("./makePromise")({scheduler:new(e("./Scheduler"))(e("./env").asap)})})}(function(n){t.exports=n(e)})},{"./Scheduler":3,"./env":5,"./makePromise":7}],3:[function(e,t,n){!function(e){"use strict";e(function(){function e(e){this._async=e,this._running=!1,this._queue=this,this._queueLen=0,this._afterQueue={},this._afterQueueLen=0;var t=this;this.drain=function(){t._drain()}}return e.prototype.enqueue=function(e){this._queue[this._queueLen++]=e,this.run()},e.prototype.afterQueue=function(e){this._afterQueue[this._afterQueueLen++]=e,this.run()},e.prototype.run=function(){this._running||(this._running=!0,this._async(this.drain))},e.prototype._drain=function(){for(var e=0;e<this._queueLen;++e)this._queue[e].run(),this._queue[e]=void 0;for(this._queueLen=0,this._running=!1,e=0;e<this._afterQueueLen;++e)this._afterQueue[e].run(),this._afterQueue[e]=void 0;this._afterQueueLen=0},e})}(function(e){t.exports=e()})},{}],4:[function(e,t,n){!function(e){"use strict";e(function(e){function t(e){throw e}function n(){}var r=e("../env").setTimer,a=e("../format");return function(e){function o(e){e.handled||(p.push(e),c("Potentially unhandled rejection ["+e.id+"] "+a.formatError(e.value)))}function i(e){var t=p.indexOf(e);t>=0&&(p.splice(t,1),d("Handled previous rejection ["+e.id+"] "+a.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(o,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)},a=function(e){return clearTimeout(e)},o=function(e){return n(e,0)};if("undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))o=function(e){return process.nextTick(e)};else if(t="function"==typeof MutationObserver&&MutationObserver||"function"==typeof WebKitMutationObserver&&WebKitMutationObserver)o=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)},a=i.cancelTimer,o=i.runOnLoop||i.runOnContext}return{setTimer:r,clearTimer:a,asap:o}})}(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 L(e)?e:new t(m,new b(f(e)))}function a(e){return new t(m,new b(new _(e)))}function o(){return Q}function i(e,t){return new t(m,new g(e.receiver,e.join().context))}function s(e,n,r){function a(e,t,n){c[e]=t,0==--u&&n.become(new x(c))}for(var o,i="function"==typeof n?function(t,o,i){i.resolved||l(r,a,t,e(n,o,t),i)}:a,s=new g,u=r.length>>>0,c=new Array(u),d=0;d<r.length&&!s.resolved;++d)void 0!==(o=r[d])||d in r?l(r,i,d,o,s):--u;return 0===u&&s.become(new x(c)),new t(m,s)}function l(e,t,n,r,a){if(I(r)){var o=p(r),i=o.state();0===i?o.fold(t,n,void 0,a):i>0?t(n,o.value,a):(a.become(o),u(e,n+1,o))}else t(n,r,a)}function u(e,t,n){for(var r=t;r<e.length;++r)c(f(e[r]),n)}function c(e,t){if(e!==t){var n=e.state();0===n?e.visit(e,void 0,e._unreport):n<0&&e._unreport()}}function d(e){var n,r,a,o=new g;for(n=0;n<e.length;++n)if(void 0!==(r=e[n])||n in e){if(0!==(a=f(r)).state()){o.become(a),u(e,n+1,a);break}a.visit(o,o.resolve,o.reject)}return new t(m,o)}function f(e){return L(e)?e._handler.join():I(e)?h(e):new x(e)}function p(e){return L(e)?e._handler.join():h(e)}function h(e){try{var t=e.then;return"function"==typeof t?new y(t,e):new x(e)}catch(e){return new _(e)}}function m(){}function v(){}function g(e,n){t.createContext(this,n),this.consumers=void 0,this.receiver=e,this.handler=void 0,this.resolved=!1}function b(e){this.handler=e}function y(e,t){g.call(this),U.enqueue(new P(e,t,this))}function x(e){t.createContext(this),this.value=e}function _(e){t.createContext(this),this.id=++H,this.value=e,this.handled=!1,this.reported=!1,this._report()}function w(e,t){this.rejection=e,this.context=t}function j(e){this.rejection=e}function S(){return new _(new TypeError("Promise cycle"))}function E(e,t){this.continuation=e,this.handler=t}function O(e,t){this.handler=t,this.value=e}function P(e,t,n){this._then=e,this.thenable=t,this.resolver=n}function M(e,t,n,r,a){try{e.call(t,n,r,a)}catch(e){r(e)}}function k(e,t,n,r){this.f=e,this.z=t,this.c=n,this.to=r,this.resolver=G,this.receiver=this}function L(e){return e instanceof t}function I(e){return("object"==typeof e||"function"==typeof e)&&null!==e}function R(e,n,r,a){if("function"!=typeof e)return a.become(n);t.enterContext(n),C(e,n.value,r,a),t.exitContext()}function T(e,n,r,a,o){if("function"!=typeof e)return o.become(r);t.enterContext(r),$(e,n,r.value,a,o),t.exitContext()}function N(e,n,r,a,o){if("function"!=typeof e)return o.notify(n);t.enterContext(r),q(e,n,a,o),t.exitContext()}function D(e,t,n){try{return e(t,n)}catch(e){return a(e)}}function C(e,t,n,r){try{r.become(f(e.call(n,t)))}catch(e){r.become(new _(e))}}function $(e,t,n,r,a){try{e.call(r,t,n,a)}catch(e){a.become(new _(e))}}function q(e,t,n,r){try{r.notify(e.call(n,t))}catch(e){r.notify(e)}}function F(e,t){t.prototype=W(e.prototype),t.prototype.constructor=t}function A(e,t){return t}function z(){}var U=e.scheduler,B="undefined"!=typeof process&&null!==process&&"function"==typeof process.emit?function(e,t){return"unhandledRejection"===e?process.emit(e,t.value,t):process.emit(e,t)}:"undefined"!=typeof self&&"function"==typeof CustomEvent?function(e,t,n){var r=!1;try{r=new n("unhandledRejection")instanceof n}catch(e){}return r?function(e,r){var a=new n(e,{detail:{reason:r.value,key:r},bubbles:!1,cancelable:!0});return!t.dispatchEvent(a)}:e}(z,self,CustomEvent):z,W=Object.create||function(e){function t(){}return t.prototype=e,new t};t.resolve=r,t.reject=a,t.never=o,t._defer=function(){return new t(m,new g)},t._handler=f,t.prototype.then=function(e,t,n){var r=this._handler,a=r.join().state();if("function"!=typeof e&&a>0||"function"!=typeof t&&a<0)return new this.constructor(m,r);var o=this._beget(),i=o._handler;return r.chain(i,r.receiver,e,t,n),o},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(A,null,e)},t.race=function(e){return"object"!=typeof e||null===e?a(new TypeError("non-iterable passed to race()")):0===e.length?o():1===e.length?r(e[0]):d(e)},t._traverse=function(e,t){return s(D,e,t)},t._visitRemaining=u,m.prototype.when=m.prototype.become=m.prototype.notify=m.prototype.fail=m.prototype._unreport=m.prototype._report=z,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,a){this.when({resolver:e,receiver:t,fulfilled:n,rejected:r,progress:a})},m.prototype.visit=function(e,t,n,r){this.chain(G,e,t,n,r)},m.prototype.fold=function(e,t,n,r){this.when(new k(e,t,n,r))},F(m,v),v.prototype.become=function(e){e.fail()};var G=new v;F(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<e.length;++n)t.when(e[n])},g.prototype.become=function(e){this.resolved||(this.resolved=!0,this.handler=e,void 0!==this.consumers&&U.enqueue(this),void 0!==this.context&&e._report(this.context))},g.prototype.when=function(e){this.resolved?U.enqueue(new E(e,this.handler)):void 0===this.consumers?this.consumers=[e]:this.consumers.push(e)},g.prototype.notify=function(e){this.resolved||U.enqueue(new O(e,this))},g.prototype.fail=function(e){var t=void 0===e?this.context:e;this.resolved&&this.handler.join().fail(t)},g.prototype._report=function(e){this.resolved&&this.handler.join()._report(e)},g.prototype._unreport=function(){this.resolved&&this.handler.join()._unreport()},F(m,b),b.prototype.when=function(e){U.enqueue(new E(e,this))},b.prototype._report=function(e){this.join()._report(e)},b.prototype._unreport=function(){this.join()._unreport()},F(g,y),F(m,x),x.prototype._state=1,x.prototype.fold=function(e,t,n,r){T(e,t,this,n,r)},x.prototype.when=function(e){R(e.fulfilled,this,e.receiver,e.resolver)};var H=0;F(m,_),_.prototype._state=-1,_.prototype.fold=function(e,t,n,r){r.become(this)},_.prototype.when=function(e){"function"==typeof e.rejected&&this._unreport(),R(e.rejected,this,e.receiver,e.resolver)},_.prototype._report=function(e){U.afterQueue(new w(this,e))},_.prototype._unreport=function(){this.handled||(this.handled=!0,U.afterQueue(new j(this)))},_.prototype.fail=function(e){this.reported=!0,B("unhandledRejection",this),t.onFatalRejection(this,void 0===e?this.context:e)},w.prototype.run=function(){this.rejection.handled||this.rejection.reported||(this.rejection.reported=!0,B("unhandledRejection",this.rejection)||t.onPotentiallyUnhandledRejection(this.rejection,this.context))},j.prototype.run=function(){this.rejection.reported&&(B("rejectionHandled",this.rejection)||t.onPotentiallyUnhandledRejectionHandled(this.rejection))},t.createContext=t.enterContext=t.exitContext=t.onPotentiallyUnhandledRejection=t.onPotentiallyUnhandledRejectionHandled=t.onFatalRejection=z;var Q=new t(m,new m);return E.prototype.run=function(){this.handler.join().when(this.continuation)},O.prototype.run=function(){var e=this.handler.consumers;if(void 0!==e)for(var t,n=0;n<e.length;++n)N((t=e[n]).progress,this.value,this.handler,t.receiver,t.resolver)},P.prototype.run=function(){var e=this.resolver;M(this._then,this.thenable,function(t){e.resolve(t)},function(t){e.reject(t)},function(t){e.notify(t)})},k.prototype.fulfilled=function(e){this.f.call(this.c,this.z,e,this.to)},k.prototype.rejected=function(e){this.to.reject(e)},k.prototype.progress=function(e){this.to.notify(e)},t}})}(function(e){t.exports=e()})},{}]},{},[1])(1)}),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}}var isWorker="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,isBrowser="undefined"!=typeof window&&!isWorker;__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 I(l({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 I(function(e,r){e(t.loaderObj.normalize(n,a,o))}).then(function(e){return I.resolve(t.loaderObj.notifyLoad(n,e,a)).then(function(){return e})}).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<i;o++)if((a=t.loads[o]).name==n)return k.assert("loading"==a.status||"loaded"==a.status,"loading or loaded"),a;for(var s=t.loaderObj.failed||D,o=0,i=s.length;o<i;o++)if((a=s[o]).name===n)return I.reject("The load "+n+" already failed.");return a=e(n),t.loads.push(a),r(t,a),a})}function r(e,t){a(e,t,I.resolve().then(function(){return e.loaderObj.locate({name:t.name,metadata:t.metadata})}))}function a(e,t,n){o(e,t,n.then(function(n){if("loading"==t.status)return t.address=n,e.loaderObj.fetch({name:t.name,metadata:t.metadata,address:n})}))}function o(e,t,r){var a=t.pass||0,o=function(){return t.pass<<0!==a};r.then(function(r){if("loading"==t.status)return I.resolve(e.loaderObj.translate({name:t.name,metadata:t.metadata,address:t.address,source:r})).then(function(n){if("loading"==t.status&&!o())return t.source=n,e.loaderObj.instantiate({name:t.name,metadata:t.metadata,address:t.address,source:n})}).then(function(n){if("loading"==t.status&&!o()){if(void 0===n)return t.address=t.address||"<Anonymous Module "+ ++C+">",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&&!o()){t.dependencies=[];for(var r=t.depsList,a=[],i=0,s=r.length;i<s;i++)!function(r,o){a.push(n(e,r,t.name,t.address).then(function(e){if(t.dependencies[o]={key:r,value:e.name},"linked"!=e.status)for(var n=t.linkSets.concat([]),a=0,i=n.length;a<i;a++)c(n[a],e)}))}(r[i],i);return I.all(a)}}).then(function(){if("loading"==t.status&&!o()){k.assert("loading"==t.status,"is loading"),t.status="loaded";for(var e=t.linkSets.concat([]),n=0,r=e.length;n<r;n++)f(e[n],t)}})}).catch(function(e){t.status="failed",t.exception=e;for(var n=t.linkSets.concat([]),r=0,a=n.length;r<a;r++)p(n[r],t,e);k.assert(0==t.linkSets.length,"linkSets not removed")})}function i(e){e.pass=null!=e.pass?e.pass+1:1}function s(e,t){var n=e.status;e.status=t,t!==n&&"loaded"===n&&e.linkSets.forEach(function(e){e.loadingCount++})}function l(t){return function(n,i){var s=t.loader,l=t.moduleName,c=t.step,d=t.moduleMetadata.importingModuleName;if(s.modules[l])throw new TypeError('"'+l+'" already exists in the module table');for(var f,p,h=0,m=s.loads.length;h<m;h++)if(s.loads[h].name==l){if(f=s.loads[h],"translate"!=c||f.source||(f.address=t.moduleAddress,o(s,f,I.resolve(t.moduleSource))),p=f.linkSets[0],d&&p.loads[d])continue;return p.done.then(function(){n(f)})}var v;f?v=f:(v=e(l)).metadata=t.moduleMetadata;var g=u(s,v);f||s.loads.push(v),n(g.done),"locate"==c?r(s,v):"fetch"==c?a(s,v,I.resolve(t.moduleAddress)):(k.assert("translate"==c,"translate step"),v.address=t.moduleAddress,o(s,v,I.resolve(t.moduleSource)))}}function u(e,t){var n={loader:e,loads:[],startingLoad:t,loadingCount:0};return n.done=new I(function(e,t){n.resolve=e,n.reject=t}),c(n,t),n}function c(e,t){k.assert("loading"==t.status||"loaded"==t.status||"failed"===t.status,"loading or loaded on link set");for(var n=0,r=e.loads.length;n<r;n++)if(e.loads[n]==t)return;e.loads.push(t),e.loads[t.name]=!0,t.linkSets.push(e),"loaded"!=t.status&&e.loadingCount++;for(var a=e.loader,n=0,r=t.dependencies.length;n<r;n++){var o=t.dependencies[n].value;if(!a.modules[o])for(var i=0,s=a.loads.length;i<s;i++)if(a.loads[i].name==o){c(e,a.loads[i]);break}}}function d(e){var t=!1;try{g(e,function(n,r){p(e,n,r),t=!0})}catch(n){p(e,null,n),t=!0}return t}function f(e,t){if(k.assert("loaded"==t.status||"linked"==t.status,"loaded or linked"),e.loadingCount--,!(e.loadingCount>0)){var n=e.startingLoad;if(!1===e.loader.loaderObj.execute){for(var r=[].concat(e.loads),a=0,o=r.length;a<o;a++)(t=r[a]).module=t.isDeclarative?{name:t.name,module:$({}),evaluated:!0}:{module:$({})},t.status="linked",h(e.loader,t);return e.resolve(n)}d(e)||(k.assert(0==e.loads.length,"loads cleared"),e.resolve(n))}}function p(e,t,n){for(var r=e.loader,a=n,o=e.loads.concat([]),i=0,s=o.length;i<s;i++){var t=o[i];r.loaderObj.failed=r.loaderObj.failed||[],"failed"===t.status&&-1==T.call(r.loaderObj.failed,t)?r.loaderObj.failed.push(t):r.loaderObj._pendingState&&r.loaderObj._pendingState(t);var l=T.call(t.linkSets,e);if(k.assert(-1!=l,"link not present"),t.linkSets.splice(l,1),0==t.linkSets.length){var u=T.call(e.loader.loads,t);-1!=u&&e.loader.loads.splice(u,1)}}e.reject(a)}function h(e,t){if(e.loaderObj.trace){e.loaderObj.loads||(e.loaderObj.loads={});var n={};t.dependencies.forEach(function(e){n[e.key]=e.value}),e.loaderObj.loads[t.name]={name:t.name,deps:t.dependencies.map(function(e){return e.key}),depMap:n,address:t.address,metadata:t.metadata,source:t.source,kind:t.isDeclarative?"declarative":"dynamic"}}t.name&&(k.assert(!e.modules[t.name],"load not in module table"),e.modules[t.name]=t.module);var r=T.call(e.loads,t);-1!=r&&e.loads.splice(r,1);for(var a=0,o=t.linkSets.length;a<o;a++)-1!=(r=T.call(t.linkSets[a].loads,t))&&t.linkSets[a].loads.splice(r,1);t.linkSets.splice(0,t.linkSets.length)}function m(e,t,n){if(n[e.groupIndex]=n[e.groupIndex]||[],-1==T.call(n[e.groupIndex],e)){n[e.groupIndex].push(e);for(var r=0,a=t.length;r<a;r++)for(var o=t[r],i=0;i<e.dependencies.length;i++)if(o.name==e.dependencies[i].value){k.assert("loaded"==o.status,"Load in linkSet not loaded!");var s=e.groupIndex+(o.isDeclarative!=e.isDeclarative);if(void 0===o.groupIndex||o.groupIndex<s){if(void 0!==o.groupIndex&&(n[o.groupIndex].splice(T.call(n[o.groupIndex],o),1),0==n[o.groupIndex].length))throw new TypeError("Mixed dependency cycle detected");o.groupIndex=s}m(o,t,n)}}}function v(e,t,n){try{var r=t.execute()}catch(e){return void n(t,e)}if(r&&r instanceof P)return r;n(t,new TypeError("Execution must define a Module instance"))}function g(e,t){var n=e.loader;if(e.loads.length){var r=[],a=e.loads[0];a.groupIndex=0,m(a,e.loads,r);for(var o=a.isDeclarative==r.length%2,i=r.length-1;i>=0;i--){for(var s=r[i],l=0;l<s.length;l++){var u=s[l];if(o)y(u,e.loads,n);else{var c=v(e,u,t);if(!c)return;u.module={name:u.name,module:c},u.status="linked"}h(n,u)}o=!o}}}function b(e,t){var n=t.moduleRecords;return n[e]||(n[e]={name:e,dependencies:[],module:new P,importers:[]})}function y(e,t,n){if(!e.module){var r=e.module=b(e.name,n),a=e.module.module,o=e.declare.call(__global,function(e,t){if(r.locked=!0,"object"==typeof e)for(var n in e)a[n]=e[n];else a[e]=t;for(var o=0,i=r.importers.length;o<i;o++){var s=r.importers[o];if(!s.locked){var l=T.call(s.dependencies,r);s.setters[l](a)}}return r.locked=!1,t});r.setters=o.setters,r.execute=o.execute;for(var i=0,s=e.dependencies.length;i<s;i++){var l=e.dependencies[i].value,u=n.modules[l];if(!u)for(var c=0;c<t.length;c++)t[c].name==l&&(t[c].module?u=b(l,n):(y(t[c],t,n),u=t[c].module));u.importers?(r.dependencies.push(u),u.importers.push(r)):r.dependencies.push(null),r.setters[i]&&r.setters[i](u.module)}e.status="linked"}}function x(e,t){return k.assert("linked"==t.status,"is linked "+t.name),j(t.module,[],e),t.module.module}function _(e,t){try{e.execute.call(__global)}catch(e){return e.onModuleExecution=!0,w(e),e}}function w(e){if(!e.originalErr){for(var t=(e.stack||e.message||e).toString().split("\n"),n=[],r=0;r<t.length;r++)void 0!==L&&-1!=t[r].indexOf(L.src)||n.push(t[r]);n.length&&(e.stack=n.join("\n\t"))}return e}function j(e,t,n){var r=S(e,t,n);if(r)throw r}function S(e,t,n){if(!e.evaluated&&e.dependencies){t.push(e);for(var r,a=e.dependencies,o=0,i=a.length;o<i;o++){var s=a[o];if(s&&(-1==T.call(t,s)&&(r=S(s,t,n))))return r=E(r,"Error evaluating "+s.name+"\n")}if(e.failed)return new Error("Module failed execution.");if(!e.evaluated)return e.evaluated=!0,(r=_(e,n))?e.failed=!0:Object.preventExtensions&&Object.preventExtensions(e.module),e.execute=void 0,r}}function E(e,t){var n=e;return n instanceof Error?n.message=t+n.message:n=t+n,n}function O(e){if("object"!=typeof e)throw new TypeError("Options must be an object");e.normalize&&(this.normalize=e.normalize),e.locate&&(this.locate=e.locate),e.fetch&&(this.fetch=e.fetch),e.translate&&(this.translate=e.translate),e.instantiate&&(this.instantiate=e.instantiate),this._loader={loaderObj:this,loads:[],modules:{},importPromises:{},moduleRecords:{}},N(this,"global",{get:function(){return __global}})}function P(){}function M(e,t,n){var r=e._loader.importPromises;return r[t]=n.then(function(e){return r[t]=void 0,e},function(e){throw r[t]=void 0,e})}var k,L,I=__global.Promise||require("when/es6-shim/Promise");if(__global.console?(k=__global.console).assert=k.assert||function(){}:k={assert:function(){}},isBrowser){var R=document.getElementsByTagName("script");L=document.currentScript||R[R.length-1]}var T=Array.prototype.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},N=$__Object$defineProperty,D=[],C=0,$=(O.prototype={constructor:O,anonymousCount:0,define:function(e,t,n){if(this._loader.importPromises[e])throw new TypeError("Module is already loading.");return M(this,e,new I(l({step:"translate",loader:this._loader,moduleName:e,moduleMetadata:n&&n.metadata||{},moduleSource:t,moduleAddress:n&&n.address})))},delete:function(e){var t=this._loader;if(delete t.importPromises[e],delete t.moduleRecords[e],this.failed)for(var n=0;n<this.failed.length;n++)if(this.failed[n].name===e){this.failed.splice(n,1);break}return!!t.modules[e]&&delete t.modules[e]},get:function(e){if(this._loader.modules[e])return j(this._loader.modules[e],[],this),this._loader.modules[e].module},has:function(e){return!!this._loader.modules[e]},import:function(e,n){var r=this;return I.resolve(r.normalize(e,n&&n.name,n&&n.address)).then(function(e){var a=r._loader;return a.modules[e]?(j(a.modules[e],[],a._loader),a.modules[e].module):a.importPromises[e]||M(r,e,t(a,e,n||{}).then(function(t){return delete a.importPromises[e],x(a,t)}).then(null,function(t){if(r.defined&&(r.defined[e]=void 0),t.onModuleExecution&&r.getModuleLoad){var n=r.getModuleLoad(e);if(n)return r.rejectWithCodeFrame(t,n)}else if(t.promise)return t.promise;return I.reject(t)}))})},load:function(e,n){return this._loader.modules[e]?(j(this._loader.modules[e],[],this._loader),I.resolve(this._loader.modules[e].module)):this._loader.importPromises[e]||M(this,e,t(this._loader,e,{}))},module:function(t,n){var r=e("<Anonymous"+ ++this.anonymousCount+">");r.address=n&&n.address;var a=u(this._loader,r),i=I.resolve(t),s=this._loader,l=a.done.then(function(){return x(s,r)});return o(s,r,i),l},newModule:function(e){if("object"!=typeof e)throw new TypeError("Expected object");var t,n=new P;if(Object.getOwnPropertyNames&&null!=e)t=Object.getOwnPropertyNames(e);else{t=[];for(var r in e)t.push(r)}for(var a=0;a<t.length;a++)!function(t){N(n,t,{configurable:!1,enumerable:!0,get:function(){return e[t]}})}(t[a]);return Object.preventExtensions&&Object.preventExtensions(n),n},set:function(e,t){if(!(t instanceof P))throw new TypeError("Loader.set("+e+", module) must be a module");this._loader.modules[e]={module:t}},normalize:function(e,t,n){return e},locate:function(e){return e.name},fetch:function(e){throw new TypeError("Fetch not implemented")},translate:function(e){return e.source},instantiate:function(e){},notifyLoad:function(e,t,n){},provide:function(e,t,n){for(var r,a=0;a<this._loader.loads.length;a++)if(this._loader.loads[a].name===e){r=this._loader.loads[a];break}return r?(i(r),s(r,"loading"),o(this._loader,r,I.resolve(t))):(this.delete(e),this.define(e,t,n))}}).newModule;"object"==typeof exports&&(module.exports=O),__global.Reflect=__global.Reflect||{},__global.Reflect.Loader=__global.Reflect.Loader||O,__global.Reflect.global=__global.Reflect.global||__global,__global.LoaderPolyfill=O}(),function(e){function t(e,t){return e.newModule({__useDefault:!0,default:v[t]})}function n(e){return"babel"===e?"Babel":e}function r(e,t){var n=this.traceurOptions||{};n.modules="instantiate",n.script=!1,n.sourceMaps="inline",n.filename=e.address,n.inputSourceMap=e.metadata.sourceMap,n.moduleName=!1;var r=new t.Compiler(n),o=a(e.source,r,n.filename);return o+="!eval"}function a(e,t,n){try{return t.compile(e,n)}catch(e){throw e[0]}}function o(){var e=this,t="function"==typeof e.getEnv&&e.getEnv();return g?process.env.BABEL_ENV||process.env.NODE_ENV||t||"development":t||"development"}function i(e){return s(e)?"string"==typeof e?e:e[0]:null}function s(e){return"string"==typeof e||e.length&&"string"==typeof e[0]}function l(e){var t=e||[],n="transform-es2015-modules-systemjs";return-1===t.indexOf(n)&&t.unshift(n),t}function u(e,t){var n=e||[],r=!1!==t.forceES5,a=r?[y,"react","stage-0"]:["react"];return n.length&&r&&-1!=n.indexOf(y)&&n.unshift(y),n.length?n:a}function c(e){var t=e.metadata.npmPackage;if(t){var n=t.steal||t.system;if(n&&n.babelOptions)return n.babelOptions}return this.babelOptions||{}}function d(e){return(e.version?+e.version.split(".")[0]:6)||6}function f(e,t){var n=this,r=c.call(n,e);return r.sourceMap="inline",r.filename=e.address,r.code=!0,r.ast=!1,d(t)>=6?(delete r.optional,delete r.whitelist,delete r.blacklist,r.presets=u(r.presets,n),r.plugins=l(r.plugins)):(r.modules="system",r.blacklist||(r.blacklist=["react"])),r}function p(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 h(e){return e.metadata.importSpecifiers=Object.create(null),e.metadata.importNames=Object.create(null),e.metadata.exportNames=Object.create(null),{visitor:{ImportDeclaration:function(t,n){var r=t.node,a=r.source.value,o=r.source.loc;e.metadata.importSpecifiers[a]=o;var i=e.metadata.importNames[a];i||(i=e.metadata.importNames[a]=[]),i.push.apply(i,(r.specifiers||[]).map(function(e){return"ImportDefaultSpecifier"===e.type?"default":e.imported&&e.imported.name}))},ExportDeclaration:function(t,n){var r=t.node;if(r.source){var a=r.source.value,o=e.metadata.exportNames[a];"ExportNamedDeclaration"===r.type?(o||(o=e.metadata.exportNames[a]=new Map),r.specifiers.forEach(function(e){o.set(e.exported.name,e.local.name)})):"ExportAllDeclaration"===r.type&&(e.metadata.exportNames[a]=1)}}}}}function m(e,t){var n=this,r=t.Babel||t.babel||t,a=d(r),o=f.call(n,e,r);return Promise.all([b.call(this,r,o),x.call(this,r,o)]).then(function(t){a>=6&&(o.plugins=[h.bind(null,e),p].concat(t[0]),o.presets=t[1]);try{return r.transform(e.source,o).code+"\n//# sourceURL="+e.address+"!eval"}catch(t){if(t instanceof SyntaxError){var i=new SyntaxError(t.message),s=new n.StackTrace(t.message,[n.StackTrace.item("",e.address,t.loc.line,t.loc.column)]);return i.stack=s.toString(),Promise.reject(i)}return Promise.reject(t)}})}var v=__global,g="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||(v.traceur&&!n.has("traceur")&&n.set("traceur",t(n,"traceur")),v.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:m).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=v.System,o=v.Reflect.Loader;return __eval("(function(require,exports,module){"+e.source+"})();",v,e),v.System=a,v.Reflect.Loader=o,t(r,n(e.name))}}})};var b=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})}}(),y="es2015-no-commonjs",x=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})}}();e.prototype._getImportSpecifierPositionsPlugin=h}(__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,i=n;return s.test(r)?"http:"+r:(o&&(a=a.replace(/\\/g,"/")),a=e(a||""),i=e(i||""),a&&i?(a.protocol||i.protocol)+(a.protocol||a.authority?a.authority:i.authority)+t(a.protocol||a.authority||"/"===a.pathname.charAt(0)?a.pathname:a.pathname?(i.authority&&!i.pathname?"/":"")+i.pathname.slice(0,i.pathname.lastIndexOf("/")+1)+a.pathname:i.pathname)+(a.protocol||a.authority||a.pathname?a.search:a.search||i.search)+a.hash:null)}function r(e,t,n){if(void 0===n.getDependants)return i.resolve();var r=n.getDependants(t.name);if(Array.isArray(r)&&r.length){var a=n.StackTrace,o=n.isEnv("production");return i.resolve().then(function(){return o?i.resolve():n.import("@@babel-code-frame")}).then(function(i){var s=n.getModuleLoad(r[0]),l=n.getImportSpecifier(t.name,s)||{line:1,column:0},u="The module ["+n.prettyName(t)+"] couldn't be fetched.\nClicking the link in the stack trace below takes you to the import.\nSee https://stealjs.com/docs/StealJS.error-messages.html#404-not-found for more information.\n",c=e.message+"\n"+u;o||(c+="\n"+i(s.metadata.originalSource||s.source,l.line,l.column)+"\n"),e.message=c;var d=new a(c,[a.item(null,s.address,l.line,l.column)]);e.stack=d.toString()})}return i.resolve()}var a,o="undefined"!=typeof process&&!!process.platform.match(/^win/),i=__global.Promise||require("when/es6-shim/Promise"),s=/^\/\//;if("undefined"!=typeof XMLHttpRequest)a=function(e,t,n){function r(){t(o.responseText)}function a(){var t=o.status,r=t+" "+o.statusText+": "+e+"\n"||"XHR error",a=new Error(r);a.url=e,a.statusCode=t,n(a)}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,c,d=/ENOENT/;a=function(e,t,n){if("file:"===e.substr(0,5)){l=l||require("fs");var r=e.substr(5);return o&&(r=r.replace(/\//g,"\\")),l.readFile(r,function(r,a){if(r)return d.test(r.message)&&(r.statusCode=404,r.url=e),n(r);t(a+"")})}if("http"===e.substr(0,4)){return("https:"===e.substr(0,6)?c=c||require("https"):u=u||require("http")).get(e,function(e){if(200!==e.statusCode)n(new Error("Request failed. Status: "+e.statusCode));else{var r="";e.setEncoding("utf8"),e.on("data",function(e){r+=e}),e.on("end",function(){t(r)})}})}}}else{if("function"!=typeof fetch)throw new TypeError("No environment fetch API available.");a=function(e,t,n){fetch(e).then(function(e){return e.text()}).then(function(e){t(e)}).then(null,function(e){n(e)})}}var f=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()+"/",o&&(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 isBrowser?window:isWorker?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}if(!o)return e;var s=[],l=(t||"").split("/");l.length;return s=s.concat(l.splice(0,l.length-1-i)),(s=s.concat(r.splice(a,r.length-a))).join("/")},enumerable:!1,writable:!0}),$__Object$defineProperty(t.prototype,"locate",{value:function(e){var t,r=e.name,a="";for(var o in this.paths){var i=o.split("*");if(i.length>2)throw new TypeError("Only one wildcard in a path is permitted");if(1==i.length){if(r==o&&o.length>a.length){a=o;break}}else r.substr(0,i[0].length)==i[0]&&r.substr(r.length-i[1].length)==i[1]&&(a=o,t=r.substr(i[0].length,r.length-i[1].length-i[0].length))}var s=this.paths[a];return t&&(s=s.replace("*",t)),isBrowser&&(s=s.replace(/#/g,"%23")),n(this.baseURL,s)},enumerable:!1,writable:!0}),$__Object$defineProperty(t.prototype,"fetch",{value:function(e){var t=this;return new i(function(o,i){a(n(t.baseURL,e.address),function(e){o(e)},function(n){var a=i.bind(null,n);r(n,e,t).then(a,a)})})},enumerable:!1,writable:!0}),t}(__global.LoaderPolyfill));"object"==typeof exports&&(module.exports=f),__global.System=f}()}("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<r;n++)e[n](t)}var n=e.import;e.import=function(e,t){return n.call(this,e,t).then(function(e){return e.__useDefault?e.default:e})};var a={};Object.defineProperty(a,"__esModule",{enumerable:!1,configurable:!0,writable:!1,value:!0}),e.set("@empty",e.newModule(a)),"undefined"!=typeof require&&(e._nodeRequire=require),e.config=function(e){for(var t in e){var n=e[t];if("object"!=typeof n||n instanceof Array)this[t]=n;else{this[t]=this[t]||{};for(var r in n)this[t][r]=n[r]}}};var o;if("undefined"==typeof window&&"undefined"==typeof WorkerGlobalScope)o="file:"+process.cwd()+"/",x&&(o=o.replace(/\\/g,"/"));else if("undefined"==typeof window)o=e.global.location.href;else if(!(o=document.baseURI)){var i=document.getElementsByTagName("base");o=i[0]&&i[0].href||window.location.href}var l,u=e.locate;e.locate=function(e){return this.baseURL!=l&&("/"!=(l=r(o,this.baseURL)).substr(l.length-1,1)&&(l+="/"),this.baseURL=l),Promise.resolve(u.call(this,e))},e._getLineAndColumnFromPosition=function(e,t){for(var n,r=(t||0)+1,a=0,o=1,i=0,s=e.length;r&&a<s&&(n=e[a],r!==a);)"\n"!==n?(i++,a++):(a++,o++,i=0);return{line:o,column:i}},e._extensions=e._extensions||[],e._extensions.push(s),e.clone=function(){var e=this,n=new LoaderPolyfill(j);return n.baseURL=e.baseURL,n.paths={"*":"*.js"},t(e._extensions,n),n}}function l(e){function t(e,t){var n=e.meta&&e.meta[t.name];if(n)for(var r in n)t.metadata[r]=t.metadata[r]||n[r]}var n=/^(\s*\/\*.*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)+/,r=/\/\*.*\*\/|\/\/[^\n]*|"[^"]+"\s*;?|'[^']+'\s*;?/g;e.meta={},e._extensions=e._extensions||[],e._extensions.push(l);var a=e.locate;e.locate=function(e){return t(this,e),a.call(this,e)};var o=e.translate;e.translate=function(e){var a=e.source.match(n);if(a)for(var i=a[0].match(r),s=0;s<i.length;s++){var l=i[s].length,u=i[s].substr(0,1);if(";"==i[s].substr(l-1,1)&&l--,'"'==u||"'"==u){var c=i[s].substr(1,i[s].length-3),d=c.substr(0,c.indexOf(" "));if(d){var f=c.substr(d.length+1,c.length-d.length-1);e.metadata[d]instanceof Array?e.metadata[d].push(f):e.metadata[d]||(e.metadata[d]=f)}}}return t(this,e),o.call(this,e)}}function u(e){function t(e,t){var a,o=this,i=t,s=e.source.lastIndexOf("\n");-1!=s&&"//# sourceMappingURL="==e.source.substr(s+1,21)&&(a=e.source.substr(s+22,e.source.length-s-22),void 0!==r&&(a=r(e.address,a)));var l=e.metadata&&e.metadata.eval;i=i||o.global,n(e.source,e.address,i,a,l)}function o(e){for(var t=[],n=0,r=e.length;n<r;n++)-1==y.call(t,e[n])&&t.push(e[n]);return t}function i(t,n,r,a){var o=t,i=n,s=r,l=a;"string"!=typeof o&&(l=s,s=i,i=o,o=null),g=!0;var u;if(u="boolean"==typeof s?{declarative:!1,deps:i,execute:l,executingRequire:s}:{declarative:!0,deps:i,declare:s},o)u.name=o,o in e.defined||(e.defined[o]=u);else if(u.declarative){if(v)throw new TypeError("Multiple anonymous System.register calls in the same module file.");v=u}}function s(e){if(!e.register){e.register=i,e.defined||(e.defined={});var t=e.onScriptLoad;e.onScriptLoad=function(e){t(e),v&&(e.metadata.entry=v),g&&(e.metadata.format=e.metadata.format||"register",e.metadata.registered=!0)}}}function l(e,t,n){if(n[e.groupIndex]=n[e.groupIndex]||[],-1==y.call(n[e.groupIndex],e)){n[e.groupIndex].push(e);for(var r=0,a=e.normalizedDeps.length;r<a;r++){var o=e.normalizedDeps[r],i=t.defined[o];if(i&&!i.evaluated){var s=e.groupIndex+(i.declarative!=e.declarative);if(void 0===i.groupIndex||i.groupIndex<s){if(void 0!==i.groupIndex&&(n[i.groupIndex].splice(y.call(n[i.groupIndex],i),1),0==n[i.groupIndex].length))throw new TypeError("Mixed dependency cycle detected");i.groupIndex=s}l(i,t,n)}}}}function c(e,t){var n=t.defined[e];if(!n.module){n.groupIndex=0;var r=[];l(n,t,r);for(var a=!!n.declarative==r.length%2,o=r.length-1;o>=0;o--){for(var i=r[o],s=0;s<i.length;s++){var u=i[s];a?f(u,t):h(u,t)}a=!a}}}function d(e){return x[e]||(x[e]={name:e,dependencies:[],exports:{},importers:[]})}function f(e,t){if(!e.module){var n=e.module=d(e.name),r=e.module.exports,a=e.declare.call(t.global,function(e,t){n.locked=!0,r[e]=t;for(var a=0,o=n.importers.length;a<o;a++){var i=n.importers[a];if(!i.locked){var s=y.call(i.dependencies,n);i.setters[s](r)}}return n.locked=!1,t});if(n.setters=a.setters,n.execute=a.execute,!n.setters||!n.execute)throw new TypeError("Invalid System.register form for "+e.name);for(var o=0,i=e.normalizedDeps.length;o<i;o++){var s,l=e.normalizedDeps[o],u=t.defined[l],c=x[l];c?s=c.exports:u&&!u.declarative?s=u.module.exports&&u.module.exports.__esModule?u.module.exports:u.esModule:u?(f(u,t),s=(c=u.module).exports):s=t.get(l),c&&c.importers?(c.importers.push(n),n.dependencies.push(c)):n.dependencies.push(null),n.setters[o]&&n.setters[o](s)}}}function p(e,t){var n,r=t.defined[e];if(r)r.declarative?m(e,[],t):r.evaluated||h(r,t),n=r.module.exports;else if(!(n=t.get(e)))throw new Error("Unable to load dependency "+e+".");return(!r||r.declarative)&&n&&n.__useDefault?n.default:n}function h(e,t){if(!e.module){var n={};e.isESModule&&Object.defineProperty(n,"__esModule",{value:!0});var r=e.module={exports:n,id:e.name};if(!e.executingRequire)for(var o=0,i=e.normalizedDeps.length;o<i;o++){var s=e.normalizedDeps[o],l=t.defined[s];l&&h(l,t)}e.evaluated=!0;var u=e.execute.call(t.global,function(n){for(var r=0,a=e.deps.length;r<a;r++)if(e.deps[r]==n)return p(e.normalizedDeps[r],t);throw new TypeError("Module "+n+" not declared as a dependency.")},n,r);u&&(r.exports=u),(n=r.exports)&&(n.__esModule||n instanceof _)?e.esModule=n:e.esmExports?n===t.global?e.esModule={default:n,__useDefault:!0}:e.esModule=a(n):e.esModule={default:n}}}function m(e,t,n){var r=n.defined[e];if(r&&!r.evaluated&&r.declarative){t.push(e);for(var a=0,o=r.normalizedDeps.length;a<o;a++){var i=r.normalizedDeps[a];-1==y.call(t,i)&&(n.defined[i]?m(i,t,n):n.get(i))}r.evaluated||(r.evaluated=!0,r.module.execute.call(n.global))}}void 0===y&&(y=Array.prototype.indexOf),(void 0===n||"undefined"!=typeof document&&!document.addEventListener)&&(n=eval),e._extensions=e._extensions||[],e._extensions.push(u);e.__exec=t;var v,g;s(e);var x={},_=e.newModule({}).constructor,w=/\bSystem\.register\b/,j=e.fetch;e.fetch=function(e){var t=this;return s(t),t.defined[e.name]?(e.metadata.format="defined",""):(v=null,g=!1,j.call(t,e))};var S=e.translate;e.translate=function(e){return this.register=i,this.__exec=t,e.metadata.deps=e.metadata.deps||[],Promise.resolve(S.call(this,e)).then(function(t){return(e.metadata.init||e.metadata.exports)&&(e.metadata.format=e.metadata.format||"global"),("register"==e.metadata.format||!e.metadata.format&&e.source.match(w))&&(e.metadata.format="register"),t})};var E=e.instantiate;e.instantiate=function(e){var t,n=this;if(n.defined[e.name])(t=n.defined[e.name]).deps=t.deps.concat(e.metadata.deps);else if(e.metadata.entry)t=e.metadata.entry;else if(e.metadata.execute)t={declarative:!1,deps:e.metadata.deps||[],esModule:null,execute:e.metadata.execute,executingRequire:e.metadata.executingRequire};else if("register"==e.metadata.format){v=null,g=!1;var r=n.global.System;if(n.global.System=n,n.__exec(e),n.global.System=r,v&&(t=v),!t&&b.defined[e.name]&&(t=b.defined[e.name]),!g&&!e.metadata.registered)throw new TypeError(e.name+" detected as System.register but didn't execute.")}if(!t&&"es6"!=e.metadata.format)return{deps:e.metadata.deps,execute:function(){return n.newModule({})}};if(!t)return E.call(this,e);n.defined[e.name]=t,t.deps=o(t.deps),t.name=e.name,t.esmExports=!1!==e.metadata.esmExports;for(var a=[],i=0,s=t.deps.length;i<s;i++)a.push(Promise.resolve(n.normalize(t.deps[i],e.name)));return Promise.all(a).then(function(r){return t.normalizedDeps=r,{deps:t.deps,execute:function(){c(e.name,n),m(e.name,[],n),n.defined[e.name]=void 0;var r=t.module.exports;return t.declarative||(r=t.esModule),n.newModule(r)}}})}}function c(e){function t(e,t,n){if(e.meta[t]={format:"global"},f&&!e.paths[t])try{e.paths[t]=require.resolve(n||t)}catch(e){}}function n(e){return e.replace(i,'""').replace(s,"$1").match(o)}e._extensions.push(c);var r,a,o=/(^\s*|[}\);\n]\s*)(import\s+(['"]|(\*\s+as\s+)?[^"'\(\)\n;]+\s+from\s+['"]|\{)|export\s+\*\s+from\s+["']|export\s+(\{|default|function|class|var|const|let|async\s+function))/,i=/["'].*["']/g,s=/\/\*[\s\S]*?\*\/|([^:]|^)\/\/.*$/gm,l=/\$traceurRuntime\s*\./,u=/babelHelpers\s*\./,d=!0,f="undefined"!=typeof process&&"undefined"!=typeof require&&require.resolve,p=e.locate;e.locate=function(e){var n=this;return d&&("traceur"==n.transpiler?(t(n,"traceur","traceur/bin/traceur.js"),n.meta.traceur.exports="traceur",t(n,"traceur-runtime","traceur/bin/traceur-runtime.js")):"babel"==n.transpiler&&t(n,"babel","babel-standalone/babel.js"),d=!1),p.call(n,e)};var h=e.translate;e.translate=function(e){var t=this;return h.call(t,e).then(function(o){if("es6"==e.metadata.format||!e.metadata.format&&n(o))return e.metadata.format="es6",o;if("register"==e.metadata.format){if(!t.global.$traceurRuntime&&e.source.match(l))return t.import("traceur-runtime").then(function(){return o});if(!t.global.babelHelpers&&e.source.match(u))return t.import("babel/external-helpers").then(function(){return o})}return"traceur"==t.transpiler?Promise.all([r||(r=t.normalize(t.transpiler)),a||(a=t.normalize(t.transpiler+"-runtime"))]).then(function(t){return e.name==t[0]||e.name==t[1]?"(function() { var curSystem = System; "+o+"\nSystem = curSystem; })();":o}):o})}}function d(e){function t(e,t){for(var n=e.split("."),r=t;n.length;)r=r[n.shift()];return r}function n(e){function n(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n]]=!0;return t}if(!e.has("@@global-helpers")){var r,a,o=e.global.hasOwnProperty,i={};e.set("@@global-helpers",e.newModule({prepareGlobal:function(t,s,l){var u,c,d=t,f=s,p=l;if("object"==typeof d){var h=d;f=h.deps,u=h.globals,p=h.exportName,d=h.moduleName,c=h.require}if(f)for(var m=0;m<f.length;m++){var v=i[f[m]];if(v)for(var g in v)e.global[g]=v[g]}if(u&&c)for(var b in u)e.global[b]=c(u[b]);if(!p&&!1!==p&&!1!==e.inferGlobals){r={},a=n(["indexedDB","sessionStorage","localStorage","clipboardData","frames","webkitStorageInfo","toolbar","statusbar","scrollbars","personalbar","menubar","locationbar","webkitIndexedDB","screenTop","screenLeft"]);for(var y in e.global)if(!a[y]&&(!o||e.global.hasOwnProperty(y)))try{r[y]=e.global[y]}catch(e){a[y]=!0}}},retrieveGlobal:function(n,s,l){var u,c,d={};if(l)u=l.call(e.global);else if(s){var f=s.split(".")[0];u=t(s,e.global),d[f]=e.global[f]}else if(!1!==s&&!1!==e.inferGlobals)for(var p in e.global)a[p]||o&&!e.global.hasOwnProperty(p)||p==e.global||r[p]==e.global[p]||(d[p]=e.global[p],u?u!==e.global[p]&&(c=!0):void 0===u&&(u=e.global[p]));return i[n]=d,c?d:u}}))}}e._extensions.push(d),n(e);var r=e.instantiate;e.instantiate=function(e){var t=this;n(t);var a=e.metadata.exports;if(e.metadata.format||(e.metadata.format="global"),e.metadata.globals)for(var o in e.metadata.globals)e.metadata.deps.push(e.metadata.globals[o]);return"global"==e.metadata.format&&(e.metadata.execute=function(n,r,o){t.get("@@global-helpers").prepareGlobal({require:n,moduleName:o.id,exportName:a,deps:e.metadata.deps,globals:e.metadata.globals}),a&&(e.source+='\nthis["'+a+'"] = '+a+";");var i=t.global.define,n=t.global.require;return t.global.define=void 0,t.global.module=void 0,t.global.exports=void 0,t.__exec(e,t.global),t.global.require=n,t.global.define=i,t.get("@@global-helpers").retrieveGlobal(o.id,a,e.metadata.init)}),r.call(t,e)}}function f(e){function t(e){function t(e,t){for(var n=0;n<e.length;n++)if(e[n][0]<t.index&&e[n][1]>t.index)return!0;return!1}a.lastIndex=o.lastIndex=i.lastIndex=0;var n,r=[],s={},l=[],u=[];if(e.length/e.split("\n").length<200){for(;n=i.exec(e);)l.push([n.index,n.index+n[0].length]);for(;n=o.exec(e);)t(l,n)||u.push([n.index,n.index+n[0].length])}for(;n=a