OpenC3/cosmos

View on GitHub
openc3-cosmos-init/plugins/openc3-tool-base/public/js/import-map-overrides-3.1.1.min.js.map

Summary

Maintainability
Test Coverage
{"version":3,"file":"import-map-overrides.js","sources":["../src/util/includes.js","../src/api/js-api.js","../src/util/string-regex.js","../src/util/url-parameter.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","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.location != window.parent.location\n          ? document.referrer\n          : 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([promise, nextPromise]).then(\n                ([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] =\n            fetchExternalMap(externalOverride));\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] =\n          fetchExternalMap(importMapUrl));\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)\n      .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      .then((importMap) => expandRelativeUrlsInImportMap(importMap, url));\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 expandRelativeUrl(url, baseUrl) {\n  try {\n    const outUrl = new URL(url, baseUrl);\n    return outUrl.href;\n  } catch (err) {\n    return url;\n  }\n}\n\nfunction expandRelativeUrlImports(imports, baseUrl) {\n  return Object.entries(imports).reduce((result, [key, value]) => {\n    result[key] = expandRelativeUrl(value, baseUrl);\n    return result;\n  }, {});\n}\n\nfunction expandRelativeUrlsInImportMap(importMap, baseUrl) {\n  return {\n    imports: expandRelativeUrlImports(importMap.imports || {}, baseUrl),\n    scopes: Object.keys(importMap.scopes || {}).reduce((result, scopeKey) => {\n      result[scopeKey] = expandRelativeUrlImports(\n        importMap.scopes[scopeKey],\n        baseUrl\n      );\n      return result;\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","// 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","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({\n          ...mod,\n          overrideUrl: this.state.currentPageMap.imports[moduleName],\n        });\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 { brokenMaps, workingCurrentPageMaps, 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 =\n    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\nfunction validateTriggerPosition(position) {\n  const validPositions = [\n    \"top-left\",\n    \"top-right\",\n    \"bottom-left\",\n    \"bottom-right\",\n  ];\n\n  return validPositions.indexOf(position) >= 0 ? position : \"bottom-right\";\n}\n\nconst validPositions = [\"top-left\", \"top-right\", \"bottom-left\", \"bottom-right\"];\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    const triggerPosition = validateTriggerPosition(\n      props.customElement.getAttribute(\"trigger-position\")\n    );\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 imo-trigger-${triggerPosition} ${\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 styles from \"./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\", \"trigger-position\"])\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      if (!this.shadowRoot) {\n        this.shadow = this.attachShadow({ mode: \"open\" });\n        const style = document.createElement(\"style\");\n        style.textContent = styles.toString();\n        this.shadow.appendChild(style);\n      } else {\n        this.shadow = this.shadowRoot;\n      }\n      this.renderedEl = render(\n        h(Comp, { customElement: this }),\n        this.shadow,\n        this.renderedEl\n      );\n    }\n  };\n}\n"],"names":["includes","obj","item","Array","isArray","i","length","indexOf","Error","concat","_typeof","isDisabled","localStoragePrefix","disabledOverridesLocalStorageKey","externalOverridesLocalStorageKey","overrideAttribute","domainsMeta","allowListPrefix","denyListPrefix","importMapMetaElement","document","querySelector","domainsElement","externalOverrideMapPromises","importMapType","getAttribute","content","console","warn","matchHostname","domain","RegExp","string","TypeError","replace","escapeStringRegexp","test","window","location","hostname","slice","split","some","log","expandRelativeUrlImports","imports","baseUrl","Object","entries","reduce","result","_ref9","_ref10","_slicedToArray","key","value","url","URL","href","err","expandRelativeUrl","localStorage","getItem","_unused","canAccessLocalStorage","defaultMapPromise","serverOverrides","hasAttribute","serverOnly","importMapOverrides","addOverride","moduleName","imo","getUrlFromPort","setItem","cookie","fireChangedEvent","getOverrideMap","includeDisabled","arguments","undefined","overrides","scopes","disabledOverrides","getDisabledOverrides","setOverride","path","queryParam","name","results","exec","decodeURIComponent","getParameterByName","parent","referrer","queryParamImportMap","JSON","parse","e","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","call","querySelectorAll","promise","scriptEl","nextPromise","src","fetchExternalMap","Promise","resolve","textContent","all","then","_ref","_ref2","getCurrentPageMap","getExternalOverrideMap","getCurrentPageExternalOverrides","_ref3","_ref4","defaultMap","externalOverridesMap","initialOverrideMap","currentPageExternalOverrides","externalOverrideEl","push","getNextPageMap","_ref5","_ref6","disableOverride","stringify","index","splice","getExternalOverrides","localStorageValue","sort","addExternalOverride","baseURI","removeExternalOverride","filter","override","externalOverride","fetchPromise","_ref7","_ref8","firstMap","secondMap","isExternalMapValid","importMapUrl","invalidExternalMaps","canFireCustomEvents","CustomEvent","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","importMap","scopeKey","expandRelativeUrlsInImportMap","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","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","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","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","args","_key","_defineProperty","_assertThisInitialized","apply","match","module","overrideUrl","getInitialOverrideUrl","el","inputEl","moduleNameEl","dialogEl","evt","preventDefault","isNew","addNewModule","updateModuleUrl","portRegex","stopPropagation","cancel","select","focusFirstInput","_createClass","keyDown","prevProps","prevState","_this2","_this3","className","open","dialogRef","method","onSubmit","handleSubmit","marginTop","defaultUrl","position","tabIndex","onInput","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","List","currentPageMap","nextPageMap","dialogModule","searchVal","reload","newUrl","trim","doUpdate","inputRef","dialogContainer","remove","overriddenModules","nextOverriddenModules","defaultModules","externalOverrideModules","pendingRefreshDefaultModules","devLibModules","overrideMap","notOverriddenKeys","disabledModules","filterModuleNames","mod","_objectSpread","sorter","_getExternalMaps","_step","allExternalMaps","allCurrentPageMaps","brokenMaps","workingCurrentPageMaps","workingNextPageMaps","_iterator","_createForOfIteratorHelper","done","externalMap","getExternalMaps","placeholder","toDomain","toFileName","title","first","second","currentBase","origin","urlStr","toUrlStr","toURL","host","pathname","lastIndexOf","Popup","close","keydownListener","importMapChanged","FullUI","showingPopup","useDevLibs","shouldShow","triggerPosition","toggleTrigger","atLeastOneOverride","preactCustomElement","Comp","observedAttributes","_HTMLElement","PreactCustomElement","renderedEl","shadowRoot","shadow","attachShadow","mode","styles","toString","get","_wrapNativeSuper","HTMLElement","customElements","define"],"mappings":";ohJAAO,SAASA,EAASC,EAAKC,GAC5B,GAAIC,MAAMC,QAAQH,GAAM,CACtB,IAAK,IAAII,EAAI,EAAGA,EAAIJ,EAAIK,OAAQD,IAC9B,GAAIJ,EAAII,KAAOH,EACb,OAAO,EAGX,OAAO,EACF,GAAmB,iBAARD,EAChB,OAAOA,EAAIM,QAAQL,IAAS,EAE5B,MAAMM,gCAAKC,OAAAC,EAAkCT,IAEjD,CCTA,IAqBWU,EArBLC,EAAqB,uBACrBC,EAAmC,gCACnCC,EAAmC,qCACnCC,EAAoB,6BACpBC,EAAc,+BACdC,EAAkB,aAClBC,EAAiB,YAGjBC,EAAuBC,S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