openc3-tool-base 5.5.2 → 5.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- <!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>OpenC3</title><link rel="stylesheet" href="/css/roboto.css"/><link rel="stylesheet" href="/css/materialdesignicons-7.1.96.min.css"/><link rel="stylesheet" href="/css/vuetify-2.6.14.min.css"/><script src="/js/regenerator-runtime-0.13.11.min.js"></script><meta http-equiv="Content-Security-Policy" content="default-src 'self' blob: data: http: https:; script-src 'unsafe-inline' 'unsafe-eval' http: https: blob:; connect-src blob: http: https: wss: ws:; style-src 'unsafe-inline' http: https:; object-src 'none';"><meta name="importmap-type" content="systemjs-importmap"/><script type="systemjs-importmap">{
1
+ <!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>OpenC3</title><link rel="stylesheet" href="/css/roboto.css"/><link rel="stylesheet" href="/css/materialdesignicons-7.2.96.min.css"/><link rel="stylesheet" href="/css/vuetify-2.6.14.min.css"/><script src="/js/regenerator-runtime-0.13.11.min.js"></script><meta http-equiv="Content-Security-Policy" content="default-src 'self' blob: data: http: https:; script-src 'unsafe-inline' 'unsafe-eval' http: https: blob:; connect-src blob: http: https: wss: ws:; style-src 'unsafe-inline' http: https:; object-src 'none';"><meta name="importmap-type" content="systemjs-importmap"/><script type="systemjs-importmap">{
2
2
  "imports": {
3
3
  "single-spa": "/js/single-spa-5.9.4.min.js",
4
4
  "vue": "/js/vue-2.7.14.min.js",
@@ -1,4 +1,4 @@
1
- <!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>OpenC3</title><link rel="stylesheet" href="/css/roboto.css"/><link rel="stylesheet" href="/css/materialdesignicons-7.1.96.min.css"/><link rel="stylesheet" href="/css/vuetify-2.6.14.min.css"/><script src="/js/regenerator-runtime-0.13.11.min.js"></script><meta http-equiv="Content-Security-Policy" content="default-src 'self' blob: data: https: http://localhost:* http://host.docker.internal:* http://*.local:*; script-src 'unsafe-inline' 'unsafe-eval' https: blob: http://localhost:* http://host.docker.internal:* http://*.local:*; connect-src blob: https: wss: http://localhost:* http://host.docker.internal:* http://*.local:* ws://localhost:* ws://host.docker.internal:* ws://*.local:*; style-src 'unsafe-inline' https: http://localhost:* http://host.docker.internal:* http://*.local:*; object-src 'none';"><meta name="importmap-type" content="systemjs-importmap"/><script type="systemjs-importmap">{
1
+ <!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>OpenC3</title><link rel="stylesheet" href="/css/roboto.css"/><link rel="stylesheet" href="/css/materialdesignicons-7.2.96.min.css"/><link rel="stylesheet" href="/css/vuetify-2.6.14.min.css"/><script src="/js/regenerator-runtime-0.13.11.min.js"></script><meta http-equiv="Content-Security-Policy" content="default-src 'self' blob: data: https: http://localhost:* http://host.docker.internal:* http://*.local:*; script-src 'unsafe-inline' 'unsafe-eval' https: blob: http://localhost:* http://host.docker.internal:* http://*.local:*; connect-src blob: https: wss: http://localhost:* http://host.docker.internal:* http://*.local:* ws://localhost:* ws://host.docker.internal:* ws://*.local:*; style-src 'unsafe-inline' https: http://localhost:* http://host.docker.internal:* http://*.local:*; object-src 'none';"><meta name="importmap-type" content="systemjs-importmap"/><script type="systemjs-importmap">{
2
2
  "imports": {
3
3
  "single-spa": "/js/single-spa-5.9.4.min.js",
4
4
  "vue": "/js/vue-2.7.14.min.js",
@@ -1 +1 @@
1
- !function(){"use strict";function e(t){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})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function s(e,t,n){return(s=u()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&a(o,n.prototype),o}).apply(null,arguments)}function d(e){var t="function"==typeof Map?new Map:void 0;return(d=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return s(e,arguments,l(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,e)})(e)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?c(e):t}function m(e){var t=u();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){a=!0,o=e}finally{try{l||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||v(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(t,n){if(Array.isArray(t)){for(var r=0;r<t.length;r++)if(t[r]===n)return!0;return!1}if("string"==typeof t)return t.indexOf(n)>=0;throw Error("Can't call includes on ".concat(e(t)))}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.href;e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),r=n.exec(t);return r?r[2]?decodeURIComponent(r[2].replace(/\+/g," ")):"":null}var y,b="import-map-override:",w="import-map-overrides-disabled",x="import-map-overrides-external-maps",k="data-is-importmap-override",M="import-map-overrides-domains",E="allowlist:",O="denylist:",N=document.querySelector('meta[name="importmap-type"]'),S=document.querySelector('meta[name="'.concat(M,'"]')),C={},U=N?N.getAttribute("content"):"importmap";if(S){var I=S.getAttribute("content");I||console.warn("Invalid ".concat(M," meta element - content required."));var P=function(e){return new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e).replace("\\*",".+")).test(window.location.hostname)};0===I.indexOf(E)?y=!I.slice(E.length).split(",").some(P):0===I.indexOf(O)?y=I.slice(O.length).split(",").some(P):console.log("Invalid ".concat(M," meta content attribute - must start with ").concat(E," or ").concat(O))}else y=!1;(function(){try{return localStorage.getItem("test"),!0}catch(e){return!1}})()||(console.warn("Disabling import-map-overrides, since local storage is not readable"),y=!0),y||function(){var e,t=!!N&&N.hasAttribute("server-cookie"),n=!!N&&N.hasAttribute("server-only");window.importMapOverrides={addOverride:function(e,n){/^\d+$/g.test(n)&&(n=r.getUrlFromPort(e,n));var o=b+e;return localStorage.setItem(o,n),t&&(document.cookie="".concat(o,"=").concat(n)),i(),r.getOverrideMap()},getOverrideMap:function(){for(var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t={imports:{},scopes:{}},n=r.getDisabledOverrides(),o=function(r,o){!e&&n.indexOf(r)>=0||(t.imports[r]=o)},i=0;i<localStorage.length;i++){var l=localStorage.key(i);0===l.indexOf(b)&&o(l.slice(b.length),localStorage.getItem(l))}var a=_("imo",window.parent?window.parent.location.href:window.location.href);if(a){var u;try{u=JSON.parse(a)}catch(e){throw Error("Invalid importMap query param - text content must be json")}Object.keys(u.imports).forEach((function(e){o(e,u.imports[e])}))}return t},removeOverride:function(e){var n=b+e,o=null!==localStorage.getItem(n);return localStorage.removeItem(n),t&&(document.cookie="".concat(n,"=; expires=Thu, 01 Jan 1970 00:00:01 GMT;")),r.enableOverride(e),i(),o},resetOverrides:function(){return Object.keys(r.getOverrideMap(!0).imports).forEach((function(e){r.removeOverride(e)})),localStorage.removeItem(w),localStorage.removeItem(x),i(),r.getOverrideMap()},hasOverrides:function(){return Object.keys(r.getOverrideMap().imports).length>0},getUrlFromPort:function(e,t){var n=e.replace(/@/g,"").replace(/\//g,"-");return"//localhost:".concat(t,"/").concat(n,".js")},enableUI:function(){var e="import-map-overrides-full",t="show-when-local-storage",n=document.querySelector(e);n||((n=document.createElement(e)).setAttribute(t,"true"),document.body.appendChild(n));var r=n.getAttribute(t);r&&(localStorage.setItem(r,!0),n.renderWithPreact())},mergeImportMap:function(e,t){var n={imports:{},scopes:{}};for(var r in e.imports)n.imports[r]=e.imports[r];for(var o in t.imports)n.imports[o]=t.imports[o];for(var i in e.scopes)n.scopes[i]=e.scopes[i];for(var l in t.scopes)n.scopes[l]=t.scopes[l];return n},getDefaultMap:function(){return e||(e=Array.prototype.reduce.call(document.querySelectorAll('script[type="'.concat(U,'"], script[type="overridable-importmap"]')),(function(e,t){return t.hasAttribute(k)?e:(n=t.src?v(t.src):Promise.resolve(JSON.parse(t.textContent)),Promise.all([e,n]).then((function(e){var t=f(e,2),n=t[0],o=t[1];return r.mergeImportMap(n,o)})));var n}),Promise.resolve({imports:{},scopes:{}})))},getCurrentPageMap:function(){return Promise.all([r.getDefaultMap(),r.getExternalOverrideMap(r.getCurrentPageExternalOverrides())]).then((function(e){var t=f(e,2),n=t[0],o=t[1];return r.mergeImportMap(r.mergeImportMap(n,o),u)}))},getCurrentPageExternalOverrides:function(){var e=[];return document.querySelectorAll("[".concat(k,']:not([id="import-map-overrides"])')).forEach((function(t){e.push(t.src)})),e},getNextPageMap:function(){return Promise.all([r.getDefaultMap(),r.getExternalOverrideMap()]).then((function(e){var t=f(e,2),n=t[0],o=t[1];return r.mergeImportMap(r.mergeImportMap(n,o),r.getOverrideMap())}))},disableOverride:function(e){var t=r.getDisabledOverrides();return!g(t,e)&&(localStorage.setItem(w,JSON.stringify(t.concat(e))),i(),!0)},enableOverride:function(e){var t=r.getDisabledOverrides(),n=t.indexOf(e);return n>=0&&(t.splice(n,1),localStorage.setItem(w,JSON.stringify(t)),i(),!0)},getDisabledOverrides:function(){var e=localStorage.getItem(w);return e?JSON.parse(e):[]},isDisabled:function(e){return g(r.getDisabledOverrides(),e)},getExternalOverrides:function(){var e=localStorage.getItem(x);return e?JSON.parse(e).sort():[]},addExternalOverride:function(e){e=new URL(e,document.baseURI).href;var t=r.getExternalOverrides();return!g(t,e)&&(localStorage.setItem(x,JSON.stringify(t.concat(e))),i(),!0)},removeExternalOverride:function(e){var t=r.getExternalOverrides();return!!g(t,e)&&(localStorage.setItem(x,JSON.stringify(t.filter((function(t){return t!==e})))),i(),!0)},getExternalOverrideMap:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.getExternalOverrides()).reduce((function(e,t){var n=C[t]||(C[t]=v(t));return Promise.all([e,n]).then((function(e){var t=f(e,2),n=t[0],o=t[1];return r.mergeImportMap(n,o)}))}),Promise.resolve({imports:{},scopes:{}}))},isExternalMapValid:function(e){return(C[e]||(C[e]=v(e))).then((function(){return g(r.invalidExternalMaps,e)}))},invalidExternalMaps:[]};var r=window.importMapOverrides,o=!0;try{CustomEvent?new CustomEvent("a"):o=!1}catch(e){o=!1}function i(){l("change")}function l(e){setTimeout((function(){var t="import-map-overrides:".concat(e),n=o?new CustomEvent(t):document.createEvent("CustomEvent");o||n.initCustomEvent(t,!0,!0,null),window.dispatchEvent(n)}))}var a,u=r.getOverrideMap(),s=r.getExternalOverrides();if(!n){var d=document.querySelector('script[type="overridable-importmap"]');if(!(a=d)){var c=document.querySelectorAll('script[type="'.concat(U,'"]'));a=c?c[c.length-1]:null}if(d){if(d.src)throw Error('import-map-overrides: external import maps with type="overridable-importmap" are not supported');var p;try{p=JSON.parse(d.textContent)}catch(e){throw Error('Invalid <script type="overridable-importmap"> - text content must be json')}a=m(r.mergeImportMap(p,u),"import-map-overrides",a),h()}else h(),Object.keys(u.imports).length>0&&(a=m(u,"import-map-overrides",a))}function m(e,t,n){var r=document.createElement("script");return r.type=U,r.id=t,r.setAttribute(k,""),"string"==typeof e?r.src=e:r.textContent=JSON.stringify(e,null,2),n?n.insertAdjacentElement("afterend",r):document.head.appendChild(r),r}function v(e){return fetch(e).then((function(e){return e.ok?e.json().catch((function(t){return console.warn(Error("External override import map contained invalid json, at url ".concat(e.url,". ").concat(t))),r.invalidExternalMaps.push(e.url),{imports:{},scopes:{}}})):(console.warn(Error("Unable to download external override import map from url ".concat(e.url,". Server responded with status ").concat(e.status))),r.invalidExternalMaps.push(e.url),{imports:{},scopes:{}})}),(function(){return console.warn(Error("Unable to download external import map at url '".concat(e,"'"))),r.invalidExternalMaps.push(new URL(e,document.baseURI).href),{imports:{},scopes:{}}}))}function h(){s.length>0&&s.forEach((function(e,t){a=m(e,"import-map-overrides-external-".concat(t))}))}l("init")}(),function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".imo-unstyled {\n border: none;\n padding: 0;\n width: auto;\n overflow: visible;\n background: transparent;\n color: inherit;\n font: inherit;\n line-height: normal;\n cursor: pointer;\n -webkit-font-smoothing: inherit;\n -moz-osx-font-smoothing: inherit;\n -webkit-appearance: none;\n}\n\n.imo-unstyled::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n.imo-trigger {\n position: fixed;\n bottom: 0;\n right: 0;\n margin: 10px;\n border-radius: 5px;\n background-color: navajowhite;\n height: 50px;\n width: 50px;\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 18px;\n font-family: sans-serif;\n z-index: 10500;\n}\n\n.imo-popup {\n box-sizing: border-box;\n position: fixed;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 50%;\n z-index: 10000;\n background-color: black;\n color: white;\n font-family: sans-serif;\n padding: 24px;\n overflow-y: auto;\n}\n\n.imo-popup a:visited,\n.imo-popup a {\n color: white;\n}\n\n.imo-popup .imo-module-dialog {\n left: calc(50% - 200px);\n}\n\n.imo-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n}\n\n.imo-list {\n margin-left: 16px;\n}\n\n.imo-list > *:not(:last-child) {\n margin-bottom: 8px;\n}\n\n.imo-list-container *,\n.imo-modal-container * {\n font-family: sans-serif;\n box-sizing: border-box;\n}\n\n.imo-module-dialog {\n position: fixed;\n z-index: 30000000;\n top: 30%;\n max-width: 600px;\n margin: 0 auto;\n border: 4px solid navajowhite;\n background-color: white;\n padding: 1em;\n left: 50%;\n right: auto;\n transform: translateX(-50%);\n}\n\n.imo-module-dialog input {\n width: 100%;\n font-size: 16px;\n box-sizing: border-box;\n padding-right: 20px;\n}\n\n.imo-module-dialog table {\n margin-bottom: 16px;\n}\n\n.imo-module-dialog table td:first-child {\n text-align: right;\n padding-right: 16px;\n word-break: keep-all;\n}\n\n.imo-module-dialog table td {\n word-break: break-all;\n}\n\n.imo-module-dialog.imo-overridden {\n border: 4px solid salmon;\n}\n\n.imo-table-header-actions {\n display: flex;\n align-items: center;\n}\n\n.imo-overrides-table {\n border-collapse: collapse;\n margin-top: 32px;\n}\n\n.imo-overrides-table tr td:first-child {\n display: flex;\n align-items: center;\n padding-right: 32px;\n position: relative;\n}\n\n.imo-needs-refresh {\n position: absolute;\n right: 8px;\n width: 20px;\n height: 20px;\n /* base64 encoded 27F2 svg */\n background-image: url(\"data:image/svg+xml;charset=utf8,%3Csvg width='261' height='216' xmlns='http://www.w3.org/2000/svg' stroke='%23ffffff' stroke-linecap='square' stroke-miterlimit='10' shape-rendering='auto' stroke-opacity='1' fill='%23ffffff' stroke-dasharray='none' stroke-width='1' stroke-linejoin='miter' stroke-dashoffset='0'%3E%3Cg%3E%3Cpath fill='%23ffffff' d='m152.5625,214.0625q-27.5625,0 -49.6406,-11.8125q-22.0781,-11.8125 -34.7344,-28.4062l12.6563,-11.5313q10.6874,15.1875 31.0781,25.0313q20.3906,9.8437 40.6406,9.8437q21.375,0 44.1563,-11.5313q22.7812,-11.5312 34.3124,-34.3124q11.5313,-22.7813 11.5313,-44.1563q0,-21.375 -11.5313,-44.1563q-11.5312,-22.7812 -34.3124,-34.3124q-22.7813,-11.5313 -44.1563,-11.5313q-19.9687,0 -39.6563,9.1406q-19.6874,9.1407 -30.9374,24.1875q-11.25,15.0469 -16.7344,35.7188l42.3281,-34.7344l-54,91.6875l-54,-91.6875l47.25,38.8125q3.9375,-24.4687 17.4375,-44.5781q13.5,-20.1094 36.9844,-32.7656q23.4844,-12.6563 51.3281,-12.6563q29.25,0 54,14.0625q24.75,14.0625 38.8125,38.8125q14.0625,24.75 14.0625,54q0,29.25 -14.0625,54q-14.0625,24.75 -38.8125,38.8125q-24.75,14.0625 -54,14.0625z' /%3E%3C/g%3E%3C/svg%3E\");\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n}\n\n.imo-status {\n height: 16px;\n width: 16px;\n border-radius: 8px;\n border: 1px solid white;\n margin-right: 8px;\n}\n\n.imo-disabled-override {\n background-color: lightblue;\n}\n\n.imo-next-override {\n background-color: darkred;\n}\n\n.imo-current-override {\n background-color: salmon;\n}\n\n.imo-default-module {\n background-color: lightgoldenrodyellow;\n}\n\n.imo-external-override {\n background-color: orange;\n}\n\n.imo-next-default {\n background-color: darkgoldenrod;\n}\n\n.imo-dev-lib-override {\n background-color: lightpink;\n}\n\n.imo-overrides-table tbody tr:hover {\n cursor: pointer;\n background-color: #404040;\n}\n\n.imo-overrides-table td,\n.imo-overrides-table th {\n line-height: 18px;\n padding: 16px;\n border: 1px solid white;\n}\n\n.imo-add-new {\n margin-left: 16px;\n}\n\n.imo-clear-input {\n position: absolute;\n top: 0;\n right: 4px;\n cursor: pointer;\n display: flex;\n align-items: center;\n height: 100%;\n}\n\n.imo-modal-container {\n font-family: sans-serif;\n}\n\n.imo-modal {\n background-color: rgba(61, 70, 77, 0.6);\n position: fixed;\n width: 100vw;\n height: 100vh;\n top: 0;\n left: 0;\n z-index: 20000000;\n}\n\n.imo-list-search,\n.imo-list-container button,\n.imo-modal-container button {\n font-size: 14px;\n height: 27px;\n line-height: 27px;\n}\n\n.imo-list-search {\n line-height: 22px;\n border: none;\n padding: 5px;\n}\n");var D,A,j,L,R,q,T={},F=[],W=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function z(e,t){for(var n in t)e[n]=t[n];return e}function J(e){var t=e.parentNode;t&&t.removeChild(e)}function $(e,t,n){var r,o,i,l={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:l[i]=t[i];if(arguments.length>2&&(l.children=arguments.length>3?D.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return B(e,l,r,o,null)}function B(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++j:o};return null!=A.vnode&&A.vnode(i),i}function V(e){return e.children}function H(e,t){this.props=e,this.context=t}function G(e,t){if(null==t)return e.__?G(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?G(e):null}function X(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return X(e)}}function K(e){(!e.__d&&(e.__d=!0)&&L.push(e)&&!Q.__r++||q!==A.debounceRendering)&&((q=A.debounceRendering)||R)(Q)}function Q(){for(var e;Q.__r=L.length;)e=L.sort((function(e,t){return e.__v.__b-t.__v.__b})),L=[],e.some((function(e){var t,n,r,o,i,l;e.__d&&(i=(o=(t=e).__v).__e,(l=t.__P)&&(n=[],(r=z({},o)).__v=o.__v+1,ie(l,o,r,t.__n,void 0!==l.ownerSVGElement,null!=o.__h?[i]:null,n,null==i?G(o):i,o.__h),le(n,o),o.__e!=i&&X(o)))}))}function Y(e,t,n,r,o,i,l,a,u,s){var d,c,p,m,f,v,h,g=r&&r.__k||F,_=g.length;for(n.__k=[],d=0;d<t.length;d++)if(null!=(m=n.__k[d]=null==(m=t[d])||"boolean"==typeof m?null:"string"==typeof m||"number"==typeof m||"bigint"==typeof m?B(null,m,null,null,m):Array.isArray(m)?B(V,{children:m},null,null,null):m.__b>0?B(m.type,m.props,m.key,null,m.__v):m)){if(m.__=n,m.__b=n.__b+1,null===(p=g[d])||p&&m.key==p.key&&m.type===p.type)g[d]=void 0;else for(c=0;c<_;c++){if((p=g[c])&&m.key==p.key&&m.type===p.type){g[c]=void 0;break}p=null}ie(e,m,p=p||T,o,i,l,a,u,s),f=m.__e,(c=m.ref)&&p.ref!=c&&(h||(h=[]),p.ref&&h.push(p.ref,null,m),h.push(c,m.__c||f,m)),null!=f?(null==v&&(v=f),"function"==typeof m.type&&null!=m.__k&&m.__k===p.__k?m.__d=u=Z(m,u,e):u=ee(e,m,p,g,f,u),s||"option"!==n.type?"function"==typeof n.type&&(n.__d=u):e.value=""):u&&p.__e==u&&u.parentNode!=e&&(u=G(p))}for(n.__e=v,d=_;d--;)null!=g[d]&&("function"==typeof n.type&&null!=g[d].__e&&g[d].__e==n.__d&&(n.__d=G(r,d+1)),ue(g[d],g[d]));if(h)for(d=0;d<h.length;d++)ae(h[d],h[++d],h[++d])}function Z(e,t,n){var r,o;for(r=0;r<e.__k.length;r++)(o=e.__k[r])&&(o.__=e,t="function"==typeof o.type?Z(o,t,n):ee(n,o,o,e.__k,o.__e,t));return t}function ee(e,t,n,r,o,i){var l,a,u;if(void 0!==t.__d)l=t.__d,t.__d=void 0;else if(null==n||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),l=null;else{for(a=i,u=0;(a=a.nextSibling)&&u<r.length;u+=2)if(a==o)break e;e.insertBefore(o,i),l=i}return void 0!==l?l:o.nextSibling}function te(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||W.test(t)?n:n+"px"}function ne(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||te(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||te(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?oe:re,i):e.removeEventListener(t,i?oe:re,i);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function re(e){this.l[e.type+!1](A.event?A.event(e):e)}function oe(e){this.l[e.type+!0](A.event?A.event(e):e)}function ie(e,t,n,r,o,i,l,a,u){var s,d,c,p,m,f,v,h,g,_,y,b=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(u=n.__h,a=t.__e=n.__e,t.__h=null,i=[a]),(s=A.__b)&&s(t);try{e:if("function"==typeof b){if(h=t.props,g=(s=b.contextType)&&r[s.__c],_=s?g?g.props.value:s.__:r,n.__c?v=(d=t.__c=n.__c).__=d.__E:("prototype"in b&&b.prototype.render?t.__c=d=new b(h,_):(t.__c=d=new H(h,_),d.constructor=b,d.render=se),g&&g.sub(d),d.props=h,d.state||(d.state={}),d.context=_,d.__n=r,c=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=b.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=z({},d.__s)),z(d.__s,b.getDerivedStateFromProps(h,d.__s))),p=d.props,m=d.state,c)null==b.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==b.getDerivedStateFromProps&&h!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(h,_),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(h,d.__s,_)||t.__v===n.__v){d.props=h,d.state=d.__s,t.__v!==n.__v&&(d.__d=!1),d.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),d.__h.length&&l.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(h,d.__s,_),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,m,f)}))}d.context=_,d.props=h,d.state=d.__s,(s=A.__r)&&s(t),d.__d=!1,d.__v=t,d.__P=e,s=d.render(d.props,d.state,d.context),d.state=d.__s,null!=d.getChildContext&&(r=z(z({},r),d.getChildContext())),c||null==d.getSnapshotBeforeUpdate||(f=d.getSnapshotBeforeUpdate(p,m)),y=null!=s&&s.type===V&&null==s.key?s.props.children:s,Y(e,Array.isArray(y)?y:[y],t,n,r,o,i,l,a,u),d.base=t.__e,t.__h=null,d.__h.length&&l.push(d),v&&(d.__E=d.__=null),d.__e=!1}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,o,i,l,a){var u,s,d,c=n.props,p=t.props,m=t.type,f=0;if("svg"===m&&(o=!0),null!=i)for(;f<i.length;f++)if((u=i[f])&&(u===e||(m?u.localName==m:3==u.nodeType))){e=u,i[f]=null;break}if(null==e){if(null===m)return document.createTextNode(p);e=o?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,p.is&&p),i=null,a=!1}if(null===m)c===p||a&&e.data===p||(e.data=p);else{if(i=i&&D.call(e.childNodes),s=(c=n.props||T).dangerouslySetInnerHTML,d=p.dangerouslySetInnerHTML,!a){if(null!=i)for(c={},f=0;f<e.attributes.length;f++)c[e.attributes[f].name]=e.attributes[f].value;(d||s)&&(d&&(s&&d.__html==s.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(function(e,t,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in t||ne(e,i,null,n[i],r);for(i in t)o&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||ne(e,i,t[i],n[i],r)}(e,p,c,o,a),d)t.__k=[];else if(f=t.props.children,Y(e,Array.isArray(f)?f:[f],t,n,r,o&&"foreignObject"!==m,i,l,i?i[0]:n.__k&&G(n,0),a),null!=i)for(f=i.length;f--;)null!=i[f]&&J(i[f]);a||("value"in p&&void 0!==(f=p.value)&&(f!==e.value||"progress"===m&&!f)&&ne(e,"value",f,c.value,!1),"checked"in p&&void 0!==(f=p.checked)&&f!==e.checked&&ne(e,"checked",f,c.checked,!1))}return e}(n.__e,t,n,r,o,i,l,u);(s=A.diffed)&&s(t)}catch(e){t.__v=null,(u||null!=i)&&(t.__e=a,t.__h=!!u,i[i.indexOf(a)]=null),A.__e(e,t,n)}}function le(e,t){A.__c&&A.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){A.__e(e,t.__v)}}))}function ae(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){A.__e(e,n)}}function ue(e,t,n){var r,o;if(A.unmount&&A.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||ae(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){A.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&ue(r[o],t,"function"!=typeof e.type);n||null==e.__e||J(e.__e),e.__e=e.__d=void 0}function se(e,t,n){return this.constructor(e,n)}function de(e,t,n){var r,o,i;A.__&&A.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,i=[],ie(t,e=(!r&&n||t).__k=$(V,null,[e]),o||T,T,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?D.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r),le(i,e)}D=F.slice,A={__e:function(e,t){for(var n,r,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(e)),o=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),o=n.__d),o)return n.__E=n}catch(t){e=t}throw e}},j=0,H.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=z({},this.state),"function"==typeof e&&(e=e(z({},n),this.props)),e&&z(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),K(this))},H.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),K(this))},H.prototype.render=V,L=[],R="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Q.__r=0;var ce=function(e){i(l,e);var n=m(l);function l(){var e;t(this,l);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o(c(e=n.call.apply(n,[this].concat(i))),"getInitialOverrideUrl",(function(){var t=new RegExp("//localhost:([0-9]+)/").exec(e.props.module.overrideUrl);return t&&e.props.module.overrideUrl===window.importMapOverrides.getUrlFromPort(e.props.module.moduleName,t[1])?t[1]:e.props.module.overrideUrl?e.props.module.overrideUrl:""})),o(c(e),"state",{overrideUrl:e.getInitialOverrideUrl(),moduleName:""}),o(c(e),"inputEl",null),o(c(e),"moduleNameEl",null),o(c(e),"handleInputRef",(function(t){e.inputEl=t})),o(c(e),"handleModuleNameRef",(function(t){e.moduleNameEl=t})),o(c(e),"dialogRef",(function(t){e.dialogEl=t})),o(c(e),"handleSubmit",(function(t){t.preventDefault(),e.props.module.moduleName&&window.importMapOverrides.isDisabled(e.props.module.moduleName)&&window.importMapOverrides.enableOverride(e.props.module.moduleName),e.props.module.isNew?e.props.addNewModule(e.state.moduleName,e.state.overrideUrl):e.props.updateModuleUrl(e.state.overrideUrl)})),o(c(e),"getDerivedUrl",(function(){var t=e.props.module.isNew?e.state.moduleName:e.props.module.moduleName;return pe.test(e.state.overrideUrl)?window.importMapOverrides.getUrlFromPort(t,e.state.overrideUrl):e.state.overrideUrl})),o(c(e),"keyDown",(function(t){"Escape"===t.key&&(t.stopPropagation(),e.props.cancel())})),o(c(e),"focusFirstInput",(function(){(e.moduleNameEl||e.inputEl).select()})),o(c(e),"clearModuleName",(function(){e.setState({moduleName:""},(function(){e.focusFirstInput()}))})),o(c(e),"clearInput",(function(){e.setState({overrideUrl:""},(function(){e.focusFirstInput()}))})),e}return r(l,[{key:"componentDidMount",value:function(){this.focusFirstInput(),this.dialogEl.addEventListener("keydown",this.keyDown)}},{key:"componentDidUpdate",value:function(e,t){var n=this;this.props.module!==e.module&&this.setState({overrideUrl:this.props.module.overrideUrl||""},(function(){n.focusFirstInput()}))}},{key:"componentWillUnmount",value:function(){this.dialogEl.removeEventListener("keydown",this.keyDown)}},{key:"render",value:function(e){var t=this,n=e.module;return $("div",{className:"imo-modal-container"},$("div",{className:"imo-modal"}),$("dialog",{className:"imo-module-dialog ".concat(this.state.overrideUrl.length>0?"imo-overridden":"imo-default"),open:!0,ref:this.dialogRef},$("form",{method:"dialog",onSubmit:this.handleSubmit},$("h3",{style:{marginTop:0}},n.moduleName),$("table",null,$("tbody",null,!n.isNew&&$("tr",null,$("td",null,"Default URL:"),$("td",null,n.defaultUrl)),n.isNew&&$("tr",null,$("td",null,$("span",{id:"module-name-label"},"Module Name:")),$("td",{style:{position:"relative"}},$("input",{type:"text",tabIndex:1,value:this.state.moduleName,"aria-labelledby":"module-name-label",onInput:function(e){return t.setState({moduleName:e.target.value})},ref:this.handleModuleNameRef,required:!0}),$("div",{role:"button",tabIndex:3,className:"imo-clear-input",onClick:this.clearModuleName},$("div",null,"ⓧ")))),$("tr",null,$("td",null,$("span",{id:"override-url-label"},"Override URL:")),$("td",{style:{position:"relative"}},$("input",{ref:this.handleInputRef,type:"text",value:this.state.overrideUrl,"aria-labelledby":"override-url-label",tabIndex:2,onInput:function(e){return t.setState({overrideUrl:e.target.value})}}),$("div",{role:"button",tabIndex:4,className:"imo-clear-input",onClick:this.clearInput},$("div",null,"ⓧ")))),pe.test(this.state.overrideUrl)&&$("tr",null,$("td",null,"Derived url:"),$("td",null,this.getDerivedUrl())))),$("div",{className:"imo-dialog-actions"},$("button",{type:"button",tabIndex:5,onClick:this.props.cancel,style:{marginRight:"16px"}},"Cancel"),this.props.module.overrideUrl&&!this.props.module.disabled&&$("button",{type:"button",onClick:function(){t.props.module.disabled?window.importMapOverrides.enableOverride(t.props.module.moduleName):window.importMapOverrides.disableOverride(t.props.module.moduleName),t.props.cancel()},tabIndex:6,style:{marginRight:"16px"}},this.props.module.disabled?"Enable":"Disable"," Override"),$("button",{type:"submit",tabIndex:7,className:this.state.overrideUrl?"imo-overridden":"imo-default"},this.state.overrideUrl?"Apply override":"Reset to default")))))}}]),l}(H),pe=/^\d+$/,me=function(e){i(l,e);var n=m(l);function l(){var e;t(this,l);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o(c(e=n.call.apply(n,[this].concat(i))),"state",{url:e.props.dialogExternalMap.isNew?"":e.props.dialogExternalMap.url}),o(c(e),"inputEl",null),o(c(e),"handleSubmit",(function(t){t.preventDefault(),e.props.dialogExternalMap.isNew||window.importMapOverrides.removeExternalOverride(e.props.dialogExternalMap.url),e.state.url&&window.importMapOverrides.addExternalOverride(e.state.url),e.props.cancel()})),o(c(e),"keyDown",(function(t){"Escape"===t.key&&(t.stopPropagation(),e.props.cancel())})),e}return r(l,[{key:"componentDidMount",value:function(){this.inputEl.focus(),this.dialogEl.addEventListener("keydown",this.keyDown)}},{key:"componentWillUnmount",value:function(){this.dialogEl.removeEventListener("keydown",this.keyDown)}},{key:"render",value:function(){var e=this;return $("div",{className:"imo-modal-container"},$("div",{className:"imo-modal"}),$("dialog",{className:"imo-module-dialog",open:!0,ref:function(t){return e.dialogEl=t}},$("form",{method:"dialog",onSubmit:this.handleSubmit},$("h3",{style:{marginTop:0}},this.props.dialogExternalMap.isNew?"Add External Import Map":"Edit External Import Map"),$("div",{style:{marginBottom:"20px"}},$("label",{htmlFor:"external-importmap-url"},"URL to import map:"),$("span",{style:{position:"relative"}},$("input",{id:"external-importmap-url",type:"text",value:this.state.url,onInput:function(t){return e.setState({url:t.target.value})},ref:function(t){return e.inputEl=t},required:this.props.dialogExternalMap.isNew}),$("div",{role:"button",tabIndex:0,className:"imo-clear-input",onClick:function(){return e.setState({url:""})}},$("div",null,"ⓧ")))),$("div",{className:"imo-dialog-actions"},$("button",{type:"button",onClick:this.props.cancel,style:{marginRight:"16px"}},"Cancel"),$("button",{type:"submit",className:this.state.url?"imo-overridden":"imo-default"},this.state.url||this.props.dialogExternalMap.isNew?"Apply override":"Remove override")))))}}]),l}(H),fe=function(e){i(o,e);var n=m(o);function o(){return t(this,o),n.apply(this,arguments)}return r(o,[{key:"componentDidMount",value:function(){window.importMapOverrides.getCurrentPageMap().then(ge)}},{key:"render",value:function(){return null}}]),o}(H),ve=function(e){return e.replace(".min.js",".js")},he={react:function(e){return e.replace("production.min","development")},"react-dom":function(e){return e.replace("production.min","development")},"single-spa":function(e){return e.replace("single-spa.min.js","single-spa.dev.js")},vue:ve,"vue-router":ve,"@angular/core":ve,"@angular/common":ve,"@angular/router":ve,"@angular/platform-browser":ve};function ge(e){Object.keys(e.imports).filter((function(e){return he[e]})).forEach((function(t){window.importMapOverrides.addOverride(t,he[t](e.imports[t]))}))}function _e(){return Object.keys(window.importMapOverrides.getOverrideMap().imports).filter((function(e){return!he[e]})).length>0}var ye=function(e){i(l,e);var n=m(l);function l(){var e;t(this,l);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o(c(e=n.call.apply(n,[this].concat(i))),"state",{notOverriddenMap:{imports:{}},currentPageMap:{imports:{}},nextPageMap:{imports:{}},dialogModule:null,dialogExternalMap:null,searchVal:""}),o(c(e),"reload",(function(e){e.stopPropagation(),window.location.reload()})),o(c(e),"cancel",(function(){e.setState({dialogModule:null,dialogExternalMap:null})})),o(c(e),"updateModuleUrl",(function(t){null===(t=t||null)?window.importMapOverrides.removeOverride(e.state.dialogModule.moduleName):window.importMapOverrides.addOverride(e.state.dialogModule.moduleName,t),e.setState({dialogModule:null})})),o(c(e),"doUpdate",(function(){e.forceUpdate(),window.importMapOverrides.getNextPageMap().then((function(t){e.setState({nextPageMap:t})}))})),o(c(e),"addNewModule",(function(t,n){t&&n&&window.importMapOverrides.addOverride(t,n),e.setState({dialogModule:null})})),o(c(e),"filterModuleNames",(function(t){return!(e.state.searchVal.trim().length>0)||g(t,e.state.searchVal)})),e}return r(l,[{key:"componentDidMount",value:function(){var e=this;window.importMapOverrides.getDefaultMap().then((function(t){e.setState({notOverriddenMap:t})})),window.importMapOverrides.getCurrentPageMap().then((function(t){e.setState({currentPageMap:t})})),window.importMapOverrides.getNextPageMap().then((function(t){e.setState({nextPageMap:t})})),window.addEventListener("import-map-overrides:change",this.doUpdate),this.inputRef.focus()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("import-map-overrides:change",this.doUpdate)}},{key:"componentDidUpdate",value:function(e,t){!t.dialogModule&&this.state.dialogModule?(this.dialogContainer=document.createElement("div"),document.body.appendChild(this.dialogContainer),de($(ce,{module:this.state.dialogModule,cancel:this.cancel,updateModuleUrl:this.updateModuleUrl,addNewModule:this.addNewModule}),this.dialogContainer)):t.dialogModule&&!this.state.dialogModule&&(de(null,this.dialogContainer),this.dialogContainer.remove(),delete this.dialogContainer),!t.dialogExternalMap&&this.state.dialogExternalMap?(this.dialogContainer=document.createElement("div"),document.body.appendChild(this.dialogContainer),de($(me,{dialogExternalMap:this.state.dialogExternalMap,cancel:this.cancel}),this.dialogContainer)):t.dialogExternalMap&&!this.state.dialogExternalMap&&(de(null,this.dialogContainer),this.dialogContainer.remove(),delete this.dialogContainer)}},{key:"render",value:function(){var e=this,t=[],n=[],r=[],o=[],i=[],l=[],a=[],u=window.importMapOverrides.getOverrideMap(!0).imports,s=Object.keys(this.state.notOverriddenMap.imports),d=window.importMapOverrides.getDisabledOverrides();s.filter(this.filterModuleNames).forEach((function(s){var c={moduleName:s,defaultUrl:e.state.notOverriddenMap.imports[s],overrideUrl:u[s],disabled:g(d,s)};c.disabled?r.push(c):u[s]?e.state.currentPageMap.imports[s]===u[s]?he[s]&&he[s](e.state.currentPageMap.imports[s])===u[s]?a.push(c):t.push(c):n.push(c):e.state.notOverriddenMap.imports[s]===e.state.currentPageMap.imports[s]?o.push(c):e.state.notOverriddenMap.imports[s]===e.state.nextPageMap.imports[s]?l.push(c):i.push(c)})),Object.keys(u).filter(this.filterModuleNames).forEach((function(o){if(!g(s,o)){var i={moduleName:o,defaultUrl:null,overrideUrl:u[o],disabled:g(d,o)};i.disabled?r.push(i):e.state.currentPageMap.imports[o]===u[o]?t.push(i):n.push(i)}})),t.sort(be),o.sort(be),n.sort(be);var c=function(){var e,t=window.importMapOverrides.getExternalOverrides(),n=window.importMapOverrides.getCurrentPageExternalOverrides(),r=[],o=[],i=[],l=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=v(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw i}}}}(t);try{for(l.s();!(e=l.n()).done;){var a=e.value;g(window.importMapOverrides.invalidExternalMaps,a)?r.push(a):g(n,a)?o.push(a):i.push(a)}}catch(e){l.e(e)}finally{l.f()}return{brokenMaps:r,workingCurrentPageMaps:o,workingNextPageMaps:i}}(),p=c.brokenMaps,m=c.workingCurrentPageMaps,f=c.workingNextPageMaps;return $("div",{className:"imo-list-container"},$("div",{className:"imo-table-header-actions"},$("input",{className:"imo-list-search","aria-label":"Search modules",placeholder:"Search modules",value:this.state.searchVal,onInput:function(t){return e.setState({searchVal:t.target.value})},ref:function(t){return e.inputRef=t}}),$("div",{className:"imo-add-new"},$("button",{onClick:function(){return e.setState({dialogModule:{moduleName:"New module",isNew:!0}})}},"Add new module")),$("div",{className:"imo-add-new"},$("button",{onClick:function(){e.setState({dialogExternalMap:{url:"",isNew:!0}})}},"Add import map")),$("div",{className:"imo-add-new"},$("button",{onClick:function(){return window.importMapOverrides.resetOverrides()}},"Reset all overrides"))),$("table",{className:"imo-overrides-table"},$("thead",null,$("tr",null,$("th",null,"Module Status"),$("th",null,"Module Name"),$("th",null,"Domain"),$("th",null,"Filename"))),$("tbody",null,n.map((function(t){return $("tr",{role:"button",tabIndex:0,onClick:function(){return e.setState({dialogModule:t})},key:t.moduleName},$("td",{onClick:e.reload,role:"button",tabIndex:0},$("div",{className:"imo-status imo-next-override"}),$("div",null,"Inline Override"),$("div",{className:"imo-needs-refresh"})),$("td",null,t.moduleName),$("td",null,xe(t)),$("td",null,ke(t)))})),l.map((function(t){return $("tr",{role:"button",tabIndex:0,onClick:function(){return e.setState({dialogModule:t})},key:t.moduleName},$("td",{style:{position:"relative"}},$("div",{className:"imo-status imo-next-default"}),$("div",null,"Default"),$("div",{className:"imo-needs-refresh"})),$("td",null,t.moduleName),$("td",null,xe(t)),$("td",null,ke(t)))})),r.map((function(t){return $("tr",{role:"button",tabIndex:0,onClick:function(){return e.setState({dialogModule:t})},key:t.moduleName},$("td",null,$("div",{className:"imo-status imo-disabled-override"}),$("div",null,"Override disabled")),$("td",null,t.moduleName),$("td",null,xe(t)),$("td",null,ke(t)))})),t.map((function(t){return $("tr",{role:"button",tabIndex:0,onClick:function(){return e.setState({dialogModule:t})},key:t.moduleName},$("td",null,$("div",{className:"imo-status imo-current-override"}),$("div",null,"Inline Override")),$("td",null,t.moduleName),$("td",null,xe(t)),$("td",null,ke(t)))})),i.map((function(t){return $("tr",{role:"button",tabIndex:0,onClick:function(){return e.setState({dialogModule:t})},key:t.moduleName},$("td",null,$("div",{className:"imo-status imo-external-override"}),$("div",null,"External Override")),$("td",null,t.moduleName),$("td",null,xe(t)),$("td",null,ke(t)))})),a.map((function(t){return $("tr",{role:"button",tabIndex:0,onClick:function(){return e.setState({dialogModule:t})},key:t.moduleName,title:"Automatically use dev version of certain npm libs"},$("td",null,$("div",{className:"imo-status imo-dev-lib-override"}),$("div",null,"Dev Lib Override")),$("td",null,t.moduleName),$("td",null,xe(t)),$("td",null,ke(t)))})),o.map((function(t){return $("tr",{role:"button",tabIndex:0,onClick:function(){return e.setState({dialogModule:t})},key:t.moduleName},$("td",null,$("div",{className:"imo-status imo-default-module"}),$("div",null,"Default")),$("td",null,t.moduleName),$("td",null,xe(t)),$("td",null,ke(t)))})))),(p.length>0||m.length>0||f.length>0)&&$("table",{className:"imo-overrides-table"},$("thead",null,$("th",null,"Import Map Status"),$("th",null,"URL")),$("tbody",null,p.map((function(t){return $("tr",{role:"button",tabIndex:0,onClick:function(){return e.setState({dialogExternalMap:{isNew:!1,url:t}})},key:t},$("td",null,$("div",{className:"imo-status imo-disabled-override"}),$("div",null,"Invalid")),$("td",null,t))})),f.map((function(t){return $("tr",{role:"button",tabIndex:0,onClick:function(){return e.setState({dialogExternalMap:{isNew:!1,url:t}})},key:t},$("td",null,$("div",{className:"imo-status imo-next-override"}),$("div",null,"Pending refresh")),$("td",null,t))})),m.map((function(t){return $("tr",{role:"button",tabIndex:0,onClick:function(){return e.setState({dialogExternalMap:{isNew:!1,url:t}})},key:t},$("td",null,$("div",{className:"imo-status imo-current-override"}),$("div",null,"Override")),$("td",null,t))})))))}}]),l}(H);function be(e,t){return e.moduleName>t.moduleName}var we=document.querySelector("base")&&document.querySelector("base").href||location.origin+"/";function xe(e){var t=Me(e),n=Ee(t);return n?n.host:t}function ke(e){var t=Me(e),n=Ee(t);return n?n.pathname.slice(n.pathname.lastIndexOf("/")+1):t}function Me(e){return e.overrideUrl||e.defaultUrl}function Ee(e){try{return new URL(e,we)}catch(e){return null}}var Oe=function(e){i(l,e);var n=m(l);function l(){var e;t(this,l);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o(c(e=n.call.apply(n,[this].concat(i))),"doUpdate",(function(){return e.forceUpdate()})),o(c(e),"keydownListener",(function(t){"Escape"===t.key&&e.props.close&&e.props.close()})),e}return r(l,[{key:"componentDidMount",value:function(){window.addEventListener("keydown",this.keydownListener),window.addEventListener("import-map-overrides:change",this.doUpdate)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("keydown",this.keydownListener),window.removeEventListener("import-map-overrides:change",this.doUpdate)}},{key:"render",value:function(e){return $("div",{className:"imo-popup"},$("div",{className:"imo-header"},$("div",null,$("h1",null,"Import Map Overrides"),$("p",null,"This developer tool allows you to view and override your import maps. Start by clicking on a module that you'd like to override."," ",$("a",{target:"_blank",href:"https://github.com/joeldenning/import-map-overrides"},"See documentation for more info"),".")),$("button",{className:"imo-unstyled",onClick:e.close},"ⓧ")),$(ye,{importMapChanged:this.props.importMapChanged}))}}]),l}(H),Ne=function(e){i(l,e);var n=m(l);function l(){var e;t(this,l);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o(c(e=n.call.apply(n,[this].concat(i))),"state",{showingPopup:!1}),o(c(e),"doUpdate",(function(){return e.forceUpdate()})),o(c(e),"toggleTrigger",(function(){e.setState((function(e){return{showingPopup:!e.showingPopup}}))})),o(c(e),"importMapChanged",(function(){e.forceUpdate()})),o(c(e),"useDevLibs",(function(){var t=localStorage.getItem("import-map-overrides-dev-libs");return t?"true"===t:e.props.customElement.hasAttribute("dev-libs")})),o(c(e),"atLeastOneOverride",(function(){return e.useDevLibs()?_e():Object.keys(window.importMapOverrides.getOverrideMap().imports).length>0})),e}return r(l,[{key:"componentDidMount",value:function(){window.addEventListener("import-map-overrides:change",this.doUpdate)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("import-map-overrides:change",this.doUpdate)}},{key:"render",value:function(e,t){return e.customElement.hasAttribute("show-when-local-storage")&&"true"!==localStorage.getItem(e.customElement.getAttribute("show-when-local-storage"))?null:$("div",null,$("button",{onClick:this.toggleTrigger,className:"imo-unstyled imo-trigger ".concat(this.atLeastOneOverride()?"imo-current-override":"")},"{···}"),this.useDevLibs()&&$(fe,null),t.showingPopup&&$(Oe,{close:this.toggleTrigger,importMapChanged:this.importMapChanged}))}}]),l}(H);function Se(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(o){i(a,o);var l=m(a);function a(){return t(this,a),l.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.renderWithPreact()}},{key:"disconnectedCallback",value:function(){de(null,this),this.renderedEl=null}},{key:"attributeChangedCallback",value:function(){this.renderWithPreact()}},{key:"renderWithPreact",value:function(){this.renderedEl=de($(e,{customElement:this}),this,this.renderedEl)}}],[{key:"observedAttributes",get:function(){return n}}]),a}(d(HTMLElement))}window.customElements&&!y&&(window.customElements.define("import-map-overrides-full",Se(Ne,["show-when-local-storage"])),window.customElements.define("import-map-overrides-popup",Se(Oe)),window.customElements.define("import-map-overrides-list",Se(ye)))}();
1
+ !function(){"use strict";function e(t){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})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function s(e,t,n){return(s=u()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&a(o,n.prototype),o}).apply(null,arguments)}function d(e){var t="function"==typeof Map?new Map:void 0;return(d=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return s(e,arguments,l(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,e)})(e)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){var t=u();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?c(e):t}(this,n)}}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){a=!0,o=e}finally{try{l||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(t,n){if(Array.isArray(t)){for(var r=0;r<t.length;r++)if(t[r]===n)return!0;return!1}if("string"==typeof t)return t.indexOf(n)>=0;throw Error("Can't call includes on ".concat(e(t)))}var g,_="import-map-override:",y="import-map-overrides-disabled",b="import-map-overrides-external-maps",w="data-is-importmap-override",x="import-map-overrides-domains",k="allowlist:",M="denylist:",E=document.querySelector('meta[name="importmap-type"]'),O=document.querySelector('meta[name="'.concat(x,'"]')),N={},S=E?E.getAttribute("content"):"importmap";if(O){var C=O.getAttribute("content");C||console.warn("Invalid ".concat(x," meta element - content required."));var U=function(e){return new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e).replace("\\*",".+")).test(window.location.hostname)};0===C.indexOf(k)?g=!C.slice(k.length).split(",").some(U):0===C.indexOf(M)?g=C.slice(M.length).split(",").some(U):console.log("Invalid ".concat(x," meta content attribute - must start with ").concat(k," or ").concat(M))}else g=!1;(function(){try{return localStorage.getItem("test"),!0}catch(e){return!1}})()||(console.warn("Disabling import-map-overrides, since local storage is not readable"),g=!0),g||function(){var e,t=!!E&&E.hasAttribute("server-cookie"),n=!!E&&E.hasAttribute("server-only");window.importMapOverrides={addOverride:function(e,n){/^\d+$/g.test(n)&&(n=r.getUrlFromPort(e,n));var o=_+e;return localStorage.setItem(o,n),t&&(document.cookie="".concat(o,"=").concat(n)),i(),r.getOverrideMap()},getOverrideMap:function(){for(var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t={imports:{},scopes:{}},n=r.getDisabledOverrides(),o=function(r,o){!e&&n.indexOf(r)>=0||(t.imports[r]=o)},i=0;i<localStorage.length;i++){var l=localStorage.key(i);0===l.indexOf(_)&&o(l.slice(_.length),localStorage.getItem(l))}var a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.href;e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null}("imo",window.parent?window.parent.location.href:window.location.href);if(a){var u;try{u=JSON.parse(a)}catch(e){throw Error("Invalid importMap query param - text content must be json")}Object.keys(u.imports).forEach((function(e){o(e,u.imports[e])}))}return t},removeOverride:function(e){var n=_+e,o=null!==localStorage.getItem(n);return localStorage.removeItem(n),t&&(document.cookie="".concat(n,"=; expires=Thu, 01 Jan 1970 00:00:01 GMT;")),r.enableOverride(e),i(),o},resetOverrides:function(){return Object.keys(r.getOverrideMap(!0).imports).forEach((function(e){r.removeOverride(e)})),localStorage.removeItem(y),localStorage.removeItem(b),i(),r.getOverrideMap()},hasOverrides:function(){return Object.keys(r.getOverrideMap().imports).length>0},getUrlFromPort:function(e,t){var n=e.replace(/@/g,"").replace(/\//g,"-");return"//localhost:".concat(t,"/").concat(n,".js")},enableUI:function(){var e="import-map-overrides-full",t="show-when-local-storage",n=document.querySelector(e);n||((n=document.createElement(e)).setAttribute(t,"true"),document.body.appendChild(n));var r=n.getAttribute(t);r&&(localStorage.setItem(r,!0),n.renderWithPreact())},mergeImportMap:function(e,t){var n={imports:{},scopes:{}};for(var r in e.imports)n.imports[r]=e.imports[r];for(var o in t.imports)n.imports[o]=t.imports[o];for(var i in e.scopes)n.scopes[i]=e.scopes[i];for(var l in t.scopes)n.scopes[l]=t.scopes[l];return n},getDefaultMap:function(){return e||(e=Array.prototype.reduce.call(document.querySelectorAll('script[type="'.concat(S,'"], script[type="overridable-importmap"]')),(function(e,t){return t.hasAttribute(w)?e:(n=t.src?v(t.src):Promise.resolve(JSON.parse(t.textContent)),Promise.all([e,n]).then((function(e){var t=m(e,2),n=t[0],o=t[1];return r.mergeImportMap(n,o)})));var n}),Promise.resolve({imports:{},scopes:{}})))},getCurrentPageMap:function(){return Promise.all([r.getDefaultMap(),r.getExternalOverrideMap(r.getCurrentPageExternalOverrides())]).then((function(e){var t=m(e,2),n=t[0],o=t[1];return r.mergeImportMap(r.mergeImportMap(n,o),u)}))},getCurrentPageExternalOverrides:function(){var e=[];return document.querySelectorAll("[".concat(w,']:not([id="import-map-overrides"])')).forEach((function(t){e.push(t.src)})),e},getNextPageMap:function(){return Promise.all([r.getDefaultMap(),r.getExternalOverrideMap()]).then((function(e){var t=m(e,2),n=t[0],o=t[1];return r.mergeImportMap(r.mergeImportMap(n,o),r.getOverrideMap())}))},disableOverride:function(e){var t=r.getDisabledOverrides();return!h(t,e)&&(localStorage.setItem(y,JSON.stringify(t.concat(e))),i(),!0)},enableOverride:function(e){var t=r.getDisabledOverrides(),n=t.indexOf(e);return n>=0&&(t.splice(n,1),localStorage.setItem(y,JSON.stringify(t)),i(),!0)},getDisabledOverrides:function(){var e=localStorage.getItem(y);return e?JSON.parse(e):[]},isDisabled:function(e){return h(r.getDisabledOverrides(),e)},getExternalOverrides:function(){var e=localStorage.getItem(b);return e?JSON.parse(e).sort():[]},addExternalOverride:function(e){e=new URL(e,document.baseURI).href;var t=r.getExternalOverrides();return!h(t,e)&&(localStorage.setItem(b,JSON.stringify(t.concat(e))),i(),!0)},removeExternalOverride:function(e){var t=r.getExternalOverrides();return!!h(t,e)&&(localStorage.setItem(b,JSON.stringify(t.filter((function(t){return t!==e})))),i(),!0)},getExternalOverrideMap:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.getExternalOverrides()).reduce((function(e,t){var n=N[t]||(N[t]=v(t));return Promise.all([e,n]).then((function(e){var t=m(e,2),n=t[0],o=t[1];return r.mergeImportMap(n,o)}))}),Promise.resolve({imports:{},scopes:{}}))},isExternalMapValid:function(e){return(N[e]||(N[e]=v(e))).then((function(){return h(r.invalidExternalMaps,e)}))},invalidExternalMaps:[]};var r=window.importMapOverrides,o=!0;try{CustomEvent?new CustomEvent("a"):o=!1}catch(e){o=!1}function i(){l("change")}function l(e){setTimeout((function(){var t="import-map-overrides:".concat(e),n=o?new CustomEvent(t):document.createEvent("CustomEvent");o||n.initCustomEvent(t,!0,!0,null),window.dispatchEvent(n)}))}var a,u=r.getOverrideMap(),s=r.getExternalOverrides();if(!n){var d=document.querySelector('script[type="overridable-importmap"]');if(!(a=d)){var c=document.querySelectorAll('script[type="'.concat(S,'"]'));a=c?c[c.length-1]:null}if(d){if(d.src)throw Error('import-map-overrides: external import maps with type="overridable-importmap" are not supported');var p;try{p=JSON.parse(d.textContent)}catch(e){throw Error('Invalid <script type="overridable-importmap"> - text content must be json')}a=f(r.mergeImportMap(p,u),"import-map-overrides",a),g()}else g(),Object.keys(u.imports).length>0&&(a=f(u,"import-map-overrides",a))}function f(e,t,n){var r=document.createElement("script");return r.type=S,r.id=t,r.setAttribute(w,""),"string"==typeof e?r.src=e:r.textContent=JSON.stringify(e,null,2),n?n.insertAdjacentElement("afterend",r):document.head.appendChild(r),r}function v(e){return fetch(e).then((function(e){return e.ok?e.json().catch((function(t){return console.warn(Error("External override import map contained invalid json, at url ".concat(e.url,". ").concat(t))),r.invalidExternalMaps.push(e.url),{imports:{},scopes:{}}})):(console.warn(Error("Unable to download external override import map from url ".concat(e.url,". Server responded with status ").concat(e.status))),r.invalidExternalMaps.push(e.url),{imports:{},scopes:{}})}),(function(){return console.warn(Error("Unable to download external import map at url '".concat(e,"'"))),r.invalidExternalMaps.push(new URL(e,document.baseURI).href),{imports:{},scopes:{}}}))}function g(){s.length>0&&s.forEach((function(e,t){a=f(e,"import-map-overrides-external-".concat(t))}))}l("init")}(),function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".imo-unstyled {\n border: none;\n padding: 0;\n width: auto;\n overflow: visible;\n background: transparent;\n color: inherit;\n font: inherit;\n line-height: normal;\n cursor: pointer;\n -webkit-font-smoothing: inherit;\n -moz-osx-font-smoothing: inherit;\n -webkit-appearance: none;\n}\n\n.imo-unstyled::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n.imo-trigger {\n position: fixed;\n bottom: 0;\n right: 0;\n margin: 10px;\n border-radius: 5px;\n background-color: navajowhite;\n height: 50px;\n width: 50px;\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 18px;\n font-family: sans-serif;\n z-index: 10500;\n}\n\n.imo-popup {\n box-sizing: border-box;\n position: fixed;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 50%;\n z-index: 10000;\n background-color: black;\n color: white;\n font-family: sans-serif;\n padding: 24px;\n overflow-y: auto;\n}\n\n.imo-popup a:visited,\n.imo-popup a {\n color: white;\n}\n\n.imo-popup .imo-module-dialog {\n left: calc(50% - 200px);\n}\n\n.imo-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n}\n\n.imo-list {\n margin-left: 16px;\n}\n\n.imo-list > *:not(:last-child) {\n margin-bottom: 8px;\n}\n\n.imo-list-container *,\n.imo-modal-container * {\n font-family: sans-serif;\n box-sizing: border-box;\n}\n\n.imo-module-dialog {\n position: fixed;\n z-index: 30000000;\n top: 30%;\n max-width: 600px;\n margin: 0 auto;\n border: 4px solid navajowhite;\n background-color: white;\n padding: 1em;\n left: 50%;\n right: auto;\n transform: translateX(-50%);\n}\n\n.imo-module-dialog input {\n width: 100%;\n font-size: 16px;\n box-sizing: border-box;\n padding-right: 20px;\n}\n\n.imo-module-dialog table {\n margin-bottom: 16px;\n}\n\n.imo-module-dialog table td:first-child {\n text-align: right;\n padding-right: 16px;\n word-break: keep-all;\n}\n\n.imo-module-dialog table td {\n word-break: break-all;\n}\n\n.imo-module-dialog.imo-overridden {\n border: 4px solid salmon;\n}\n\n.imo-table-header-actions {\n display: flex;\n align-items: center;\n}\n\n.imo-overrides-table {\n border-collapse: collapse;\n margin-top: 32px;\n}\n\n.imo-overrides-table tr td:first-child {\n display: flex;\n align-items: center;\n padding-right: 32px;\n position: relative;\n}\n\n.imo-needs-refresh {\n position: absolute;\n right: 8px;\n width: 20px;\n height: 20px;\n /* base64 encoded 27F2 svg */\n background-image: url(\"data:image/svg+xml;charset=utf8,%3Csvg width='261' height='216' xmlns='http://www.w3.org/2000/svg' stroke='%23ffffff' stroke-linecap='square' stroke-miterlimit='10' shape-rendering='auto' stroke-opacity='1' fill='%23ffffff' stroke-dasharray='none' stroke-width='1' stroke-linejoin='miter' stroke-dashoffset='0'%3E%3Cg%3E%3Cpath fill='%23ffffff' d='m152.5625,214.0625q-27.5625,0 -49.6406,-11.8125q-22.0781,-11.8125 -34.7344,-28.4062l12.6563,-11.5313q10.6874,15.1875 31.0781,25.0313q20.3906,9.8437 40.6406,9.8437q21.375,0 44.1563,-11.5313q22.7812,-11.5312 34.3124,-34.3124q11.5313,-22.7813 11.5313,-44.1563q0,-21.375 -11.5313,-44.1563q-11.5312,-22.7812 -34.3124,-34.3124q-22.7813,-11.5313 -44.1563,-11.5313q-19.9687,0 -39.6563,9.1406q-19.6874,9.1407 -30.9374,24.1875q-11.25,15.0469 -16.7344,35.7188l42.3281,-34.7344l-54,91.6875l-54,-91.6875l47.25,38.8125q3.9375,-24.4687 17.4375,-44.5781q13.5,-20.1094 36.9844,-32.7656q23.4844,-12.6563 51.3281,-12.6563q29.25,0 54,14.0625q24.75,14.0625 38.8125,38.8125q14.0625,24.75 14.0625,54q0,29.25 -14.0625,54q-14.0625,24.75 -38.8125,38.8125q-24.75,14.0625 -54,14.0625z' /%3E%3C/g%3E%3C/svg%3E\");\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n}\n\n.imo-status {\n height: 16px;\n width: 16px;\n border-radius: 8px;\n border: 1px solid white;\n margin-right: 8px;\n}\n\n.imo-disabled-override {\n background-color: lightblue;\n}\n\n.imo-next-override {\n background-color: darkred;\n}\n\n.imo-current-override {\n background-color: salmon;\n}\n\n.imo-default-module {\n background-color: lightgoldenrodyellow;\n}\n\n.imo-external-override {\n background-color: orange;\n}\n\n.imo-next-default {\n background-color: darkgoldenrod;\n}\n\n.imo-dev-lib-override {\n background-color: lightpink;\n}\n\n.imo-overrides-table tbody tr:hover {\n cursor: pointer;\n background-color: #404040;\n}\n\n.imo-overrides-table td,\n.imo-overrides-table th {\n line-height: 18px;\n padding: 16px;\n border: 1px solid white;\n}\n\n.imo-add-new {\n margin-left: 16px;\n}\n\n.imo-clear-input {\n position: absolute;\n top: 0;\n right: 4px;\n cursor: pointer;\n display: flex;\n align-items: center;\n height: 100%;\n}\n\n.imo-modal-container {\n font-family: sans-serif;\n}\n\n.imo-modal {\n background-color: rgba(61, 70, 77, 0.6);\n position: fixed;\n width: 100vw;\n height: 100vh;\n top: 0;\n left: 0;\n z-index: 20000000;\n}\n\n.imo-list-search,\n.imo-list-container button,\n.imo-modal-container button {\n font-size: 14px;\n height: 27px;\n line-height: 27px;\n}\n\n.imo-list-search {\n line-height: 22px;\n border: none;\n padding: 5px;\n}\n");var I,P,D,A,j,L,R={},q=[],T=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function F(e,t){for(var n in t)e[n]=t[n];return e}function W(e){var t=e.parentNode;t&&t.removeChild(e)}function z(e,t,n){var r,o,i,l={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:l[i]=t[i];if(arguments.length>2&&(l.children=arguments.length>3?I.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return J(e,l,r,o,null)}function J(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++D:o};return null!=P.vnode&&P.vnode(i),i}function $(e){return e.children}function B(e,t){this.props=e,this.context=t}function V(e,t){if(null==t)return e.__?V(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?V(e):null}function H(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return H(e)}}function G(e){(!e.__d&&(e.__d=!0)&&A.push(e)&&!X.__r++||L!==P.debounceRendering)&&((L=P.debounceRendering)||j)(X)}function X(){for(var e;X.__r=A.length;)e=A.sort((function(e,t){return e.__v.__b-t.__v.__b})),A=[],e.some((function(e){var t,n,r,o,i,l;e.__d&&(i=(o=(t=e).__v).__e,(l=t.__P)&&(n=[],(r=F({},o)).__v=o.__v+1,re(l,o,r,t.__n,void 0!==l.ownerSVGElement,null!=o.__h?[i]:null,n,null==i?V(o):i,o.__h),oe(n,o),o.__e!=i&&H(o)))}))}function K(e,t,n,r,o,i,l,a,u,s){var d,c,p,m,f,v,h,g=r&&r.__k||q,_=g.length;for(n.__k=[],d=0;d<t.length;d++)if(null!=(m=n.__k[d]=null==(m=t[d])||"boolean"==typeof m?null:"string"==typeof m||"number"==typeof m||"bigint"==typeof m?J(null,m,null,null,m):Array.isArray(m)?J($,{children:m},null,null,null):m.__b>0?J(m.type,m.props,m.key,null,m.__v):m)){if(m.__=n,m.__b=n.__b+1,null===(p=g[d])||p&&m.key==p.key&&m.type===p.type)g[d]=void 0;else for(c=0;c<_;c++){if((p=g[c])&&m.key==p.key&&m.type===p.type){g[c]=void 0;break}p=null}re(e,m,p=p||R,o,i,l,a,u,s),f=m.__e,(c=m.ref)&&p.ref!=c&&(h||(h=[]),p.ref&&h.push(p.ref,null,m),h.push(c,m.__c||f,m)),null!=f?(null==v&&(v=f),"function"==typeof m.type&&null!=m.__k&&m.__k===p.__k?m.__d=u=Q(m,u,e):u=Y(e,m,p,g,f,u),s||"option"!==n.type?"function"==typeof n.type&&(n.__d=u):e.value=""):u&&p.__e==u&&u.parentNode!=e&&(u=V(p))}for(n.__e=v,d=_;d--;)null!=g[d]&&("function"==typeof n.type&&null!=g[d].__e&&g[d].__e==n.__d&&(n.__d=V(r,d+1)),le(g[d],g[d]));if(h)for(d=0;d<h.length;d++)ie(h[d],h[++d],h[++d])}function Q(e,t,n){var r,o;for(r=0;r<e.__k.length;r++)(o=e.__k[r])&&(o.__=e,t="function"==typeof o.type?Q(o,t,n):Y(n,o,o,e.__k,o.__e,t));return t}function Y(e,t,n,r,o,i){var l,a,u;if(void 0!==t.__d)l=t.__d,t.__d=void 0;else if(null==n||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),l=null;else{for(a=i,u=0;(a=a.nextSibling)&&u<r.length;u+=2)if(a==o)break e;e.insertBefore(o,i),l=i}return void 0!==l?l:o.nextSibling}function Z(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||T.test(t)?n:n+"px"}function ee(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Z(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Z(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?ne:te,i):e.removeEventListener(t,i?ne:te,i);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function te(e){this.l[e.type+!1](P.event?P.event(e):e)}function ne(e){this.l[e.type+!0](P.event?P.event(e):e)}function re(e,t,n,r,o,i,l,a,u){var s,d,c,p,m,f,v,h,g,_,y,b=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(u=n.__h,a=t.__e=n.__e,t.__h=null,i=[a]),(s=P.__b)&&s(t);try{e:if("function"==typeof b){if(h=t.props,g=(s=b.contextType)&&r[s.__c],_=s?g?g.props.value:s.__:r,n.__c?v=(d=t.__c=n.__c).__=d.__E:("prototype"in b&&b.prototype.render?t.__c=d=new b(h,_):(t.__c=d=new B(h,_),d.constructor=b,d.render=ae),g&&g.sub(d),d.props=h,d.state||(d.state={}),d.context=_,d.__n=r,c=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=b.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=F({},d.__s)),F(d.__s,b.getDerivedStateFromProps(h,d.__s))),p=d.props,m=d.state,c)null==b.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==b.getDerivedStateFromProps&&h!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(h,_),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(h,d.__s,_)||t.__v===n.__v){d.props=h,d.state=d.__s,t.__v!==n.__v&&(d.__d=!1),d.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),d.__h.length&&l.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(h,d.__s,_),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,m,f)}))}d.context=_,d.props=h,d.state=d.__s,(s=P.__r)&&s(t),d.__d=!1,d.__v=t,d.__P=e,s=d.render(d.props,d.state,d.context),d.state=d.__s,null!=d.getChildContext&&(r=F(F({},r),d.getChildContext())),c||null==d.getSnapshotBeforeUpdate||(f=d.getSnapshotBeforeUpdate(p,m)),y=null!=s&&s.type===$&&null==s.key?s.props.children:s,K(e,Array.isArray(y)?y:[y],t,n,r,o,i,l,a,u),d.base=t.__e,t.__h=null,d.__h.length&&l.push(d),v&&(d.__E=d.__=null),d.__e=!1}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,o,i,l,a){var u,s,d,c=n.props,p=t.props,m=t.type,f=0;if("svg"===m&&(o=!0),null!=i)for(;f<i.length;f++)if((u=i[f])&&(u===e||(m?u.localName==m:3==u.nodeType))){e=u,i[f]=null;break}if(null==e){if(null===m)return document.createTextNode(p);e=o?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,p.is&&p),i=null,a=!1}if(null===m)c===p||a&&e.data===p||(e.data=p);else{if(i=i&&I.call(e.childNodes),s=(c=n.props||R).dangerouslySetInnerHTML,d=p.dangerouslySetInnerHTML,!a){if(null!=i)for(c={},f=0;f<e.attributes.length;f++)c[e.attributes[f].name]=e.attributes[f].value;(d||s)&&(d&&(s&&d.__html==s.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(function(e,t,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in t||ee(e,i,null,n[i],r);for(i in t)o&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||ee(e,i,t[i],n[i],r)}(e,p,c,o,a),d)t.__k=[];else if(f=t.props.children,K(e,Array.isArray(f)?f:[f],t,n,r,o&&"foreignObject"!==m,i,l,i?i[0]:n.__k&&V(n,0),a),null!=i)for(f=i.length;f--;)null!=i[f]&&W(i[f]);a||("value"in p&&void 0!==(f=p.value)&&(f!==e.value||"progress"===m&&!f)&&ee(e,"value",f,c.value,!1),"checked"in p&&void 0!==(f=p.checked)&&f!==e.checked&&ee(e,"checked",f,c.checked,!1))}return e}(n.__e,t,n,r,o,i,l,u);(s=P.diffed)&&s(t)}catch(e){t.__v=null,(u||null!=i)&&(t.__e=a,t.__h=!!u,i[i.indexOf(a)]=null),P.__e(e,t,n)}}function oe(e,t){P.__c&&P.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){P.__e(e,t.__v)}}))}function ie(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){P.__e(e,n)}}function le(e,t,n){var r,o;if(P.unmount&&P.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||ie(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){P.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&le(r[o],t,"function"!=typeof e.type);n||null==e.__e||W(e.__e),e.__e=e.__d=void 0}function ae(e,t,n){return this.constructor(e,n)}function ue(e,t,n){var r,o,i;P.__&&P.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,i=[],re(t,e=(!r&&n||t).__k=z($,null,[e]),o||R,R,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?I.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r),oe(i,e)}I=q.slice,P={__e:function(e,t){for(var n,r,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(e)),o=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),o=n.__d),o)return n.__E=n}catch(t){e=t}throw e}},D=0,B.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=F({},this.state),"function"==typeof e&&(e=e(F({},n),this.props)),e&&F(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),G(this))},B.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),G(this))},B.prototype.render=$,A=[],j="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,X.__r=0;var se=function(e){i(l,e);var n=p(l);function l(){var e;t(this,l);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o(c(e=n.call.apply(n,[this].concat(i))),"getInitialOverrideUrl",(function(){var t=new RegExp("//localhost:([0-9]+)/").exec(e.props.module.overrideUrl);return t&&e.props.module.overrideUrl===window.importMapOverrides.getUrlFromPort(e.props.module.moduleName,t[1])?t[1]:e.props.module.overrideUrl?e.props.module.overrideUrl:""})),o(c(e),"state",{overrideUrl:e.getInitialOverrideUrl(),moduleName:""}),o(c(e),"inputEl",null),o(c(e),"moduleNameEl",null),o(c(e),"handleInputRef",(function(t){e.inputEl=t})),o(c(e),"handleModuleNameRef",(function(t){e.moduleNameEl=t})),o(c(e),"dialogRef",(function(t){e.dialogEl=t})),o(c(e),"handleSubmit",(function(t){t.preventDefault(),e.props.module.moduleName&&window.importMapOverrides.isDisabled(e.props.module.moduleName)&&window.importMapOverrides.enableOverride(e.props.module.moduleName),e.props.module.isNew?e.props.addNewModule(e.state.moduleName,e.state.overrideUrl):e.props.updateModuleUrl(e.state.overrideUrl)})),o(c(e),"getDerivedUrl",(function(){var t=e.props.module.isNew?e.state.moduleName:e.props.module.moduleName;return de.test(e.state.overrideUrl)?window.importMapOverrides.getUrlFromPort(t,e.state.overrideUrl):e.state.overrideUrl})),o(c(e),"keyDown",(function(t){"Escape"===t.key&&(t.stopPropagation(),e.props.cancel())})),o(c(e),"focusFirstInput",(function(){(e.moduleNameEl||e.inputEl).select()})),o(c(e),"clearModuleName",(function(){e.setState({moduleName:""},(function(){e.focusFirstInput()}))})),o(c(e),"clearInput",(function(){e.setState({overrideUrl:""},(function(){e.focusFirstInput()}))})),e}return r(l,[{key:"componentDidMount",value:function(){this.focusFirstInput(),this.dialogEl.addEventListener("keydown",this.keyDown)}},{key:"componentDidUpdate",value:function(e,t){var n=this;this.props.module!==e.module&&this.setState({overrideUrl:this.props.module.overrideUrl||""},(function(){n.focusFirstInput()}))}},{key:"componentWillUnmount",value:function(){this.dialogEl.removeEventListener("keydown",this.keyDown)}},{key:"render",value:function(e){var t=this,n=e.module;return z("div",{className:"imo-modal-container"},z("div",{className:"imo-modal"}),z("dialog",{className:"imo-module-dialog ".concat(this.state.overrideUrl.length>0?"imo-overridden":"imo-default"),open:!0,ref:this.dialogRef},z("form",{method:"dialog",onSubmit:this.handleSubmit},z("h3",{style:{marginTop:0}},n.moduleName),z("table",null,z("tbody",null,!n.isNew&&z("tr",null,z("td",null,"Default URL:"),z("td",null,n.defaultUrl)),n.isNew&&z("tr",null,z("td",null,z("span",{id:"module-name-label"},"Module Name:")),z("td",{style:{position:"relative"}},z("input",{type:"text",tabIndex:1,value:this.state.moduleName,"aria-labelledby":"module-name-label",onInput:function(e){return t.setState({moduleName:e.target.value})},ref:this.handleModuleNameRef,required:!0}),z("div",{role:"button",tabIndex:3,className:"imo-clear-input",onClick:this.clearModuleName},z("div",null,"ⓧ")))),z("tr",null,z("td",null,z("span",{id:"override-url-label"},"Override URL:")),z("td",{style:{position:"relative"}},z("input",{ref:this.handleInputRef,type:"text",value:this.state.overrideUrl,"aria-labelledby":"override-url-label",tabIndex:2,onInput:function(e){return t.setState({overrideUrl:e.target.value})}}),z("div",{role:"button",tabIndex:4,className:"imo-clear-input",onClick:this.clearInput},z("div",null,"ⓧ")))),de.test(this.state.overrideUrl)&&z("tr",null,z("td",null,"Derived url:"),z("td",null,this.getDerivedUrl())))),z("div",{className:"imo-dialog-actions"},z("button",{type:"button",tabIndex:5,onClick:this.props.cancel,style:{marginRight:"16px"}},"Cancel"),this.props.module.overrideUrl&&!this.props.module.disabled&&z("button",{type:"button",onClick:function(){t.props.module.disabled?window.importMapOverrides.enableOverride(t.props.module.moduleName):window.importMapOverrides.disableOverride(t.props.module.moduleName),t.props.cancel()},tabIndex:6,style:{marginRight:"16px"}},this.props.module.disabled?"Enable":"Disable"," Override"),z("button",{type:"submit",tabIndex:7,className:this.state.overrideUrl?"imo-overridden":"imo-default"},this.state.overrideUrl?"Apply override":"Reset to default")))))}}]),l}(B),de=/^\d+$/,ce=function(e){i(l,e);var n=p(l);function l(){var e;t(this,l);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o(c(e=n.call.apply(n,[this].concat(i))),"state",{url:e.props.dialogExternalMap.isNew?"":e.props.dialogExternalMap.url}),o(c(e),"inputEl",null),o(c(e),"handleSubmit",(function(t){t.preventDefault(),e.props.dialogExternalMap.isNew||window.importMapOverrides.removeExternalOverride(e.props.dialogExternalMap.url),e.state.url&&window.importMapOverrides.addExternalOverride(e.state.url),e.props.cancel()})),o(c(e),"keyDown",(function(t){"Escape"===t.key&&(t.stopPropagation(),e.props.cancel())})),e}return r(l,[{key:"componentDidMount",value:function(){this.inputEl.focus(),this.dialogEl.addEventListener("keydown",this.keyDown)}},{key:"componentWillUnmount",value:function(){this.dialogEl.removeEventListener("keydown",this.keyDown)}},{key:"render",value:function(){var e=this;return z("div",{className:"imo-modal-container"},z("div",{className:"imo-modal"}),z("dialog",{className:"imo-module-dialog",open:!0,ref:function(t){return e.dialogEl=t}},z("form",{method:"dialog",onSubmit:this.handleSubmit},z("h3",{style:{marginTop:0}},this.props.dialogExternalMap.isNew?"Add External Import Map":"Edit External Import Map"),z("div",{style:{marginBottom:"20px"}},z("label",{htmlFor:"external-importmap-url"},"URL to import map:"),z("span",{style:{position:"relative"}},z("input",{id:"external-importmap-url",type:"text",value:this.state.url,onInput:function(t){return e.setState({url:t.target.value})},ref:function(t){return e.inputEl=t},required:this.props.dialogExternalMap.isNew}),z("div",{role:"button",tabIndex:0,className:"imo-clear-input",onClick:function(){return e.setState({url:""})}},z("div",null,"ⓧ")))),z("div",{className:"imo-dialog-actions"},z("button",{type:"button",onClick:this.props.cancel,style:{marginRight:"16px"}},"Cancel"),z("button",{type:"submit",className:this.state.url?"imo-overridden":"imo-default"},this.state.url||this.props.dialogExternalMap.isNew?"Apply override":"Remove override")))))}}]),l}(B),pe=function(e){i(o,e);var n=p(o);function o(){return t(this,o),n.apply(this,arguments)}return r(o,[{key:"componentDidMount",value:function(){window.importMapOverrides.getCurrentPageMap().then(ve)}},{key:"render",value:function(){return null}}]),o}(B),me=function(e){return e.replace(".min.js",".js")},fe={react:function(e){return e.replace("production.min","development")},"react-dom":function(e){return e.replace("production.min","development")},"single-spa":function(e){return e.replace("single-spa.min.js","single-spa.dev.js")},vue:me,"vue-router":me,"@angular/core":me,"@angular/common":me,"@angular/router":me,"@angular/platform-browser":me};function ve(e){Object.keys(e.imports).filter((function(e){return fe[e]})).forEach((function(t){window.importMapOverrides.addOverride(t,fe[t](e.imports[t]))}))}var he=function(e){i(l,e);var n=p(l);function l(){var e;t(this,l);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o(c(e=n.call.apply(n,[this].concat(i))),"state",{notOverriddenMap:{imports:{}},currentPageMap:{imports:{}},nextPageMap:{imports:{}},dialogModule:null,dialogExternalMap:null,searchVal:""}),o(c(e),"reload",(function(e){e.stopPropagation(),window.location.reload()})),o(c(e),"cancel",(function(){e.setState({dialogModule:null,dialogExternalMap:null})})),o(c(e),"updateModuleUrl",(function(t){null===(t=t||null)?window.importMapOverrides.removeOverride(e.state.dialogModule.moduleName):window.importMapOverrides.addOverride(e.state.dialogModule.moduleName,t),e.setState({dialogModule:null})})),o(c(e),"doUpdate",(function(){e.forceUpdate(),window.importMapOverrides.getNextPageMap().then((function(t){e.setState({nextPageMap:t})}))})),o(c(e),"addNewModule",(function(t,n){t&&n&&window.importMapOverrides.addOverride(t,n),e.setState({dialogModule:null})})),o(c(e),"filterModuleNames",(function(t){return!(e.state.searchVal.trim().length>0)||h(t,e.state.searchVal)})),e}return r(l,[{key:"componentDidMount",value:function(){var e=this;window.importMapOverrides.getDefaultMap().then((function(t){e.setState({notOverriddenMap:t})})),window.importMapOverrides.getCurrentPageMap().then((function(t){e.setState({currentPageMap:t})})),window.importMapOverrides.getNextPageMap().then((function(t){e.setState({nextPageMap:t})})),window.addEventListener("import-map-overrides:change",this.doUpdate),this.inputRef.focus()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("import-map-overrides:change",this.doUpdate)}},{key:"componentDidUpdate",value:function(e,t){!t.dialogModule&&this.state.dialogModule?(this.dialogContainer=document.createElement("div"),document.body.appendChild(this.dialogContainer),ue(z(se,{module:this.state.dialogModule,cancel:this.cancel,updateModuleUrl:this.updateModuleUrl,addNewModule:this.addNewModule}),this.dialogContainer)):t.dialogModule&&!this.state.dialogModule&&(ue(null,this.dialogContainer),this.dialogContainer.remove(),delete this.dialogContainer),!t.dialogExternalMap&&this.state.dialogExternalMap?(this.dialogContainer=document.createElement("div"),document.body.appendChild(this.dialogContainer),ue(z(ce,{dialogExternalMap:this.state.dialogExternalMap,cancel:this.cancel}),this.dialogContainer)):t.dialogExternalMap&&!this.state.dialogExternalMap&&(ue(null,this.dialogContainer),this.dialogContainer.remove(),delete this.dialogContainer)}},{key:"render",value:function(){var e=this,t=[],n=[],r=[],o=[],i=[],l=[],a=[],u=window.importMapOverrides.getOverrideMap(!0).imports,s=Object.keys(this.state.notOverriddenMap.imports),d=window.importMapOverrides.getDisabledOverrides();s.filter(this.filterModuleNames).forEach((function(s){var c={moduleName:s,defaultUrl:e.state.notOverriddenMap.imports[s],overrideUrl:u[s],disabled:h(d,s)};c.disabled?r.push(c):u[s]?e.state.currentPageMap.imports[s]===u[s]?fe[s]&&fe[s](e.state.currentPageMap.imports[s])===u[s]?a.push(c):t.push(c):n.push(c):e.state.notOverriddenMap.imports[s]===e.state.currentPageMap.imports[s]?o.push(c):e.state.notOverriddenMap.imports[s]===e.state.nextPageMap.imports[s]?l.push(c):i.push(c)})),Object.keys(u).filter(this.filterModuleNames).forEach((function(o){if(!h(s,o)){var i={moduleName:o,defaultUrl:null,overrideUrl:u[o],disabled:h(d,o)};i.disabled?r.push(i):e.state.currentPageMap.imports[o]===u[o]?t.push(i):n.push(i)}})),t.sort(ge),o.sort(ge),n.sort(ge);var c=function(){var e,t=window.importMapOverrides.getExternalOverrides(),n=window.importMapOverrides.getCurrentPageExternalOverrides(),r=[],o=[],i=[],l=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=f(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw i}}}}(t);try{for(l.s();!(e=l.n()).done;){var a=e.value;h(window.importMapOverrides.invalidExternalMaps,a)?r.push(a):h(n,a)?o.push(a):i.push(a)}}catch(e){l.e(e)}finally{l.f()}return{brokenMaps:r,workingCurrentPageMaps:o,workingNextPageMaps:i}}(),p=c.brokenMaps,m=c.workingCurrentPageMaps,v=c.workingNextPageMaps;return z("div",{className:"imo-list-container"},z("div",{className:"imo-table-header-actions"},z("input",{className:"imo-list-search","aria-label":"Search modules",placeholder:"Search modules",value:this.state.searchVal,onInput:function(t){return e.setState({searchVal:t.target.value})},ref:function(t){return e.inputRef=t}}),z("div",{className:"imo-add-new"},z("button",{onClick:function(){return e.setState({dialogModule:{moduleName:"New module",isNew:!0}})}},"Add new module")),z("div",{className:"imo-add-new"},z("button",{onClick:function(){e.setState({dialogExternalMap:{url:"",isNew:!0}})}},"Add import map")),z("div",{className:"imo-add-new"},z("button",{onClick:function(){return window.importMapOverrides.resetOverrides()}},"Reset all overrides"))),z("table",{className:"imo-overrides-table"},z("thead",null,z("tr",null,z("th",null,"Module Status"),z("th",null,"Module Name"),z("th",null,"Domain"),z("th",null,"Filename"))),z("tbody",null,n.map((function(t){return z("tr",{role:"button",tabIndex:0,onClick:function(){return e.setState({dialogModule:t})},key:t.moduleName},z("td",{onClick:e.reload,role:"button",tabIndex:0},z("div",{className:"imo-status imo-next-override"}),z("div",null,"Inline Override"),z("div",{className:"imo-needs-refresh"})),z("td",null,t.moduleName),z("td",null,ye(t)),z("td",null,be(t)))})),l.map((function(t){return z("tr",{role:"button",tabIndex:0,onClick:function(){return e.setState({dialogModule:t})},key:t.moduleName},z("td",{style:{position:"relative"}},z("div",{className:"imo-status imo-next-default"}),z("div",null,"Default"),z("div",{className:"imo-needs-refresh"})),z("td",null,t.moduleName),z("td",null,ye(t)),z("td",null,be(t)))})),r.map((function(t){return z("tr",{role:"button",tabIndex:0,onClick:function(){return e.setState({dialogModule:t})},key:t.moduleName},z("td",null,z("div",{className:"imo-status imo-disabled-override"}),z("div",null,"Override disabled")),z("td",null,t.moduleName),z("td",null,ye(t)),z("td",null,be(t)))})),t.map((function(t){return z("tr",{role:"button",tabIndex:0,onClick:function(){return e.setState({dialogModule:t})},key:t.moduleName},z("td",null,z("div",{className:"imo-status imo-current-override"}),z("div",null,"Inline Override")),z("td",null,t.moduleName),z("td",null,ye(t)),z("td",null,be(t)))})),i.map((function(t){return z("tr",{role:"button",tabIndex:0,onClick:function(){return e.setState({dialogModule:t})},key:t.moduleName},z("td",null,z("div",{className:"imo-status imo-external-override"}),z("div",null,"External Override")),z("td",null,t.moduleName),z("td",null,ye(t)),z("td",null,be(t)))})),a.map((function(t){return z("tr",{role:"button",tabIndex:0,onClick:function(){return e.setState({dialogModule:t})},key:t.moduleName,title:"Automatically use dev version of certain npm libs"},z("td",null,z("div",{className:"imo-status imo-dev-lib-override"}),z("div",null,"Dev Lib Override")),z("td",null,t.moduleName),z("td",null,ye(t)),z("td",null,be(t)))})),o.map((function(t){return z("tr",{role:"button",tabIndex:0,onClick:function(){return e.setState({dialogModule:t})},key:t.moduleName},z("td",null,z("div",{className:"imo-status imo-default-module"}),z("div",null,"Default")),z("td",null,t.moduleName),z("td",null,ye(t)),z("td",null,be(t)))})))),(p.length>0||m.length>0||v.length>0)&&z("table",{className:"imo-overrides-table"},z("thead",null,z("th",null,"Import Map Status"),z("th",null,"URL")),z("tbody",null,p.map((function(t){return z("tr",{role:"button",tabIndex:0,onClick:function(){return e.setState({dialogExternalMap:{isNew:!1,url:t}})},key:t},z("td",null,z("div",{className:"imo-status imo-disabled-override"}),z("div",null,"Invalid")),z("td",null,t))})),v.map((function(t){return z("tr",{role:"button",tabIndex:0,onClick:function(){return e.setState({dialogExternalMap:{isNew:!1,url:t}})},key:t},z("td",null,z("div",{className:"imo-status imo-next-override"}),z("div",null,"Pending refresh")),z("td",null,t))})),m.map((function(t){return z("tr",{role:"button",tabIndex:0,onClick:function(){return e.setState({dialogExternalMap:{isNew:!1,url:t}})},key:t},z("td",null,z("div",{className:"imo-status imo-current-override"}),z("div",null,"Override")),z("td",null,t))})))))}}]),l}(B);function ge(e,t){return e.moduleName>t.moduleName}var _e=document.querySelector("base")&&document.querySelector("base").href||location.origin+"/";function ye(e){var t=we(e),n=xe(t);return n?n.host:t}function be(e){var t=we(e),n=xe(t);return n?n.pathname.slice(n.pathname.lastIndexOf("/")+1):t}function we(e){return e.overrideUrl||e.defaultUrl}function xe(e){try{return new URL(e,_e)}catch(e){return null}}var ke=function(e){i(l,e);var n=p(l);function l(){var e;t(this,l);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o(c(e=n.call.apply(n,[this].concat(i))),"doUpdate",(function(){return e.forceUpdate()})),o(c(e),"keydownListener",(function(t){"Escape"===t.key&&e.props.close&&e.props.close()})),e}return r(l,[{key:"componentDidMount",value:function(){window.addEventListener("keydown",this.keydownListener),window.addEventListener("import-map-overrides:change",this.doUpdate)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("keydown",this.keydownListener),window.removeEventListener("import-map-overrides:change",this.doUpdate)}},{key:"render",value:function(e){return z("div",{className:"imo-popup"},z("div",{className:"imo-header"},z("div",null,z("h1",null,"Import Map Overrides"),z("p",null,"This developer tool allows you to view and override your import maps. Start by clicking on a module that you'd like to override."," ",z("a",{target:"_blank",href:"https://github.com/joeldenning/import-map-overrides"},"See documentation for more info"),".")),z("button",{className:"imo-unstyled",onClick:e.close},"ⓧ")),z(he,{importMapChanged:this.props.importMapChanged}))}}]),l}(B),Me=function(e){i(l,e);var n=p(l);function l(){var e;t(this,l);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o(c(e=n.call.apply(n,[this].concat(i))),"state",{showingPopup:!1}),o(c(e),"doUpdate",(function(){return e.forceUpdate()})),o(c(e),"toggleTrigger",(function(){e.setState((function(e){return{showingPopup:!e.showingPopup}}))})),o(c(e),"importMapChanged",(function(){e.forceUpdate()})),o(c(e),"useDevLibs",(function(){var t=localStorage.getItem("import-map-overrides-dev-libs");return t?"true"===t:e.props.customElement.hasAttribute("dev-libs")})),o(c(e),"atLeastOneOverride",(function(){return e.useDevLibs()?Object.keys(window.importMapOverrides.getOverrideMap().imports).filter((function(e){return!fe[e]})).length>0:Object.keys(window.importMapOverrides.getOverrideMap().imports).length>0})),e}return r(l,[{key:"componentDidMount",value:function(){window.addEventListener("import-map-overrides:change",this.doUpdate)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("import-map-overrides:change",this.doUpdate)}},{key:"render",value:function(e,t){return e.customElement.hasAttribute("show-when-local-storage")&&"true"!==localStorage.getItem(e.customElement.getAttribute("show-when-local-storage"))?null:z("div",null,z("button",{onClick:this.toggleTrigger,className:"imo-unstyled imo-trigger ".concat(this.atLeastOneOverride()?"imo-current-override":"")},"{···}"),this.useDevLibs()&&z(pe,null),t.showingPopup&&z(ke,{close:this.toggleTrigger,importMapChanged:this.importMapChanged}))}}]),l}(B);function Ee(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(o){i(a,o);var l=p(a);function a(){return t(this,a),l.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.renderWithPreact()}},{key:"disconnectedCallback",value:function(){ue(null,this),this.renderedEl=null}},{key:"attributeChangedCallback",value:function(){this.renderWithPreact()}},{key:"renderWithPreact",value:function(){this.renderedEl=ue(z(e,{customElement:this}),this,this.renderedEl)}}],[{key:"observedAttributes",get:function(){return n}}]),a}(d(HTMLElement))}window.customElements&&!g&&(window.customElements.define("import-map-overrides-full",Ee(Me,["show-when-local-storage"])),window.customElements.define("import-map-overrides-popup",Ee(ke)),window.customElements.define("import-map-overrides-list",Ee(he)))}();
@@ -1 +1 @@
1
- System.register([],(function(t){"use strict";return{execute:function(){t({addErrorHandler:c,checkActivityFunctions:bt,ensureJQuerySupport:lt,getAppNames:Ot,getAppStatus:Tt,getMountedApps:yt,mountRootParcel:W,navigateToUrl:et,pathToActiveWhen:Ut,registerApplication:Pt,removeErrorHandler:s,setBootstrapMaxTime:H,setMountMaxTime:J,setUnloadMaxTime:V,setUnmountMaxTime:Q,start:Bt,triggerAppChange:Lt,unloadApplication:Nt,unregisterApplication:At});var n=Object.freeze({__proto__:null,get start(){return Bt},get ensureJQuerySupport(){return lt},get setBootstrapMaxTime(){return H},get setMountMaxTime(){return J},get setUnmountMaxTime(){return Q},get setUnloadMaxTime(){return V},get registerApplication(){return Pt},get unregisterApplication(){return At},get getMountedApps(){return yt},get getAppStatus(){return Tt},get unloadApplication(){return Nt},get checkActivityFunctions(){return bt},get getAppNames(){return Ot},get pathToActiveWhen(){return Ut},get navigateToUrl(){return et},get triggerAppChange(){return Lt},get addErrorHandler(){return c},get removeErrorHandler(){return s},get mountRootParcel(){return W},get NOT_LOADED(){return p},get LOADING_SOURCE_CODE(){return h},get NOT_BOOTSTRAPPED(){return m},get BOOTSTRAPPING(){return d},get NOT_MOUNTED(){return v},get MOUNTING(){return w},get UPDATING(){return E},get LOAD_ERROR(){return O},get MOUNTED(){return g},get UNMOUNTING(){return y},get SKIP_BECAUSE_BROKEN(){return T}});function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var o=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}).CustomEvent,i=function(){try{var t=new o("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?o:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(t,n){var e=document.createEvent("CustomEvent");return n?e.initCustomEvent(t,n.bubbles,n.cancelable,n.detail):e.initCustomEvent(t,!1,!1,void 0),e}:function(t,n){var e=document.createEventObject();return e.type=t,n?(e.bubbles=Boolean(n.bubbles),e.cancelable=Boolean(n.cancelable),e.detail=n.detail):(e.bubbles=!1,e.cancelable=!1,e.detail=void 0),e},u=[];function a(t,n,e){var r=l(t,n,e);u.length?u.forEach((function(t){return t(r)})):setTimeout((function(){throw r}))}function c(t){if("function"!=typeof t)throw Error(f(28,!1));u.push(t)}function s(t){if("function"!=typeof t)throw Error(f(29,!1));var n=!1;return u=u.filter((function(e){var r=e===t;return n=n||r,!r})),n}function f(t,n){for(var e=arguments.length,r=new Array(e>2?e-2:0),o=2;o<e;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(t,": ").concat(n?n+" ":"","See https://single-spa.js.org/error/?code=").concat(t).concat(r.length?"&arg=".concat(r.join("&arg=")):"")}function l(t,n,e){var r,o="".concat(S(n)," '").concat(A(n),"' died in status ").concat(n.status,": ");if(t instanceof Error){try{t.message=o+t.message}catch(t){}r=t}else{console.warn(f(30,!1,n.status,A(n)));try{r=Error(o+JSON.stringify(t))}catch(n){r=t}}return r.appOrParcelName=A(n),n.status=e,r}var p=t("NOT_LOADED","NOT_LOADED"),h=t("LOADING_SOURCE_CODE","LOADING_SOURCE_CODE"),m=t("NOT_BOOTSTRAPPED","NOT_BOOTSTRAPPED"),d=t("BOOTSTRAPPING","BOOTSTRAPPING"),v=t("NOT_MOUNTED","NOT_MOUNTED"),w=t("MOUNTING","MOUNTING"),g=t("MOUNTED","MOUNTED"),E=t("UPDATING","UPDATING"),y=t("UNMOUNTING","UNMOUNTING"),O=t("LOAD_ERROR","LOAD_ERROR"),T=t("SKIP_BECAUSE_BROKEN","SKIP_BECAUSE_BROKEN");function P(t){return t.status===g}function b(t){try{return t.activeWhen(window.location)}catch(n){return a(n,t,T),!1}}function A(t){return t.name}function N(t){return Boolean(t.unmountThisParcel)}function S(t){return N(t)?"parcel":"application"}function _(){for(var t=arguments.length-1;t>0;t--)for(var n in arguments[t])"__proto__"!==n&&(arguments[t-1][n]=arguments[t][n]);return arguments[0]}function U(t,n){for(var e=0;e<t.length;e++)if(n(t[e]))return t[e];return null}function D(t){return t&&("function"==typeof t||(n=t,Array.isArray(n)&&!U(n,(function(t){return"function"!=typeof t}))));var n}function M(t,n){var e=t[n]||[];0===(e=Array.isArray(e)?e:[e]).length&&(e=[function(){return Promise.resolve()}]);var r=S(t),o=A(t);return function(t){return e.reduce((function(e,i,u){return e.then((function(){var e=i(t);return j(e)?e:Promise.reject(f(15,!1,r,o,n,u))}))}),Promise.resolve())}}function j(t){return t&&"function"==typeof t.then&&"function"==typeof t.catch}function L(t,n){return Promise.resolve().then((function(){return t.status!==m?t:(t.status=d,t.bootstrap?q(t,"bootstrap").then(e).catch((function(e){if(n)throw l(e,t,T);return a(e,t,T),t})):Promise.resolve().then(e))}));function e(){return t.status=v,t}}function R(t,n){return Promise.resolve().then((function(){if(t.status!==g)return t;t.status=y;var e=Object.keys(t.parcels).map((function(n){return t.parcels[n].unmountThisParcel()}));return Promise.all(e).then(r,(function(e){return r().then((function(){var r=Error(e.message);if(n)throw l(r,t,T);a(r,t,T)}))})).then((function(){return t}));function r(){return q(t,"unmount").then((function(){t.status=v})).catch((function(e){if(n)throw l(e,t,T);a(e,t,T)}))}}))}var I=!1,x=!1;function B(t,n){return Promise.resolve().then((function(){return t.status!==v?t:(I||(window.dispatchEvent(new i("single-spa:before-first-mount")),I=!0),q(t,"mount").then((function(){return t.status=g,x||(window.dispatchEvent(new i("single-spa:first-mount")),x=!0),t})).catch((function(e){return t.status=g,R(t,!0).then(r,r);function r(){if(n)throw l(e,t,T);return a(e,t,T),t}})))}))}var G=0,C={parcels:{}};function W(){return $.apply(C,arguments)}function $(t,n){var r=this;if(!t||"object"!==e(t)&&"function"!=typeof t)throw Error(f(2,!1));if(t.name&&"string"!=typeof t.name)throw Error(f(3,!1,e(t.name)));if("object"!==e(n))throw Error(f(4,!1,name,e(n)));if(!n.domElement)throw Error(f(5,!1,name));var o,i=G++,u="function"==typeof t,a=u?t:function(){return Promise.resolve(t)},c={id:i,parcels:{},status:u?h:m,customProps:n,parentName:A(r),unmountThisParcel:function(){return y.then((function(){if(c.status!==g)throw Error(f(6,!1,name,c.status));return R(c,!0)})).then((function(t){return c.parentName&&delete r.parcels[c.id],t})).then((function(t){return p(t),t})).catch((function(t){throw c.status=T,d(t),t}))}};r.parcels[i]=c;var s=a();if(!s||"function"!=typeof s.then)throw Error(f(7,!1));var p,d,w=(s=s.then((function(t){if(!t)throw Error(f(8,!1));var n=t.name||"parcel-".concat(i);if(Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!D(t.bootstrap))throw Error(f(9,!1,n));if(!D(t.mount))throw Error(f(10,!1,n));if(!D(t.unmount))throw Error(f(11,!1,n));if(t.update&&!D(t.update))throw Error(f(12,!1,n));var e=M(t,"bootstrap"),r=M(t,"mount"),u=M(t,"unmount");c.status=m,c.name=n,c.bootstrap=e,c.mount=r,c.unmount=u,c.timeouts=z(t.timeouts),t.update&&(c.update=M(t,"update"),o.update=function(t){return c.customProps=t,k(function(t){return Promise.resolve().then((function(){if(t.status!==g)throw Error(f(32,!1,A(t)));return t.status=E,q(t,"update").then((function(){return t.status=g,t})).catch((function(n){throw l(n,t,T)}))}))}(c))})}))).then((function(){return L(c,!0)})),y=w.then((function(){return B(c,!0)})),O=new Promise((function(t,n){p=t,d=n}));return o={mount:function(){return k(Promise.resolve().then((function(){if(c.status!==v)throw Error(f(13,!1,name,c.status));return r.parcels[i]=c,B(c)})))},unmount:function(){return k(c.unmountThisParcel())},getStatus:function(){return c.status},loadPromise:k(s),bootstrapPromise:k(w),mountPromise:k(y),unmountPromise:k(O)}}function k(t){return t.then((function(){return null}))}function K(t){var r=A(t),o="function"==typeof t.customProps?t.customProps(r,window.location):t.customProps;("object"!==e(o)||null===o||Array.isArray(o))&&(o={},console.warn(f(40,!1),r,o));var i=_({},o,{name:r,mountParcel:$.bind(t),singleSpa:n});return N(t)&&(i.unmountSelf=t.unmountThisParcel),i}var F={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function H(t,n,e){if("number"!=typeof t||t<=0)throw Error(f(16,!1));F.bootstrap={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function J(t,n,e){if("number"!=typeof t||t<=0)throw Error(f(17,!1));F.mount={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function Q(t,n,e){if("number"!=typeof t||t<=0)throw Error(f(18,!1));F.unmount={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function V(t,n,e){if("number"!=typeof t||t<=0)throw Error(f(19,!1));F.unload={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function q(t,n){var e=t.timeouts[n],r=e.warningMillis,o=S(t);return new Promise((function(i,u){var a=!1,c=!1;t[n](K(t)).then((function(t){a=!0,i(t)})).catch((function(t){a=!0,u(t)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),e.millis);var s=f(31,!1,n,o,A(t),e.millis);function l(t){if(!a)if(!0===t)c=!0,e.dieOnTimeout?u(Error(s)):console.error(s);else if(!c){var n=t,o=n*r;console.warn(s),o+r<e.millis&&setTimeout((function(){return l(n+1)}),r)}}}))}function z(t){var n={};for(var e in F)n[e]=_({},F[e],t&&t[e]||{});return n}function X(t){return Promise.resolve().then((function(){return t.loadPromise?t.loadPromise:t.status!==p&&t.status!==O?t:(t.status=h,t.loadPromise=Promise.resolve().then((function(){var o=t.loadApp(K(t));if(!j(o))throw r=!0,Error(f(33,!1,A(t)));return o.then((function(r){var o;t.loadErrorTime=null,"object"!==e(n=r)&&(o=34),Object.prototype.hasOwnProperty.call(n,"bootstrap")&&!D(n.bootstrap)&&(o=35),D(n.mount)||(o=36),D(n.unmount)||(o=37);var i=S(n);if(o){var u;try{u=JSON.stringify(n)}catch(t){}return console.error(f(o,!1,i,A(t),u),n),a(void 0,t,T),t}return n.devtools&&n.devtools.overlays&&(t.devtools.overlays=_({},t.devtools.overlays,n.devtools.overlays)),t.status=m,t.bootstrap=M(n,"bootstrap"),t.mount=M(n,"mount"),t.unmount=M(n,"unmount"),t.unload=M(n,"unload"),t.timeouts=z(n.timeouts),delete t.loadPromise,t}))})).catch((function(n){var e;return delete t.loadPromise,r?e=T:(e=O,t.loadErrorTime=(new Date).getTime()),a(n,t,e),t})));var n,r}))}var Y,Z="undefined"!=typeof window,tt={hashchange:[],popstate:[]},nt=["hashchange","popstate"];function et(t){var n;if("string"==typeof t)n=t;else if(this&&this.href)n=this.href;else{if(!(t&&t.currentTarget&&t.currentTarget.href&&t.preventDefault))throw Error(f(14,!1));n=t.currentTarget.href,t.preventDefault()}var e=st(window.location.href),r=st(n);0===n.indexOf("#")?window.location.hash=r.hash:e.host!==r.host&&r.host?window.location.href=n:r.pathname===e.pathname&&r.search===e.search?window.location.hash=r.hash:window.history.pushState(null,null,n)}function rt(t){var n=this;if(t){var e=t[0].type;nt.indexOf(e)>=0&&tt[e].forEach((function(e){try{e.apply(n,t)}catch(t){setTimeout((function(){throw t}))}}))}}function ot(){Rt([],arguments)}function it(t,n){return function(){var e=window.location.href,r=t.apply(this,arguments),o=window.location.href;return Y&&e===o||(Gt()?window.dispatchEvent(ut(window.history.state,n)):Rt([])),r}}function ut(t,n){var e;try{e=new PopStateEvent("popstate",{state:t})}catch(n){(e=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,t)}return e.singleSpa=!0,e.singleSpaTrigger=n,e}if(Z){window.addEventListener("hashchange",ot),window.addEventListener("popstate",ot);var at=window.addEventListener,ct=window.removeEventListener;window.addEventListener=function(t,n){if(!("function"==typeof n&&nt.indexOf(t)>=0)||U(tt[t],(function(t){return t===n})))return at.apply(this,arguments);tt[t].push(n)},window.removeEventListener=function(t,n){if(!("function"==typeof n&&nt.indexOf(t)>=0))return ct.apply(this,arguments);tt[t]=tt[t].filter((function(t){return t!==n}))},window.history.pushState=it(window.history.pushState,"pushState"),window.history.replaceState=it(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(f(41,!1)):window.singleSpaNavigate=et}function st(t){var n=document.createElement("a");return n.href=t,n}var ft=!1;function lt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(t||window.$&&window.$.fn&&window.$.fn.jquery&&(t=window.$),t&&!ft){var n=t.fn.on,e=t.fn.off;t.fn.on=function(t,e){return pt.call(this,n,window.addEventListener,t,e,arguments)},t.fn.off=function(t,n){return pt.call(this,e,window.removeEventListener,t,n,arguments)},ft=!0}}function pt(t,n,e,r,o){return"string"!=typeof e?t.apply(this,o):(e.split(/\s+/).forEach((function(t){nt.indexOf(t)>=0&&(n(t,r),e=e.replace(t,""))})),""===e.trim()?this:t.apply(this,o))}var ht={};function mt(t){return Promise.resolve().then((function(){var n=ht[A(t)];if(!n)return t;if(t.status===p)return dt(t,n),t;if("UNLOADING"===t.status)return n.promise.then((function(){return t}));if(t.status!==v&&t.status!==O)return t;var e=t.status===O?Promise.resolve():q(t,"unload");return t.status="UNLOADING",e.then((function(){return dt(t,n),t})).catch((function(e){return function(t,n,e){delete ht[A(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,a(e,t,T),n.reject(e)}(t,n,e),t}))}))}function dt(t,n){delete ht[A(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,t.status=p,n.resolve()}function vt(t,n,e,r){ht[A(t)]={app:t,resolve:e,reject:r},Object.defineProperty(ht[A(t)],"promise",{get:n})}function wt(t){return ht[t]}var gt=[];function Et(){var t=[],n=[],e=[],r=[],o=(new Date).getTime();return gt.forEach((function(i){var u=i.status!==T&&b(i);switch(i.status){case O:u&&o-i.loadErrorTime>=200&&e.push(i);break;case p:case h:u&&e.push(i);break;case m:case v:!u&&wt(A(i))?t.push(i):u&&r.push(i);break;case g:u||n.push(i)}})),{appsToUnload:t,appsToUnmount:n,appsToLoad:e,appsToMount:r}}function yt(){return gt.filter(P).map(A)}function Ot(){return gt.map(A)}function Tt(t){var n=U(gt,(function(n){return A(n)===t}));return n?n.status:null}function Pt(t,n,r,o){var i=function(t,n,r,o){var i,u={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===e(t)?(function(t){if(Array.isArray(t)||null===t)throw Error(f(39,!1));var n=["name","app","activeWhen","customProps"],r=Object.keys(t).reduce((function(t,e){return n.indexOf(e)>=0?t:t.concat(e)}),[]);if(0!==r.length)throw Error(f(38,!1,n.join(", "),r.join(", ")));if("string"!=typeof t.name||0===t.name.length)throw Error(f(20,!1));if("object"!==e(t.app)&&"function"!=typeof t.app)throw Error(f(20,!1));var o=function(t){return"string"==typeof t||"function"==typeof t};if(!(o(t.activeWhen)||Array.isArray(t.activeWhen)&&t.activeWhen.every(o)))throw Error(f(24,!1));if(!_t(t.customProps))throw Error(f(22,!1))}(t),u.name=t.name,u.loadApp=t.app,u.activeWhen=t.activeWhen,u.customProps=t.customProps):(function(t,n,e,r){if("string"!=typeof t||0===t.length)throw Error(f(20,!1));if(!n)throw Error(f(23,!1));if("function"!=typeof e)throw Error(f(24,!1));if(!_t(r))throw Error(f(22,!1))}(t,n,r,o),u.name=t,u.loadApp=n,u.activeWhen=r,u.customProps=o),u.loadApp="function"!=typeof(i=u.loadApp)?function(){return Promise.resolve(i)}:i,u.customProps=function(t){return t||{}}(u.customProps),u.activeWhen=function(t){var n=Array.isArray(t)?t:[t];return n=n.map((function(t){return"function"==typeof t?t:Ut(t)})),function(t){return n.some((function(n){return n(t)}))}}(u.activeWhen),u}(t,n,r,o);if(-1!==Ot().indexOf(i.name))throw Error(f(21,!1,i.name));gt.push(_({loadErrorTime:null,status:p,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},i)),Z&&(lt(),Rt())}function bt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return gt.filter((function(n){return n.activeWhen(t)})).map(A)}function At(t){if(0===gt.filter((function(n){return A(n)===t})).length)throw Error(f(25,!1,t));return Nt(t).then((function(){var n=gt.map(A).indexOf(t);gt.splice(n,1)}))}function Nt(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof t)throw Error(f(26,!1));var e=U(gt,(function(n){return A(n)===t}));if(!e)throw Error(f(27,!1,t));var r,o=wt(A(e));if(n&&n.waitForUnmount){if(o)return o.promise;var i=new Promise((function(t,n){vt(e,(function(){return i}),t,n)}));return i}return o?(r=o.promise,St(e,o.resolve,o.reject)):r=new Promise((function(t,n){vt(e,(function(){return r}),t,n),St(e,t,n)})),r}function St(t,n,e){R(t).then(mt).then((function(){n(),setTimeout((function(){Rt()}))})).catch(e)}function _t(t){return!t||"function"==typeof t||"object"===e(t)&&null!==t&&!Array.isArray(t)}function Ut(t,n){var e=function(t,n){var e=0,r=!1,o="^";"/"!==t[0]&&(t="/"+t);for(var i=0;i<t.length;i++){var u=t[i];(!r&&":"===u||r&&"/"===u)&&a(i)}return a(t.length),new RegExp(o,"i");function a(i){var u=t.slice(e,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":u,i===t.length)if(r)n&&(o+="$");else{var a=n?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(a,"$"):"".concat(o,"(/").concat(a,")?(#.*)?$")}r=!r,e=i}}(t,n);return function(t){var n=t.origin;n||(n="".concat(t.protocol,"//").concat(t.host));var r=t.href.replace(n,"").replace(t.search,"").split("?")[0];return e.test(r)}}var Dt=!1,Mt=[],jt=Z&&window.location.href;function Lt(){return Rt()}function Rt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(Dt)return new Promise((function(t,e){Mt.push({resolve:t,reject:e,eventArguments:n})}));var e,o=Et(),u=o.appsToUnload,a=o.appsToUnmount,c=o.appsToLoad,s=o.appsToMount,f=!1,l=jt,h=jt=window.location.href;return Gt()?(Dt=!0,e=u.concat(c,a,s),w()):(e=c,d());function m(){f=!0}function d(){return Promise.resolve().then((function(){var t=c.map(X);return Promise.all(t).then(y).then((function(){return[]})).catch((function(t){throw y(),t}))}))}function w(){return Promise.resolve().then((function(){if(window.dispatchEvent(new i(0===e.length?"single-spa:before-no-app-change":"single-spa:before-app-change",O(!0))),window.dispatchEvent(new i("single-spa:before-routing-event",O(!0,{cancelNavigation:m}))),f)return window.dispatchEvent(new i("single-spa:before-mount-routing-event",O(!0))),E(),void et(l);var n=u.map(mt),r=a.map(R).map((function(t){return t.then(mt)})).concat(n),o=Promise.all(r);o.then((function(){window.dispatchEvent(new i("single-spa:before-mount-routing-event",O(!0)))}));var p=c.map((function(t){return X(t).then((function(t){return It(t,o)}))})),h=s.filter((function(t){return c.indexOf(t)<0})).map((function(t){return It(t,o)}));return o.catch((function(t){throw y(),t})).then((function(){return y(),Promise.all(p.concat(h)).catch((function(n){throw t.forEach((function(t){return t.reject(n)})),n})).then(E)}))}))}function E(){var n=yt();t.forEach((function(t){return t.resolve(n)}));try{var r=0===e.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new i(r,O())),window.dispatchEvent(new i("single-spa:routing-event",O()))}catch(t){setTimeout((function(){throw t}))}if(Dt=!1,Mt.length>0){var o=Mt;Mt=[],Rt(o)}return n}function y(){t.forEach((function(t){rt(t.eventArguments)})),rt(n)}function O(){var t,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0,m={},d=(r(t={},g,[]),r(t,v,[]),r(t,p,[]),r(t,T,[]),t);o?(c.concat(s).forEach((function(t,n){E(t,g)})),u.forEach((function(t){E(t,p)})),a.forEach((function(t){E(t,v)}))):e.forEach((function(t){E(t)}));var w={detail:{newAppStatuses:m,appsByNewStatus:d,totalAppChanges:e.length,originalEvent:null==n?void 0:n[0],oldUrl:l,newUrl:h,navigationIsCanceled:f}};return i&&_(w.detail,i),w;function E(t,n){var e=A(t);n=n||Tt(e),m[e]=n,(d[n]=d[n]||[]).push(e)}}}function It(t,n){return b(t)?L(t).then((function(t){return n.then((function(){return b(t)?B(t):t}))})):n.then((function(){return t}))}var xt=!1;function Bt(t){var n;xt=!0,t&&t.urlRerouteOnly&&(n=t.urlRerouteOnly,Y=n),Z&&Rt()}function Gt(){return xt}Z&&setTimeout((function(){xt||console.warn(f(1,!1))}),5e3);var Ct={getRawAppData:function(){return[].concat(gt)},reroute:Rt,NOT_LOADED:p,toLoadPromise:X,toBootstrapPromise:L,unregisterApplication:At};Z&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Ct)}}}));
1
+ System.register([],(function(t){"use strict";return{execute:function(){t({addErrorHandler:c,checkActivityFunctions:Pt,ensureJQuerySupport:ft,getAppNames:yt,getAppStatus:Ot,getMountedApps:Et,mountRootParcel:W,navigateToUrl:et,pathToActiveWhen:_t,registerApplication:Tt,removeErrorHandler:s,setBootstrapMaxTime:H,setMountMaxTime:J,setUnloadMaxTime:V,setUnmountMaxTime:Q,start:xt,triggerAppChange:jt,unloadApplication:At,unregisterApplication:bt});var n=Object.freeze({__proto__:null,get start(){return xt},get ensureJQuerySupport(){return ft},get setBootstrapMaxTime(){return H},get setMountMaxTime(){return J},get setUnmountMaxTime(){return Q},get setUnloadMaxTime(){return V},get registerApplication(){return Tt},get unregisterApplication(){return bt},get getMountedApps(){return Et},get getAppStatus(){return Ot},get unloadApplication(){return At},get checkActivityFunctions(){return Pt},get getAppNames(){return yt},get pathToActiveWhen(){return _t},get navigateToUrl(){return et},get triggerAppChange(){return jt},get addErrorHandler(){return c},get removeErrorHandler(){return s},get mountRootParcel(){return W},get NOT_LOADED(){return p},get LOADING_SOURCE_CODE(){return h},get NOT_BOOTSTRAPPED(){return m},get BOOTSTRAPPING(){return d},get NOT_MOUNTED(){return v},get MOUNTING(){return w},get UPDATING(){return E},get LOAD_ERROR(){return O},get MOUNTED(){return g},get UNMOUNTING(){return y},get SKIP_BECAUSE_BROKEN(){return T}});function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var o=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}).CustomEvent,i=function(){try{var t=new o("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?o:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(t,n){var e=document.createEvent("CustomEvent");return n?e.initCustomEvent(t,n.bubbles,n.cancelable,n.detail):e.initCustomEvent(t,!1,!1,void 0),e}:function(t,n){var e=document.createEventObject();return e.type=t,n?(e.bubbles=Boolean(n.bubbles),e.cancelable=Boolean(n.cancelable),e.detail=n.detail):(e.bubbles=!1,e.cancelable=!1,e.detail=void 0),e},u=[];function a(t,n,e){var r=l(t,n,e);u.length?u.forEach((function(t){return t(r)})):setTimeout((function(){throw r}))}function c(t){if("function"!=typeof t)throw Error(f(28,!1));u.push(t)}function s(t){if("function"!=typeof t)throw Error(f(29,!1));var n=!1;return u=u.filter((function(e){var r=e===t;return n=n||r,!r})),n}function f(t,n){for(var e=arguments.length,r=new Array(e>2?e-2:0),o=2;o<e;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(t,": ").concat(n?n+" ":"","See https://single-spa.js.org/error/?code=").concat(t).concat(r.length?"&arg=".concat(r.join("&arg=")):"")}function l(t,n,e){var r,o="".concat(S(n)," '").concat(A(n),"' died in status ").concat(n.status,": ");if(t instanceof Error){try{t.message=o+t.message}catch(t){}r=t}else{console.warn(f(30,!1,n.status,A(n)));try{r=Error(o+JSON.stringify(t))}catch(n){r=t}}return r.appOrParcelName=A(n),n.status=e,r}var p=t("NOT_LOADED","NOT_LOADED"),h=t("LOADING_SOURCE_CODE","LOADING_SOURCE_CODE"),m=t("NOT_BOOTSTRAPPED","NOT_BOOTSTRAPPED"),d=t("BOOTSTRAPPING","BOOTSTRAPPING"),v=t("NOT_MOUNTED","NOT_MOUNTED"),w=t("MOUNTING","MOUNTING"),g=t("MOUNTED","MOUNTED"),E=t("UPDATING","UPDATING"),y=t("UNMOUNTING","UNMOUNTING"),O=t("LOAD_ERROR","LOAD_ERROR"),T=t("SKIP_BECAUSE_BROKEN","SKIP_BECAUSE_BROKEN");function P(t){return t.status===g}function b(t){try{return t.activeWhen(window.location)}catch(n){return a(n,t,T),!1}}function A(t){return t.name}function N(t){return Boolean(t.unmountThisParcel)}function S(t){return N(t)?"parcel":"application"}function _(){for(var t=arguments.length-1;t>0;t--)for(var n in arguments[t])"__proto__"!==n&&(arguments[t-1][n]=arguments[t][n]);return arguments[0]}function U(t,n){for(var e=0;e<t.length;e++)if(n(t[e]))return t[e];return null}function D(t){return t&&("function"==typeof t||(n=t,Array.isArray(n)&&!U(n,(function(t){return"function"!=typeof t}))));var n}function M(t,n){var e=t[n]||[];0===(e=Array.isArray(e)?e:[e]).length&&(e=[function(){return Promise.resolve()}]);var r=S(t),o=A(t);return function(t){return e.reduce((function(e,i,u){return e.then((function(){var e=i(t);return j(e)?e:Promise.reject(f(15,!1,r,o,n,u))}))}),Promise.resolve())}}function j(t){return t&&"function"==typeof t.then&&"function"==typeof t.catch}function L(t,n){return Promise.resolve().then((function(){return t.status!==m?t:(t.status=d,t.bootstrap?q(t,"bootstrap").then(e).catch((function(e){if(n)throw l(e,t,T);return a(e,t,T),t})):Promise.resolve().then(e))}));function e(){return t.status=v,t}}function R(t,n){return Promise.resolve().then((function(){if(t.status!==g)return t;t.status=y;var e=Object.keys(t.parcels).map((function(n){return t.parcels[n].unmountThisParcel()}));return Promise.all(e).then(r,(function(e){return r().then((function(){var r=Error(e.message);if(n)throw l(r,t,T);a(r,t,T)}))})).then((function(){return t}));function r(){return q(t,"unmount").then((function(){t.status=v})).catch((function(e){if(n)throw l(e,t,T);a(e,t,T)}))}}))}var I=!1,x=!1;function B(t,n){return Promise.resolve().then((function(){return t.status!==v?t:(I||(window.dispatchEvent(new i("single-spa:before-first-mount")),I=!0),q(t,"mount").then((function(){return t.status=g,x||(window.dispatchEvent(new i("single-spa:first-mount")),x=!0),t})).catch((function(e){return t.status=g,R(t,!0).then(r,r);function r(){if(n)throw l(e,t,T);return a(e,t,T),t}})))}))}var G=0,C={parcels:{}};function W(){return $.apply(C,arguments)}function $(t,n){var r=this;if(!t||"object"!==e(t)&&"function"!=typeof t)throw Error(f(2,!1));if(t.name&&"string"!=typeof t.name)throw Error(f(3,!1,e(t.name)));if("object"!==e(n))throw Error(f(4,!1,name,e(n)));if(!n.domElement)throw Error(f(5,!1,name));var o,i=G++,u="function"==typeof t,a=u?t:function(){return Promise.resolve(t)},c={id:i,parcels:{},status:u?h:m,customProps:n,parentName:A(r),unmountThisParcel:function(){return y.then((function(){if(c.status!==g)throw Error(f(6,!1,name,c.status));return R(c,!0)})).then((function(t){return c.parentName&&delete r.parcels[c.id],t})).then((function(t){return p(t),t})).catch((function(t){throw c.status=T,d(t),t}))}};r.parcels[i]=c;var s=a();if(!s||"function"!=typeof s.then)throw Error(f(7,!1));var p,d,w=(s=s.then((function(t){if(!t)throw Error(f(8,!1));var n=t.name||"parcel-".concat(i);if(Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!D(t.bootstrap))throw Error(f(9,!1,n));if(!D(t.mount))throw Error(f(10,!1,n));if(!D(t.unmount))throw Error(f(11,!1,n));if(t.update&&!D(t.update))throw Error(f(12,!1,n));var e=M(t,"bootstrap"),r=M(t,"mount"),u=M(t,"unmount");c.status=m,c.name=n,c.bootstrap=e,c.mount=r,c.unmount=u,c.timeouts=z(t.timeouts),t.update&&(c.update=M(t,"update"),o.update=function(t){return c.customProps=t,k(function(t){return Promise.resolve().then((function(){if(t.status!==g)throw Error(f(32,!1,A(t)));return t.status=E,q(t,"update").then((function(){return t.status=g,t})).catch((function(n){throw l(n,t,T)}))}))}(c))})}))).then((function(){return L(c,!0)})),y=w.then((function(){return B(c,!0)})),O=new Promise((function(t,n){p=t,d=n}));return o={mount:function(){return k(Promise.resolve().then((function(){if(c.status!==v)throw Error(f(13,!1,name,c.status));return r.parcels[i]=c,B(c)})))},unmount:function(){return k(c.unmountThisParcel())},getStatus:function(){return c.status},loadPromise:k(s),bootstrapPromise:k(w),mountPromise:k(y),unmountPromise:k(O)}}function k(t){return t.then((function(){return null}))}function K(t){var r=A(t),o="function"==typeof t.customProps?t.customProps(r,window.location):t.customProps;("object"!==e(o)||null===o||Array.isArray(o))&&(o={},console.warn(f(40,!1),r,o));var i=_({},o,{name:r,mountParcel:$.bind(t),singleSpa:n});return N(t)&&(i.unmountSelf=t.unmountThisParcel),i}var F={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function H(t,n,e){if("number"!=typeof t||t<=0)throw Error(f(16,!1));F.bootstrap={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function J(t,n,e){if("number"!=typeof t||t<=0)throw Error(f(17,!1));F.mount={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function Q(t,n,e){if("number"!=typeof t||t<=0)throw Error(f(18,!1));F.unmount={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function V(t,n,e){if("number"!=typeof t||t<=0)throw Error(f(19,!1));F.unload={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function q(t,n){var e=t.timeouts[n],r=e.warningMillis,o=S(t);return new Promise((function(i,u){var a=!1,c=!1;t[n](K(t)).then((function(t){a=!0,i(t)})).catch((function(t){a=!0,u(t)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),e.millis);var s=f(31,!1,n,o,A(t),e.millis);function l(t){if(!a)if(!0===t)c=!0,e.dieOnTimeout?u(Error(s)):console.error(s);else if(!c){var n=t,o=n*r;console.warn(s),o+r<e.millis&&setTimeout((function(){return l(n+1)}),r)}}}))}function z(t){var n={};for(var e in F)n[e]=_({},F[e],t&&t[e]||{});return n}function X(t){return Promise.resolve().then((function(){return t.loadPromise?t.loadPromise:t.status!==p&&t.status!==O?t:(t.status=h,t.loadPromise=Promise.resolve().then((function(){var o=t.loadApp(K(t));if(!j(o))throw r=!0,Error(f(33,!1,A(t)));return o.then((function(r){var o;t.loadErrorTime=null,"object"!==e(n=r)&&(o=34),Object.prototype.hasOwnProperty.call(n,"bootstrap")&&!D(n.bootstrap)&&(o=35),D(n.mount)||(o=36),D(n.unmount)||(o=37);var i=S(n);if(o){var u;try{u=JSON.stringify(n)}catch(t){}return console.error(f(o,!1,i,A(t),u),n),a(void 0,t,T),t}return n.devtools&&n.devtools.overlays&&(t.devtools.overlays=_({},t.devtools.overlays,n.devtools.overlays)),t.status=m,t.bootstrap=M(n,"bootstrap"),t.mount=M(n,"mount"),t.unmount=M(n,"unmount"),t.unload=M(n,"unload"),t.timeouts=z(n.timeouts),delete t.loadPromise,t}))})).catch((function(n){var e;return delete t.loadPromise,r?e=T:(e=O,t.loadErrorTime=(new Date).getTime()),a(n,t,e),t})));var n,r}))}var Y,Z="undefined"!=typeof window,tt={hashchange:[],popstate:[]},nt=["hashchange","popstate"];function et(t){var n;if("string"==typeof t)n=t;else if(this&&this.href)n=this.href;else{if(!(t&&t.currentTarget&&t.currentTarget.href&&t.preventDefault))throw Error(f(14,!1));n=t.currentTarget.href,t.preventDefault()}var e=ct(window.location.href),r=ct(n);0===n.indexOf("#")?window.location.hash=r.hash:e.host!==r.host&&r.host?window.location.href=n:r.pathname===e.pathname&&r.search===e.search?window.location.hash=r.hash:window.history.pushState(null,null,n)}function rt(t){var n=this;if(t){var e=t[0].type;nt.indexOf(e)>=0&&tt[e].forEach((function(e){try{e.apply(n,t)}catch(t){setTimeout((function(){throw t}))}}))}}function ot(){Lt([],arguments)}function it(t,n){return function(){var e=window.location.href,r=t.apply(this,arguments),o=window.location.href;return Y&&e===o||(Bt()?window.dispatchEvent(function(t,n){var e;try{e=new PopStateEvent("popstate",{state:t})}catch(n){(e=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,t)}return e.singleSpa=!0,e.singleSpaTrigger=n,e}(window.history.state,n)):Lt([])),r}}if(Z){window.addEventListener("hashchange",ot),window.addEventListener("popstate",ot);var ut=window.addEventListener,at=window.removeEventListener;window.addEventListener=function(t,n){if(!("function"==typeof n&&nt.indexOf(t)>=0)||U(tt[t],(function(t){return t===n})))return ut.apply(this,arguments);tt[t].push(n)},window.removeEventListener=function(t,n){if(!("function"==typeof n&&nt.indexOf(t)>=0))return at.apply(this,arguments);tt[t]=tt[t].filter((function(t){return t!==n}))},window.history.pushState=it(window.history.pushState,"pushState"),window.history.replaceState=it(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(f(41,!1)):window.singleSpaNavigate=et}function ct(t){var n=document.createElement("a");return n.href=t,n}var st=!1;function ft(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(t||window.$&&window.$.fn&&window.$.fn.jquery&&(t=window.$),t&&!st){var n=t.fn.on,e=t.fn.off;t.fn.on=function(t,e){return lt.call(this,n,window.addEventListener,t,e,arguments)},t.fn.off=function(t,n){return lt.call(this,e,window.removeEventListener,t,n,arguments)},st=!0}}function lt(t,n,e,r,o){return"string"!=typeof e?t.apply(this,o):(e.split(/\s+/).forEach((function(t){nt.indexOf(t)>=0&&(n(t,r),e=e.replace(t,""))})),""===e.trim()?this:t.apply(this,o))}var pt={};function ht(t){return Promise.resolve().then((function(){var n=pt[A(t)];if(!n)return t;if(t.status===p)return mt(t,n),t;if("UNLOADING"===t.status)return n.promise.then((function(){return t}));if(t.status!==v&&t.status!==O)return t;var e=t.status===O?Promise.resolve():q(t,"unload");return t.status="UNLOADING",e.then((function(){return mt(t,n),t})).catch((function(e){return function(t,n,e){delete pt[A(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,a(e,t,T),n.reject(e)}(t,n,e),t}))}))}function mt(t,n){delete pt[A(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,t.status=p,n.resolve()}function dt(t,n,e,r){pt[A(t)]={app:t,resolve:e,reject:r},Object.defineProperty(pt[A(t)],"promise",{get:n})}function vt(t){return pt[t]}var wt=[];function gt(){var t=[],n=[],e=[],r=[],o=(new Date).getTime();return wt.forEach((function(i){var u=i.status!==T&&b(i);switch(i.status){case O:u&&o-i.loadErrorTime>=200&&e.push(i);break;case p:case h:u&&e.push(i);break;case m:case v:!u&&vt(A(i))?t.push(i):u&&r.push(i);break;case g:u||n.push(i)}})),{appsToUnload:t,appsToUnmount:n,appsToLoad:e,appsToMount:r}}function Et(){return wt.filter(P).map(A)}function yt(){return wt.map(A)}function Ot(t){var n=U(wt,(function(n){return A(n)===t}));return n?n.status:null}function Tt(t,n,r,o){var i=function(t,n,r,o){var i,u={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===e(t)?(function(t){if(Array.isArray(t)||null===t)throw Error(f(39,!1));var n=["name","app","activeWhen","customProps"],r=Object.keys(t).reduce((function(t,e){return n.indexOf(e)>=0?t:t.concat(e)}),[]);if(0!==r.length)throw Error(f(38,!1,n.join(", "),r.join(", ")));if("string"!=typeof t.name||0===t.name.length)throw Error(f(20,!1));if("object"!==e(t.app)&&"function"!=typeof t.app)throw Error(f(20,!1));var o=function(t){return"string"==typeof t||"function"==typeof t};if(!(o(t.activeWhen)||Array.isArray(t.activeWhen)&&t.activeWhen.every(o)))throw Error(f(24,!1));if(!St(t.customProps))throw Error(f(22,!1))}(t),u.name=t.name,u.loadApp=t.app,u.activeWhen=t.activeWhen,u.customProps=t.customProps):(function(t,n,e,r){if("string"!=typeof t||0===t.length)throw Error(f(20,!1));if(!n)throw Error(f(23,!1));if("function"!=typeof e)throw Error(f(24,!1));if(!St(r))throw Error(f(22,!1))}(t,n,r,o),u.name=t,u.loadApp=n,u.activeWhen=r,u.customProps=o),u.loadApp="function"!=typeof(i=u.loadApp)?function(){return Promise.resolve(i)}:i,u.customProps=function(t){return t||{}}(u.customProps),u.activeWhen=function(t){var n=Array.isArray(t)?t:[t];return n=n.map((function(t){return"function"==typeof t?t:_t(t)})),function(t){return n.some((function(n){return n(t)}))}}(u.activeWhen),u}(t,n,r,o);if(-1!==yt().indexOf(i.name))throw Error(f(21,!1,i.name));wt.push(_({loadErrorTime:null,status:p,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},i)),Z&&(ft(),Lt())}function Pt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return wt.filter((function(n){return n.activeWhen(t)})).map(A)}function bt(t){if(0===wt.filter((function(n){return A(n)===t})).length)throw Error(f(25,!1,t));return At(t).then((function(){var n=wt.map(A).indexOf(t);wt.splice(n,1)}))}function At(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof t)throw Error(f(26,!1));var e=U(wt,(function(n){return A(n)===t}));if(!e)throw Error(f(27,!1,t));var r,o=vt(A(e));if(n&&n.waitForUnmount){if(o)return o.promise;var i=new Promise((function(t,n){dt(e,(function(){return i}),t,n)}));return i}return o?(r=o.promise,Nt(e,o.resolve,o.reject)):r=new Promise((function(t,n){dt(e,(function(){return r}),t,n),Nt(e,t,n)})),r}function Nt(t,n,e){R(t).then(ht).then((function(){n(),setTimeout((function(){Lt()}))})).catch(e)}function St(t){return!t||"function"==typeof t||"object"===e(t)&&null!==t&&!Array.isArray(t)}function _t(t,n){var e=function(t,n){var e=0,r=!1,o="^";"/"!==t[0]&&(t="/"+t);for(var i=0;i<t.length;i++){var u=t[i];(!r&&":"===u||r&&"/"===u)&&a(i)}return a(t.length),new RegExp(o,"i");function a(i){var u=t.slice(e,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":u,i===t.length)if(r)n&&(o+="$");else{var a=n?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(a,"$"):"".concat(o,"(/").concat(a,")?(#.*)?$")}r=!r,e=i}}(t,n);return function(t){var n=t.origin;n||(n="".concat(t.protocol,"//").concat(t.host));var r=t.href.replace(n,"").replace(t.search,"").split("?")[0];return e.test(r)}}var Ut=!1,Dt=[],Mt=Z&&window.location.href;function jt(){return Lt()}function Lt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(Ut)return new Promise((function(t,e){Dt.push({resolve:t,reject:e,eventArguments:n})}));var e,o=gt(),u=o.appsToUnload,a=o.appsToUnmount,c=o.appsToLoad,s=o.appsToMount,f=!1,l=Mt,h=Mt=window.location.href;return Bt()?(Ut=!0,e=u.concat(c,a,s),Promise.resolve().then((function(){if(window.dispatchEvent(new i(0===e.length?"single-spa:before-no-app-change":"single-spa:before-app-change",E(!0))),window.dispatchEvent(new i("single-spa:before-routing-event",E(!0,{cancelNavigation:m}))),f)return window.dispatchEvent(new i("single-spa:before-mount-routing-event",E(!0))),d(),void et(l);var n=u.map(ht),r=a.map(R).map((function(t){return t.then(ht)})).concat(n),o=Promise.all(r);o.then((function(){window.dispatchEvent(new i("single-spa:before-mount-routing-event",E(!0)))}));var p=c.map((function(t){return X(t).then((function(t){return Rt(t,o)}))})),h=s.filter((function(t){return c.indexOf(t)<0})).map((function(t){return Rt(t,o)}));return o.catch((function(t){throw w(),t})).then((function(){return w(),Promise.all(p.concat(h)).catch((function(n){throw t.forEach((function(t){return t.reject(n)})),n})).then(d)}))}))):(e=c,Promise.resolve().then((function(){var t=c.map(X);return Promise.all(t).then(w).then((function(){return[]})).catch((function(t){throw w(),t}))})));function m(){f=!0}function d(){var n=Et();t.forEach((function(t){return t.resolve(n)}));try{var r=0===e.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new i(r,E())),window.dispatchEvent(new i("single-spa:routing-event",E()))}catch(t){setTimeout((function(){throw t}))}if(Ut=!1,Dt.length>0){var o=Dt;Dt=[],Lt(o)}return n}function w(){t.forEach((function(t){rt(t.eventArguments)})),rt(n)}function E(){var t,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0,m={},d=(r(t={},g,[]),r(t,v,[]),r(t,p,[]),r(t,T,[]),t);o?(c.concat(s).forEach((function(t,n){E(t,g)})),u.forEach((function(t){E(t,p)})),a.forEach((function(t){E(t,v)}))):e.forEach((function(t){E(t)}));var w={detail:{newAppStatuses:m,appsByNewStatus:d,totalAppChanges:e.length,originalEvent:null==n?void 0:n[0],oldUrl:l,newUrl:h,navigationIsCanceled:f}};return i&&_(w.detail,i),w;function E(t,n){var e=A(t);n=n||Ot(e),m[e]=n,(d[n]=d[n]||[]).push(e)}}}function Rt(t,n){return b(t)?L(t).then((function(t){return n.then((function(){return b(t)?B(t):t}))})):n.then((function(){return t}))}var It=!1;function xt(t){var n;It=!0,t&&t.urlRerouteOnly&&(n=t.urlRerouteOnly,Y=n),Z&&Lt()}function Bt(){return It}Z&&setTimeout((function(){It||console.warn(f(1,!1))}),5e3);var Gt={getRawAppData:function(){return[].concat(wt)},reroute:Lt,NOT_LOADED:p,toLoadPromise:X,toBootstrapPromise:L,unregisterApplication:bt};Z&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Gt)}}}));