| "sourcesContent": ["/*!\n * @license\n * Copyright 2020 The Go Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\nconst fetchButton = document.querySelector('.js-fetchButton');\nif (fetchButton) {\n fetchButton.addEventListener('click', e => {\n e.preventDefault();\n fetchPath();\n });\n}\n\nasync function fetchPath() {\n const fetchMessageEl = document.querySelector<HTMLHeadingElement>('.js-fetchMessage');\n const fetchMessageSecondary = document.querySelector<HTMLParagraphElement>(\n '.js-fetchMessageSecondary'\n );\n const fetchButton = document.querySelector<HTMLButtonElement>('.js-fetchButton');\n const fetchLoading = document.querySelector<HTMLDivElement>('.js-fetchLoading');\n if (!(fetchMessageEl && fetchMessageSecondary && fetchButton && fetchLoading)) {\n return;\n }\n fetchMessageEl.textContent = `Fetching ${fetchMessageEl.dataset.path}`;\n fetchMessageSecondary.textContent =\n 'Feel free to navigate away and check back later, we\u2019ll keep working on it!';\n fetchButton.style.display = 'none';\n fetchLoading.style.display = 'block';\n\n const response = await fetch(`/fetch${window.location.pathname}`, { method: 'POST' });\n if (response.ok) {\n window.location.reload();\n return;\n }\n const responseText = await response.text();\n fetchLoading.style.display = 'none';\n fetchMessageSecondary.textContent = '';\n const responseTextParsedDOM = new DOMParser().parseFromString(responseText, 'text/html');\n fetchMessageEl.innerText = responseTextParsedDOM.documentElement.textContent ?? '';\n}\n\nexport {};\n"], |
| "mappings": "AAOA,IAAMA,EAAc,SAAS,cAAc,iBAAiB,EACxDA,GACFA,EAAY,iBAAiB,QAAS,GAAK,CACzC,EAAE,eAAe,EACjBC,EAAU,CACZ,CAAC,EAGH,eAAeA,GAAY,CAf3B,IAAAC,EAgBE,IAAMC,EAAiB,SAAS,cAAkC,kBAAkB,EAC9EC,EAAwB,SAAS,cACrC,2BACF,EACMJ,EAAc,SAAS,cAAiC,iBAAiB,EACzEK,EAAe,SAAS,cAA8B,kBAAkB,EAC9E,GAAI,EAAEF,GAAkBC,GAAyBJ,GAAeK,GAC9D,OAEFF,EAAe,YAAc,YAAYA,EAAe,QAAQ,OAChEC,EAAsB,YACpB,kFACFJ,EAAY,MAAM,QAAU,OAC5BK,EAAa,MAAM,QAAU,QAE7B,IAAMC,EAAW,MAAM,MAAM,SAAS,OAAO,SAAS,WAAY,CAAE,OAAQ,MAAO,CAAC,EACpF,GAAIA,EAAS,GAAI,CACf,OAAO,SAAS,OAAO,EACvB,OAEF,IAAMC,EAAe,MAAMD,EAAS,KAAK,EACzCD,EAAa,MAAM,QAAU,OAC7BD,EAAsB,YAAc,GACpC,IAAMI,EAAwB,IAAI,UAAU,EAAE,gBAAgBD,EAAc,WAAW,EACvFJ,EAAe,WAAYD,EAAAM,EAAsB,gBAAgB,cAAtC,KAAAN,EAAqD,EAClF", |
| "names": ["fetchButton", "fetchPath", "_a", "fetchMessageEl", "fetchMessageSecondary", "fetchLoading", "response", "responseText", "responseTextParsedDOM"] |