open-consul/agent/uiserver/dist/assets/init-fe2561b45ce1429092f4a9a2bbb9ce71.js
Andrew Stucki 28869784e1
auto-updated agent/uiserver/dist/ from commit 63204b518 (#16587)
Co-authored-by: hc-github-team-consul-core <github-team-consul-core@hashicorp.com>
2023-03-09 13:56:53 -05:00

6 lines
851 B
JavaScript

(function(e,t){const n=new Map(Object.entries(JSON.parse(e.querySelector("[data-consul-ui-fs]").textContent))),o=function(t){var n=e.createElement("script")
n.src=t,e.body.appendChild(n)}
"TextDecoder"in window||(o(n.get(`${["text-encoding","encoding-indexes"].join("/")}.js`)),o(n.get(`${["text-encoding","encoding"].join("/")}.js`))),window.CSS&&window.CSS.escape||o(n.get(`${["css.escape","css.escape"].join("/")}.js`))
try{const t=e.querySelector('[name="consul-ui/config/environment"]'),n=JSON.parse(e.querySelector("[data-consul-ui-config]").textContent),o=JSON.parse(decodeURIComponent(t.getAttribute("content"))),c="string"!=typeof n.ContentPath?"":n.ContentPath
c.length>0&&(o.rootURL=c),t.setAttribute("content",encodeURIComponent(JSON.stringify(o)))}catch(c){throw new Error(`Unable to parse consul-ui settings: ${c.message}`)}})(document)