cosmosc2-tool-base 5.0.2.pre.beta2.20220428133831
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +693 -0
- data/README.md +29 -0
- data/Rakefile +35 -0
- data/plugin.txt +2 -0
- data/tools/base/12f570542c7c097049a5.png +0 -0
- data/tools/base/889.cosmosc2-tool-base.js +2 -0
- data/tools/base/889.cosmosc2-tool-base.js.map +1 -0
- data/tools/base/be1eae38c4af82057c4d.png +0 -0
- data/tools/base/ccbf309d19c2c9fc40f7.png +0 -0
- data/tools/base/cosmosc2-tool-base.js +2 -0
- data/tools/base/cosmosc2-tool-base.js.map +1 -0
- data/tools/base/css/materialdesignicons-6.1.95.min.css +3 -0
- data/tools/base/css/materialdesignicons.css.map +16 -0
- data/tools/base/css/roboto.css +338 -0
- data/tools/base/css/vuetify-v2.6.4.min.css +9 -0
- data/tools/base/favicon.ico +0 -0
- data/tools/base/fonts/materialdesignicons-webfont.eot +0 -0
- data/tools/base/fonts/materialdesignicons-webfont.ttf +0 -0
- data/tools/base/fonts/materialdesignicons-webfont.woff +0 -0
- data/tools/base/fonts/materialdesignicons-webfont.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOkCnqEu92Fr1MmgVxEIzIFKw.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOkCnqEu92Fr1MmgVxFIzIFKw.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOkCnqEu92Fr1MmgVxGIzIFKw.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOkCnqEu92Fr1MmgVxHIzIFKw.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOkCnqEu92Fr1MmgVxIIzI.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOkCnqEu92Fr1MmgVxLIzIFKw.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOkCnqEu92Fr1MmgVxMIzIFKw.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmEU9fABc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmEU9fBBc4.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmEU9fBxc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmEU9fCBc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmEU9fCRc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmEU9fChc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmEU9fCxc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmSU5fABc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmSU5fBBc4.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmSU5fBxc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmSU5fCBc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmSU5fCRc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmSU5fChc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmSU5fCxc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmWUlfABc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmWUlfBBc4.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmWUlfBxc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmWUlfCBc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmWUlfCRc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmWUlfChc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmWUlfCxc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmYUtfABc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmYUtfBBc4.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmYUtfBxc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmYUtfCBc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmYUtfCRc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmYUtfChc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOlCnqEu92Fr1MmYUtfCxc4EsA.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOmCnqEu92Fr1Mu4WxKOzY.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOmCnqEu92Fr1Mu4mxK.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOmCnqEu92Fr1Mu5mxKOzY.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOmCnqEu92Fr1Mu72xKOzY.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOmCnqEu92Fr1Mu7GxKOzY.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOmCnqEu92Fr1Mu7WxKOzY.woff2 +0 -0
- data/tools/base/fonts/roboto/KFOmCnqEu92Fr1Mu7mxKOzY.woff2 +0 -0
- data/tools/base/icons/astro.svg +83 -0
- data/tools/base/icons/status-dark.png +0 -0
- data/tools/base/icons/status-light.png +0 -0
- data/tools/base/img/COSMOS_64x64.png +0 -0
- data/tools/base/img/astro-logo-small-dark.svg +13 -0
- data/tools/base/img/astro-logo-small-light.svg +13 -0
- data/tools/base/img/ground_error.gif +0 -0
- data/tools/base/img/ground_off.gif +0 -0
- data/tools/base/img/ground_on.gif +0 -0
- data/tools/base/img/icons.svg +110 -0
- data/tools/base/img/logo.png +0 -0
- data/tools/base/img/satellite.gif +0 -0
- data/tools/base/index.html +20 -0
- data/tools/base/js/amd.min.js +1 -0
- data/tools/base/js/amd.min.js.map +1 -0
- data/tools/base/js/auth.js +1 -0
- data/tools/base/js/authConstants.js +1 -0
- data/tools/base/js/import-map-overrides-2.4.1.js +1 -0
- data/tools/base/js/import-map-overrides.js.map +1 -0
- data/tools/base/js/named-register.min.js +1 -0
- data/tools/base/js/named-register.min.js.map +1 -0
- data/tools/base/js/regenerator-runtime-0.13.9.min.js +1 -0
- data/tools/base/js/single-spa-5.9.3.min.js +1 -0
- data/tools/base/js/single-spa.min.js.map +1 -0
- data/tools/base/js/system-6.12.1.min.js +1 -0
- data/tools/base/js/vue-2.6.14.min.js +2 -0
- data/tools/base/js/vue-2.6.14.min.js.LICENSE.txt +5 -0
- data/tools/base/js/vue-router-3.5.2.min.js +2 -0
- data/tools/base/js/vue-router-3.5.2.min.js.LICENSE.txt +5 -0
- data/tools/base/js/vuetify-v2.6.4.min.js +2 -0
- data/tools/base/js/vuetify-v2.6.4.min.js.LICENSE.txt +5 -0
- data/tools/base/js/vuex-3.6.2.min.js +2 -0
- data/tools/base/js/vuex-3.6.2.min.js.LICENSE.txt +5 -0
- metadata +140 -0
@@ -0,0 +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)))}();
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"import-map-overrides.js","sources":["../src/util/includes.js","../src/util/url-parameter.js","../src/api/js-api.js","../src/util/string-regex.js","../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../node_modules/.pnpm/preact@10.5.14/node_modules/preact/dist/preact.mjs","../src/ui/list/module-dialog.component.js","../src/ui/list/external-importmap-dialog.component.js","../src/ui/dev-lib-overrides.component.js","../src/ui/list/list.component.js","../src/ui/popup.component.js","../src/ui/full-ui.component.js","../src/ui/custom-elements.js"],"sourcesContent":["export function includes(obj, item) {\n if (Array.isArray(obj)) {\n for (let i = 0; i < obj.length; i++) {\n if (obj[i] === item) {\n return true;\n }\n }\n return false;\n } else if (typeof obj === \"string\") {\n return obj.indexOf(item) >= 0;\n } else {\n throw Error(`Can't call includes on ${typeof obj}`);\n }\n}\n","// https://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript\nexport function getParameterByName(name, url = window.location.href) {\n name = name.replace(/[\\[\\]]/g, \"\\\\$&\");\n var regex = new RegExp(\"[?&]\" + name + \"(=([^&#]*)|&|#|$)\"),\n results = regex.exec(url);\n if (!results) return null;\n if (!results[2]) return \"\";\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n}\n","import { escapeStringRegexp } from \"../util/string-regex\";\nimport { includes } from \"../util/includes.js\";\nimport { getParameterByName } from \"../util/url-parameter\";\n\nconst localStoragePrefix = \"import-map-override:\";\nconst disabledOverridesLocalStorageKey = \"import-map-overrides-disabled\";\nconst externalOverridesLocalStorageKey = \"import-map-overrides-external-maps\";\nconst overrideAttribute = \"data-is-importmap-override\";\nconst domainsMeta = \"import-map-overrides-domains\";\nconst allowListPrefix = \"allowlist:\";\nconst denyListPrefix = \"denylist:\";\nexport const queryParamOverridesName = \"imo\";\n\nconst importMapMetaElement = document.querySelector(\n 'meta[name=\"importmap-type\"]'\n);\n\nconst domainsElement = document.querySelector(`meta[name=\"${domainsMeta}\"]`);\n\nconst externalOverrideMapPromises = {};\n\nexport const importMapType = importMapMetaElement\n ? importMapMetaElement.getAttribute(\"content\")\n : \"importmap\";\n\nexport let isDisabled;\n\nif (domainsElement) {\n const content = domainsElement.getAttribute(\"content\");\n if (!content) {\n console.warn(`Invalid ${domainsMeta} meta element - content required.`);\n }\n\n const matchHostname = (domain) =>\n new RegExp(escapeStringRegexp(domain).replace(\"\\\\*\", \".+\")).test(\n window.location.hostname\n );\n\n if (content.indexOf(allowListPrefix) === 0) {\n const allowedDomains = content.slice(allowListPrefix.length).split(\",\");\n isDisabled = !allowedDomains.some(matchHostname);\n } else if (content.indexOf(denyListPrefix) === 0) {\n const deniedDomains = content.slice(denyListPrefix.length).split(\",\");\n isDisabled = deniedDomains.some(matchHostname);\n } else {\n // eslint-disable-next-line no-console\n console.log(\n `Invalid ${domainsMeta} meta content attribute - must start with ${allowListPrefix} or ${denyListPrefix}`\n );\n }\n} else {\n isDisabled = false;\n}\n\nif (!canAccessLocalStorage()) {\n console.warn(\n \"Disabling import-map-overrides, since local storage is not readable\"\n );\n isDisabled = true;\n}\n\nif (!isDisabled) {\n init();\n}\n\nfunction init() {\n const serverOverrides = importMapMetaElement\n ? importMapMetaElement.hasAttribute(\"server-cookie\")\n : false;\n const serverOnly = importMapMetaElement\n ? importMapMetaElement.hasAttribute(\"server-only\")\n : false;\n\n let defaultMapPromise;\n\n window.importMapOverrides = {\n addOverride(moduleName, url) {\n const portRegex = /^\\d+$/g;\n if (portRegex.test(url)) {\n url = imo.getUrlFromPort(moduleName, url);\n }\n const key = localStoragePrefix + moduleName;\n localStorage.setItem(key, url);\n if (serverOverrides) {\n document.cookie = `${key}=${url}`;\n }\n fireChangedEvent();\n return imo.getOverrideMap();\n },\n getOverrideMap(includeDisabled = false) {\n const overrides = createEmptyImportMap();\n const disabledOverrides = imo.getDisabledOverrides();\n\n const setOverride = (moduleName, path) => {\n if (includeDisabled || !(disabledOverrides.indexOf(moduleName) >= 0)) {\n overrides.imports[moduleName] = path;\n }\n };\n\n // get from localstorage\n for (let i = 0; i < localStorage.length; i++) {\n const key = localStorage.key(i);\n if (key.indexOf(localStoragePrefix) === 0) {\n setOverride(\n key.slice(localStoragePrefix.length),\n localStorage.getItem(key)\n );\n }\n }\n\n // get from url if query param exist\n const queryParam = getParameterByName(\n queryParamOverridesName,\n window.parent ? window.parent.location.href : window.location.href\n );\n\n if (queryParam) {\n let queryParamImportMap;\n try {\n queryParamImportMap = JSON.parse(queryParam);\n } catch (e) {\n throw Error(\n `Invalid importMap query param - text content must be json`\n );\n }\n Object.keys(queryParamImportMap.imports).forEach((moduleName) => {\n setOverride(moduleName, queryParamImportMap.imports[moduleName]);\n });\n }\n\n return overrides;\n },\n removeOverride(moduleName) {\n const key = localStoragePrefix + moduleName;\n const hasItem = localStorage.getItem(key) !== null;\n localStorage.removeItem(key);\n if (serverOverrides) {\n document.cookie = `${key}=; expires=Thu, 01 Jan 1970 00:00:01 GMT;`;\n }\n imo.enableOverride(moduleName);\n fireChangedEvent();\n return hasItem;\n },\n resetOverrides() {\n Object.keys(imo.getOverrideMap(true).imports).forEach((moduleName) => {\n imo.removeOverride(moduleName);\n });\n localStorage.removeItem(disabledOverridesLocalStorageKey);\n localStorage.removeItem(externalOverridesLocalStorageKey);\n fireChangedEvent();\n return imo.getOverrideMap();\n },\n hasOverrides() {\n return Object.keys(imo.getOverrideMap().imports).length > 0;\n },\n getUrlFromPort(moduleName, port) {\n const fileName = moduleName.replace(/@/g, \"\").replace(/\\//g, \"-\");\n return `//localhost:${port}/${fileName}.js`;\n },\n enableUI() {\n const customElementName = \"import-map-overrides-full\";\n const showWhenLocalStorage = \"show-when-local-storage\";\n let customElement = document.querySelector(customElementName);\n\n if (!customElement) {\n customElement = document.createElement(customElementName);\n customElement.setAttribute(showWhenLocalStorage, \"true\");\n document.body.appendChild(customElement);\n }\n\n const localStorageKey = customElement.getAttribute(showWhenLocalStorage);\n if (localStorageKey) {\n localStorage.setItem(localStorageKey, true);\n customElement.renderWithPreact();\n }\n },\n mergeImportMap(originalMap, newMap) {\n const outMap = createEmptyImportMap();\n for (let i in originalMap.imports) {\n outMap.imports[i] = originalMap.imports[i];\n }\n for (let i in newMap.imports) {\n outMap.imports[i] = newMap.imports[i];\n }\n for (let i in originalMap.scopes) {\n outMap.scopes[i] = originalMap.scopes[i];\n }\n for (let i in newMap.scopes) {\n outMap.scopes[i] = newMap.scopes[i];\n }\n return outMap;\n },\n getDefaultMap() {\n return (\n defaultMapPromise ||\n (defaultMapPromise = Array.prototype.reduce.call(\n document.querySelectorAll(\n `script[type=\"${importMapType}\"], script[type=\"overridable-importmap\"]`\n ),\n (promise, scriptEl) => {\n if (scriptEl.hasAttribute(overrideAttribute)) {\n return promise;\n } else {\n let nextPromise;\n if (scriptEl.src) {\n nextPromise = fetchExternalMap(scriptEl.src);\n } else {\n nextPromise = Promise.resolve(JSON.parse(scriptEl.textContent));\n }\n\n return Promise.all([\n promise,\n nextPromise,\n ]).then(([originalMap, newMap]) =>\n imo.mergeImportMap(originalMap, newMap)\n );\n }\n },\n Promise.resolve(createEmptyImportMap())\n ))\n );\n },\n getCurrentPageMap() {\n return Promise.all([\n imo.getDefaultMap(),\n imo.getExternalOverrideMap(imo.getCurrentPageExternalOverrides()),\n ]).then(([defaultMap, externalOverridesMap]) => {\n return imo.mergeImportMap(\n imo.mergeImportMap(defaultMap, externalOverridesMap),\n initialOverrideMap\n );\n });\n },\n getCurrentPageExternalOverrides() {\n const currentPageExternalOverrides = [];\n document\n .querySelectorAll(\n `[${overrideAttribute}]:not([id=\"import-map-overrides\"])`\n )\n .forEach((externalOverrideEl) => {\n currentPageExternalOverrides.push(externalOverrideEl.src);\n });\n return currentPageExternalOverrides;\n },\n getNextPageMap() {\n return Promise.all([\n imo.getDefaultMap(),\n imo.getExternalOverrideMap(),\n ]).then(([defaultMap, externalOverridesMap]) => {\n return imo.mergeImportMap(\n imo.mergeImportMap(defaultMap, externalOverridesMap),\n imo.getOverrideMap()\n );\n });\n },\n disableOverride(moduleName) {\n const disabledOverrides = imo.getDisabledOverrides();\n if (!includes(disabledOverrides, moduleName)) {\n localStorage.setItem(\n disabledOverridesLocalStorageKey,\n JSON.stringify(disabledOverrides.concat(moduleName))\n );\n fireChangedEvent();\n return true;\n } else {\n return false;\n }\n },\n enableOverride(moduleName) {\n const disabledOverrides = imo.getDisabledOverrides();\n const index = disabledOverrides.indexOf(moduleName);\n if (index >= 0) {\n disabledOverrides.splice(index, 1);\n localStorage.setItem(\n disabledOverridesLocalStorageKey,\n JSON.stringify(disabledOverrides)\n );\n fireChangedEvent();\n return true;\n } else {\n return false;\n }\n },\n getDisabledOverrides() {\n const disabledOverrides = localStorage.getItem(\n disabledOverridesLocalStorageKey\n );\n return disabledOverrides ? JSON.parse(disabledOverrides) : [];\n },\n isDisabled(moduleName) {\n return includes(imo.getDisabledOverrides(), moduleName);\n },\n getExternalOverrides() {\n let localStorageValue = localStorage.getItem(\n externalOverridesLocalStorageKey\n );\n return localStorageValue ? JSON.parse(localStorageValue).sort() : [];\n },\n addExternalOverride(url) {\n url = new URL(url, document.baseURI).href;\n const overrides = imo.getExternalOverrides();\n if (includes(overrides, url)) {\n return false;\n } else {\n localStorage.setItem(\n externalOverridesLocalStorageKey,\n JSON.stringify(overrides.concat(url))\n );\n fireChangedEvent();\n return true;\n }\n },\n removeExternalOverride(url) {\n const overrides = imo.getExternalOverrides();\n if (includes(overrides, url)) {\n localStorage.setItem(\n externalOverridesLocalStorageKey,\n JSON.stringify(overrides.filter((override) => override !== url))\n );\n fireChangedEvent();\n return true;\n } else {\n return false;\n }\n },\n getExternalOverrideMap(externalOverrides = imo.getExternalOverrides()) {\n return externalOverrides.reduce((result, externalOverride) => {\n const fetchPromise =\n externalOverrideMapPromises[externalOverride] ||\n (externalOverrideMapPromises[externalOverride] = fetchExternalMap(\n externalOverride\n ));\n return Promise.all([result, fetchPromise]).then(\n ([firstMap, secondMap]) => {\n return imo.mergeImportMap(firstMap, secondMap);\n }\n );\n }, Promise.resolve(createEmptyImportMap()));\n },\n isExternalMapValid(importMapUrl) {\n const promise =\n externalOverrideMapPromises[importMapUrl] ||\n (externalOverrideMapPromises[importMapUrl] = fetchExternalMap(\n importMapUrl\n ));\n return promise.then(() =>\n includes(imo.invalidExternalMaps, importMapUrl)\n );\n },\n invalidExternalMaps: [],\n };\n\n const imo = window.importMapOverrides;\n\n let canFireCustomEvents = true;\n try {\n if (CustomEvent) {\n new CustomEvent(\"a\");\n } else {\n canFireCustomEvents = false;\n }\n } catch (err) {\n canFireCustomEvents = false;\n }\n\n function fireChangedEvent() {\n fireEvent(\"change\");\n }\n\n function fireEvent(type) {\n // Set timeout so that event fires after the change has totally finished\n setTimeout(() => {\n const eventType = `import-map-overrides:${type}`;\n const event = canFireCustomEvents\n ? new CustomEvent(eventType)\n : document.createEvent(\"CustomEvent\");\n if (!canFireCustomEvents) {\n event.initCustomEvent(eventType, true, true, null);\n }\n window.dispatchEvent(event);\n });\n }\n\n const initialOverrideMap = imo.getOverrideMap();\n const initialExternalOverrideMaps = imo.getExternalOverrides();\n\n let referenceNode;\n\n if (!serverOnly) {\n const overridableImportMap = document.querySelector(\n 'script[type=\"overridable-importmap\"]'\n );\n\n referenceNode = overridableImportMap;\n\n if (!referenceNode) {\n const importMaps = document.querySelectorAll(\n `script[type=\"${importMapType}\"]`\n );\n referenceNode = importMaps ? importMaps[importMaps.length - 1] : null;\n }\n\n if (overridableImportMap) {\n if (overridableImportMap.src) {\n throw Error(\n `import-map-overrides: external import maps with type=\"overridable-importmap\" are not supported`\n );\n }\n let originalMap;\n try {\n originalMap = JSON.parse(overridableImportMap.textContent);\n } catch (e) {\n throw Error(\n `Invalid <script type=\"overridable-importmap\"> - text content must be json`\n );\n }\n\n referenceNode = insertOverrideMap(\n imo.mergeImportMap(originalMap, initialOverrideMap),\n `import-map-overrides`,\n referenceNode\n );\n insertAllExternalOverrideMaps();\n } else {\n insertAllExternalOverrideMaps();\n if (Object.keys(initialOverrideMap.imports).length > 0) {\n referenceNode = insertOverrideMap(\n initialOverrideMap,\n `import-map-overrides`,\n referenceNode\n );\n }\n }\n }\n\n fireEvent(\"init\");\n\n function insertOverrideMap(map, id, referenceNode) {\n const overrideMapElement = document.createElement(\"script\");\n overrideMapElement.type = importMapType;\n overrideMapElement.id = id; // for debugging and for UI to identify this import map as special\n overrideMapElement.setAttribute(overrideAttribute, \"\");\n if (typeof map === \"string\") {\n overrideMapElement.src = map;\n } else {\n overrideMapElement.textContent = JSON.stringify(map, null, 2);\n }\n\n if (referenceNode) {\n referenceNode.insertAdjacentElement(\"afterend\", overrideMapElement);\n } else {\n document.head.appendChild(overrideMapElement);\n }\n\n return overrideMapElement;\n }\n\n function fetchExternalMap(url) {\n return fetch(url).then(\n (r) => {\n if (r.ok) {\n return r.json().catch((err) => {\n console.warn(\n Error(\n `External override import map contained invalid json, at url ${r.url}. ${err}`\n )\n );\n imo.invalidExternalMaps.push(r.url);\n return createEmptyImportMap();\n });\n } else {\n console.warn(\n Error(\n `Unable to download external override import map from url ${r.url}. Server responded with status ${r.status}`\n )\n );\n imo.invalidExternalMaps.push(r.url);\n return createEmptyImportMap();\n }\n },\n () => {\n console.warn(\n Error(`Unable to download external import map at url '${url}'`)\n );\n imo.invalidExternalMaps.push(new URL(url, document.baseURI).href);\n return createEmptyImportMap();\n }\n );\n }\n\n function createEmptyImportMap() {\n return { imports: {}, scopes: {} };\n }\n\n function insertAllExternalOverrideMaps() {\n if (initialExternalOverrideMaps.length > 0) {\n initialExternalOverrideMaps.forEach((mapUrl, index) => {\n referenceNode = insertOverrideMap(\n mapUrl,\n `import-map-overrides-external-${index}`\n );\n });\n }\n }\n}\n\nfunction canAccessLocalStorage() {\n try {\n localStorage.getItem(\"test\");\n return true;\n } catch {\n return false;\n }\n}\n","// from https://github.com/sindresorhus/escape-string-regexp\nexport const escapeStringRegexp = (string) => {\n if (typeof string !== \"string\") {\n throw new TypeError(\"Expected a string\");\n }\n\n // Escape characters with special meaning either inside or outside character sets.\n // Use a simple backslash escape when it’s always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n return string.replace(/[|\\\\{}()[\\]^$+*?.]/g, \"\\\\$&\").replace(/-/g, \"\\\\x2d\");\n};\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","var n,l,u,i,t,o,r,f,e={},c=[],s=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function a(n,l){for(var u in l)n[u]=l[u];return n}function h(n){var l=n.parentNode;l&&l.removeChild(n)}function v(l,u,i){var t,o,r,f={};for(r in u)\"key\"==r?t=u[r]:\"ref\"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),\"function\"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return y(l,f,t,o,null)}function y(n,i,t,o,r){var f={type:n,props:i,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u:r};return null!=l.vnode&&l.vnode(f),f}function p(){return{current:null}}function d(n){return n.children}function _(n,l){this.props=n,this.context=l}function k(n,l){if(null==l)return n.__?k(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return\"function\"==typeof n.type?k(n):null}function b(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return b(n)}}function m(n){(!n.__d&&(n.__d=!0)&&t.push(n)&&!g.__r++||r!==l.debounceRendering)&&((r=l.debounceRendering)||o)(g)}function g(){for(var n;g.__r=t.length;)n=t.sort(function(n,l){return n.__v.__b-l.__v.__b}),t=[],n.some(function(n){var l,u,i,t,o,r;n.__d&&(o=(t=(l=n).__v).__e,(r=l.__P)&&(u=[],(i=a({},t)).__v=t.__v+1,j(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?k(t):o,t.__h),z(u,t),t.__e!=o&&b(t)))})}function w(n,l,u,i,t,o,r,f,s,a){var h,v,p,_,b,m,g,w=i&&i.__k||c,A=w.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(_=u.__k[h]=null==(_=l[h])||\"boolean\"==typeof _?null:\"string\"==typeof _||\"number\"==typeof _||\"bigint\"==typeof _?y(null,_,null,null,_):Array.isArray(_)?y(d,{children:_},null,null,null):_.__b>0?y(_.type,_.props,_.key,null,_.__v):_)){if(_.__=u,_.__b=u.__b+1,null===(p=w[h])||p&&_.key==p.key&&_.type===p.type)w[h]=void 0;else for(v=0;v<A;v++){if((p=w[v])&&_.key==p.key&&_.type===p.type){w[v]=void 0;break}p=null}j(n,_,p=p||e,t,o,r,f,s,a),b=_.__e,(v=_.ref)&&p.ref!=v&&(g||(g=[]),p.ref&&g.push(p.ref,null,_),g.push(v,_.__c||b,_)),null!=b?(null==m&&(m=b),\"function\"==typeof _.type&&null!=_.__k&&_.__k===p.__k?_.__d=s=x(_,s,n):s=P(n,_,p,w,b,s),a||\"option\"!==u.type?\"function\"==typeof u.type&&(u.__d=s):n.value=\"\"):s&&p.__e==s&&s.parentNode!=n&&(s=k(p))}for(u.__e=m,h=A;h--;)null!=w[h]&&(\"function\"==typeof u.type&&null!=w[h].__e&&w[h].__e==u.__d&&(u.__d=k(i,h+1)),N(w[h],w[h]));if(g)for(h=0;h<g.length;h++)M(g[h],g[++h],g[++h])}function x(n,l,u){var i,t;for(i=0;i<n.__k.length;i++)(t=n.__k[i])&&(t.__=n,l=\"function\"==typeof t.type?x(t,l,u):P(u,t,t,n.__k,t.__e,l));return l}function A(n,l){return l=l||[],null==n||\"boolean\"==typeof n||(Array.isArray(n)?n.some(function(n){A(n,l)}):l.push(n)),l}function P(n,l,u,i,t,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||t!=o||null==t.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(t),r=null;else{for(f=o,e=0;(f=f.nextSibling)&&e<i.length;e+=2)if(f==t)break n;n.insertBefore(t,o),r=o}return void 0!==r?r:t.nextSibling}function C(n,l,u,i,t){var o;for(o in u)\"children\"===o||\"key\"===o||o in l||H(n,o,null,u[o],i);for(o in l)t&&\"function\"!=typeof l[o]||\"children\"===o||\"key\"===o||\"value\"===o||\"checked\"===o||u[o]===l[o]||H(n,o,l[o],u[o],i)}function $(n,l,u){\"-\"===l[0]?n.setProperty(l,u):n[l]=null==u?\"\":\"number\"!=typeof u||s.test(l)?u:u+\"px\"}function H(n,l,u,i,t){var o;n:if(\"style\"===l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof i&&(n.style.cssText=i=\"\"),i)for(l in i)u&&l in u||$(n.style,l,\"\");if(u)for(l in u)i&&u[l]===i[l]||$(n.style,l,u[l])}else if(\"o\"===l[0]&&\"n\"===l[1])o=l!==(l=l.replace(/Capture$/,\"\")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?T:I,o):n.removeEventListener(l,o?T:I,o);else if(\"dangerouslySetInnerHTML\"!==l){if(t)l=l.replace(/xlink[H:h]/,\"h\").replace(/sName$/,\"s\");else if(\"href\"!==l&&\"list\"!==l&&\"form\"!==l&&\"tabIndex\"!==l&&\"download\"!==l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null!=u&&(!1!==u||\"a\"===l[0]&&\"r\"===l[1])?n.setAttribute(l,u):n.removeAttribute(l))}}function I(n){this.l[n.type+!1](l.event?l.event(n):n)}function T(n){this.l[n.type+!0](l.event?l.event(n):n)}function j(n,u,i,t,o,r,f,e,c){var s,h,v,y,p,k,b,m,g,x,A,P=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(s=l.__b)&&s(u);try{n:if(\"function\"==typeof P){if(m=u.props,g=(s=P.contextType)&&t[s.__c],x=s?g?g.props.value:s.__:t,i.__c?b=(h=u.__c=i.__c).__=h.__E:(\"prototype\"in P&&P.prototype.render?u.__c=h=new P(m,x):(u.__c=h=new _(m,x),h.constructor=P,h.render=O),g&&g.sub(h),h.props=m,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=P.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=a({},h.__s)),a(h.__s,P.getDerivedStateFromProps(m,h.__s))),y=h.props,p=h.state,v)null==P.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==P.getDerivedStateFromProps&&m!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,x)||u.__v===i.__v){h.props=m,h.state=h.__s,u.__v!==i.__v&&(h.__d=!1),h.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u)}),h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,p,k)})}h.context=x,h.props=m,h.state=h.__s,(s=l.__r)&&s(u),h.__d=!1,h.__v=u,h.__P=n,s=h.render(h.props,h.state,h.context),h.state=h.__s,null!=h.getChildContext&&(t=a(a({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(k=h.getSnapshotBeforeUpdate(y,p)),A=null!=s&&s.type===d&&null==s.key?s.props.children:s,w(n,Array.isArray(A)?A:[A],u,i,t,o,r,f,e,c),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),b&&(h.__E=h.__=null),h.__e=!1}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=L(i.__e,u,i,t,o,r,f,c);(s=l.diffed)&&s(u)}catch(n){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),l.__e(n,u,i)}}function z(n,u){l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function L(l,u,i,t,o,r,f,c){var s,a,v,y=i.props,p=u.props,d=u.type,_=0;if(\"svg\"===d&&(o=!0),null!=r)for(;_<r.length;_++)if((s=r[_])&&(s===l||(d?s.localName==d:3==s.nodeType))){l=s,r[_]=null;break}if(null==l){if(null===d)return document.createTextNode(p);l=o?document.createElementNS(\"http://www.w3.org/2000/svg\",d):document.createElement(d,p.is&&p),r=null,c=!1}if(null===d)y===p||c&&l.data===p||(l.data=p);else{if(r=r&&n.call(l.childNodes),a=(y=i.props||e).dangerouslySetInnerHTML,v=p.dangerouslySetInnerHTML,!c){if(null!=r)for(y={},_=0;_<l.attributes.length;_++)y[l.attributes[_].name]=l.attributes[_].value;(v||a)&&(v&&(a&&v.__html==a.__html||v.__html===l.innerHTML)||(l.innerHTML=v&&v.__html||\"\"))}if(C(l,p,y,o,c),v)u.__k=[];else if(_=u.props.children,w(l,Array.isArray(_)?_:[_],u,i,t,o&&\"foreignObject\"!==d,r,f,r?r[0]:i.__k&&k(i,0),c),null!=r)for(_=r.length;_--;)null!=r[_]&&h(r[_]);c||(\"value\"in p&&void 0!==(_=p.value)&&(_!==l.value||\"progress\"===d&&!_)&&H(l,\"value\",_,y.value,!1),\"checked\"in p&&void 0!==(_=p.checked)&&_!==l.checked&&H(l,\"checked\",_,y.checked,!1))}return l}function M(n,u,i){try{\"function\"==typeof n?n(u):n.current=u}catch(n){l.__e(n,i)}}function N(n,u,i){var t,o;if(l.unmount&&l.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||M(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount()}catch(n){l.__e(n,u)}t.base=t.__P=null}if(t=n.__k)for(o=0;o<t.length;o++)t[o]&&N(t[o],u,\"function\"!=typeof n.type);i||null==n.__e||h(n.__e),n.__e=n.__d=void 0}function O(n,l,u){return this.constructor(n,u)}function S(u,i,t){var o,r,f;l.__&&l.__(u,i),r=(o=\"function\"==typeof t)?null:t&&t.__k||i.__k,f=[],j(i,u=(!o&&t||i).__k=v(d,null,[u]),r||e,e,void 0!==i.ownerSVGElement,!o&&t?[t]:r?null:i.firstChild?n.call(i.childNodes):null,f,!o&&t?t:r?r.__e:i.firstChild,o),z(f,u)}function q(n,l){S(n,l,q)}function B(l,u,i){var t,o,r,f=a({},l.props);for(r in u)\"key\"==r?t=u[r]:\"ref\"==r?o=u[r]:f[r]=u[r];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),y(l.type,f,t||l.key,o||l.ref,null)}function D(n,l){var u={__c:l=\"__cC\"+f++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(m)},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=c.slice,l={__e:function(n,l){for(var u,i,t;l=l.__;)if((u=l.__c)&&!u.__)try{if((i=u.constructor)&&null!=i.getDerivedStateFromError&&(u.setState(i.getDerivedStateFromError(n)),t=u.__d),null!=u.componentDidCatch&&(u.componentDidCatch(n),t=u.__d),t)return u.__E=u}catch(l){n=l}throw n}},u=0,i=function(n){return null!=n&&void 0===n.constructor},_.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=a({},this.state),\"function\"==typeof n&&(n=n(a({},u),this.props)),n&&a(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),m(this))},_.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),m(this))},_.prototype.render=d,t=[],o=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,g.__r=0,f=0;export{S as render,q as hydrate,v as createElement,v as h,d as Fragment,p as createRef,i as isValidElement,_ as Component,B as cloneElement,D as createContext,A as toChildArray,l as options};\n//# sourceMappingURL=preact.module.js.map\n","import { h, Component } from \"preact\";\n\nexport default class ModuleDialog extends Component {\n getInitialOverrideUrl = () => {\n const regex = new RegExp(`//localhost:([0-9]+)/`);\n const match = regex.exec(this.props.module.overrideUrl);\n if (\n match &&\n this.props.module.overrideUrl ===\n window.importMapOverrides.getUrlFromPort(\n this.props.module.moduleName,\n match[1]\n )\n ) {\n return match[1];\n } else if (this.props.module.overrideUrl) {\n return this.props.module.overrideUrl;\n } else {\n return \"\";\n }\n };\n state = {\n overrideUrl: this.getInitialOverrideUrl(),\n moduleName: \"\",\n };\n inputEl = null;\n moduleNameEl = null;\n componentDidMount() {\n this.focusFirstInput();\n this.dialogEl.addEventListener(\"keydown\", this.keyDown);\n }\n componentDidUpdate(prevProps, prevState) {\n if (this.props.module !== prevProps.module) {\n this.setState(\n { overrideUrl: this.props.module.overrideUrl || \"\" },\n () => {\n this.focusFirstInput();\n }\n );\n }\n }\n componentWillUnmount() {\n this.dialogEl.removeEventListener(\"keydown\", this.keyDown);\n }\n render({ module }) {\n return (\n <div className=\"imo-modal-container\">\n <div className=\"imo-modal\" />\n <dialog\n className={`imo-module-dialog ${\n this.state.overrideUrl.length > 0 ? \"imo-overridden\" : \"imo-default\"\n }`}\n open\n ref={this.dialogRef}\n >\n <form method=\"dialog\" onSubmit={this.handleSubmit}>\n <h3 style={{ marginTop: 0 }}>{module.moduleName}</h3>\n <table>\n <tbody>\n {!module.isNew && (\n <tr>\n <td>Default URL:</td>\n <td>{module.defaultUrl}</td>\n </tr>\n )}\n {module.isNew && (\n <tr>\n <td>\n <span id=\"module-name-label\">Module Name:</span>\n </td>\n <td style={{ position: \"relative\" }}>\n <input\n type=\"text\"\n tabIndex={1}\n value={this.state.moduleName}\n aria-labelledby=\"module-name-label\"\n onInput={(evt) =>\n this.setState({ moduleName: evt.target.value })\n }\n ref={this.handleModuleNameRef}\n required\n />\n <div\n role=\"button\"\n tabIndex={3}\n className=\"imo-clear-input\"\n onClick={this.clearModuleName}\n >\n <div>{\"\\u24E7\"}</div>\n </div>\n </td>\n </tr>\n )}\n <tr>\n <td>\n <span id=\"override-url-label\">Override URL:</span>\n </td>\n <td style={{ position: \"relative\" }}>\n <input\n ref={this.handleInputRef}\n type=\"text\"\n value={this.state.overrideUrl}\n aria-labelledby=\"override-url-label\"\n tabIndex={2}\n onInput={(evt) =>\n this.setState({ overrideUrl: evt.target.value })\n }\n />\n <div\n role=\"button\"\n tabIndex={4}\n className=\"imo-clear-input\"\n onClick={this.clearInput}\n >\n <div>{\"\\u24E7\"}</div>\n </div>\n </td>\n </tr>\n {portRegex.test(this.state.overrideUrl) && (\n <tr>\n <td>Derived url:</td>\n <td>{this.getDerivedUrl()}</td>\n </tr>\n )}\n </tbody>\n </table>\n <div className=\"imo-dialog-actions\">\n <button\n type=\"button\"\n tabIndex={5}\n onClick={this.props.cancel}\n style={{ marginRight: \"16px\" }}\n >\n Cancel\n </button>\n {this.props.module.overrideUrl && !this.props.module.disabled && (\n <button\n type=\"button\"\n onClick={() => {\n if (this.props.module.disabled) {\n window.importMapOverrides.enableOverride(\n this.props.module.moduleName\n );\n } else {\n window.importMapOverrides.disableOverride(\n this.props.module.moduleName\n );\n }\n this.props.cancel();\n }}\n tabIndex={6}\n style={{ marginRight: \"16px\" }}\n >\n {this.props.module.disabled ? \"Enable\" : \"Disable\"} Override\n </button>\n )}\n <button\n type=\"submit\"\n tabIndex={7}\n className={\n this.state.overrideUrl ? \"imo-overridden\" : \"imo-default\"\n }\n >\n {this.state.overrideUrl ? \"Apply override\" : \"Reset to default\"}\n </button>\n </div>\n </form>\n </dialog>\n </div>\n );\n }\n\n handleInputRef = (el) => {\n this.inputEl = el;\n };\n\n handleModuleNameRef = (el) => {\n this.moduleNameEl = el;\n };\n\n dialogRef = (el) => {\n this.dialogEl = el;\n };\n\n handleSubmit = (evt) => {\n evt.preventDefault();\n if (\n this.props.module.moduleName &&\n window.importMapOverrides.isDisabled(this.props.module.moduleName)\n ) {\n window.importMapOverrides.enableOverride(this.props.module.moduleName);\n }\n if (this.props.module.isNew) {\n this.props.addNewModule(this.state.moduleName, this.state.overrideUrl);\n } else {\n this.props.updateModuleUrl(this.state.overrideUrl);\n }\n };\n\n getDerivedUrl = () => {\n const moduleName = this.props.module.isNew\n ? this.state.moduleName\n : this.props.module.moduleName;\n return portRegex.test(this.state.overrideUrl)\n ? window.importMapOverrides.getUrlFromPort(\n moduleName,\n this.state.overrideUrl\n )\n : this.state.overrideUrl;\n };\n\n keyDown = (evt) => {\n if (evt.key === \"Escape\") {\n evt.stopPropagation();\n this.props.cancel();\n }\n };\n\n focusFirstInput = () => {\n const firstInput = this.moduleNameEl || this.inputEl;\n firstInput.select();\n };\n\n clearModuleName = () => {\n this.setState({ moduleName: \"\" }, () => {\n this.focusFirstInput();\n });\n };\n\n clearInput = () => {\n this.setState({ overrideUrl: \"\" }, () => {\n this.focusFirstInput();\n });\n };\n}\n\nconst portRegex = /^\\d+$/;\n","import { h, Component } from \"preact\";\n\nexport default class ExternalImportMap extends Component {\n state = {\n url: this.props.dialogExternalMap.isNew\n ? \"\"\n : this.props.dialogExternalMap.url,\n };\n inputEl = null;\n componentDidMount() {\n this.inputEl.focus();\n this.dialogEl.addEventListener(\"keydown\", this.keyDown);\n }\n componentWillUnmount() {\n this.dialogEl.removeEventListener(\"keydown\", this.keyDown);\n }\n render() {\n return (\n <div className=\"imo-modal-container\">\n <div className=\"imo-modal\" />\n <dialog\n className=\"imo-module-dialog\"\n open\n ref={(el) => (this.dialogEl = el)}\n >\n <form method=\"dialog\" onSubmit={this.handleSubmit}>\n <h3 style={{ marginTop: 0 }}>\n {this.props.dialogExternalMap.isNew\n ? \"Add External Import Map\"\n : \"Edit External Import Map\"}\n </h3>\n <div style={{ marginBottom: \"20px\" }}>\n <label htmlFor=\"external-importmap-url\">URL to import map:</label>\n <span style={{ position: \"relative\" }}>\n <input\n id=\"external-importmap-url\"\n type=\"text\"\n value={this.state.url}\n onInput={(evt) => this.setState({ url: evt.target.value })}\n ref={(el) => (this.inputEl = el)}\n required={this.props.dialogExternalMap.isNew}\n />\n <div\n role=\"button\"\n tabIndex={0}\n className=\"imo-clear-input\"\n onClick={() => this.setState({ url: \"\" })}\n >\n <div>{\"\\u24E7\"}</div>\n </div>\n </span>\n </div>\n <div className=\"imo-dialog-actions\">\n <button\n type=\"button\"\n onClick={this.props.cancel}\n style={{ marginRight: \"16px\" }}\n >\n Cancel\n </button>\n <button\n type=\"submit\"\n className={this.state.url ? \"imo-overridden\" : \"imo-default\"}\n >\n {this.state.url || this.props.dialogExternalMap.isNew\n ? \"Apply override\"\n : \"Remove override\"}\n </button>\n </div>\n </form>\n </dialog>\n </div>\n );\n }\n handleSubmit = (evt) => {\n evt.preventDefault();\n\n if (!this.props.dialogExternalMap.isNew) {\n window.importMapOverrides.removeExternalOverride(\n this.props.dialogExternalMap.url\n );\n }\n\n if (this.state.url) {\n window.importMapOverrides.addExternalOverride(this.state.url);\n }\n\n this.props.cancel();\n };\n keyDown = (evt) => {\n if (evt.key === \"Escape\") {\n evt.stopPropagation();\n this.props.cancel();\n }\n };\n}\n","import { h, Component } from \"preact\";\n\nexport default class DevLibOverrides extends Component {\n componentDidMount() {\n window.importMapOverrides.getCurrentPageMap().then(addDevLibOverrides);\n }\n render() {\n return null;\n }\n}\n\nconst removeMin = (url) => url.replace(\".min.js\", \".js\");\n\nexport const devLibs = {\n react: (url) => url.replace(\"production.min\", \"development\"),\n \"react-dom\": (url) => url.replace(\"production.min\", \"development\"),\n \"single-spa\": (url) => url.replace(\"single-spa.min.js\", \"single-spa.dev.js\"),\n vue: removeMin,\n \"vue-router\": removeMin,\n \"@angular/core\": removeMin,\n \"@angular/common\": removeMin,\n \"@angular/router\": removeMin,\n \"@angular/platform-browser\": removeMin,\n};\n\nfunction addDevLibOverrides(notOverriddenMap) {\n Object.keys(notOverriddenMap.imports)\n .filter((libName) => devLibs[libName])\n .forEach((libName) => {\n window.importMapOverrides.addOverride(\n libName,\n devLibs[libName](notOverriddenMap.imports[libName])\n );\n });\n}\n\nexport function overridesBesidesDevLibs() {\n return (\n Object.keys(window.importMapOverrides.getOverrideMap().imports).filter(\n (k) => !devLibs[k]\n ).length > 0\n );\n}\n","import { h, Component, render } from \"preact\";\nimport { includes } from \"../../util/includes.js\";\nimport ModuleDialog from \"./module-dialog.component\";\nimport ExternalImportMap from \"./external-importmap-dialog.component\";\nimport { devLibs } from \"../dev-lib-overrides.component\";\n\nexport default class List extends Component {\n state = {\n notOverriddenMap: { imports: {} },\n currentPageMap: { imports: {} },\n nextPageMap: { imports: {} },\n dialogModule: null,\n dialogExternalMap: null,\n searchVal: \"\",\n };\n componentDidMount() {\n window.importMapOverrides.getDefaultMap().then((notOverriddenMap) => {\n this.setState({ notOverriddenMap });\n });\n window.importMapOverrides.getCurrentPageMap().then((currentPageMap) => {\n this.setState({ currentPageMap });\n });\n window.importMapOverrides.getNextPageMap().then((nextPageMap) => {\n this.setState({ nextPageMap });\n });\n window.addEventListener(\"import-map-overrides:change\", this.doUpdate);\n this.inputRef.focus();\n }\n componentWillUnmount() {\n window.removeEventListener(\"import-map-overrides:change\", this.doUpdate);\n }\n componentDidUpdate(prevProps, prevState) {\n if (!prevState.dialogModule && this.state.dialogModule) {\n this.dialogContainer = document.createElement(\"div\");\n document.body.appendChild(this.dialogContainer);\n render(\n <ModuleDialog\n module={this.state.dialogModule}\n cancel={this.cancel}\n updateModuleUrl={this.updateModuleUrl}\n addNewModule={this.addNewModule}\n />,\n this.dialogContainer\n );\n } else if (prevState.dialogModule && !this.state.dialogModule) {\n render(null, this.dialogContainer);\n this.dialogContainer.remove();\n delete this.dialogContainer;\n }\n\n if (!prevState.dialogExternalMap && this.state.dialogExternalMap) {\n this.dialogContainer = document.createElement(\"div\");\n document.body.appendChild(this.dialogContainer);\n render(\n <ExternalImportMap\n dialogExternalMap={this.state.dialogExternalMap}\n cancel={this.cancel}\n />,\n this.dialogContainer\n );\n } else if (prevState.dialogExternalMap && !this.state.dialogExternalMap) {\n render(null, this.dialogContainer);\n this.dialogContainer.remove();\n delete this.dialogContainer;\n }\n }\n render() {\n const overriddenModules = [],\n nextOverriddenModules = [],\n disabledOverrides = [],\n defaultModules = [],\n externalOverrideModules = [],\n pendingRefreshDefaultModules = [],\n devLibModules = [];\n\n const overrideMap = window.importMapOverrides.getOverrideMap(true).imports;\n\n const notOverriddenKeys = Object.keys(this.state.notOverriddenMap.imports);\n\n const disabledModules = window.importMapOverrides.getDisabledOverrides();\n\n notOverriddenKeys.filter(this.filterModuleNames).forEach((moduleName) => {\n const mod = {\n moduleName,\n defaultUrl: this.state.notOverriddenMap.imports[moduleName],\n overrideUrl: overrideMap[moduleName],\n disabled: includes(disabledModules, moduleName),\n };\n if (mod.disabled) {\n disabledOverrides.push(mod);\n } else if (overrideMap[moduleName]) {\n if (\n this.state.currentPageMap.imports[moduleName] ===\n overrideMap[moduleName]\n ) {\n if (\n devLibs[moduleName] &&\n devLibs[moduleName](\n this.state.currentPageMap.imports[moduleName]\n ) === overrideMap[moduleName]\n ) {\n devLibModules.push(mod);\n } else {\n overriddenModules.push(mod);\n }\n } else {\n nextOverriddenModules.push(mod);\n }\n } else if (\n this.state.notOverriddenMap.imports[moduleName] ===\n this.state.currentPageMap.imports[moduleName]\n ) {\n defaultModules.push(mod);\n } else if (\n this.state.notOverriddenMap.imports[moduleName] ===\n this.state.nextPageMap.imports[moduleName]\n ) {\n pendingRefreshDefaultModules.push(mod);\n } else {\n externalOverrideModules.push(mod);\n }\n });\n\n Object.keys(overrideMap)\n .filter(this.filterModuleNames)\n .forEach((moduleName) => {\n if (!includes(notOverriddenKeys, moduleName)) {\n const mod = {\n moduleName,\n defaultUrl: null,\n overrideUrl: overrideMap[moduleName],\n disabled: includes(disabledModules, moduleName),\n };\n\n if (mod.disabled) {\n disabledOverrides.push(mod);\n } else if (\n this.state.currentPageMap.imports[moduleName] ===\n overrideMap[moduleName]\n ) {\n overriddenModules.push(mod);\n } else {\n nextOverriddenModules.push(mod);\n }\n }\n });\n\n overriddenModules.sort(sorter);\n defaultModules.sort(sorter);\n nextOverriddenModules.sort(sorter);\n\n const {\n brokenMaps,\n workingCurrentPageMaps,\n workingNextPageMaps,\n } = getExternalMaps();\n\n return (\n <div className=\"imo-list-container\">\n <div className=\"imo-table-header-actions\">\n <input\n className=\"imo-list-search\"\n aria-label=\"Search modules\"\n placeholder=\"Search modules\"\n value={this.state.searchVal}\n onInput={(evt) => this.setState({ searchVal: evt.target.value })}\n ref={(ref) => (this.inputRef = ref)}\n />\n <div className=\"imo-add-new\">\n <button\n onClick={() =>\n this.setState({\n dialogModule: { moduleName: \"New module\", isNew: true },\n })\n }\n >\n Add new module\n </button>\n </div>\n <div className=\"imo-add-new\">\n <button\n onClick={() => {\n this.setState({\n dialogExternalMap: { url: \"\", isNew: true },\n });\n }}\n >\n Add import map\n </button>\n </div>\n <div className=\"imo-add-new\">\n <button onClick={() => window.importMapOverrides.resetOverrides()}>\n Reset all overrides\n </button>\n </div>\n </div>\n <table className=\"imo-overrides-table\">\n <thead>\n <tr>\n <th>Module Status</th>\n <th>Module Name</th>\n <th>Domain</th>\n <th>Filename</th>\n </tr>\n </thead>\n <tbody>\n {nextOverriddenModules.map((mod) => (\n <tr\n role=\"button\"\n tabIndex={0}\n onClick={() => this.setState({ dialogModule: mod })}\n key={mod.moduleName}\n >\n <td onClick={this.reload} role=\"button\" tabIndex={0}>\n <div className=\"imo-status imo-next-override\" />\n <div>Inline Override</div>\n <div className=\"imo-needs-refresh\" />\n </td>\n <td>{mod.moduleName}</td>\n <td>{toDomain(mod)}</td>\n <td>{toFileName(mod)}</td>\n </tr>\n ))}\n {pendingRefreshDefaultModules.map((mod) => (\n <tr\n role=\"button\"\n tabIndex={0}\n onClick={() => this.setState({ dialogModule: mod })}\n key={mod.moduleName}\n >\n <td style={{ position: \"relative\" }}>\n <div className=\"imo-status imo-next-default\" />\n <div>Default</div>\n <div className=\"imo-needs-refresh\" />\n </td>\n <td>{mod.moduleName}</td>\n <td>{toDomain(mod)}</td>\n <td>{toFileName(mod)}</td>\n </tr>\n ))}\n {disabledOverrides.map((mod) => (\n <tr\n role=\"button\"\n tabIndex={0}\n onClick={() => this.setState({ dialogModule: mod })}\n key={mod.moduleName}\n >\n <td>\n <div className=\"imo-status imo-disabled-override\" />\n <div>Override disabled</div>\n </td>\n <td>{mod.moduleName}</td>\n <td>{toDomain(mod)}</td>\n <td>{toFileName(mod)}</td>\n </tr>\n ))}\n {overriddenModules.map((mod) => (\n <tr\n role=\"button\"\n tabIndex={0}\n onClick={() => this.setState({ dialogModule: mod })}\n key={mod.moduleName}\n >\n <td>\n <div className=\"imo-status imo-current-override\" />\n <div>Inline Override</div>\n </td>\n <td>{mod.moduleName}</td>\n <td>{toDomain(mod)}</td>\n <td>{toFileName(mod)}</td>\n </tr>\n ))}\n {externalOverrideModules.map((mod) => (\n <tr\n role=\"button\"\n tabIndex={0}\n onClick={() => this.setState({ dialogModule: mod })}\n key={mod.moduleName}\n >\n <td>\n <div className=\"imo-status imo-external-override\" />\n <div>External Override</div>\n </td>\n <td>{mod.moduleName}</td>\n <td>{toDomain(mod)}</td>\n <td>{toFileName(mod)}</td>\n </tr>\n ))}\n {devLibModules.map((mod) => (\n <tr\n role=\"button\"\n tabIndex={0}\n onClick={() => this.setState({ dialogModule: mod })}\n key={mod.moduleName}\n title=\"Automatically use dev version of certain npm libs\"\n >\n <td>\n <div className=\"imo-status imo-dev-lib-override\" />\n <div>Dev Lib Override</div>\n </td>\n <td>{mod.moduleName}</td>\n <td>{toDomain(mod)}</td>\n <td>{toFileName(mod)}</td>\n </tr>\n ))}\n {defaultModules.map((mod) => (\n <tr\n role=\"button\"\n tabIndex={0}\n onClick={() => this.setState({ dialogModule: mod })}\n key={mod.moduleName}\n >\n <td>\n <div className=\"imo-status imo-default-module\" />\n <div>Default</div>\n </td>\n <td>{mod.moduleName}</td>\n <td>{toDomain(mod)}</td>\n <td>{toFileName(mod)}</td>\n </tr>\n ))}\n </tbody>\n </table>\n {(brokenMaps.length > 0 ||\n workingCurrentPageMaps.length > 0 ||\n workingNextPageMaps.length > 0) && (\n <table className=\"imo-overrides-table\">\n <thead>\n <th>Import Map Status</th>\n <th>URL</th>\n </thead>\n <tbody>\n {brokenMaps.map((url) => (\n <tr\n role=\"button\"\n tabIndex={0}\n onClick={() =>\n this.setState({ dialogExternalMap: { isNew: false, url } })\n }\n key={url}\n >\n <td>\n <div className=\"imo-status imo-disabled-override\" />\n <div>Invalid</div>\n </td>\n <td>{url}</td>\n </tr>\n ))}\n {workingNextPageMaps.map((url) => (\n <tr\n role=\"button\"\n tabIndex={0}\n onClick={() =>\n this.setState({ dialogExternalMap: { isNew: false, url } })\n }\n key={url}\n >\n <td>\n <div className=\"imo-status imo-next-override\" />\n <div>Pending refresh</div>\n </td>\n <td>{url}</td>\n </tr>\n ))}\n {workingCurrentPageMaps.map((url) => (\n <tr\n role=\"button\"\n tabIndex={0}\n onClick={() =>\n this.setState({ dialogExternalMap: { isNew: false, url } })\n }\n key={url}\n >\n <td>\n <div className=\"imo-status imo-current-override\" />\n <div>Override</div>\n </td>\n <td>{url}</td>\n </tr>\n ))}\n </tbody>\n </table>\n )}\n </div>\n );\n }\n\n reload = (evt) => {\n evt.stopPropagation();\n window.location.reload();\n };\n\n cancel = () => {\n this.setState({ dialogModule: null, dialogExternalMap: null });\n };\n\n updateModuleUrl = (newUrl) => {\n newUrl = newUrl || null;\n\n if (newUrl === null) {\n window.importMapOverrides.removeOverride(\n this.state.dialogModule.moduleName\n );\n } else {\n window.importMapOverrides.addOverride(\n this.state.dialogModule.moduleName,\n newUrl\n );\n }\n\n this.setState({ dialogModule: null });\n };\n\n doUpdate = () => {\n this.forceUpdate();\n window.importMapOverrides.getNextPageMap().then((nextPageMap) => {\n this.setState({ nextPageMap });\n });\n };\n\n addNewModule = (name, url) => {\n if (name && url) {\n window.importMapOverrides.addOverride(name, url);\n }\n this.setState({ dialogModule: null });\n };\n\n filterModuleNames = (moduleName) => {\n return this.state.searchVal.trim().length > 0\n ? includes(moduleName, this.state.searchVal)\n : true;\n };\n}\n\nfunction sorter(first, second) {\n return first.moduleName > second.moduleName;\n}\n\nconst currentBase =\n (document.querySelector(\"base\") && document.querySelector(\"base\").href) ||\n location.origin + \"/\";\n\nfunction toDomain(mod) {\n const urlStr = toUrlStr(mod);\n const url = toURL(urlStr);\n return url ? url.host : urlStr;\n}\n\nfunction toFileName(mod) {\n const urlStr = toUrlStr(mod);\n const url = toURL(urlStr);\n return url ? url.pathname.slice(url.pathname.lastIndexOf(\"/\") + 1) : urlStr;\n}\n\nfunction toUrlStr(mod) {\n return mod.overrideUrl || mod.defaultUrl;\n}\n\nfunction toURL(urlStr) {\n try {\n return new URL(urlStr, currentBase);\n } catch {\n return null;\n }\n}\n\nfunction getExternalMaps() {\n const allExternalMaps = window.importMapOverrides.getExternalOverrides();\n const allCurrentPageMaps = window.importMapOverrides.getCurrentPageExternalOverrides();\n const brokenMaps = [],\n workingCurrentPageMaps = [],\n workingNextPageMaps = [];\n\n for (let externalMap of allExternalMaps) {\n if (includes(window.importMapOverrides.invalidExternalMaps, externalMap)) {\n brokenMaps.push(externalMap);\n } else {\n if (includes(allCurrentPageMaps, externalMap)) {\n workingCurrentPageMaps.push(externalMap);\n } else {\n workingNextPageMaps.push(externalMap);\n }\n }\n }\n\n return {\n brokenMaps,\n workingCurrentPageMaps,\n workingNextPageMaps,\n };\n}\n","import { h, Component } from \"preact\";\nimport List from \"./list/list.component\";\n\nexport default class Popup extends Component {\n componentDidMount() {\n window.addEventListener(\"keydown\", this.keydownListener);\n window.addEventListener(\"import-map-overrides:change\", this.doUpdate);\n }\n componentWillUnmount() {\n window.removeEventListener(\"keydown\", this.keydownListener);\n window.removeEventListener(\"import-map-overrides:change\", this.doUpdate);\n }\n doUpdate = () => this.forceUpdate();\n render(props) {\n return (\n <div className=\"imo-popup\">\n <div className=\"imo-header\">\n <div>\n <h1>Import Map Overrides</h1>\n <p>\n This developer tool allows you to view and override your import\n maps. Start by clicking on a module that you'd like to override.{\" \"}\n <a\n target=\"_blank\"\n href=\"https://github.com/joeldenning/import-map-overrides\"\n >\n See documentation for more info\n </a>\n .\n </p>\n </div>\n <button className=\"imo-unstyled\" onClick={props.close}>\n {\"\\u24E7\"}\n </button>\n </div>\n <List importMapChanged={this.props.importMapChanged} />\n </div>\n );\n }\n keydownListener = (evt) => {\n if (evt.key === \"Escape\" && this.props.close) {\n this.props.close();\n }\n };\n}\n","import { h, Component } from \"preact\";\nimport Popup from \"./popup.component\";\nimport DevLibOverrides, {\n overridesBesidesDevLibs,\n} from \"./dev-lib-overrides.component\";\n\nexport default class FullUI extends Component {\n state = {\n showingPopup: false,\n };\n componentDidMount() {\n window.addEventListener(\"import-map-overrides:change\", this.doUpdate);\n }\n componentWillUnmount() {\n window.removeEventListener(\"import-map-overrides:change\", this.doUpdate);\n }\n doUpdate = () => this.forceUpdate();\n render(props, state) {\n const shouldShow =\n !props.customElement.hasAttribute(\"show-when-local-storage\") ||\n localStorage.getItem(\n props.customElement.getAttribute(\"show-when-local-storage\")\n ) === \"true\";\n\n if (!shouldShow) {\n return null;\n }\n\n return (\n <div>\n <button\n onClick={this.toggleTrigger}\n className={`imo-unstyled imo-trigger ${\n this.atLeastOneOverride() ? \"imo-current-override\" : \"\"\n }`}\n >\n {\"{\\u00B7\\u00B7\\u00B7}\"}\n </button>\n {this.useDevLibs() && <DevLibOverrides />}\n {state.showingPopup && (\n <Popup\n close={this.toggleTrigger}\n importMapChanged={this.importMapChanged}\n />\n )}\n </div>\n );\n }\n toggleTrigger = () => {\n this.setState((prevState) => ({\n showingPopup: !prevState.showingPopup,\n }));\n };\n importMapChanged = () => {\n this.forceUpdate();\n };\n useDevLibs = () => {\n const localStorageValue = localStorage.getItem(\n \"import-map-overrides-dev-libs\"\n );\n return localStorageValue\n ? localStorageValue === \"true\"\n : this.props.customElement.hasAttribute(\"dev-libs\");\n };\n atLeastOneOverride = () => {\n if (this.useDevLibs()) {\n return overridesBesidesDevLibs();\n } else {\n return (\n Object.keys(window.importMapOverrides.getOverrideMap().imports).length >\n 0\n );\n }\n };\n}\n","import \"./import-map-overrides.css\";\nimport { render, h } from \"preact\";\nimport FullUI from \"./full-ui.component\";\nimport Popup from \"./popup.component\";\nimport List from \"./list/list.component\";\nimport { isDisabled } from \"../api/js-api\";\n\nif (window.customElements && !isDisabled) {\n window.customElements.define(\n \"import-map-overrides-full\",\n preactCustomElement(FullUI, [\"show-when-local-storage\"])\n );\n window.customElements.define(\n \"import-map-overrides-popup\",\n preactCustomElement(Popup)\n );\n window.customElements.define(\n \"import-map-overrides-list\",\n preactCustomElement(List)\n );\n}\n\nfunction preactCustomElement(Comp, observedAttributes = []) {\n return class PreactCustomElement extends HTMLElement {\n connectedCallback() {\n this.renderWithPreact();\n }\n disconnectedCallback() {\n render(null, this);\n this.renderedEl = null;\n }\n static get observedAttributes() {\n return observedAttributes;\n }\n attributeChangedCallback() {\n this.renderWithPreact();\n }\n renderWithPreact() {\n this.renderedEl = render(\n h(Comp, { customElement: this }),\n this,\n this.renderedEl\n );\n }\n };\n}\n"],"names":["includes","obj","item","Array","isArray","i","length","indexOf","Error","getParameterByName","name","url","window","location","href","replace","regex","RegExp","results","exec","decodeURIComponent","isDisabled","localStoragePrefix","disabledOverridesLocalStorageKey","externalOverridesLocalStorageKey","overrideAttribute","domainsMeta","allowListPrefix","denyListPrefix","importMapMetaElement","document","querySelector","domainsElement","externalOverrideMapPromises","importMapType","getAttribute","content","console","warn","matchHostname","domain","string","TypeError","escapeStringRegexp","test","hostname","slice","split","some","log","localStorage","getItem","canAccessLocalStorage","defaultMapPromise","serverOverrides","hasAttribute","serverOnly","importMapOverrides","addOverride","moduleName","imo","getUrlFromPort","key","setItem","cookie","fireChangedEvent","getOverrideMap","includeDisabled","overrides","imports","scopes","disabledOverrides","getDisabledOverrides","setOverride","path","queryParam","parent","queryParamImportMap","JSON","parse","e","Object","keys","forEach","removeOverride","hasItem","removeItem","enableOverride","resetOverrides","hasOverrides","port","fileName","enableUI","customElementName","showWhenLocalStorage","customElement","createElement","setAttribute","body","appendChild","localStorageKey","renderWithPreact","mergeImportMap","originalMap","newMap","outMap","getDefaultMap","prototype","reduce","call","querySelectorAll","promise","scriptEl","nextPromise","src","fetchExternalMap","Promise","resolve","textContent","all","then","getCurrentPageMap","getExternalOverrideMap","getCurrentPageExternalOverrides","defaultMap","externalOverridesMap","initialOverrideMap","currentPageExternalOverrides","externalOverrideEl","push","getNextPageMap","disableOverride","stringify","concat","index","splice","getExternalOverrides","localStorageValue","sort","addExternalOverride","URL","baseURI","removeExternalOverride","filter","override","result","externalOverride","fetchPromise","firstMap","secondMap","isExternalMapValid","importMapUrl","invalidExternalMaps","canFireCustomEvents","CustomEvent","err","fireEvent","type","setTimeout","eventType","event","createEvent","initCustomEvent","dispatchEvent","referenceNode","initialExternalOverrideMaps","overridableImportMap","importMaps","insertOverrideMap","insertAllExternalOverrideMaps","map","id","overrideMapElement","insertAdjacentElement","head","fetch","r","ok","json","catch","status","mapUrl","init","css","ref","insertAt","getElementsByTagName","style","firstChild","insertBefore","styleSheet","cssText","createTextNode","n","l","u","t","o","c","s","a","h","parentNode","removeChild","v","f","arguments","children","defaultProps","y","props","__k","__","__b","__e","__d","__c","__h","constructor","__v","vnode","d","_","this","context","k","b","base","m","g","__r","debounceRendering","__P","j","__n","ownerSVGElement","z","w","p","A","x","P","value","N","M","nextSibling","$","setProperty","H","toLowerCase","addEventListener","T","I","removeEventListener","removeAttribute","contextType","__E","render","O","sub","state","__s","getDerivedStateFromProps","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","componentDidUpdate","getChildContext","getSnapshotBeforeUpdate","L","diffed","localName","nodeType","createElementNS","is","data","childNodes","dangerouslySetInnerHTML","attributes","__html","innerHTML","C","checked","current","unmount","componentWillUnmount","S","getDerivedStateFromError","setState","componentDidCatch","forceUpdate","bind","ModuleDialog","match","_this","module","overrideUrl","getInitialOverrideUrl","el","inputEl","moduleNameEl","dialogEl","evt","preventDefault","isNew","addNewModule","updateModuleUrl","portRegex","stopPropagation","cancel","select","focusFirstInput","keyDown","prevProps","prevState","_this2","className","open","dialogRef","method","onSubmit","handleSubmit","marginTop","defaultUrl","position","tabIndex","onInput","_this3","target","handleModuleNameRef","required","role","onClick","clearModuleName","handleInputRef","clearInput","getDerivedUrl","marginRight","disabled","Component","ExternalImportMap","dialogExternalMap","focus","marginBottom","htmlFor","DevLibOverrides","addDevLibOverrides","removeMin","devLibs","react","vue","notOverriddenMap","libName","overridesBesidesDevLibs","List","currentPageMap","nextPageMap","dialogModule","searchVal","reload","newUrl","trim","doUpdate","inputRef","dialogContainer","remove","overriddenModules","nextOverriddenModules","defaultModules","externalOverrideModules","pendingRefreshDefaultModules","devLibModules","overrideMap","notOverriddenKeys","disabledModules","filterModuleNames","mod","sorter","allExternalMaps","allCurrentPageMaps","brokenMaps","workingCurrentPageMaps","workingNextPageMaps","externalMap","getExternalMaps","placeholder","toDomain","toFileName","title","first","second","currentBase","origin","urlStr","toUrlStr","toURL","host","pathname","lastIndexOf","Popup","close","keydownListener","importMapChanged","FullUI","showingPopup","useDevLibs","toggleTrigger","atLeastOneOverride","preactCustomElement","Comp","observedAttributes","renderedEl","HTMLElement","customElements","define"],"mappings":";i1GAAO,SAASA,EAASC,EAAKC,MACxBC,MAAMC,QAAQH,GAAM,KACjB,IAAII,EAAI,EAAGA,EAAIJ,EAAIK,OAAQD,OAC1BJ,EAAII,KAAOH,SACN,SAGJ,EACF,GAAmB,iBAARD,SACTA,EAAIM,QAAQL,IAAS,QAEtBM,yCAAuCP,KCV1C,SAASQ,EAAmBC,OAAMC,yDAAMC,OAAOC,SAASC,KAC7DJ,EAAOA,EAAKK,QAAQ,UAAW,YAC3BC,EAAQ,IAAIC,OAAO,OAASP,EAAO,qBACrCQ,EAAUF,EAAMG,KAAKR,UAClBO,EACAA,EAAQ,GACNE,mBAAmBF,EAAQ,GAAGH,QAAQ,MAAO,MAD5B,GADH,KCDvB,IAqBWM,EArBLC,EAAqB,uBACrBC,EAAmC,gCACnCC,EAAmC,qCACnCC,EAAoB,6BACpBC,EAAc,+BACdC,EAAkB,aAClBC,EAAiB,YAGjBC,EAAuBC,SAASC,cACpC,+BAGIC,EAAiBF,SAASC,mCAA4BL,SAEtDO,EAA8B,GAEvBC,EAAgBL,EACzBA,EAAqBM,aAAa,WAClC,YAIJ,GAAIH,EAAgB,KACZI,EAAUJ,EAAeG,aAAa,WACvCC,GACHC,QAAQC,uBAAgBZ,4CAGpBa,EAAgB,SAACC,UACrB,IAAIvB,OCjC0B,SAACwB,MACX,iBAAXA,QACH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L,KAAKqL,2BApCC/D,GCgBpC,SAASqE,GAAoBC,OAAMC,yDAAqB,yIAEpD,gBACOvT,uDAEP,WACE4J,GAAO,KAAMlC,WACR8L,WAAa,6CAKpB,gBACOxT,mDAEP,gBACOwT,WAAa5J,GAChBxD,EAAEkN,EAAM,CAAE5T,cAAegI,OACzBA,KACAA,KAAK8L,8CAVT,kBACSD,WAT8BE,cAhBvClZ,OAAOmZ,iBAAmB1Y,IAC5BT,OAAOmZ,eAAeC,OACpB,4BACAN,GAAoBL,GAAQ,CAAC,6BAE/BzY,OAAOmZ,eAAeC,OACpB,6BACAN,GAAoBT,KAEtBrY,OAAOmZ,eAAeC,OACpB,4BACAN,GAAoBtD"}
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(t){function e(t){t.registerRegistry=Object.create(null),t.namedRegisterAliases=Object.create(null)}var r=("undefined"!=typeof self?self:global).System;e(r);var i,s,n=r.constructor.prototype,l=r.constructor,a=function(){l.call(this),e(this)};a.prototype=n,r.constructor=a;var o=n.register;n.register=function(t,e,r){if("string"!=typeof t)return o.apply(this,arguments);var n=[e,r];return this.registerRegistry[t]=n,i||(i=n,s=t),Promise.resolve().then((function(){i=null,s=null})),o.call(this,e,r)};var c=n.resolve;n.resolve=function(t,e){try{return c.call(this,t,e)}catch(e){if(t in this.registerRegistry)return this.namedRegisterAliases[t]||t;throw e}};var u=n.instantiate;n.instantiate=function(t,e){var r=this.registerRegistry[t];return r?(this.registerRegistry[t]=null,r):u.call(this,t,e)};var g=n.getRegister;n.getRegister=function(t){var e=g.call(this,t);s&&t&&(this.namedRegisterAliases[s]=t);var r=i||e;return i=null,s=null,r}}();
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"named-register.min.js","sources":["../../src/extras/named-register.js"],"sourcesContent":["/*\n * SystemJS named register extension\n * Supports System.register('name', [..deps..], function (_export, _context) { ... })\n * \n * Names are written to the registry as-is\n * System.register('x', ...) can be imported as System.import('x')\n */\n(function (global) {\n var System = global.System;\n setRegisterRegistry(System);\n var systemJSPrototype = System.constructor.prototype;\n var constructor = System.constructor;\n var SystemJS = function () {\n constructor.call(this);\n setRegisterRegistry(this);\n };\n SystemJS.prototype = systemJSPrototype;\n System.constructor = SystemJS;\n\n var firstNamedDefine, firstName;\n\n function setRegisterRegistry(systemInstance) {\n systemInstance.registerRegistry = Object.create(null);\n systemInstance.namedRegisterAliases = Object.create(null);\n }\n\n var register = systemJSPrototype.register;\n systemJSPrototype.register = function (name, deps, declare) {\n if (typeof name !== 'string')\n return register.apply(this, arguments);\n var define = [deps, declare];\n this.registerRegistry[name] = define;\n if (!firstNamedDefine) {\n firstNamedDefine = define;\n firstName = name;\n }\n Promise.resolve().then(function () {\n firstNamedDefine = null;\n firstName = null;\n });\n return register.apply(this, [deps, declare]);\n };\n\n var resolve = systemJSPrototype.resolve;\n systemJSPrototype.resolve = function (id, parentURL) {\n try {\n // Prefer import map (or other existing) resolution over the registerRegistry\n return resolve.call(this, id, parentURL);\n } catch (err) {\n if (id in this.registerRegistry) {\n return this.namedRegisterAliases[id] || id;\n }\n throw err;\n }\n };\n\n var instantiate = systemJSPrototype.instantiate;\n systemJSPrototype.instantiate = function (url, firstParentUrl) {\n var result = this.registerRegistry[url];\n if (result) {\n this.registerRegistry[url] = null;\n return result;\n } else {\n return instantiate.call(this, url, firstParentUrl);\n }\n };\n\n var getRegister = systemJSPrototype.getRegister;\n systemJSPrototype.getRegister = function (url) {\n // Calling getRegister() because other extras need to know it was called so they can perform side effects\n var register = getRegister.call(this, url);\n\n if (firstName && url) {\n this.namedRegisterAliases[firstName] = url;\n }\n var result = firstNamedDefine || register;\n firstNamedDefine = null;\n firstName = null;\n return result;\n }\n})(typeof self !== 'undefined' ? self : global);\n"],"names":["global","setRegisterRegistry","systemInstance","registerRegistry","Object","create","namedRegisterAliases","System","firstNamedDefine","firstName","systemJSPrototype","constructor","prototype","SystemJS","call","this","register","name","deps","declare","apply","arguments","define","Promise","resolve","then","id","parentURL","err","instantiate","url","first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GAEzC,IAAIE,EAASxB,GAAoBQ,EAGjC,OAFAR,EAAmB,KACnBC,EAAY,KACLuB,GAvEX,CAyEmB,oBAATE,KAAuBA,KAAOlC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
var runtime=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{u({},"")}catch(t){u=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof g?r:g,i=Object.create(o.prototype),a=new G(n||[]);return i._invoke=function(t,r,e){var n=l;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===y){if("throw"===o)throw i;return T()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=j(a,e);if(c){if(c===v)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===l)throw n=y,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=p;var u=f(t,r,e);if("normal"===u.type){if(n=e.done?y:s,u.arg===v)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n=y,e.method="throw",e.arg=u.arg)}}}(t,e,a),i}function f(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var l="suspendedStart",s="suspendedYield",p="executing",y="completed",v={};function g(){}function d(){}function m(){}var w={};u(w,i,(function(){return this}));var L=Object.getPrototypeOf,x=L&&L(L(N([])));x&&x!==e&&n.call(x,i)&&(w=x);var b=m.prototype=g.prototype=Object.create(w);function E(t){["next","throw","return"].forEach((function(r){u(t,r,(function(t){return this._invoke(r,t)}))}))}function _(t,r){function e(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var h=u.arg,l=h.value;return l&&"object"==typeof l&&n.call(l,"__await")?r.resolve(l.__await).then((function(t){e("next",t,a,c)}),(function(t){e("throw",t,a,c)})):r.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return e("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new r((function(r,o){e(t,n,r,o)}))}return o=o?o.then(i,i):i()}}function j(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,j(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function O(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function k(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function N(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function e(){for(;++o<t.length;)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=r,e.done=!0,e};return a.next=a}}return{next:T}}function T(){return{value:r,done:!0}}return d.prototype=m,u(b,"constructor",m),u(m,"constructor",d),d.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===d||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},E(_.prototype),u(_.prototype,a,(function(){return this})),t.AsyncIterator=_,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new _(h(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(b),u(b,c,"Generator"),u(b,i,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=N,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),h=n.call(a,"finallyLoc");if(u&&h){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),v},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),k(e),v}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;k(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:N(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),v}},t}("object"==typeof module?module.exports:{});try{regeneratorRuntime=runtime}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=runtime:Function("r","regeneratorRuntime = r")(runtime)}
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t=t||self).singleSpa={})}(this,(function(t){"use strict";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="NOT_LOADED",h="LOADING_SOURCE_CODE",m="NOT_BOOTSTRAPPED",d="BOOTSTRAPPING",v="NOT_MOUNTED",w="MOUNTING",g="MOUNTED",E="UPDATING",y="UNMOUNTING",O="LOAD_ERROR",T="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),t.BOOTSTRAPPING=d,t.LOADING_SOURCE_CODE=h,t.LOAD_ERROR=O,t.MOUNTED=g,t.MOUNTING=w,t.NOT_BOOTSTRAPPED=m,t.NOT_LOADED=p,t.NOT_MOUNTED=v,t.SKIP_BECAUSE_BROKEN=T,t.UNMOUNTING=y,t.UPDATING=E,t.addErrorHandler=c,t.checkActivityFunctions=bt,t.ensureJQuerySupport=lt,t.getAppNames=Ot,t.getAppStatus=Tt,t.getMountedApps=yt,t.mountRootParcel=W,t.navigateToUrl=et,t.pathToActiveWhen=Ut,t.registerApplication=Pt,t.removeErrorHandler=s,t.setBootstrapMaxTime=H,t.setMountMaxTime=J,t.setUnloadMaxTime=V,t.setUnmountMaxTime=Q,t.start=Bt,t.triggerAppChange=Lt,t.unloadApplication=Nt,t.unregisterApplication=At,Object.defineProperty(t,"__esModule",{value:!0})}));
|