Comparing version 6.1.2 to 6.1.3
@@ -0,1 +1,10 @@ | ||
SystemJS 6.3.1 (2019/10/06) | ||
* Fix relative resolution of LHS URLs in import maps (https://github.com/systemjs/systemjs/pull/2039) | ||
* Fix named register extra to extend rather than reinstantiate the SystemJS instance (https://github.com/systemjs/systemjs/pull/2042) | ||
* Update extras to extend the global System instance explicitly (https://github.com/systemjs/systemjs/pull/2043) | ||
SystemJS 6.1.2 (2019/09/22) | ||
* Bug fix for named AMD modules (https://github.com/systemjs/systemjs/pull/2029) | ||
* Bug fix for IE11 regression bug (https://github.com/systemjs/systemjs/pull/2033) | ||
SystemJS 6.1.1 (2019/09/13) | ||
@@ -2,0 +11,0 @@ * Fixes a bug where imports before the import map load might not apply the import map (https://github.com/systemjs/systemjs/issues/2024, @joeldenning) |
@@ -5,3 +5,3 @@ /* | ||
(function (global) { | ||
const systemPrototype = System.constructor.prototype; | ||
const systemPrototype = global.System.constructor.prototype; | ||
@@ -132,2 +132,2 @@ const emptyInstantiation = [[], function () { return {} }]; | ||
global.define.amd = {}; | ||
})(typeof self !== 'undefined' ? self : global); | ||
})(typeof self !== 'undefined' ? self : global); |
@@ -1,1 +0,1 @@ | ||
!function(t){const e=System.constructor.prototype,n=[[],function(){return{}}];function r(){throw Error("AMD require not supported.")}function s(){}const o=["require","exports","module"];function i(t,e){const n={},s={exports:n},o=[],i=[];let u=0;for(let e=0;e<t.length;e++){const f=t[e],c=i.length;if("require"===f)o[e]=r,u++;else if("module"===f)o[e]=s,u++;else if("exports"===f)o[e]=n,u++;else{const t=e;i.push(function(e){o[t]=e.__useDefault?e.default:e})}u&&(t[c]=f)}u&&(t.length-=u);const f=e;return[t,function(t){return t({default:n,__useDefault:!0}),{setters:i,execute:function(){s.exports=f.apply(n,o)||s.exports,n!==s.exports&&t("default",s.exports)}}}]}let u;const f=e.register;e.register=function(t,e,n){u="string"==typeof t?n:e,f.apply(this,arguments)};const c=e.instantiate;e.instantiate=function(){return p=null,c.apply(this,arguments)};const l=e.getRegister;let p,g;e.getRegister=function(){const t=l.call(this);if(t&&t[1]===u)return t;if(!p)return t||n;const e=i(p,g);return p=null,e},t.define=function(t,e,n){if("string"==typeof t){if(p){if(!System.registerRegistry)throw Error("Include the named register extension for SystemJS named AMD support.");return System.registerRegistry[t]=i(e,n),p=[],void(g=s)}System.registerRegistry&&(System.registerRegistry[t]=i([].concat(e),n)),t=e,e=n}t instanceof Array?(p=t,g=e):"object"==typeof t?(p=[],g=function(){return t}):"function"==typeof t&&(p=o,g=t)},t.define.amd={}}("undefined"!=typeof self?self:global); | ||
!function(t){const e=t.System.constructor.prototype,n=[[],function(){return{}}];function r(){throw Error("AMD require not supported.")}function s(){}const o=["require","exports","module"];function i(t,e){const n={},s={exports:n},o=[],i=[];let u=0;for(let e=0;e<t.length;e++){const f=t[e],c=i.length;if("require"===f)o[e]=r,u++;else if("module"===f)o[e]=s,u++;else if("exports"===f)o[e]=n,u++;else{const t=e;i.push(function(e){o[t]=e.__useDefault?e.default:e})}u&&(t[c]=f)}u&&(t.length-=u);const f=e;return[t,function(t){return t({default:n,__useDefault:!0}),{setters:i,execute:function(){s.exports=f.apply(n,o)||s.exports,n!==s.exports&&t("default",s.exports)}}}]}let u;const f=e.register;e.register=function(t,e,n){u="string"==typeof t?n:e,f.apply(this,arguments)};const c=e.instantiate;e.instantiate=function(){return p=null,c.apply(this,arguments)};const l=e.getRegister;let p,g;e.getRegister=function(){const t=l.call(this);if(t&&t[1]===u)return t;if(!p)return t||n;const e=i(p,g);return p=null,e},t.define=function(t,e,n){if("string"==typeof t){if(p){if(!System.registerRegistry)throw Error("Include the named register extension for SystemJS named AMD support.");return System.registerRegistry[t]=i(e,n),p=[],void(g=s)}System.registerRegistry&&(System.registerRegistry[t]=i([].concat(e),n)),t=e,e=n}t instanceof Array?(p=t,g=e):"object"==typeof t?(p=[],g=function(){return t}):"function"==typeof t&&(p=o,g=t)},t.define.amd={}}("undefined"!=typeof self?self:global); |
@@ -7,79 +7,77 @@ /* | ||
(function (global) { | ||
const systemJSPrototype = global.System.constructor.prototype; | ||
const systemJSPrototype = System.constructor.prototype; | ||
// safari unpredictably lists some new globals first or second in object order | ||
let firstGlobalProp, secondGlobalProp, lastGlobalProp; | ||
function getGlobalProp () { | ||
let cnt = 0; | ||
let lastProp; | ||
for (let p in global) { | ||
// do not check frames cause it could be removed during import | ||
if (!global.hasOwnProperty(p) || (!isNaN(p) && p < global.length)) | ||
continue; | ||
if (cnt === 0 && p !== firstGlobalProp || cnt === 1 && p !== secondGlobalProp) | ||
return p; | ||
cnt++; | ||
lastProp = p; | ||
// safari unpredictably lists some new globals first or second in object order | ||
let firstGlobalProp, secondGlobalProp, lastGlobalProp; | ||
function getGlobalProp () { | ||
let cnt = 0; | ||
let lastProp; | ||
for (let p in global) { | ||
// do not check frames cause it could be removed during import | ||
if (!global.hasOwnProperty(p) || (!isNaN(p) && p < global.length)) | ||
continue; | ||
if (cnt === 0 && p !== firstGlobalProp || cnt === 1 && p !== secondGlobalProp) | ||
return p; | ||
cnt++; | ||
lastProp = p; | ||
} | ||
if (lastProp !== lastGlobalProp) | ||
return lastProp; | ||
} | ||
if (lastProp !== lastGlobalProp) | ||
return lastProp; | ||
} | ||
function noteGlobalProps () { | ||
// alternatively Object.keys(global).pop() | ||
// but this may be faster (pending benchmarks) | ||
firstGlobalProp = secondGlobalProp = undefined; | ||
for (let p in global) { | ||
// do not check frames cause it could be removed during import | ||
if (!global.hasOwnProperty(p) || (!isNaN(p) && p < global.length)) | ||
continue; | ||
if (!firstGlobalProp) | ||
firstGlobalProp = p; | ||
else if (!secondGlobalProp) | ||
secondGlobalProp = p; | ||
lastGlobalProp = p; | ||
function noteGlobalProps () { | ||
// alternatively Object.keys(global).pop() | ||
// but this may be faster (pending benchmarks) | ||
firstGlobalProp = secondGlobalProp = undefined; | ||
for (let p in global) { | ||
// do not check frames cause it could be removed during import | ||
if (!global.hasOwnProperty(p) || (!isNaN(p) && p < global.length)) | ||
continue; | ||
if (!firstGlobalProp) | ||
firstGlobalProp = p; | ||
else if (!secondGlobalProp) | ||
secondGlobalProp = p; | ||
lastGlobalProp = p; | ||
} | ||
return lastGlobalProp; | ||
} | ||
return lastGlobalProp; | ||
} | ||
const impt = systemJSPrototype.import; | ||
systemJSPrototype.import = function (id, parentUrl) { | ||
noteGlobalProps(); | ||
return impt.call(this, id, parentUrl); | ||
}; | ||
const impt = systemJSPrototype.import; | ||
systemJSPrototype.import = function (id, parentUrl) { | ||
noteGlobalProps(); | ||
return impt.call(this, id, parentUrl); | ||
}; | ||
const emptyInstantiation = [[], function () { return {} }]; | ||
const emptyInstantiation = [[], function () { return {} }]; | ||
const getRegister = systemJSPrototype.getRegister; | ||
systemJSPrototype.getRegister = function () { | ||
const lastRegister = getRegister.call(this); | ||
if (lastRegister) | ||
return lastRegister; | ||
// no registration -> attempt a global detection as difference from snapshot | ||
// when multiple globals, we take the global value to be the last defined new global object property | ||
// for performance, this will not support multi-version / global collisions as previous SystemJS versions did | ||
// note in Edge, deleting and re-adding a global does not change its ordering | ||
const globalProp = getGlobalProp(); | ||
if (!globalProp) | ||
return emptyInstantiation; | ||
let globalExport; | ||
try { | ||
globalExport = global[globalProp]; | ||
} | ||
catch (e) { | ||
return emptyInstantiation; | ||
} | ||
const getRegister = systemJSPrototype.getRegister; | ||
systemJSPrototype.getRegister = function () { | ||
const lastRegister = getRegister.call(this); | ||
if (lastRegister) | ||
return lastRegister; | ||
// no registration -> attempt a global detection as difference from snapshot | ||
// when multiple globals, we take the global value to be the last defined new global object property | ||
// for performance, this will not support multi-version / global collisions as previous SystemJS versions did | ||
// note in Edge, deleting and re-adding a global does not change its ordering | ||
const globalProp = getGlobalProp(); | ||
if (!globalProp) | ||
return emptyInstantiation; | ||
let globalExport; | ||
try { | ||
globalExport = global[globalProp]; | ||
} | ||
catch (e) { | ||
return emptyInstantiation; | ||
} | ||
return [[], function (_export) { | ||
return { | ||
execute: function () { | ||
_export({ default: globalExport, __useDefault: true }); | ||
} | ||
}; | ||
}]; | ||
}; | ||
return [[], function (_export) { | ||
return { | ||
execute: function () { | ||
_export({ default: globalExport, __useDefault: true }); | ||
} | ||
}; | ||
}]; | ||
}; | ||
})(typeof self !== 'undefined' ? self : global); |
@@ -1,1 +0,1 @@ | ||
!function(t){const n=System.constructor.prototype;let e,r,o;const i=n.import;n.import=function(n,u){return function(){e=r=void 0;for(let n in t)!t.hasOwnProperty(n)||!isNaN(n)&&n<t.length||(e?r||(r=n):e=n,o=n)}(),i.call(this,n,u)};const u=[[],function(){return{}}],f=n.getRegister;n.getRegister=function(){const n=f.call(this);if(n)return n;const i=function(){let n,i=0;for(let o in t)if(!(!t.hasOwnProperty(o)||!isNaN(o)&&o<t.length)){if(0===i&&o!==e||1===i&&o!==r)return o;i++,n=o}if(n!==o)return n}();if(!i)return u;let c;try{c=t[i]}catch(t){return u}return[[],function(t){return{execute:function(){t({default:c,__useDefault:!0})}}}]}}("undefined"!=typeof self?self:global); | ||
!function(t){const n=t.System.constructor.prototype;let e,r,o;const i=n.import;n.import=function(n,u){return function(){e=r=void 0;for(let n in t)!t.hasOwnProperty(n)||!isNaN(n)&&n<t.length||(e?r||(r=n):e=n,o=n)}(),i.call(this,n,u)};const u=[[],function(){return{}}],f=n.getRegister;n.getRegister=function(){const n=f.call(this);if(n)return n;const i=function(){let n,i=0;for(let o in t)if(!(!t.hasOwnProperty(o)||!isNaN(o)&&o<t.length)){if(0===i&&o!==e||1===i&&o!==r)return o;i++,n=o}if(n!==o)return n}();if(!i)return u;let c;try{c=t[i]}catch(t){return u}return[[],function(t){return{execute:function(){t({default:c,__useDefault:!0})}}}]}}("undefined"!=typeof self?self:global); |
@@ -5,7 +5,7 @@ /* | ||
*/ | ||
(function() { | ||
const systemPrototype = System.constructor.prototype; | ||
const instantiate = systemPrototype.instantiate; | ||
(function(global) { | ||
const systemJSPrototype = global.System.constructor.prototype; | ||
const instantiate = systemJSPrototype.instantiate; | ||
systemPrototype.instantiate = function (url, parent) { | ||
systemJSPrototype.instantiate = function (url, parent) { | ||
const loader = this; | ||
@@ -96,2 +96,2 @@ const ext = url.slice(url.lastIndexOf('.')); | ||
}; | ||
})(); | ||
})(typeof self !== 'undefined' ? self : global); |
@@ -1,1 +0,1 @@ | ||
!function(){const t=System.constructor.prototype,e=t.instantiate;t.instantiate=function(t,n){const r=this;switch(t.slice(t.lastIndexOf("."))){case".css":return o(function(t,e){const n=new CSSStyleSheet;n.replaceSync(e),t("default",n)});case".html":return u().then(function(t){return s(t)||c("'.html' modules not implemented")});case".json":return o(function(t,e){t("default",JSON.parse(e))});case".wasm":return u().then(function(t){return s(t)||(WebAssembly.compileStreaming?WebAssembly.compileStreaming(t):t.arrayBuffer().then(WebAssembly.compile))}).then(function(t){const e=[],n=[],r={};return WebAssembly.Module.imports&&WebAssembly.Module.imports(t).forEach(function(t){const u=t.module;-1===e.indexOf(u)&&(e.push(u),n.push(function(t){r[u]=t}))}),[e,function(e){return{setters:n,execute:function(){return WebAssembly.instantiate(t,r).then(function(t){e(t.exports)})}}}]})}return e.apply(this,arguments);function u(){return fetch(t).then(function(t){return t.ok||c(t.status+" "+t.statusText),t})}function s(t){const e=t.headers.get("content-type");if(e&&e.match(/^application\/javascript(;|$)/))return t.text().then(function(t){return(0,eval)(t),r.getRegister()})}function o(t){return u().then(function(e){return s(e)||e.text().then(function(e){return[[],function(n){return{execute:t(n,e)}}]})})}function c(e){throw Error(e+", loading "+t+(n?" from "+n:""))}}}(); | ||
!function(t){const e=t.System.constructor.prototype,n=e.instantiate;e.instantiate=function(t,e){const r=this;switch(t.slice(t.lastIndexOf("."))){case".css":return o(function(t,e){const n=new CSSStyleSheet;n.replaceSync(e),t("default",n)});case".html":return s().then(function(t){return u(t)||c("'.html' modules not implemented")});case".json":return o(function(t,e){t("default",JSON.parse(e))});case".wasm":return s().then(function(t){return u(t)||(WebAssembly.compileStreaming?WebAssembly.compileStreaming(t):t.arrayBuffer().then(WebAssembly.compile))}).then(function(t){const e=[],n=[],r={};return WebAssembly.Module.imports&&WebAssembly.Module.imports(t).forEach(function(t){const s=t.module;-1===e.indexOf(s)&&(e.push(s),n.push(function(t){r[s]=t}))}),[e,function(e){return{setters:n,execute:function(){return WebAssembly.instantiate(t,r).then(function(t){e(t.exports)})}}}]})}return n.apply(this,arguments);function s(){return fetch(t).then(function(t){return t.ok||c(t.status+" "+t.statusText),t})}function u(t){const e=t.headers.get("content-type");if(e&&e.match(/^application\/javascript(;|$)/))return t.text().then(function(t){return(0,eval)(t),r.getRegister()})}function o(t){return s().then(function(e){return u(e)||e.text().then(function(e){return[[],function(n){return{execute:t(n,e)}}]})})}function c(n){throw Error(n+", loading "+t+(e?" from "+e:""))}}}("undefined"!=typeof self?self:global); |
/* | ||
* Named exports support for legacy module formats in SystemJS 2.0 | ||
*/ | ||
(function () { | ||
const systemPrototype = System.constructor.prototype; | ||
(function (global) { | ||
const systemJSPrototype = global.System.constructor.prototype; | ||
// hook System.register to know the last declaration binding | ||
let lastRegisterDeclare; | ||
const systemRegister = systemPrototype.register; | ||
systemPrototype.register = function (name, deps, declare) { | ||
const systemRegister = systemJSPrototype.register; | ||
systemJSPrototype.register = function (name, deps, declare) { | ||
lastRegisterDeclare = typeof name === 'string' ? declare : deps; | ||
@@ -15,4 +15,4 @@ systemRegister.apply(this, arguments); | ||
const getRegister = systemPrototype.getRegister; | ||
systemPrototype.getRegister = function () { | ||
const getRegister = systemJSPrototype.getRegister; | ||
systemJSPrototype.getRegister = function () { | ||
const register = getRegister.call(this); | ||
@@ -58,2 +58,2 @@ // if it is an actual System.register call, then its ESM | ||
}; | ||
})(); | ||
})(typeof self !== 'undefined' ? self : global); |
@@ -1,1 +0,1 @@ | ||
!function(){const t=System.constructor.prototype;let e;const n=t.register;t.register=function(t,o,c){e="string"==typeof t?c:o,n.apply(this,arguments)};const o=t.getRegister;t.getRegister=function(){const t=o.call(this);if(!t||t[1]===e||0===t[1].length)return t;const n=t[1];return t[1]=function(t,e){let o,c=!1;const s=n.call(this,function(e,n){"object"==typeof e&&e.__useDefault?(o=e.default,c=!0):"default"===e?o=n:"__useDefault"===e&&(c=!0),t(e,n)},e),u=s.execute;return u&&(s.execute=function(){if(u.call(this),c&&"object"==typeof o)for(let e in o)"default"!==e&&t(e,o[e])}),s},t}}(); | ||
!function(t){const e=t.System.constructor.prototype;let n;const o=e.register;e.register=function(t,e,c){n="string"==typeof t?c:e,o.apply(this,arguments)};const c=e.getRegister;e.getRegister=function(){const t=c.call(this);if(!t||t[1]===n||0===t[1].length)return t;const e=t[1];return t[1]=function(t,n){let o,c=!1;const f=e.call(this,function(e,n){"object"==typeof e&&e.__useDefault?(o=e.default,c=!0):"default"===e?o=n:"__useDefault"===e&&(c=!0),t(e,n)},n),s=f.execute;return s&&(f.execute=function(){if(s.call(this),c&&"object"==typeof o)for(let e in o)"default"!==e&&t(e,o[e])}),f},t}}("undefined"!=typeof self?self:global); |
@@ -8,12 +8,13 @@ /* | ||
*/ | ||
(function () { | ||
(function (global) { | ||
const System = global.System; | ||
setRegisterRegistry(System); | ||
const systemJSPrototype = System.constructor.prototype; | ||
const constructor = System.constructor; | ||
const SystemJS = function () { | ||
constructor.call(this); | ||
this.registerRegistry = Object.create(null); | ||
setRegisterRegistry(this); | ||
}; | ||
SystemJS.prototype = systemJSPrototype; | ||
System = new SystemJS(); | ||
System.constructor = SystemJS; | ||
@@ -26,2 +27,6 @@ let firstNamedDefine; | ||
function setRegisterRegistry(systemInstance) { | ||
systemInstance.registerRegistry = Object.create(null); | ||
} | ||
const register = systemJSPrototype.register; | ||
@@ -58,2 +63,2 @@ systemJSPrototype.register = function (name, deps, declare) { | ||
} | ||
})(); | ||
})(typeof self !== 'undefined' ? self : global); |
@@ -1,1 +0,1 @@ | ||
!function(){const t=System.constructor.prototype,e=System.constructor,s=function(){e.call(this),this.registerRegistry=Object.create(null)};let i;function r(){i=null}s.prototype=t,System=new s;const n=t.register;t.register=function(t,e,s){if("string"!=typeof t)return n.apply(this,arguments);const o=[e,s];return this.registerRegistry[t]=o,i||(i=o,setTimeout(r,0)),n.apply(this,arguments)};const o=t.resolve;t.resolve=function(t,e){return"/"===t[0]||"."===t[0]&&("/"===t[1]||"."===t[1]&&"/"===t[2])?o.call(this,t,e):t in this.registerRegistry?t:o.call(this,t,e)};const c=t.instantiate;t.instantiate=function(t,e){return this.registerRegistry[t]||c.call(this,t,e)};const l=t.getRegister;t.getRegister=function(){return i||l.call(this)}}(); | ||
!function(t){const e=t.System;c(e);const s=e.constructor.prototype,n=e.constructor,i=function(){n.call(this),c(this)};let r;function o(){r=null}function c(t){t.registerRegistry=Object.create(null)}i.prototype=s,e.constructor=i;const l=s.register;s.register=function(t,e,s){if("string"!=typeof t)return l.apply(this,arguments);const n=[e,s];return this.registerRegistry[t]=n,r||(r=n,setTimeout(o,0)),l.apply(this,arguments)};const u=s.resolve;s.resolve=function(t,e){return"/"===t[0]||"."===t[0]&&("/"===t[1]||"."===t[1]&&"/"===t[2])?u.call(this,t,e):t in this.registerRegistry?t:u.call(this,t,e)};const g=s.instantiate;s.instantiate=function(t,e){return this.registerRegistry[t]||g.call(this,t,e)};const f=s.getRegister;s.getRegister=function(){return r||f.call(this)}}("undefined"!=typeof self?self:global); |
/* | ||
* Support for a "transform" loader interface | ||
*/ | ||
(function () { | ||
const systemJSPrototype = System.constructor.prototype; | ||
(function (global) { | ||
const systemJSPrototype = global.System.constructor.prototype; | ||
@@ -32,2 +32,2 @@ const instantiate = systemJSPrototype.instantiate; | ||
}; | ||
})(); | ||
})(typeof self !== 'undefined' ? self : global); |
@@ -1,1 +0,1 @@ | ||
!function(){const t=System.constructor.prototype,n=t.instantiate;t.instantiate=function(t,r){if(".wasm"===t.slice(-5))return n.call(this,t,r);const e=this;return fetch(t,{credentials:"same-origin"}).then(function(t){if(!t.ok)throw Error("Fetch error: "+t.status+" "+t.statusText+(r?" loading from "+r:""));return t.text()}).then(function(n){return e.transform.call(this,t,n)}).then(function(n){return(0,eval)(n+"\n//# sourceURL="+t),e.getRegister()})},t.transform=function(t,n){return n}}(); | ||
!function(t){const n=t.System.constructor.prototype,e=n.instantiate;n.instantiate=function(t,n){if(".wasm"===t.slice(-5))return e.call(this,t,n);const r=this;return fetch(t,{credentials:"same-origin"}).then(function(t){if(!t.ok)throw Error("Fetch error: "+t.status+" "+t.statusText+(n?" loading from "+n:""));return t.text()}).then(function(n){return r.transform.call(this,t,n)}).then(function(n){return(0,eval)(n+"\n//# sourceURL="+t),r.getRegister()})},n.transform=function(t,n){return n}}("undefined"!=typeof self?self:global); |
@@ -5,7 +5,7 @@ /* | ||
*/ | ||
(function () { | ||
const systemPrototype = System.constructor.prototype; | ||
const originalImport = systemPrototype.import; | ||
(function (global) { | ||
const systemJSPrototype = global.System.constructor.prototype; | ||
const originalImport = systemJSPrototype.import; | ||
systemPrototype.import = function () { | ||
systemJSPrototype.import = function () { | ||
return originalImport.apply(this, arguments).then(function (ns) { | ||
@@ -15,2 +15,2 @@ return ns.__useDefault ? ns.default : ns; | ||
}; | ||
})() | ||
})(typeof self !== 'undefined' ? self : global); |
@@ -1,1 +0,1 @@ | ||
!function(){const t=System.constructor.prototype,n=t.import;t.import=function(){return n.apply(this,arguments).then(function(t){return t.__useDefault?t.default:t})}}(); | ||
!function(t){const e=t.System.constructor.prototype,n=e.import;e.import=function(){return n.apply(this,arguments).then(function(t){return t.__useDefault?t.default:t})}}("undefined"!=typeof self?self:global); |
/* | ||
* SJS 6.1.2 | ||
* SJS 6.1.3 | ||
* Minimal SystemJS Build | ||
@@ -380,2 +380,3 @@ */ | ||
console.log('instance'); | ||
envGlobal.System = new SystemJS(); | ||
@@ -382,0 +383,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(){const e="undefined"!=typeof self,t="undefined"!=typeof document,n=e?self:global;let r;if(t){const e=document.querySelector("base[href]");e&&(r=e.href)}if(!r&&"undefined"!=typeof location){const e=(r=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==e&&(r=r.slice(0,e+1))}const o=/\\/g;function i(e,t){if(-1!==e.indexOf("\\")&&(e=e.replace(o,"/")),"/"===e[0]&&"/"===e[1])return t.slice(0,t.indexOf(":")+1)+e;if("."===e[0]&&("/"===e[1]||"."===e[1]&&("/"===e[2]||2===e.length&&(e+="/"))||1===e.length&&(e+="/"))||"/"===e[0]){const n=t.slice(0,t.indexOf(":")+1);let r;if(r="/"===t[n.length+1]?"file:"!==n?(r=t.slice(n.length+2)).slice(r.indexOf("/")+1):t.slice(8):t.slice(n.length+("/"===t[n.length])),"/"===e[0])return t.slice(0,t.length-r.length-1)+e;const o=r.slice(0,r.lastIndexOf("/")+1)+e,i=[];let c=-1;for(let e=0;e<o.length;e++)-1!==c?"/"===o[e]&&(i.push(o.slice(c,e+1)),c=-1):"."===o[e]?"."!==o[e+1]||"/"!==o[e+2]&&e+2!==o.length?"/"===o[e+1]||e+1===o.length?e+=1:c=e:(i.pop(),e+=2):c=e;return-1!==c&&i.push(o.slice(c)),t.slice(0,t.length-r.length)+i.join("")}}const c="undefined"!=typeof Symbol,s=c&&Symbol.toStringTag,l=c?Symbol():"@";function u(){this[l]={}}const f=u.prototype;let d;f.prepareImport=function(){},f.import=function(e,t){const n=this;return Promise.resolve(n.prepareImport()).then(function(){return n.resolve(e,t)}).then(function(e){const t=function e(t,n,r){let o=t[l][n];if(o)return o;const i=[],c=Object.create(null);s&&Object.defineProperty(c,s,{value:"Module"});let u=Promise.resolve().then(function(){return t.instantiate(n,r)}).then(function(e){if(!e)throw Error("Module "+n+" did not instantiate");const r=e[1](function(e,t){o.h=!0;let n=!1;if("object"!=typeof e)e in c&&c[e]===t||(c[e]=t,n=!0);else for(let t in e){let r=e[t];t in c&&c[t]===r||(c[t]=r,n=!0)}if(n)for(let e=0;e<i.length;e++)i[e](c);return t},2===e[1].length?{import:function(e){return t.import(e,n)},meta:t.createContext(n)}:void 0);return o.e=r.execute||function(){},[e[0],r.setters||[]]});const f=u.then(function(r){return Promise.all(r[0].map(function(o,i){const c=r[1][i];return Promise.resolve(t.resolve(o,n)).then(function(r){const o=e(t,r,n);return Promise.resolve(o.I).then(function(){return c&&(o.i.push(c),!o.h&&o.I||c(o.n)),o})})})).then(function(e){o.d=e})});return f.catch(function(e){o.e=null,o.er=e}),o=t[l][n]={id:n,i:i,n:c,I:u,L:f,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0}}(n,e);return t.C||function(e,t){return t.C=function e(t,n,r){if(!r[n.id])return r[n.id]=!0,Promise.resolve(n.L).then(function(){return Promise.all(n.d.map(function(n){return e(t,n,r)}))})}(e,t,{}).then(function(){return function e(t,n,r){if(r[n.id])return;if(r[n.id]=!0,!n.e){if(n.er)throw n.er;return n.E?n.E:void 0}let o;return n.d.forEach(function(n){{const i=e(t,n,r);i&&(o=o||[]).push(i)}}),o?Promise.all(o).then(i):i();function i(){try{let e=n.e.call(h);if(e)return e=e.then(function(){n.C=n.n,n.E=null}),n.E=n.E||e;n.C=n.n}catch(e){throw n.er=e,e}finally{n.L=n.I=void 0,n.e=null}}}(e,t,{})}).then(function(){return t.n})}(n,t)})},f.createContext=function(e){return{url:e}},f.register=function(e,t){d=[e,t]},f.getRegister=function(){const e=d;return d=void 0,e};const h=Object.freeze(Object.create(null));n.System=new u;const a=f.register;function m(){Array.prototype.forEach.call(document.querySelectorAll("script[type=systemjs-module]"),function(e){var t,n;e.src&&System.import("import:"===e.src.slice(0,7)?e.src.slice(7):i(t=e.src,n=r)||(-1!==t.indexOf(":")?t:i("./"+t,n)))})}f.register=function(e,t){a.call(this,e,t)},f.instantiate=function(e,t){const n=this;return new Promise(function(r,o){let i;function c(t){t.filename===e&&(i=t.error)}window.addEventListener("error",c);const s=document.createElement("script");s.charset="utf-8",s.async=!0,s.crossOrigin="anonymous",s.addEventListener("error",function(){window.removeEventListener("error",c),o(Error("Error loading "+e+(t?" from "+t:"")))}),s.addEventListener("load",function(){window.removeEventListener("error",c),document.head.removeChild(s),i?o(i):r(n.getRegister())}),s.src=e,document.head.appendChild(s)})},t&&(window.addEventListener("DOMContentLoaded",m),m()),e&&"function"==typeof importScripts&&(f.instantiate=function(e){const t=this;return new Promise(function(n,r){try{importScripts(e)}catch(e){r(e)}n(t.getRegister())})}),f.resolve=function(e,t){const n=i(e,t||r);if(!n){if(-1!==e.indexOf(":"))return Promise.resolve(e);throw Error('Cannot resolve "'+e+(t?'" from '+t:'"'))}return Promise.resolve(n)}}(); | ||
!function(){const e="undefined"!=typeof self,t="undefined"!=typeof document,n=e?self:global;let r;if(t){const e=document.querySelector("base[href]");e&&(r=e.href)}if(!r&&"undefined"!=typeof location){const e=(r=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==e&&(r=r.slice(0,e+1))}const o=/\\/g;function i(e,t){if(-1!==e.indexOf("\\")&&(e=e.replace(o,"/")),"/"===e[0]&&"/"===e[1])return t.slice(0,t.indexOf(":")+1)+e;if("."===e[0]&&("/"===e[1]||"."===e[1]&&("/"===e[2]||2===e.length&&(e+="/"))||1===e.length&&(e+="/"))||"/"===e[0]){const n=t.slice(0,t.indexOf(":")+1);let r;if(r="/"===t[n.length+1]?"file:"!==n?(r=t.slice(n.length+2)).slice(r.indexOf("/")+1):t.slice(8):t.slice(n.length+("/"===t[n.length])),"/"===e[0])return t.slice(0,t.length-r.length-1)+e;const o=r.slice(0,r.lastIndexOf("/")+1)+e,i=[];let c=-1;for(let e=0;e<o.length;e++)-1!==c?"/"===o[e]&&(i.push(o.slice(c,e+1)),c=-1):"."===o[e]?"."!==o[e+1]||"/"!==o[e+2]&&e+2!==o.length?"/"===o[e+1]||e+1===o.length?e+=1:c=e:(i.pop(),e+=2):c=e;return-1!==c&&i.push(o.slice(c)),t.slice(0,t.length-r.length)+i.join("")}}const c="undefined"!=typeof Symbol,s=c&&Symbol.toStringTag,l=c?Symbol():"@";function u(){this[l]={}}const f=u.prototype;let d;f.prepareImport=function(){},f.import=function(e,t){const n=this;return Promise.resolve(n.prepareImport()).then(function(){return n.resolve(e,t)}).then(function(e){const t=function e(t,n,r){let o=t[l][n];if(o)return o;const i=[],c=Object.create(null);s&&Object.defineProperty(c,s,{value:"Module"});let u=Promise.resolve().then(function(){return t.instantiate(n,r)}).then(function(e){if(!e)throw Error("Module "+n+" did not instantiate");const r=e[1](function(e,t){o.h=!0;let n=!1;if("object"!=typeof e)e in c&&c[e]===t||(c[e]=t,n=!0);else for(let t in e){let r=e[t];t in c&&c[t]===r||(c[t]=r,n=!0)}if(n)for(let e=0;e<i.length;e++)i[e](c);return t},2===e[1].length?{import:function(e){return t.import(e,n)},meta:t.createContext(n)}:void 0);return o.e=r.execute||function(){},[e[0],r.setters||[]]});const f=u.then(function(r){return Promise.all(r[0].map(function(o,i){const c=r[1][i];return Promise.resolve(t.resolve(o,n)).then(function(r){const o=e(t,r,n);return Promise.resolve(o.I).then(function(){return c&&(o.i.push(c),!o.h&&o.I||c(o.n)),o})})})).then(function(e){o.d=e})});return f.catch(function(e){o.e=null,o.er=e}),o=t[l][n]={id:n,i:i,n:c,I:u,L:f,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0}}(n,e);return t.C||function(e,t){return t.C=function e(t,n,r){if(!r[n.id])return r[n.id]=!0,Promise.resolve(n.L).then(function(){return Promise.all(n.d.map(function(n){return e(t,n,r)}))})}(e,t,{}).then(function(){return function e(t,n,r){if(r[n.id])return;if(r[n.id]=!0,!n.e){if(n.er)throw n.er;return n.E?n.E:void 0}let o;return n.d.forEach(function(n){{const i=e(t,n,r);i&&(o=o||[]).push(i)}}),o?Promise.all(o).then(i):i();function i(){try{let e=n.e.call(a);if(e)return e=e.then(function(){n.C=n.n,n.E=null}),n.E=n.E||e;n.C=n.n}catch(e){throw n.er=e,e}finally{n.L=n.I=void 0,n.e=null}}}(e,t,{})}).then(function(){return t.n})}(n,t)})},f.createContext=function(e){return{url:e}},f.register=function(e,t){d=[e,t]},f.getRegister=function(){const e=d;return d=void 0,e};const a=Object.freeze(Object.create(null));console.log("instance"),n.System=new u;const h=f.register;function m(){Array.prototype.forEach.call(document.querySelectorAll("script[type=systemjs-module]"),function(e){var t,n;e.src&&System.import("import:"===e.src.slice(0,7)?e.src.slice(7):i(t=e.src,n=r)||(-1!==t.indexOf(":")?t:i("./"+t,n)))})}f.register=function(e,t){h.call(this,e,t)},f.instantiate=function(e,t){const n=this;return new Promise(function(r,o){let i;function c(t){t.filename===e&&(i=t.error)}window.addEventListener("error",c);const s=document.createElement("script");s.charset="utf-8",s.async=!0,s.crossOrigin="anonymous",s.addEventListener("error",function(){window.removeEventListener("error",c),o(Error("Error loading "+e+(t?" from "+t:"")))}),s.addEventListener("load",function(){window.removeEventListener("error",c),document.head.removeChild(s),i?o(i):r(n.getRegister())}),s.src=e,document.head.appendChild(s)})},t&&(window.addEventListener("DOMContentLoaded",m),m()),e&&"function"==typeof importScripts&&(f.instantiate=function(e){const t=this;return new Promise(function(n,r){try{importScripts(e)}catch(e){r(e)}n(t.getRegister())})}),f.resolve=function(e,t){const n=i(e,t||r);if(!n){if(-1!==e.indexOf(":"))return Promise.resolve(e);throw Error('Cannot resolve "'+e+(t?'" from '+t:'"'))}return Promise.resolve(n)}}(); |
/* | ||
* SystemJS 6.1.2 | ||
* SystemJS 6.1.3 | ||
*/ | ||
@@ -127,2 +127,3 @@ (function () { | ||
for (let p in packages) { | ||
const resolvedLhs = resolveIfNotPlainOrUrl(p, baseUrl) || p; | ||
const rhs = packages[p]; | ||
@@ -136,3 +137,3 @@ // package fallbacks not currently supported | ||
else | ||
outPackages[p] = mapped; | ||
outPackages[resolvedLhs] = mapped; | ||
} | ||
@@ -483,2 +484,3 @@ } | ||
console.log('instance'); | ||
envGlobal.System = new SystemJS(); | ||
@@ -618,79 +620,77 @@ | ||
(function (global) { | ||
const systemJSPrototype = global.System.constructor.prototype; | ||
const systemJSPrototype = System.constructor.prototype; | ||
// safari unpredictably lists some new globals first or second in object order | ||
let firstGlobalProp, secondGlobalProp, lastGlobalProp; | ||
function getGlobalProp () { | ||
let cnt = 0; | ||
let lastProp; | ||
for (let p in global) { | ||
// do not check frames cause it could be removed during import | ||
if (!global.hasOwnProperty(p) || (!isNaN(p) && p < global.length)) | ||
continue; | ||
if (cnt === 0 && p !== firstGlobalProp || cnt === 1 && p !== secondGlobalProp) | ||
return p; | ||
cnt++; | ||
lastProp = p; | ||
// safari unpredictably lists some new globals first or second in object order | ||
let firstGlobalProp, secondGlobalProp, lastGlobalProp; | ||
function getGlobalProp () { | ||
let cnt = 0; | ||
let lastProp; | ||
for (let p in global) { | ||
// do not check frames cause it could be removed during import | ||
if (!global.hasOwnProperty(p) || (!isNaN(p) && p < global.length)) | ||
continue; | ||
if (cnt === 0 && p !== firstGlobalProp || cnt === 1 && p !== secondGlobalProp) | ||
return p; | ||
cnt++; | ||
lastProp = p; | ||
} | ||
if (lastProp !== lastGlobalProp) | ||
return lastProp; | ||
} | ||
if (lastProp !== lastGlobalProp) | ||
return lastProp; | ||
} | ||
function noteGlobalProps () { | ||
// alternatively Object.keys(global).pop() | ||
// but this may be faster (pending benchmarks) | ||
firstGlobalProp = secondGlobalProp = undefined; | ||
for (let p in global) { | ||
// do not check frames cause it could be removed during import | ||
if (!global.hasOwnProperty(p) || (!isNaN(p) && p < global.length)) | ||
continue; | ||
if (!firstGlobalProp) | ||
firstGlobalProp = p; | ||
else if (!secondGlobalProp) | ||
secondGlobalProp = p; | ||
lastGlobalProp = p; | ||
function noteGlobalProps () { | ||
// alternatively Object.keys(global).pop() | ||
// but this may be faster (pending benchmarks) | ||
firstGlobalProp = secondGlobalProp = undefined; | ||
for (let p in global) { | ||
// do not check frames cause it could be removed during import | ||
if (!global.hasOwnProperty(p) || (!isNaN(p) && p < global.length)) | ||
continue; | ||
if (!firstGlobalProp) | ||
firstGlobalProp = p; | ||
else if (!secondGlobalProp) | ||
secondGlobalProp = p; | ||
lastGlobalProp = p; | ||
} | ||
return lastGlobalProp; | ||
} | ||
return lastGlobalProp; | ||
} | ||
const impt = systemJSPrototype.import; | ||
systemJSPrototype.import = function (id, parentUrl) { | ||
noteGlobalProps(); | ||
return impt.call(this, id, parentUrl); | ||
}; | ||
const impt = systemJSPrototype.import; | ||
systemJSPrototype.import = function (id, parentUrl) { | ||
noteGlobalProps(); | ||
return impt.call(this, id, parentUrl); | ||
}; | ||
const emptyInstantiation = [[], function () { return {} }]; | ||
const emptyInstantiation = [[], function () { return {} }]; | ||
const getRegister = systemJSPrototype.getRegister; | ||
systemJSPrototype.getRegister = function () { | ||
const lastRegister = getRegister.call(this); | ||
if (lastRegister) | ||
return lastRegister; | ||
// no registration -> attempt a global detection as difference from snapshot | ||
// when multiple globals, we take the global value to be the last defined new global object property | ||
// for performance, this will not support multi-version / global collisions as previous SystemJS versions did | ||
// note in Edge, deleting and re-adding a global does not change its ordering | ||
const globalProp = getGlobalProp(); | ||
if (!globalProp) | ||
return emptyInstantiation; | ||
let globalExport; | ||
try { | ||
globalExport = global[globalProp]; | ||
} | ||
catch (e) { | ||
return emptyInstantiation; | ||
} | ||
const getRegister = systemJSPrototype.getRegister; | ||
systemJSPrototype.getRegister = function () { | ||
const lastRegister = getRegister.call(this); | ||
if (lastRegister) | ||
return lastRegister; | ||
// no registration -> attempt a global detection as difference from snapshot | ||
// when multiple globals, we take the global value to be the last defined new global object property | ||
// for performance, this will not support multi-version / global collisions as previous SystemJS versions did | ||
// note in Edge, deleting and re-adding a global does not change its ordering | ||
const globalProp = getGlobalProp(); | ||
if (!globalProp) | ||
return emptyInstantiation; | ||
let globalExport; | ||
try { | ||
globalExport = global[globalProp]; | ||
} | ||
catch (e) { | ||
return emptyInstantiation; | ||
} | ||
return [[], function (_export) { | ||
return { | ||
execute: function () { | ||
_export({ default: globalExport, __useDefault: true }); | ||
} | ||
}; | ||
}]; | ||
}; | ||
return [[], function (_export) { | ||
return { | ||
execute: function () { | ||
_export({ default: globalExport, __useDefault: true }); | ||
} | ||
}; | ||
}]; | ||
}; | ||
})(typeof self !== 'undefined' ? self : global); | ||
@@ -702,7 +702,7 @@ | ||
*/ | ||
(function() { | ||
const systemPrototype = System.constructor.prototype; | ||
const instantiate = systemPrototype.instantiate; | ||
(function(global) { | ||
const systemJSPrototype = global.System.constructor.prototype; | ||
const instantiate = systemJSPrototype.instantiate; | ||
systemPrototype.instantiate = function (url, parent) { | ||
systemJSPrototype.instantiate = function (url, parent) { | ||
const loader = this; | ||
@@ -793,3 +793,3 @@ const ext = url.slice(url.lastIndexOf('.')); | ||
}; | ||
})(); | ||
})(typeof self !== 'undefined' ? self : global); | ||
@@ -796,0 +796,0 @@ const toStringTag$1 = typeof Symbol !== 'undefined' && Symbol.toStringTag; |
/* | ||
* SystemJS 6.1.2 | ||
* SystemJS 6.1.3 | ||
*/ | ||
!function(){const t="undefined"!=typeof self,e="undefined"!=typeof document,n=t?self:global;let r;if(e){const t=document.querySelector("base[href]");t&&(r=t.href)}if(!r&&"undefined"!=typeof location){const t=(r=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==t&&(r=r.slice(0,t+1))}const o=/\\/g;function i(t,e){if(-1!==t.indexOf("\\")&&(t=t.replace(o,"/")),"/"===t[0]&&"/"===t[1])return e.slice(0,e.indexOf(":")+1)+t;if("."===t[0]&&("/"===t[1]||"."===t[1]&&("/"===t[2]||2===t.length&&(t+="/"))||1===t.length&&(t+="/"))||"/"===t[0]){const n=e.slice(0,e.indexOf(":")+1);let r;if(r="/"===e[n.length+1]?"file:"!==n?(r=e.slice(n.length+2)).slice(r.indexOf("/")+1):e.slice(8):e.slice(n.length+("/"===e[n.length])),"/"===t[0])return e.slice(0,e.length-r.length-1)+t;const o=r.slice(0,r.lastIndexOf("/")+1)+t,i=[];let c=-1;for(let t=0;t<o.length;t++)-1!==c?"/"===o[t]&&(i.push(o.slice(c,t+1)),c=-1):"."===o[t]?"."!==o[t+1]||"/"!==o[t+2]&&t+2!==o.length?"/"===o[t+1]||t+1===o.length?t+=1:c=t:(i.pop(),t+=2):c=t;return-1!==c&&i.push(o.slice(c)),e.slice(0,e.length-r.length)+i.join("")}}function c(t,e){return i(t,e)||(-1!==t.indexOf(":")?t:i("./"+t,e))}function s(t,e){for(let n in e)t[n]=e[n];return t}function u(t,e,n,r,o){for(let c in t){const s=t[c];if("string"!=typeof s)continue;const u=d(r,i(s,n)||s,o);u?e[c]=u:a(c,s,"bare specifier did not resolve")}}function l(t,e){if(e[t])return t;let n=t.length;do{const r=t.slice(0,n+1);if(r in e)return r}while(-1!==(n=t.lastIndexOf("/",n-1)))}function f(t,e){const n=l(t,e);if(n){const r=e[n];if(null===r)return;if(!(t.length>n.length&&"/"!==r[r.length-1]))return r+t.slice(n.length);a(n,r,"should have a trailing '/'")}}function a(t,e,n){console.warn("Package target "+n+", resolving target '"+e+"' for "+t)}function d(t,e,n){let r=n&&l(n,t.scopes);for(;r;){const n=f(e,t.scopes[r]);if(n)return n;r=l(r.slice(0,r.lastIndexOf("/")),t.scopes)}return f(e,t.imports)||-1!==e.indexOf(":")&&e}const h="undefined"!=typeof Symbol,p=h&&Symbol.toStringTag,m=h?Symbol():"@";function y(){this[m]={}}const g=y.prototype;function v(t){return t.id}function b(t,e,n){if(t.onload(n,e.id,e.d&&e.d.map(v)),n)throw n}let S;g.prepareImport=function(){},g.import=function(t,e){const n=this;return Promise.resolve(n.prepareImport()).then(function(){return n.resolve(t,e)}).then(function(t){const e=function t(e,n,r){let o=e[m][n];if(o)return o;const i=[],c=Object.create(null);p&&Object.defineProperty(c,p,{value:"Module"});let s=Promise.resolve().then(function(){return e.instantiate(n,r)}).then(function(t){if(!t)throw Error("Module "+n+" did not instantiate");const r=t[1](function(t,e){o.h=!0;let n=!1;if("object"!=typeof t)t in c&&c[t]===e||(c[t]=e,n=!0);else for(let e in t){let r=t[e];e in c&&c[e]===r||(c[e]=r,n=!0)}if(n)for(let t=0;t<i.length;t++)i[t](c);return e},2===t[1].length?{import:function(t){return e.import(t,n)},meta:e.createContext(n)}:void 0);return o.e=r.execute||function(){},[t[0],r.setters||[]]});const u=(s=s.catch(function(t){b(e,o,t)})).then(function(r){return Promise.all(r[0].map(function(o,i){const c=r[1][i];return Promise.resolve(e.resolve(o,n)).then(function(r){const o=t(e,r,n);return Promise.resolve(o.I).then(function(){return c&&(o.i.push(c),!o.h&&o.I||c(o.n)),o})})})).then(function(t){o.d=t})});return u.catch(function(t){o.e=null,o.er=t}),o=e[m][n]={id:n,i:i,n:c,I:s,L:u,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0}}(n,t);return e.C||function(t,e){return e.C=function t(e,n,r){if(!r[n.id])return r[n.id]=!0,Promise.resolve(n.L).then(function(){return Promise.all(n.d.map(function(n){return t(e,n,r)}))})}(t,e,{}).then(function(){return function t(e,n,r){if(r[n.id])return;if(r[n.id]=!0,!n.e){if(n.er)throw n.er;return n.E?n.E:void 0}let o;return n.d.forEach(function(i){try{const c=t(e,i,r);c&&(c.catch(function(t){b(e,n,t)}),(o=o||[]).push(c))}catch(t){b(e,n,t)}}),o?Promise.all(o).then(i):i();function i(){try{let t=n.e.call(E);if(t)return t=t.then(function(){n.C=n.n,n.E=null,b(e,n,null)},function(t){b(e,n,t)}),n.E=n.E||t;n.C=n.n,b(e,n,null)}catch(t){throw b(e,n,t),n.er=t,t}finally{n.L=n.I=void 0,n.e=null}}}(t,e,{})}).then(function(){return e.n})}(n,e)})},g.createContext=function(t){return{url:t}},g.onload=function(){},g.register=function(t,e){S=[t,e]},g.getRegister=function(){const t=S;return S=void 0,t};const E=Object.freeze(Object.create(null));n.System=new y;let O,w={imports:{},scopes:{}};e&&Array.prototype.forEach.call(document.querySelectorAll('script[type="systemjs-importmap"][src]'),function(t){t._j=fetch(t.src).then(function(t){return t.json()})}),g.prepareImport=function(){return O||(O=Promise.resolve(),e&&Array.prototype.forEach.call(document.querySelectorAll('script[type="systemjs-importmap"]'),function(t){O=O.then(function(){return(t._j||t.src&&fetch(t.src).then(function(t){return t.json()})||Promise.resolve(JSON.parse(t.innerHTML))).then(function(e){w=function(t,e,n){const r={imports:s({},n.imports),scopes:s({},n.scopes)};if(t.imports&&u(t.imports,r.imports,e,n,null),t.scopes)for(let o in t.scopes){const i=c(o,e);u(t.scopes[o],r.scopes[i]||(r.scopes[i]={}),e,n,i)}return r}(e,t.src||r,w)})})})),O},g.resolve=function(t,e){return d(w,i(t,e=e||r)||t,e)||function(t,e){throw Error("Unable to resolve specifier '"+t+(e?"' from "+e:"'"))}(t,e)};const x=g.register;function j(){Array.prototype.forEach.call(document.querySelectorAll("script[type=systemjs-module]"),function(t){t.src&&System.import("import:"===t.src.slice(0,7)?t.src.slice(7):c(t.src,r))})}g.register=function(t,e){x.call(this,t,e)},g.instantiate=function(t,e){const n=this;return new Promise(function(r,o){let i;function c(e){e.filename===t&&(i=e.error)}window.addEventListener("error",c);const s=document.createElement("script");s.charset="utf-8",s.async=!0,s.crossOrigin="anonymous",s.addEventListener("error",function(){window.removeEventListener("error",c),o(Error("Error loading "+t+(e?" from "+e:"")))}),s.addEventListener("load",function(){window.removeEventListener("error",c),document.head.removeChild(s),i?o(i):r(n.getRegister())}),s.src=t,document.head.appendChild(s)})},e&&(window.addEventListener("DOMContentLoaded",j),j()),t&&"function"==typeof importScripts&&(g.instantiate=function(t){const e=this;return new Promise(function(n,r){try{importScripts(t)}catch(t){r(t)}n(e.getRegister())})}),function(t){const e=System.constructor.prototype;let n,r,o;const i=e.import;e.import=function(e,c){return function(){n=r=void 0;for(let e in t)!t.hasOwnProperty(e)||!isNaN(e)&&e<t.length||(n?r||(r=e):n=e,o=e)}(),i.call(this,e,c)};const c=[[],function(){return{}}],s=e.getRegister;e.getRegister=function(){const e=s.call(this);if(e)return e;const i=function(){let e,i=0;for(let o in t)if(!(!t.hasOwnProperty(o)||!isNaN(o)&&o<t.length)){if(0===i&&o!==n||1===i&&o!==r)return o;i++,e=o}if(e!==o)return e}();if(!i)return c;let u;try{u=t[i]}catch(t){return c}return[[],function(t){return{execute:function(){t({default:u,__useDefault:!0})}}}]}}("undefined"!=typeof self?self:global),function(){const t=System.constructor.prototype,e=t.instantiate;t.instantiate=function(t,n){const r=this;switch(t.slice(t.lastIndexOf("."))){case".css":return c(function(t,e){const n=new CSSStyleSheet;n.replaceSync(e),t("default",n)});case".html":return o().then(function(t){return i(t)||s("'.html' modules not implemented")});case".json":return c(function(t,e){t("default",JSON.parse(e))});case".wasm":return o().then(function(t){return i(t)||(WebAssembly.compileStreaming?WebAssembly.compileStreaming(t):t.arrayBuffer().then(WebAssembly.compile))}).then(function(t){const e=[],n=[],r={};return WebAssembly.Module.imports&&WebAssembly.Module.imports(t).forEach(function(t){const o=t.module;-1===e.indexOf(o)&&(e.push(o),n.push(function(t){r[o]=t}))}),[e,function(e){return{setters:n,execute:function(){return WebAssembly.instantiate(t,r).then(function(t){e(t.exports)})}}}]})}return e.apply(this,arguments);function o(){return fetch(t).then(function(t){return t.ok||s(t.status+" "+t.statusText),t})}function i(t){const e=t.headers.get("content-type");if(e&&e.match(/^application\/javascript(;|$)/))return t.text().then(function(t){return(0,eval)(t),r.getRegister()})}function c(t){return o().then(function(e){return i(e)||e.text().then(function(e){return[[],function(n){return{execute:t(n,e)}}]})})}function s(e){throw Error(e+", loading "+t+(n?" from "+n:""))}}}();const P="undefined"!=typeof Symbol&&Symbol.toStringTag;g.get=function(t){const e=this[m][t];if(e&&null===e.e&&!e.E)return e.er?null:e.n},g.set=function(t,e){let n;P&&"Module"===e[P]?n=e:(n=Object.assign(Object.create(null),e),P&&Object.defineProperty(n,P,{value:"Module"}));const r=Promise.resolve(n);return this.delete(t),this[m][t]={id:t,i:[],n:n,I:r,L:r,h:!1,d:[],e:null,er:void 0,E:void 0,C:r},n},g.has=function(t){const e=this[m][t];return e&&null===e.e&&!e.E},g.delete=function(t){const e=this.get(t);return void 0!==e&&(e&&e.d&&e.d.forEach(function(t){const n=t.i.indexOf(e);-1!==n&&t.i.splice(n,1)}),delete this[m][t])};const I="undefined"!=typeof Symbol&&Symbol.iterator;g.entries=function(){const t=this,e=Object.keys(t[m]);let n,r,o=0;const i={next:function(){for(;void 0!==(r=e[o++])&&void 0===(n=t.get(r)););return{done:void 0===r,value:void 0!==r&&[r,n]}}};return i[I]=function(){return this},i}}(); | ||
!function(){const t="undefined"!=typeof self,e="undefined"!=typeof document,n=t?self:global;let r;if(e){const t=document.querySelector("base[href]");t&&(r=t.href)}if(!r&&"undefined"!=typeof location){const t=(r=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==t&&(r=r.slice(0,t+1))}const o=/\\/g;function i(t,e){if(-1!==t.indexOf("\\")&&(t=t.replace(o,"/")),"/"===t[0]&&"/"===t[1])return e.slice(0,e.indexOf(":")+1)+t;if("."===t[0]&&("/"===t[1]||"."===t[1]&&("/"===t[2]||2===t.length&&(t+="/"))||1===t.length&&(t+="/"))||"/"===t[0]){const n=e.slice(0,e.indexOf(":")+1);let r;if(r="/"===e[n.length+1]?"file:"!==n?(r=e.slice(n.length+2)).slice(r.indexOf("/")+1):e.slice(8):e.slice(n.length+("/"===e[n.length])),"/"===t[0])return e.slice(0,e.length-r.length-1)+t;const o=r.slice(0,r.lastIndexOf("/")+1)+t,i=[];let c=-1;for(let t=0;t<o.length;t++)-1!==c?"/"===o[t]&&(i.push(o.slice(c,t+1)),c=-1):"."===o[t]?"."!==o[t+1]||"/"!==o[t+2]&&t+2!==o.length?"/"===o[t+1]||t+1===o.length?t+=1:c=t:(i.pop(),t+=2):c=t;return-1!==c&&i.push(o.slice(c)),e.slice(0,e.length-r.length)+i.join("")}}function c(t,e){return i(t,e)||(-1!==t.indexOf(":")?t:i("./"+t,e))}function s(t,e){for(let n in e)t[n]=e[n];return t}function u(t,e,n,r,o){for(let c in t){const s=i(c,n)||c,u=t[c];if("string"!=typeof u)continue;const l=d(r,i(u,n)||u,o);l?e[s]=l:a(c,u,"bare specifier did not resolve")}}function l(t,e){if(e[t])return t;let n=t.length;do{const r=t.slice(0,n+1);if(r in e)return r}while(-1!==(n=t.lastIndexOf("/",n-1)))}function f(t,e){const n=l(t,e);if(n){const r=e[n];if(null===r)return;if(!(t.length>n.length&&"/"!==r[r.length-1]))return r+t.slice(n.length);a(n,r,"should have a trailing '/'")}}function a(t,e,n){console.warn("Package target "+n+", resolving target '"+e+"' for "+t)}function d(t,e,n){let r=n&&l(n,t.scopes);for(;r;){const n=f(e,t.scopes[r]);if(n)return n;r=l(r.slice(0,r.lastIndexOf("/")),t.scopes)}return f(e,t.imports)||-1!==e.indexOf(":")&&e}const h="undefined"!=typeof Symbol,p=h&&Symbol.toStringTag,m=h?Symbol():"@";function y(){this[m]={}}const g=y.prototype;function v(t){return t.id}function b(t,e,n){if(t.onload(n,e.id,e.d&&e.d.map(v)),n)throw n}let S;g.prepareImport=function(){},g.import=function(t,e){const n=this;return Promise.resolve(n.prepareImport()).then(function(){return n.resolve(t,e)}).then(function(t){const e=function t(e,n,r){let o=e[m][n];if(o)return o;const i=[],c=Object.create(null);p&&Object.defineProperty(c,p,{value:"Module"});let s=Promise.resolve().then(function(){return e.instantiate(n,r)}).then(function(t){if(!t)throw Error("Module "+n+" did not instantiate");const r=t[1](function(t,e){o.h=!0;let n=!1;if("object"!=typeof t)t in c&&c[t]===e||(c[t]=e,n=!0);else for(let e in t){let r=t[e];e in c&&c[e]===r||(c[e]=r,n=!0)}if(n)for(let t=0;t<i.length;t++)i[t](c);return e},2===t[1].length?{import:function(t){return e.import(t,n)},meta:e.createContext(n)}:void 0);return o.e=r.execute||function(){},[t[0],r.setters||[]]});const u=(s=s.catch(function(t){b(e,o,t)})).then(function(r){return Promise.all(r[0].map(function(o,i){const c=r[1][i];return Promise.resolve(e.resolve(o,n)).then(function(r){const o=t(e,r,n);return Promise.resolve(o.I).then(function(){return c&&(o.i.push(c),!o.h&&o.I||c(o.n)),o})})})).then(function(t){o.d=t})});return u.catch(function(t){o.e=null,o.er=t}),o=e[m][n]={id:n,i:i,n:c,I:s,L:u,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0}}(n,t);return e.C||function(t,e){return e.C=function t(e,n,r){if(!r[n.id])return r[n.id]=!0,Promise.resolve(n.L).then(function(){return Promise.all(n.d.map(function(n){return t(e,n,r)}))})}(t,e,{}).then(function(){return function t(e,n,r){if(r[n.id])return;if(r[n.id]=!0,!n.e){if(n.er)throw n.er;return n.E?n.E:void 0}let o;return n.d.forEach(function(i){try{const c=t(e,i,r);c&&(c.catch(function(t){b(e,n,t)}),(o=o||[]).push(c))}catch(t){b(e,n,t)}}),o?Promise.all(o).then(i):i();function i(){try{let t=n.e.call(E);if(t)return t=t.then(function(){n.C=n.n,n.E=null,b(e,n,null)},function(t){b(e,n,t)}),n.E=n.E||t;n.C=n.n,b(e,n,null)}catch(t){throw b(e,n,t),n.er=t,t}finally{n.L=n.I=void 0,n.e=null}}}(t,e,{})}).then(function(){return e.n})}(n,e)})},g.createContext=function(t){return{url:t}},g.onload=function(){},g.register=function(t,e){S=[t,e]},g.getRegister=function(){const t=S;return S=void 0,t};const E=Object.freeze(Object.create(null));console.log("instance"),n.System=new y;let O,w={imports:{},scopes:{}};e&&Array.prototype.forEach.call(document.querySelectorAll('script[type="systemjs-importmap"][src]'),function(t){t._j=fetch(t.src).then(function(t){return t.json()})}),g.prepareImport=function(){return O||(O=Promise.resolve(),e&&Array.prototype.forEach.call(document.querySelectorAll('script[type="systemjs-importmap"]'),function(t){O=O.then(function(){return(t._j||t.src&&fetch(t.src).then(function(t){return t.json()})||Promise.resolve(JSON.parse(t.innerHTML))).then(function(e){w=function(t,e,n){const r={imports:s({},n.imports),scopes:s({},n.scopes)};if(t.imports&&u(t.imports,r.imports,e,n,null),t.scopes)for(let o in t.scopes){const i=c(o,e);u(t.scopes[o],r.scopes[i]||(r.scopes[i]={}),e,n,i)}return r}(e,t.src||r,w)})})})),O},g.resolve=function(t,e){return d(w,i(t,e=e||r)||t,e)||function(t,e){throw Error("Unable to resolve specifier '"+t+(e?"' from "+e:"'"))}(t,e)};const x=g.register;function j(){Array.prototype.forEach.call(document.querySelectorAll("script[type=systemjs-module]"),function(t){t.src&&System.import("import:"===t.src.slice(0,7)?t.src.slice(7):c(t.src,r))})}g.register=function(t,e){x.call(this,t,e)},g.instantiate=function(t,e){const n=this;return new Promise(function(r,o){let i;function c(e){e.filename===t&&(i=e.error)}window.addEventListener("error",c);const s=document.createElement("script");s.charset="utf-8",s.async=!0,s.crossOrigin="anonymous",s.addEventListener("error",function(){window.removeEventListener("error",c),o(Error("Error loading "+t+(e?" from "+e:"")))}),s.addEventListener("load",function(){window.removeEventListener("error",c),document.head.removeChild(s),i?o(i):r(n.getRegister())}),s.src=t,document.head.appendChild(s)})},e&&(window.addEventListener("DOMContentLoaded",j),j()),t&&"function"==typeof importScripts&&(g.instantiate=function(t){const e=this;return new Promise(function(n,r){try{importScripts(t)}catch(t){r(t)}n(e.getRegister())})}),function(t){const e=t.System.constructor.prototype;let n,r,o;const i=e.import;e.import=function(e,c){return function(){n=r=void 0;for(let e in t)!t.hasOwnProperty(e)||!isNaN(e)&&e<t.length||(n?r||(r=e):n=e,o=e)}(),i.call(this,e,c)};const c=[[],function(){return{}}],s=e.getRegister;e.getRegister=function(){const e=s.call(this);if(e)return e;const i=function(){let e,i=0;for(let o in t)if(!(!t.hasOwnProperty(o)||!isNaN(o)&&o<t.length)){if(0===i&&o!==n||1===i&&o!==r)return o;i++,e=o}if(e!==o)return e}();if(!i)return c;let u;try{u=t[i]}catch(t){return c}return[[],function(t){return{execute:function(){t({default:u,__useDefault:!0})}}}]}}("undefined"!=typeof self?self:global),function(t){const e=t.System.constructor.prototype,n=e.instantiate;e.instantiate=function(t,e){const r=this;switch(t.slice(t.lastIndexOf("."))){case".css":return c(function(t,e){const n=new CSSStyleSheet;n.replaceSync(e),t("default",n)});case".html":return o().then(function(t){return i(t)||s("'.html' modules not implemented")});case".json":return c(function(t,e){t("default",JSON.parse(e))});case".wasm":return o().then(function(t){return i(t)||(WebAssembly.compileStreaming?WebAssembly.compileStreaming(t):t.arrayBuffer().then(WebAssembly.compile))}).then(function(t){const e=[],n=[],r={};return WebAssembly.Module.imports&&WebAssembly.Module.imports(t).forEach(function(t){const o=t.module;-1===e.indexOf(o)&&(e.push(o),n.push(function(t){r[o]=t}))}),[e,function(e){return{setters:n,execute:function(){return WebAssembly.instantiate(t,r).then(function(t){e(t.exports)})}}}]})}return n.apply(this,arguments);function o(){return fetch(t).then(function(t){return t.ok||s(t.status+" "+t.statusText),t})}function i(t){const e=t.headers.get("content-type");if(e&&e.match(/^application\/javascript(;|$)/))return t.text().then(function(t){return(0,eval)(t),r.getRegister()})}function c(t){return o().then(function(e){return i(e)||e.text().then(function(e){return[[],function(n){return{execute:t(n,e)}}]})})}function s(n){throw Error(n+", loading "+t+(e?" from "+e:""))}}}("undefined"!=typeof self?self:global);const P="undefined"!=typeof Symbol&&Symbol.toStringTag;g.get=function(t){const e=this[m][t];if(e&&null===e.e&&!e.E)return e.er?null:e.n},g.set=function(t,e){let n;P&&"Module"===e[P]?n=e:(n=Object.assign(Object.create(null),e),P&&Object.defineProperty(n,P,{value:"Module"}));const r=Promise.resolve(n);return this.delete(t),this[m][t]={id:t,i:[],n:n,I:r,L:r,h:!1,d:[],e:null,er:void 0,E:void 0,C:r},n},g.has=function(t){const e=this[m][t];return e&&null===e.e&&!e.E},g.delete=function(t){const e=this.get(t);return void 0!==e&&(e&&e.d&&e.d.forEach(function(t){const n=t.i.indexOf(e);-1!==n&&t.i.splice(n,1)}),delete this[m][t])};const I="undefined"!=typeof Symbol&&Symbol.iterator;g.entries=function(){const t=this,e=Object.keys(t[m]);let n,r,o=0;const i={next:function(){for(;void 0!==(r=e[o++])&&void 0===(n=t.get(r)););return{done:void 0===r,value:void 0!==r&&[r,n]}}};return i[I]=function(){return this},i}}(); |
{ | ||
"name": "systemjs", | ||
"version": "6.1.2", | ||
"version": "6.1.3", | ||
"description": "Dynamic ES module loader", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -0,0 +0,0 @@ # SystemJS |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
131953
1637