diff --git a/dist/index.js b/dist/index.js index db81945..7a8b6ac 100644 --- a/dist/index.js +++ b/dist/index.js @@ -78,7 +78,7 @@ var bootstrap = /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ -/******/ __webpack_require__.p = "/boorstrap/1.0.4/"; +/******/ __webpack_require__.p = "/boorstrap/1.0.5/"; /******/ /******/ /******/ // Load entry module and return exports @@ -167,14 +167,14 @@ eval("/* WEBPACK VAR INJECTION */(function(global) {/*\n * Support for a \"trans /***/ }), -/***/ "./node_modules/systemjs/dist/s.js": -/*!*****************************************!*\ - !*** ./node_modules/systemjs/dist/s.js ***! - \*****************************************/ +/***/ "./node_modules/systemjs/dist/system.js": +/*!**********************************************!*\ + !*** ./node_modules/systemjs/dist/system.js ***! + \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("/* WEBPACK VAR INJECTION */(function(global) {/*\n* SJS 6.2.2\n* Minimal SystemJS Build\n*/\n(function () {\n const hasSelf = typeof self !== 'undefined';\n\n const hasDocument = typeof document !== 'undefined';\n\n const envGlobal = hasSelf ? self : global;\n\n let baseUrl;\n\n if (hasDocument) {\n const baseEl = document.querySelector('base[href]');\n if (baseEl)\n baseUrl = baseEl.href;\n }\n\n if (!baseUrl && typeof location !== 'undefined') {\n baseUrl = location.href.split('#')[0].split('?')[0];\n const lastSepIndex = baseUrl.lastIndexOf('/');\n if (lastSepIndex !== -1)\n baseUrl = baseUrl.slice(0, lastSepIndex + 1);\n }\n\n const backslashRegEx = /\\\\/g;\n function resolveIfNotPlainOrUrl (relUrl, parentUrl) {\n if (relUrl.indexOf('\\\\') !== -1)\n relUrl = relUrl.replace(backslashRegEx, '/');\n // protocol-relative\n if (relUrl[0] === '/' && relUrl[1] === '/') {\n return parentUrl.slice(0, parentUrl.indexOf(':') + 1) + relUrl;\n }\n // relative-url\n else if (relUrl[0] === '.' && (relUrl[1] === '/' || relUrl[1] === '.' && (relUrl[2] === '/' || relUrl.length === 2 && (relUrl += '/')) ||\n relUrl.length === 1 && (relUrl += '/')) ||\n relUrl[0] === '/') {\n const parentProtocol = parentUrl.slice(0, parentUrl.indexOf(':') + 1);\n // Disabled, but these cases will give inconsistent results for deep backtracking\n //if (parentUrl[parentProtocol.length] !== '/')\n // throw Error('Cannot resolve');\n // read pathname from parent URL\n // pathname taken to be part after leading \"/\"\n let pathname;\n if (parentUrl[parentProtocol.length + 1] === '/') {\n // resolving to a :// so we need to read out the auth and host\n if (parentProtocol !== 'file:') {\n pathname = parentUrl.slice(parentProtocol.length + 2);\n pathname = pathname.slice(pathname.indexOf('/') + 1);\n }\n else {\n pathname = parentUrl.slice(8);\n }\n }\n else {\n // resolving to :/ so pathname is the /... part\n pathname = parentUrl.slice(parentProtocol.length + (parentUrl[parentProtocol.length] === '/'));\n }\n\n if (relUrl[0] === '/')\n return parentUrl.slice(0, parentUrl.length - pathname.length - 1) + relUrl;\n\n // join together and split for removal of .. and . segments\n // looping the string instead of anything fancy for perf reasons\n // '../../../../../z' resolved to 'x/y' is just 'z'\n const segmented = pathname.slice(0, pathname.lastIndexOf('/') + 1) + relUrl;\n\n const output = [];\n let segmentIndex = -1;\n for (let i = 0; i < segmented.length; i++) {\n // busy reading a segment - only terminate on '/'\n if (segmentIndex !== -1) {\n if (segmented[i] === '/') {\n output.push(segmented.slice(segmentIndex, i + 1));\n segmentIndex = -1;\n }\n }\n\n // new segment - check if it is relative\n else if (segmented[i] === '.') {\n // ../ segment\n if (segmented[i + 1] === '.' && (segmented[i + 2] === '/' || i + 2 === segmented.length)) {\n output.pop();\n i += 2;\n }\n // ./ segment\n else if (segmented[i + 1] === '/' || i + 1 === segmented.length) {\n i += 1;\n }\n else {\n // the start of a new segment as below\n segmentIndex = i;\n }\n }\n // it is the start of a new segment\n else {\n segmentIndex = i;\n }\n }\n // finish reading out the last segment\n if (segmentIndex !== -1)\n output.push(segmented.slice(segmentIndex));\n return parentUrl.slice(0, parentUrl.length - pathname.length) + output.join('');\n }\n }\n\n /*\n * Import maps implementation\n *\n * To make lookups fast we pre-resolve the entire import map\n * and then match based on backtracked hash lookups\n *\n */\n\n function resolveUrl (relUrl, parentUrl) {\n return resolveIfNotPlainOrUrl(relUrl, parentUrl) || (relUrl.indexOf(':') !== -1 ? relUrl : resolveIfNotPlainOrUrl('./' + relUrl, parentUrl));\n }\n\n /*\n * SystemJS Core\n * \n * Provides\n * - System.import\n * - System.register support for\n * live bindings, function hoisting through circular references,\n * reexports, dynamic import, import.meta.url, top-level await\n * - System.getRegister to get the registration\n * - Symbol.toStringTag support in Module objects\n * - Hookable System.createContext to customize import.meta\n * - System.onload(err, id, deps) handler for tracing / hot-reloading\n * \n * Core comes with no System.prototype.resolve or\n * System.prototype.instantiate implementations\n */\n\n const hasSymbol = typeof Symbol !== 'undefined';\n const toStringTag = hasSymbol && Symbol.toStringTag;\n const REGISTRY = hasSymbol ? Symbol() : '@';\n\n function SystemJS () {\n this[REGISTRY] = {};\n }\n\n const systemJSPrototype = SystemJS.prototype;\n\n systemJSPrototype.prepareImport = function () {};\n\n systemJSPrototype.import = function (id, parentUrl) {\n const loader = this;\n return Promise.resolve(loader.prepareImport())\n .then(function() {\n return loader.resolve(id, parentUrl);\n })\n .then(function (id) {\n const load = getOrCreateLoad(loader, id);\n return load.C || topLevelLoad(loader, load);\n });\n };\n\n // Hookable createContext function -> allowing eg custom import meta\n systemJSPrototype.createContext = function (parentId) {\n return {\n url: parentId\n };\n };\n\n let lastRegister;\n systemJSPrototype.register = function (deps, declare) {\n lastRegister = [deps, declare];\n };\n\n /*\n * getRegister provides the last anonymous System.register call\n */\n systemJSPrototype.getRegister = function () {\n const _lastRegister = lastRegister;\n lastRegister = undefined;\n return _lastRegister;\n };\n\n function getOrCreateLoad (loader, id, firstParentUrl) {\n let load = loader[REGISTRY][id];\n if (load)\n return load;\n\n const importerSetters = [];\n const ns = Object.create(null);\n if (toStringTag)\n Object.defineProperty(ns, toStringTag, { value: 'Module' });\n \n let instantiatePromise = Promise.resolve()\n .then(function () {\n return loader.instantiate(id, firstParentUrl);\n })\n .then(function (registration) {\n if (!registration)\n throw Error('Module ' + id + ' did not instantiate');\n function _export (name, value) {\n // note if we have hoisted exports (including reexports)\n load.h = true;\n let changed = false;\n if (typeof name !== 'object') {\n if (!(name in ns) || ns[name] !== value) {\n ns[name] = value;\n changed = true;\n }\n }\n else {\n for (let p in name) {\n let value = name[p];\n if (!(p in ns) || ns[p] !== value) {\n ns[p] = value;\n changed = true;\n }\n }\n\n if (name.__esModule) {\n ns.__esModule = name.__esModule;\n }\n }\n if (changed)\n for (let i = 0; i < importerSetters.length; i++)\n importerSetters[i](ns);\n return value;\n }\n const declared = registration[1](_export, registration[1].length === 2 ? {\n import: function (importId) {\n return loader.import(importId, id);\n },\n meta: loader.createContext(id)\n } : undefined);\n load.e = declared.execute || function () {};\n return [registration[0], declared.setters || []];\n });\n\n const linkPromise = instantiatePromise\n .then(function (instantiation) {\n return Promise.all(instantiation[0].map(function (dep, i) {\n const setter = instantiation[1][i];\n return Promise.resolve(loader.resolve(dep, id))\n .then(function (depId) {\n const depLoad = getOrCreateLoad(loader, depId, id);\n // depLoad.I may be undefined for already-evaluated\n return Promise.resolve(depLoad.I)\n .then(function () {\n if (setter) {\n depLoad.i.push(setter);\n // only run early setters when there are hoisted exports of that module\n // the timing works here as pending hoisted export calls will trigger through importerSetters\n if (depLoad.h || !depLoad.I)\n setter(depLoad.n);\n }\n return depLoad;\n });\n })\n }))\n .then(function (depLoads) {\n load.d = depLoads;\n });\n });\n\n linkPromise.catch(function (err) {\n load.e = null;\n load.er = err;\n });\n\n // Capital letter = a promise function\n return load = loader[REGISTRY][id] = {\n id: id,\n // importerSetters, the setters functions registered to this dependency\n // we retain this to add more later\n i: importerSetters,\n // module namespace object\n n: ns,\n\n // instantiate\n I: instantiatePromise,\n // link\n L: linkPromise,\n // whether it has hoisted exports\n h: false,\n\n // On instantiate completion we have populated:\n // dependency load records\n d: undefined,\n // execution function\n // set to NULL immediately after execution (or on any failure) to indicate execution has happened\n // in such a case, C should be used, and E, I, L will be emptied\n e: undefined,\n\n // On execution we have populated:\n // the execution error if any\n er: undefined,\n // in the case of TLA, the execution promise\n E: undefined,\n\n // On execution, L, I, E cleared\n\n // Promise for top-level completion\n C: undefined\n };\n }\n\n function instantiateAll (loader, load, loaded) {\n if (!loaded[load.id]) {\n loaded[load.id] = true;\n // load.L may be undefined for already-instantiated\n return Promise.resolve(load.L)\n .then(function () {\n return Promise.all(load.d.map(function (dep) {\n return instantiateAll(loader, dep, loaded);\n }));\n })\n }\n }\n\n function topLevelLoad (loader, load) {\n return load.C = instantiateAll(loader, load, {})\n .then(function () {\n return postOrderExec(loader, load, {});\n })\n .then(function () {\n return load.n;\n });\n }\n\n // the closest we can get to call(undefined)\n const nullContext = Object.freeze(Object.create(null));\n\n // returns a promise if and only if a top-level await subgraph\n // throws on sync errors\n function postOrderExec (loader, load, seen) {\n if (seen[load.id])\n return;\n seen[load.id] = true;\n\n if (!load.e) {\n if (load.er)\n throw load.er;\n if (load.E)\n return load.E;\n return;\n }\n\n // deps execute first, unless circular\n let depLoadPromises;\n load.d.forEach(function (depLoad) {\n {\n const depLoadPromise = postOrderExec(loader, depLoad, seen);\n if (depLoadPromise)\n (depLoadPromises = depLoadPromises || []).push(depLoadPromise);\n }\n });\n if (depLoadPromises)\n return Promise.all(depLoadPromises).then(doExec);\n\n return doExec();\n\n function doExec () {\n try {\n let execPromise = load.e.call(nullContext);\n if (execPromise) {\n execPromise = execPromise.then(function () {\n load.C = load.n;\n load.E = null;\n });\n return load.E = load.E || execPromise;\n }\n // (should be a promise, but a minify optimization to leave out Promise.resolve)\n load.C = load.n;\n }\n catch (err) {\n load.er = err;\n throw err;\n }\n finally {\n load.L = load.I = undefined;\n load.e = null;\n }\n }\n }\n\n envGlobal.System = new SystemJS();\n\n /*\n * Supports loading System.register via script tag injection\n */\n\n const systemRegister = systemJSPrototype.register;\n systemJSPrototype.register = function (deps, declare) {\n systemRegister.call(this, deps, declare);\n };\n\n systemJSPrototype.createScript = function (url) {\n const script = document.createElement('script');\n script.charset = 'utf-8';\n script.async = true;\n script.crossOrigin = 'anonymous';\n script.src = url;\n return script;\n };\n\n let lastWindowErrorUrl, lastWindowError;\n if (hasDocument)\n window.addEventListener('error', function (evt) {\n lastWindowErrorUrl = evt.filename;\n lastWindowError = evt.error;\n });\n\n systemJSPrototype.instantiate = function (url, firstParentUrl) {\n const loader = this;\n return new Promise(function (resolve, reject) {\n const script = systemJSPrototype.createScript(url);\n script.addEventListener('error', function () {\n reject(Error('Error loading ' + url + (firstParentUrl ? ' from ' + firstParentUrl : '')));\n });\n script.addEventListener('load', function () {\n document.head.removeChild(script);\n // Note that if an error occurs that isn't caught by this if statement,\n // that getRegister will return null and a \"did not instantiate\" error will be thrown.\n if (lastWindowErrorUrl === url) {\n reject(lastWindowError);\n }\n else {\n resolve(loader.getRegister());\n }\n });\n document.head.appendChild(script);\n });\n };\n\n if (hasDocument) {\n window.addEventListener('DOMContentLoaded', loadScriptModules);\n loadScriptModules();\n }\n\n function loadScriptModules() {\n Array.prototype.forEach.call(\n document.querySelectorAll('script[type=systemjs-module]'), function (script) {\n if (script.src) {\n System.import(script.src.slice(0, 7) === 'import:' ? script.src.slice(7) : resolveUrl(script.src, baseUrl));\n }\n });\n }\n\n /*\n * Supports loading System.register in workers\n */\n\n if (hasSelf && typeof importScripts === 'function')\n systemJSPrototype.instantiate = function (url) {\n const loader = this;\n return new Promise(function (resolve, reject) {\n try {\n importScripts(url);\n }\n catch (e) {\n reject(e);\n }\n resolve(loader.getRegister());\n });\n };\n\n systemJSPrototype.resolve = function (id, parentUrl) {\n const resolved = resolveIfNotPlainOrUrl(id, parentUrl || baseUrl);\n if (!resolved) {\n if (id.indexOf(':') !== -1)\n return Promise.resolve(id);\n throw Error('Cannot resolve \"' + id + (parentUrl ? '\" from ' + parentUrl : '\"'));\n }\n return Promise.resolve(resolved);\n };\n\n}());\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://bootstrap/./node_modules/systemjs/dist/s.js?"); +eval("/* WEBPACK VAR INJECTION */(function(global) {/*\n* SystemJS 6.2.2\n*/\n(function () {\n const hasSelf = typeof self !== 'undefined';\n\n const hasDocument = typeof document !== 'undefined';\n\n const envGlobal = hasSelf ? self : global;\n\n let baseUrl;\n\n if (hasDocument) {\n const baseEl = document.querySelector('base[href]');\n if (baseEl)\n baseUrl = baseEl.href;\n }\n\n if (!baseUrl && typeof location !== 'undefined') {\n baseUrl = location.href.split('#')[0].split('?')[0];\n const lastSepIndex = baseUrl.lastIndexOf('/');\n if (lastSepIndex !== -1)\n baseUrl = baseUrl.slice(0, lastSepIndex + 1);\n }\n\n const backslashRegEx = /\\\\/g;\n function resolveIfNotPlainOrUrl (relUrl, parentUrl) {\n if (relUrl.indexOf('\\\\') !== -1)\n relUrl = relUrl.replace(backslashRegEx, '/');\n // protocol-relative\n if (relUrl[0] === '/' && relUrl[1] === '/') {\n return parentUrl.slice(0, parentUrl.indexOf(':') + 1) + relUrl;\n }\n // relative-url\n else if (relUrl[0] === '.' && (relUrl[1] === '/' || relUrl[1] === '.' && (relUrl[2] === '/' || relUrl.length === 2 && (relUrl += '/')) ||\n relUrl.length === 1 && (relUrl += '/')) ||\n relUrl[0] === '/') {\n const parentProtocol = parentUrl.slice(0, parentUrl.indexOf(':') + 1);\n // Disabled, but these cases will give inconsistent results for deep backtracking\n //if (parentUrl[parentProtocol.length] !== '/')\n // throw Error('Cannot resolve');\n // read pathname from parent URL\n // pathname taken to be part after leading \"/\"\n let pathname;\n if (parentUrl[parentProtocol.length + 1] === '/') {\n // resolving to a :// so we need to read out the auth and host\n if (parentProtocol !== 'file:') {\n pathname = parentUrl.slice(parentProtocol.length + 2);\n pathname = pathname.slice(pathname.indexOf('/') + 1);\n }\n else {\n pathname = parentUrl.slice(8);\n }\n }\n else {\n // resolving to :/ so pathname is the /... part\n pathname = parentUrl.slice(parentProtocol.length + (parentUrl[parentProtocol.length] === '/'));\n }\n\n if (relUrl[0] === '/')\n return parentUrl.slice(0, parentUrl.length - pathname.length - 1) + relUrl;\n\n // join together and split for removal of .. and . segments\n // looping the string instead of anything fancy for perf reasons\n // '../../../../../z' resolved to 'x/y' is just 'z'\n const segmented = pathname.slice(0, pathname.lastIndexOf('/') + 1) + relUrl;\n\n const output = [];\n let segmentIndex = -1;\n for (let i = 0; i < segmented.length; i++) {\n // busy reading a segment - only terminate on '/'\n if (segmentIndex !== -1) {\n if (segmented[i] === '/') {\n output.push(segmented.slice(segmentIndex, i + 1));\n segmentIndex = -1;\n }\n }\n\n // new segment - check if it is relative\n else if (segmented[i] === '.') {\n // ../ segment\n if (segmented[i + 1] === '.' && (segmented[i + 2] === '/' || i + 2 === segmented.length)) {\n output.pop();\n i += 2;\n }\n // ./ segment\n else if (segmented[i + 1] === '/' || i + 1 === segmented.length) {\n i += 1;\n }\n else {\n // the start of a new segment as below\n segmentIndex = i;\n }\n }\n // it is the start of a new segment\n else {\n segmentIndex = i;\n }\n }\n // finish reading out the last segment\n if (segmentIndex !== -1)\n output.push(segmented.slice(segmentIndex));\n return parentUrl.slice(0, parentUrl.length - pathname.length) + output.join('');\n }\n }\n\n /*\n * Import maps implementation\n *\n * To make lookups fast we pre-resolve the entire import map\n * and then match based on backtracked hash lookups\n *\n */\n\n function resolveUrl (relUrl, parentUrl) {\n return resolveIfNotPlainOrUrl(relUrl, parentUrl) || (relUrl.indexOf(':') !== -1 ? relUrl : resolveIfNotPlainOrUrl('./' + relUrl, parentUrl));\n }\n\n function objectAssign (to, from) {\n for (let p in from)\n to[p] = from[p];\n return to;\n }\n\n function resolveAndComposePackages (packages, outPackages, baseUrl, parentMap, parentUrl) {\n for (let p in packages) {\n const resolvedLhs = resolveIfNotPlainOrUrl(p, baseUrl) || p;\n const rhs = packages[p];\n // package fallbacks not currently supported\n if (typeof rhs !== 'string')\n continue;\n const mapped = resolveImportMap(parentMap, resolveIfNotPlainOrUrl(rhs, baseUrl) || rhs, parentUrl);\n if (!mapped)\n targetWarning(p, rhs, 'bare specifier did not resolve');\n else\n outPackages[resolvedLhs] = mapped;\n }\n }\n\n function resolveAndComposeImportMap (json, baseUrl, parentMap) {\n const outMap = { imports: objectAssign({}, parentMap.imports), scopes: objectAssign({}, parentMap.scopes) };\n\n if (json.imports)\n resolveAndComposePackages(json.imports, outMap.imports, baseUrl, parentMap, null);\n\n if (json.scopes)\n for (let s in json.scopes) {\n const resolvedScope = resolveUrl(s, baseUrl);\n resolveAndComposePackages(json.scopes[s], outMap.scopes[resolvedScope] || (outMap.scopes[resolvedScope] = {}), baseUrl, parentMap, resolvedScope);\n }\n\n return outMap;\n }\n\n function getMatch (path, matchObj) {\n if (matchObj[path])\n return path;\n let sepIndex = path.length;\n do {\n const segment = path.slice(0, sepIndex + 1);\n if (segment in matchObj)\n return segment;\n } while ((sepIndex = path.lastIndexOf('/', sepIndex - 1)) !== -1)\n }\n\n function applyPackages (id, packages) {\n const pkgName = getMatch(id, packages);\n if (pkgName) {\n const pkg = packages[pkgName];\n if (pkg === null) return;\n if (id.length > pkgName.length && pkg[pkg.length - 1] !== '/')\n targetWarning(pkgName, pkg, \"should have a trailing '/'\");\n else\n return pkg + id.slice(pkgName.length);\n }\n }\n\n function targetWarning (match, target, msg) {\n console.warn(\"Package target \" + msg + \", resolving target '\" + target + \"' for \" + match);\n }\n\n function resolveImportMap (importMap, resolvedOrPlain, parentUrl) {\n let scopeUrl = parentUrl && getMatch(parentUrl, importMap.scopes);\n while (scopeUrl) {\n const packageResolution = applyPackages(resolvedOrPlain, importMap.scopes[scopeUrl]);\n if (packageResolution)\n return packageResolution;\n scopeUrl = getMatch(scopeUrl.slice(0, scopeUrl.lastIndexOf('/')), importMap.scopes);\n }\n return applyPackages(resolvedOrPlain, importMap.imports) || resolvedOrPlain.indexOf(':') !== -1 && resolvedOrPlain;\n }\n\n /*\n * SystemJS Core\n * \n * Provides\n * - System.import\n * - System.register support for\n * live bindings, function hoisting through circular references,\n * reexports, dynamic import, import.meta.url, top-level await\n * - System.getRegister to get the registration\n * - Symbol.toStringTag support in Module objects\n * - Hookable System.createContext to customize import.meta\n * - System.onload(err, id, deps) handler for tracing / hot-reloading\n * \n * Core comes with no System.prototype.resolve or\n * System.prototype.instantiate implementations\n */\n\n const hasSymbol = typeof Symbol !== 'undefined';\n const toStringTag = hasSymbol && Symbol.toStringTag;\n const REGISTRY = hasSymbol ? Symbol() : '@';\n\n function SystemJS () {\n this[REGISTRY] = {};\n }\n\n const systemJSPrototype = SystemJS.prototype;\n\n systemJSPrototype.prepareImport = function () {};\n\n systemJSPrototype.import = function (id, parentUrl) {\n const loader = this;\n return Promise.resolve(loader.prepareImport())\n .then(function() {\n return loader.resolve(id, parentUrl);\n })\n .then(function (id) {\n const load = getOrCreateLoad(loader, id);\n return load.C || topLevelLoad(loader, load);\n });\n };\n\n // Hookable createContext function -> allowing eg custom import meta\n systemJSPrototype.createContext = function (parentId) {\n return {\n url: parentId\n };\n };\n\n // onLoad(err, id, deps) provided for tracing / hot-reloading\n systemJSPrototype.onload = function () {};\n function loadToId (load) {\n return load.id;\n }\n function triggerOnload (loader, load, err) {\n loader.onload(err, load.id, load.d && load.d.map(loadToId));\n if (err)\n throw err;\n }\n\n let lastRegister;\n systemJSPrototype.register = function (deps, declare) {\n lastRegister = [deps, declare];\n };\n\n /*\n * getRegister provides the last anonymous System.register call\n */\n systemJSPrototype.getRegister = function () {\n const _lastRegister = lastRegister;\n lastRegister = undefined;\n return _lastRegister;\n };\n\n function getOrCreateLoad (loader, id, firstParentUrl) {\n let load = loader[REGISTRY][id];\n if (load)\n return load;\n\n const importerSetters = [];\n const ns = Object.create(null);\n if (toStringTag)\n Object.defineProperty(ns, toStringTag, { value: 'Module' });\n \n let instantiatePromise = Promise.resolve()\n .then(function () {\n return loader.instantiate(id, firstParentUrl);\n })\n .then(function (registration) {\n if (!registration)\n throw Error('Module ' + id + ' did not instantiate');\n function _export (name, value) {\n // note if we have hoisted exports (including reexports)\n load.h = true;\n let changed = false;\n if (typeof name !== 'object') {\n if (!(name in ns) || ns[name] !== value) {\n ns[name] = value;\n changed = true;\n }\n }\n else {\n for (let p in name) {\n let value = name[p];\n if (!(p in ns) || ns[p] !== value) {\n ns[p] = value;\n changed = true;\n }\n }\n\n if (name.__esModule) {\n ns.__esModule = name.__esModule;\n }\n }\n if (changed)\n for (let i = 0; i < importerSetters.length; i++)\n importerSetters[i](ns);\n return value;\n }\n const declared = registration[1](_export, registration[1].length === 2 ? {\n import: function (importId) {\n return loader.import(importId, id);\n },\n meta: loader.createContext(id)\n } : undefined);\n load.e = declared.execute || function () {};\n return [registration[0], declared.setters || []];\n });\n\n instantiatePromise = instantiatePromise.catch(function (err) {\n triggerOnload(loader, load, err);\n });\n\n const linkPromise = instantiatePromise\n .then(function (instantiation) {\n return Promise.all(instantiation[0].map(function (dep, i) {\n const setter = instantiation[1][i];\n return Promise.resolve(loader.resolve(dep, id))\n .then(function (depId) {\n const depLoad = getOrCreateLoad(loader, depId, id);\n // depLoad.I may be undefined for already-evaluated\n return Promise.resolve(depLoad.I)\n .then(function () {\n if (setter) {\n depLoad.i.push(setter);\n // only run early setters when there are hoisted exports of that module\n // the timing works here as pending hoisted export calls will trigger through importerSetters\n if (depLoad.h || !depLoad.I)\n setter(depLoad.n);\n }\n return depLoad;\n });\n })\n }))\n .then(function (depLoads) {\n load.d = depLoads;\n });\n });\n\n linkPromise.catch(function (err) {\n load.e = null;\n load.er = err;\n });\n\n // Capital letter = a promise function\n return load = loader[REGISTRY][id] = {\n id: id,\n // importerSetters, the setters functions registered to this dependency\n // we retain this to add more later\n i: importerSetters,\n // module namespace object\n n: ns,\n\n // instantiate\n I: instantiatePromise,\n // link\n L: linkPromise,\n // whether it has hoisted exports\n h: false,\n\n // On instantiate completion we have populated:\n // dependency load records\n d: undefined,\n // execution function\n // set to NULL immediately after execution (or on any failure) to indicate execution has happened\n // in such a case, C should be used, and E, I, L will be emptied\n e: undefined,\n\n // On execution we have populated:\n // the execution error if any\n er: undefined,\n // in the case of TLA, the execution promise\n E: undefined,\n\n // On execution, L, I, E cleared\n\n // Promise for top-level completion\n C: undefined\n };\n }\n\n function instantiateAll (loader, load, loaded) {\n if (!loaded[load.id]) {\n loaded[load.id] = true;\n // load.L may be undefined for already-instantiated\n return Promise.resolve(load.L)\n .then(function () {\n return Promise.all(load.d.map(function (dep) {\n return instantiateAll(loader, dep, loaded);\n }));\n })\n }\n }\n\n function topLevelLoad (loader, load) {\n return load.C = instantiateAll(loader, load, {})\n .then(function () {\n return postOrderExec(loader, load, {});\n })\n .then(function () {\n return load.n;\n });\n }\n\n // the closest we can get to call(undefined)\n const nullContext = Object.freeze(Object.create(null));\n\n // returns a promise if and only if a top-level await subgraph\n // throws on sync errors\n function postOrderExec (loader, load, seen) {\n if (seen[load.id])\n return;\n seen[load.id] = true;\n\n if (!load.e) {\n if (load.er)\n throw load.er;\n if (load.E)\n return load.E;\n return;\n }\n\n // deps execute first, unless circular\n let depLoadPromises;\n load.d.forEach(function (depLoad) {\n {\n try {\n const depLoadPromise = postOrderExec(loader, depLoad, seen);\n if (depLoadPromise) {\n depLoadPromise.catch(function (err) {\n triggerOnload(loader, load, err);\n });\n (depLoadPromises = depLoadPromises || []).push(depLoadPromise);\n }\n }\n catch (err) {\n triggerOnload(loader, load, err);\n }\n }\n });\n if (depLoadPromises)\n return Promise.all(depLoadPromises).then(doExec);\n\n return doExec();\n\n function doExec () {\n try {\n let execPromise = load.e.call(nullContext);\n if (execPromise) {\n execPromise = execPromise.then(function () {\n load.C = load.n;\n load.E = null; // indicates completion\n triggerOnload(loader, load, null);\n }, function (err) {\n triggerOnload(loader, load, err);\n });\n return load.E = load.E || execPromise;\n }\n // (should be a promise, but a minify optimization to leave out Promise.resolve)\n load.C = load.n;\n triggerOnload(loader, load, null);\n }\n catch (err) {\n triggerOnload(loader, load, err);\n load.er = err;\n throw err;\n }\n finally {\n load.L = load.I = undefined;\n load.e = null;\n }\n }\n }\n\n envGlobal.System = new SystemJS();\n\n /*\n * Import map support for SystemJS\n * \n * \n * OR\n * \n * \n * Only those import maps available at the time of SystemJS initialization will be loaded\n * and they will be loaded in DOM order.\n * \n * There is no support for dynamic import maps injection currently.\n */\n\n let importMap = { imports: {}, scopes: {} }, importMapPromise;\n\n if (hasDocument) {\n Array.prototype.forEach.call(document.querySelectorAll('script[type=\"systemjs-importmap\"][src]'), function (script) {\n script._j = fetch(script.src).then(function (res) {\n return res.json();\n });\n });\n }\n\n systemJSPrototype.prepareImport = function () {\n if (!importMapPromise) {\n importMapPromise = Promise.resolve();\n if (hasDocument)\n Array.prototype.forEach.call(document.querySelectorAll('script[type=\"systemjs-importmap\"]'), function (script) {\n importMapPromise = importMapPromise.then(function () {\n return (script._j || script.src && fetch(script.src).then(function (resp) { return resp.json(); }) || Promise.resolve(JSON.parse(script.innerHTML)))\n .then(function (json) {\n importMap = resolveAndComposeImportMap(json, script.src || baseUrl, importMap);\n });\n });\n });\n }\n return importMapPromise;\n };\n\n systemJSPrototype.resolve = function (id, parentUrl) {\n parentUrl = parentUrl || baseUrl;\n return resolveImportMap(importMap, resolveIfNotPlainOrUrl(id, parentUrl) || id, parentUrl) || throwUnresolved(id, parentUrl);\n };\n\n function throwUnresolved (id, parentUrl) {\n throw Error(\"Unable to resolve specifier '\" + id + (parentUrl ? \"' from \" + parentUrl : \"'\"));\n }\n\n /*\n * Supports loading System.register via script tag injection\n */\n\n const systemRegister = systemJSPrototype.register;\n systemJSPrototype.register = function (deps, declare) {\n systemRegister.call(this, deps, declare);\n };\n\n systemJSPrototype.createScript = function (url) {\n const script = document.createElement('script');\n script.charset = 'utf-8';\n script.async = true;\n script.crossOrigin = 'anonymous';\n script.src = url;\n return script;\n };\n\n let lastWindowErrorUrl, lastWindowError;\n if (hasDocument)\n window.addEventListener('error', function (evt) {\n lastWindowErrorUrl = evt.filename;\n lastWindowError = evt.error;\n });\n\n systemJSPrototype.instantiate = function (url, firstParentUrl) {\n const loader = this;\n return new Promise(function (resolve, reject) {\n const script = systemJSPrototype.createScript(url);\n script.addEventListener('error', function () {\n reject(Error('Error loading ' + url + (firstParentUrl ? ' from ' + firstParentUrl : '')));\n });\n script.addEventListener('load', function () {\n document.head.removeChild(script);\n // Note that if an error occurs that isn't caught by this if statement,\n // that getRegister will return null and a \"did not instantiate\" error will be thrown.\n if (lastWindowErrorUrl === url) {\n reject(lastWindowError);\n }\n else {\n resolve(loader.getRegister());\n }\n });\n document.head.appendChild(script);\n });\n };\n\n if (hasDocument) {\n window.addEventListener('DOMContentLoaded', loadScriptModules);\n loadScriptModules();\n }\n\n function loadScriptModules() {\n Array.prototype.forEach.call(\n document.querySelectorAll('script[type=systemjs-module]'), function (script) {\n if (script.src) {\n System.import(script.src.slice(0, 7) === 'import:' ? script.src.slice(7) : resolveUrl(script.src, baseUrl));\n }\n });\n }\n\n /*\n * Supports loading System.register in workers\n */\n\n if (hasSelf && typeof importScripts === 'function')\n systemJSPrototype.instantiate = function (url) {\n const loader = this;\n return new Promise(function (resolve, reject) {\n try {\n importScripts(url);\n }\n catch (e) {\n reject(e);\n }\n resolve(loader.getRegister());\n });\n };\n\n /*\n * SystemJS global script loading support\n * Extra for the s.js build only\n * (Included by default in system.js build)\n */\n (function (global) {\n const systemJSPrototype = global.System.constructor.prototype;\n const isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n // safari unpredictably lists some new globals first or second in object order\n let firstGlobalProp, secondGlobalProp, lastGlobalProp;\n function getGlobalProp () {\n let cnt = 0;\n let lastProp;\n for (let p in global) {\n // do not check frames cause it could be removed during import\n if (\n !global.hasOwnProperty(p)\n || (!isNaN(p) && p < global.length)\n || (isIE && global[p] && global[p].parent === window)\n )\n continue;\n if (cnt === 0 && p !== firstGlobalProp || cnt === 1 && p !== secondGlobalProp)\n return p;\n cnt++;\n lastProp = p;\n }\n if (lastProp !== lastGlobalProp)\n return lastProp;\n }\n\n function noteGlobalProps () {\n // alternatively Object.keys(global).pop()\n // but this may be faster (pending benchmarks)\n firstGlobalProp = secondGlobalProp = undefined;\n for (let p in global) {\n // do not check frames cause it could be removed during import\n if (\n !global.hasOwnProperty(p)\n || (!isNaN(p) && p < global.length)\n || (isIE && global[p] && global[p].parent === window)\n )\n continue;\n if (!firstGlobalProp)\n firstGlobalProp = p;\n else if (!secondGlobalProp)\n secondGlobalProp = p;\n lastGlobalProp = p;\n }\n return lastGlobalProp;\n }\n\n const impt = systemJSPrototype.import;\n systemJSPrototype.import = function (id, parentUrl) {\n noteGlobalProps();\n return impt.call(this, id, parentUrl);\n };\n\n const emptyInstantiation = [[], function () { return {} }];\n\n const getRegister = systemJSPrototype.getRegister;\n systemJSPrototype.getRegister = function () {\n const lastRegister = getRegister.call(this);\n if (lastRegister)\n return lastRegister;\n\n // no registration -> attempt a global detection as difference from snapshot\n // when multiple globals, we take the global value to be the last defined new global object property\n // for performance, this will not support multi-version / global collisions as previous SystemJS versions did\n // note in Edge, deleting and re-adding a global does not change its ordering\n const globalProp = getGlobalProp();\n if (!globalProp)\n return emptyInstantiation;\n\n let globalExport;\n try {\n globalExport = global[globalProp];\n }\n catch (e) {\n return emptyInstantiation;\n }\n\n return [[], function (_export) {\n return {\n execute: function () {\n _export({ default: globalExport, __useDefault: true });\n }\n };\n }];\n };\n })(typeof self !== 'undefined' ? self : global);\n\n /*\n * Loads JSON, CSS, Wasm module types based on file extensions\n * Supports application/javascript falling back to JS eval\n */\n (function(global) {\n const systemJSPrototype = global.System.constructor.prototype;\n const instantiate = systemJSPrototype.instantiate;\n\n const moduleTypesRegEx = /\\.(css|html|json|wasm)$/;\n systemJSPrototype.shouldFetch = function (url) {\n const path = url.split('?')[0].split('#')[0];\n const ext = path.slice(path.lastIndexOf('.'));\n return ext.match(moduleTypesRegEx);\n };\n systemJSPrototype.fetch = function (url) {\n return fetch(url);\n };\n\n systemJSPrototype.instantiate = function (url, parent) {\n const loader = this;\n if (this.shouldFetch(url)) {\n return this.fetch(url)\n .then(function (res) {\n if (!res.ok)\n throw Error(res.status + ' ' + res.statusText + ', loading ' + url + (parent ? ' from ' + parent : ''));\n const contentType = res.headers.get('content-type');\n if (contentType.match(/^(text|application)\\/(x-)?javascript(;|$)/)) {\n return res.text().then(function (source) {\n (0, eval)(source);\n return loader.getRegister();\n });\n }\n else if (contentType.match(/^application\\/json(;|$)/)) {\n return res.text().then(function (source) {\n return [[], function (_export) {\n return {\n execute: function () {\n _export('default', JSON.parse(source));\n }\n };\n }];\n });\n }\n else if (contentType.match(/^text\\/css(;|$)/)) {\n return res.text().then(function (source) {\n return [[], function (_export) {\n return {\n execute: function () {\n // Relies on a Constructable Stylesheet polyfill\n const stylesheet = new CSSStyleSheet();\n stylesheet.replaceSync(source);\n _export('default', stylesheet);\n }\n };\n }];\n }); \n }\n else if (contentType.match(/^application\\/wasm(;|$)/)) {\n return (WebAssembly.compileStreaming ? WebAssembly.compileStreaming(res) : res.arrayBuffer().then(WebAssembly.compile))\n .then(function (module) {\n const deps = [];\n const setters = [];\n const importObj = {};\n \n // we can only set imports if supported (eg early Safari doesnt support)\n if (WebAssembly.Module.imports)\n WebAssembly.Module.imports(module).forEach(function (impt) {\n const key = impt.module;\n if (deps.indexOf(key) === -1) {\n deps.push(key);\n setters.push(function (m) {\n importObj[key] = m;\n });\n }\n });\n \n return [deps, function (_export) {\n return {\n setters: setters,\n execute: function () {\n return WebAssembly.instantiate(module, importObj)\n .then(function (instance) {\n _export(instance.exports);\n });\n }\n };\n }];\n });\n }\n else {\n throw new Error('Unknown module type \"' + contentType + '\"');\n }\n });\n }\n return instantiate.apply(this, arguments);\n };\n })(typeof self !== 'undefined' ? self : global);\n\n const toStringTag$1 = typeof Symbol !== 'undefined' && Symbol.toStringTag;\n\n systemJSPrototype.get = function (id) {\n const load = this[REGISTRY][id];\n if (load && load.e === null && !load.E) {\n if (load.er)\n return null;\n return load.n;\n }\n };\n\n systemJSPrototype.set = function (id, module) {\n let ns;\n if (toStringTag$1 && module[toStringTag$1] === 'Module') {\n ns = module;\n }\n else {\n ns = Object.assign(Object.create(null), module);\n if (toStringTag$1)\n Object.defineProperty(ns, toStringTag$1, { value: 'Module' });\n }\n\n const done = Promise.resolve(ns);\n\n const load = this[REGISTRY][id] || (this[REGISTRY][id] = {\n id: id,\n i: [],\n h: false,\n d: [],\n e: null,\n er: undefined,\n E: undefined\n });\n\n if (load.e || load.E)\n return false;\n \n Object.assign(load, {\n n: ns,\n I: undefined,\n L: undefined,\n C: done\n });\n return ns;\n };\n\n systemJSPrototype.has = function (id) {\n const load = this[REGISTRY][id];\n return !!load;\n };\n\n // Delete function provided for hot-reloading use cases\n systemJSPrototype.delete = function (id) {\n const registry = this[REGISTRY];\n const load = registry[id];\n // in future we can support load.E case by failing load first\n // but that will require TLA callbacks to be implemented\n if (!load || load.e !== null || load.E)\n return false;\n\n let importerSetters = load.i;\n // remove from importerSetters\n // (release for gc)\n if (load.d)\n load.d.forEach(function (depLoad) {\n const importerIndex = depLoad.i.indexOf(load);\n if (importerIndex !== -1)\n depLoad.i.splice(importerIndex, 1);\n });\n delete registry[id];\n return function () {\n const load = registry[id];\n if (!load || !importerSetters || load.e !== null || load.E)\n return false;\n // add back the old setters\n importerSetters.forEach(function (setter) {\n load.i.push(setter);\n setter(load.n);\n });\n importerSetters = null;\n };\n };\n\n const iterator = typeof Symbol !== 'undefined' && Symbol.iterator;\n\n systemJSPrototype.entries = function () {\n const loader = this, keys = Object.keys(loader[REGISTRY]);\n let index = 0, ns, key;\n const result = {\n next: function () {\n while (\n (key = keys[index++]) !== undefined && \n (ns = loader.get(key)) === undefined\n );\n return {\n done: key === undefined,\n value: key !== undefined && [key, ns]\n };\n }\n };\n\n result[iterator] = function() { return this };\n\n return result;\n };\n\n}());\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://bootstrap/./node_modules/systemjs/dist/system.js?"); /***/ }), @@ -245,7 +245,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__webpack_require__(/*! systemjs/dist/s */ \"./node_modules/systemjs/dist/s.js\");\n__webpack_require__(/*! systemjs/dist/extras/amd */ \"./node_modules/systemjs/dist/extras/amd.js\");\n__webpack_require__(/*! systemjs/dist/extras/named-register */ \"./node_modules/systemjs/dist/extras/named-register.js\");\n__webpack_require__(/*! systemjs/dist/extras/named-exports */ \"./node_modules/systemjs/dist/extras/named-exports.js\");\n__webpack_require__(/*! systemjs/dist/extras/transform */ \"./node_modules/systemjs/dist/extras/transform.js\");\nconst history_1 = __webpack_require__(/*! history */ \"./node_modules/history/esm/history.js\");\nconst apps_1 = __webpack_require__(/*! ./apps */ \"./src/apps.ts\");\nconst virtual_module_1 = __webpack_require__(/*! ./virtual-module */ \"./src/virtual-module.ts\");\nconst systemJSImport = (requestUrl) => __awaiter(void 0, void 0, void 0, function* () {\n const { default: component, mount, unmount } = yield System.import(requestUrl);\n return { component, mount, unmount };\n});\n// const defaultNavigations = {\n// login: '/login',\n// main: '/main',\n// news: '/news',\n// org: '/org',\n// sections: '/sections',\n// 'news.details': '/news/{{id}}',\n// 'org.details': '/org/{{name}}',\n// 'sections.details': '/sections/{{name}}'\n// }\n// const defaultApps = {\n// login: { version: '1.0.0', name: 'login' },\n// main: { version: '1.0.1', name: 'main' },\n// news: { version: '1.0.0', name: 'news' },\n// org: { version: '1.0.0', name: 'org' },\n// sections: { version: '1.0.0', name: 'sections' }\n// }\nexports.default = ({ apps: rawApps, navigations, config }) => __awaiter(void 0, void 0, void 0, function* () {\n virtual_module_1.defineVirtualModule({ navigations, config });\n const apps = new apps_1.Apps(rawApps);\n const history = history_1.createBrowserHistory();\n let prevPathname = window.location.pathname;\n const app = apps.findApp(history.location.pathname);\n const publicPath = `/${app.name}/${app.version}`;\n __webpack_require__.p = `${config.baseUrl}${publicPath}${__webpack_require__.p}`;\n const appPath = `${config.baseUrl}${publicPath}/index.js`;\n const { component, mount, unmount } = yield systemJSImport(appPath);\n mount(component.default);\n history.listen((location) => {\n if (location.pathname !== prevPathname) {\n prevPathname = location.pathname;\n unmount();\n }\n });\n});\n\n\n//# sourceURL=webpack://bootstrap/./src/main.ts?"); +eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__webpack_require__(/*! systemjs/dist/system */ \"./node_modules/systemjs/dist/system.js\");\n__webpack_require__(/*! systemjs/dist/extras/amd */ \"./node_modules/systemjs/dist/extras/amd.js\");\n__webpack_require__(/*! systemjs/dist/extras/named-register */ \"./node_modules/systemjs/dist/extras/named-register.js\");\n__webpack_require__(/*! systemjs/dist/extras/named-exports */ \"./node_modules/systemjs/dist/extras/named-exports.js\");\n__webpack_require__(/*! systemjs/dist/extras/transform */ \"./node_modules/systemjs/dist/extras/transform.js\");\nconst history_1 = __webpack_require__(/*! history */ \"./node_modules/history/esm/history.js\");\nconst apps_1 = __webpack_require__(/*! ./apps */ \"./src/apps.ts\");\nconst virtual_module_1 = __webpack_require__(/*! ./virtual-module */ \"./src/virtual-module.ts\");\nconst systemJSImport = (requestUrl) => __awaiter(void 0, void 0, void 0, function* () {\n const { default: component, mount, unmount } = yield System.import(requestUrl);\n return { component, mount, unmount };\n});\n// const defaultNavigations = {\n// login: '/login',\n// main: '/main',\n// news: '/news',\n// org: '/org',\n// sections: '/sections',\n// 'news.details': '/news/{{id}}',\n// 'org.details': '/org/{{name}}',\n// 'sections.details': '/sections/{{name}}'\n// }\n// const defaultApps = {\n// login: { version: '1.0.0', name: 'login' },\n// main: { version: '1.0.1', name: 'main' },\n// news: { version: '1.0.0', name: 'news' },\n// org: { version: '1.0.0', name: 'org' },\n// sections: { version: '1.0.0', name: 'sections' }\n// }\nexports.default = ({ apps: rawApps, navigations, config }) => __awaiter(void 0, void 0, void 0, function* () {\n virtual_module_1.defineVirtualModule({ navigations, config });\n const apps = new apps_1.Apps(rawApps);\n const history = history_1.createBrowserHistory();\n let prevPathname = window.location.pathname;\n const app = apps.findApp(history.location.pathname);\n const publicPath = `/${app.name}/${app.version}`;\n __webpack_require__.p = `${config.baseUrl}${publicPath}${__webpack_require__.p}`;\n const appPath = `${config.baseUrl}${publicPath}/index.js`;\n const { component, mount, unmount } = yield systemJSImport(appPath);\n mount(component.default);\n history.listen((location) => {\n if (location.pathname !== prevPathname) {\n prevPathname = location.pathname;\n unmount();\n }\n });\n});\n\n\n//# sourceURL=webpack://bootstrap/./src/main.ts?"); /***/ }), @@ -257,7 +257,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("/* WEBPACK VAR INJECTION */(function(global) {\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defineVirtualModule = (params) => {\n const virtualModule = createVirtualModule(params);\n // @ts-ignore\n global.define('@ijl/fire.app', [], virtualModule);\n};\nconst createVirtualModule = ({ config, navigations }) => ({\n getConfig: () => config,\n getConfigValue: (key) => config[key],\n getNavigations: () => navigations,\n getNavigationsValue: (key) => navigations[key],\n});\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node_modules/webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://bootstrap/./src/virtual-module.ts?"); +eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst createVirtualModule = ({ config, navigations }) => ({\n getConfig: () => config,\n getConfigValue: (key) => config[key],\n getNavigations: () => navigations,\n getNavigationsValue: (key) => navigations[key],\n});\nexports.defineVirtualModule = (params) => {\n const virtualModule = createVirtualModule(params);\n // @ts-ignore\n System.set('root.scope', Object.assign({}, virtualModule));\n};\n\n\n//# sourceURL=webpack://bootstrap/./src/virtual-module.ts?"); /***/ }) diff --git a/src/main.ts b/src/main.ts index 73dfbc4..b3d71f3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,4 +1,4 @@ -import "systemjs/dist/s"; +import "systemjs/dist/system"; import "systemjs/dist/extras/amd"; import "systemjs/dist/extras/named-register"; import "systemjs/dist/extras/named-exports"; @@ -34,7 +34,7 @@ const systemJSImport = async (requestUrl: string) => { // } export default async ({ apps: rawApps, navigations, config }) => { - defineVirtualModule({navigations, config}) + defineVirtualModule({ navigations, config }) const apps = new Apps(rawApps) diff --git a/src/virtual-module.ts b/src/virtual-module.ts index 0a26da3..fe0dbd3 100644 --- a/src/virtual-module.ts +++ b/src/virtual-module.ts @@ -1,12 +1,15 @@ -export const defineVirtualModule = (params) => { - const virtualModule = createVirtualModule(params) - // @ts-ignore - global.define('@ijl/fire.app', [], virtualModule) -} - -const createVirtualModule = ({config, navigations}) => ({ +const createVirtualModule = ({ config, navigations }) => ({ getConfig: () => config, getConfigValue: (key) => config[key], getNavigations: () => navigations, getNavigationsValue: (key) => navigations[key], -}) \ No newline at end of file +}) + +export const defineVirtualModule = (params) => { + const virtualModule = createVirtualModule(params) + // @ts-ignore + System.set('root.scope', { + ...virtualModule + }); +} +