@ebay/muse-boot-default 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/dev/boot.js CHANGED
@@ -1025,6 +1025,7 @@ async function start() {
1025
1025
  // Exec init entries
1026
1026
  if (initEntries.length > 0) {
1027
1027
  _loading__WEBPACK_IMPORTED_MODULE_1__["default"].showMessage(`Executing init entries...`);
1028
+ initEntries.sort((a, b) => (a.order || 10) - (b.order || 10)); // sort by order
1028
1029
  for (const initEntry of initEntries) {
1029
1030
  // Allow an init entry to break the start of the app
1030
1031
  if ((await initEntry.func()) === false) return;
@@ -1 +1 @@
1
- {"version":3,"file":"boot.js","mappings":";;;;;;;;;AAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;ACxBA;AACA;AACA;;;;;;;;;;ACFA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;;;;;;;;;;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACNA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAEA;AACA;;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtIA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpFA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;;AAEA;AACA;AACA;AACA;AAGA;;AAEA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AAOA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AAGA;AACA;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AAUA;AACA;AACA;;AAUA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAEA;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACxXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;;;;;;;;;;;;;;;;ACnCA;AAEA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;AClDA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;;AAEA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;ACzLA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AC1BA;AACA;AACA;;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;AC9BA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AClBA;;;;;;;;;;;;;ACAA;AACA;AAEA","sources":["/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/buildCache.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/config.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/findMuseModule.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/getGlobal.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/index.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/museRequire.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/parseMuseId.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/register.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/style.css","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/runtime/api.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/runtime/sourceMaps.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/insertBySelector.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/insertStyleElement.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/styleDomAPI.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/styleTagTransform.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/boot.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/error.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/loading.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/msgEngine.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/registerSw.js","webpack://@ebay/muse-boot-default/./src/style.css?9935","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/urlListener.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/utils.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/bootstrap","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/compat get default export","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/define property getters","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/global","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/hasOwnProperty shorthand","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/make namespace object","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/publicPath","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/nonce","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/index.js"],"sourcesContent":["const parseMuseId = require('./parseMuseId');\n\n/* \n Group modules by module's id (pkgName/path) to support multiple versions.\n For example:\n cache: {\n 'loadash/lib/get.js': [\n { moduleId: 'lodash@1.0.1/lib/get.js, name, version, ...},\n { moduleId: 'lodash@4.0.0/lib/get.js, name, version, ...},\n ]\n }\n*/\nfunction buildCache(obj) {\n if (!obj.cache) obj.cache = {};\n if (!obj.modules) obj.modules = {};\n\n Object.keys(obj.modules).forEach((mid) => {\n const m = parseMuseId(mid);\n if (!m) return;\n if (!obj.cache[m.id]) obj.cache[m.id] = [];\n obj.cache[m.id].push(m);\n });\n}\n\nmodule.exports = buildCache;\n","const config = {\n matchVersion: 'all', // all|major|minor|patch\n};\n","const parseMuseId = require('./parseMuseId');\nconst buildCache = require('./buildCache');\nconst config = require('./config');\n\n// Get the version diff, e.g: [1,2,3] - [1,2,4] = [0,0,1]\nconst verDiff = (v1, v2) => [0, 1, 2].map((i) => Math.abs(v1[i] - v2[i]));\n\n// Whether ver1 is less than ver2, e.g: [1,2,3] < [1,2,4]\n// This can also be used to compare version diff from verDiff()\nconst lt = (v1, v2) => {\n for (let i = 0; i < 3; i++) {\n if (v1[i] < v2[i]) return true;\n if (v1[i] > v2[i]) return false;\n }\n return false;\n};\n\nconst gt = (v1, v2) => !lt(v1, v2);\n\n/**\n * Resolve module to the greater and closest semantic version.\n * If there is only one version, use it.\n * If there are multiple versions, use the closest but greater one.\n *\n * NOTE: it doesn't support prerelease versions. e.g: 1.0.0-beta.1 will be treated as 1.0.0\n *\n * @param {String} museId example: @ebay/nice-modal-react@1.0.0/src/index.js\n * @param {*} museSharedModules { modules, cache }\n * @returns\n */\nfunction findMuseModule(museId, museShared) {\n museId = museId.replace(/\\\\/g, '/').replace(/\\/+/g, '/');\n if (!museShared) museShared = MUSE_GLOBAL.__shared__;\n\n if (museShared.modules[museId]) {\n return museShared.modules[museId];\n }\n\n let cache = museShared.cache;\n\n if (!cache) {\n // group different versions by module id\n buildCache(museShared);\n cache = museShared.cache;\n }\n\n const m = parseMuseId(museId);\n\n if (!m) return null;\n const candidates = cache[m.id];\n if (!candidates) return null;\n let picked = candidates[0];\n let minDiff = verDiff(m.version, picked.version);\n\n for (let i = 1; i < candidates.length; i++) {\n const c = candidates[i];\n\n // if same version, use it\n if (m.version.join('.') === c.version.join('.')) {\n picked = c;\n break;\n }\n\n // apply match version config\n\n // Ensure picked version is grater than target version\n if (gt(picked.version, m.version) && lt(c.version, m.version)) continue;\n\n // The version diff between the current version and the target version\n const currentDiff = verDiff(c.version, m.version);\n\n if ((lt(picked.version, m.version) && gt(c.version, m.version)) || lt(currentDiff, minDiff)) {\n minDiff = currentDiff;\n picked = c;\n }\n }\n\n switch (config.matchVersion) {\n case 'major':\n if (minDiff[0] !== 0) return null;\n break;\n case 'minor':\n if (minDiff[0] !== 0 || minDiff[1] !== 0) return null;\n break;\n case 'patch':\n if (minDiff[0] !== 0 || minDiff[1] !== 0 || minDiff[2] !== 0) return null;\n break;\n case 'all':\n break;\n default:\n break;\n }\n\n return museShared.modules[picked.museId];\n}\n\nmodule.exports = findMuseModule;\n","const getGlobal = function () {\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n throw new Error('unable to locate global object');\n};\n\nmodule.exports = getGlobal();\n","module.exports = {\n config: require('./config'),\n require: require('./museRequire'),\n register: require('./register'),\n parseMuseId: require('./parseMuseId'),\n findMuseModule: require('./findMuseModule'),\n};\n","const findMuseModule = require('./findMuseModule');\n\nvar __muse_module_cache__ = {};\nmodule.exports = (museId) => {\n // Check if module is in cache\n var cachedModule = __muse_module_cache__[museId];\n if (!cachedModule) {\n museModule = cachedModule;\n __muse_module_cache__[museId] = findMuseModule(museId);\n }\n\n // Use module's require method to get the final module\n const m = __muse_module_cache__[museId];\n if (!m) throw new Error('Muse shared module not found: ' + museId);\n\n return m.__require__(m.id);\n};\n","/**\n * moduleId: muse module id example:\n * - lib1@1.0.3/src/index.js\n * - @ebay/nice-modal@1.2.3/src/index.ts // scoped package\n * - @ebay/nice-modal@1.2.3-alpha.1/src/index.ts // scoped package\n */\nfunction parseMuseId(museId) {\n try {\n const m = /((^@[^/]+\\/)?([^@/]+))@(\\d+)\\.(\\d+)\\.(\\d+)([^./][^/]*)?\\/(.+)$/.exec(museId);\n if (!m) return null;\n return {\n name: m[1],\n path: m[8],\n id: `${m[1]}/${m[8]}`,\n museId,\n version: m.slice(4, 7).map(Number),\n preRelease: m[7]?.replace('-', ''),\n };\n } catch (err) {\n return null;\n }\n}\n\nmodule.exports = parseMuseId;\n","const theGlobal = require('./getGlobal');\nconst parseMuseId = require('./parseMuseId');\n/**\n * Register modules to muse module system.\n *\n * @param {Object} modules Key value object for Muse modules.\n * @param {Function} __require__ used to require the actual module, for example: __webpack_require__\n */\nfunction register(modules, __require__) {\n for (const mid in modules) {\n // If it's not muse module, continue\n if (!parseMuseId(mid)) continue;\n const m = modules[mid];\n theGlobal.MUSE_GLOBAL.__shared__.modules[mid] = {\n id: mid,\n __require__,\n };\n }\n}\nmodule.exports = register;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `#muse-loading-node {\n position: fixed;\n display: grid;\n place-items: center;\n left: 0;\n top: 0%;\n width: 100%;\n height: 100%;\n z-index: 99999;\n /* background-color: #fff; */\n transition: opacity ease-out 0.3s;\n line-height: 1.5 !important;\n}\n\n#muse-loading-node .muse-loading-node-inner {\n position: relative;\n display: grid;\n place-items: center;\n}\n\n/* #muse-loading-node .muse-loading-node-inner > svg {\n width: 120px;\n height: 120px;\n} */\n\n#muse-loading-node .muse-loading-node-inner > img {\n position: absolute;\n width: 60px;\n}\n\n#muse-loading-node div > label {\n display: block;\n text-align: center;\n font-family: Helvetica, Arial, sans-serif;\n color: #888;\n font-size: 13px;\n}\n\n@keyframes ldio-klconu2768 {\n 0% {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(180deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.ldio-klconu2768 div {\n position: absolute;\n animation: ldio-klconu2768 1s linear infinite;\n width: 140px;\n height: 140px;\n top: 30px;\n left: 30px;\n border-radius: 50%;\n box-shadow: 0 4px 0 0 #00b4d8;\n transform-origin: 70px 72px;\n}\n.loadingio-spinner-eclipse-p5fn84x4bh8 {\n width: 200px;\n height: 200px;\n display: inline-block;\n overflow: hidden;\n}\n.ldio-klconu2768 {\n width: 100%;\n height: 100%;\n position: relative;\n transform: translateZ(0) scale(1);\n backface-visibility: hidden;\n transform-origin: 0 0; /* see note above */\n}\n.ldio-klconu2768 div {\n box-sizing: content-box;\n}\n/* generated by https://loading.io/ */\n\n#muse-error-node {\n position: fixed;\n left: 0;\n top: 0;\n height: 100%;\n width: 100%;\n font-family: Helvetica, Arial, sans-serif;\n color: red;\n line-height: 150%;\n font-size: 14px;\n display: grid;\n place-items: center;\n}\n\n#muse-error-node .muse-error-node-inner {\n min-width: 500px;\n max-width: 800px;\n border: 1px solid red;\n border-radius: 3px;\n padding: 15px;\n}\n#muse-error-node h4 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 16px;\n}\n#muse-error-node li {\n padding: 3px 0;\n}\n#muse-error-node p {\n color: #777;\n font-style: italic;\n font-size: 13px;\n}\n\n#muse-error-node p a {\n color: #039be5;\n text-decoration: none;\n}\n\n#muse-error-node p a:hover {\n text-decoration: underline;\n}\n\n.muse-theme-dark {\n background-color: #141414;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/style.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,eAAe;EACf,aAAa;EACb,mBAAmB;EACnB,OAAO;EACP,OAAO;EACP,WAAW;EACX,YAAY;EACZ,cAAc;EACd,4BAA4B;EAC5B,iCAAiC;EACjC,2BAA2B;AAC7B;;AAEA;EACE,kBAAkB;EAClB,aAAa;EACb,mBAAmB;AACrB;;AAEA;;;GAGG;;AAEH;EACE,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,cAAc;EACd,kBAAkB;EAClB,yCAAyC;EACzC,WAAW;EACX,eAAe;AACjB;;AAEA;EACE;IACE,uBAAuB;EACzB;EACA;IACE,yBAAyB;EAC3B;EACA;IACE,yBAAyB;EAC3B;AACF;AACA;EACE,kBAAkB;EAClB,6CAA6C;EAC7C,YAAY;EACZ,aAAa;EACb,SAAS;EACT,UAAU;EACV,kBAAkB;EAClB,6BAA6B;EAC7B,2BAA2B;AAC7B;AACA;EACE,YAAY;EACZ,aAAa;EACb,qBAAqB;EACrB,gBAAgB;AAClB;AACA;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,iCAAiC;EACjC,2BAA2B;EAC3B,qBAAqB,EAAE,mBAAmB;AAC5C;AACA;EACE,uBAAuB;AACzB;AACA,qCAAqC;;AAErC;EACE,eAAe;EACf,OAAO;EACP,MAAM;EACN,YAAY;EACZ,WAAW;EACX,yCAAyC;EACzC,UAAU;EACV,iBAAiB;EACjB,eAAe;EACf,aAAa;EACb,mBAAmB;AACrB;;AAEA;EACE,gBAAgB;EAChB,gBAAgB;EAChB,qBAAqB;EACrB,kBAAkB;EAClB,aAAa;AACf;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,eAAe;AACjB;AACA;EACE,cAAc;AAChB;AACA;EACE,WAAW;EACX,kBAAkB;EAClB,eAAe;AACjB;;AAEA;EACE,cAAc;EACd,qBAAqB;AACvB;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,yBAAyB;AAC3B\",\"sourcesContent\":[\"#muse-loading-node {\\n position: fixed;\\n display: grid;\\n place-items: center;\\n left: 0;\\n top: 0%;\\n width: 100%;\\n height: 100%;\\n z-index: 99999;\\n /* background-color: #fff; */\\n transition: opacity ease-out 0.3s;\\n line-height: 1.5 !important;\\n}\\n\\n#muse-loading-node .muse-loading-node-inner {\\n position: relative;\\n display: grid;\\n place-items: center;\\n}\\n\\n/* #muse-loading-node .muse-loading-node-inner > svg {\\n width: 120px;\\n height: 120px;\\n} */\\n\\n#muse-loading-node .muse-loading-node-inner > img {\\n position: absolute;\\n width: 60px;\\n}\\n\\n#muse-loading-node div > label {\\n display: block;\\n text-align: center;\\n font-family: Helvetica, Arial, sans-serif;\\n color: #888;\\n font-size: 13px;\\n}\\n\\n@keyframes ldio-klconu2768 {\\n 0% {\\n transform: rotate(0deg);\\n }\\n 50% {\\n transform: rotate(180deg);\\n }\\n 100% {\\n transform: rotate(360deg);\\n }\\n}\\n.ldio-klconu2768 div {\\n position: absolute;\\n animation: ldio-klconu2768 1s linear infinite;\\n width: 140px;\\n height: 140px;\\n top: 30px;\\n left: 30px;\\n border-radius: 50%;\\n box-shadow: 0 4px 0 0 #00b4d8;\\n transform-origin: 70px 72px;\\n}\\n.loadingio-spinner-eclipse-p5fn84x4bh8 {\\n width: 200px;\\n height: 200px;\\n display: inline-block;\\n overflow: hidden;\\n}\\n.ldio-klconu2768 {\\n width: 100%;\\n height: 100%;\\n position: relative;\\n transform: translateZ(0) scale(1);\\n backface-visibility: hidden;\\n transform-origin: 0 0; /* see note above */\\n}\\n.ldio-klconu2768 div {\\n box-sizing: content-box;\\n}\\n/* generated by https://loading.io/ */\\n\\n#muse-error-node {\\n position: fixed;\\n left: 0;\\n top: 0;\\n height: 100%;\\n width: 100%;\\n font-family: Helvetica, Arial, sans-serif;\\n color: red;\\n line-height: 150%;\\n font-size: 14px;\\n display: grid;\\n place-items: center;\\n}\\n\\n#muse-error-node .muse-error-node-inner {\\n min-width: 500px;\\n max-width: 800px;\\n border: 1px solid red;\\n border-radius: 3px;\\n padding: 15px;\\n}\\n#muse-error-node h4 {\\n margin-top: 0;\\n margin-bottom: 10px;\\n font-size: 16px;\\n}\\n#muse-error-node li {\\n padding: 3px 0;\\n}\\n#muse-error-node p {\\n color: #777;\\n font-style: italic;\\n font-size: 13px;\\n}\\n\\n#muse-error-node p a {\\n color: #039be5;\\n text-decoration: none;\\n}\\n\\n#muse-error-node p a:hover {\\n text-decoration: underline;\\n}\\n\\n.muse-theme-dark {\\n background-color: #141414;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {};\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","import museModules from '@ebay/muse-modules';\nimport loading from './loading';\nimport error from './error';\nimport registerSw from './registerSw';\nimport { loadInParallel, getPluginId } from './utils';\nimport msgEngine from './msgEngine';\nimport './urlListener';\nimport './style.css';\n\nasync function start() {\n // If MUSE_TEMP_temp-redirect-url has a value, then redirect to that url.\n // This is a one time redirect, so remove the value after redirecting.\n // It's used for sub app login flow.\n const tempRedirectUrl = window.sessionStorage.getItem('MUSE_TEMP_temp-redirect-url');\n if (tempRedirectUrl) {\n window.sessionStorage.removeItem('MUSE_TEMP_temp-redirect-url');\n window.location = tempRedirectUrl;\n return;\n }\n\n const mg = window.MUSE_GLOBAL;\n loading.showMessage('Starting...');\n const waitForLoaders = mg.waitForLoaders || [];\n\n // Get the config from both app and env\n // That is, app.config is the default, env.config can override any value on app.config\n const appConfig = Object.assign({}, mg.app?.config);\n Object.entries(mg.env?.config || {}).forEach(([key, value]) => {\n if (value !== null && value !== undefined && value !== '') {\n appConfig[key] = value;\n }\n });\n\n Object.assign(mg, {\n appVariables: mg.appVariables || {},\n pluginVariables: mg.pluginVariables || {},\n appConfig,\n msgEngine,\n loading,\n error,\n isSubApp: window.parent !== window,\n getUser: () => null,\n appEntries: mg.appEntries || [], // entries to start the app\n initEntries: mg.initEntries || [], // entries from init plugins\n pluginEntries: mg.pluginEntries || [], // entries from lib or normal plugins\n // Allow to register some func to wait for before starting the app\n waitFor: (asyncFuncOrPromise) => {\n waitForLoaders.push(asyncFuncOrPromise);\n },\n // TODO: get plugin assets public paths (assets in public folder)\n getPublicPath: (pluginName, assetPath) => {\n if (!assetPath) throw new Error('assetPath is required for getPublicPath method.');\n assetPath = assetPath.replace(/^\\/*/, '');\n const pluginId = getPluginId(pluginName);\n\n if (mg.isDev) {\n // for dev, check if there's local plugins\n const names = mg.plugins.find((p) => !!p.localPlugins)?.localPlugins;\n if (names && names.includes(pluginName)) {\n return `/muse-assets/local/p/${pluginId}/${assetPath}`;\n }\n }\n const currentPlugin = window.MUSE_GLOBAL.plugins?.find((p) => p.name === pluginName);\n if (!currentPlugin) return;\n let { version } = currentPlugin || {};\n if (!version.startsWith('v')) {\n version = `v${version}`;\n }\n let publicPath = `${window.MUSE_GLOBAL.cdn}/p/${pluginId}/${version}`;\n if (window.MUSE_GLOBAL.isDev || window.MUSE_GLOBAL.isLocal) {\n publicPath = publicPath + `/dev/${assetPath}`;\n } else {\n publicPath = publicPath + `/dist/${assetPath}`;\n }\n return publicPath;\n },\n // Muse shared modules global methods\n __shared__: {\n modules: {},\n register: museModules.register,\n require: museModules.require,\n parseMuseId: museModules.parseMuseId,\n },\n });\n\n const { cdn = '', initEntries, pluginEntries, appEntries, isDev = false, isE2eTest = false } = mg;\n let { plugins = [] } = window.MUSE_GLOBAL;\n\n // MUSE_CONFIG is for backward compatibility\n window.MUSE_CONFIG = mg;\n\n msgEngine.sendToParent({\n type: 'app-state-change',\n state: 'app-starting',\n // url: document.location.href,\n });\n\n registerSw();\n\n // Print app plugins in dev console\n const bootPlugin = plugins.find((p) => p.type === 'boot');\n if (bootPlugin) {\n console.log(\n `Loading Muse app by ${bootPlugin.name}@${bootPlugin.version || bootPlugin.url}...`,\n );\n }\n\n /* Handle forcePlugins query parameter */\n const searchParams = new URLSearchParams(window.location.search);\n const forcePluginStr = searchParams.get('forcePlugins');\n if (forcePluginStr) {\n const forcePluginById = forcePluginStr\n .split(';')\n .filter(Boolean)\n .reduce((p, c) => {\n const separator = '@';\n const limit = 2;\n let prefix = '';\n if (c.startsWith('@') && c[0] === separator) {\n // Starts with @, means it's a scoped plugin\n c = c.substring(1);\n prefix = '@';\n }\n const arr = c.split(separator, limit);\n if (arr.length === limit) {\n const [name, type] = arr[0].split('!');\n p[`${prefix}${name}`] = {\n version: arr[1],\n type: type,\n };\n }\n return p;\n }, {});\n // Update or remove plugins from the list based on forcePlugins\n plugins = plugins\n .map((p) => {\n if (!forcePluginById[p.name]) return p;\n const newPlugin = { ...p, version: forcePluginById[p.name].version };\n delete forcePluginById[p.name];\n return newPlugin;\n })\n .filter((p) => p.version !== 'null');\n\n // Need to get the type of plugin from muse registry directly.\n for (const p in forcePluginById) {\n if (forcePluginById[p].version !== 'null') {\n plugins.push({\n name: p,\n type: forcePluginById[p].type,\n version: forcePluginById[p].version,\n });\n }\n }\n }\n\n console.log(`Plugins(${plugins.length}):`);\n // If a plugin has isLocal, it means its bundle is loaded somewhere else.\n // The registered plugin item is used to provide configurations. e.g plugin variables.\n plugins.forEach((p) => {\n let source = '';\n if (p.linkedTo) source = 'Linked to: ' + p.linkedTo;\n else if (p.isLocalLib) {\n source = 'Local:' + (/\\d{4,}/.exec(p.url)?.[0] || document.location.port); // find port number\n } else if (p.url) source = p.url;\n if (source) source = ` (${source})`;\n\n console.log(` * ${p.name}@${p.version || 'local'}${source}`);\n });\n msgEngine.sendToParent({\n type: 'app-state-change',\n state: 'app-loading',\n });\n // Load init plugins\n // Init plugins should be small and not depend on each other\n const initPluginsToLoad = plugins\n .filter((p) => p.type === 'init')\n .map((p) => {\n return {\n url:\n p.isLocal || p.linkedTo\n ? false\n : p.url || `${cdn}/p/${getPluginId(p.name)}/v${p.version}/dist/main.js`,\n ...p,\n };\n })\n .filter(Boolean);\n\n // Load init plugins\n if (initPluginsToLoad.length > 0) {\n loading.showMessage(`Loading init plugins 1/${initPluginsToLoad.length}...`);\n await loadInParallel(initPluginsToLoad, (loadedCount) =>\n loading.showMessage(\n `Loading init plugins ${Math.min(loadedCount + 1, initPluginsToLoad.length)}/${\n initPluginsToLoad.length\n }...`,\n ),\n );\n }\n\n // Exec init entries\n if (initEntries.length > 0) {\n loading.showMessage(`Executing init entries...`);\n for (const initEntry of initEntries) {\n // Allow an init entry to break the start of the app\n if ((await initEntry.func()) === false) return;\n }\n }\n\n // NOTE: init plugins have the opportunity to modify plugins list.\n // It's an expected behavior for some permission control.\n\n // Load normal and lib plugins\n const bundleDir = isDev ? 'dev' : isE2eTest ? 'test' : 'dist';\n const pluginsToLoad = plugins\n .filter((p) => p.type !== 'boot' && p.type !== 'init')\n .map((p) => {\n return {\n url:\n p.isLocal || p.linkedTo\n ? false\n : p.url || `${cdn}/p/${getPluginId(p.name)}/v${p.version}/${bundleDir}/main.js`,\n ...p, // if a plugin already has url, always use it\n };\n })\n .filter(Boolean);\n\n // Load plugin bundles\n const libPluginsToLoad = pluginsToLoad.filter((p) => p.type === 'lib');\n loading.showMessage(`Loading lib plugins 1/${libPluginsToLoad.length}...`);\n await loadInParallel(\n libPluginsToLoad.filter((p) => !p.esModule),\n (loadedCount) =>\n loading.showMessage(\n `Loading lib plugins ${Math.min(loadedCount + 1, libPluginsToLoad.length)}/${\n libPluginsToLoad.length\n }...`,\n ),\n );\n\n const normalPluginsToLoad = pluginsToLoad.filter((p) => p.type === 'normal' || !p.type);\n loading.showMessage(`Loading normal plugins 1/${normalPluginsToLoad.length}...`);\n await loadInParallel(\n normalPluginsToLoad.filter((p) => !p.esModule),\n (loadedCount) =>\n loading.showMessage(\n `Loading normal plugins ${Math.min(loadedCount + 1, normalPluginsToLoad.length)}/${\n normalPluginsToLoad.length\n }...`,\n ),\n );\n\n // TODO: why we need to load esModule plugins separately?\n const esPluginsToLoad = pluginsToLoad.filter((p) => p.esModule);\n await loadInParallel(\n esPluginsToLoad.filter((p) => p.esModule),\n (loadedCount) =>\n loading.showMessage(\n `Loading es plugins ${Math.min(loadedCount + 1, esPluginsToLoad.length)}/${\n esPluginsToLoad.length\n }...`,\n ),\n );\n\n // Exec plugin entries which are generated by building process\n // This ensures a fixed order for plugins to initialize\n if (pluginEntries.length > 0) {\n loading.showMessage(`Executing plugin entries...`);\n pluginEntries.forEach((entry) => entry.func());\n }\n\n // Wait for loader\n if (waitForLoaders.length > 0) {\n loading.showMessage(`Executing custom loaders ...`);\n const arr = await Promise.all(\n waitForLoaders.map(async (loader) => {\n // Usually a plugin waitFor a promise so that it doesn't need to wait for all plugins loaded before executing\n if (loader.then) return await loader;\n // If pass an async function, it executes while all plugins are loaded.\n else return await loader();\n }),\n );\n // If a loader returns false, then don't continue starting\n // NOTE: if a loader needs to show an error message, just throw an error.\n if (arr.some((s) => s === false)) return;\n }\n\n // Start the application\n let entryName = appConfig.entry;\n if (!entryName) {\n // If there isn't entry defined and there's only one app entry from the plugins list.\n // Then just use the only one.\n if (appEntries.length === 1) {\n entryName = appEntries[0].name;\n } else if (appEntries.length === 0) {\n throw new Error(\n 'No app entry found. You need a plugin deployed to the app to provide an app entry.',\n );\n } else {\n throw new Error(\n `Multiple entries found: ${appEntries\n .map((e) => e.name)\n .join(', ')}. You need to specify one entry in app config.`,\n );\n }\n }\n const entryApp = appEntries.find((e) => e.name === entryName);\n if (entryApp) {\n console.log(`Starting the app from ${entryName}...`);\n loading.showMessage(`Starting the app...`);\n await entryApp.func();\n } else {\n throw new Error(`The specified app entry was not found: ${entryName}.`);\n }\n loading.hide();\n}\n\nexport function bootstrap() {\n if (!window.MUSE_GLOBAL) {\n throw new Error('There must be a global window.MUSE_GLOBAL object');\n }\n\n loading.init();\n msgEngine.init();\n\n const timeStart = Date.now();\n const appStartExceptions = [];\n let status = 'success';\n let errorMsg;\n start()\n .then(() => {\n const timeEnd = Date.now();\n msgEngine.sendToParent({\n type: 'app-state-change',\n state: 'app-loaded',\n });\n console.log(`Muse app started in ${(timeEnd - timeStart) / 1000} seconds.`);\n })\n .catch((err) => {\n console.log('Failed to start the app.');\n status = 'failure';\n errorMsg = err?.message || 'App failed to start.';\n appStartExceptions.push(err);\n\n err && console.error(err);\n loading.hide();\n if (err?.message) {\n error.showMessage(err.message);\n }\n msgEngine.sendToParent({\n type: 'app-state-change',\n state: 'app-failed',\n });\n })\n .finally(() => {\n const bootCompleteEvent = new CustomEvent('muse_boot_completed', {\n detail: {\n result: status,\n metrics: [\n {\n name: 'app-start-result',\n payload: {\n duration: Date.now() - timeStart,\n status,\n errorMsg,\n url: document.location.href,\n },\n },\n {\n name: 'app-start-exceptions',\n payload: appStartExceptions,\n },\n ],\n },\n });\n window.dispatchEvent(bootCompleteEvent);\n });\n}\n","const error = {\n errors: [],\n init() {\n const errorDiv = document.createElement('div');\n errorDiv.innerHTML = ``;\n errorDiv.id = 'muse-error-node';\n document.body.appendChild(errorDiv);\n this.mountNode = errorDiv;\n },\n showMessage(msg) {\n const arr = msg?.splice ? msg : [msg];\n this.errors.push(...arr);\n this.update();\n },\n update() {\n if (!this.mountNode) this.init();\n\n const content =\n this.errors.length === 1\n ? `<div>${this.errors[0]}</div>`\n : `<ul>\n ${this.errors.map((err) => '<li>' + err + '</li>').join('')}\n </ul>`;\n this.mountNode.innerHTML = `\n <div class=\"muse-error-node-inner\">\n <h4>Failed to load:</h4>\n ${content}\n <p>* Unexpected error happened, please refresh to retry or <a href=\"${\n window.MUSE_GLOBAL.appConfig?.supportLink || '#'\n }\">contact support</a>.</p>\n </div>\n `;\n },\n};\n\nexport default error;\n","import logo from './logo.png';\n\nconst loading = {\n init() {\n const { app, cdn } = window.MUSE_GLOBAL;\n const loadingDiv = document.createElement('div');\n const logoUrl = app.iconId\n ? `${cdn}/p/app-icon.${app.name}/v0.0.${app.iconId}/dist/icon.png`\n : logo;\n loadingDiv.innerHTML = `\n <div>\n <div class='muse-loading-node-inner'>\n <div class=\"loadingio-spinner-eclipse-p5fn84x4bh8\"><div class=\"ldio-klconu2768\"><div>\n </div></div></div>\n <img src=\"${logoUrl}\" aria-label=\"logo\" />\n </div>\n <label>Starting...</label>\n </div>\n `;\n loadingDiv.id = 'muse-loading-node';\n if (\n (app.config?.theme === 'dark' && !localStorage.getItem('muse.theme')) ||\n (localStorage.getItem('muse.theme') && localStorage.getItem('muse.theme') === 'dark')\n ) {\n document.body.classList.add('muse-theme-dark');\n }\n document.body.appendChild(loadingDiv);\n this.mountNode = loadingDiv;\n this.labelNode = loadingDiv.querySelector('label');\n },\n\n hide() {\n if (!this.mountNode) return;\n setTimeout(() => {\n this.mountNode.style.opacity = 0;\n }, 10);\n\n setTimeout(() => {\n document.body.removeChild(this.mountNode);\n delete this.mountNode;\n }, 800);\n\n delete this.labelNode;\n },\n\n showMessage(msg) {\n if (this.labelNode) this.labelNode.innerHTML = msg || '';\n },\n};\n\nexport default loading;\n","// Message engine is used to communicate between main app and sub app via postMessage\nconst makeId = () => Math.random().toString(36).substring(2);\n\nconst msgEngine = {\n listeners: {},\n promises: {},\n iframes: {},\n register(key, iframe) {\n this.iframes[key] = iframe;\n },\n unregister(key) {\n delete this.iframes[key];\n },\n getIframe(iframe) {\n if (typeof iframe === 'string') return this.iframes[iframe];\n return iframe;\n },\n init() {\n // Assert a client is a Muse app\n this.addListener('handle-muse-app-check', (payload, msg) => {\n if (payload?.type === 'assert-muse-app' && msg.data?.from?.clientKey === 'parent') {\n // Tell parent I'm a Muse app.\n this.sendToParent({\n promiseId: msg?.data?.promiseId,\n data: {\n app: window.MUSE_GLOBAL.app.name,\n env: window.MUSE_GLOBAL.env.name,\n },\n });\n\n window.MUSE_GLOBAL.parentApp = msg?.data?.from;\n }\n });\n\n window.addEventListener(\n 'message',\n (msg) => {\n if (msg?.data?.type !== 'muse') return;\n console.log('on muse post msg: ', msg);\n if (msg?.data?.payload?.promiseId) {\n this.resolvePromise(msg.data.payload.promiseId, msg?.data.payload?.data);\n }\n Object.entries(this.listeners).forEach(([id, func]) => {\n try {\n func(msg.data.payload, msg);\n } catch (err) {\n console.log(`Warning: failed to process message \"${id}\"`, msg, err);\n }\n });\n },\n false,\n );\n },\n resolve(promiseId, payload) {\n // Todo: send\n },\n // a component could listen messages from other apps\n addListener(id, callback) {\n this.listeners[id] = callback;\n },\n removeListener(id) {\n delete this.listeners[id];\n },\n sendToChild(msg, iframe, isPromise = false) {\n let promise = null;\n let promiseHandler = null;\n let id = null;\n if (isPromise) {\n id = makeId();\n promise = new Promise((resolve, reject) => {\n promiseHandler = this.promises[id] = { resolve, reject };\n });\n }\n try {\n this.getIframe(iframe)?.contentWindow?.postMessage(\n {\n type: 'muse',\n promiseId: id,\n from: {\n app: window.MUSE_GLOBAL.appName,\n env: window.MUSE_GLOBAL.envName,\n clientKey: 'parent',\n },\n payload: msg,\n },\n '*',\n );\n } catch (err) {\n console.log(`Failed to post message to child: `, msg);\n if (promise) promiseHandler.reject(err);\n }\n return promise;\n },\n\n sendToParent(msg, isPromise = false) {\n let promise = null;\n let promiseHandler = null;\n let id = null;\n if (isPromise) {\n id = makeId();\n promise = new Promise((resolve, reject) => {\n promiseHandler = this.promises[id] = { resolve, reject };\n });\n }\n if (window.parent && window.parent !== window) {\n try {\n window.parent.postMessage(\n {\n type: 'muse',\n promiseId: id,\n from: {\n app: window.MUSE_GLOBAL.appName,\n env: window.MUSE_GLOBAL.envName,\n type: 'child',\n },\n payload: msg,\n },\n '*',\n );\n } catch (err) {\n console.log('Failed to send message to parent: ', msg);\n if (promise) promiseHandler.reject(err);\n }\n }\n return promise;\n },\n\n // assert the app in iframe is a muse app\n assertMuseApp(iframe) {\n return new Promise((resolve, reject) => {\n this.sendToChild({ type: 'assert-muse-app' }, this.getIframe(iframe), true).then(resolve);\n setTimeout(() => reject(new Error('Muse app check timeout.')), 300); // if no response in 300ms (normally 30ms), it means it's not a Muse app.\n });\n },\n\n getParentUrl() {\n return new Promise((resolve, reject) => {\n this.sendToParent({ type: 'get-parent-url' }, true).then(resolve);\n setTimeout(() => reject(new Error('Get parent url timeout.')), 300); // if no response in 300ms (normally 30ms), it means it's not a Muse app.\n });\n },\n\n parentNavigate(url) {\n this.sendToParent({ type: 'parent-navigate', url });\n },\n\n resolvePromise(promiseId, payload) {\n this.promises[promiseId]?.resolve(payload);\n delete this.promises[promiseId];\n },\n resolveParent(promiseId, payload) {\n msgEngine.sendToParent({ promiseId: promiseId, data: payload });\n },\n\n resolveChild(promiseId, payload, msg) {\n msgEngine.sendToChild({ promiseId: promiseId, data: payload }, msg?.source);\n },\n};\n\n// Assert a client is a Muse app\nmsgEngine.addListener('handle-muse-app-check', (payload, msg) => {\n if (payload?.type === 'assert-muse-app' && msg.data?.from?.clientKey === 'parent') {\n // Tell parent I'm a Muse app.\n msgEngine.resolveParent(msg?.data?.promiseId, {\n app: window.MUSE_GLOBAL.appName,\n env: window.MUSE_GLOBAL.envName,\n });\n }\n});\n\n// Allow to navigate from sub app\nmsgEngine.addListener('parent-navigate', (payload) => {\n if (payload?.type === 'parent-navigate' && payload?.url) {\n window.location.href = payload.url;\n }\n});\n\n// Allow to get url from parent\nmsgEngine.addListener('get-parent-url', (payload, msg) => {\n if (payload?.type === 'get-parent-url') {\n console.log('get-parent-url: ', window.location.href);\n msgEngine.resolveChild(msg?.data?.promiseId, window.location.href, msg);\n }\n});\n\nexport default msgEngine;\n","// Try to register service worker.\nimport loading from './loading';\n\nfunction registerSw() {\n const { serviceWorker } = window.MUSE_GLOBAL;\n if (!navigator.serviceWorker) return;\n if (serviceWorker && window.location.protocol === 'https:') {\n loading.showMessage('Registering Muse service worker.');\n return new Promise((resolve) => {\n let resolved = false;\n setTimeout(() => {\n if (!resolved) {\n console.log('Failed to register service worker in 10 seconds. Skip it.');\n resolve();\n }\n }, 10000);\n navigator.serviceWorker\n .register(serviceWorker, {})\n .then(function () {\n resolved = true;\n console.log('Service Worker register done.');\n resolve();\n })\n .catch(() => {\n resolved = true;\n console.log('Failed to register service worker, skip it.');\n resolve(); // Tolerate failures\n });\n });\n }\n}\n\nexport default registerSw;\n","\n import API from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!../node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.102.1/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!../node_modules/.pnpm/source-map-loader@3.0.2_webpack@5.102.1/node_modules/source-map-loader/dist/cjs.js!./style.css\";\n \n \n\nvar options = {\"base\":11914653};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!../node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.102.1/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!../node_modules/.pnpm/source-map-loader@3.0.2_webpack@5.102.1/node_modules/source-map-loader/dist/cjs.js!./style.css\";\n export default content && content.locals ? content.locals : undefined;\n","// Notify the parent of the url change\n// subapp => parent\n// In muse-react/src/common/history handle url change msg\n\nimport msgEngine from './msgEngine';\n\nconst patchHistoryMethod = (method) => {\n const history = window.history;\n const original = history[method];\n\n history[method] = function (state) {\n const result = original.apply(this, arguments);\n const event = new Event('muse_boot_' + method.toLowerCase());\n event.state = state;\n window.dispatchEvent(event);\n return result;\n };\n};\n\npatchHistoryMethod('pushState');\npatchHistoryMethod('replaceState');\n\nconst handleUrlChange = () => {\n msgEngine.sendToParent({\n type: 'child-route-change',\n path: window.location.href.replace(window.location.origin, ''),\n });\n};\nwindow.addEventListener('popstate', handleUrlChange);\nwindow.addEventListener('muse_boot_pushstate', handleUrlChange);\nwindow.addEventListener('muse_boot_replacestate', handleUrlChange);\n","import error from './error';\nconst noop = () => {};\n\nexport function load(plugin, callback) {\n callback = callback || noop;\n if (plugin.then && plugin.catch) {\n plugin.then(callback);\n return;\n }\n\n if (plugin.url) {\n return new Promise((resolve, reject) => {\n const head = document.querySelector('head');\n const script = document.createElement('script');\n script.src = plugin.url;\n if (plugin.esModule) script.type = 'module';\n head.appendChild(script);\n script.onload = () => {\n callback();\n resolve();\n };\n // from unit tests, we resolve this Promise immediately. This is needed, as jest will never run the script.onload() function,\n // as it's not a real browser, making the Promise never resolve.\n if (process.env.NODE_ENV === 'test') {\n resolve();\n }\n script.onerror = () => {\n error.showMessage(`Failed to load resource: ${plugin.url} .`);\n reject();\n };\n });\n }\n}\n\nexport async function loadInParallel(items, callback = noop) {\n let count = 0;\n await Promise.all(\n items.map(async (item) => {\n await load(item);\n callback(++count);\n }),\n );\n}\n\nexport function joinPath(p1, p2) {\n if (!p1.endsWith('/')) p1 += '/';\n if (p2.startsWith('/')) p2 = p2.replace(/^\\/+/, '');\n return p1 + p2;\n}\n\nexport function getPluginId(name) {\n if (name.startsWith('@')) return name.replace('/', '.');\n return name;\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.nc = undefined;","// boot plugin is used to load other plugins based on the app config\nimport { bootstrap } from './boot';\n\nbootstrap();\n"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"boot.js","mappings":";;;;;;;;;AAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;ACxBA;AACA;AACA;;;;;;;;;;ACFA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;;;;;;;;;;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACNA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAEA;AACA;;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtIA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpFA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;;AAEA;AACA;AACA;AACA;AAGA;;AAEA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AAOA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AAGA;AACA;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AAUA;AACA;AACA;;AAUA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAEA;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACzXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;;;;;;;;;;;;;;;;ACnCA;AAEA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;AClDA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;;AAEA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;ACzLA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AC1BA;AACA;AACA;;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;AC9BA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AClBA;;;;;;;;;;;;;ACAA;AACA;AAEA","sources":["/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/buildCache.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/config.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/findMuseModule.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/getGlobal.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/index.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/museRequire.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/parseMuseId.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/register.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/style.css","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/runtime/api.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/runtime/sourceMaps.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/insertBySelector.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/insertStyleElement.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/styleDomAPI.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/styleTagTransform.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/boot.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/error.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/loading.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/msgEngine.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/registerSw.js","webpack://@ebay/muse-boot-default/./src/style.css?9935","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/urlListener.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/utils.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/bootstrap","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/compat get default export","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/define property getters","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/global","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/hasOwnProperty shorthand","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/make namespace object","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/publicPath","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/nonce","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/index.js"],"sourcesContent":["const parseMuseId = require('./parseMuseId');\n\n/* \n Group modules by module's id (pkgName/path) to support multiple versions.\n For example:\n cache: {\n 'loadash/lib/get.js': [\n { moduleId: 'lodash@1.0.1/lib/get.js, name, version, ...},\n { moduleId: 'lodash@4.0.0/lib/get.js, name, version, ...},\n ]\n }\n*/\nfunction buildCache(obj) {\n if (!obj.cache) obj.cache = {};\n if (!obj.modules) obj.modules = {};\n\n Object.keys(obj.modules).forEach((mid) => {\n const m = parseMuseId(mid);\n if (!m) return;\n if (!obj.cache[m.id]) obj.cache[m.id] = [];\n obj.cache[m.id].push(m);\n });\n}\n\nmodule.exports = buildCache;\n","const config = {\n matchVersion: 'all', // all|major|minor|patch\n};\n","const parseMuseId = require('./parseMuseId');\nconst buildCache = require('./buildCache');\nconst config = require('./config');\n\n// Get the version diff, e.g: [1,2,3] - [1,2,4] = [0,0,1]\nconst verDiff = (v1, v2) => [0, 1, 2].map((i) => Math.abs(v1[i] - v2[i]));\n\n// Whether ver1 is less than ver2, e.g: [1,2,3] < [1,2,4]\n// This can also be used to compare version diff from verDiff()\nconst lt = (v1, v2) => {\n for (let i = 0; i < 3; i++) {\n if (v1[i] < v2[i]) return true;\n if (v1[i] > v2[i]) return false;\n }\n return false;\n};\n\nconst gt = (v1, v2) => !lt(v1, v2);\n\n/**\n * Resolve module to the greater and closest semantic version.\n * If there is only one version, use it.\n * If there are multiple versions, use the closest but greater one.\n *\n * NOTE: it doesn't support prerelease versions. e.g: 1.0.0-beta.1 will be treated as 1.0.0\n *\n * @param {String} museId example: @ebay/nice-modal-react@1.0.0/src/index.js\n * @param {*} museSharedModules { modules, cache }\n * @returns\n */\nfunction findMuseModule(museId, museShared) {\n museId = museId.replace(/\\\\/g, '/').replace(/\\/+/g, '/');\n if (!museShared) museShared = MUSE_GLOBAL.__shared__;\n\n if (museShared.modules[museId]) {\n return museShared.modules[museId];\n }\n\n let cache = museShared.cache;\n\n if (!cache) {\n // group different versions by module id\n buildCache(museShared);\n cache = museShared.cache;\n }\n\n const m = parseMuseId(museId);\n\n if (!m) return null;\n const candidates = cache[m.id];\n if (!candidates) return null;\n let picked = candidates[0];\n let minDiff = verDiff(m.version, picked.version);\n\n for (let i = 1; i < candidates.length; i++) {\n const c = candidates[i];\n\n // if same version, use it\n if (m.version.join('.') === c.version.join('.')) {\n picked = c;\n break;\n }\n\n // apply match version config\n\n // Ensure picked version is grater than target version\n if (gt(picked.version, m.version) && lt(c.version, m.version)) continue;\n\n // The version diff between the current version and the target version\n const currentDiff = verDiff(c.version, m.version);\n\n if ((lt(picked.version, m.version) && gt(c.version, m.version)) || lt(currentDiff, minDiff)) {\n minDiff = currentDiff;\n picked = c;\n }\n }\n\n switch (config.matchVersion) {\n case 'major':\n if (minDiff[0] !== 0) return null;\n break;\n case 'minor':\n if (minDiff[0] !== 0 || minDiff[1] !== 0) return null;\n break;\n case 'patch':\n if (minDiff[0] !== 0 || minDiff[1] !== 0 || minDiff[2] !== 0) return null;\n break;\n case 'all':\n break;\n default:\n break;\n }\n\n return museShared.modules[picked.museId];\n}\n\nmodule.exports = findMuseModule;\n","const getGlobal = function () {\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n throw new Error('unable to locate global object');\n};\n\nmodule.exports = getGlobal();\n","module.exports = {\n config: require('./config'),\n require: require('./museRequire'),\n register: require('./register'),\n parseMuseId: require('./parseMuseId'),\n findMuseModule: require('./findMuseModule'),\n};\n","const findMuseModule = require('./findMuseModule');\n\nvar __muse_module_cache__ = {};\nmodule.exports = (museId) => {\n // Check if module is in cache\n var cachedModule = __muse_module_cache__[museId];\n if (!cachedModule) {\n museModule = cachedModule;\n __muse_module_cache__[museId] = findMuseModule(museId);\n }\n\n // Use module's require method to get the final module\n const m = __muse_module_cache__[museId];\n if (!m) throw new Error('Muse shared module not found: ' + museId);\n\n return m.__require__(m.id);\n};\n","/**\n * moduleId: muse module id example:\n * - lib1@1.0.3/src/index.js\n * - @ebay/nice-modal@1.2.3/src/index.ts // scoped package\n * - @ebay/nice-modal@1.2.3-alpha.1/src/index.ts // scoped package\n */\nfunction parseMuseId(museId) {\n try {\n const m = /((^@[^/]+\\/)?([^@/]+))@(\\d+)\\.(\\d+)\\.(\\d+)([^./][^/]*)?\\/(.+)$/.exec(museId);\n if (!m) return null;\n return {\n name: m[1],\n path: m[8],\n id: `${m[1]}/${m[8]}`,\n museId,\n version: m.slice(4, 7).map(Number),\n preRelease: m[7]?.replace('-', ''),\n };\n } catch (err) {\n return null;\n }\n}\n\nmodule.exports = parseMuseId;\n","const theGlobal = require('./getGlobal');\nconst parseMuseId = require('./parseMuseId');\n/**\n * Register modules to muse module system.\n *\n * @param {Object} modules Key value object for Muse modules.\n * @param {Function} __require__ used to require the actual module, for example: __webpack_require__\n */\nfunction register(modules, __require__) {\n for (const mid in modules) {\n // If it's not muse module, continue\n if (!parseMuseId(mid)) continue;\n const m = modules[mid];\n theGlobal.MUSE_GLOBAL.__shared__.modules[mid] = {\n id: mid,\n __require__,\n };\n }\n}\nmodule.exports = register;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `#muse-loading-node {\n position: fixed;\n display: grid;\n place-items: center;\n left: 0;\n top: 0%;\n width: 100%;\n height: 100%;\n z-index: 99999;\n /* background-color: #fff; */\n transition: opacity ease-out 0.3s;\n line-height: 1.5 !important;\n}\n\n#muse-loading-node .muse-loading-node-inner {\n position: relative;\n display: grid;\n place-items: center;\n}\n\n/* #muse-loading-node .muse-loading-node-inner > svg {\n width: 120px;\n height: 120px;\n} */\n\n#muse-loading-node .muse-loading-node-inner > img {\n position: absolute;\n width: 60px;\n}\n\n#muse-loading-node div > label {\n display: block;\n text-align: center;\n font-family: Helvetica, Arial, sans-serif;\n color: #888;\n font-size: 13px;\n}\n\n@keyframes ldio-klconu2768 {\n 0% {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(180deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.ldio-klconu2768 div {\n position: absolute;\n animation: ldio-klconu2768 1s linear infinite;\n width: 140px;\n height: 140px;\n top: 30px;\n left: 30px;\n border-radius: 50%;\n box-shadow: 0 4px 0 0 #00b4d8;\n transform-origin: 70px 72px;\n}\n.loadingio-spinner-eclipse-p5fn84x4bh8 {\n width: 200px;\n height: 200px;\n display: inline-block;\n overflow: hidden;\n}\n.ldio-klconu2768 {\n width: 100%;\n height: 100%;\n position: relative;\n transform: translateZ(0) scale(1);\n backface-visibility: hidden;\n transform-origin: 0 0; /* see note above */\n}\n.ldio-klconu2768 div {\n box-sizing: content-box;\n}\n/* generated by https://loading.io/ */\n\n#muse-error-node {\n position: fixed;\n left: 0;\n top: 0;\n height: 100%;\n width: 100%;\n font-family: Helvetica, Arial, sans-serif;\n color: red;\n line-height: 150%;\n font-size: 14px;\n display: grid;\n place-items: center;\n}\n\n#muse-error-node .muse-error-node-inner {\n min-width: 500px;\n max-width: 800px;\n border: 1px solid red;\n border-radius: 3px;\n padding: 15px;\n}\n#muse-error-node h4 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 16px;\n}\n#muse-error-node li {\n padding: 3px 0;\n}\n#muse-error-node p {\n color: #777;\n font-style: italic;\n font-size: 13px;\n}\n\n#muse-error-node p a {\n color: #039be5;\n text-decoration: none;\n}\n\n#muse-error-node p a:hover {\n text-decoration: underline;\n}\n\n.muse-theme-dark {\n background-color: #141414;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/style.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,eAAe;EACf,aAAa;EACb,mBAAmB;EACnB,OAAO;EACP,OAAO;EACP,WAAW;EACX,YAAY;EACZ,cAAc;EACd,4BAA4B;EAC5B,iCAAiC;EACjC,2BAA2B;AAC7B;;AAEA;EACE,kBAAkB;EAClB,aAAa;EACb,mBAAmB;AACrB;;AAEA;;;GAGG;;AAEH;EACE,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,cAAc;EACd,kBAAkB;EAClB,yCAAyC;EACzC,WAAW;EACX,eAAe;AACjB;;AAEA;EACE;IACE,uBAAuB;EACzB;EACA;IACE,yBAAyB;EAC3B;EACA;IACE,yBAAyB;EAC3B;AACF;AACA;EACE,kBAAkB;EAClB,6CAA6C;EAC7C,YAAY;EACZ,aAAa;EACb,SAAS;EACT,UAAU;EACV,kBAAkB;EAClB,6BAA6B;EAC7B,2BAA2B;AAC7B;AACA;EACE,YAAY;EACZ,aAAa;EACb,qBAAqB;EACrB,gBAAgB;AAClB;AACA;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,iCAAiC;EACjC,2BAA2B;EAC3B,qBAAqB,EAAE,mBAAmB;AAC5C;AACA;EACE,uBAAuB;AACzB;AACA,qCAAqC;;AAErC;EACE,eAAe;EACf,OAAO;EACP,MAAM;EACN,YAAY;EACZ,WAAW;EACX,yCAAyC;EACzC,UAAU;EACV,iBAAiB;EACjB,eAAe;EACf,aAAa;EACb,mBAAmB;AACrB;;AAEA;EACE,gBAAgB;EAChB,gBAAgB;EAChB,qBAAqB;EACrB,kBAAkB;EAClB,aAAa;AACf;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,eAAe;AACjB;AACA;EACE,cAAc;AAChB;AACA;EACE,WAAW;EACX,kBAAkB;EAClB,eAAe;AACjB;;AAEA;EACE,cAAc;EACd,qBAAqB;AACvB;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,yBAAyB;AAC3B\",\"sourcesContent\":[\"#muse-loading-node {\\n position: fixed;\\n display: grid;\\n place-items: center;\\n left: 0;\\n top: 0%;\\n width: 100%;\\n height: 100%;\\n z-index: 99999;\\n /* background-color: #fff; */\\n transition: opacity ease-out 0.3s;\\n line-height: 1.5 !important;\\n}\\n\\n#muse-loading-node .muse-loading-node-inner {\\n position: relative;\\n display: grid;\\n place-items: center;\\n}\\n\\n/* #muse-loading-node .muse-loading-node-inner > svg {\\n width: 120px;\\n height: 120px;\\n} */\\n\\n#muse-loading-node .muse-loading-node-inner > img {\\n position: absolute;\\n width: 60px;\\n}\\n\\n#muse-loading-node div > label {\\n display: block;\\n text-align: center;\\n font-family: Helvetica, Arial, sans-serif;\\n color: #888;\\n font-size: 13px;\\n}\\n\\n@keyframes ldio-klconu2768 {\\n 0% {\\n transform: rotate(0deg);\\n }\\n 50% {\\n transform: rotate(180deg);\\n }\\n 100% {\\n transform: rotate(360deg);\\n }\\n}\\n.ldio-klconu2768 div {\\n position: absolute;\\n animation: ldio-klconu2768 1s linear infinite;\\n width: 140px;\\n height: 140px;\\n top: 30px;\\n left: 30px;\\n border-radius: 50%;\\n box-shadow: 0 4px 0 0 #00b4d8;\\n transform-origin: 70px 72px;\\n}\\n.loadingio-spinner-eclipse-p5fn84x4bh8 {\\n width: 200px;\\n height: 200px;\\n display: inline-block;\\n overflow: hidden;\\n}\\n.ldio-klconu2768 {\\n width: 100%;\\n height: 100%;\\n position: relative;\\n transform: translateZ(0) scale(1);\\n backface-visibility: hidden;\\n transform-origin: 0 0; /* see note above */\\n}\\n.ldio-klconu2768 div {\\n box-sizing: content-box;\\n}\\n/* generated by https://loading.io/ */\\n\\n#muse-error-node {\\n position: fixed;\\n left: 0;\\n top: 0;\\n height: 100%;\\n width: 100%;\\n font-family: Helvetica, Arial, sans-serif;\\n color: red;\\n line-height: 150%;\\n font-size: 14px;\\n display: grid;\\n place-items: center;\\n}\\n\\n#muse-error-node .muse-error-node-inner {\\n min-width: 500px;\\n max-width: 800px;\\n border: 1px solid red;\\n border-radius: 3px;\\n padding: 15px;\\n}\\n#muse-error-node h4 {\\n margin-top: 0;\\n margin-bottom: 10px;\\n font-size: 16px;\\n}\\n#muse-error-node li {\\n padding: 3px 0;\\n}\\n#muse-error-node p {\\n color: #777;\\n font-style: italic;\\n font-size: 13px;\\n}\\n\\n#muse-error-node p a {\\n color: #039be5;\\n text-decoration: none;\\n}\\n\\n#muse-error-node p a:hover {\\n text-decoration: underline;\\n}\\n\\n.muse-theme-dark {\\n background-color: #141414;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {};\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","import museModules from '@ebay/muse-modules';\nimport loading from './loading';\nimport error from './error';\nimport registerSw from './registerSw';\nimport { loadInParallel, getPluginId } from './utils';\nimport msgEngine from './msgEngine';\nimport './urlListener';\nimport './style.css';\n\nasync function start() {\n // If MUSE_TEMP_temp-redirect-url has a value, then redirect to that url.\n // This is a one time redirect, so remove the value after redirecting.\n // It's used for sub app login flow.\n const tempRedirectUrl = window.sessionStorage.getItem('MUSE_TEMP_temp-redirect-url');\n if (tempRedirectUrl) {\n window.sessionStorage.removeItem('MUSE_TEMP_temp-redirect-url');\n window.location = tempRedirectUrl;\n return;\n }\n\n const mg = window.MUSE_GLOBAL;\n loading.showMessage('Starting...');\n const waitForLoaders = mg.waitForLoaders || [];\n\n // Get the config from both app and env\n // That is, app.config is the default, env.config can override any value on app.config\n const appConfig = Object.assign({}, mg.app?.config);\n Object.entries(mg.env?.config || {}).forEach(([key, value]) => {\n if (value !== null && value !== undefined && value !== '') {\n appConfig[key] = value;\n }\n });\n\n Object.assign(mg, {\n appVariables: mg.appVariables || {},\n pluginVariables: mg.pluginVariables || {},\n appConfig,\n msgEngine,\n loading,\n error,\n isSubApp: window.parent !== window,\n getUser: () => null,\n appEntries: mg.appEntries || [], // entries to start the app\n initEntries: mg.initEntries || [], // entries from init plugins\n pluginEntries: mg.pluginEntries || [], // entries from lib or normal plugins\n // Allow to register some func to wait for before starting the app\n waitFor: (asyncFuncOrPromise) => {\n waitForLoaders.push(asyncFuncOrPromise);\n },\n // TODO: get plugin assets public paths (assets in public folder)\n getPublicPath: (pluginName, assetPath) => {\n if (!assetPath) throw new Error('assetPath is required for getPublicPath method.');\n assetPath = assetPath.replace(/^\\/*/, '');\n const pluginId = getPluginId(pluginName);\n\n if (mg.isDev) {\n // for dev, check if there's local plugins\n const names = mg.plugins.find((p) => !!p.localPlugins)?.localPlugins;\n if (names && names.includes(pluginName)) {\n return `/muse-assets/local/p/${pluginId}/${assetPath}`;\n }\n }\n const currentPlugin = window.MUSE_GLOBAL.plugins?.find((p) => p.name === pluginName);\n if (!currentPlugin) return;\n let { version } = currentPlugin || {};\n if (!version.startsWith('v')) {\n version = `v${version}`;\n }\n let publicPath = `${window.MUSE_GLOBAL.cdn}/p/${pluginId}/${version}`;\n if (window.MUSE_GLOBAL.isDev || window.MUSE_GLOBAL.isLocal) {\n publicPath = publicPath + `/dev/${assetPath}`;\n } else {\n publicPath = publicPath + `/dist/${assetPath}`;\n }\n return publicPath;\n },\n // Muse shared modules global methods\n __shared__: {\n modules: {},\n register: museModules.register,\n require: museModules.require,\n parseMuseId: museModules.parseMuseId,\n },\n });\n\n const { cdn = '', initEntries, pluginEntries, appEntries, isDev = false, isE2eTest = false } = mg;\n let { plugins = [] } = window.MUSE_GLOBAL;\n\n // MUSE_CONFIG is for backward compatibility\n window.MUSE_CONFIG = mg;\n\n msgEngine.sendToParent({\n type: 'app-state-change',\n state: 'app-starting',\n // url: document.location.href,\n });\n\n registerSw();\n\n // Print app plugins in dev console\n const bootPlugin = plugins.find((p) => p.type === 'boot');\n if (bootPlugin) {\n console.log(\n `Loading Muse app by ${bootPlugin.name}@${bootPlugin.version || bootPlugin.url}...`,\n );\n }\n\n /* Handle forcePlugins query parameter */\n const searchParams = new URLSearchParams(window.location.search);\n const forcePluginStr = searchParams.get('forcePlugins');\n if (forcePluginStr) {\n const forcePluginById = forcePluginStr\n .split(';')\n .filter(Boolean)\n .reduce((p, c) => {\n const separator = '@';\n const limit = 2;\n let prefix = '';\n if (c.startsWith('@') && c[0] === separator) {\n // Starts with @, means it's a scoped plugin\n c = c.substring(1);\n prefix = '@';\n }\n const arr = c.split(separator, limit);\n if (arr.length === limit) {\n const [name, type] = arr[0].split('!');\n p[`${prefix}${name}`] = {\n version: arr[1],\n type: type,\n };\n }\n return p;\n }, {});\n // Update or remove plugins from the list based on forcePlugins\n plugins = plugins\n .map((p) => {\n if (!forcePluginById[p.name]) return p;\n const newPlugin = { ...p, version: forcePluginById[p.name].version };\n delete forcePluginById[p.name];\n return newPlugin;\n })\n .filter((p) => p.version !== 'null');\n\n // Need to get the type of plugin from muse registry directly.\n for (const p in forcePluginById) {\n if (forcePluginById[p].version !== 'null') {\n plugins.push({\n name: p,\n type: forcePluginById[p].type,\n version: forcePluginById[p].version,\n });\n }\n }\n }\n\n console.log(`Plugins(${plugins.length}):`);\n // If a plugin has isLocal, it means its bundle is loaded somewhere else.\n // The registered plugin item is used to provide configurations. e.g plugin variables.\n plugins.forEach((p) => {\n let source = '';\n if (p.linkedTo) source = 'Linked to: ' + p.linkedTo;\n else if (p.isLocalLib) {\n source = 'Local:' + (/\\d{4,}/.exec(p.url)?.[0] || document.location.port); // find port number\n } else if (p.url) source = p.url;\n if (source) source = ` (${source})`;\n\n console.log(` * ${p.name}@${p.version || 'local'}${source}`);\n });\n msgEngine.sendToParent({\n type: 'app-state-change',\n state: 'app-loading',\n });\n // Load init plugins\n // Init plugins should be small and not depend on each other\n const initPluginsToLoad = plugins\n .filter((p) => p.type === 'init')\n .map((p) => {\n return {\n url:\n p.isLocal || p.linkedTo\n ? false\n : p.url || `${cdn}/p/${getPluginId(p.name)}/v${p.version}/dist/main.js`,\n ...p,\n };\n })\n .filter(Boolean);\n\n // Load init plugins\n if (initPluginsToLoad.length > 0) {\n loading.showMessage(`Loading init plugins 1/${initPluginsToLoad.length}...`);\n await loadInParallel(initPluginsToLoad, (loadedCount) =>\n loading.showMessage(\n `Loading init plugins ${Math.min(loadedCount + 1, initPluginsToLoad.length)}/${\n initPluginsToLoad.length\n }...`,\n ),\n );\n }\n\n // Exec init entries\n if (initEntries.length > 0) {\n loading.showMessage(`Executing init entries...`);\n initEntries.sort((a, b) => (a.order || 10) - (b.order || 10)); // sort by order\n for (const initEntry of initEntries) {\n // Allow an init entry to break the start of the app\n if ((await initEntry.func()) === false) return;\n }\n }\n\n // NOTE: init plugins have the opportunity to modify plugins list.\n // It's an expected behavior for some permission control.\n\n // Load normal and lib plugins\n const bundleDir = isDev ? 'dev' : isE2eTest ? 'test' : 'dist';\n const pluginsToLoad = plugins\n .filter((p) => p.type !== 'boot' && p.type !== 'init')\n .map((p) => {\n return {\n url:\n p.isLocal || p.linkedTo\n ? false\n : p.url || `${cdn}/p/${getPluginId(p.name)}/v${p.version}/${bundleDir}/main.js`,\n ...p, // if a plugin already has url, always use it\n };\n })\n .filter(Boolean);\n\n // Load plugin bundles\n const libPluginsToLoad = pluginsToLoad.filter((p) => p.type === 'lib');\n loading.showMessage(`Loading lib plugins 1/${libPluginsToLoad.length}...`);\n await loadInParallel(\n libPluginsToLoad.filter((p) => !p.esModule),\n (loadedCount) =>\n loading.showMessage(\n `Loading lib plugins ${Math.min(loadedCount + 1, libPluginsToLoad.length)}/${\n libPluginsToLoad.length\n }...`,\n ),\n );\n\n const normalPluginsToLoad = pluginsToLoad.filter((p) => p.type === 'normal' || !p.type);\n loading.showMessage(`Loading normal plugins 1/${normalPluginsToLoad.length}...`);\n await loadInParallel(\n normalPluginsToLoad.filter((p) => !p.esModule),\n (loadedCount) =>\n loading.showMessage(\n `Loading normal plugins ${Math.min(loadedCount + 1, normalPluginsToLoad.length)}/${\n normalPluginsToLoad.length\n }...`,\n ),\n );\n\n // TODO: why we need to load esModule plugins separately?\n const esPluginsToLoad = pluginsToLoad.filter((p) => p.esModule);\n await loadInParallel(\n esPluginsToLoad.filter((p) => p.esModule),\n (loadedCount) =>\n loading.showMessage(\n `Loading es plugins ${Math.min(loadedCount + 1, esPluginsToLoad.length)}/${\n esPluginsToLoad.length\n }...`,\n ),\n );\n\n // Exec plugin entries which are generated by building process\n // This ensures a fixed order for plugins to initialize\n if (pluginEntries.length > 0) {\n loading.showMessage(`Executing plugin entries...`);\n pluginEntries.forEach((entry) => entry.func());\n }\n\n // Wait for loader\n if (waitForLoaders.length > 0) {\n loading.showMessage(`Executing custom loaders ...`);\n const arr = await Promise.all(\n waitForLoaders.map(async (loader) => {\n // Usually a plugin waitFor a promise so that it doesn't need to wait for all plugins loaded before executing\n if (loader.then) return await loader;\n // If pass an async function, it executes while all plugins are loaded.\n else return await loader();\n }),\n );\n // If a loader returns false, then don't continue starting\n // NOTE: if a loader needs to show an error message, just throw an error.\n if (arr.some((s) => s === false)) return;\n }\n\n // Start the application\n let entryName = appConfig.entry;\n if (!entryName) {\n // If there isn't entry defined and there's only one app entry from the plugins list.\n // Then just use the only one.\n if (appEntries.length === 1) {\n entryName = appEntries[0].name;\n } else if (appEntries.length === 0) {\n throw new Error(\n 'No app entry found. You need a plugin deployed to the app to provide an app entry.',\n );\n } else {\n throw new Error(\n `Multiple entries found: ${appEntries\n .map((e) => e.name)\n .join(', ')}. You need to specify one entry in app config.`,\n );\n }\n }\n const entryApp = appEntries.find((e) => e.name === entryName);\n if (entryApp) {\n console.log(`Starting the app from ${entryName}...`);\n loading.showMessage(`Starting the app...`);\n await entryApp.func();\n } else {\n throw new Error(`The specified app entry was not found: ${entryName}.`);\n }\n loading.hide();\n}\n\nexport function bootstrap() {\n if (!window.MUSE_GLOBAL) {\n throw new Error('There must be a global window.MUSE_GLOBAL object');\n }\n\n loading.init();\n msgEngine.init();\n\n const timeStart = Date.now();\n const appStartExceptions = [];\n let status = 'success';\n let errorMsg;\n start()\n .then(() => {\n const timeEnd = Date.now();\n msgEngine.sendToParent({\n type: 'app-state-change',\n state: 'app-loaded',\n });\n console.log(`Muse app started in ${(timeEnd - timeStart) / 1000} seconds.`);\n })\n .catch((err) => {\n console.log('Failed to start the app.');\n status = 'failure';\n errorMsg = err?.message || 'App failed to start.';\n appStartExceptions.push(err);\n\n err && console.error(err);\n loading.hide();\n if (err?.message) {\n error.showMessage(err.message);\n }\n msgEngine.sendToParent({\n type: 'app-state-change',\n state: 'app-failed',\n });\n })\n .finally(() => {\n const bootCompleteEvent = new CustomEvent('muse_boot_completed', {\n detail: {\n result: status,\n metrics: [\n {\n name: 'app-start-result',\n payload: {\n duration: Date.now() - timeStart,\n status,\n errorMsg,\n url: document.location.href,\n },\n },\n {\n name: 'app-start-exceptions',\n payload: appStartExceptions,\n },\n ],\n },\n });\n window.dispatchEvent(bootCompleteEvent);\n });\n}\n","const error = {\n errors: [],\n init() {\n const errorDiv = document.createElement('div');\n errorDiv.innerHTML = ``;\n errorDiv.id = 'muse-error-node';\n document.body.appendChild(errorDiv);\n this.mountNode = errorDiv;\n },\n showMessage(msg) {\n const arr = msg?.splice ? msg : [msg];\n this.errors.push(...arr);\n this.update();\n },\n update() {\n if (!this.mountNode) this.init();\n\n const content =\n this.errors.length === 1\n ? `<div>${this.errors[0]}</div>`\n : `<ul>\n ${this.errors.map((err) => '<li>' + err + '</li>').join('')}\n </ul>`;\n this.mountNode.innerHTML = `\n <div class=\"muse-error-node-inner\">\n <h4>Failed to load:</h4>\n ${content}\n <p>* Unexpected error happened, please refresh to retry or <a href=\"${\n window.MUSE_GLOBAL.appConfig?.supportLink || '#'\n }\">contact support</a>.</p>\n </div>\n `;\n },\n};\n\nexport default error;\n","import logo from './logo.png';\n\nconst loading = {\n init() {\n const { app, cdn } = window.MUSE_GLOBAL;\n const loadingDiv = document.createElement('div');\n const logoUrl = app.iconId\n ? `${cdn}/p/app-icon.${app.name}/v0.0.${app.iconId}/dist/icon.png`\n : logo;\n loadingDiv.innerHTML = `\n <div>\n <div class='muse-loading-node-inner'>\n <div class=\"loadingio-spinner-eclipse-p5fn84x4bh8\"><div class=\"ldio-klconu2768\"><div>\n </div></div></div>\n <img src=\"${logoUrl}\" aria-label=\"logo\" />\n </div>\n <label>Starting...</label>\n </div>\n `;\n loadingDiv.id = 'muse-loading-node';\n if (\n (app.config?.theme === 'dark' && !localStorage.getItem('muse.theme')) ||\n (localStorage.getItem('muse.theme') && localStorage.getItem('muse.theme') === 'dark')\n ) {\n document.body.classList.add('muse-theme-dark');\n }\n document.body.appendChild(loadingDiv);\n this.mountNode = loadingDiv;\n this.labelNode = loadingDiv.querySelector('label');\n },\n\n hide() {\n if (!this.mountNode) return;\n setTimeout(() => {\n this.mountNode.style.opacity = 0;\n }, 10);\n\n setTimeout(() => {\n document.body.removeChild(this.mountNode);\n delete this.mountNode;\n }, 800);\n\n delete this.labelNode;\n },\n\n showMessage(msg) {\n if (this.labelNode) this.labelNode.innerHTML = msg || '';\n },\n};\n\nexport default loading;\n","// Message engine is used to communicate between main app and sub app via postMessage\nconst makeId = () => Math.random().toString(36).substring(2);\n\nconst msgEngine = {\n listeners: {},\n promises: {},\n iframes: {},\n register(key, iframe) {\n this.iframes[key] = iframe;\n },\n unregister(key) {\n delete this.iframes[key];\n },\n getIframe(iframe) {\n if (typeof iframe === 'string') return this.iframes[iframe];\n return iframe;\n },\n init() {\n // Assert a client is a Muse app\n this.addListener('handle-muse-app-check', (payload, msg) => {\n if (payload?.type === 'assert-muse-app' && msg.data?.from?.clientKey === 'parent') {\n // Tell parent I'm a Muse app.\n this.sendToParent({\n promiseId: msg?.data?.promiseId,\n data: {\n app: window.MUSE_GLOBAL.app.name,\n env: window.MUSE_GLOBAL.env.name,\n },\n });\n\n window.MUSE_GLOBAL.parentApp = msg?.data?.from;\n }\n });\n\n window.addEventListener(\n 'message',\n (msg) => {\n if (msg?.data?.type !== 'muse') return;\n console.log('on muse post msg: ', msg);\n if (msg?.data?.payload?.promiseId) {\n this.resolvePromise(msg.data.payload.promiseId, msg?.data.payload?.data);\n }\n Object.entries(this.listeners).forEach(([id, func]) => {\n try {\n func(msg.data.payload, msg);\n } catch (err) {\n console.log(`Warning: failed to process message \"${id}\"`, msg, err);\n }\n });\n },\n false,\n );\n },\n resolve(promiseId, payload) {\n // Todo: send\n },\n // a component could listen messages from other apps\n addListener(id, callback) {\n this.listeners[id] = callback;\n },\n removeListener(id) {\n delete this.listeners[id];\n },\n sendToChild(msg, iframe, isPromise = false) {\n let promise = null;\n let promiseHandler = null;\n let id = null;\n if (isPromise) {\n id = makeId();\n promise = new Promise((resolve, reject) => {\n promiseHandler = this.promises[id] = { resolve, reject };\n });\n }\n try {\n this.getIframe(iframe)?.contentWindow?.postMessage(\n {\n type: 'muse',\n promiseId: id,\n from: {\n app: window.MUSE_GLOBAL.appName,\n env: window.MUSE_GLOBAL.envName,\n clientKey: 'parent',\n },\n payload: msg,\n },\n '*',\n );\n } catch (err) {\n console.log(`Failed to post message to child: `, msg);\n if (promise) promiseHandler.reject(err);\n }\n return promise;\n },\n\n sendToParent(msg, isPromise = false) {\n let promise = null;\n let promiseHandler = null;\n let id = null;\n if (isPromise) {\n id = makeId();\n promise = new Promise((resolve, reject) => {\n promiseHandler = this.promises[id] = { resolve, reject };\n });\n }\n if (window.parent && window.parent !== window) {\n try {\n window.parent.postMessage(\n {\n type: 'muse',\n promiseId: id,\n from: {\n app: window.MUSE_GLOBAL.appName,\n env: window.MUSE_GLOBAL.envName,\n type: 'child',\n },\n payload: msg,\n },\n '*',\n );\n } catch (err) {\n console.log('Failed to send message to parent: ', msg);\n if (promise) promiseHandler.reject(err);\n }\n }\n return promise;\n },\n\n // assert the app in iframe is a muse app\n assertMuseApp(iframe) {\n return new Promise((resolve, reject) => {\n this.sendToChild({ type: 'assert-muse-app' }, this.getIframe(iframe), true).then(resolve);\n setTimeout(() => reject(new Error('Muse app check timeout.')), 300); // if no response in 300ms (normally 30ms), it means it's not a Muse app.\n });\n },\n\n getParentUrl() {\n return new Promise((resolve, reject) => {\n this.sendToParent({ type: 'get-parent-url' }, true).then(resolve);\n setTimeout(() => reject(new Error('Get parent url timeout.')), 300); // if no response in 300ms (normally 30ms), it means it's not a Muse app.\n });\n },\n\n parentNavigate(url) {\n this.sendToParent({ type: 'parent-navigate', url });\n },\n\n resolvePromise(promiseId, payload) {\n this.promises[promiseId]?.resolve(payload);\n delete this.promises[promiseId];\n },\n resolveParent(promiseId, payload) {\n msgEngine.sendToParent({ promiseId: promiseId, data: payload });\n },\n\n resolveChild(promiseId, payload, msg) {\n msgEngine.sendToChild({ promiseId: promiseId, data: payload }, msg?.source);\n },\n};\n\n// Assert a client is a Muse app\nmsgEngine.addListener('handle-muse-app-check', (payload, msg) => {\n if (payload?.type === 'assert-muse-app' && msg.data?.from?.clientKey === 'parent') {\n // Tell parent I'm a Muse app.\n msgEngine.resolveParent(msg?.data?.promiseId, {\n app: window.MUSE_GLOBAL.appName,\n env: window.MUSE_GLOBAL.envName,\n });\n }\n});\n\n// Allow to navigate from sub app\nmsgEngine.addListener('parent-navigate', (payload) => {\n if (payload?.type === 'parent-navigate' && payload?.url) {\n window.location.href = payload.url;\n }\n});\n\n// Allow to get url from parent\nmsgEngine.addListener('get-parent-url', (payload, msg) => {\n if (payload?.type === 'get-parent-url') {\n console.log('get-parent-url: ', window.location.href);\n msgEngine.resolveChild(msg?.data?.promiseId, window.location.href, msg);\n }\n});\n\nexport default msgEngine;\n","// Try to register service worker.\nimport loading from './loading';\n\nfunction registerSw() {\n const { serviceWorker } = window.MUSE_GLOBAL;\n if (!navigator.serviceWorker) return;\n if (serviceWorker && window.location.protocol === 'https:') {\n loading.showMessage('Registering Muse service worker.');\n return new Promise((resolve) => {\n let resolved = false;\n setTimeout(() => {\n if (!resolved) {\n console.log('Failed to register service worker in 10 seconds. Skip it.');\n resolve();\n }\n }, 10000);\n navigator.serviceWorker\n .register(serviceWorker, {})\n .then(function () {\n resolved = true;\n console.log('Service Worker register done.');\n resolve();\n })\n .catch(() => {\n resolved = true;\n console.log('Failed to register service worker, skip it.');\n resolve(); // Tolerate failures\n });\n });\n }\n}\n\nexport default registerSw;\n","\n import API from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!../node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.102.1/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!../node_modules/.pnpm/source-map-loader@3.0.2_webpack@5.102.1/node_modules/source-map-loader/dist/cjs.js!./style.css\";\n \n \n\nvar options = {\"base\":11914653};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!../node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.102.1/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!../node_modules/.pnpm/source-map-loader@3.0.2_webpack@5.102.1/node_modules/source-map-loader/dist/cjs.js!./style.css\";\n export default content && content.locals ? content.locals : undefined;\n","// Notify the parent of the url change\n// subapp => parent\n// In muse-react/src/common/history handle url change msg\n\nimport msgEngine from './msgEngine';\n\nconst patchHistoryMethod = (method) => {\n const history = window.history;\n const original = history[method];\n\n history[method] = function (state) {\n const result = original.apply(this, arguments);\n const event = new Event('muse_boot_' + method.toLowerCase());\n event.state = state;\n window.dispatchEvent(event);\n return result;\n };\n};\n\npatchHistoryMethod('pushState');\npatchHistoryMethod('replaceState');\n\nconst handleUrlChange = () => {\n msgEngine.sendToParent({\n type: 'child-route-change',\n path: window.location.href.replace(window.location.origin, ''),\n });\n};\nwindow.addEventListener('popstate', handleUrlChange);\nwindow.addEventListener('muse_boot_pushstate', handleUrlChange);\nwindow.addEventListener('muse_boot_replacestate', handleUrlChange);\n","import error from './error';\nconst noop = () => {};\n\nexport function load(plugin, callback) {\n callback = callback || noop;\n if (plugin.then && plugin.catch) {\n plugin.then(callback);\n return;\n }\n\n if (plugin.url) {\n return new Promise((resolve, reject) => {\n const head = document.querySelector('head');\n const script = document.createElement('script');\n script.src = plugin.url;\n if (plugin.esModule) script.type = 'module';\n head.appendChild(script);\n script.onload = () => {\n callback();\n resolve();\n };\n // from unit tests, we resolve this Promise immediately. This is needed, as jest will never run the script.onload() function,\n // as it's not a real browser, making the Promise never resolve.\n if (process.env.NODE_ENV === 'test') {\n resolve();\n }\n script.onerror = () => {\n error.showMessage(`Failed to load resource: ${plugin.url} .`);\n reject();\n };\n });\n }\n}\n\nexport async function loadInParallel(items, callback = noop) {\n let count = 0;\n await Promise.all(\n items.map(async (item) => {\n await load(item);\n callback(++count);\n }),\n );\n}\n\nexport function joinPath(p1, p2) {\n if (!p1.endsWith('/')) p1 += '/';\n if (p2.startsWith('/')) p2 = p2.replace(/^\\/+/, '');\n return p1 + p2;\n}\n\nexport function getPluginId(name) {\n if (name.startsWith('@')) return name.replace('/', '.');\n return name;\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.nc = undefined;","// boot plugin is used to load other plugins based on the app config\nimport { bootstrap } from './boot';\n\nbootstrap();\n"],"names":[],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- (()=>{var e={30:e=>{"use strict";var n=[];function t(e){for(var t=-1,o=0;o<n.length;o++)if(n[o].identifier===e){t=o;break}return t}function o(e,o){for(var r={},a=[],s=0;s<e.length;s++){var l=e[s],c=o.base?l[0]+o.base:l[0],d=r[c]||0,p="".concat(c," ").concat(d);r[c]=d+1;var u=t(p),A={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==u)n[u].references++,n[u].updater(A);else{var m=i(A,o);o.byIndex=s,n.splice(s,0,{identifier:p,updater:m,references:1})}a.push(p)}return a}function i(e,n){var t=n.domAPI(n);t.update(e);return function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap&&n.supports===e.supports&&n.layer===e.layer)return;t.update(e=n)}else t.remove()}}e.exports=function(e,i){var r=o(e=e||[],i=i||{});return function(e){e=e||[];for(var a=0;a<r.length;a++){var s=t(r[a]);n[s].references--}for(var l=o(e,i),c=0;c<r.length;c++){var d=t(r[c]);0===n[d].references&&(n[d].updater(),n.splice(d,1))}r=l}}},78:(e,n,t)=>{"use strict";e.exports=function(e){var n=t.nc;n&&e.setAttribute("nonce",n)}},103:e=>{"use strict";e.exports=function(e,n){if(n.styleSheet)n.styleSheet.cssText=e;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(e))}}},104:(e,n,t)=>{e.exports=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof t.g)return t.g;throw new Error("unable to locate global object")}()},122:e=>{"use strict";e.exports=function(e){var n=document.createElement("style");return e.setAttributes(n,e.attributes),e.insert(n,e.options),n}},123:e=>{e.exports=function(e){try{var n;const t=/((^@[^/]+\/)?([^@/]+))@(\d+)\.(\d+)\.(\d+)([^./][^/]*)?\/(.+)$/.exec(e);return t?{name:t[1],path:t[8],id:"".concat(t[1],"/").concat(t[8]),museId:e,version:t.slice(4,7).map(Number),preRelease:null===(n=t[7])||void 0===n?void 0:n.replace("-","")}:null}catch(t){return null}}},142:e=>{"use strict";e.exports=function(e){var n=e[1],t=e[3];if(!t)return n;if("function"===typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),r="/*# ".concat(i," */");return[n].concat([r]).join("\n")}return[n].join("\n")}},267:(e,n,t)=>{e.exports={config:t(753),require:t(506),register:t(914),parseMuseId:t(123),findMuseModule:t(734)}},293:e=>{"use strict";var n={};e.exports=function(e,t){var o=function(e){if("undefined"===typeof n[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(o){t=null}n[e]=t}return n[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}},487:e=>{"use strict";e.exports=function(e){if("undefined"===typeof document)return{update:function(){},remove:function(){}};var n=e.insertStyleElement(e);return{update:function(t){!function(e,n,t){var o="";t.supports&&(o+="@supports (".concat(t.supports,") {")),t.media&&(o+="@media ".concat(t.media," {"));var i="undefined"!==typeof t.layer;i&&(o+="@layer".concat(t.layer.length>0?" ".concat(t.layer):""," {")),o+=t.css,i&&(o+="}"),t.media&&(o+="}"),t.supports&&(o+="}");var r=t.sourceMap;r&&"undefined"!==typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),n.styleTagTransform(o,e,n.options)}(n,e,t)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)}}}},506:(e,n,t)=>{const o=t(734);var i={};e.exports=e=>{var n=i[e];n||(museModule=n,i[e]=o(e));const t=i[e];if(!t)throw new Error("Muse shared module not found: "+e);return t.__require__(t.id)}},733:(e,n,t)=>{const o=t(123);e.exports=function(e){e.cache||(e.cache={}),e.modules||(e.modules={}),Object.keys(e.modules).forEach(n=>{const t=o(n);t&&(e.cache[t.id]||(e.cache[t.id]=[]),e.cache[t.id].push(t))})}},734:(e,n,t)=>{const o=t(123),i=t(733),r=t(753),a=(e,n)=>[0,1,2].map(t=>Math.abs(e[t]-n[t])),s=(e,n)=>{for(let t=0;t<3;t++){if(e[t]<n[t])return!0;if(e[t]>n[t])return!1}return!1},l=(e,n)=>!s(e,n);e.exports=function(e,n){if(e=e.replace(/\\/g,"/").replace(/\/+/g,"/"),n||(n=MUSE_GLOBAL.__shared__),n.modules[e])return n.modules[e];let t=n.cache;t||(i(n),t=n.cache);const c=o(e);if(!c)return null;const d=t[c.id];if(!d)return null;let p=d[0],u=a(c.version,p.version);for(let o=1;o<d.length;o++){const e=d[o];if(c.version.join(".")===e.version.join(".")){p=e;break}if(l(p.version,c.version)&&s(e.version,c.version))continue;const n=a(e.version,c.version);(s(p.version,c.version)&&l(e.version,c.version)||s(n,u))&&(u=n,p=e)}switch(r.matchVersion){case"major":if(0!==u[0])return null;break;case"minor":if(0!==u[0]||0!==u[1])return null;break;case"patch":if(0!==u[0]||0!==u[1]||0!==u[2])return null}return n.modules[p.museId]}},753:()=>{},774:e=>{"use strict";e.exports=function(e){var n=[];return n.toString=function(){return this.map(function(n){var t="",o="undefined"!==typeof n[5];return n[4]&&(t+="@supports (".concat(n[4],") {")),n[2]&&(t+="@media ".concat(n[2]," {")),o&&(t+="@layer".concat(n[5].length>0?" ".concat(n[5]):""," {")),t+=e(n),o&&(t+="}"),n[2]&&(t+="}"),n[4]&&(t+="}"),t}).join("")},n.i=function(e,t,o,i,r){"string"===typeof e&&(e=[[null,e,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);o&&a[d[0]]||("undefined"!==typeof r&&("undefined"===typeof d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),t&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=t):d[2]=t),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),n.push(d))}},n}},860:(e,n,t)=>{"use strict";t.d(n,{A:()=>s});var o=t(142),i=t.n(o),r=t(774),a=t.n(r)()(i());a.push([e.id,"#muse-loading-node {\n position: fixed;\n display: grid;\n place-items: center;\n left: 0;\n top: 0%;\n width: 100%;\n height: 100%;\n z-index: 99999;\n /* background-color: #fff; */\n transition: opacity ease-out 0.3s;\n line-height: 1.5 !important;\n}\n\n#muse-loading-node .muse-loading-node-inner {\n position: relative;\n display: grid;\n place-items: center;\n}\n\n/* #muse-loading-node .muse-loading-node-inner > svg {\n width: 120px;\n height: 120px;\n} */\n\n#muse-loading-node .muse-loading-node-inner > img {\n position: absolute;\n width: 60px;\n}\n\n#muse-loading-node div > label {\n display: block;\n text-align: center;\n font-family: Helvetica, Arial, sans-serif;\n color: #888;\n font-size: 13px;\n}\n\n@keyframes ldio-klconu2768 {\n 0% {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(180deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.ldio-klconu2768 div {\n position: absolute;\n animation: ldio-klconu2768 1s linear infinite;\n width: 140px;\n height: 140px;\n top: 30px;\n left: 30px;\n border-radius: 50%;\n box-shadow: 0 4px 0 0 #00b4d8;\n transform-origin: 70px 72px;\n}\n.loadingio-spinner-eclipse-p5fn84x4bh8 {\n width: 200px;\n height: 200px;\n display: inline-block;\n overflow: hidden;\n}\n.ldio-klconu2768 {\n width: 100%;\n height: 100%;\n position: relative;\n transform: translateZ(0) scale(1);\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n transform-origin: 0 0; /* see note above */\n}\n.ldio-klconu2768 div {\n box-sizing: content-box;\n}\n/* generated by https://loading.io/ */\n\n#muse-error-node {\n position: fixed;\n left: 0;\n top: 0;\n height: 100%;\n width: 100%;\n font-family: Helvetica, Arial, sans-serif;\n color: red;\n line-height: 150%;\n font-size: 14px;\n display: grid;\n place-items: center;\n}\n\n#muse-error-node .muse-error-node-inner {\n min-width: 500px;\n max-width: 800px;\n border: 1px solid red;\n border-radius: 3px;\n padding: 15px;\n}\n#muse-error-node h4 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 16px;\n}\n#muse-error-node li {\n padding: 3px 0;\n}\n#muse-error-node p {\n color: #777;\n font-style: italic;\n font-size: 13px;\n}\n\n#muse-error-node p a {\n color: #039be5;\n text-decoration: none;\n}\n\n#muse-error-node p a:hover {\n text-decoration: underline;\n}\n\n.muse-theme-dark {\n background-color: #141414;\n}\n","",{version:3,sources:["webpack://./src/style.css"],names:[],mappings:"AAAA;EACE,eAAe;EACf,aAAa;EACb,mBAAmB;EACnB,OAAO;EACP,OAAO;EACP,WAAW;EACX,YAAY;EACZ,cAAc;EACd,4BAA4B;EAC5B,iCAAiC;EACjC,2BAA2B;AAC7B;;AAEA;EACE,kBAAkB;EAClB,aAAa;EACb,mBAAmB;AACrB;;AAEA;;;GAGG;;AAEH;EACE,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,cAAc;EACd,kBAAkB;EAClB,yCAAyC;EACzC,WAAW;EACX,eAAe;AACjB;;AAEA;EACE;IACE,uBAAuB;EACzB;EACA;IACE,yBAAyB;EAC3B;EACA;IACE,yBAAyB;EAC3B;AACF;AACA;EACE,kBAAkB;EAClB,6CAA6C;EAC7C,YAAY;EACZ,aAAa;EACb,SAAS;EACT,UAAU;EACV,kBAAkB;EAClB,6BAA6B;EAC7B,2BAA2B;AAC7B;AACA;EACE,YAAY;EACZ,aAAa;EACb,qBAAqB;EACrB,gBAAgB;AAClB;AACA;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,iCAAiC;EACjC,mCAA2B;UAA3B,2BAA2B;EAC3B,qBAAqB,EAAE,mBAAmB;AAC5C;AACA;EACE,uBAAuB;AACzB;AACA,qCAAqC;;AAErC;EACE,eAAe;EACf,OAAO;EACP,MAAM;EACN,YAAY;EACZ,WAAW;EACX,yCAAyC;EACzC,UAAU;EACV,iBAAiB;EACjB,eAAe;EACf,aAAa;EACb,mBAAmB;AACrB;;AAEA;EACE,gBAAgB;EAChB,gBAAgB;EAChB,qBAAqB;EACrB,kBAAkB;EAClB,aAAa;AACf;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,eAAe;AACjB;AACA;EACE,cAAc;AAChB;AACA;EACE,WAAW;EACX,kBAAkB;EAClB,eAAe;AACjB;;AAEA;EACE,cAAc;EACd,qBAAqB;AACvB;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,yBAAyB;AAC3B",sourcesContent:["#muse-loading-node {\n position: fixed;\n display: grid;\n place-items: center;\n left: 0;\n top: 0%;\n width: 100%;\n height: 100%;\n z-index: 99999;\n /* background-color: #fff; */\n transition: opacity ease-out 0.3s;\n line-height: 1.5 !important;\n}\n\n#muse-loading-node .muse-loading-node-inner {\n position: relative;\n display: grid;\n place-items: center;\n}\n\n/* #muse-loading-node .muse-loading-node-inner > svg {\n width: 120px;\n height: 120px;\n} */\n\n#muse-loading-node .muse-loading-node-inner > img {\n position: absolute;\n width: 60px;\n}\n\n#muse-loading-node div > label {\n display: block;\n text-align: center;\n font-family: Helvetica, Arial, sans-serif;\n color: #888;\n font-size: 13px;\n}\n\n@keyframes ldio-klconu2768 {\n 0% {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(180deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.ldio-klconu2768 div {\n position: absolute;\n animation: ldio-klconu2768 1s linear infinite;\n width: 140px;\n height: 140px;\n top: 30px;\n left: 30px;\n border-radius: 50%;\n box-shadow: 0 4px 0 0 #00b4d8;\n transform-origin: 70px 72px;\n}\n.loadingio-spinner-eclipse-p5fn84x4bh8 {\n width: 200px;\n height: 200px;\n display: inline-block;\n overflow: hidden;\n}\n.ldio-klconu2768 {\n width: 100%;\n height: 100%;\n position: relative;\n transform: translateZ(0) scale(1);\n backface-visibility: hidden;\n transform-origin: 0 0; /* see note above */\n}\n.ldio-klconu2768 div {\n box-sizing: content-box;\n}\n/* generated by https://loading.io/ */\n\n#muse-error-node {\n position: fixed;\n left: 0;\n top: 0;\n height: 100%;\n width: 100%;\n font-family: Helvetica, Arial, sans-serif;\n color: red;\n line-height: 150%;\n font-size: 14px;\n display: grid;\n place-items: center;\n}\n\n#muse-error-node .muse-error-node-inner {\n min-width: 500px;\n max-width: 800px;\n border: 1px solid red;\n border-radius: 3px;\n padding: 15px;\n}\n#muse-error-node h4 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 16px;\n}\n#muse-error-node li {\n padding: 3px 0;\n}\n#muse-error-node p {\n color: #777;\n font-style: italic;\n font-size: 13px;\n}\n\n#muse-error-node p a {\n color: #039be5;\n text-decoration: none;\n}\n\n#muse-error-node p a:hover {\n text-decoration: underline;\n}\n\n.muse-theme-dark {\n background-color: #141414;\n}\n"],sourceRoot:""}]),a.locals={};const s=a},914:(e,n,t)=>{const o=t(104),i=t(123);e.exports=function(e,n){for(const t in e){if(!i(t))continue;e[t];o.MUSE_GLOBAL.__shared__.modules[t]={id:t,__require__:n}}}}},n={};function t(o){var i=n[o];if(void 0!==i)return i.exports;var r=n[o]={id:o,exports:{}};return e[o](r,r.exports,t),r.exports}t.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},t.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e;t.g.importScripts&&(e=t.g.location+"");var n=t.g.document;if(!e&&n&&(n.currentScript&&"SCRIPT"===n.currentScript.tagName.toUpperCase()&&(e=n.currentScript.src),!e)){var o=n.getElementsByTagName("script");if(o.length)for(var i=o.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=o[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),t.p=e})(),t.nc=void 0,(()=>{"use strict";function e(n){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(n)}function n(n){var t=function(n,t){if("object"!=e(n)||!n)return n;var o=n[Symbol.toPrimitive];if(void 0!==o){var i=o.call(n,t||"default");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(n)}(n,"string");return"symbol"==e(t)?t:t+""}function o(e,t,o){return(t=n(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function r(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach(function(n){o(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var a=t(267),s=t.n(a);const l=t.p+"static/media/logo.0629cb217459ef0a31a2.png",c={init(){var e;const{app:n,cdn:t}=window.MUSE_GLOBAL,o=document.createElement("div"),i=n.iconId?"".concat(t,"/p/app-icon.").concat(n.name,"/v0.0.").concat(n.iconId,"/dist/icon.png"):l;o.innerHTML='\n <div>\n <div class=\'muse-loading-node-inner\'>\n <div class="loadingio-spinner-eclipse-p5fn84x4bh8"><div class="ldio-klconu2768"><div>\n </div></div></div>\n <img src="'.concat(i,'" aria-label="logo" />\n </div>\n <label>Starting...</label>\n </div>\n '),o.id="muse-loading-node",("dark"===(null===(e=n.config)||void 0===e?void 0:e.theme)&&!localStorage.getItem("muse.theme")||localStorage.getItem("muse.theme")&&"dark"===localStorage.getItem("muse.theme"))&&document.body.classList.add("muse-theme-dark"),document.body.appendChild(o),this.mountNode=o,this.labelNode=o.querySelector("label")},hide(){this.mountNode&&(setTimeout(()=>{this.mountNode.style.opacity=0},10),setTimeout(()=>{document.body.removeChild(this.mountNode),delete this.mountNode},800),delete this.labelNode)},showMessage(e){this.labelNode&&(this.labelNode.innerHTML=e||"")}},d={errors:[],init(){const e=document.createElement("div");e.innerHTML="",e.id="muse-error-node",document.body.appendChild(e),this.mountNode=e},showMessage(e){const n=null!==e&&void 0!==e&&e.splice?e:[e];this.errors.push(...n),this.update()},update(){var e;this.mountNode||this.init();const n=1===this.errors.length?"<div>".concat(this.errors[0],"</div>"):"<ul>\n ".concat(this.errors.map(e=>"<li>"+e+"</li>").join(""),"\n </ul>");this.mountNode.innerHTML='\n <div class="muse-error-node-inner">\n <h4>Failed to load:</h4>\n '.concat(n,'\n <p>* Unexpected error happened, please refresh to retry or <a href="').concat((null===(e=window.MUSE_GLOBAL.appConfig)||void 0===e?void 0:e.supportLink)||"#",'">contact support</a>.</p>\n </div>\n ')}};const p=function(){const{serviceWorker:e}=window.MUSE_GLOBAL;if(navigator.serviceWorker)return e&&"https:"===window.location.protocol?(c.showMessage("Registering Muse service worker."),new Promise(n=>{let t=!1;setTimeout(()=>{t||(console.log("Failed to register service worker in 10 seconds. Skip it."),n())},1e4),navigator.serviceWorker.register(e,{}).then(function(){t=!0,console.log("Service Worker register done."),n()}).catch(()=>{t=!0,console.log("Failed to register service worker, skip it."),n()})})):void 0},u=()=>{};async function A(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,t=0;await Promise.all(e.map(async e=>{await function(e,n){if(n=n||u,!e.then||!e.catch)return e.url?new Promise((t,o)=>{const i=document.querySelector("head"),r=document.createElement("script");r.src=e.url,e.esModule&&(r.type="module"),i.appendChild(r),r.onload=()=>{n(),t()},r.onerror=()=>{d.showMessage("Failed to load resource: ".concat(e.url," .")),o()}}):void 0;e.then(n)}(e),n(++t)}))}function m(e){return e.startsWith("@")?e.replace("/","."):e}const f=()=>Math.random().toString(36).substring(2),h={listeners:{},promises:{},iframes:{},register(e,n){this.iframes[e]=n},unregister(e){delete this.iframes[e]},getIframe(e){return"string"===typeof e?this.iframes[e]:e},init(){this.addListener("handle-muse-app-check",(e,n)=>{var t,o,i,r;"assert-muse-app"===(null===e||void 0===e?void 0:e.type)&&"parent"===(null===(t=n.data)||void 0===t||null===(o=t.from)||void 0===o?void 0:o.clientKey)&&(this.sendToParent({promiseId:null===n||void 0===n||null===(i=n.data)||void 0===i?void 0:i.promiseId,data:{app:window.MUSE_GLOBAL.app.name,env:window.MUSE_GLOBAL.env.name}}),window.MUSE_GLOBAL.parentApp=null===n||void 0===n||null===(r=n.data)||void 0===r?void 0:r.from)}),window.addEventListener("message",e=>{var n,t,o;if("muse"===(null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.type)){var i;if(console.log("on muse post msg: ",e),null!==e&&void 0!==e&&null!==(t=e.data)&&void 0!==t&&null!==(o=t.payload)&&void 0!==o&&o.promiseId)this.resolvePromise(e.data.payload.promiseId,null===e||void 0===e||null===(i=e.data.payload)||void 0===i?void 0:i.data);Object.entries(this.listeners).forEach(n=>{let[t,o]=n;try{o(e.data.payload,e)}catch(i){console.log('Warning: failed to process message "'.concat(t,'"'),e,i)}})}},!1)},resolve(e,n){},addListener(e,n){this.listeners[e]=n},removeListener(e){delete this.listeners[e]},sendToChild(e,n){let t=null,o=null,i=null;arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&(i=f(),t=new Promise((e,n)=>{o=this.promises[i]={resolve:e,reject:n}}));try{var r,a;null===(r=this.getIframe(n))||void 0===r||null===(a=r.contentWindow)||void 0===a||a.postMessage({type:"muse",promiseId:i,from:{app:window.MUSE_GLOBAL.appName,env:window.MUSE_GLOBAL.envName,clientKey:"parent"},payload:e},"*")}catch(s){console.log("Failed to post message to child: ",e),t&&o.reject(s)}return t},sendToParent(e){let n=null,t=null,o=null;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(o=f(),n=new Promise((e,n)=>{t=this.promises[o]={resolve:e,reject:n}})),window.parent&&window.parent!==window)try{window.parent.postMessage({type:"muse",promiseId:o,from:{app:window.MUSE_GLOBAL.appName,env:window.MUSE_GLOBAL.envName,type:"child"},payload:e},"*")}catch(i){console.log("Failed to send message to parent: ",e),n&&t.reject(i)}return n},assertMuseApp(e){return new Promise((n,t)=>{this.sendToChild({type:"assert-muse-app"},this.getIframe(e),!0).then(n),setTimeout(()=>t(new Error("Muse app check timeout.")),300)})},getParentUrl(){return new Promise((e,n)=>{this.sendToParent({type:"get-parent-url"},!0).then(e),setTimeout(()=>n(new Error("Get parent url timeout.")),300)})},parentNavigate(e){this.sendToParent({type:"parent-navigate",url:e})},resolvePromise(e,n){var t;null===(t=this.promises[e])||void 0===t||t.resolve(n),delete this.promises[e]},resolveParent(e,n){h.sendToParent({promiseId:e,data:n})},resolveChild(e,n,t){h.sendToChild({promiseId:e,data:n},null===t||void 0===t?void 0:t.source)}};h.addListener("handle-muse-app-check",(e,n)=>{var t,o,i;"assert-muse-app"===(null===e||void 0===e?void 0:e.type)&&"parent"===(null===(t=n.data)||void 0===t||null===(o=t.from)||void 0===o?void 0:o.clientKey)&&h.resolveParent(null===n||void 0===n||null===(i=n.data)||void 0===i?void 0:i.promiseId,{app:window.MUSE_GLOBAL.appName,env:window.MUSE_GLOBAL.envName})}),h.addListener("parent-navigate",e=>{"parent-navigate"===(null===e||void 0===e?void 0:e.type)&&null!==e&&void 0!==e&&e.url&&(window.location.href=e.url)}),h.addListener("get-parent-url",(e,n)=>{var t;"get-parent-url"===(null===e||void 0===e?void 0:e.type)&&(console.log("get-parent-url: ",window.location.href),h.resolveChild(null===n||void 0===n||null===(t=n.data)||void 0===t?void 0:t.promiseId,window.location.href,n))});const g=h,v=e=>{const n=window.history,t=n[e];n[e]=function(n){const o=t.apply(this,arguments),i=new Event("muse_boot_"+e.toLowerCase());return i.state=n,window.dispatchEvent(i),o}};v("pushState"),v("replaceState");const w=()=>{g.sendToParent({type:"child-route-change",path:window.location.href.replace(window.location.origin,"")})};window.addEventListener("popstate",w),window.addEventListener("muse_boot_pushstate",w),window.addEventListener("muse_boot_replacestate",w);var E=t(30),y=t.n(E),b=t(487),C=t.n(b),B=t(293),x=t.n(B),M=t(78),L=t.n(M),k=t(122),S=t.n(k),O=t(103),_=t.n(O),P=t(860),j={base:11914653};j.styleTagTransform=_(),j.setAttributes=L(),j.insert=x().bind(null,"head"),j.domAPI=C(),j.insertStyleElement=S();y()(P.A,j);P.A&&P.A.locals&&P.A.locals;!function(){if(!window.MUSE_GLOBAL)throw new Error("There must be a global window.MUSE_GLOBAL object");c.init(),g.init();const e=Date.now(),n=[];let t,o="success";(async function(){var e,n;const t=window.sessionStorage.getItem("MUSE_TEMP_temp-redirect-url");if(t)return window.sessionStorage.removeItem("MUSE_TEMP_temp-redirect-url"),void(window.location=t);const o=window.MUSE_GLOBAL;c.showMessage("Starting...");const i=o.waitForLoaders||[],a=Object.assign({},null===(e=o.app)||void 0===e?void 0:e.config);Object.entries((null===(n=o.env)||void 0===n?void 0:n.config)||{}).forEach(e=>{let[n,t]=e;null!==t&&void 0!==t&&""!==t&&(a[n]=t)}),Object.assign(o,{appVariables:o.appVariables||{},pluginVariables:o.pluginVariables||{},appConfig:a,msgEngine:g,loading:c,error:d,isSubApp:window.parent!==window,getUser:()=>null,appEntries:o.appEntries||[],initEntries:o.initEntries||[],pluginEntries:o.pluginEntries||[],waitFor:e=>{i.push(e)},getPublicPath:(e,n)=>{var t;if(!n)throw new Error("assetPath is required for getPublicPath method.");n=n.replace(/^\/*/,"");const i=m(e);if(o.isDev){var r;const t=null===(r=o.plugins.find(e=>!!e.localPlugins))||void 0===r?void 0:r.localPlugins;if(t&&t.includes(e))return"/muse-assets/local/p/".concat(i,"/").concat(n)}const a=null===(t=window.MUSE_GLOBAL.plugins)||void 0===t?void 0:t.find(n=>n.name===e);if(!a)return;let{version:s}=a||{};s.startsWith("v")||(s="v".concat(s));let l="".concat(window.MUSE_GLOBAL.cdn,"/p/").concat(i,"/").concat(s);return window.MUSE_GLOBAL.isDev||window.MUSE_GLOBAL.isLocal?l+="/dev/".concat(n):l+="/dist/".concat(n),l},__shared__:{modules:{},register:s().register,require:s().require,parseMuseId:s().parseMuseId}});const{cdn:l="",initEntries:u,pluginEntries:f,appEntries:h,isDev:v=!1,isE2eTest:w=!1}=o;let{plugins:E=[]}=window.MUSE_GLOBAL;window.MUSE_CONFIG=o,g.sendToParent({type:"app-state-change",state:"app-starting"}),p();const y=E.find(e=>"boot"===e.type);y&&console.log("Loading Muse app by ".concat(y.name,"@").concat(y.version||y.url,"..."));const b=new URLSearchParams(window.location.search).get("forcePlugins");if(b){const e=b.split(";").filter(Boolean).reduce((e,n)=>{let t="";n.startsWith("@")&&"@"===n[0]&&(n=n.substring(1),t="@");const o=n.split("@",2);if(2===o.length){const[n,i]=o[0].split("!");e["".concat(t).concat(n)]={version:o[1],type:i}}return e},{});E=E.map(n=>{if(!e[n.name])return n;const t=r(r({},n),{},{version:e[n.name].version});return delete e[n.name],t}).filter(e=>"null"!==e.version);for(const n in e)"null"!==e[n].version&&E.push({name:n,type:e[n].type,version:e[n].version})}console.log("Plugins(".concat(E.length,"):")),E.forEach(e=>{let n="";if(e.linkedTo)n="Linked to: "+e.linkedTo;else if(e.isLocalLib){var t;n="Local:"+((null===(t=/\d{4,}/.exec(e.url))||void 0===t?void 0:t[0])||document.location.port)}else e.url&&(n=e.url);n&&(n=" (".concat(n,")")),console.log(" * ".concat(e.name,"@").concat(e.version||"local").concat(n))}),g.sendToParent({type:"app-state-change",state:"app-loading"});const C=E.filter(e=>"init"===e.type).map(e=>r({url:!e.isLocal&&!e.linkedTo&&(e.url||"".concat(l,"/p/").concat(m(e.name),"/v").concat(e.version,"/dist/main.js"))},e)).filter(Boolean);if(C.length>0&&(c.showMessage("Loading init plugins 1/".concat(C.length,"...")),await A(C,e=>c.showMessage("Loading init plugins ".concat(Math.min(e+1,C.length),"/").concat(C.length,"...")))),u.length>0){c.showMessage("Executing init entries...");for(const e of u)if(!1===await e.func())return}const B=v?"dev":w?"test":"dist",x=E.filter(e=>"boot"!==e.type&&"init"!==e.type).map(e=>r({url:!e.isLocal&&!e.linkedTo&&(e.url||"".concat(l,"/p/").concat(m(e.name),"/v").concat(e.version,"/").concat(B,"/main.js"))},e)).filter(Boolean),M=x.filter(e=>"lib"===e.type);c.showMessage("Loading lib plugins 1/".concat(M.length,"...")),await A(M.filter(e=>!e.esModule),e=>c.showMessage("Loading lib plugins ".concat(Math.min(e+1,M.length),"/").concat(M.length,"...")));const L=x.filter(e=>"normal"===e.type||!e.type);c.showMessage("Loading normal plugins 1/".concat(L.length,"...")),await A(L.filter(e=>!e.esModule),e=>c.showMessage("Loading normal plugins ".concat(Math.min(e+1,L.length),"/").concat(L.length,"...")));const k=x.filter(e=>e.esModule);if(await A(k.filter(e=>e.esModule),e=>c.showMessage("Loading es plugins ".concat(Math.min(e+1,k.length),"/").concat(k.length,"..."))),f.length>0&&(c.showMessage("Executing plugin entries..."),f.forEach(e=>e.func())),i.length>0&&(c.showMessage("Executing custom loaders ..."),(await Promise.all(i.map(async e=>e.then?await e:await e()))).some(e=>!1===e)))return;let S=a.entry;if(!S){if(1!==h.length)throw 0===h.length?new Error("No app entry found. You need a plugin deployed to the app to provide an app entry."):new Error("Multiple entries found: ".concat(h.map(e=>e.name).join(", "),". You need to specify one entry in app config."));S=h[0].name}const O=h.find(e=>e.name===S);if(!O)throw new Error("The specified app entry was not found: ".concat(S,"."));console.log("Starting the app from ".concat(S,"...")),c.showMessage("Starting the app..."),await O.func(),c.hide()})().then(()=>{const n=Date.now();g.sendToParent({type:"app-state-change",state:"app-loaded"}),console.log("Muse app started in ".concat((n-e)/1e3," seconds."))}).catch(e=>{console.log("Failed to start the app."),o="failure",t=(null===e||void 0===e?void 0:e.message)||"App failed to start.",n.push(e),e&&console.error(e),c.hide(),null!==e&&void 0!==e&&e.message&&d.showMessage(e.message),g.sendToParent({type:"app-state-change",state:"app-failed"})}).finally(()=>{const i=new CustomEvent("muse_boot_completed",{detail:{result:o,metrics:[{name:"app-start-result",payload:{duration:Date.now()-e,status:o,errorMsg:t,url:document.location.href}},{name:"app-start-exceptions",payload:n}]}});window.dispatchEvent(i)})}()})()})();
1
+ (()=>{var e={30:e=>{"use strict";var n=[];function t(e){for(var t=-1,o=0;o<n.length;o++)if(n[o].identifier===e){t=o;break}return t}function o(e,o){for(var r={},a=[],s=0;s<e.length;s++){var l=e[s],d=o.base?l[0]+o.base:l[0],c=r[d]||0,p="".concat(d," ").concat(c);r[d]=c+1;var u=t(p),A={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==u)n[u].references++,n[u].updater(A);else{var m=i(A,o);o.byIndex=s,n.splice(s,0,{identifier:p,updater:m,references:1})}a.push(p)}return a}function i(e,n){var t=n.domAPI(n);t.update(e);return function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap&&n.supports===e.supports&&n.layer===e.layer)return;t.update(e=n)}else t.remove()}}e.exports=function(e,i){var r=o(e=e||[],i=i||{});return function(e){e=e||[];for(var a=0;a<r.length;a++){var s=t(r[a]);n[s].references--}for(var l=o(e,i),d=0;d<r.length;d++){var c=t(r[d]);0===n[c].references&&(n[c].updater(),n.splice(c,1))}r=l}}},78:(e,n,t)=>{"use strict";e.exports=function(e){var n=t.nc;n&&e.setAttribute("nonce",n)}},103:e=>{"use strict";e.exports=function(e,n){if(n.styleSheet)n.styleSheet.cssText=e;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(e))}}},104:(e,n,t)=>{e.exports=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof t.g)return t.g;throw new Error("unable to locate global object")}()},122:e=>{"use strict";e.exports=function(e){var n=document.createElement("style");return e.setAttributes(n,e.attributes),e.insert(n,e.options),n}},123:e=>{e.exports=function(e){try{var n;const t=/((^@[^/]+\/)?([^@/]+))@(\d+)\.(\d+)\.(\d+)([^./][^/]*)?\/(.+)$/.exec(e);return t?{name:t[1],path:t[8],id:"".concat(t[1],"/").concat(t[8]),museId:e,version:t.slice(4,7).map(Number),preRelease:null===(n=t[7])||void 0===n?void 0:n.replace("-","")}:null}catch(t){return null}}},142:e=>{"use strict";e.exports=function(e){var n=e[1],t=e[3];if(!t)return n;if("function"===typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),r="/*# ".concat(i," */");return[n].concat([r]).join("\n")}return[n].join("\n")}},267:(e,n,t)=>{e.exports={config:t(753),require:t(506),register:t(914),parseMuseId:t(123),findMuseModule:t(734)}},293:e=>{"use strict";var n={};e.exports=function(e,t){var o=function(e){if("undefined"===typeof n[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(o){t=null}n[e]=t}return n[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}},487:e=>{"use strict";e.exports=function(e){if("undefined"===typeof document)return{update:function(){},remove:function(){}};var n=e.insertStyleElement(e);return{update:function(t){!function(e,n,t){var o="";t.supports&&(o+="@supports (".concat(t.supports,") {")),t.media&&(o+="@media ".concat(t.media," {"));var i="undefined"!==typeof t.layer;i&&(o+="@layer".concat(t.layer.length>0?" ".concat(t.layer):""," {")),o+=t.css,i&&(o+="}"),t.media&&(o+="}"),t.supports&&(o+="}");var r=t.sourceMap;r&&"undefined"!==typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),n.styleTagTransform(o,e,n.options)}(n,e,t)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)}}}},506:(e,n,t)=>{const o=t(734);var i={};e.exports=e=>{var n=i[e];n||(museModule=n,i[e]=o(e));const t=i[e];if(!t)throw new Error("Muse shared module not found: "+e);return t.__require__(t.id)}},733:(e,n,t)=>{const o=t(123);e.exports=function(e){e.cache||(e.cache={}),e.modules||(e.modules={}),Object.keys(e.modules).forEach(n=>{const t=o(n);t&&(e.cache[t.id]||(e.cache[t.id]=[]),e.cache[t.id].push(t))})}},734:(e,n,t)=>{const o=t(123),i=t(733),r=t(753),a=(e,n)=>[0,1,2].map(t=>Math.abs(e[t]-n[t])),s=(e,n)=>{for(let t=0;t<3;t++){if(e[t]<n[t])return!0;if(e[t]>n[t])return!1}return!1},l=(e,n)=>!s(e,n);e.exports=function(e,n){if(e=e.replace(/\\/g,"/").replace(/\/+/g,"/"),n||(n=MUSE_GLOBAL.__shared__),n.modules[e])return n.modules[e];let t=n.cache;t||(i(n),t=n.cache);const d=o(e);if(!d)return null;const c=t[d.id];if(!c)return null;let p=c[0],u=a(d.version,p.version);for(let o=1;o<c.length;o++){const e=c[o];if(d.version.join(".")===e.version.join(".")){p=e;break}if(l(p.version,d.version)&&s(e.version,d.version))continue;const n=a(e.version,d.version);(s(p.version,d.version)&&l(e.version,d.version)||s(n,u))&&(u=n,p=e)}switch(r.matchVersion){case"major":if(0!==u[0])return null;break;case"minor":if(0!==u[0]||0!==u[1])return null;break;case"patch":if(0!==u[0]||0!==u[1]||0!==u[2])return null}return n.modules[p.museId]}},753:()=>{},774:e=>{"use strict";e.exports=function(e){var n=[];return n.toString=function(){return this.map(function(n){var t="",o="undefined"!==typeof n[5];return n[4]&&(t+="@supports (".concat(n[4],") {")),n[2]&&(t+="@media ".concat(n[2]," {")),o&&(t+="@layer".concat(n[5].length>0?" ".concat(n[5]):""," {")),t+=e(n),o&&(t+="}"),n[2]&&(t+="}"),n[4]&&(t+="}"),t}).join("")},n.i=function(e,t,o,i,r){"string"===typeof e&&(e=[[null,e,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var d=0;d<e.length;d++){var c=[].concat(e[d]);o&&a[c[0]]||("undefined"!==typeof r&&("undefined"===typeof c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=r),t&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=t):c[2]=t),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),n.push(c))}},n}},860:(e,n,t)=>{"use strict";t.d(n,{A:()=>s});var o=t(142),i=t.n(o),r=t(774),a=t.n(r)()(i());a.push([e.id,"#muse-loading-node {\n position: fixed;\n display: grid;\n place-items: center;\n left: 0;\n top: 0%;\n width: 100%;\n height: 100%;\n z-index: 99999;\n /* background-color: #fff; */\n transition: opacity ease-out 0.3s;\n line-height: 1.5 !important;\n}\n\n#muse-loading-node .muse-loading-node-inner {\n position: relative;\n display: grid;\n place-items: center;\n}\n\n/* #muse-loading-node .muse-loading-node-inner > svg {\n width: 120px;\n height: 120px;\n} */\n\n#muse-loading-node .muse-loading-node-inner > img {\n position: absolute;\n width: 60px;\n}\n\n#muse-loading-node div > label {\n display: block;\n text-align: center;\n font-family: Helvetica, Arial, sans-serif;\n color: #888;\n font-size: 13px;\n}\n\n@keyframes ldio-klconu2768 {\n 0% {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(180deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.ldio-klconu2768 div {\n position: absolute;\n animation: ldio-klconu2768 1s linear infinite;\n width: 140px;\n height: 140px;\n top: 30px;\n left: 30px;\n border-radius: 50%;\n box-shadow: 0 4px 0 0 #00b4d8;\n transform-origin: 70px 72px;\n}\n.loadingio-spinner-eclipse-p5fn84x4bh8 {\n width: 200px;\n height: 200px;\n display: inline-block;\n overflow: hidden;\n}\n.ldio-klconu2768 {\n width: 100%;\n height: 100%;\n position: relative;\n transform: translateZ(0) scale(1);\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n transform-origin: 0 0; /* see note above */\n}\n.ldio-klconu2768 div {\n box-sizing: content-box;\n}\n/* generated by https://loading.io/ */\n\n#muse-error-node {\n position: fixed;\n left: 0;\n top: 0;\n height: 100%;\n width: 100%;\n font-family: Helvetica, Arial, sans-serif;\n color: red;\n line-height: 150%;\n font-size: 14px;\n display: grid;\n place-items: center;\n}\n\n#muse-error-node .muse-error-node-inner {\n min-width: 500px;\n max-width: 800px;\n border: 1px solid red;\n border-radius: 3px;\n padding: 15px;\n}\n#muse-error-node h4 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 16px;\n}\n#muse-error-node li {\n padding: 3px 0;\n}\n#muse-error-node p {\n color: #777;\n font-style: italic;\n font-size: 13px;\n}\n\n#muse-error-node p a {\n color: #039be5;\n text-decoration: none;\n}\n\n#muse-error-node p a:hover {\n text-decoration: underline;\n}\n\n.muse-theme-dark {\n background-color: #141414;\n}\n","",{version:3,sources:["webpack://./src/style.css"],names:[],mappings:"AAAA;EACE,eAAe;EACf,aAAa;EACb,mBAAmB;EACnB,OAAO;EACP,OAAO;EACP,WAAW;EACX,YAAY;EACZ,cAAc;EACd,4BAA4B;EAC5B,iCAAiC;EACjC,2BAA2B;AAC7B;;AAEA;EACE,kBAAkB;EAClB,aAAa;EACb,mBAAmB;AACrB;;AAEA;;;GAGG;;AAEH;EACE,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,cAAc;EACd,kBAAkB;EAClB,yCAAyC;EACzC,WAAW;EACX,eAAe;AACjB;;AAEA;EACE;IACE,uBAAuB;EACzB;EACA;IACE,yBAAyB;EAC3B;EACA;IACE,yBAAyB;EAC3B;AACF;AACA;EACE,kBAAkB;EAClB,6CAA6C;EAC7C,YAAY;EACZ,aAAa;EACb,SAAS;EACT,UAAU;EACV,kBAAkB;EAClB,6BAA6B;EAC7B,2BAA2B;AAC7B;AACA;EACE,YAAY;EACZ,aAAa;EACb,qBAAqB;EACrB,gBAAgB;AAClB;AACA;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,iCAAiC;EACjC,mCAA2B;UAA3B,2BAA2B;EAC3B,qBAAqB,EAAE,mBAAmB;AAC5C;AACA;EACE,uBAAuB;AACzB;AACA,qCAAqC;;AAErC;EACE,eAAe;EACf,OAAO;EACP,MAAM;EACN,YAAY;EACZ,WAAW;EACX,yCAAyC;EACzC,UAAU;EACV,iBAAiB;EACjB,eAAe;EACf,aAAa;EACb,mBAAmB;AACrB;;AAEA;EACE,gBAAgB;EAChB,gBAAgB;EAChB,qBAAqB;EACrB,kBAAkB;EAClB,aAAa;AACf;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,eAAe;AACjB;AACA;EACE,cAAc;AAChB;AACA;EACE,WAAW;EACX,kBAAkB;EAClB,eAAe;AACjB;;AAEA;EACE,cAAc;EACd,qBAAqB;AACvB;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,yBAAyB;AAC3B",sourcesContent:["#muse-loading-node {\n position: fixed;\n display: grid;\n place-items: center;\n left: 0;\n top: 0%;\n width: 100%;\n height: 100%;\n z-index: 99999;\n /* background-color: #fff; */\n transition: opacity ease-out 0.3s;\n line-height: 1.5 !important;\n}\n\n#muse-loading-node .muse-loading-node-inner {\n position: relative;\n display: grid;\n place-items: center;\n}\n\n/* #muse-loading-node .muse-loading-node-inner > svg {\n width: 120px;\n height: 120px;\n} */\n\n#muse-loading-node .muse-loading-node-inner > img {\n position: absolute;\n width: 60px;\n}\n\n#muse-loading-node div > label {\n display: block;\n text-align: center;\n font-family: Helvetica, Arial, sans-serif;\n color: #888;\n font-size: 13px;\n}\n\n@keyframes ldio-klconu2768 {\n 0% {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(180deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.ldio-klconu2768 div {\n position: absolute;\n animation: ldio-klconu2768 1s linear infinite;\n width: 140px;\n height: 140px;\n top: 30px;\n left: 30px;\n border-radius: 50%;\n box-shadow: 0 4px 0 0 #00b4d8;\n transform-origin: 70px 72px;\n}\n.loadingio-spinner-eclipse-p5fn84x4bh8 {\n width: 200px;\n height: 200px;\n display: inline-block;\n overflow: hidden;\n}\n.ldio-klconu2768 {\n width: 100%;\n height: 100%;\n position: relative;\n transform: translateZ(0) scale(1);\n backface-visibility: hidden;\n transform-origin: 0 0; /* see note above */\n}\n.ldio-klconu2768 div {\n box-sizing: content-box;\n}\n/* generated by https://loading.io/ */\n\n#muse-error-node {\n position: fixed;\n left: 0;\n top: 0;\n height: 100%;\n width: 100%;\n font-family: Helvetica, Arial, sans-serif;\n color: red;\n line-height: 150%;\n font-size: 14px;\n display: grid;\n place-items: center;\n}\n\n#muse-error-node .muse-error-node-inner {\n min-width: 500px;\n max-width: 800px;\n border: 1px solid red;\n border-radius: 3px;\n padding: 15px;\n}\n#muse-error-node h4 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 16px;\n}\n#muse-error-node li {\n padding: 3px 0;\n}\n#muse-error-node p {\n color: #777;\n font-style: italic;\n font-size: 13px;\n}\n\n#muse-error-node p a {\n color: #039be5;\n text-decoration: none;\n}\n\n#muse-error-node p a:hover {\n text-decoration: underline;\n}\n\n.muse-theme-dark {\n background-color: #141414;\n}\n"],sourceRoot:""}]),a.locals={};const s=a},914:(e,n,t)=>{const o=t(104),i=t(123);e.exports=function(e,n){for(const t in e){if(!i(t))continue;e[t];o.MUSE_GLOBAL.__shared__.modules[t]={id:t,__require__:n}}}}},n={};function t(o){var i=n[o];if(void 0!==i)return i.exports;var r=n[o]={id:o,exports:{}};return e[o](r,r.exports,t),r.exports}t.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},t.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e;t.g.importScripts&&(e=t.g.location+"");var n=t.g.document;if(!e&&n&&(n.currentScript&&"SCRIPT"===n.currentScript.tagName.toUpperCase()&&(e=n.currentScript.src),!e)){var o=n.getElementsByTagName("script");if(o.length)for(var i=o.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=o[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),t.p=e})(),t.nc=void 0,(()=>{"use strict";function e(n){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(n)}function n(n){var t=function(n,t){if("object"!=e(n)||!n)return n;var o=n[Symbol.toPrimitive];if(void 0!==o){var i=o.call(n,t||"default");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(n)}(n,"string");return"symbol"==e(t)?t:t+""}function o(e,t,o){return(t=n(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function r(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach(function(n){o(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var a=t(267),s=t.n(a);const l=t.p+"static/media/logo.0629cb217459ef0a31a2.png",d={init(){var e;const{app:n,cdn:t}=window.MUSE_GLOBAL,o=document.createElement("div"),i=n.iconId?"".concat(t,"/p/app-icon.").concat(n.name,"/v0.0.").concat(n.iconId,"/dist/icon.png"):l;o.innerHTML='\n <div>\n <div class=\'muse-loading-node-inner\'>\n <div class="loadingio-spinner-eclipse-p5fn84x4bh8"><div class="ldio-klconu2768"><div>\n </div></div></div>\n <img src="'.concat(i,'" aria-label="logo" />\n </div>\n <label>Starting...</label>\n </div>\n '),o.id="muse-loading-node",("dark"===(null===(e=n.config)||void 0===e?void 0:e.theme)&&!localStorage.getItem("muse.theme")||localStorage.getItem("muse.theme")&&"dark"===localStorage.getItem("muse.theme"))&&document.body.classList.add("muse-theme-dark"),document.body.appendChild(o),this.mountNode=o,this.labelNode=o.querySelector("label")},hide(){this.mountNode&&(setTimeout(()=>{this.mountNode.style.opacity=0},10),setTimeout(()=>{document.body.removeChild(this.mountNode),delete this.mountNode},800),delete this.labelNode)},showMessage(e){this.labelNode&&(this.labelNode.innerHTML=e||"")}},c={errors:[],init(){const e=document.createElement("div");e.innerHTML="",e.id="muse-error-node",document.body.appendChild(e),this.mountNode=e},showMessage(e){const n=null!==e&&void 0!==e&&e.splice?e:[e];this.errors.push(...n),this.update()},update(){var e;this.mountNode||this.init();const n=1===this.errors.length?"<div>".concat(this.errors[0],"</div>"):"<ul>\n ".concat(this.errors.map(e=>"<li>"+e+"</li>").join(""),"\n </ul>");this.mountNode.innerHTML='\n <div class="muse-error-node-inner">\n <h4>Failed to load:</h4>\n '.concat(n,'\n <p>* Unexpected error happened, please refresh to retry or <a href="').concat((null===(e=window.MUSE_GLOBAL.appConfig)||void 0===e?void 0:e.supportLink)||"#",'">contact support</a>.</p>\n </div>\n ')}};const p=function(){const{serviceWorker:e}=window.MUSE_GLOBAL;if(navigator.serviceWorker)return e&&"https:"===window.location.protocol?(d.showMessage("Registering Muse service worker."),new Promise(n=>{let t=!1;setTimeout(()=>{t||(console.log("Failed to register service worker in 10 seconds. Skip it."),n())},1e4),navigator.serviceWorker.register(e,{}).then(function(){t=!0,console.log("Service Worker register done."),n()}).catch(()=>{t=!0,console.log("Failed to register service worker, skip it."),n()})})):void 0},u=()=>{};async function A(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,t=0;await Promise.all(e.map(async e=>{await function(e,n){if(n=n||u,!e.then||!e.catch)return e.url?new Promise((t,o)=>{const i=document.querySelector("head"),r=document.createElement("script");r.src=e.url,e.esModule&&(r.type="module"),i.appendChild(r),r.onload=()=>{n(),t()},r.onerror=()=>{c.showMessage("Failed to load resource: ".concat(e.url," .")),o()}}):void 0;e.then(n)}(e),n(++t)}))}function m(e){return e.startsWith("@")?e.replace("/","."):e}const f=()=>Math.random().toString(36).substring(2),h={listeners:{},promises:{},iframes:{},register(e,n){this.iframes[e]=n},unregister(e){delete this.iframes[e]},getIframe(e){return"string"===typeof e?this.iframes[e]:e},init(){this.addListener("handle-muse-app-check",(e,n)=>{var t,o,i,r;"assert-muse-app"===(null===e||void 0===e?void 0:e.type)&&"parent"===(null===(t=n.data)||void 0===t||null===(o=t.from)||void 0===o?void 0:o.clientKey)&&(this.sendToParent({promiseId:null===n||void 0===n||null===(i=n.data)||void 0===i?void 0:i.promiseId,data:{app:window.MUSE_GLOBAL.app.name,env:window.MUSE_GLOBAL.env.name}}),window.MUSE_GLOBAL.parentApp=null===n||void 0===n||null===(r=n.data)||void 0===r?void 0:r.from)}),window.addEventListener("message",e=>{var n,t,o;if("muse"===(null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.type)){var i;if(console.log("on muse post msg: ",e),null!==e&&void 0!==e&&null!==(t=e.data)&&void 0!==t&&null!==(o=t.payload)&&void 0!==o&&o.promiseId)this.resolvePromise(e.data.payload.promiseId,null===e||void 0===e||null===(i=e.data.payload)||void 0===i?void 0:i.data);Object.entries(this.listeners).forEach(n=>{let[t,o]=n;try{o(e.data.payload,e)}catch(i){console.log('Warning: failed to process message "'.concat(t,'"'),e,i)}})}},!1)},resolve(e,n){},addListener(e,n){this.listeners[e]=n},removeListener(e){delete this.listeners[e]},sendToChild(e,n){let t=null,o=null,i=null;arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&(i=f(),t=new Promise((e,n)=>{o=this.promises[i]={resolve:e,reject:n}}));try{var r,a;null===(r=this.getIframe(n))||void 0===r||null===(a=r.contentWindow)||void 0===a||a.postMessage({type:"muse",promiseId:i,from:{app:window.MUSE_GLOBAL.appName,env:window.MUSE_GLOBAL.envName,clientKey:"parent"},payload:e},"*")}catch(s){console.log("Failed to post message to child: ",e),t&&o.reject(s)}return t},sendToParent(e){let n=null,t=null,o=null;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(o=f(),n=new Promise((e,n)=>{t=this.promises[o]={resolve:e,reject:n}})),window.parent&&window.parent!==window)try{window.parent.postMessage({type:"muse",promiseId:o,from:{app:window.MUSE_GLOBAL.appName,env:window.MUSE_GLOBAL.envName,type:"child"},payload:e},"*")}catch(i){console.log("Failed to send message to parent: ",e),n&&t.reject(i)}return n},assertMuseApp(e){return new Promise((n,t)=>{this.sendToChild({type:"assert-muse-app"},this.getIframe(e),!0).then(n),setTimeout(()=>t(new Error("Muse app check timeout.")),300)})},getParentUrl(){return new Promise((e,n)=>{this.sendToParent({type:"get-parent-url"},!0).then(e),setTimeout(()=>n(new Error("Get parent url timeout.")),300)})},parentNavigate(e){this.sendToParent({type:"parent-navigate",url:e})},resolvePromise(e,n){var t;null===(t=this.promises[e])||void 0===t||t.resolve(n),delete this.promises[e]},resolveParent(e,n){h.sendToParent({promiseId:e,data:n})},resolveChild(e,n,t){h.sendToChild({promiseId:e,data:n},null===t||void 0===t?void 0:t.source)}};h.addListener("handle-muse-app-check",(e,n)=>{var t,o,i;"assert-muse-app"===(null===e||void 0===e?void 0:e.type)&&"parent"===(null===(t=n.data)||void 0===t||null===(o=t.from)||void 0===o?void 0:o.clientKey)&&h.resolveParent(null===n||void 0===n||null===(i=n.data)||void 0===i?void 0:i.promiseId,{app:window.MUSE_GLOBAL.appName,env:window.MUSE_GLOBAL.envName})}),h.addListener("parent-navigate",e=>{"parent-navigate"===(null===e||void 0===e?void 0:e.type)&&null!==e&&void 0!==e&&e.url&&(window.location.href=e.url)}),h.addListener("get-parent-url",(e,n)=>{var t;"get-parent-url"===(null===e||void 0===e?void 0:e.type)&&(console.log("get-parent-url: ",window.location.href),h.resolveChild(null===n||void 0===n||null===(t=n.data)||void 0===t?void 0:t.promiseId,window.location.href,n))});const g=h,v=e=>{const n=window.history,t=n[e];n[e]=function(n){const o=t.apply(this,arguments),i=new Event("muse_boot_"+e.toLowerCase());return i.state=n,window.dispatchEvent(i),o}};v("pushState"),v("replaceState");const w=()=>{g.sendToParent({type:"child-route-change",path:window.location.href.replace(window.location.origin,"")})};window.addEventListener("popstate",w),window.addEventListener("muse_boot_pushstate",w),window.addEventListener("muse_boot_replacestate",w);var E=t(30),y=t.n(E),b=t(487),C=t.n(b),B=t(293),x=t.n(B),M=t(78),L=t.n(M),k=t(122),S=t.n(k),O=t(103),_=t.n(O),P=t(860),j={base:11914653};j.styleTagTransform=_(),j.setAttributes=L(),j.insert=x().bind(null,"head"),j.domAPI=C(),j.insertStyleElement=S();y()(P.A,j);P.A&&P.A.locals&&P.A.locals;!function(){if(!window.MUSE_GLOBAL)throw new Error("There must be a global window.MUSE_GLOBAL object");d.init(),g.init();const e=Date.now(),n=[];let t,o="success";(async function(){var e,n;const t=window.sessionStorage.getItem("MUSE_TEMP_temp-redirect-url");if(t)return window.sessionStorage.removeItem("MUSE_TEMP_temp-redirect-url"),void(window.location=t);const o=window.MUSE_GLOBAL;d.showMessage("Starting...");const i=o.waitForLoaders||[],a=Object.assign({},null===(e=o.app)||void 0===e?void 0:e.config);Object.entries((null===(n=o.env)||void 0===n?void 0:n.config)||{}).forEach(e=>{let[n,t]=e;null!==t&&void 0!==t&&""!==t&&(a[n]=t)}),Object.assign(o,{appVariables:o.appVariables||{},pluginVariables:o.pluginVariables||{},appConfig:a,msgEngine:g,loading:d,error:c,isSubApp:window.parent!==window,getUser:()=>null,appEntries:o.appEntries||[],initEntries:o.initEntries||[],pluginEntries:o.pluginEntries||[],waitFor:e=>{i.push(e)},getPublicPath:(e,n)=>{var t;if(!n)throw new Error("assetPath is required for getPublicPath method.");n=n.replace(/^\/*/,"");const i=m(e);if(o.isDev){var r;const t=null===(r=o.plugins.find(e=>!!e.localPlugins))||void 0===r?void 0:r.localPlugins;if(t&&t.includes(e))return"/muse-assets/local/p/".concat(i,"/").concat(n)}const a=null===(t=window.MUSE_GLOBAL.plugins)||void 0===t?void 0:t.find(n=>n.name===e);if(!a)return;let{version:s}=a||{};s.startsWith("v")||(s="v".concat(s));let l="".concat(window.MUSE_GLOBAL.cdn,"/p/").concat(i,"/").concat(s);return window.MUSE_GLOBAL.isDev||window.MUSE_GLOBAL.isLocal?l+="/dev/".concat(n):l+="/dist/".concat(n),l},__shared__:{modules:{},register:s().register,require:s().require,parseMuseId:s().parseMuseId}});const{cdn:l="",initEntries:u,pluginEntries:f,appEntries:h,isDev:v=!1,isE2eTest:w=!1}=o;let{plugins:E=[]}=window.MUSE_GLOBAL;window.MUSE_CONFIG=o,g.sendToParent({type:"app-state-change",state:"app-starting"}),p();const y=E.find(e=>"boot"===e.type);y&&console.log("Loading Muse app by ".concat(y.name,"@").concat(y.version||y.url,"..."));const b=new URLSearchParams(window.location.search).get("forcePlugins");if(b){const e=b.split(";").filter(Boolean).reduce((e,n)=>{let t="";n.startsWith("@")&&"@"===n[0]&&(n=n.substring(1),t="@");const o=n.split("@",2);if(2===o.length){const[n,i]=o[0].split("!");e["".concat(t).concat(n)]={version:o[1],type:i}}return e},{});E=E.map(n=>{if(!e[n.name])return n;const t=r(r({},n),{},{version:e[n.name].version});return delete e[n.name],t}).filter(e=>"null"!==e.version);for(const n in e)"null"!==e[n].version&&E.push({name:n,type:e[n].type,version:e[n].version})}console.log("Plugins(".concat(E.length,"):")),E.forEach(e=>{let n="";if(e.linkedTo)n="Linked to: "+e.linkedTo;else if(e.isLocalLib){var t;n="Local:"+((null===(t=/\d{4,}/.exec(e.url))||void 0===t?void 0:t[0])||document.location.port)}else e.url&&(n=e.url);n&&(n=" (".concat(n,")")),console.log(" * ".concat(e.name,"@").concat(e.version||"local").concat(n))}),g.sendToParent({type:"app-state-change",state:"app-loading"});const C=E.filter(e=>"init"===e.type).map(e=>r({url:!e.isLocal&&!e.linkedTo&&(e.url||"".concat(l,"/p/").concat(m(e.name),"/v").concat(e.version,"/dist/main.js"))},e)).filter(Boolean);if(C.length>0&&(d.showMessage("Loading init plugins 1/".concat(C.length,"...")),await A(C,e=>d.showMessage("Loading init plugins ".concat(Math.min(e+1,C.length),"/").concat(C.length,"...")))),u.length>0){d.showMessage("Executing init entries..."),u.sort((e,n)=>(e.order||10)-(n.order||10));for(const e of u)if(!1===await e.func())return}const B=v?"dev":w?"test":"dist",x=E.filter(e=>"boot"!==e.type&&"init"!==e.type).map(e=>r({url:!e.isLocal&&!e.linkedTo&&(e.url||"".concat(l,"/p/").concat(m(e.name),"/v").concat(e.version,"/").concat(B,"/main.js"))},e)).filter(Boolean),M=x.filter(e=>"lib"===e.type);d.showMessage("Loading lib plugins 1/".concat(M.length,"...")),await A(M.filter(e=>!e.esModule),e=>d.showMessage("Loading lib plugins ".concat(Math.min(e+1,M.length),"/").concat(M.length,"...")));const L=x.filter(e=>"normal"===e.type||!e.type);d.showMessage("Loading normal plugins 1/".concat(L.length,"...")),await A(L.filter(e=>!e.esModule),e=>d.showMessage("Loading normal plugins ".concat(Math.min(e+1,L.length),"/").concat(L.length,"...")));const k=x.filter(e=>e.esModule);if(await A(k.filter(e=>e.esModule),e=>d.showMessage("Loading es plugins ".concat(Math.min(e+1,k.length),"/").concat(k.length,"..."))),f.length>0&&(d.showMessage("Executing plugin entries..."),f.forEach(e=>e.func())),i.length>0&&(d.showMessage("Executing custom loaders ..."),(await Promise.all(i.map(async e=>e.then?await e:await e()))).some(e=>!1===e)))return;let S=a.entry;if(!S){if(1!==h.length)throw 0===h.length?new Error("No app entry found. You need a plugin deployed to the app to provide an app entry."):new Error("Multiple entries found: ".concat(h.map(e=>e.name).join(", "),". You need to specify one entry in app config."));S=h[0].name}const O=h.find(e=>e.name===S);if(!O)throw new Error("The specified app entry was not found: ".concat(S,"."));console.log("Starting the app from ".concat(S,"...")),d.showMessage("Starting the app..."),await O.func(),d.hide()})().then(()=>{const n=Date.now();g.sendToParent({type:"app-state-change",state:"app-loaded"}),console.log("Muse app started in ".concat((n-e)/1e3," seconds."))}).catch(e=>{console.log("Failed to start the app."),o="failure",t=(null===e||void 0===e?void 0:e.message)||"App failed to start.",n.push(e),e&&console.error(e),d.hide(),null!==e&&void 0!==e&&e.message&&c.showMessage(e.message),g.sendToParent({type:"app-state-change",state:"app-failed"})}).finally(()=>{const i=new CustomEvent("muse_boot_completed",{detail:{result:o,metrics:[{name:"app-start-result",payload:{duration:Date.now()-e,status:o,errorMsg:t,url:document.location.href}},{name:"app-start-exceptions",payload:n}]}});window.dispatchEvent(i)})}()})()})();
2
2
  //# sourceMappingURL=boot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"boot.js","mappings":"iCAEA,IAAIA,EAAc,GAClB,SAASC,EAAqBC,GAE5B,IADA,IAAIC,GAAU,EACLC,EAAI,EAAGA,EAAIJ,EAAYK,OAAQD,IACtC,GAAIJ,EAAYI,GAAGF,aAAeA,EAAY,CAC5CC,EAASC,EACT,KACF,CAEF,OAAOD,CACT,CACA,SAASG,EAAaC,EAAMC,GAG1B,IAFA,IAAIC,EAAa,CAAC,EACdC,EAAc,GACTN,EAAI,EAAGA,EAAIG,EAAKF,OAAQD,IAAK,CACpC,IAAIO,EAAOJ,EAAKH,GACZQ,EAAKJ,EAAQK,KAAOF,EAAK,GAAKH,EAAQK,KAAOF,EAAK,GAClDG,EAAQL,EAAWG,IAAO,EAC1BV,EAAa,GAAGa,OAAOH,EAAI,KAAKG,OAAOD,GAC3CL,EAAWG,GAAME,EAAQ,EACzB,IAAIE,EAAoBf,EAAqBC,GACzCe,EAAM,CACRC,IAAKP,EAAK,GACVQ,MAAOR,EAAK,GACZS,UAAWT,EAAK,GAChBU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M,mBACN2M,QAAS,CACPsI,SAAU/E,KAAKC,MAAQF,EACvBK,SACAD,WACAhF,IAAKrM,SAASuH,SAAS6I,OAG3B,CACEpP,KAAM,uBACN2M,QAASyD,OAKjBjR,OAAO2Q,cAAc+E,IAE3B,CCrXAK,E","sources":["../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/styleTagTransform.js","../node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/getGlobal.js","../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/insertStyleElement.js","../node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/parseMuseId.js","../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/runtime/sourceMaps.js","../node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/index.js","../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/insertBySelector.js","../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/styleDomAPI.js","../node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/museRequire.js","../node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/buildCache.js","../node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/findMuseModule.js","../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/runtime/api.js","style.css","../node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/register.js","../webpack/bootstrap","../webpack/runtime/compat get default export","../webpack/runtime/define property getters","../webpack/runtime/global","../webpack/runtime/hasOwnProperty shorthand","../webpack/runtime/publicPath","../webpack/runtime/nonce","../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/defineProperty.js","../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/objectSpread2.js","loading.js","error.js","registerSw.js","utils.js","msgEngine.js","urlListener.js","webpack://@ebay/muse-boot-default/./src/style.css?9935","boot.js","index.js"],"sourcesContent":["\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","const getGlobal = function () {\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n throw new Error('unable to locate global object');\n};\n\nmodule.exports = getGlobal();\n","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","/**\n * moduleId: muse module id example:\n * - lib1@1.0.3/src/index.js\n * - @ebay/nice-modal@1.2.3/src/index.ts // scoped package\n * - @ebay/nice-modal@1.2.3-alpha.1/src/index.ts // scoped package\n */\nfunction parseMuseId(museId) {\n try {\n const m = /((^@[^/]+\\/)?([^@/]+))@(\\d+)\\.(\\d+)\\.(\\d+)([^./][^/]*)?\\/(.+)$/.exec(museId);\n if (!m) return null;\n return {\n name: m[1],\n path: m[8],\n id: `${m[1]}/${m[8]}`,\n museId,\n version: m.slice(4, 7).map(Number),\n preRelease: m[7]?.replace('-', ''),\n };\n } catch (err) {\n return null;\n }\n}\n\nmodule.exports = parseMuseId;\n","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","module.exports = {\n config: require('./config'),\n require: require('./museRequire'),\n register: require('./register'),\n parseMuseId: require('./parseMuseId'),\n findMuseModule: require('./findMuseModule'),\n};\n","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","const findMuseModule = require('./findMuseModule');\n\nvar __muse_module_cache__ = {};\nmodule.exports = (museId) => {\n // Check if module is in cache\n var cachedModule = __muse_module_cache__[museId];\n if (!cachedModule) {\n museModule = cachedModule;\n __muse_module_cache__[museId] = findMuseModule(museId);\n }\n\n // Use module's require method to get the final module\n const m = __muse_module_cache__[museId];\n if (!m) throw new Error('Muse shared module not found: ' + museId);\n\n return m.__require__(m.id);\n};\n","const parseMuseId = require('./parseMuseId');\n\n/* \n Group modules by module's id (pkgName/path) to support multiple versions.\n For example:\n cache: {\n 'loadash/lib/get.js': [\n { moduleId: 'lodash@1.0.1/lib/get.js, name, version, ...},\n { moduleId: 'lodash@4.0.0/lib/get.js, name, version, ...},\n ]\n }\n*/\nfunction buildCache(obj) {\n if (!obj.cache) obj.cache = {};\n if (!obj.modules) obj.modules = {};\n\n Object.keys(obj.modules).forEach((mid) => {\n const m = parseMuseId(mid);\n if (!m) return;\n if (!obj.cache[m.id]) obj.cache[m.id] = [];\n obj.cache[m.id].push(m);\n });\n}\n\nmodule.exports = buildCache;\n","const parseMuseId = require('./parseMuseId');\nconst buildCache = require('./buildCache');\nconst config = require('./config');\n\n// Get the version diff, e.g: [1,2,3] - [1,2,4] = [0,0,1]\nconst verDiff = (v1, v2) => [0, 1, 2].map((i) => Math.abs(v1[i] - v2[i]));\n\n// Whether ver1 is less than ver2, e.g: [1,2,3] < [1,2,4]\n// This can also be used to compare version diff from verDiff()\nconst lt = (v1, v2) => {\n for (let i = 0; i < 3; i++) {\n if (v1[i] < v2[i]) return true;\n if (v1[i] > v2[i]) return false;\n }\n return false;\n};\n\nconst gt = (v1, v2) => !lt(v1, v2);\n\n/**\n * Resolve module to the greater and closest semantic version.\n * If there is only one version, use it.\n * If there are multiple versions, use the closest but greater one.\n *\n * NOTE: it doesn't support prerelease versions. e.g: 1.0.0-beta.1 will be treated as 1.0.0\n *\n * @param {String} museId example: @ebay/nice-modal-react@1.0.0/src/index.js\n * @param {*} museSharedModules { modules, cache }\n * @returns\n */\nfunction findMuseModule(museId, museShared) {\n museId = museId.replace(/\\\\/g, '/').replace(/\\/+/g, '/');\n if (!museShared) museShared = MUSE_GLOBAL.__shared__;\n\n if (museShared.modules[museId]) {\n return museShared.modules[museId];\n }\n\n let cache = museShared.cache;\n\n if (!cache) {\n // group different versions by module id\n buildCache(museShared);\n cache = museShared.cache;\n }\n\n const m = parseMuseId(museId);\n\n if (!m) return null;\n const candidates = cache[m.id];\n if (!candidates) return null;\n let picked = candidates[0];\n let minDiff = verDiff(m.version, picked.version);\n\n for (let i = 1; i < candidates.length; i++) {\n const c = candidates[i];\n\n // if same version, use it\n if (m.version.join('.') === c.version.join('.')) {\n picked = c;\n break;\n }\n\n // apply match version config\n\n // Ensure picked version is grater than target version\n if (gt(picked.version, m.version) && lt(c.version, m.version)) continue;\n\n // The version diff between the current version and the target version\n const currentDiff = verDiff(c.version, m.version);\n\n if ((lt(picked.version, m.version) && gt(c.version, m.version)) || lt(currentDiff, minDiff)) {\n minDiff = currentDiff;\n picked = c;\n }\n }\n\n switch (config.matchVersion) {\n case 'major':\n if (minDiff[0] !== 0) return null;\n break;\n case 'minor':\n if (minDiff[0] !== 0 || minDiff[1] !== 0) return null;\n break;\n case 'patch':\n if (minDiff[0] !== 0 || minDiff[1] !== 0 || minDiff[2] !== 0) return null;\n break;\n case 'all':\n break;\n default:\n break;\n }\n\n return museShared.modules[picked.museId];\n}\n\nmodule.exports = findMuseModule;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `#muse-loading-node {\n position: fixed;\n display: grid;\n place-items: center;\n left: 0;\n top: 0%;\n width: 100%;\n height: 100%;\n z-index: 99999;\n /* background-color: #fff; */\n transition: opacity ease-out 0.3s;\n line-height: 1.5 !important;\n}\n\n#muse-loading-node .muse-loading-node-inner {\n position: relative;\n display: grid;\n place-items: center;\n}\n\n/* #muse-loading-node .muse-loading-node-inner > svg {\n width: 120px;\n height: 120px;\n} */\n\n#muse-loading-node .muse-loading-node-inner > img {\n position: absolute;\n width: 60px;\n}\n\n#muse-loading-node div > label {\n display: block;\n text-align: center;\n font-family: Helvetica, Arial, sans-serif;\n color: #888;\n font-size: 13px;\n}\n\n@keyframes ldio-klconu2768 {\n 0% {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(180deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.ldio-klconu2768 div {\n position: absolute;\n animation: ldio-klconu2768 1s linear infinite;\n width: 140px;\n height: 140px;\n top: 30px;\n left: 30px;\n border-radius: 50%;\n box-shadow: 0 4px 0 0 #00b4d8;\n transform-origin: 70px 72px;\n}\n.loadingio-spinner-eclipse-p5fn84x4bh8 {\n width: 200px;\n height: 200px;\n display: inline-block;\n overflow: hidden;\n}\n.ldio-klconu2768 {\n width: 100%;\n height: 100%;\n position: relative;\n transform: translateZ(0) scale(1);\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n transform-origin: 0 0; /* see note above */\n}\n.ldio-klconu2768 div {\n box-sizing: content-box;\n}\n/* generated by https://loading.io/ */\n\n#muse-error-node {\n position: fixed;\n left: 0;\n top: 0;\n height: 100%;\n width: 100%;\n font-family: Helvetica, Arial, sans-serif;\n color: red;\n line-height: 150%;\n font-size: 14px;\n display: grid;\n place-items: center;\n}\n\n#muse-error-node .muse-error-node-inner {\n min-width: 500px;\n max-width: 800px;\n border: 1px solid red;\n border-radius: 3px;\n padding: 15px;\n}\n#muse-error-node h4 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 16px;\n}\n#muse-error-node li {\n padding: 3px 0;\n}\n#muse-error-node p {\n color: #777;\n font-style: italic;\n font-size: 13px;\n}\n\n#muse-error-node p a {\n color: #039be5;\n text-decoration: none;\n}\n\n#muse-error-node p a:hover {\n text-decoration: underline;\n}\n\n.muse-theme-dark {\n background-color: #141414;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/style.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,eAAe;EACf,aAAa;EACb,mBAAmB;EACnB,OAAO;EACP,OAAO;EACP,WAAW;EACX,YAAY;EACZ,cAAc;EACd,4BAA4B;EAC5B,iCAAiC;EACjC,2BAA2B;AAC7B;;AAEA;EACE,kBAAkB;EAClB,aAAa;EACb,mBAAmB;AACrB;;AAEA;;;GAGG;;AAEH;EACE,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,cAAc;EACd,kBAAkB;EAClB,yCAAyC;EACzC,WAAW;EACX,eAAe;AACjB;;AAEA;EACE;IACE,uBAAuB;EACzB;EACA;IACE,yBAAyB;EAC3B;EACA;IACE,yBAAyB;EAC3B;AACF;AACA;EACE,kBAAkB;EAClB,6CAA6C;EAC7C,YAAY;EACZ,aAAa;EACb,SAAS;EACT,UAAU;EACV,kBAAkB;EAClB,6BAA6B;EAC7B,2BAA2B;AAC7B;AACA;EACE,YAAY;EACZ,aAAa;EACb,qBAAqB;EACrB,gBAAgB;AAClB;AACA;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,iCAAiC;EACjC,mCAA2B;UAA3B,2BAA2B;EAC3B,qBAAqB,EAAE,mBAAmB;AAC5C;AACA;EACE,uBAAuB;AACzB;AACA,qCAAqC;;AAErC;EACE,eAAe;EACf,OAAO;EACP,MAAM;EACN,YAAY;EACZ,WAAW;EACX,yCAAyC;EACzC,UAAU;EACV,iBAAiB;EACjB,eAAe;EACf,aAAa;EACb,mBAAmB;AACrB;;AAEA;EACE,gBAAgB;EAChB,gBAAgB;EAChB,qBAAqB;EACrB,kBAAkB;EAClB,aAAa;AACf;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,eAAe;AACjB;AACA;EACE,cAAc;AAChB;AACA;EACE,WAAW;EACX,kBAAkB;EAClB,eAAe;AACjB;;AAEA;EACE,cAAc;EACd,qBAAqB;AACvB;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,yBAAyB;AAC3B\",\"sourcesContent\":[\"#muse-loading-node {\\n position: fixed;\\n display: grid;\\n place-items: center;\\n left: 0;\\n top: 0%;\\n width: 100%;\\n height: 100%;\\n z-index: 99999;\\n /* background-color: #fff; */\\n transition: opacity ease-out 0.3s;\\n line-height: 1.5 !important;\\n}\\n\\n#muse-loading-node .muse-loading-node-inner {\\n position: relative;\\n display: grid;\\n place-items: center;\\n}\\n\\n/* #muse-loading-node .muse-loading-node-inner > svg {\\n width: 120px;\\n height: 120px;\\n} */\\n\\n#muse-loading-node .muse-loading-node-inner > img {\\n position: absolute;\\n width: 60px;\\n}\\n\\n#muse-loading-node div > label {\\n display: block;\\n text-align: center;\\n font-family: Helvetica, Arial, sans-serif;\\n color: #888;\\n font-size: 13px;\\n}\\n\\n@keyframes ldio-klconu2768 {\\n 0% {\\n transform: rotate(0deg);\\n }\\n 50% {\\n transform: rotate(180deg);\\n }\\n 100% {\\n transform: rotate(360deg);\\n }\\n}\\n.ldio-klconu2768 div {\\n position: absolute;\\n animation: ldio-klconu2768 1s linear infinite;\\n width: 140px;\\n height: 140px;\\n top: 30px;\\n left: 30px;\\n border-radius: 50%;\\n box-shadow: 0 4px 0 0 #00b4d8;\\n transform-origin: 70px 72px;\\n}\\n.loadingio-spinner-eclipse-p5fn84x4bh8 {\\n width: 200px;\\n height: 200px;\\n display: inline-block;\\n overflow: hidden;\\n}\\n.ldio-klconu2768 {\\n width: 100%;\\n height: 100%;\\n position: relative;\\n transform: translateZ(0) scale(1);\\n backface-visibility: hidden;\\n transform-origin: 0 0; /* see note above */\\n}\\n.ldio-klconu2768 div {\\n box-sizing: content-box;\\n}\\n/* generated by https://loading.io/ */\\n\\n#muse-error-node {\\n position: fixed;\\n left: 0;\\n top: 0;\\n height: 100%;\\n width: 100%;\\n font-family: Helvetica, Arial, sans-serif;\\n color: red;\\n line-height: 150%;\\n font-size: 14px;\\n display: grid;\\n place-items: center;\\n}\\n\\n#muse-error-node .muse-error-node-inner {\\n min-width: 500px;\\n max-width: 800px;\\n border: 1px solid red;\\n border-radius: 3px;\\n padding: 15px;\\n}\\n#muse-error-node h4 {\\n margin-top: 0;\\n margin-bottom: 10px;\\n font-size: 16px;\\n}\\n#muse-error-node li {\\n padding: 3px 0;\\n}\\n#muse-error-node p {\\n color: #777;\\n font-style: italic;\\n font-size: 13px;\\n}\\n\\n#muse-error-node p a {\\n color: #039be5;\\n text-decoration: none;\\n}\\n\\n#muse-error-node p a:hover {\\n text-decoration: underline;\\n}\\n\\n.muse-theme-dark {\\n background-color: #141414;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {};\nexport default ___CSS_LOADER_EXPORT___;\n","const theGlobal = require('./getGlobal');\nconst parseMuseId = require('./parseMuseId');\n/**\n * Register modules to muse module system.\n *\n * @param {Object} modules Key value object for Muse modules.\n * @param {Function} __require__ used to require the actual module, for example: __webpack_require__\n */\nfunction register(modules, __require__) {\n for (const mid in modules) {\n // If it's not muse module, continue\n if (!parseMuseId(mid)) continue;\n const m = modules[mid];\n theGlobal.MUSE_GLOBAL.__shared__.modules[mid] = {\n id: mid,\n __require__,\n };\n }\n}\nmodule.exports = register;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.nc = undefined;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import defineProperty from \"./defineProperty.js\";\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nexport { _objectSpread2 as default };","import logo from './logo.png';\n\nconst loading = {\n init() {\n const { app, cdn } = window.MUSE_GLOBAL;\n const loadingDiv = document.createElement('div');\n const logoUrl = app.iconId\n ? `${cdn}/p/app-icon.${app.name}/v0.0.${app.iconId}/dist/icon.png`\n : logo;\n loadingDiv.innerHTML = `\n <div>\n <div class='muse-loading-node-inner'>\n <div class=\"loadingio-spinner-eclipse-p5fn84x4bh8\"><div class=\"ldio-klconu2768\"><div>\n </div></div></div>\n <img src=\"${logoUrl}\" aria-label=\"logo\" />\n </div>\n <label>Starting...</label>\n </div>\n `;\n loadingDiv.id = 'muse-loading-node';\n if (\n (app.config?.theme === 'dark' && !localStorage.getItem('muse.theme')) ||\n (localStorage.getItem('muse.theme') && localStorage.getItem('muse.theme') === 'dark')\n ) {\n document.body.classList.add('muse-theme-dark');\n }\n document.body.appendChild(loadingDiv);\n this.mountNode = loadingDiv;\n this.labelNode = loadingDiv.querySelector('label');\n },\n\n hide() {\n if (!this.mountNode) return;\n setTimeout(() => {\n this.mountNode.style.opacity = 0;\n }, 10);\n\n setTimeout(() => {\n document.body.removeChild(this.mountNode);\n delete this.mountNode;\n }, 800);\n\n delete this.labelNode;\n },\n\n showMessage(msg) {\n if (this.labelNode) this.labelNode.innerHTML = msg || '';\n },\n};\n\nexport default loading;\n","const error = {\n errors: [],\n init() {\n const errorDiv = document.createElement('div');\n errorDiv.innerHTML = ``;\n errorDiv.id = 'muse-error-node';\n document.body.appendChild(errorDiv);\n this.mountNode = errorDiv;\n },\n showMessage(msg) {\n const arr = msg?.splice ? msg : [msg];\n this.errors.push(...arr);\n this.update();\n },\n update() {\n if (!this.mountNode) this.init();\n\n const content =\n this.errors.length === 1\n ? `<div>${this.errors[0]}</div>`\n : `<ul>\n ${this.errors.map((err) => '<li>' + err + '</li>').join('')}\n </ul>`;\n this.mountNode.innerHTML = `\n <div class=\"muse-error-node-inner\">\n <h4>Failed to load:</h4>\n ${content}\n <p>* Unexpected error happened, please refresh to retry or <a href=\"${\n window.MUSE_GLOBAL.appConfig?.supportLink || '#'\n }\">contact support</a>.</p>\n </div>\n `;\n },\n};\n\nexport default error;\n","// Try to register service worker.\nimport loading from './loading';\n\nfunction registerSw() {\n const { serviceWorker } = window.MUSE_GLOBAL;\n if (!navigator.serviceWorker) return;\n if (serviceWorker && window.location.protocol === 'https:') {\n loading.showMessage('Registering Muse service worker.');\n return new Promise((resolve) => {\n let resolved = false;\n setTimeout(() => {\n if (!resolved) {\n console.log('Failed to register service worker in 10 seconds. Skip it.');\n resolve();\n }\n }, 10000);\n navigator.serviceWorker\n .register(serviceWorker, {})\n .then(function () {\n resolved = true;\n console.log('Service Worker register done.');\n resolve();\n })\n .catch(() => {\n resolved = true;\n console.log('Failed to register service worker, skip it.');\n resolve(); // Tolerate failures\n });\n });\n }\n}\n\nexport default registerSw;\n","import error from './error';\nconst noop = () => {};\n\nexport function load(plugin, callback) {\n callback = callback || noop;\n if (plugin.then && plugin.catch) {\n plugin.then(callback);\n return;\n }\n\n if (plugin.url) {\n return new Promise((resolve, reject) => {\n const head = document.querySelector('head');\n const script = document.createElement('script');\n script.src = plugin.url;\n if (plugin.esModule) script.type = 'module';\n head.appendChild(script);\n script.onload = () => {\n callback();\n resolve();\n };\n // from unit tests, we resolve this Promise immediately. This is needed, as jest will never run the script.onload() function,\n // as it's not a real browser, making the Promise never resolve.\n if (process.env.NODE_ENV === 'test') {\n resolve();\n }\n script.onerror = () => {\n error.showMessage(`Failed to load resource: ${plugin.url} .`);\n reject();\n };\n });\n }\n}\n\nexport async function loadInParallel(items, callback = noop) {\n let count = 0;\n await Promise.all(\n items.map(async (item) => {\n await load(item);\n callback(++count);\n }),\n );\n}\n\nexport function joinPath(p1, p2) {\n if (!p1.endsWith('/')) p1 += '/';\n if (p2.startsWith('/')) p2 = p2.replace(/^\\/+/, '');\n return p1 + p2;\n}\n\nexport function getPluginId(name) {\n if (name.startsWith('@')) return name.replace('/', '.');\n return name;\n}\n","// Message engine is used to communicate between main app and sub app via postMessage\nconst makeId = () => Math.random().toString(36).substring(2);\n\nconst msgEngine = {\n listeners: {},\n promises: {},\n iframes: {},\n register(key, iframe) {\n this.iframes[key] = iframe;\n },\n unregister(key) {\n delete this.iframes[key];\n },\n getIframe(iframe) {\n if (typeof iframe === 'string') return this.iframes[iframe];\n return iframe;\n },\n init() {\n // Assert a client is a Muse app\n this.addListener('handle-muse-app-check', (payload, msg) => {\n if (payload?.type === 'assert-muse-app' && msg.data?.from?.clientKey === 'parent') {\n // Tell parent I'm a Muse app.\n this.sendToParent({\n promiseId: msg?.data?.promiseId,\n data: {\n app: window.MUSE_GLOBAL.app.name,\n env: window.MUSE_GLOBAL.env.name,\n },\n });\n\n window.MUSE_GLOBAL.parentApp = msg?.data?.from;\n }\n });\n\n window.addEventListener(\n 'message',\n (msg) => {\n if (msg?.data?.type !== 'muse') return;\n console.log('on muse post msg: ', msg);\n if (msg?.data?.payload?.promiseId) {\n this.resolvePromise(msg.data.payload.promiseId, msg?.data.payload?.data);\n }\n Object.entries(this.listeners).forEach(([id, func]) => {\n try {\n func(msg.data.payload, msg);\n } catch (err) {\n console.log(`Warning: failed to process message \"${id}\"`, msg, err);\n }\n });\n },\n false,\n );\n },\n resolve(promiseId, payload) {\n // Todo: send\n },\n // a component could listen messages from other apps\n addListener(id, callback) {\n this.listeners[id] = callback;\n },\n removeListener(id) {\n delete this.listeners[id];\n },\n sendToChild(msg, iframe, isPromise = false) {\n let promise = null;\n let promiseHandler = null;\n let id = null;\n if (isPromise) {\n id = makeId();\n promise = new Promise((resolve, reject) => {\n promiseHandler = this.promises[id] = { resolve, reject };\n });\n }\n try {\n this.getIframe(iframe)?.contentWindow?.postMessage(\n {\n type: 'muse',\n promiseId: id,\n from: {\n app: window.MUSE_GLOBAL.appName,\n env: window.MUSE_GLOBAL.envName,\n clientKey: 'parent',\n },\n payload: msg,\n },\n '*',\n );\n } catch (err) {\n console.log(`Failed to post message to child: `, msg);\n if (promise) promiseHandler.reject(err);\n }\n return promise;\n },\n\n sendToParent(msg, isPromise = false) {\n let promise = null;\n let promiseHandler = null;\n let id = null;\n if (isPromise) {\n id = makeId();\n promise = new Promise((resolve, reject) => {\n promiseHandler = this.promises[id] = { resolve, reject };\n });\n }\n if (window.parent && window.parent !== window) {\n try {\n window.parent.postMessage(\n {\n type: 'muse',\n promiseId: id,\n from: {\n app: window.MUSE_GLOBAL.appName,\n env: window.MUSE_GLOBAL.envName,\n type: 'child',\n },\n payload: msg,\n },\n '*',\n );\n } catch (err) {\n console.log('Failed to send message to parent: ', msg);\n if (promise) promiseHandler.reject(err);\n }\n }\n return promise;\n },\n\n // assert the app in iframe is a muse app\n assertMuseApp(iframe) {\n return new Promise((resolve, reject) => {\n this.sendToChild({ type: 'assert-muse-app' }, this.getIframe(iframe), true).then(resolve);\n setTimeout(() => reject(new Error('Muse app check timeout.')), 300); // if no response in 300ms (normally 30ms), it means it's not a Muse app.\n });\n },\n\n getParentUrl() {\n return new Promise((resolve, reject) => {\n this.sendToParent({ type: 'get-parent-url' }, true).then(resolve);\n setTimeout(() => reject(new Error('Get parent url timeout.')), 300); // if no response in 300ms (normally 30ms), it means it's not a Muse app.\n });\n },\n\n parentNavigate(url) {\n this.sendToParent({ type: 'parent-navigate', url });\n },\n\n resolvePromise(promiseId, payload) {\n this.promises[promiseId]?.resolve(payload);\n delete this.promises[promiseId];\n },\n resolveParent(promiseId, payload) {\n msgEngine.sendToParent({ promiseId: promiseId, data: payload });\n },\n\n resolveChild(promiseId, payload, msg) {\n msgEngine.sendToChild({ promiseId: promiseId, data: payload }, msg?.source);\n },\n};\n\n// Assert a client is a Muse app\nmsgEngine.addListener('handle-muse-app-check', (payload, msg) => {\n if (payload?.type === 'assert-muse-app' && msg.data?.from?.clientKey === 'parent') {\n // Tell parent I'm a Muse app.\n msgEngine.resolveParent(msg?.data?.promiseId, {\n app: window.MUSE_GLOBAL.appName,\n env: window.MUSE_GLOBAL.envName,\n });\n }\n});\n\n// Allow to navigate from sub app\nmsgEngine.addListener('parent-navigate', (payload) => {\n if (payload?.type === 'parent-navigate' && payload?.url) {\n window.location.href = payload.url;\n }\n});\n\n// Allow to get url from parent\nmsgEngine.addListener('get-parent-url', (payload, msg) => {\n if (payload?.type === 'get-parent-url') {\n console.log('get-parent-url: ', window.location.href);\n msgEngine.resolveChild(msg?.data?.promiseId, window.location.href, msg);\n }\n});\n\nexport default msgEngine;\n","// Notify the parent of the url change\n// subapp => parent\n// In muse-react/src/common/history handle url change msg\n\nimport msgEngine from './msgEngine';\n\nconst patchHistoryMethod = (method) => {\n const history = window.history;\n const original = history[method];\n\n history[method] = function (state) {\n const result = original.apply(this, arguments);\n const event = new Event('muse_boot_' + method.toLowerCase());\n event.state = state;\n window.dispatchEvent(event);\n return result;\n };\n};\n\npatchHistoryMethod('pushState');\npatchHistoryMethod('replaceState');\n\nconst handleUrlChange = () => {\n msgEngine.sendToParent({\n type: 'child-route-change',\n path: window.location.href.replace(window.location.origin, ''),\n });\n};\nwindow.addEventListener('popstate', handleUrlChange);\nwindow.addEventListener('muse_boot_pushstate', handleUrlChange);\nwindow.addEventListener('muse_boot_replacestate', handleUrlChange);\n","\n import API from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!../node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.102.1/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!../node_modules/.pnpm/source-map-loader@3.0.2_webpack@5.102.1/node_modules/source-map-loader/dist/cjs.js!./style.css\";\n \n \n\nvar options = {\"base\":11914653};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!../node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.102.1/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!../node_modules/.pnpm/source-map-loader@3.0.2_webpack@5.102.1/node_modules/source-map-loader/dist/cjs.js!./style.css\";\n export default content && content.locals ? content.locals : undefined;\n","import museModules from '@ebay/muse-modules';\nimport loading from './loading';\nimport error from './error';\nimport registerSw from './registerSw';\nimport { loadInParallel, getPluginId } from './utils';\nimport msgEngine from './msgEngine';\nimport './urlListener';\nimport './style.css';\n\nasync function start() {\n // If MUSE_TEMP_temp-redirect-url has a value, then redirect to that url.\n // This is a one time redirect, so remove the value after redirecting.\n // It's used for sub app login flow.\n const tempRedirectUrl = window.sessionStorage.getItem('MUSE_TEMP_temp-redirect-url');\n if (tempRedirectUrl) {\n window.sessionStorage.removeItem('MUSE_TEMP_temp-redirect-url');\n window.location = tempRedirectUrl;\n return;\n }\n\n const mg = window.MUSE_GLOBAL;\n loading.showMessage('Starting...');\n const waitForLoaders = mg.waitForLoaders || [];\n\n // Get the config from both app and env\n // That is, app.config is the default, env.config can override any value on app.config\n const appConfig = Object.assign({}, mg.app?.config);\n Object.entries(mg.env?.config || {}).forEach(([key, value]) => {\n if (value !== null && value !== undefined && value !== '') {\n appConfig[key] = value;\n }\n });\n\n Object.assign(mg, {\n appVariables: mg.appVariables || {},\n pluginVariables: mg.pluginVariables || {},\n appConfig,\n msgEngine,\n loading,\n error,\n isSubApp: window.parent !== window,\n getUser: () => null,\n appEntries: mg.appEntries || [], // entries to start the app\n initEntries: mg.initEntries || [], // entries from init plugins\n pluginEntries: mg.pluginEntries || [], // entries from lib or normal plugins\n // Allow to register some func to wait for before starting the app\n waitFor: (asyncFuncOrPromise) => {\n waitForLoaders.push(asyncFuncOrPromise);\n },\n // TODO: get plugin assets public paths (assets in public folder)\n getPublicPath: (pluginName, assetPath) => {\n if (!assetPath) throw new Error('assetPath is required for getPublicPath method.');\n assetPath = assetPath.replace(/^\\/*/, '');\n const pluginId = getPluginId(pluginName);\n\n if (mg.isDev) {\n // for dev, check if there's local plugins\n const names = mg.plugins.find((p) => !!p.localPlugins)?.localPlugins;\n if (names && names.includes(pluginName)) {\n return `/muse-assets/local/p/${pluginId}/${assetPath}`;\n }\n }\n const currentPlugin = window.MUSE_GLOBAL.plugins?.find((p) => p.name === pluginName);\n if (!currentPlugin) return;\n let { version } = currentPlugin || {};\n if (!version.startsWith('v')) {\n version = `v${version}`;\n }\n let publicPath = `${window.MUSE_GLOBAL.cdn}/p/${pluginId}/${version}`;\n if (window.MUSE_GLOBAL.isDev || window.MUSE_GLOBAL.isLocal) {\n publicPath = publicPath + `/dev/${assetPath}`;\n } else {\n publicPath = publicPath + `/dist/${assetPath}`;\n }\n return publicPath;\n },\n // Muse shared modules global methods\n __shared__: {\n modules: {},\n register: museModules.register,\n require: museModules.require,\n parseMuseId: museModules.parseMuseId,\n },\n });\n\n const { cdn = '', initEntries, pluginEntries, appEntries, isDev = false, isE2eTest = false } = mg;\n let { plugins = [] } = window.MUSE_GLOBAL;\n\n // MUSE_CONFIG is for backward compatibility\n window.MUSE_CONFIG = mg;\n\n msgEngine.sendToParent({\n type: 'app-state-change',\n state: 'app-starting',\n // url: document.location.href,\n });\n\n registerSw();\n\n // Print app plugins in dev console\n const bootPlugin = plugins.find((p) => p.type === 'boot');\n if (bootPlugin) {\n console.log(\n `Loading Muse app by ${bootPlugin.name}@${bootPlugin.version || bootPlugin.url}...`,\n );\n }\n\n /* Handle forcePlugins query parameter */\n const searchParams = new URLSearchParams(window.location.search);\n const forcePluginStr = searchParams.get('forcePlugins');\n if (forcePluginStr) {\n const forcePluginById = forcePluginStr\n .split(';')\n .filter(Boolean)\n .reduce((p, c) => {\n const separator = '@';\n const limit = 2;\n let prefix = '';\n if (c.startsWith('@') && c[0] === separator) {\n // Starts with @, means it's a scoped plugin\n c = c.substring(1);\n prefix = '@';\n }\n const arr = c.split(separator, limit);\n if (arr.length === limit) {\n const [name, type] = arr[0].split('!');\n p[`${prefix}${name}`] = {\n version: arr[1],\n type: type,\n };\n }\n return p;\n }, {});\n // Update or remove plugins from the list based on forcePlugins\n plugins = plugins\n .map((p) => {\n if (!forcePluginById[p.name]) return p;\n const newPlugin = { ...p, version: forcePluginById[p.name].version };\n delete forcePluginById[p.name];\n return newPlugin;\n })\n .filter((p) => p.version !== 'null');\n\n // Need to get the type of plugin from muse registry directly.\n for (const p in forcePluginById) {\n if (forcePluginById[p].version !== 'null') {\n plugins.push({\n name: p,\n type: forcePluginById[p].type,\n version: forcePluginById[p].version,\n });\n }\n }\n }\n\n console.log(`Plugins(${plugins.length}):`);\n // If a plugin has isLocal, it means its bundle is loaded somewhere else.\n // The registered plugin item is used to provide configurations. e.g plugin variables.\n plugins.forEach((p) => {\n let source = '';\n if (p.linkedTo) source = 'Linked to: ' + p.linkedTo;\n else if (p.isLocalLib) {\n source = 'Local:' + (/\\d{4,}/.exec(p.url)?.[0] || document.location.port); // find port number\n } else if (p.url) source = p.url;\n if (source) source = ` (${source})`;\n\n console.log(` * ${p.name}@${p.version || 'local'}${source}`);\n });\n msgEngine.sendToParent({\n type: 'app-state-change',\n state: 'app-loading',\n });\n // Load init plugins\n // Init plugins should be small and not depend on each other\n const initPluginsToLoad = plugins\n .filter((p) => p.type === 'init')\n .map((p) => {\n return {\n url:\n p.isLocal || p.linkedTo\n ? false\n : p.url || `${cdn}/p/${getPluginId(p.name)}/v${p.version}/dist/main.js`,\n ...p,\n };\n })\n .filter(Boolean);\n\n // Load init plugins\n if (initPluginsToLoad.length > 0) {\n loading.showMessage(`Loading init plugins 1/${initPluginsToLoad.length}...`);\n await loadInParallel(initPluginsToLoad, (loadedCount) =>\n loading.showMessage(\n `Loading init plugins ${Math.min(loadedCount + 1, initPluginsToLoad.length)}/${\n initPluginsToLoad.length\n }...`,\n ),\n );\n }\n\n // Exec init entries\n if (initEntries.length > 0) {\n loading.showMessage(`Executing init entries...`);\n for (const initEntry of initEntries) {\n // Allow an init entry to break the start of the app\n if ((await initEntry.func()) === false) return;\n }\n }\n\n // NOTE: init plugins have the opportunity to modify plugins list.\n // It's an expected behavior for some permission control.\n\n // Load normal and lib plugins\n const bundleDir = isDev ? 'dev' : isE2eTest ? 'test' : 'dist';\n const pluginsToLoad = plugins\n .filter((p) => p.type !== 'boot' && p.type !== 'init')\n .map((p) => {\n return {\n url:\n p.isLocal || p.linkedTo\n ? false\n : p.url || `${cdn}/p/${getPluginId(p.name)}/v${p.version}/${bundleDir}/main.js`,\n ...p, // if a plugin already has url, always use it\n };\n })\n .filter(Boolean);\n\n // Load plugin bundles\n const libPluginsToLoad = pluginsToLoad.filter((p) => p.type === 'lib');\n loading.showMessage(`Loading lib plugins 1/${libPluginsToLoad.length}...`);\n await loadInParallel(\n libPluginsToLoad.filter((p) => !p.esModule),\n (loadedCount) =>\n loading.showMessage(\n `Loading lib plugins ${Math.min(loadedCount + 1, libPluginsToLoad.length)}/${\n libPluginsToLoad.length\n }...`,\n ),\n );\n\n const normalPluginsToLoad = pluginsToLoad.filter((p) => p.type === 'normal' || !p.type);\n loading.showMessage(`Loading normal plugins 1/${normalPluginsToLoad.length}...`);\n await loadInParallel(\n normalPluginsToLoad.filter((p) => !p.esModule),\n (loadedCount) =>\n loading.showMessage(\n `Loading normal plugins ${Math.min(loadedCount + 1, normalPluginsToLoad.length)}/${\n normalPluginsToLoad.length\n }...`,\n ),\n );\n\n // TODO: why we need to load esModule plugins separately?\n const esPluginsToLoad = pluginsToLoad.filter((p) => p.esModule);\n await loadInParallel(\n esPluginsToLoad.filter((p) => p.esModule),\n (loadedCount) =>\n loading.showMessage(\n `Loading es plugins ${Math.min(loadedCount + 1, esPluginsToLoad.length)}/${\n esPluginsToLoad.length\n }...`,\n ),\n );\n\n // Exec plugin entries which are generated by building process\n // This ensures a fixed order for plugins to initialize\n if (pluginEntries.length > 0) {\n loading.showMessage(`Executing plugin entries...`);\n pluginEntries.forEach((entry) => entry.func());\n }\n\n // Wait for loader\n if (waitForLoaders.length > 0) {\n loading.showMessage(`Executing custom loaders ...`);\n const arr = await Promise.all(\n waitForLoaders.map(async (loader) => {\n // Usually a plugin waitFor a promise so that it doesn't need to wait for all plugins loaded before executing\n if (loader.then) return await loader;\n // If pass an async function, it executes while all plugins are loaded.\n else return await loader();\n }),\n );\n // If a loader returns false, then don't continue starting\n // NOTE: if a loader needs to show an error message, just throw an error.\n if (arr.some((s) => s === false)) return;\n }\n\n // Start the application\n let entryName = appConfig.entry;\n if (!entryName) {\n // If there isn't entry defined and there's only one app entry from the plugins list.\n // Then just use the only one.\n if (appEntries.length === 1) {\n entryName = appEntries[0].name;\n } else if (appEntries.length === 0) {\n throw new Error(\n 'No app entry found. You need a plugin deployed to the app to provide an app entry.',\n );\n } else {\n throw new Error(\n `Multiple entries found: ${appEntries\n .map((e) => e.name)\n .join(', ')}. You need to specify one entry in app config.`,\n );\n }\n }\n const entryApp = appEntries.find((e) => e.name === entryName);\n if (entryApp) {\n console.log(`Starting the app from ${entryName}...`);\n loading.showMessage(`Starting the app...`);\n await entryApp.func();\n } else {\n throw new Error(`The specified app entry was not found: ${entryName}.`);\n }\n loading.hide();\n}\n\nexport function bootstrap() {\n if (!window.MUSE_GLOBAL) {\n throw new Error('There must be a global window.MUSE_GLOBAL object');\n }\n\n loading.init();\n msgEngine.init();\n\n const timeStart = Date.now();\n const appStartExceptions = [];\n let status = 'success';\n let errorMsg;\n start()\n .then(() => {\n const timeEnd = Date.now();\n msgEngine.sendToParent({\n type: 'app-state-change',\n state: 'app-loaded',\n });\n console.log(`Muse app started in ${(timeEnd - timeStart) / 1000} seconds.`);\n })\n .catch((err) => {\n console.log('Failed to start the app.');\n status = 'failure';\n errorMsg = err?.message || 'App failed to start.';\n appStartExceptions.push(err);\n\n err && console.error(err);\n loading.hide();\n if (err?.message) {\n error.showMessage(err.message);\n }\n msgEngine.sendToParent({\n type: 'app-state-change',\n state: 'app-failed',\n });\n })\n .finally(() => {\n const bootCompleteEvent = new CustomEvent('muse_boot_completed', {\n detail: {\n result: status,\n metrics: [\n {\n name: 'app-start-result',\n payload: {\n duration: Date.now() - timeStart,\n status,\n errorMsg,\n url: document.location.href,\n },\n },\n {\n name: 'app-start-exceptions',\n payload: appStartExceptions,\n },\n ],\n },\n });\n window.dispatchEvent(bootCompleteEvent);\n });\n}\n","// boot plugin is used to load other plugins based on the app config\nimport { bootstrap } from './boot';\n\nbootstrap();\n"],"names":["stylesInDOM","getIndexByIdentifier","identifier","result","i","length","modulesToDom","list","options","idCountMap","identifiers","item","id","base","count","concat","indexByIdentifier","obj","css","media","sourceMap","supports","layer","references","updater","addElementStyle","byIndex","splice","push","api","domAPI","update","newObj","remove","module","exports","lastIdentifiers","newList","index","newLastIdentifiers","_i","_index","styleElement","nonce","setAttribute","styleSheet","cssText","firstChild","removeChild","appendChild","document","createTextNode","self","window","global","Error","getGlobal","element","createElement","setAttributes","attributes","insert","museId","_m$","m","exec","name","path","version","slice","map","Number","preRelease","replace","err","content","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","join","config","require","register","parseMuseId","findMuseModule","memo","style","target","styleTarget","querySelector","HTMLIFrameElement","contentDocument","head","e","getTarget","insertStyleElement","needLayer","styleTagTransform","apply","parentNode","removeStyleElement","__muse_module_cache__","cachedModule","museModule","__require__","cache","modules","Object","keys","forEach","mid","buildCache","verDiff","v1","v2","Math","abs","lt","gt","museShared","MUSE_GLOBAL","__shared__","candidates","picked","minDiff","c","currentDiff","matchVersion","cssWithMappingToString","toString","this","dedupe","undefined","alreadyImportedModules","k","_k","___CSS_LOADER_EXPORT___","locals","theGlobal","__webpack_module_cache__","__webpack_require__","moduleId","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","defineProperty","enumerable","get","g","globalThis","Function","prop","prototype","hasOwnProperty","call","scriptUrl","importScripts","location","currentScript","tagName","toUpperCase","src","scripts","getElementsByTagName","test","p","nc","_typeof","Symbol","iterator","constructor","toPropertyKey","t","r","toPrimitive","TypeError","String","_defineProperty","value","configurable","writable","ownKeys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","_objectSpread2","arguments","getOwnPropertyDescriptors","defineProperties","init","_app$config","app","cdn","loadingDiv","logoUrl","iconId","logo","innerHTML","theme","localStorage","getItem","body","classList","add","mountNode","labelNode","hide","setTimeout","opacity","showMessage","msg","errors","errorDiv","arr","_window$MUSE_GLOBAL$a","appConfig","supportLink","serviceWorker","navigator","protocol","loading","Promise","resolve","resolved","console","log","then","catch","noop","async","loadInParallel","items","callback","all","plugin","url","reject","script","esModule","type","onload","onerror","error","load","getPluginId","startsWith","makeId","random","substring","msgEngine","listeners","promises","iframes","iframe","unregister","getIframe","addListener","payload","_msg$data","_msg$data$from","_msg$data2","_msg$data3","from","clientKey","sendToParent","promiseId","env","parentApp","addEventListener","_msg$data4","_msg$data5","_msg$data5$payload","_msg$data$payload","resolvePromise","entries","_ref","func","removeListener","sendToChild","promise","promiseHandler","_this$getIframe","_this$getIframe$conte","contentWindow","postMessage","appName","envName","parent","assertMuseApp","getParentUrl","parentNavigate","_this$promises$promis","resolveParent","resolveChild","source","_msg$data6","_msg$data6$from","_msg$data7","href","_msg$data8","patchHistoryMethod","method","history","original","state","event","Event","toLowerCase","dispatchEvent","handleUrlChange","origin","timeStart","Date","now","appStartExceptions","errorMsg","status","_mg$app","_mg$env","tempRedirectUrl","sessionStorage","removeItem","mg","waitForLoaders","assign","appVariables","pluginVariables","isSubApp","getUser","appEntries","initEntries","pluginEntries","waitFor","asyncFuncOrPromise","getPublicPath","pluginName","assetPath","_window$MUSE_GLOBAL$p","pluginId","isDev","_mg$plugins$find","names","plugins","find","localPlugins","includes","currentPlugin","publicPath","isLocal","museModules","isE2eTest","MUSE_CONFIG","registerSw","bootPlugin","forcePluginStr","URLSearchParams","search","forcePluginById","split","Boolean","reduce","prefix","newPlugin","_objectSpread","linkedTo","isLocalLib","_exec","port","initPluginsToLoad","loadedCount","min","initEntry","bundleDir","pluginsToLoad","libPluginsToLoad","normalPluginsToLoad","esPluginsToLoad","entry","loader","some","s","entryName","entryApp","start","timeEnd","message","finally","bootCompleteEvent","CustomEvent","detail","metrics","duration","bootstrap"],"sourceRoot":""}
1
+ {"version":3,"file":"boot.js","mappings":"iCAEA,IAAIA,EAAc,GAClB,SAASC,EAAqBC,GAE5B,IADA,IAAIC,GAAU,EACLC,EAAI,EAAGA,EAAIJ,EAAYK,OAAQD,IACtC,GAAIJ,EAAYI,GAAGF,aAAeA,EAAY,CAC5CC,EAASC,EACT,KACF,CAEF,OAAOD,CACT,CACA,SAASG,EAAaC,EAAMC,GAG1B,IAFA,IAAIC,EAAa,CAAC,EACdC,EAAc,GACTN,EAAI,EAAGA,EAAIG,EAAKF,OAAQD,IAAK,CACpC,IAAIO,EAAOJ,EAAKH,GACZQ,EAAKJ,EAAQK,KAAOF,EAAK,GAAKH,EAAQK,KAAOF,EAAK,GAClDG,EAAQL,EAAWG,IAAO,EAC1BV,EAAa,GAAGa,OAAOH,EAAI,KAAKG,OAAOD,GAC3CL,EAAWG,GAAME,EAAQ,EACzB,IAAIE,EAAoBf,EAAqBC,GACzCe,EAAM,CACRC,IAAKP,EAAK,GACVQ,MAAOR,EAAK,GACZS,UAAWT,EAAK,GAChBU,SAAUV,EAAK,GACfW,MAAOX,EAAK,IAEd,IAA2B,IAAvBK,EACFhB,EAAYgB,GAAmBO,aAC/BvB,EAAYgB,GAAmBQ,QAAQP,OAClC,CACL,IAAIO,EAAUC,EAAgBR,EAAKT,GACnCA,EAAQkB,QAAUtB,EAClBJ,EAAY2B,OAAOvB,EAAG,EAAG,CACvBF,WAAYA,EACZsB,QAASA,EACTD,WAAY,GAEhB,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_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/styleTagTransform.js","../node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/getGlobal.js","../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/insertStyleElement.js","../node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/parseMuseId.js","../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/runtime/sourceMaps.js","../node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/index.js","../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/insertBySelector.js","../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/styleDomAPI.js","../node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/museRequire.js","../node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/buildCache.js","../node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/findMuseModule.js","../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/runtime/api.js","style.css","../node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/register.js","../webpack/bootstrap","../webpack/runtime/compat get default export","../webpack/runtime/define property getters","../webpack/runtime/global","../webpack/runtime/hasOwnProperty shorthand","../webpack/runtime/publicPath","../webpack/runtime/nonce","../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/defineProperty.js","../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/objectSpread2.js","loading.js","error.js","registerSw.js","utils.js","msgEngine.js","urlListener.js","webpack://@ebay/muse-boot-default/./src/style.css?9935","boot.js","index.js"],"sourcesContent":["\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","const getGlobal = function () {\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n throw new Error('unable to locate global object');\n};\n\nmodule.exports = getGlobal();\n","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","/**\n * moduleId: muse module id example:\n * - lib1@1.0.3/src/index.js\n * - @ebay/nice-modal@1.2.3/src/index.ts // scoped package\n * - @ebay/nice-modal@1.2.3-alpha.1/src/index.ts // scoped package\n */\nfunction parseMuseId(museId) {\n try {\n const m = /((^@[^/]+\\/)?([^@/]+))@(\\d+)\\.(\\d+)\\.(\\d+)([^./][^/]*)?\\/(.+)$/.exec(museId);\n if (!m) return null;\n return {\n name: m[1],\n path: m[8],\n id: `${m[1]}/${m[8]}`,\n museId,\n version: m.slice(4, 7).map(Number),\n preRelease: m[7]?.replace('-', ''),\n };\n } catch (err) {\n return null;\n }\n}\n\nmodule.exports = parseMuseId;\n","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","module.exports = {\n config: require('./config'),\n require: require('./museRequire'),\n register: require('./register'),\n parseMuseId: require('./parseMuseId'),\n findMuseModule: require('./findMuseModule'),\n};\n","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","const findMuseModule = require('./findMuseModule');\n\nvar __muse_module_cache__ = {};\nmodule.exports = (museId) => {\n // Check if module is in cache\n var cachedModule = __muse_module_cache__[museId];\n if (!cachedModule) {\n museModule = cachedModule;\n __muse_module_cache__[museId] = findMuseModule(museId);\n }\n\n // Use module's require method to get the final module\n const m = __muse_module_cache__[museId];\n if (!m) throw new Error('Muse shared module not found: ' + museId);\n\n return m.__require__(m.id);\n};\n","const parseMuseId = require('./parseMuseId');\n\n/* \n Group modules by module's id (pkgName/path) to support multiple versions.\n For example:\n cache: {\n 'loadash/lib/get.js': [\n { moduleId: 'lodash@1.0.1/lib/get.js, name, version, ...},\n { moduleId: 'lodash@4.0.0/lib/get.js, name, version, ...},\n ]\n }\n*/\nfunction buildCache(obj) {\n if (!obj.cache) obj.cache = {};\n if (!obj.modules) obj.modules = {};\n\n Object.keys(obj.modules).forEach((mid) => {\n const m = parseMuseId(mid);\n if (!m) return;\n if (!obj.cache[m.id]) obj.cache[m.id] = [];\n obj.cache[m.id].push(m);\n });\n}\n\nmodule.exports = buildCache;\n","const parseMuseId = require('./parseMuseId');\nconst buildCache = require('./buildCache');\nconst config = require('./config');\n\n// Get the version diff, e.g: [1,2,3] - [1,2,4] = [0,0,1]\nconst verDiff = (v1, v2) => [0, 1, 2].map((i) => Math.abs(v1[i] - v2[i]));\n\n// Whether ver1 is less than ver2, e.g: [1,2,3] < [1,2,4]\n// This can also be used to compare version diff from verDiff()\nconst lt = (v1, v2) => {\n for (let i = 0; i < 3; i++) {\n if (v1[i] < v2[i]) return true;\n if (v1[i] > v2[i]) return false;\n }\n return false;\n};\n\nconst gt = (v1, v2) => !lt(v1, v2);\n\n/**\n * Resolve module to the greater and closest semantic version.\n * If there is only one version, use it.\n * If there are multiple versions, use the closest but greater one.\n *\n * NOTE: it doesn't support prerelease versions. e.g: 1.0.0-beta.1 will be treated as 1.0.0\n *\n * @param {String} museId example: @ebay/nice-modal-react@1.0.0/src/index.js\n * @param {*} museSharedModules { modules, cache }\n * @returns\n */\nfunction findMuseModule(museId, museShared) {\n museId = museId.replace(/\\\\/g, '/').replace(/\\/+/g, '/');\n if (!museShared) museShared = MUSE_GLOBAL.__shared__;\n\n if (museShared.modules[museId]) {\n return museShared.modules[museId];\n }\n\n let cache = museShared.cache;\n\n if (!cache) {\n // group different versions by module id\n buildCache(museShared);\n cache = museShared.cache;\n }\n\n const m = parseMuseId(museId);\n\n if (!m) return null;\n const candidates = cache[m.id];\n if (!candidates) return null;\n let picked = candidates[0];\n let minDiff = verDiff(m.version, picked.version);\n\n for (let i = 1; i < candidates.length; i++) {\n const c = candidates[i];\n\n // if same version, use it\n if (m.version.join('.') === c.version.join('.')) {\n picked = c;\n break;\n }\n\n // apply match version config\n\n // Ensure picked version is grater than target version\n if (gt(picked.version, m.version) && lt(c.version, m.version)) continue;\n\n // The version diff between the current version and the target version\n const currentDiff = verDiff(c.version, m.version);\n\n if ((lt(picked.version, m.version) && gt(c.version, m.version)) || lt(currentDiff, minDiff)) {\n minDiff = currentDiff;\n picked = c;\n }\n }\n\n switch (config.matchVersion) {\n case 'major':\n if (minDiff[0] !== 0) return null;\n break;\n case 'minor':\n if (minDiff[0] !== 0 || minDiff[1] !== 0) return null;\n break;\n case 'patch':\n if (minDiff[0] !== 0 || minDiff[1] !== 0 || minDiff[2] !== 0) return null;\n break;\n case 'all':\n break;\n default:\n break;\n }\n\n return museShared.modules[picked.museId];\n}\n\nmodule.exports = findMuseModule;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `#muse-loading-node {\n position: fixed;\n display: grid;\n place-items: center;\n left: 0;\n top: 0%;\n width: 100%;\n height: 100%;\n z-index: 99999;\n /* background-color: #fff; */\n transition: opacity ease-out 0.3s;\n line-height: 1.5 !important;\n}\n\n#muse-loading-node .muse-loading-node-inner {\n position: relative;\n display: grid;\n place-items: center;\n}\n\n/* #muse-loading-node .muse-loading-node-inner > svg {\n width: 120px;\n height: 120px;\n} */\n\n#muse-loading-node .muse-loading-node-inner > img {\n position: absolute;\n width: 60px;\n}\n\n#muse-loading-node div > label {\n display: block;\n text-align: center;\n font-family: Helvetica, Arial, sans-serif;\n color: #888;\n font-size: 13px;\n}\n\n@keyframes ldio-klconu2768 {\n 0% {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(180deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.ldio-klconu2768 div {\n position: absolute;\n animation: ldio-klconu2768 1s linear infinite;\n width: 140px;\n height: 140px;\n top: 30px;\n left: 30px;\n border-radius: 50%;\n box-shadow: 0 4px 0 0 #00b4d8;\n transform-origin: 70px 72px;\n}\n.loadingio-spinner-eclipse-p5fn84x4bh8 {\n width: 200px;\n height: 200px;\n display: inline-block;\n overflow: hidden;\n}\n.ldio-klconu2768 {\n width: 100%;\n height: 100%;\n position: relative;\n transform: translateZ(0) scale(1);\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n transform-origin: 0 0; /* see note above */\n}\n.ldio-klconu2768 div {\n box-sizing: content-box;\n}\n/* generated by https://loading.io/ */\n\n#muse-error-node {\n position: fixed;\n left: 0;\n top: 0;\n height: 100%;\n width: 100%;\n font-family: Helvetica, Arial, sans-serif;\n color: red;\n line-height: 150%;\n font-size: 14px;\n display: grid;\n place-items: center;\n}\n\n#muse-error-node .muse-error-node-inner {\n min-width: 500px;\n max-width: 800px;\n border: 1px solid red;\n border-radius: 3px;\n padding: 15px;\n}\n#muse-error-node h4 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 16px;\n}\n#muse-error-node li {\n padding: 3px 0;\n}\n#muse-error-node p {\n color: #777;\n font-style: italic;\n font-size: 13px;\n}\n\n#muse-error-node p a {\n color: #039be5;\n text-decoration: none;\n}\n\n#muse-error-node p a:hover {\n text-decoration: underline;\n}\n\n.muse-theme-dark {\n background-color: #141414;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/style.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,eAAe;EACf,aAAa;EACb,mBAAmB;EACnB,OAAO;EACP,OAAO;EACP,WAAW;EACX,YAAY;EACZ,cAAc;EACd,4BAA4B;EAC5B,iCAAiC;EACjC,2BAA2B;AAC7B;;AAEA;EACE,kBAAkB;EAClB,aAAa;EACb,mBAAmB;AACrB;;AAEA;;;GAGG;;AAEH;EACE,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,cAAc;EACd,kBAAkB;EAClB,yCAAyC;EACzC,WAAW;EACX,eAAe;AACjB;;AAEA;EACE;IACE,uBAAuB;EACzB;EACA;IACE,yBAAyB;EAC3B;EACA;IACE,yBAAyB;EAC3B;AACF;AACA;EACE,kBAAkB;EAClB,6CAA6C;EAC7C,YAAY;EACZ,aAAa;EACb,SAAS;EACT,UAAU;EACV,kBAAkB;EAClB,6BAA6B;EAC7B,2BAA2B;AAC7B;AACA;EACE,YAAY;EACZ,aAAa;EACb,qBAAqB;EACrB,gBAAgB;AAClB;AACA;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,iCAAiC;EACjC,mCAA2B;UAA3B,2BAA2B;EAC3B,qBAAqB,EAAE,mBAAmB;AAC5C;AACA;EACE,uBAAuB;AACzB;AACA,qCAAqC;;AAErC;EACE,eAAe;EACf,OAAO;EACP,MAAM;EACN,YAAY;EACZ,WAAW;EACX,yCAAyC;EACzC,UAAU;EACV,iBAAiB;EACjB,eAAe;EACf,aAAa;EACb,mBAAmB;AACrB;;AAEA;EACE,gBAAgB;EAChB,gBAAgB;EAChB,qBAAqB;EACrB,kBAAkB;EAClB,aAAa;AACf;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,eAAe;AACjB;AACA;EACE,cAAc;AAChB;AACA;EACE,WAAW;EACX,kBAAkB;EAClB,eAAe;AACjB;;AAEA;EACE,cAAc;EACd,qBAAqB;AACvB;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,yBAAyB;AAC3B\",\"sourcesContent\":[\"#muse-loading-node {\\n position: fixed;\\n display: grid;\\n place-items: center;\\n left: 0;\\n top: 0%;\\n width: 100%;\\n height: 100%;\\n z-index: 99999;\\n /* background-color: #fff; */\\n transition: opacity ease-out 0.3s;\\n line-height: 1.5 !important;\\n}\\n\\n#muse-loading-node .muse-loading-node-inner {\\n position: relative;\\n display: grid;\\n place-items: center;\\n}\\n\\n/* #muse-loading-node .muse-loading-node-inner > svg {\\n width: 120px;\\n height: 120px;\\n} */\\n\\n#muse-loading-node .muse-loading-node-inner > img {\\n position: absolute;\\n width: 60px;\\n}\\n\\n#muse-loading-node div > label {\\n display: block;\\n text-align: center;\\n font-family: Helvetica, Arial, sans-serif;\\n color: #888;\\n font-size: 13px;\\n}\\n\\n@keyframes ldio-klconu2768 {\\n 0% {\\n transform: rotate(0deg);\\n }\\n 50% {\\n transform: rotate(180deg);\\n }\\n 100% {\\n transform: rotate(360deg);\\n }\\n}\\n.ldio-klconu2768 div {\\n position: absolute;\\n animation: ldio-klconu2768 1s linear infinite;\\n width: 140px;\\n height: 140px;\\n top: 30px;\\n left: 30px;\\n border-radius: 50%;\\n box-shadow: 0 4px 0 0 #00b4d8;\\n transform-origin: 70px 72px;\\n}\\n.loadingio-spinner-eclipse-p5fn84x4bh8 {\\n width: 200px;\\n height: 200px;\\n display: inline-block;\\n overflow: hidden;\\n}\\n.ldio-klconu2768 {\\n width: 100%;\\n height: 100%;\\n position: relative;\\n transform: translateZ(0) scale(1);\\n backface-visibility: hidden;\\n transform-origin: 0 0; /* see note above */\\n}\\n.ldio-klconu2768 div {\\n box-sizing: content-box;\\n}\\n/* generated by https://loading.io/ */\\n\\n#muse-error-node {\\n position: fixed;\\n left: 0;\\n top: 0;\\n height: 100%;\\n width: 100%;\\n font-family: Helvetica, Arial, sans-serif;\\n color: red;\\n line-height: 150%;\\n font-size: 14px;\\n display: grid;\\n place-items: center;\\n}\\n\\n#muse-error-node .muse-error-node-inner {\\n min-width: 500px;\\n max-width: 800px;\\n border: 1px solid red;\\n border-radius: 3px;\\n padding: 15px;\\n}\\n#muse-error-node h4 {\\n margin-top: 0;\\n margin-bottom: 10px;\\n font-size: 16px;\\n}\\n#muse-error-node li {\\n padding: 3px 0;\\n}\\n#muse-error-node p {\\n color: #777;\\n font-style: italic;\\n font-size: 13px;\\n}\\n\\n#muse-error-node p a {\\n color: #039be5;\\n text-decoration: none;\\n}\\n\\n#muse-error-node p a:hover {\\n text-decoration: underline;\\n}\\n\\n.muse-theme-dark {\\n background-color: #141414;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {};\nexport default ___CSS_LOADER_EXPORT___;\n","const theGlobal = require('./getGlobal');\nconst parseMuseId = require('./parseMuseId');\n/**\n * Register modules to muse module system.\n *\n * @param {Object} modules Key value object for Muse modules.\n * @param {Function} __require__ used to require the actual module, for example: __webpack_require__\n */\nfunction register(modules, __require__) {\n for (const mid in modules) {\n // If it's not muse module, continue\n if (!parseMuseId(mid)) continue;\n const m = modules[mid];\n theGlobal.MUSE_GLOBAL.__shared__.modules[mid] = {\n id: mid,\n __require__,\n };\n }\n}\nmodule.exports = register;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.nc = undefined;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import defineProperty from \"./defineProperty.js\";\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nexport { _objectSpread2 as default };","import logo from './logo.png';\n\nconst loading = {\n init() {\n const { app, cdn } = window.MUSE_GLOBAL;\n const loadingDiv = document.createElement('div');\n const logoUrl = app.iconId\n ? `${cdn}/p/app-icon.${app.name}/v0.0.${app.iconId}/dist/icon.png`\n : logo;\n loadingDiv.innerHTML = `\n <div>\n <div class='muse-loading-node-inner'>\n <div class=\"loadingio-spinner-eclipse-p5fn84x4bh8\"><div class=\"ldio-klconu2768\"><div>\n </div></div></div>\n <img src=\"${logoUrl}\" aria-label=\"logo\" />\n </div>\n <label>Starting...</label>\n </div>\n `;\n loadingDiv.id = 'muse-loading-node';\n if (\n (app.config?.theme === 'dark' && !localStorage.getItem('muse.theme')) ||\n (localStorage.getItem('muse.theme') && localStorage.getItem('muse.theme') === 'dark')\n ) {\n document.body.classList.add('muse-theme-dark');\n }\n document.body.appendChild(loadingDiv);\n this.mountNode = loadingDiv;\n this.labelNode = loadingDiv.querySelector('label');\n },\n\n hide() {\n if (!this.mountNode) return;\n setTimeout(() => {\n this.mountNode.style.opacity = 0;\n }, 10);\n\n setTimeout(() => {\n document.body.removeChild(this.mountNode);\n delete this.mountNode;\n }, 800);\n\n delete this.labelNode;\n },\n\n showMessage(msg) {\n if (this.labelNode) this.labelNode.innerHTML = msg || '';\n },\n};\n\nexport default loading;\n","const error = {\n errors: [],\n init() {\n const errorDiv = document.createElement('div');\n errorDiv.innerHTML = ``;\n errorDiv.id = 'muse-error-node';\n document.body.appendChild(errorDiv);\n this.mountNode = errorDiv;\n },\n showMessage(msg) {\n const arr = msg?.splice ? msg : [msg];\n this.errors.push(...arr);\n this.update();\n },\n update() {\n if (!this.mountNode) this.init();\n\n const content =\n this.errors.length === 1\n ? `<div>${this.errors[0]}</div>`\n : `<ul>\n ${this.errors.map((err) => '<li>' + err + '</li>').join('')}\n </ul>`;\n this.mountNode.innerHTML = `\n <div class=\"muse-error-node-inner\">\n <h4>Failed to load:</h4>\n ${content}\n <p>* Unexpected error happened, please refresh to retry or <a href=\"${\n window.MUSE_GLOBAL.appConfig?.supportLink || '#'\n }\">contact support</a>.</p>\n </div>\n `;\n },\n};\n\nexport default error;\n","// Try to register service worker.\nimport loading from './loading';\n\nfunction registerSw() {\n const { serviceWorker } = window.MUSE_GLOBAL;\n if (!navigator.serviceWorker) return;\n if (serviceWorker && window.location.protocol === 'https:') {\n loading.showMessage('Registering Muse service worker.');\n return new Promise((resolve) => {\n let resolved = false;\n setTimeout(() => {\n if (!resolved) {\n console.log('Failed to register service worker in 10 seconds. Skip it.');\n resolve();\n }\n }, 10000);\n navigator.serviceWorker\n .register(serviceWorker, {})\n .then(function () {\n resolved = true;\n console.log('Service Worker register done.');\n resolve();\n })\n .catch(() => {\n resolved = true;\n console.log('Failed to register service worker, skip it.');\n resolve(); // Tolerate failures\n });\n });\n }\n}\n\nexport default registerSw;\n","import error from './error';\nconst noop = () => {};\n\nexport function load(plugin, callback) {\n callback = callback || noop;\n if (plugin.then && plugin.catch) {\n plugin.then(callback);\n return;\n }\n\n if (plugin.url) {\n return new Promise((resolve, reject) => {\n const head = document.querySelector('head');\n const script = document.createElement('script');\n script.src = plugin.url;\n if (plugin.esModule) script.type = 'module';\n head.appendChild(script);\n script.onload = () => {\n callback();\n resolve();\n };\n // from unit tests, we resolve this Promise immediately. This is needed, as jest will never run the script.onload() function,\n // as it's not a real browser, making the Promise never resolve.\n if (process.env.NODE_ENV === 'test') {\n resolve();\n }\n script.onerror = () => {\n error.showMessage(`Failed to load resource: ${plugin.url} .`);\n reject();\n };\n });\n }\n}\n\nexport async function loadInParallel(items, callback = noop) {\n let count = 0;\n await Promise.all(\n items.map(async (item) => {\n await load(item);\n callback(++count);\n }),\n );\n}\n\nexport function joinPath(p1, p2) {\n if (!p1.endsWith('/')) p1 += '/';\n if (p2.startsWith('/')) p2 = p2.replace(/^\\/+/, '');\n return p1 + p2;\n}\n\nexport function getPluginId(name) {\n if (name.startsWith('@')) return name.replace('/', '.');\n return name;\n}\n","// Message engine is used to communicate between main app and sub app via postMessage\nconst makeId = () => Math.random().toString(36).substring(2);\n\nconst msgEngine = {\n listeners: {},\n promises: {},\n iframes: {},\n register(key, iframe) {\n this.iframes[key] = iframe;\n },\n unregister(key) {\n delete this.iframes[key];\n },\n getIframe(iframe) {\n if (typeof iframe === 'string') return this.iframes[iframe];\n return iframe;\n },\n init() {\n // Assert a client is a Muse app\n this.addListener('handle-muse-app-check', (payload, msg) => {\n if (payload?.type === 'assert-muse-app' && msg.data?.from?.clientKey === 'parent') {\n // Tell parent I'm a Muse app.\n this.sendToParent({\n promiseId: msg?.data?.promiseId,\n data: {\n app: window.MUSE_GLOBAL.app.name,\n env: window.MUSE_GLOBAL.env.name,\n },\n });\n\n window.MUSE_GLOBAL.parentApp = msg?.data?.from;\n }\n });\n\n window.addEventListener(\n 'message',\n (msg) => {\n if (msg?.data?.type !== 'muse') return;\n console.log('on muse post msg: ', msg);\n if (msg?.data?.payload?.promiseId) {\n this.resolvePromise(msg.data.payload.promiseId, msg?.data.payload?.data);\n }\n Object.entries(this.listeners).forEach(([id, func]) => {\n try {\n func(msg.data.payload, msg);\n } catch (err) {\n console.log(`Warning: failed to process message \"${id}\"`, msg, err);\n }\n });\n },\n false,\n );\n },\n resolve(promiseId, payload) {\n // Todo: send\n },\n // a component could listen messages from other apps\n addListener(id, callback) {\n this.listeners[id] = callback;\n },\n removeListener(id) {\n delete this.listeners[id];\n },\n sendToChild(msg, iframe, isPromise = false) {\n let promise = null;\n let promiseHandler = null;\n let id = null;\n if (isPromise) {\n id = makeId();\n promise = new Promise((resolve, reject) => {\n promiseHandler = this.promises[id] = { resolve, reject };\n });\n }\n try {\n this.getIframe(iframe)?.contentWindow?.postMessage(\n {\n type: 'muse',\n promiseId: id,\n from: {\n app: window.MUSE_GLOBAL.appName,\n env: window.MUSE_GLOBAL.envName,\n clientKey: 'parent',\n },\n payload: msg,\n },\n '*',\n );\n } catch (err) {\n console.log(`Failed to post message to child: `, msg);\n if (promise) promiseHandler.reject(err);\n }\n return promise;\n },\n\n sendToParent(msg, isPromise = false) {\n let promise = null;\n let promiseHandler = null;\n let id = null;\n if (isPromise) {\n id = makeId();\n promise = new Promise((resolve, reject) => {\n promiseHandler = this.promises[id] = { resolve, reject };\n });\n }\n if (window.parent && window.parent !== window) {\n try {\n window.parent.postMessage(\n {\n type: 'muse',\n promiseId: id,\n from: {\n app: window.MUSE_GLOBAL.appName,\n env: window.MUSE_GLOBAL.envName,\n type: 'child',\n },\n payload: msg,\n },\n '*',\n );\n } catch (err) {\n console.log('Failed to send message to parent: ', msg);\n if (promise) promiseHandler.reject(err);\n }\n }\n return promise;\n },\n\n // assert the app in iframe is a muse app\n assertMuseApp(iframe) {\n return new Promise((resolve, reject) => {\n this.sendToChild({ type: 'assert-muse-app' }, this.getIframe(iframe), true).then(resolve);\n setTimeout(() => reject(new Error('Muse app check timeout.')), 300); // if no response in 300ms (normally 30ms), it means it's not a Muse app.\n });\n },\n\n getParentUrl() {\n return new Promise((resolve, reject) => {\n this.sendToParent({ type: 'get-parent-url' }, true).then(resolve);\n setTimeout(() => reject(new Error('Get parent url timeout.')), 300); // if no response in 300ms (normally 30ms), it means it's not a Muse app.\n });\n },\n\n parentNavigate(url) {\n this.sendToParent({ type: 'parent-navigate', url });\n },\n\n resolvePromise(promiseId, payload) {\n this.promises[promiseId]?.resolve(payload);\n delete this.promises[promiseId];\n },\n resolveParent(promiseId, payload) {\n msgEngine.sendToParent({ promiseId: promiseId, data: payload });\n },\n\n resolveChild(promiseId, payload, msg) {\n msgEngine.sendToChild({ promiseId: promiseId, data: payload }, msg?.source);\n },\n};\n\n// Assert a client is a Muse app\nmsgEngine.addListener('handle-muse-app-check', (payload, msg) => {\n if (payload?.type === 'assert-muse-app' && msg.data?.from?.clientKey === 'parent') {\n // Tell parent I'm a Muse app.\n msgEngine.resolveParent(msg?.data?.promiseId, {\n app: window.MUSE_GLOBAL.appName,\n env: window.MUSE_GLOBAL.envName,\n });\n }\n});\n\n// Allow to navigate from sub app\nmsgEngine.addListener('parent-navigate', (payload) => {\n if (payload?.type === 'parent-navigate' && payload?.url) {\n window.location.href = payload.url;\n }\n});\n\n// Allow to get url from parent\nmsgEngine.addListener('get-parent-url', (payload, msg) => {\n if (payload?.type === 'get-parent-url') {\n console.log('get-parent-url: ', window.location.href);\n msgEngine.resolveChild(msg?.data?.promiseId, window.location.href, msg);\n }\n});\n\nexport default msgEngine;\n","// Notify the parent of the url change\n// subapp => parent\n// In muse-react/src/common/history handle url change msg\n\nimport msgEngine from './msgEngine';\n\nconst patchHistoryMethod = (method) => {\n const history = window.history;\n const original = history[method];\n\n history[method] = function (state) {\n const result = original.apply(this, arguments);\n const event = new Event('muse_boot_' + method.toLowerCase());\n event.state = state;\n window.dispatchEvent(event);\n return result;\n };\n};\n\npatchHistoryMethod('pushState');\npatchHistoryMethod('replaceState');\n\nconst handleUrlChange = () => {\n msgEngine.sendToParent({\n type: 'child-route-change',\n path: window.location.href.replace(window.location.origin, ''),\n });\n};\nwindow.addEventListener('popstate', handleUrlChange);\nwindow.addEventListener('muse_boot_pushstate', handleUrlChange);\nwindow.addEventListener('muse_boot_replacestate', handleUrlChange);\n","\n import API from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!../node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.102.1/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!../node_modules/.pnpm/source-map-loader@3.0.2_webpack@5.102.1/node_modules/source-map-loader/dist/cjs.js!./style.css\";\n \n \n\nvar options = {\"base\":11914653};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!../node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.102.1/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!../node_modules/.pnpm/source-map-loader@3.0.2_webpack@5.102.1/node_modules/source-map-loader/dist/cjs.js!./style.css\";\n export default content && content.locals ? content.locals : undefined;\n","import museModules from '@ebay/muse-modules';\nimport loading from './loading';\nimport error from './error';\nimport registerSw from './registerSw';\nimport { loadInParallel, getPluginId } from './utils';\nimport msgEngine from './msgEngine';\nimport './urlListener';\nimport './style.css';\n\nasync function start() {\n // If MUSE_TEMP_temp-redirect-url has a value, then redirect to that url.\n // This is a one time redirect, so remove the value after redirecting.\n // It's used for sub app login flow.\n const tempRedirectUrl = window.sessionStorage.getItem('MUSE_TEMP_temp-redirect-url');\n if (tempRedirectUrl) {\n window.sessionStorage.removeItem('MUSE_TEMP_temp-redirect-url');\n window.location = tempRedirectUrl;\n return;\n }\n\n const mg = window.MUSE_GLOBAL;\n loading.showMessage('Starting...');\n const waitForLoaders = mg.waitForLoaders || [];\n\n // Get the config from both app and env\n // That is, app.config is the default, env.config can override any value on app.config\n const appConfig = Object.assign({}, mg.app?.config);\n Object.entries(mg.env?.config || {}).forEach(([key, value]) => {\n if (value !== null && value !== undefined && value !== '') {\n appConfig[key] = value;\n }\n });\n\n Object.assign(mg, {\n appVariables: mg.appVariables || {},\n pluginVariables: mg.pluginVariables || {},\n appConfig,\n msgEngine,\n loading,\n error,\n isSubApp: window.parent !== window,\n getUser: () => null,\n appEntries: mg.appEntries || [], // entries to start the app\n initEntries: mg.initEntries || [], // entries from init plugins\n pluginEntries: mg.pluginEntries || [], // entries from lib or normal plugins\n // Allow to register some func to wait for before starting the app\n waitFor: (asyncFuncOrPromise) => {\n waitForLoaders.push(asyncFuncOrPromise);\n },\n // TODO: get plugin assets public paths (assets in public folder)\n getPublicPath: (pluginName, assetPath) => {\n if (!assetPath) throw new Error('assetPath is required for getPublicPath method.');\n assetPath = assetPath.replace(/^\\/*/, '');\n const pluginId = getPluginId(pluginName);\n\n if (mg.isDev) {\n // for dev, check if there's local plugins\n const names = mg.plugins.find((p) => !!p.localPlugins)?.localPlugins;\n if (names && names.includes(pluginName)) {\n return `/muse-assets/local/p/${pluginId}/${assetPath}`;\n }\n }\n const currentPlugin = window.MUSE_GLOBAL.plugins?.find((p) => p.name === pluginName);\n if (!currentPlugin) return;\n let { version } = currentPlugin || {};\n if (!version.startsWith('v')) {\n version = `v${version}`;\n }\n let publicPath = `${window.MUSE_GLOBAL.cdn}/p/${pluginId}/${version}`;\n if (window.MUSE_GLOBAL.isDev || window.MUSE_GLOBAL.isLocal) {\n publicPath = publicPath + `/dev/${assetPath}`;\n } else {\n publicPath = publicPath + `/dist/${assetPath}`;\n }\n return publicPath;\n },\n // Muse shared modules global methods\n __shared__: {\n modules: {},\n register: museModules.register,\n require: museModules.require,\n parseMuseId: museModules.parseMuseId,\n },\n });\n\n const { cdn = '', initEntries, pluginEntries, appEntries, isDev = false, isE2eTest = false } = mg;\n let { plugins = [] } = window.MUSE_GLOBAL;\n\n // MUSE_CONFIG is for backward compatibility\n window.MUSE_CONFIG = mg;\n\n msgEngine.sendToParent({\n type: 'app-state-change',\n state: 'app-starting',\n // url: document.location.href,\n });\n\n registerSw();\n\n // Print app plugins in dev console\n const bootPlugin = plugins.find((p) => p.type === 'boot');\n if (bootPlugin) {\n console.log(\n `Loading Muse app by ${bootPlugin.name}@${bootPlugin.version || bootPlugin.url}...`,\n );\n }\n\n /* Handle forcePlugins query parameter */\n const searchParams = new URLSearchParams(window.location.search);\n const forcePluginStr = searchParams.get('forcePlugins');\n if (forcePluginStr) {\n const forcePluginById = forcePluginStr\n .split(';')\n .filter(Boolean)\n .reduce((p, c) => {\n const separator = '@';\n const limit = 2;\n let prefix = '';\n if (c.startsWith('@') && c[0] === separator) {\n // Starts with @, means it's a scoped plugin\n c = c.substring(1);\n prefix = '@';\n }\n const arr = c.split(separator, limit);\n if (arr.length === limit) {\n const [name, type] = arr[0].split('!');\n p[`${prefix}${name}`] = {\n version: arr[1],\n type: type,\n };\n }\n return p;\n }, {});\n // Update or remove plugins from the list based on forcePlugins\n plugins = plugins\n .map((p) => {\n if (!forcePluginById[p.name]) return p;\n const newPlugin = { ...p, version: forcePluginById[p.name].version };\n delete forcePluginById[p.name];\n return newPlugin;\n })\n .filter((p) => p.version !== 'null');\n\n // Need to get the type of plugin from muse registry directly.\n for (const p in forcePluginById) {\n if (forcePluginById[p].version !== 'null') {\n plugins.push({\n name: p,\n type: forcePluginById[p].type,\n version: forcePluginById[p].version,\n });\n }\n }\n }\n\n console.log(`Plugins(${plugins.length}):`);\n // If a plugin has isLocal, it means its bundle is loaded somewhere else.\n // The registered plugin item is used to provide configurations. e.g plugin variables.\n plugins.forEach((p) => {\n let source = '';\n if (p.linkedTo) source = 'Linked to: ' + p.linkedTo;\n else if (p.isLocalLib) {\n source = 'Local:' + (/\\d{4,}/.exec(p.url)?.[0] || document.location.port); // find port number\n } else if (p.url) source = p.url;\n if (source) source = ` (${source})`;\n\n console.log(` * ${p.name}@${p.version || 'local'}${source}`);\n });\n msgEngine.sendToParent({\n type: 'app-state-change',\n state: 'app-loading',\n });\n // Load init plugins\n // Init plugins should be small and not depend on each other\n const initPluginsToLoad = plugins\n .filter((p) => p.type === 'init')\n .map((p) => {\n return {\n url:\n p.isLocal || p.linkedTo\n ? false\n : p.url || `${cdn}/p/${getPluginId(p.name)}/v${p.version}/dist/main.js`,\n ...p,\n };\n })\n .filter(Boolean);\n\n // Load init plugins\n if (initPluginsToLoad.length > 0) {\n loading.showMessage(`Loading init plugins 1/${initPluginsToLoad.length}...`);\n await loadInParallel(initPluginsToLoad, (loadedCount) =>\n loading.showMessage(\n `Loading init plugins ${Math.min(loadedCount + 1, initPluginsToLoad.length)}/${\n initPluginsToLoad.length\n }...`,\n ),\n );\n }\n\n // Exec init entries\n if (initEntries.length > 0) {\n loading.showMessage(`Executing init entries...`);\n initEntries.sort((a, b) => (a.order || 10) - (b.order || 10)); // sort by order\n for (const initEntry of initEntries) {\n // Allow an init entry to break the start of the app\n if ((await initEntry.func()) === false) return;\n }\n }\n\n // NOTE: init plugins have the opportunity to modify plugins list.\n // It's an expected behavior for some permission control.\n\n // Load normal and lib plugins\n const bundleDir = isDev ? 'dev' : isE2eTest ? 'test' : 'dist';\n const pluginsToLoad = plugins\n .filter((p) => p.type !== 'boot' && p.type !== 'init')\n .map((p) => {\n return {\n url:\n p.isLocal || p.linkedTo\n ? false\n : p.url || `${cdn}/p/${getPluginId(p.name)}/v${p.version}/${bundleDir}/main.js`,\n ...p, // if a plugin already has url, always use it\n };\n })\n .filter(Boolean);\n\n // Load plugin bundles\n const libPluginsToLoad = pluginsToLoad.filter((p) => p.type === 'lib');\n loading.showMessage(`Loading lib plugins 1/${libPluginsToLoad.length}...`);\n await loadInParallel(\n libPluginsToLoad.filter((p) => !p.esModule),\n (loadedCount) =>\n loading.showMessage(\n `Loading lib plugins ${Math.min(loadedCount + 1, libPluginsToLoad.length)}/${\n libPluginsToLoad.length\n }...`,\n ),\n );\n\n const normalPluginsToLoad = pluginsToLoad.filter((p) => p.type === 'normal' || !p.type);\n loading.showMessage(`Loading normal plugins 1/${normalPluginsToLoad.length}...`);\n await loadInParallel(\n normalPluginsToLoad.filter((p) => !p.esModule),\n (loadedCount) =>\n loading.showMessage(\n `Loading normal plugins ${Math.min(loadedCount + 1, normalPluginsToLoad.length)}/${\n normalPluginsToLoad.length\n }...`,\n ),\n );\n\n // TODO: why we need to load esModule plugins separately?\n const esPluginsToLoad = pluginsToLoad.filter((p) => p.esModule);\n await loadInParallel(\n esPluginsToLoad.filter((p) => p.esModule),\n (loadedCount) =>\n loading.showMessage(\n `Loading es plugins ${Math.min(loadedCount + 1, esPluginsToLoad.length)}/${\n esPluginsToLoad.length\n }...`,\n ),\n );\n\n // Exec plugin entries which are generated by building process\n // This ensures a fixed order for plugins to initialize\n if (pluginEntries.length > 0) {\n loading.showMessage(`Executing plugin entries...`);\n pluginEntries.forEach((entry) => entry.func());\n }\n\n // Wait for loader\n if (waitForLoaders.length > 0) {\n loading.showMessage(`Executing custom loaders ...`);\n const arr = await Promise.all(\n waitForLoaders.map(async (loader) => {\n // Usually a plugin waitFor a promise so that it doesn't need to wait for all plugins loaded before executing\n if (loader.then) return await loader;\n // If pass an async function, it executes while all plugins are loaded.\n else return await loader();\n }),\n );\n // If a loader returns false, then don't continue starting\n // NOTE: if a loader needs to show an error message, just throw an error.\n if (arr.some((s) => s === false)) return;\n }\n\n // Start the application\n let entryName = appConfig.entry;\n if (!entryName) {\n // If there isn't entry defined and there's only one app entry from the plugins list.\n // Then just use the only one.\n if (appEntries.length === 1) {\n entryName = appEntries[0].name;\n } else if (appEntries.length === 0) {\n throw new Error(\n 'No app entry found. You need a plugin deployed to the app to provide an app entry.',\n );\n } else {\n throw new Error(\n `Multiple entries found: ${appEntries\n .map((e) => e.name)\n .join(', ')}. You need to specify one entry in app config.`,\n );\n }\n }\n const entryApp = appEntries.find((e) => e.name === entryName);\n if (entryApp) {\n console.log(`Starting the app from ${entryName}...`);\n loading.showMessage(`Starting the app...`);\n await entryApp.func();\n } else {\n throw new Error(`The specified app entry was not found: ${entryName}.`);\n }\n loading.hide();\n}\n\nexport function bootstrap() {\n if (!window.MUSE_GLOBAL) {\n throw new Error('There must be a global window.MUSE_GLOBAL object');\n }\n\n loading.init();\n msgEngine.init();\n\n const timeStart = Date.now();\n const appStartExceptions = [];\n let status = 'success';\n let errorMsg;\n start()\n .then(() => {\n const timeEnd = Date.now();\n msgEngine.sendToParent({\n type: 'app-state-change',\n state: 'app-loaded',\n });\n console.log(`Muse app started in ${(timeEnd - timeStart) / 1000} seconds.`);\n })\n .catch((err) => {\n console.log('Failed to start the app.');\n status = 'failure';\n errorMsg = err?.message || 'App failed to start.';\n appStartExceptions.push(err);\n\n err && console.error(err);\n loading.hide();\n if (err?.message) {\n error.showMessage(err.message);\n }\n msgEngine.sendToParent({\n type: 'app-state-change',\n state: 'app-failed',\n });\n })\n .finally(() => {\n const bootCompleteEvent = new CustomEvent('muse_boot_completed', {\n detail: {\n result: status,\n metrics: [\n {\n name: 'app-start-result',\n payload: {\n duration: Date.now() - timeStart,\n status,\n errorMsg,\n url: document.location.href,\n },\n },\n {\n name: 'app-start-exceptions',\n payload: appStartExceptions,\n },\n ],\n },\n });\n window.dispatchEvent(bootCompleteEvent);\n });\n}\n","// boot plugin is used to load other plugins based on the app config\nimport { bootstrap } from './boot';\n\nbootstrap();\n"],"names":["stylesInDOM","getIndexByIdentifier","identifier","result","i","length","modulesToDom","list","options","idCountMap","identifiers","item","id","base","count","concat","indexByIdentifier","obj","css","media","sourceMap","supports","layer","references","updater","addElementStyle","byIndex","splice","push","api","domAPI","update","newObj","remove","module","exports","lastIdentifiers","newList","index","newLastIdentifiers","_i","_index","styleElement","nonce","setAttribute","styleSheet","cssText","firstChild","removeChild","appendChild","document","createTextNode","self","window","global","Error","getGlobal","element","createElement","setAttributes","attributes","insert","museId","_m$","m","exec","name","path","version","slice","map","Number","preRelease","replace","err","content","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","join","config","require","register","parseMuseId","findMuseModule","memo","style","target","styleTarget","querySelector","HTMLIFrameElement","contentDocument","head","e","getTarget","insertStyleElement","needLayer","styleTagTransform","apply","parentNode","removeStyleElement","__muse_module_cache__","cachedModule","museModule","__require__","cache","modules","Object","keys","forEach","mid","buildCache","verDiff","v1","v2","Math","abs","lt","gt","museShared","MUSE_GLOBAL","__shared__","candidates","picked","minDiff","c","currentDiff","matchVersion","cssWithMappingToString","toString","this","dedupe","undefined","alreadyImportedModules","k","_k","___CSS_LOADER_EXPORT___","locals","theGlobal","__webpack_module_cache__","__webpack_require__","moduleId","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","defineProperty","enumerable","get","g","globalThis","Function","prop","prototype","hasOwnProperty","call","scriptUrl","importScripts","location","currentScript","tagName","toUpperCase","src","scripts","getElementsByTagName","test","p","nc","_typeof","Symbol","iterator","constructor","toPropertyKey","t","r","toPrimitive","TypeError","String","_defineProperty","value","configurable","writable","ownKeys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","_objectSpread2","arguments","getOwnPropertyDescriptors","defineProperties","init","_app$config","app","cdn","loadingDiv","logoUrl","iconId","logo","innerHTML","theme","localStorage","getItem","body","classList","add","mountNode","labelNode","hide","setTimeout","opacity","showMessage","msg","errors","errorDiv","arr","_window$MUSE_GLOBAL$a","appConfig","supportLink","serviceWorker","navigator","protocol","loading","Promise","resolve","resolved","console","log","then","catch","noop","async","loadInParallel","items","callback","all","plugin","url","reject","script","esModule","type","onload","onerror","error","load","getPluginId","startsWith","makeId","random","substring","msgEngine","listeners","promises","iframes","iframe","unregister","getIframe","addListener","payload","_msg$data","_msg$data$from","_msg$data2","_msg$data3","from","clientKey","sendToParent","promiseId","env","parentApp","addEventListener","_msg$data4","_msg$data5","_msg$data5$payload","_msg$data$payload","resolvePromise","entries","_ref","func","removeListener","sendToChild","promise","promiseHandler","_this$getIframe","_this$getIframe$conte","contentWindow","postMessage","appName","envName","parent","assertMuseApp","getParentUrl","parentNavigate","_this$promises$promis","resolveParent","resolveChild","source","_msg$data6","_msg$data6$from","_msg$data7","href","_msg$data8","patchHistoryMethod","method","history","original","state","event","Event","toLowerCase","dispatchEvent","handleUrlChange","origin","timeStart","Date","now","appStartExceptions","errorMsg","status","_mg$app","_mg$env","tempRedirectUrl","sessionStorage","removeItem","mg","waitForLoaders","assign","appVariables","pluginVariables","isSubApp","getUser","appEntries","initEntries","pluginEntries","waitFor","asyncFuncOrPromise","getPublicPath","pluginName","assetPath","_window$MUSE_GLOBAL$p","pluginId","isDev","_mg$plugins$find","names","plugins","find","localPlugins","includes","currentPlugin","publicPath","isLocal","museModules","isE2eTest","MUSE_CONFIG","registerSw","bootPlugin","forcePluginStr","URLSearchParams","search","forcePluginById","split","Boolean","reduce","prefix","newPlugin","_objectSpread","linkedTo","isLocalLib","_exec","port","initPluginsToLoad","loadedCount","min","sort","b","order","initEntry","bundleDir","pluginsToLoad","libPluginsToLoad","normalPluginsToLoad","esPluginsToLoad","entry","loader","some","s","entryName","entryApp","start","timeEnd","message","finally","bootCompleteEvent","CustomEvent","detail","metrics","duration","bootstrap"],"sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebay/muse-boot-default",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "muse": {