iwmlib/3rdparty/systemjs/system.js

7 lines
46 KiB
JavaScript
Raw Normal View History

2019-03-21 09:57:27 +01:00
/*
* SystemJS v0.20.9 Dev
*/
!function(){"use strict";function e(e){return st?Symbol():"@@"+e}function t(e,t){nt||(t=t.replace(it?/file:\/\/\//g:/file:\/\//g,""));var r,n=(e.message||e)+"\n "+t;r=ct&&e.fileName?new Error(n,e.fileName,e.lineNumber):new Error(n);var o=e.originalErr?e.originalErr.stack:e.stack;return ot?r.stack=n+"\n "+o:r.stack=o,r.originalErr=e.originalErr||e,r}function r(e,t){throw new RangeError('Unable to resolve "'+e+'" to '+t)}function n(e,t){e=e.trim();var n=t&&t.substr(0,t.indexOf(":")+1),o=e[0],i=e[1];if("/"===o&&"/"===i)return n||r(e,t),n+e;if("."===o&&("/"===i||"."===i&&("/"===e[2]||2===e.length)||1===e.length)||"/"===o){var a,s=!n||"/"!==t[n.length];if(s?(void 0===t&&r(e,t),a=t):"/"===t[n.length+1]?"file:"!==n?(a=t.substr(n.length+2),a=a.substr(a.indexOf("/")+1)):a=t.substr(8):a=t.substr(n.length+1),"/"===o){if(!s)return t.substr(0,t.length-a.length-1)+e;r(e,t)}for(var u=a.substr(0,a.lastIndexOf("/")+1)+e,l=[],c=void 0,f=0;f<u.length;f++)if(void 0===c)if("."!==u[f])c=f;else{if("."!==u[f+1]||"/"!==u[f+2]&&f!==u.length-2){if("/"!==u[f+1]&&f!==u.length-1){c=f;continue}f+=1}else l.pop(),f+=2;s&&0===l.length&&r(e,t),f===u.length&&l.push("")}else"/"===u[f]&&(l.push(u.substr(c,f-c+1)),c=void 0);return void 0!==c&&l.push(u.substr(c,u.length-c)),t.substr(0,t.length-a.length)+l.join("")}var d=e.indexOf(":");return-1!==d?ot&&":"===e[1]&&"\\"===e[2]&&e[0].match(/[a-z]/i)?"file:///"+e.replace(/\\/g,"/"):e:void 0}function o(e){if(e.values)return e.values();if("undefined"==typeof Symbol||!Symbol.iterator)throw new Error("Symbol.iterator not supported in this browser");var t={};return t[Symbol.iterator]=function(){var t=Object.keys(e),r=0;return{next:function(){return r<t.length?{value:e[t[r++]],done:!1}:{value:void 0,done:!0}}}},t}function i(){this.registry=new u}function a(e){if(!(e instanceof l))throw new TypeError("Module instantiation did not return a valid namespace object.");return e}function s(e){if(void 0===e)throw new RangeError("No resolution found.");return e}function u(){this[ht]={},this._registry=ht}function l(e){Object.defineProperty(this,mt,{value:e}),Object.keys(e).forEach(c,this)}function c(e){Object.defineProperty(this,e,{enumerable:!0,get:function(){return this[mt][e]}})}function f(){i.call(this);var e=this.registry.delete;this.registry.delete=function(r){var n=e.call(this,r);return t.hasOwnProperty(r)&&!t[r].linkRecord&&delete t[r],n};var t={};this[vt]={lastRegister:void 0,records:t},this.trace=!1}function d(e,t,r){return e.records[t]={key:t,registration:r,module:void 0,importerSetters:void 0,linkRecord:{instantiatePromise:void 0,dependencies:void 0,execute:void 0,executingRequire:!1,moduleObj:void 0,setters:void 0,depsInstantiatePromise:void 0,dependencyInstantiations:void 0,linked:!1,error:void 0}}}function p(e,t,r,n,o){var i=n[t];if(i)return Promise.resolve(i);var a=o.records[t];return a&&!a.module?h(e,a,a.linkRecord,n,o):e.resolve(t,r).then(function(t){if(i=n[t])return i;a=o.records[t],(!a||a.module)&&(a=d(o,t,a&&a.registration));var r=a.linkRecord;return r?h(e,a,r,n,o):a})}function g(e,t,r){return function(){var e=r.lastRegister;return e?(r.lastRegister=void 0,t.registration=e,!0):!!t.registration}}function h(e,r,n,o,i){return n.instantiatePromise||(n.instantiatePromise=(r.registration?Promise.resolve():Promise.resolve().then(function(){return i.lastRegister=void 0,e[yt](r.key,e[yt].length>1&&g(e,r,i))})).then(function(t){if(void 0!==t){if(!(t instanceof l))throw new TypeError("Instantiate did not return a valid Module object.");return delete i.records[r.key],e.trace&&v(e,r,n),o[r.key]=t}var a=r.registration;if(r.registration=void 0,!a)throw new TypeError("Module instantiation did not call an anonymous or correctly named System.register.");return n.dependencies=a[0],r.importerSetters=[],n.moduleObj={},a[2]?(n.moduleObj.default={},n.moduleObj.__useDefault=!0,n.executingRequire=a[1],n.execute=a[2]):y(e,r,n,a[1]),n.dependencies.length||(n.linked=!0,e.trace&&v(e,r,n)),r}).catch(function(e){throw n.error=t(e,"Instantiating "+r.key)}))}function m(e,t,r,n,o,i){return e.resolve(t,r).then(function(r){i&&(i[t]=r);var a=
if(n.load.globals)for(var d in n.load.globals)c.args.push(o(n.load.globals[d])),f+=", "+d;var p=at.define;at.define=void 0,at.__cjsWrapper=c,r=f+") {"+r.replace(vr,"")+"\n}).apply(__cjsWrapper.exports, __cjsWrapper.args);";var g=Pe(e,r,n.load.sourceMap,t,n.load.integrity,n.load.nonce,!1);if(g)throw g;ze(n,i),at.__cjsWrapper=void 0,at.define=p}),i=o();break;case"global":var l=n.load.deps||[];for(var c in n.load.globals){var f=n.load.globals[c];f&&l.push(f)}e.registerDynamic(l,!1,function(o,i,a){var s;if(n.load.globals){s={};for(var u in n.load.globals)n.load.globals[u]&&(s[u]=o(n.load.globals[u]))}var l=n.load.exports;l&&(r+="\n"+dr+'["'+l+'"] = '+l+";");var c=Ke(a.id,l,s,n.load.encapsulateGlobal),f=Pe(e,r,n.load.sourceMap,t,n.load.integrity,n.load.nonce,!0);if(f)throw f;var d=c();return ze(n,d),d}),i=o();break;default:throw new TypeError('Unknown module format "'+n.load.format+'" for "'+t+'".'+("es6"===n.load.format?' Use "esm" instead here.':""))}if(!i)throw new Error("Module "+t+" detected as "+n.load.format+" but didn't execute correctly.")})}function Ge(e){var t=e.match(gr);return t&&"System.register"===e.substr(t[0].length,15)}function He(e){return e.match(hr)?"amd":(mr.lastIndex=0,At.lastIndex=0,At.exec(e)||mr.exec(e)?"cjs":"global")}function Ze(e,t){var r=e.split("!")[0];t.file&&t.file!=e||(t.file=r+"!transpiled"),(!t.sources||t.sources.length<=1&&(!t.sources[0]||t.sources[0]===e))&&(t.sources=[r])}function Xe(e,r,n,o,i){if(!e.transpiler)throw new TypeError("Unable to dynamically transpile ES module\n A loader plugin needs to be configured via `SystemJS.config({ transpiler: 'transpiler-module' })`.");if(o.load.deps){for(var a="",s=0;s<o.load.deps.length;s++)a+='import "'+o.load.deps[s]+'"; ';r=a+r}return e.import.call(e,e.transpiler).then(function(t){if(t.__useDefault&&(t=t.default),!t.translate)throw new Error(e.transpiler+" is not a valid transpiler plugin.");return t===o.pluginModule?r:("string"==typeof o.load.sourceMap&&(o.load.sourceMap=JSON.parse(o.load.sourceMap)),o.pluginLoad=o.pluginLoad||{name:n,address:n,source:r,metadata:o.load},o.load.deps=o.load.deps||[],Promise.resolve(t.translate.call(e,o.pluginLoad,o.traceOpts)).then(function(e){var t=o.load.sourceMap;return t&&"object"==typeof t&&Ze(n,t),"esm"===o.load.format&&Ge(e)&&(o.load.format="register"),e}))},function(e){throw t(e,"Unable to load transpiler to transpile "+n)})}function Ye(e,t,r){for(var n,o=t.split(".");o.length>1;)n=o.shift(),e=e[n]=e[n]||{};n=o.shift(),void 0===e[n]&&(e[n]=r)}function Qe(e,t){var r=e.match(yr);if(r)for(var n=r[0].match(br),o=0;o<n.length;o++){var i=n[o],a=i.length,s=i.substr(0,1);if(";"==i.substr(a-1,1)&&a--,'"'==s||"'"==s){var u=i.substr(1,i.length-3),l=u.substr(0,u.indexOf(" "));if(l){var c=u.substr(l.length+1,u.length-l.length-1);"deps"===l&&(l="deps[]"),"[]"===l.substr(l.length-2,2)?(l=l.substr(0,l.length-2),t.load[l]=t.load[l]||[],t.load[l].push(c)):"use"!==l&&Ye(t.load,l,c)}else t.load[u]=!0}}}function Ve(){f.call(this),this._loader={},this[Et]={},this[St]={baseURL:rt,paths:{},packageConfigPaths:[],packageConfigKeys:[],map:{},packages:{},depCache:{},meta:{},bundles:{},production:!1,transpiler:void 0,loadedBundles:{},warnings:!1,pluginFirst:!1,wasm:!1},this.scriptSrc=fr,this._nodeRequire=Vt,this.registry.set("@empty",Ot),et.call(this,!1,!1),Zt(this)}function et(e,t){this[St].production=e,this.registry.set("@system-env",xr=this.newModule({browser:nt,node:!!this._nodeRequire,production:!t&&e,dev:t||!e,build:t,default:!0}))}function tt(e,t){M.call(e[St],"SystemJS."+t+" is deprecated for SystemJS.registry."+t)}var rt,nt="undefined"!=typeof window&&"undefined"!=typeof document,ot="undefined"!=typeof process&&process.versions&&process.versions.node,it="undefined"!=typeof process&&"string"==typeof process.platform&&process.platform.match(/^win/),at="undefined"!=typeof self?self:global,st="undefined"!=typeof Symbol;if("undefined"!=typeof document&&document.getElementsByTagName){if(rt=document.baseURI,!rt){var ut=document.getElementsByTagName("base");rt=ut[0]&&ut[0].href||window.location.href}}else"undefined"!=typeof loca
//# sourceMappingURL=system.js.map