From 7feaf710f28a9d56ad420f535c3ee7565469419e Mon Sep 17 00:00:00 2001 From: dom111 Date: Thu, 25 Aug 2022 22:03:34 +0100 Subject: [PATCH] Add `pushstate` when previews are opened in lightbox and `popstate` when closed. Still work to do with potentially managing the `popstate` handler for files too. Potentially addresses the main problem in #59. --- TODO.md | 3 +- assets/css/style.css | 499 +----------------------------- src/lib/DAV.ts | 5 +- src/lib/DAV/Collection.ts | 7 +- src/lib/DAV/Entry.ts | 8 +- src/lib/UI/NativeDOM.ts | 84 ++++- src/lib/UI/NativeDOM/Footer.ts | 3 +- src/lib/UI/NativeDOM/List.ts | 49 ++- src/lib/UI/NativeDOM/List/Item.ts | 29 +- src/lib/trailingSlash.ts | 4 + src/webdav-min.js | 22 +- 11 files changed, 172 insertions(+), 541 deletions(-) create mode 100644 src/lib/trailingSlash.ts diff --git a/TODO.md b/TODO.md index 3bfd990..c280353 100644 --- a/TODO.md +++ b/TODO.md @@ -1,11 +1,12 @@ - [x] Add more unit tests for the UI - [x] Add end-to-end UI testing - [x] Move to TypeScript +- [x] Support keyboard navigation whilst overlay is visible - [ ] Add drag and drop tests - [ ] Allow uploading of directories ([#48](https://github.com/dom111/webdav-js/issues/48)) - [ ] Add functionality for copying and moving files and directories - [ ] Add progress bar for file uploads -- [ ] Support keyboard navigation whilst overlay is visible - [ ] ReactJS implementation - [ ] VueJS implementation - [ ] Maybe a refactor... +- [ ] Add eventMap to `Event` object. diff --git a/assets/css/style.css b/assets/css/style.css index ed56cde..46025f1 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -1,499 +1,2 @@ -.basicLightbox { - position: fixed; - display: flex; - justify-content: center; - align-items: center; - top: 0; - left: 0; - width: 100%; - height: 100vh; - background: rgba(0, 0, 0, 0.8); - opacity: 0.01; - transition: opacity 0.4s ease; - z-index: 1000; - will-change: opacity; -} -.basicLightbox--visible { - opacity: 1; -} -.basicLightbox__placeholder { - max-width: 100%; - transform: scale(0.9); - transition: transform 0.4s ease; - z-index: 1; - will-change: transform; -} -.basicLightbox__placeholder > img:first-child:last-child, -.basicLightbox__placeholder > video:first-child:last-child, -.basicLightbox__placeholder > iframe:first-child:last-child { - display: block; - position: absolute; - inset: 0; - margin: auto; - max-width: 95%; - max-height: 95%; -} -.basicLightbox__placeholder > video:first-child:last-child, -.basicLightbox__placeholder > iframe:first-child:last-child { - pointer-events: auto; -} -.basicLightbox__placeholder > img:first-child:last-child, -.basicLightbox__placeholder > video:first-child:last-child { - width: auto; - height: auto; -} -.basicLightbox--img .basicLightbox__placeholder, -.basicLightbox--video .basicLightbox__placeholder, -.basicLightbox--iframe .basicLightbox__placeholder { - width: 100%; - height: 100%; - pointer-events: none; -} -.basicLightbox--visible .basicLightbox__placeholder { - transform: scale(1); -} -code[class*='language-'], -pre[class*='language-'] { - color: #000; - background: none; - text-shadow: 0 1px white; - font-family: Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace; - font-size: 1em; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - word-wrap: normal; - line-height: 1.5; - -moz-tab-size: 4; - -o-tab-size: 4; - tab-size: 4; - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; -} -pre[class*='language-']::-moz-selection, -pre[class*='language-'] ::-moz-selection, -code[class*='language-']::-moz-selection, -code[class*='language-'] ::-moz-selection { - text-shadow: none; - background: #b3d4fc; -} -pre[class*='language-']::selection, -pre[class*='language-'] ::selection, -code[class*='language-']::selection, -code[class*='language-'] ::selection { - text-shadow: none; - background: #b3d4fc; -} -@media print { - code[class*='language-'], - pre[class*='language-'] { - text-shadow: none; - } -} -pre[class*='language-'] { - padding: 1em; - margin: 0.5em 0; - overflow: auto; -} -:not(pre) > code[class*='language-'], -pre[class*='language-'] { - background: #f5f2f0; -} -:not(pre) > code[class*='language-'] { - padding: 0.1em; - border-radius: 0.3em; - white-space: normal; -} -.token.comment, -.token.prolog, -.token.doctype, -.token.cdata { - color: #708090; -} -.token.punctuation { - color: #999; -} -.token.namespace { - opacity: 0.7; -} -.token.property, -.token.tag, -.token.boolean, -.token.number, -.token.constant, -.token.symbol, -.token.deleted { - color: #905; -} -.token.selector, -.token.attr-name, -.token.string, -.token.char, -.token.builtin, -.token.inserted { - color: #690; -} -.token.operator, -.token.entity, -.token.url, -.language-css .token.string, -.style .token.string { - color: #9a6e3a; - background: hsla(0, 0%, 100%, 0.5); -} -.token.atrule, -.token.attr-value, -.token.keyword { - color: #07a; -} -.token.function, -.token.class-name { - color: #dd4a68; -} -.token.regex, -.token.important, -.token.variable { - color: #e90; -} -.token.important, -.token.bold { - font-weight: 700; -} -.token.italic { - font-style: italic; -} -.token.entity { - cursor: help; -} -.toast__container { - bottom: 0; - max-width: calc(40vw - 1em); - position: fixed; - left: 1em; - z-index: 1; -} -@media (max-width: 800px) { - .toast__container { - max-width: calc(100vw - 2em); - } -} -.toast { - background: #fff - linear-gradient( - 180deg, - transparent, - transparent 80%, - rgba(0, 0, 0, 0.1) 100% - ); - border: 1px solid rgba(0, 0, 0, 0.1); - border-radius: 0.25em; - box-shadow: 0 0 #0000004d; - clear: both; - color: #000c; - cursor: pointer; - float: left; - margin: 0 0 1em; - min-width: 10em; - opacity: 0; - padding: 1em 2.5em 1em 1em; - position: relative; - transform: translateY(100%); - transition: all 0.4s; -} -.toast:before { - content: none; - float: left; - font-size: 1.5em; - line-height: 0.8em; - margin-left: -0.1em; - min-width: 1.5em; - padding-right: 0.25em; - text-align: center; -} -.toast button { - background: transparent; - border: none; - color: inherit; - cursor: pointer; - max-width: 1em; - overflow: hidden; - padding: 0; - position: absolute; - right: 1em; - top: 1em; - white-space: nowrap; -} -.toast button:before { - content: '\2716 '; -} -.toast--info { - background: #4a90e2 - linear-gradient( - 180deg, - transparent, - transparent 80%, - rgba(0, 0, 0, 0.1) 100% - ); - color: #fffc; -} -.toast--info:before { - content: '\24d8'; -} -.toast--success { - background: #55dd6b - linear-gradient( - 180deg, - transparent, - transparent 80%, - rgba(0, 0, 0, 0.1) 100% - ); - color: #606060cc; -} -.toast--success:before { - content: '\2713'; -} -.toast--warning { - background: #edc25e - linear-gradient( - 180deg, - transparent, - transparent 80%, - rgba(0, 0, 0, 0.1) 100% - ); - color: #606060cc; -} -.toast--warning:before { - content: '\26a0'; -} -.toast--error { - background: #e23645 - linear-gradient( - 180deg, - transparent, - transparent 80%, - rgba(0, 0, 0, 0.1) 100% - ); - color: #fffc; -} -.toast--error:before { - content: '\26a0'; -} -.toast--show { - box-shadow: 0 0 0.5em #0000004d; - opacity: 1; - transform: translateY(0); -} -.toast--hide { - box-shadow: 0 0 1em #0000004d; - opacity: 0; - transform: translate(-100%) translateY(0); -} -html { - font-size: 16px; -} -html, -body, -ul { - font-family: Helvetica, Arial, sans-serif; - margin: 0; - padding: 0; -} -html, -body { - min-height: 100vh; -} -li { - list-style: none; -} -a { - color: inherit; - text-decoration: none; -} -.hidden { - display: none !important; -} -.invisible { - opacity: 0; - pointer-events: none; - position: absolute; -} -.loading { - background: url(data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibGRzLXNwaW5uZXIiIHdpZHRoPSIxNDNweCIgaGVpZ2h0PSIxNDNweCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIiBzdHlsZT0iYmFja2dyb3VuZDogbm9uZTsiPjxnIHRyYW5zZm9ybT0icm90YXRlKDAgNTAgNTApIj48cmVjdCB4PSI0OCIgeT0iMjQiIHJ4PSI5LjYiIHJ5PSI0LjgiIHdpZHRoPSI0IiBoZWlnaHQ9IjEyIiBmaWxsPSIjNzRjMWY1Ij48YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjE7MCIga2V5VGltZXM9IjA7MSIgZHVyPSIxcyIgYmVnaW49Ii0w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eD0iNDgiIHk9IjI0IiByeD0iOS42IiByeT0iNC44IiB3aWR0aD0iNCIgaGVpZ2h0PSIxMiIgZmlsbD0iIzc0YzFmNSI+PGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ib3BhY2l0eSIgdmFsdWVzPSIxOzAiIGtleVRpbWVzPSIwOzEiIGR1cj0iMXMiIGJlZ2luPSItMC4wODMzMzMzMzMzMzMzMzMzM3MiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIj48L2FuaW1hdGU+PC9yZWN0PjwvZz48ZyB0cmFuc2Zvcm09InJvdGF0ZSgzMzAgNTAgNTApIj48cmVjdCB4PSI0OCIgeT0iMjQiIHJ4PSI5LjYiIHJ5PSI0LjgiIHdpZHRoPSI0IiBoZWlnaHQ9IjEyIiBmaWxsPSIjNzRjMWY1Ij48YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjE7MCIga2V5VGltZXM9IjA7MSIgZHVyPSIxcyIgYmVnaW49IjBzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSI+PC9hbmltYXRlPjwvcmVjdD48L2c+PC9zdmc+) - center center no-repeat; -} -.loading > * { - opacity: 0.5; -} -.active { - background-color: #ffc; -} -main { - padding: 20px; -} -main ul { - border: 1px solid #efefef; - border-radius: 5px; - margin: 0; - padding: 0 5px; -} -main ul li { - background: none no-repeat left center; - border-top: 1px solid #eee; - cursor: pointer; - display: block; - overflow: hidden; - padding: 5px 0 5px 5px; -} -main ul li:hover { - background-color: #fafafa; -} -main ul li:first-child { - border-top: 0; -} -main ul li.active { - color: #000; -} -main ul li.loading { - background-size: contain; -} -main ul li.loading * { - pointer-events: none; -} -main ul li .size { - color: #aaa; - display: inline-block; - margin: 0 10px; -} -main ul li .copy, -main ul li .move, -main ul li .rename, -main ul li .delete, -main ul li [download] { - background: none no-repeat center center; - float: right; - height: 16px; - margin: 0 5px; - overflow: hidden; - text-indent: 26px; - white-space: nowrap; - width: 16px; -} -main ul li .copy { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJ1SURBVBgZBcFNiJVVGADg5z3fmTujY5NZBANBIVkZ2J9IKkZFGKRuglq1KaqVtoqoVbSKFi1LoY2QEVSbcqiFWWJqPxL044wUGESQVqJOKerce7/z9jyRmba++tXTy2YmnyphPaYQIJBBNuPWfls8l1/EfxdeOrJnxxAgMtO2148d2ffC+rWlxMqkkwBkQjp7aeT97xf99cfS5ZPzv6w6umfHElQoXdw+qN3KhX90JYIgG30243G6Muo9tOYa999WfdfOLs92x4UHd3163eG3ti8ViIgVmdkNumKiUIOu0AURFIFmdmZgx4ZZt9w6uazOTO+FAklAQQlKhBKhRCgRShfOnL/i5hUjd64Kz2+6XjfRPQkVIJPaEUJGaH1SQu0YZHHqXBq2sdaGHlg9KWoZQ4VMEjWKlBJRQiAb2RUGlBZa66RCFFAh0RBBCIlENiY6QBTRhyypIROo0MZk0hDITFAKWqhdkkGSQt/oG1ChtZSZJCkBSCCEE79+Yv7UnIuXLxiNR8rwnsomFfpGn2SjAUjQkuPzHzp98XMPb9ngplVrHFr42OX5ubpx1943K7Rxaple+2EopBZkBo2MNL3wnie2P6ovvbtntzp48iMb1232+6n9OyuMx72+Z3Zmwn03Fi3pkz5oyWffnjERKzy29lnw4iPvmDuxG/unKoyXWhu3lsNefPNnr0VKAVpy/tK/Fk5/7afTR72yda83DjxjqpuEqxVGV/u/pwfdDS+vG05nZpE0wLXLqn2Lzzn287s237XF3IndBlEd/fEwvB2ZacPOgzvHo3w8Iu5NuRxAkkhpovug1u5Q5SoGfWurDxzf/eW2/wEnITFm/fHryQAAAABJRU5ErkJggg==); -} -main ul li .move { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJ2SURBVBgZBcFLiJVlGADg5/3+b87cbLyFNBJ4oexGQYqIi6hFQambgohoE0aLUqGCaBcuonWLUFe1CIJolWCLaiK1C0FUREpRBgmWNpqi4XjOnP97e57ITI+8fuLZ6bnJZ0rYhikECGSQzbi1M1cu5UJcvfzqycN7RgCRmXa9+dXJ9w5su6uUWJV0EoBMSIv/LXv/uyvOnx1eP/3zL2u+PLxnCBVKF3cMarfq1D+6EkGQjT6b8TgtLfceuv0mO7ZU37bFmWx3Xn5w/7HVx9/ePSwQESsysxt0xUShBl2hCyIoAs383MCe7fM23jY5Xedm34UCSUBBCUqEEqFEKBFKF/7+d8mGFcvuXhOe37lWN9E9CRUgk9oRQkZofVJC7Rhk8fulNGpjrY08sHlS1DKGCpkkahQpJaKEQDayKwwoLbTWSYUooEKiIYIQEolsTHSAKKIPWVJDJlChjcmkIZCZoBS0ULskgySFvtE3oEJrKTNJUgKQQAj950eMFg5ZPvebU+vW2zH9WGWnCn2jT7LRACRoyY2FI6ZOfeC+p54zuekeSz99YubkQv304YkDFdo4tUwHfxgJqQWZQSMjPX30Lbv3vmDqzBeceMPMylU2b9jg+1/z5Qrjca/vmZ+bsHVd0ZI+6YOWrL7yp6lbNrHrFQD14LyuxcYK42Fr49Zy1ItvzvVapBSgJetXzrv+4zGzR180XDrvOq5d7fSdvyos3+gvzA66m1+7dzSbmUXSACunq4vn9zt9/B23rp5WuwnXFsf+uNBJ/aHITNv3fbZvvJyPR8T9KWcAJImUHh0eq1sXP+zWDi/G1cHc8Oxgy8cvffT1E/8D2iAtJW5RUGAAAAAASUVORK5CYII=); -} -main ul li .rename { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFUSURBVDjLrZM/SAJxGIZdWwuDlnCplkAEm1zkaIiGFFpyMIwGK5KGoK2lphDKkMDg3LLUSIJsSKhIi+684CokOtTiMizCGuzEU5K3vOEgKvtBDe/2Pc8H3x8NAM1fQlx4H9M3pcOWp6TXWmM8A7j0629v1nraiAVC0IrrwATKIgs5xyG5QiE+Z4iQdoeU2oAsnqCSO1NSTu+D9VhqRLD8nIB8F0Q2MgmJDyipCzjvYJkIfpN2UBLG8MpP4dxvQ3ZzGuyyBQ2H+AnOOCBd9aL6soh81A5hyYSGWyCFvxUcerqI4S+CvYVOFPMHxLAq8I3qdHVY5LbBhJzEsCrwutpRFBlUHy6wO2tEYtWAzLELPN2P03kjfj3luqDycV2F8AgefWbEnVqEHa2IznSD6BdsVDNStB0lfh0FPoQjdx8RrAqGzC0YprSgxzsUMOY2bf37N/6Ud1Vc9yYcH50CAAAAAElFTkSuQmCC); -} -main ul li .delete { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJdSURBVDjLpZP7S1NhGMf9W7YfogSJboSEUVCY8zJ31trcps6zTI9bLGJpjp1hmkGNxVz4Q6ildtXKXzJNbJRaRmrXoeWx8tJOTWptnrNryre5YCYuI3rh+8vL+/m8PA/PkwIg5X+y5mJWrxfOUBXm91QZM6UluUmthntHqplxUml2lciF6wrmdHriI0Wx3xw2hAediLwZRWRkCPzdDswaSvGqkGCfq8VEUsEyPF1O8Qu3O7A09RbRvjuIttsRbT6HHzebsDjcB4/JgFFlNv9MnkmsEszodIIY7Oaut2OJcSF68Qx8dgv8tmqEL1gQaaARtp5A+N4NzB0lMXxon/uxbI8gIYjB9HytGYuusfiPIQcN71kjgnW6VeFOkgh3XcHLvAwMSDPohOADdYQJdF1FtLMZPmslvhZJk2ahkgRvq4HHUoWHRDqTEDDl2mDkfheiDgt8pw340/Eoc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tih3WpNiUaabhkMBlZuDrWjYfZHNade+24oI2UGlYWJoj8Yef2TP5SgG1d1XCUyk2R6omq7bmw8ZvPchAduLcbJODh7IQ3GnaZMIIWxiJA1ZVZdNzIcdtpuUGtXaw7H4ptLnRTgxurIRLQOLa7X1SEKSUY11fa8+fFFV1duakf98eWZXrPx1fuHM1mzVMCRU6kxoVrz7vcv2Ti9VSiWVv90cO9biimrg6E2Io89ffir5yPiwZQL6Eu2b52d2raJ22dveHLXPvO9LRSW+1vcNtOZ7tFGiMwEAAAPHTr59fY71j0yPzlvqp3T1ZGoVeRYjVXnL/7uysrI/62cRssvlMuuAAAAAElFTkSuQmCC); -} -main ul li input { - border: 0; - padding: 0; - font-size: 1rem; -} -main ul li.directory:before { - content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGrSURBVDjLxZO7ihRBFIa/6u0ZW7GHBUV0UQQTZzd3QdhMQxOfwMRXEANBMNQX0MzAzFAwEzHwARbNFDdwEd31Mj3X7a6uOr9BtzNjYjKBJ6nicP7v3KqcJFaxhBVtZUAK8OHlld2st7Xl3DJPVONP+zEUV4HqL5UDYHr5xvuQAjgl/Qs7TzvOOVAjxjlC+ePSwe6DfbVegLVuT4r14eTr6zvA8xSAoBLzx6pvj4l+DZIezuVkG9fY2H7YRQIMZIBwycmzH1/s3F8AapfIPNF3kQk7+kw9PWBy+IZOdg5Ug3mkAATy/t0usovzGeCUWTjCz0B+Sj0ekfdvkZ3abBv+U4GaCtJ1iEm6ANQJ6fEzrG/engcKw/wXQvEKxSEKQxRGKE7Izt+DSiwBJMUSm71rguMYhQKrBygOIRStf4TiFFRBvbRGKiQLWP29yRSHKBTtfdBmHs0BUpgvtgF4yRFR+NUKi0XZcYjCeCG2smkzLAHkbRBmP0/Uk26O5YnUActBp1GsAI+S5nRJJJal5K1aAMrq0d6Tm9uI6zjyf75dAe6tx/SsWeD//o2/Ab6IH3/h25pOAAAAAElFTkSuQmCC); -} -main ul li.directory .size, -main ul li.directory [download] { - display: none; -} -main ul li.file:before { - content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAC4SURBVCjPdZFbDsIgEEWnrsMm7oGGfZrohxvU+Iq1TyjU60Bf1pac4Yc5YS4ZAtGWBMk/drQBOVwJlZrWYkLhsB8UV9K0BUrPGy9cWbng2CtEEUmLGppPjRwpbixUKHBiZRS0p+ZGhvs4irNEvWD8heHpbsyDXznPhYFOyTjJc13olIqzZCHBouE0FRMUjA+s1gTjaRgVFpqRwC8mfoXPPEVPS7LbRaJL2y7bOifRCTEli3U7BMWgLzKlW/CuebZPAAAAAElFTkSuQmCC); -} -main ul li.file.image:before { - content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIcSURBVDjLjZO/T1NhFIafc+/trdRaYk1KUEEWjXHRaCSik+E/cDHGzYXB2YHRhMRFY1SYmRgYHZ3VxIRFDYMraMC2hrbQXm7v9+M4UGobiOEk7/adN+9zvnNEVQEQkYvAGBDy/6oBm6rqAVBVeia30jRtGmOctVaPU5qmuri4+AaYAgJVHTKYNsa4drutnU6nr1arpY1GQ6vVqlprdXt7W5eWlvomMv/uw6tSofB4p+NOF0biYtc48tEAhXiuTZzh/s1xyuUyWZbhvWdlZeXt3Nzca14sf6zW6nXf7uzrcfq9s6sLy5+1Xq8fQQKmo1ZCvlAoyo+tXT5tPGO09IckM2zWznH3/AJ3rl5ACInjmGazifceay2VSgWASISSBaz3FIs1RnJlPF18vEG1keDVk1lLFEWICM45wvAfYqTKriqje0lGI01x2qFtuuwkKQ26oEKcCwnDEBFBRA6HfmBw8JWwl3o2ti7j8+u0TUKzcYkrY/n+wyAIEJEjSxEglLyH5r7j+tg8T1oVZr8GzE69JIoiFMiM7zeHYUgQBAMJVBGU77+eYoxhLcvIxnNk6w8xxvDo3hqH+yIieO+HEkQB/qe6bPL5g/cckCkDiBhjOJULhlCGDJIkXX2z+m3GeW4UCnExyxxxHIIOLNLk2WP5AaQXTYDb1tovgHCy8lEUzQS9g1LAO+f2AX+SZudcAjgZOOeJ3jkHJ0zggNpfYEZnU63wHeoAAAAASUVORK5CYII=); -} -main ul li.file.py:before, -main ul li.file.css:before, -main ul li.file.js:before, -main ul li.file.xml:before { - content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHtSURBVDjLjZM9T9tQFIYpQ5eOMBKlW6eWIQipa8RfQKQghEAKqZgKFQgmFn5AWyVDCipVQZC2EqBWlEqdO2RCpAssQBRsx1+1ndix8wFvfW6wcUhQsfTI0j33PD7n+N4uAF2E+/S5RFwG/8Njl24/LyCIOI6j1+v1y0ajgU64cSSTybdBSVAwSMmmacKyLB/DMKBpGkRRZBJBEJBKpXyJl/yABLTBtm1Uq1X2JsrlMnRdhyRJTFCpVEAfSafTTUlQoFs1luxBAkoolUqQZbmtJTYTT/AoHInOfpcwtVtkwcSBgrkDGYph+60oisIq4Xm+VfB0+U/P0Lvj3NwPGfHPTcHMvoyFXwpe7UmQtAqTUCU0D1VVbwTPVk5jY19Fe3ZfQny7CE51WJDXqpjeEUHr45ki9rIqa4dmQiJfMLItGEs/FcQ2ucbRmdnSYy5vYWyLx/w3EaMfLmBaDpMQvuDJ65PY8Dpnz3wpYmLtApzcrIAqmfrEgdZH1grY/a36w6Xz0DKD8ES25/niYS6+wWE8mWfByY8cXmYEJFYLkHUHtVqNQcltAvoLD3v7o/FUHsNvzlnwxfsCEukC/ho3yUHaBN5Buo17Ojtyl+DqrnvQgUtfcC0ZcAdkUeA+ye7eMru9AUGIJPe4zh509UP/AAfNypi8oj/mAAAAAElFTkSuQmCC); -} -main ul li.file.log:before, -main ul li.file.txt:before, -main ul li.file.nfo:before { - content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADoSURBVBgZBcExblNBGAbA2ceegTRBuIKOgiihSZNTcC5LUHAihNJR0kGKCDcYJY6D3/77MdOinTvzAgCw8ysThIvn/VojIyMjIyPP+bS1sUQIV2s95pBDDvmbP/mdkft83tpYguZq5Jh/OeaYh+yzy8hTHvNlaxNNczm+la9OTlar1UdA/+C2A4trRCnD3jS8BB1obq2Gk6GU6QbQAS4BUaYSQAf4bhhKKTFdAzrAOwAxEUAH+KEM01SY3gM6wBsEAQB0gJ+maZoC3gI6iPYaAIBJsiRmHU0AALOeFC3aK2cWAACUXe7+AwO0lc9eTHYTAAAAAElFTkSuQmCC); -} -main ul li.file.rb:before { - content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIESURBVDjLjZNPTxNBGIexid9CEr8DBr8CHEiMVoomJiQkxBIM3dgIiaIESJTGGpVtyXIzHhoM4SIe9KAnEi4clQtJEczWFrbdP93d7s7u/JwZ7XYJBdnkyRxmfs/MvO9OD4AeDvuuMPoY/f/hKiMR5WKCvlarpRNCwiAI0A02D1mW38QlcUE/DzebTdi2HWEYBhqNBqrVqpBUKhUUCoVI0g5f4gK+wHVdeJ4nRo5lWdB1HbVaTQgcxwHfRFGUvxIuCKYfzmqZyZ2wKIO8fQ3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4XoNMaRFFAm4SyTXbmQa2YHQSGacR/pAXO+zGFif4JdlHCpShBzstEz+YfJtmt5cnKKWS/1jnAnT1S38AGTynUFUTzJcAAAAASUVORK5CYII=); -} -main ul li.file.php:before { - content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGsSURBVDjLjZNLSwJRFICtFv2AgggS2vQLDFvVpn0Pi4iItm1KItvWJqW1pYsRemyyNILARbZpm0WtrJ0kbmbUlHmr4+t0z60Z7oSSAx935txzvrlPBwA4EPKMEVwE9z+ME/qtOkbgqtVqUqPRaDWbTegE6YdQKBRkJazAjcWapoGu6xayLIMoilAoFKhEEAQIh8OWxCzuQwEmVKtVMAyDtoiqqiBJEhSLRSqoVCqAP+E47keCAvfU5sDQ8MRs/OYNtr1x2PXdwuJShLLljcFlNAW5HA9khLYp0TUhSYMLHm7PLEDS7zyw3ybRqyfg+TyBtwl2sDP1nKWFiUSazFex3tk45sXjL1Aul20CGTs+syVY37igBbwg03eMsfH9gwSsrZ+Doig2QZsdNiZmMkVrKmwc18azHKELyQrOMEHTDJp8HXu1hostG8dY8PiRngdWMEq467ZwbDxwlIR8XrQLcBvn5k9Gpmd8fn/gHlZWT20C/D4k8eTDB3yVFKjX6xSbgD1If8G970Q3QbvbPehAyxL8SibJEdaxo5dikqvS28sInCjp4Tqb4NV3fgPirZ4pD4KS4wAAAABJRU5ErkJggg==); -} -main ul li .progress { - border: 1px solid #eee; - display: inline-block; - float: left; - height: 7px; - margin: 2px 0 2px 2px; - width: 100px; -} -main ul li .progress .meter { - background: #0c0; - display: block; - height: 7px; - width: 0; -} -main ul li .cancel-upload { - color: #900; - margin: -1px 0 0 5px; -} -.upload { - border: 1px solid #eee; - border-radius: 5px; - color: #999; - font-size: 1.5em; - font-weight: 700; - margin: 0 20px; - padding: 10px 0; - text-align: center; - transition: 0.5s; -} -.upload .create-directory { - color: #22a; - font-size: inherit; - text-decoration: underline; -} -.is-touch .upload .droppable, -.no-drag-drop .upload .droppable { - display: none; -} -.upload [type='file'] { - max-width: 100%; -} -.basicLightbox .basicLightbox__placeholder { - max-height: 95vh; - max-width: 95vw; - overflow: auto; - padding: 0 1em; -} -.basicLightbox.font .basicLightbox__placeholder, -.basicLightbox.text .basicLightbox__placeholder { - background: #fff; -} -body:not([data-disable-checkerboard]) .basicLightbox.image img { - pointer-events: all; -} -body:not([data-disable-checkerboard]) .basicLightbox.image img:hover { - background: #eee - url('data:image/svg+xml,'); - background-size: 30px 30px; -} +.basicLightbox{position:fixed;display:flex;justify-content:center;align-items:center;top:0;left:0;width:100%;height:100vh;background:rgba(0,0,0,.8);opacity:.01;transition:opacity .4s ease;z-index:1000;will-change:opacity}.basicLightbox--visible{opacity:1}.basicLightbox__placeholder{max-width:100%;transform:scale(.9);transition:transform .4s ease;z-index:1;will-change:transform}.basicLightbox__placeholder>img:first-child:last-child,.basicLightbox__placeholder>video:first-child:last-child,.basicLightbox__placeholder>iframe:first-child:last-child{display:block;position:absolute;inset:0;margin:auto;max-width:95%;max-height:95%}.basicLightbox__placeholder>video:first-child:last-child,.basicLightbox__placeholder>iframe:first-child:last-child{pointer-events:auto}.basicLightbox__placeholder>img:first-child:last-child,.basicLightbox__placeholder>video:first-child:last-child{width:auto;height:auto}.basicLightbox--img .basicLightbox__placeholder,.basicLightbox--video .basicLightbox__placeholder,.basicLightbox--iframe .basicLightbox__placeholder{width:100%;height:100%;pointer-events:none}.basicLightbox--visible .basicLightbox__placeholder{transform:scale(1)}code[class*=language-],pre[class*=language-]{color:#000;background:none;text-shadow:0 1px white;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,code[class*=language-] ::-moz-selection{text-shadow:none;background:#b3d4fc}pre[class*=language-]::selection,pre[class*=language-] ::selection,code[class*=language-]::selection,code[class*=language-] ::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:#708090}.token.punctuation{color:#999}.token.namespace{opacity:.7}.token.property,.token.tag,.token.boolean,.token.number,.token.constant,.token.symbol,.token.deleted{color:#905}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color:#690}.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.function,.token.class-name{color:#dd4a68}.token.regex,.token.important,.token.variable{color:#e90}.token.important,.token.bold{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.toast__container{bottom:0;max-width:calc(40vw - 1em);position:fixed;left:1em;z-index:1}@media (max-width: 800px){.toast__container{max-width:calc(100vw - 2em)}}.toast{background:#fff linear-gradient(180deg,transparent,transparent 80%,rgba(0,0,0,.1) 100%);border:1px solid rgba(0,0,0,.1);border-radius:.25em;box-shadow:0 0 #0000004d;clear:both;color:#000c;cursor:pointer;float:left;margin:0 0 1em;min-width:10em;opacity:0;padding:1em 2.5em 1em 1em;position:relative;transform:translateY(100%);transition:all .4s}.toast:before{content:none;float:left;font-size:1.5em;line-height:.8em;margin-left:-.1em;min-width:1.5em;padding-right:.25em;text-align:center}.toast button{background:transparent;border:none;color:inherit;cursor:pointer;max-width:1em;overflow:hidden;padding:0;position:absolute;right:1em;top:1em;white-space:nowrap}.toast button:before{content:"\2716 "}.toast--info{background:#4a90e2 linear-gradient(180deg,transparent,transparent 80%,rgba(0,0,0,.1) 100%);color:#fffc}.toast--info:before{content:"\24d8"}.toast--success{background:#55dd6b linear-gradient(180deg,transparent,transparent 80%,rgba(0,0,0,.1) 100%);color:#606060cc}.toast--success:before{content:"\2713"}.toast--warning{background:#edc25e linear-gradient(180deg,transparent,transparent 80%,rgba(0,0,0,.1) 100%);color:#606060cc}.toast--warning:before{content:"\26a0"}.toast--error{background:#e23645 linear-gradient(180deg,transparent,transparent 80%,rgba(0,0,0,.1) 100%);color:#fffc}.toast--error:before{content:"\26a0"}.toast--show{box-shadow:0 0 .5em #0000004d;opacity:1;transform:translateY(0)}.toast--hide{box-shadow:0 0 1em #0000004d;opacity:0;transform:translate(-100%) translateY(0)}html{font-size:16px}html,body,ul{font-family:Helvetica,Arial,sans-serif;margin:0;padding:0}html,body{min-height:100vh}li{list-style:none}a{color:inherit;text-decoration:none}.hidden{display:none!important}.invisible{opacity:0;pointer-events:none;position:absolute}.loading{background:url(data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibGRzLXNwaW5uZXIiIHdpZHRoPSIxNDNweCIgaGVpZ2h0PSIxNDNweCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIiBzdHlsZT0iYmFja2dyb3VuZDogbm9uZTsiPjxnIHRyYW5zZm9ybT0icm90YXRlKDAgNTAgNTApIj48cmVjdCB4PSI0OCIgeT0iMjQiIHJ4PSI5LjYiIHJ5PSI0LjgiIHdpZHRoPSI0IiBoZWlnaHQ9IjEyIiBmaWxsPSIjNzRjMWY1Ij48YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjE7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JhbnNmb3JtPSJyb3RhdGUoMzAwIDUwIDUwKSI+PHJlY3QgeD0iNDgiIHk9IjI0IiByeD0iOS42IiByeT0iNC44IiB3aWR0aD0iNCIgaGVpZ2h0PSIxMiIgZmlsbD0iIzc0YzFmNSI+PGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ib3BhY2l0eSIgdmFsdWVzPSIxOzAiIGtleVRpbWVzPSIwOzEiIGR1cj0iMXMiIGJlZ2luPSItMC4wODMzMzMzMzMzMzMzMzMzM3MiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIj48L2FuaW1hdGU+PC9yZWN0PjwvZz48ZyB0cmFuc2Zvcm09InJvdGF0ZSgzMzAgNTAgNTApIj48cmVjdCB4PSI0OCIgeT0iMjQiIHJ4PSI5LjYiIHJ5PSI0LjgiIHdpZHRoPSI0IiBoZWlnaHQ9IjEyIiBmaWxsPSIjNzRjMWY1Ij48YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjE7MCIga2V5VGltZXM9IjA7MSIgZHVyPSIxcyIgYmVnaW49IjBzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSI+PC9hbmltYXRlPjwvcmVjdD48L2c+PC9zdmc+) center center no-repeat}.loading>*{opacity:.5}.active{background-color:#ffc}main{padding:20px}main ul{border:1px solid #efefef;border-radius:5px;margin:0;padding:0 5px}main ul li{background:none no-repeat left center;border-top:1px solid #eee;cursor:pointer;display:block;overflow:hidden;padding:5px 0 5px 5px}main ul li:hover{background-color:#fafafa}main ul li:first-child{border-top:0}main ul li.active{color:#000}main ul li.loading{background-size:contain}main ul li.loading *{pointer-events:none}main ul li .size{color:#aaa;display:inline-block;margin:0 10px}main ul li .copy,main ul li .move,main ul li .rename,main ul li .delete,main ul li [download]{background:none no-repeat center center;float:right;height:16px;margin:0 5px;overflow:hidden;text-indent:26px;white-space:nowrap;width:16px}main ul li .copy{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJ1SURBVBgZBcFNiJVVGADg5z3fmTujY5NZBANBIVkZ2J9IKkZFGKRuglq1KaqVtoqoVbSKFi1LoY2QEVSbcqiFWWJqPxL044wUGESQVqJOKerce7/z9jyRmba++tXTy2YmnyphPaYQIJBBNuPWfls8l1/EfxdeOrJnxxAgMtO2148d2ffC+rWlxMqkkwBkQjp7aeT97xf99cfS5ZPzv6w6umfHElQoXdw+qN3KhX90JYIgG30243G6Muo9tOYa999WfdfOLs92x4UHd3163eG3ti8ViIgVmdkNumKiUIOu0AURFIFmdmZgx4ZZt9w6uazOTO+FAklAQQlKhBKhRCgRShfOnL/i5hUjd64Kz2+6XjfRPQkVIJPaEUJGaH1SQu0YZHHqXBq2sdaGHlg9KWoZQ4VMEjWKlBJRQiAb2RUGlBZa66RCFFAh0RBBCIlENiY6QBTRhyypIROo0MZk0hDITFAKWqhdkkGSQt/oG1ChtZSZJCkBSCCEE79+Yv7UnIuXLxiNR8rwnsomFfpGn2SjAUjQkuPzHzp98XMPb9ngplVrHFr42OX5ubpx1943K7Rxaple+2EopBZkBo2MNL3wnie2P6ovvbtntzp48iMb1232+6n9OyuMx72+Z3Zmwn03Fi3pkz5oyWffnjERKzy29lnw4iPvmDuxG/unKoyXWhu3lsNefPNnr0VKAVpy/tK/Fk5/7afTR72yda83DjxjqpuEqxVGV/u/pwfdDS+vG05nZpE0wLXLqn2Lzzn287s237XF3IndBlEd/fEwvB2ZacPOgzvHo3w8Iu5NuRxAkkhpovug1u5Q5SoGfWurDxzf/eW2/wEnITFm/fHryQAAAABJRU5ErkJggg==)}main ul li .move{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWF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DKkMDg3LLUSIJsSKhIi+684CokOtTiMizCGuzEU5K3vOEgKvtBDe/2Pc8H3x8NAM1fQlx4H9M3pcOWp6TXWmM8A7j0629v1nraiAVC0IrrwATKIgs5xyG5QiE+Z4iQdoeU2oAsnqCSO1NSTu+D9VhqRLD8nIB8F0Q2MgmJDyipCzjvYJkIfpN2UBLG8MpP4dxvQ3ZzGuyyBQ2H+AnOOCBd9aL6soh81A5hyYSGWyCFvxUcerqI4S+CvYVOFPMHxLAq8I3qdHVY5LbBhJzEsCrwutpRFBlUHy6wO2tEYtWAzLELPN2P03kjfj3luqDycV2F8AgefWbEnVqEHa2IznSD6BdsVDNStB0lfh0FPoQjdx8RrAqGzC0YprSgxzsUMOY2bf37N/6Ud1Vc9yYcH50CAAAAAElFTkSuQmCC)}main ul li .delete{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJdSURBVDjLpZP7S1NhGMf9W7YfogSJboSEUVCY8zJ31trcps6zTI9bLGJpjp1hmkGNxVz4Q6ildtXKXzJNbJRaRmrXoeWx8tJOTWptnrNryre5YCYuI3rh+8vL+/m8PA/PkwIg5X+y5mJWrxfOUBXm91QZM6UluUmthntHqplxUml2lciF6wrmdHriI0Wx3xw2hAediLwZRWRkCPzdDswaSvGqkGCfq8VEUsEyPF1O8Qu3O7A09RbRvjuIttsRbT6HHzebsDjcB4/JgFFlNv9MnkmsEszodIIY7Oaut2OJcSF68Qx8dgv8tmqEL1gQaaARtp5A+N4NzB0lMXxon/uxbI8gIYjB9HytGYuusfiPIQcN71kjgnW6VeFOkgh3XcHLvAwMSDPohOADdYQJdF1FtLMZPmslvhZJk2ahkgRvq4HHUoWHRDqTEDDl2mDkfheiDgt8pw340/EocuClCuFvboQzb0cwIZgki4KhzlaE6w0InipbVzBfqoK/qRH94i0rgokSFeO11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CUyk2R6omq7bmw8ZvPchAduLcbJODh7IQ3GnaZMIIWxiJA1ZVZdNzIcdtpuUGtXaw7H4ptLnRTgxurIRLQOLa7X1SEKSUY11fa8+fFFV1duakf98eWZXrPx1fuHM1mzVMCRU6kxoVrz7vcv2Ti9VSiWVv90cO9biimrg6E2Io89ffir5yPiwZQL6Eu2b52d2raJ22dveHLXPvO9LRSW+1vcNtOZ7tFGiMwEAAAPHTr59fY71j0yPzlvqp3T1ZGoVeRYjVXnL/7uysrI/62cRssvlMuuAAAAAElFTkSuQmCC)}main ul li input{border:0;padding:0;font-size:1rem}main ul li.directory:before{content:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGrSURBVDjLxZO7ihRBFIa/6u0ZW7GHBUV0UQQTZzd3QdhMQxOfwMRXEANBMNQX0MzAzFAwEzHwARbNFDdwEd31Mj3X7a6uOr9BtzNjYjKBJ6nicP7v3KqcJFaxhBVtZUAK8OHlld2st7Xl3DJPVONP+zEUV4HqL5UDYHr5xvuQAjgl/Qs7TzvOOVAjxjlC+ePSwe6DfbVegLVuT4r14eTr6zvA8xSAoBLzx6pvj4l+DZIezuVkG9fY2H7YRQIMZIBwycmzH1/s3F8AapfIPNF3kQk7+kw9PWBy+IZOdg5Ug3mkAATy/t0usovzGeCUWTjCz0B+Sj0ekfdvkZ3abBv+U4GaCtJ1iEm6ANQJ6fEzrG/engcKw/wXQvEKxSEKQxRGKE7Izt+DSiwBJMUSm71rguMYhQKrBygOIRStf4TiFFRBvbRGKiQLWP29yRSHKBTtfdBmHs0BUpgvtgF4yRFR+NUKi0XZcYjCeCG2smkzLAHkbRBmP0/Uk26O5YnUActBp1GsAI+S5nRJJJal5K1aAMrq0d6Tm9uI6zjyf75dAe6tx/SsWeD//o2/Ab6IH3/h25pOAAAAAElFTkSuQmCC)}main ul li.directory .size,main ul li.directory [download]{display:none}main ul li.file:before{content:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAC4SURBVCjPdZFbDsIgEEWnrsMm7oGGfZrohxvU+Iq1TyjU60Bf1pac4Yc5YS4ZAtGWBMk/drQBOVwJlZrWYkLhsB8UV9K0BUrPGy9cWbng2CtEEUmLGppPjRwpbixUKHBiZRS0p+ZGhvs4irNEvWD8heHpbsyDXznPhYFOyTjJc13olIqzZCHBouE0FRMUjA+s1gTjaRgVFpqRwC8mfoXPPEVPS7LbRaJL2y7bOifRCTEli3U7BMWgLzKlW/CuebZPAAAAAElFTkSuQmCC)}main ul li.file.image:before{content:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIcSURBVDjLjZO/T1NhFIafc+/trdRaYk1KUEEWjXHRaCSik+E/cDHGzYXB2YHRhMRFY1SYmRgYHZ3VxIRFDYMraMC2hrbQXm7v9+M4UGobiOEk7/adN+9zvnNEVQEQkYvAGBDy/6oBm6rqAVBVeia30jRtGmOctVaPU5qmuri4+AaYAgJVHTKYNsa4drutnU6nr1arpY1GQ6vVqlprdXt7W5eWlvomMv/uw6tSofB4p+NOF0biYtc48tEAhXiuTZzh/s1xyuUyWZbhvWdlZeXt3Nzca14sf6zW6nXf7uzrcfq9s6sLy5+1Xq8fQQKmo1ZCvlAoyo+tXT5tPGO09IckM2zWznH3/AJ3rl5ACInjmGazifceay2VSgWASISSBaz3FIs1RnJlPF18vEG1keDVk1lLFEWICM45wvAfYqTKriqje0lGI01x2qFtuuwkKQ26oEKcCwnDEBFBRA6HfmBw8JWwl3o2ti7j8+u0TUKzcYkrY/n+wyAIEJEjSxEglLyH5r7j+tg8T1oVZr8GzE69JIoiFMiM7zeHYUgQBAMJVBGU77+eYoxhLcvIxnNk6w8xxvDo3hqH+yIieO+HEkQB/qe6bPL5g/cckCkDiBhjOJULhlCGDJIkXX2z+m3GeW4UCnExyxxxHIIOLNLk2WP5AaQXTYDb1tovgHCy8lEUzQS9g1LAO+f2AX+SZudcAjgZOOeJ3jkHJ0zggNpfYEZnU63wHeoAAAAASUVORK5CYII=)}main ul li.file.py:before,main ul li.file.css:before,main ul li.file.js:before,main ul li.file.xml:before{content:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHtSURBVDjLjZM9T9tQFIYpQ5eOMBKlW6eWIQipa8RfQKQghEAKqZgKFQgmFn5AWyVDCipVQZC2EqBWlEqdO2RCpAssQBRsx1+1ndix8wFvfW6wcUhQsfTI0j33PD7n+N4uAF2E+/S5RFwG/8Njl24/LyCIOI6j1+v1y0ajgU64cSSTybdBSVAwSMmmacKyLB/DMKBpGkRRZBJBEJBKpXyJl/yABLTBtm1Uq1X2JsrlMnRdhyRJTFCpVEAfSafTTUlQoFs1luxBAkoolUqQZbmtJTYTT/AoHInOfpcwtVtkwcSBgrkDGYph+60oisIq4Xm+VfB0+U/P0Lvj3NwPGfHPTcHMvoyFXwpe7UmQtAqTUCU0D1VVbwTPVk5jY19Fe3ZfQny7CE51WJDXqpjeEUHr45ki9rIqa4dmQiJfMLItGEs/FcQ2ucbRmdnSYy5vYWyLx/w3EaMfLmBaDpMQvuDJ65PY8Dpnz3wpYmLtApzcrIAqmfrEgdZH1grY/a36w6Xz0DKD8ES25/niYS6+wWE8mWfByY8cXmYEJFYLkHUHtVqNQcltAvoLD3v7o/FUHsNvzlnwxfsCEukC/ho3yUHaBN5Buo17Ojtyl+DqrnvQgUtfcC0ZcAdkUeA+ye7eMru9AUGIJPe4zh509UP/AAfNypi8oj/mAAAAAElFTkSuQmCC)}main ul li.file.log:before,main ul li.file.txt:before,main ul li.file.nfo:before{content:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADoSURBVBgZBcExblNBGAbA2ceegTRBuIKOgiihSZNTcC5LUHAihNJR0kGKCDcYJY6D3/77MdOinTvzAgCw8ysThIvn/VojIyMjIyPP+bS1sUQIV2s95pBDDvmbP/mdkft83tpYguZq5Jh/OeaYh+yzy8hTHvNlaxNNczm+la9OTlar1UdA/+C2A4trRCnD3jS8BB1obq2Gk6GU6QbQAS4BUaYSQAf4bhhKKTFdAzrAOwAxEUAH+KEM01SY3gM6wBsEAQB0gJ+maZoC3gI6iPYaAIBJsiRmHU0AALOeFC3aK2cWAACUXe7+AwO0lc9eTHYTAAAAAElFTkSuQmCC)}main ul li.file.rb:before{content:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIESURBVDjLjZNPTxNBGIexid9CEr8DBr8CHEiMVoomJiQkxBIM3dgIiaIESJTGGpVtyXIzHhoM4SIe9KAnEi4clQtJEczWFrbdP93d7s7u/JwZ7XYJBdnkyRxmfs/MvO9OD4AeDvuuMPoY/f/hKiMR5WKCvlarpRNCwiAI0A02D1mW38QlcUE/DzebTdi2HWEYBhqNBqrVqpBUKhUUCoVI0g5f4gK+wHVdeJ4nRo5lWdB1HbVaTQgcxwHfRFGUvxIuCKYfzmqZyZ2wKIO8fQ3/1Uv4Sy/QWliAO/sU9qMZmFMS3HfvT1xJ1ITOZJ9RpQi6+RH0y2fQb19BP23CVhRo+TysXA71+XkcMIk6fAfHK6tQVfWE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II=)}main ul li.file.php:before{content:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGsSURBVDjLjZNLSwJRFICtFv2AgggS2vQLDFvVpn0Pi4iItm1KItvWJqW1pYsRemyyNILARbZpm0WtrJ0kbmbUlHmr4+t0z60Z7oSSAx935txzvrlPBwA4EPKMEVwE9z+ME/qtOkbgqtVqUqPRaDWbTegE6YdQKBRkJazAjcWapoGu6xayLIMoilAoFKhEEAQIh8OWxCzuQwEmVKtVMAyDtoiqqiBJEhSLRSqoVCqAP+E47keCAvfU5sDQ8MRs/OYNtr1x2PXdwuJShLLljcFlNAW5HA9khLYp0TUhSYMLHm7PLEDS7zyw3ybRqyfg+TyBtwl2sDP1nKWFiUSazFex3tk45sXjL1Aul20CGTs+syVY37igBbwg03eMsfH9gwSsrZ+Doig2QZsdNiZmMkVrKmwc18azHKELyQrOMEHTDJp8HXu1hostG8dY8PiRngdWMEq467ZwbDxwlIR8XrQLcBvn5k9Gpmd8fn/gHlZWT20C/D4k8eTDB3yVFKjX6xSbgD1If8G970Q3QbvbPehAyxL8SibJEdaxo5dikqvS28sInCjp4Tqb4NV3fgPirZ4pD4KS4wAAAABJRU5ErkJggg==)}main ul li .progress{border:1px solid #eee;display:inline-block;float:left;height:7px;margin:2px 0 2px 2px;width:100px}main ul li .progress .meter{background:#0c0;display:block;height:7px;width:0}main ul li .cancel-upload{color:#900;margin:-1px 0 0 5px}.upload{border:1px solid #eee;border-radius:5px;color:#999;font-size:1.5em;font-weight:700;margin:0 20px;padding:10px 0;text-align:center;transition:.5s}.upload .create-directory{color:#22a;font-size:inherit;text-decoration:underline}.is-touch .upload .droppable,.no-drag-drop .upload .droppable{display:none}.upload [type=file]{max-width:100%}.basicLightbox .basicLightbox__placeholder{max-height:95vh;max-width:95vw;overflow:auto;padding:0 1em}.basicLightbox.font .basicLightbox__placeholder,.basicLightbox.text .basicLightbox__placeholder{background:#fff}body:not([data-disable-checkerboard]) .basicLightbox.image img{pointer-events:all}body:not([data-disable-checkerboard]) .basicLightbox.image img:hover{background:#eee url('data:image/svg+xml,');background-size:30px 30px} /*# sourceMappingURL=webdav.css.map */ diff --git a/src/lib/DAV.ts b/src/lib/DAV.ts index 9297f32..1d48406 100644 --- a/src/lib/DAV.ts +++ b/src/lib/DAV.ts @@ -2,6 +2,7 @@ import EventObject from './EventObject'; import HTTP from './HTTP'; import Response from './DAV/Response'; import joinPath from './joinPath'; +import trailingSlash from './trailingSlash'; type ConstructorOptions = { bypassCheck?: boolean; @@ -113,9 +114,7 @@ export default class DAV extends EventObject { } async list(uri, bypassCache = false) { - if (!uri.match(/\/$/)) { - uri = `${uri}/`; - } + uri = trailingSlash(uri); if (!bypassCache) { const cached = await this.#cache.get(uri); diff --git a/src/lib/DAV/Collection.ts b/src/lib/DAV/Collection.ts index 4800011..04f416f 100644 --- a/src/lib/DAV/Collection.ts +++ b/src/lib/DAV/Collection.ts @@ -1,6 +1,7 @@ import Entry from './Entry'; import EventObject from '../EventObject'; import joinPath from '../joinPath'; +import trailingSlash from '../trailingSlash'; export default class Collection extends EventObject { #path; @@ -95,13 +96,9 @@ export default class Collection extends EventObject { return; } - if (entry.directory && !destinationFullPath.endsWith('/')) { - destinationFullPath += '/'; - } - const newEntry = new Entry({ directory: entry.directory, - fullPath: destinationFullPath, + fullPath: trailingSlash(destinationFullPath), modified: entry.modified, size: entry.size, mimeType: entry.mimeType, diff --git a/src/lib/DAV/Entry.ts b/src/lib/DAV/Entry.ts index 148995e..b475c55 100644 --- a/src/lib/DAV/Entry.ts +++ b/src/lib/DAV/Entry.ts @@ -188,15 +188,13 @@ export default class Entry extends EventObject { get type(): string { if (!this.#type) { - let type; - const types = { text: /\.(?:te?xt|i?nfo|php|cgi|faq|ini|htaccess|log|md|sql|sfv|conf|sh|pl|pm|py|rb|(?:s?c|sa)ss|js|java|coffee|[sx]?html?|xml)$/i, image: /\.(?:jpe?g|gif|a?png|svg)$/i, video: /\.(?:mp(?:e?g)?4|mov|avi|webm|ogv|mkv)$/i, audio: /\.(?:mp3|wav|ogg|flac|mka)$/i, font: /\.(?:woff2?|eot|[ot]tf)$/i, - pdf: /\.pdf/i, + pdf: /\.pdf$/i, }; for (const [key, value] of Object.entries(types)) { @@ -205,10 +203,6 @@ export default class Entry extends EventObject { } } - if (this.#mimeType && (type = this.#mimeType.split('/').shift())) { - return (this.#type = type); - } - this.#type = 'unknown'; } diff --git a/src/lib/UI/NativeDOM.ts b/src/lib/UI/NativeDOM.ts index d050210..12087fe 100644 --- a/src/lib/UI/NativeDOM.ts +++ b/src/lib/UI/NativeDOM.ts @@ -2,6 +2,7 @@ import Container from './NativeDOM/Container'; import Footer from './NativeDOM/Footer'; import Melba from 'melba-toast'; import UI from './UI'; +import trailingSlash from '../trailingSlash'; export default class NativeDOM extends UI { render(container = new Container(), footer = new Footer()) { @@ -22,7 +23,18 @@ export default class NativeDOM extends UI { return typeof element[`on${eventName}`] === 'function'; }, isTouch = supportsEvent('touchstart'), - supportsDragDrop = supportsEvent('dragstart') && supportsEvent('drop'); + supportsDragDrop = supportsEvent('dragstart') && supportsEvent('drop'), + updateTitle = (title) => { + if (document.title !== title) { + document.title = title; + } + }, + updatePath = (path) => { + if (location.pathname !== path) { + history.pushState(history.state, path, path); + } + }; + // DOM events if (isTouch) { this.container.classList.add('is-touch'); @@ -33,7 +45,32 @@ export default class NativeDOM extends UI { } window.addEventListener('popstate', () => { - this.trigger('go'); + const url = location.pathname; + + element.dispatchEvent( + new CustomEvent('preview:close', { + bubbles: true, + detail: { + preview: true, + }, + }) + ); + + if (url.endsWith('/')) { + return this.trigger('go'); + } + + const path = url.replace(/[^/]+$/, ''); + + this.trigger('go', path, { + bypassPushState: true, + success: () => + this.container + .querySelector(`main ul li[data-full-path="${url}"]`) + ?.dispatchEvent(new CustomEvent('click')), + }); + + // trigger opening file }); if (supportsDragDrop) { @@ -182,7 +219,15 @@ export default class NativeDOM extends UI { this.on( 'go', - async (path = location.pathname, bypassCache = false, failure = null) => { + async ( + path = location.pathname, + { + bypassCache = false, + bypassPushState = false, + failure = null, + success = null, + } = {} + ) => { const prevPath = location.pathname; this.trigger('list:update:request', path); @@ -202,12 +247,39 @@ export default class NativeDOM extends UI { this.trigger('list:update:success', collection); - if (path !== prevPath) { - history.pushState(history.state, path, path); + if (!bypassPushState) { + updatePath(path); } - document.title = `${decodeURIComponent(path)} | WebDAV`; + updateTitle(`${decodeURIComponent(path)} | WebDAV`); + + if (success) { + success(collection); + } } ); + + this.on('preview:opened', (entry) => { + document.body.classList.add('preview-open'); + this.container + .querySelector(`[data-full-path="${entry.fullPath}"]`) + ?.focus(); + + updatePath(entry.fullPath); + updateTitle(`${decodeURIComponent(entry.fullPath)} | WebDAV`); + }); + + this.on('preview:closed', (entry, { preview = false } = {}) => { + if (preview) { + return; + } + + const path = trailingSlash(entry.path); + + document.body.classList.remove('preview-open'); + + updatePath(path); + updateTitle(`${decodeURIComponent(path)} | WebDAV`); + }); } } diff --git a/src/lib/UI/NativeDOM/Footer.ts b/src/lib/UI/NativeDOM/Footer.ts index 27c1ea0..e798404 100644 --- a/src/lib/UI/NativeDOM/Footer.ts +++ b/src/lib/UI/NativeDOM/Footer.ts @@ -1,5 +1,6 @@ import Element from './Element'; import joinPath from '../../joinPath'; +import trailingSlash from '../../trailingSlash'; export default class Footer extends Element { constructor() { @@ -39,7 +40,7 @@ export default class Footer extends Element { this.trigger( 'create-directory', - `${joinPath(location.pathname, directoryName)}/`, + trailingSlash(joinPath(location.pathname, directoryName)), directoryName, location.pathname ); diff --git a/src/lib/UI/NativeDOM/List.ts b/src/lib/UI/NativeDOM/List.ts index 259de55..fe00b1c 100644 --- a/src/lib/UI/NativeDOM/List.ts +++ b/src/lib/UI/NativeDOM/List.ts @@ -40,15 +40,58 @@ export default class List extends Element { const current = this.element.querySelector( `li:focus${supportsFocusWithin ? ', li:focus-within' : ''}` ), - next = current - ? current.nextSibling + isPreview = document.body.classList.contains('preview-open'), + previewItems = [ + ...this.element.querySelectorAll( + 'li:not(.directory):not([data-type="unknown"])' + ), + ], + currentItemIndex = previewItems.indexOf(current), + next = isPreview + ? currentItemIndex > -1 + ? previewItems.slice(currentItemIndex + 1).shift() + : null + : current + ? current.nextElementSibling : this.element.querySelector('li:first-child'), - previous = current ? current.previousSibling : null; + previous = isPreview + ? currentItemIndex > -1 + ? previewItems.slice(0, currentItemIndex).pop() + : null + : current + ? current.previousElementSibling + : null; if (event.key === 'ArrowUp' && previous) { previous.focus(); + + if (isPreview) { + this.element.dispatchEvent( + new CustomEvent('preview:close', { + bubbles: true, + detail: { + preview: true, + }, + }) + ); + + previous.dispatchEvent(new CustomEvent('click')); + } } else if (event.key === 'ArrowDown' && next) { next.focus(); + + if (isPreview) { + this.element.dispatchEvent( + new CustomEvent('preview:close', { + bubbles: true, + detail: { + preview: true, + }, + }) + ); + + next.dispatchEvent(new CustomEvent('click')); + } } }; diff --git a/src/lib/UI/NativeDOM/List/Item.ts b/src/lib/UI/NativeDOM/List/Item.ts index 7f18253..ea1709a 100644 --- a/src/lib/UI/NativeDOM/List/Item.ts +++ b/src/lib/UI/NativeDOM/List/Item.ts @@ -41,7 +41,7 @@ export default class Item extends Element { }); constructor(entry, base64Encoder = btoa) { - super(`
  • + super(`
  • ${entry.title} ${entry.displaySize} @@ -157,7 +157,9 @@ export default class Item extends Element { return; } - this.element.querySelector('[download]').click(); + this.element + .querySelector('[download]') + .dispatchEvent(new CustomEvent('click')); } loading(loading = true) { @@ -180,25 +182,40 @@ export default class Item extends Element { } const launchLightbox = (lightboxContent, onShow = null) => { - const escapeListener = (event) => { + const close = () => lightbox.close(), + escapeListener = (event) => { if (event.key === 'Escape') { - lightbox.close(); + close(); } }, lightbox = BasicLightbox.create(lightboxContent, { className: entry.type, onShow: () => { this.loading(false); + document.addEventListener('keydown', escapeListener); + document.addEventListener('preview:close', (event: CustomEvent) => { + lightbox.preview = event.detail?.preview; + + close(); + }); if (onShow) { onShow(lightbox); } }, - onClose: () => - document.removeEventListener('keydown', escapeListener), + onClose: () => { + document.removeEventListener('keydown', escapeListener); + document.removeEventListener('preview:close', close); + + this.trigger('preview:closed', this.#entry, { + preview: lightbox.preview, + }); + }, }); lightbox.show(); + + this.trigger('preview:opened', this.#entry); }; if (['video', 'audio', 'image', 'font', 'pdf'].includes(entry.type)) { diff --git a/src/lib/trailingSlash.ts b/src/lib/trailingSlash.ts new file mode 100644 index 0000000..5c9d96a --- /dev/null +++ b/src/lib/trailingSlash.ts @@ -0,0 +1,4 @@ +export const trailingSlash = (text: string) => + text.endsWith('/') ? text : `${text}/`; + +export default trailingSlash; diff --git a/src/webdav-min.js b/src/webdav-min.js index 03a08bb..49c6fd0 100644 --- a/src/webdav-min.js +++ b/src/webdav-min.js @@ -1,10 +1,10 @@ -(()=>{var Nt=Object.create;var dt=Object.defineProperty,Gt=Object.defineProperties,Wt=Object.getOwnPropertyDescriptor,Vt=Object.getOwnPropertyDescriptors,Zt=Object.getOwnPropertyNames,Et=Object.getOwnPropertySymbols,Xt=Object.getPrototypeOf,At=Object.prototype.hasOwnProperty,Yt=Object.prototype.propertyIsEnumerable;var xt=(r,t,e)=>t in r?dt(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,N=(r,t)=>{for(var e in t||(t={}))At.call(t,e)&&xt(r,e,t[e]);if(Et)for(var e of Et(t))Yt.call(t,e)&&xt(r,e,t[e]);return r},tt=(r,t)=>Gt(r,Vt(t));var ye=(r=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(r,{get:(t,e)=>(typeof require!="undefined"?require:t)[e]}):r)(function(r){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var ft=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports);var Kt=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Zt(t))!At.call(r,i)&&i!==e&&dt(r,i,{get:()=>t[i],enumerable:!(n=Wt(t,i))||n.enumerable});return r};var pt=(r,t,e)=>(e=r!=null?Nt(Xt(r)):{},Kt(t||!r||!r.__esModule?dt(e,"default",{value:r,enumerable:!0}):e,r));var Ft=(r,t,e)=>{if(!t.has(r))throw TypeError("Cannot "+e)};var u=(r,t,e)=>(Ft(r,t,"read from private field"),e?e.call(r):t.get(r)),b=(r,t,e)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,e)},E=(r,t,e,n)=>(Ft(r,t,"write to private field"),n?n.call(r,e):t.set(r,e),e);var $=(r,t,e)=>new Promise((n,i)=>{var s=p=>{try{f(e.next(p))}catch(x){i(x)}},l=p=>{try{f(e.throw(p))}catch(x){i(x)}},f=p=>p.done?n(p.value):Promise.resolve(p.value).then(s,l);f((e=e.apply(r,t)).next())});var St=ft((Dt,vt)=>{(function(r){typeof Dt=="object"&&typeof vt<"u"?vt.exports=r():typeof define=="function"&&define.amd?define([],r):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).basicLightbox=r()})(function(){return function r(t,e,n){function i(f,p){if(!e[f]){if(!t[f]){var x=typeof ye=="function"&&ye;if(!p&&x)return x(f,!0);if(s)return s(f,!0);var L=new Error("Cannot find module '"+f+"'");throw L.code="MODULE_NOT_FOUND",L}var v=e[f]={exports:{}};t[f][0].call(v.exports,function(A){return i(t[f][1][A]||A)},v,v.exports,r,t,e,n)}return e[f].exports}for(var s=typeof ye=="function"&&ye,l=0;l1&&arguments[1]!==void 0&&arguments[1],p=document.createElement("div");return p.innerHTML=l.trim(),f===!0?p.children:p.firstChild},i=function(l,f){var p=l.children;return p.length===1&&p[0].tagName===f},s=function(l){return(l=l||document.querySelector(".basicLightbox"))!=null&&l.ownerDocument.body.contains(l)===!0};e.visible=s,e.create=function(l,f){var p=function(v,A){var w=n(` -
    +(()=>{var Gt=Object.create;var ft=Object.defineProperty,Wt=Object.defineProperties,Vt=Object.getOwnPropertyDescriptor,Zt=Object.getOwnPropertyDescriptors,Xt=Object.getOwnPropertyNames,xt=Object.getOwnPropertySymbols,Yt=Object.getPrototypeOf,Ft=Object.prototype.hasOwnProperty,Kt=Object.prototype.propertyIsEnumerable;var At=(r,t,e)=>t in r?ft(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,N=(r,t)=>{for(var e in t||(t={}))Ft.call(t,e)&&At(r,e,t[e]);if(xt)for(var e of xt(t))Kt.call(t,e)&&At(r,e,t[e]);return r},rt=(r,t)=>Wt(r,Zt(t));var ye=(r=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(r,{get:(t,e)=>(typeof require!="undefined"?require:t)[e]}):r)(function(r){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var pt=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports);var Jt=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Xt(t))!Ft.call(r,i)&&i!==e&&ft(r,i,{get:()=>t[i],enumerable:!(n=Vt(t,i))||n.enumerable});return r};var gt=(r,t,e)=>(e=r!=null?Gt(Yt(r)):{},Jt(t||!r||!r.__esModule?ft(e,"default",{value:r,enumerable:!0}):e,r));var Lt=(r,t,e)=>{if(!t.has(r))throw TypeError("Cannot "+e)};var c=(r,t,e)=>(Lt(r,t,"read from private field"),e?e.call(r):t.get(r)),E=(r,t,e)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,e)},A=(r,t,e,n)=>(Lt(r,t,"write to private field"),n?n.call(r,e):t.set(r,e),e);var $=(r,t,e)=>new Promise((n,i)=>{var s=l=>{try{u(e.next(l))}catch(p){i(p)}},g=l=>{try{u(e.throw(l))}catch(p){i(p)}},u=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,g);u((e=e.apply(r,t)).next())});var _t=pt((Dt,bt)=>{(function(r){typeof Dt=="object"&&typeof bt<"u"?bt.exports=r():typeof define=="function"&&define.amd?define([],r):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).basicLightbox=r()})(function(){return function r(t,e,n){function i(u,l){if(!e[u]){if(!t[u]){var p=typeof ye=="function"&&ye;if(!l&&p)return p(u,!0);if(s)return s(u,!0);var F=new Error("Cannot find module '"+u+"'");throw F.code="MODULE_NOT_FOUND",F}var y=e[u]={exports:{}};t[u][0].call(y.exports,function(x){return i(t[u][1][x]||x)},y,y.exports,r,t,e,n)}return e[u].exports}for(var s=typeof ye=="function"&&ye,g=0;g1&&arguments[1]!==void 0&&arguments[1],l=document.createElement("div");return l.innerHTML=g.trim(),u===!0?l.children:l.firstChild},i=function(g,u){var l=g.children;return l.length===1&&l[0].tagName===u},s=function(g){return(g=g||document.querySelector(".basicLightbox"))!=null&&g.ownerDocument.body.contains(g)===!0};e.visible=s,e.create=function(g,u){var l=function(y,x){var w=n(` +
    - `)),k=w.querySelector(".basicLightbox__placeholder");v.forEach(function(d){return k.appendChild(d)});var o=i(k,"IMG"),a=i(k,"VIDEO"),c=i(k,"IFRAME");return o===!0&&w.classList.add("basicLightbox--img"),a===!0&&w.classList.add("basicLightbox--video"),c===!0&&w.classList.add("basicLightbox--iframe"),w}(l=function(v){var A=typeof v=="string",w=v instanceof HTMLElement==1;if(A===!1&&w===!1)throw new Error("Content must be a DOM element/node or string");return A===!0?Array.from(n(v,!0)):v.tagName==="TEMPLATE"?[v.content.cloneNode(!0)]:Array.from(v.children)}(l),f=function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if((v=Object.assign({},v)).closable==null&&(v.closable=!0),v.className==null&&(v.className=""),v.onShow==null&&(v.onShow=function(){}),v.onClose==null&&(v.onClose=function(){}),typeof v.closable!="boolean")throw new Error("Property `closable` must be a boolean");if(typeof v.className!="string")throw new Error("Property `className` must be a string");if(typeof v.onShow!="function")throw new Error("Property `onShow` must be a function");if(typeof v.onClose!="function")throw new Error("Property `onClose` must be a function");return v}(f)),x=function(v){return f.onClose(L)!==!1&&function(A,w){return A.classList.remove("basicLightbox--visible"),setTimeout(function(){return s(A)===!1||A.parentElement.removeChild(A),w()},410),!0}(p,function(){if(typeof v=="function")return v(L)})};f.closable===!0&&p.addEventListener("click",function(v){v.target===p&&x()});var L={element:function(){return p},visible:function(){return s(p)},show:function(v){return f.onShow(L)!==!1&&function(A,w){return document.body.appendChild(A),setTimeout(function(){requestAnimationFrame(function(){return A.classList.add("basicLightbox--visible"),w()})},10),!0}(p,function(){if(typeof v=="function")return v(L)})},close:x};return L}},{}]},{},[1])(1)})});var _t=ft((Lr,rt)=>{var or=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};var g=function(r){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,e=0,n={},i={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function o(a){return a instanceof s?new s(a.type,o(a.content),a.alias):Array.isArray(a)?a.map(o):a.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(d){var o=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(d.stack)||[])[1];if(o){var a=document.getElementsByTagName("script");for(var c in a)if(a[c].src==o)return a[c]}return null}},isActive:function(o,a,c){for(var d="no-"+a;o;){var h=o.classList;if(h.contains(a))return!0;if(h.contains(d))return!1;o=o.parentElement}return!!c}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(o,a){var c=i.util.clone(i.languages[o]);for(var d in a)c[d]=a[d];return c},insertBefore:function(o,a,c,d){d=d||i.languages;var h=d[o],y={};for(var F in h)if(h.hasOwnProperty(F)){if(F==a)for(var m in c)c.hasOwnProperty(m)&&(y[m]=c[m]);c.hasOwnProperty(F)||(y[F]=h[F])}var T=d[o];return d[o]=y,i.languages.DFS(i.languages,function(P,z){z===T&&P!=o&&(this[P]=y)}),y},DFS:function o(a,c,d,h){h=h||{};var y=i.util.objId;for(var F in a)if(a.hasOwnProperty(F)){c.call(a,F,a[F],d||F);var m=a[F],T=i.util.type(m);T==="Object"&&!h[y(m)]?(h[y(m)]=!0,o(m,c,null,h)):T==="Array"&&!h[y(m)]&&(h[y(m)]=!0,o(m,c,F,h))}}},plugins:{},highlightAll:function(o,a){i.highlightAllUnder(document,o,a)},highlightAllUnder:function(o,a,c){var d={callback:c,container:o,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",d),d.elements=Array.prototype.slice.apply(d.container.querySelectorAll(d.selector)),i.hooks.run("before-all-elements-highlight",d);for(var h=0,y;y=d.elements[h++];)i.highlightElement(y,a===!0,d.callback)},highlightElement:function(o,a,c){var d=i.util.getLanguage(o),h=i.languages[d];i.util.setLanguage(o,d);var y=o.parentElement;y&&y.nodeName.toLowerCase()==="pre"&&i.util.setLanguage(y,d);var F=o.textContent,m={element:o,language:d,grammar:h,code:F};function T(z){m.highlightedCode=z,i.hooks.run("before-insert",m),m.element.innerHTML=m.highlightedCode,i.hooks.run("after-highlight",m),i.hooks.run("complete",m),c&&c.call(m.element)}if(i.hooks.run("before-sanity-check",m),y=m.element.parentElement,y&&y.nodeName.toLowerCase()==="pre"&&!y.hasAttribute("tabindex")&&y.setAttribute("tabindex","0"),!m.code){i.hooks.run("complete",m),c&&c.call(m.element);return}if(i.hooks.run("before-highlight",m),!m.grammar){T(i.util.encode(m.code));return}if(a&&r.Worker){var P=new Worker(i.filename);P.onmessage=function(z){T(z.data)},P.postMessage(JSON.stringify({language:m.language,code:m.code,immediateClose:!0}))}else T(i.highlight(m.code,m.grammar,m.language))},highlight:function(o,a,c){var d={code:o,grammar:a,language:c};if(i.hooks.run("before-tokenize",d),!d.grammar)throw new Error('The language "'+d.language+'" has no grammar.');return d.tokens=i.tokenize(d.code,d.grammar),i.hooks.run("after-tokenize",d),s.stringify(i.util.encode(d.tokens),d.language)},tokenize:function(o,a){var c=a.rest;if(c){for(var d in c)a[d]=c[d];delete a.rest}var h=new p;return x(h,h.head,o),f(o,h,a,h.head,0),v(h)},hooks:{all:{},add:function(o,a){var c=i.hooks.all;c[o]=c[o]||[],c[o].push(a)},run:function(o,a){var c=i.hooks.all[o];if(!(!c||!c.length))for(var d=0,h;h=c[d++];)h(a)}},Token:s};r.Prism=i;function s(o,a,c,d){this.type=o,this.content=a,this.alias=c,this.length=(d||"").length|0}s.stringify=function o(a,c){if(typeof a=="string")return a;if(Array.isArray(a)){var d="";return a.forEach(function(T){d+=o(T,c)}),d}var h={type:a.type,content:o(a.content,c),tag:"span",classes:["token",a.type],attributes:{},language:c},y=a.alias;y&&(Array.isArray(y)?Array.prototype.push.apply(h.classes,y):h.classes.push(y)),i.hooks.run("wrap",h);var F="";for(var m in h.attributes)F+=" "+m+'="'+(h.attributes[m]||"").replace(/"/g,""")+'"';return"<"+h.tag+' class="'+h.classes.join(" ")+'"'+F+">"+h.content+""};function l(o,a,c,d){o.lastIndex=a;var h=o.exec(c);if(h&&d&&h[1]){var y=h[1].length;h.index+=y,h[0]=h[0].slice(y)}return h}function f(o,a,c,d,h,y){for(var F in c)if(!(!c.hasOwnProperty(F)||!c[F])){var m=c[F];m=Array.isArray(m)?m:[m];for(var T=0;T=y.reach);q+=D.value.length,D=D.next){var V=D.value;if(a.length>o.length)return;if(!(V instanceof s)){var Ke=1,M;if(Xe){if(M=l(ge,q,o,pe),!M||M.index>=o.length)break;var Je=M.index,zt=M.index+M[0].length,Z=q;for(Z+=D.value.length;Je>=Z;)D=D.next,Z+=D.value.length;if(Z-=D.value.length,q=Z,D.value instanceof s)continue;for(var me=D;me!==a.tail&&(Zy.reach&&(y.reach=ct);var et=D.prev;ut&&(et=x(a,et,ut),q+=ut.length),L(a,et,Ke);var Ht=new s(F,z?i.tokenize(Qe,z):Qe,Ye,Qe);if(D=x(a,et,Ht),wt&&x(a,D,wt),Ke>1){var ht={cause:F+","+T,reach:ct};f(o,a,c,D.prev,q,ht),y&&ht.reach>y.reach&&(y.reach=ht.reach)}}}}}}function p(){var o={value:null,prev:null,next:null},a={value:null,prev:o,next:null};o.next=a,this.head=o,this.tail=a,this.length=0}function x(o,a,c){var d=a.next,h={value:c,prev:a,next:d};return a.next=h,d.prev=h,o.length++,h}function L(o,a,c){for(var d=a.next,h=0;h/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};g.languages.markup.tag.inside["attr-value"].inside.entity=g.languages.markup.entity;g.languages.markup.doctype.inside["internal-subset"].inside=g.languages.markup;g.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))});Object.defineProperty(g.languages.markup.tag,"addInlined",{value:function(t,e){var n={};n["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:g.languages[e]},n.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:n}};i["language-"+e]={pattern:/[\s\S]+/,inside:g.languages[e]};var s={};s[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},g.languages.insertBefore("markup","cdata",s)}});Object.defineProperty(g.languages.markup.tag,"addAttribute",{value:function(r,t){g.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:g.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});g.languages.html=g.languages.markup;g.languages.mathml=g.languages.markup;g.languages.svg=g.languages.markup;g.languages.xml=g.languages.extend("markup",{});g.languages.ssml=g.languages.xml;g.languages.atom=g.languages.xml;g.languages.rss=g.languages.xml;(function(r){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var e=r.languages.markup;e&&(e.tag.addInlined("style","css"),e.tag.addAttribute("style","css"))})(g);g.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};g.languages.javascript=g.languages.extend("clike",{"class-name":[g.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});g.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;g.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:g.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:g.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:g.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:g.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:g.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});g.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:g.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});g.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});g.languages.markup&&(g.languages.markup.tag.addInlined("script","javascript"),g.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));g.languages.js=g.languages.javascript;(function(){if(typeof g>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading\u2026",t=function(A,w){return"\u2716 Error "+A+" while fetching file: "+w},e="\u2716 Error: File does not exist or is empty",n={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},i="data-src-status",s="loading",l="loaded",f="failed",p="pre[data-src]:not(["+i+'="'+l+'"]):not(['+i+'="'+s+'"])';function x(A,w,k){var o=new XMLHttpRequest;o.open("GET",A,!0),o.onreadystatechange=function(){o.readyState==4&&(o.status<400&&o.responseText?w(o.responseText):o.status>=400?k(t(o.status,o.statusText)):k(e))},o.send(null)}function L(A){var w=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(A||"");if(w){var k=Number(w[1]),o=w[2],a=w[3];return o?a?[k,Number(a)]:[k,void 0]:[k,k]}}g.hooks.add("before-highlightall",function(A){A.selector+=", "+p}),g.hooks.add("before-sanity-check",function(A){var w=A.element;if(w.matches(p)){A.code="",w.setAttribute(i,s);var k=w.appendChild(document.createElement("CODE"));k.textContent=r;var o=w.getAttribute("data-src"),a=A.language;if(a==="none"){var c=(/\.(\w+)$/.exec(o)||[,"none"])[1];a=n[c]||c}g.util.setLanguage(k,a),g.util.setLanguage(w,a);var d=g.plugins.autoloader;d&&d.loadLanguages(a),x(o,function(h){w.setAttribute(i,l);var y=L(w.getAttribute("data-range"));if(y){var F=h.split(/\r\n?|\n/g),m=y[0],T=y[1]==null?F.length:y[1];m<0&&(m+=F.length),m=Math.max(0,Math.min(m-1,F.length)),T<0&&(T+=F.length),T=Math.max(0,Math.min(T,F.length)),h=F.slice(m,T).join(` -`),w.hasAttribute("data-start")||w.setAttribute("data-start",String(m+1))}k.textContent=h,g.highlightElement(k)},function(h){w.setAttribute(i,f),k.textContent=h})}}),g.plugins.fileHighlight={highlight:function(w){for(var k=(w||document).querySelectorAll(p),o=0,a;a=k[o++];)g.highlightElement(a)}};var v=!1;g.fileHighlight=function(){v||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),v=!0),g.plugins.fileHighlight.highlight.apply(this,arguments)}})()});var Mt=ft(G=>{"use strict";var it=G&&G.__assign||function(){return it=Object.assign||function(r){for(var t,e=1,n=arguments.length;e0&&e.hide()}),this.element.classList.remove(this.toastShowClass),this.element.classList.add(this.toastHideClass),this.trigger("hide"),this.animation){var n=function(){return e.remove()},i=function(){l||(e.element.addEventListener("transitionend",function(){return n()}),l=!0)},s=function(){e.show(),e.element.removeEventListener("transitionstart",function(){return i()}),e.element.removeEventListener("transitionend",function(){return n()}),e.element.removeEventListener("mouseover",function(){return s()}),e.element.addEventListener("mouseout",function(){return e.hide()})},l=!1;this.element.addEventListener("mouseover",function(){return s()}),this.element.addEventListener("transitionstart",function(){return i()});return}this.remove()}},r.prototype.remove=function(){this.element.parentNode===this.container&&(this.container.removeChild(this.element),this.trigger("remove"))},r.prototype.buildClose=function(t){var e=this,n=document.createElement("button");return n.setAttribute("title",t),n.appendChild(document.createTextNode(t)),n.addEventListener("click",function(){return e.hide()}),n},r.prototype.getContainer=function(t){var e=t.containerClass,n=t.containerElement,i=t.root,s=i.querySelector("".concat(n,".").concat(e));if(s)return s;var l=document.createElement(n);return l.classList.add(e),i.appendChild(l),l},r.prototype.on=function(t,e){this.events[t]||(this.events[t]=[]),this.events[t].push(e)},r.prototype.off=function(t,e){if(e===void 0&&(e=null),!e){this.events[t]=[];return}var n=this.events[t].indexOf(e);n===-1&&this.events[t].splice(n,1)},r.prototype.trigger=function(t){for(var e=this,n=[],i=1;i-1});var Lt,Tt;function ve(r){if(typeof r!="string"&&(r=String(r)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(r)||r==="")throw new TypeError('Invalid character in header field name: "'+r+'"');return r.toLowerCase()}function mt(r){return typeof r!="string"&&(r=String(r)),r}function yt(r){var t={next:function(){var e=r.shift();return{done:e===void 0,value:e}}};return I.iterable&&(t[Symbol.iterator]=function(){return t}),t}function C(r){this.map={},r instanceof C?r.forEach(function(t,e){this.append(e,t)},this):Array.isArray(r)?r.forEach(function(t){this.append(t[0],t[1])},this):r&&Object.getOwnPropertyNames(r).forEach(function(t){this.append(t,r[t])},this)}C.prototype.append=function(r,t){r=ve(r),t=mt(t);var e=this.map[r];this.map[r]=e?e+", "+t:t};C.prototype.delete=function(r){delete this.map[ve(r)]};C.prototype.get=function(r){return r=ve(r),this.has(r)?this.map[r]:null};C.prototype.has=function(r){return this.map.hasOwnProperty(ve(r))};C.prototype.set=function(r,t){this.map[ve(r)]=mt(t)};C.prototype.forEach=function(r,t){for(var e in this.map)this.map.hasOwnProperty(e)&&r.call(t,this.map[e],e,this)};C.prototype.keys=function(){var r=[];return this.forEach(function(t,e){r.push(e)}),yt(r)};C.prototype.values=function(){var r=[];return this.forEach(function(t){r.push(t)}),yt(r)};C.prototype.entries=function(){var r=[];return this.forEach(function(t,e){r.push([e,t])}),yt(r)};I.iterable&&(C.prototype[Symbol.iterator]=C.prototype.entries);function gt(r){if(r.bodyUsed)return Promise.reject(new TypeError("Already read"));r.bodyUsed=!0}function $t(r){return new Promise(function(t,e){r.onload=function(){t(r.result)},r.onerror=function(){e(r.error)}})}function Qt(r){var t=new FileReader,e=$t(t);return t.readAsArrayBuffer(r),e}function er(r){var t=new FileReader,e=$t(t);return t.readAsText(r),e}function tr(r){for(var t=new Uint8Array(r),e=new Array(t.length),n=0;n-1?t:r}function ee(r,t){if(!(this instanceof ee))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var e=t.body;if(r instanceof ee){if(r.bodyUsed)throw new TypeError("Already read");this.url=r.url,this.credentials=r.credentials,t.headers||(this.headers=new C(r.headers)),this.method=r.method,this.mode=r.mode,this.signal=r.signal,!e&&r._bodyInit!=null&&(e=r._bodyInit,r.bodyUsed=!0)}else this.url=String(r);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new C(t.headers)),this.method=nr(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&e)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(e),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var i=/\?/;this.url+=(i.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}ee.prototype.clone=function(){return new ee(this,{body:this._bodyInit})};function ir(r){var t=new FormData;return r.trim().split("&").forEach(function(e){if(e){var n=e.split("="),i=n.shift().replace(/\+/g," "),s=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(s))}}),t}function sr(r){var t=new C,e=r.replace(/\r?\n[\t ]+/g," ");return e.split("\r").map(function(n){return n.indexOf(` -`)===0?n.substr(1,n.length):n}).forEach(function(n){var i=n.split(":"),s=i.shift().trim();if(s){var l=i.join(":").trim();t.append(s,l)}}),t}Pt.call(ee.prototype);function H(r,t){if(!(this instanceof H))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new C(t.headers),this.url=t.url||"",this._initBody(r)}Pt.call(H.prototype);H.prototype.clone=function(){return new H(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new C(this.headers),url:this.url})};H.error=function(){var r=new H(null,{status:0,statusText:""});return r.type="error",r};var ar=[301,302,303,307,308];H.redirect=function(r,t){if(ar.indexOf(t)===-1)throw new RangeError("Invalid status code");return new H(null,{status:t,headers:{location:r}})};var Q=S.DOMException;try{new Q}catch{Q=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},Q.prototype=Object.create(Error.prototype),Q.prototype.constructor=Q}function Ct(r,t){return new Promise(function(e,n){var i=new ee(r,t);if(i.signal&&i.signal.aborted)return n(new Q("Aborted","AbortError"));var s=new XMLHttpRequest;function l(){s.abort()}s.onload=function(){var p={status:s.status,statusText:s.statusText,headers:sr(s.getAllResponseHeaders()||"")};p.url="responseURL"in s?s.responseURL:p.headers.get("X-Request-URL");var x="response"in s?s.response:s.responseText;setTimeout(function(){e(new H(x,p))},0)},s.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},s.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},s.onabort=function(){setTimeout(function(){n(new Q("Aborted","AbortError"))},0)};function f(p){try{return p===""&&S.location.href?S.location.href:p}catch{return p}}s.open(i.method,f(i.url),!0),i.credentials==="include"?s.withCredentials=!0:i.credentials==="omit"&&(s.withCredentials=!1),"responseType"in s&&(I.blob?s.responseType="blob":I.arrayBuffer&&i.headers.get("Content-Type")&&i.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(s.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof C)?Object.getOwnPropertyNames(t.headers).forEach(function(p){s.setRequestHeader(p,mt(t.headers[p]))}):i.headers.forEach(function(p,x){s.setRequestHeader(x,p)}),i.signal&&(i.signal.addEventListener("abort",l),s.onreadystatechange=function(){s.readyState===4&&i.signal.removeEventListener("abort",l)}),s.send(typeof i._bodyInit>"u"?null:i._bodyInit)})}Ct.polyfill=!0;S.fetch||(S.fetch=Ct,S.Headers=C,S.Request=ee,S.Response=H);var te={},O=class{hasEvent(t){return t in te}on(t,e){this.hasEvent(t)||(te[t]=[]),te[t].push(e)}off(t,e=null){if(!!this.hasEvent(t)){if(e===null)return te[t]=[];te[t]=te[t].filter(n=>n!==e)}}trigger(t,...e){if(this.hasEvent(t)){let n=!1;te[t].forEach(i=>{n||i(...e)===!1&&(n=!0)})}}};var be,U=class extends O{constructor(e=null){super();b(this,be,void 0);e!==null&&E(this,be,this.createNodeFromString(e))}get element(){return u(this,be)}createNodesFromString(e){let n=document.createElement("div"),i=document.createDocumentFragment();n.innerHTML=e;for(let s of n.childNodes)i.appendChild(s);return i}createNodeFromString(e){return this.createNodesFromString(e).firstChild}emptyNode(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild)}};be=new WeakMap;var Ot=pt(St());var Bt=pt(_t());var lr=r=>r.replace(/^\/+|\/+$/g,""),ur=(...r)=>`/${r.map(lr).filter(t=>t).join("/")}`,_=ur;var nt,B,Ee,we=class extends U{constructor(e,n=btoa){super(`
  • + `)),k=w.querySelector(".basicLightbox__placeholder");y.forEach(function(f){return k.appendChild(f)});var o=i(k,"IMG"),a=i(k,"VIDEO"),d=i(k,"IFRAME");return o===!0&&w.classList.add("basicLightbox--img"),a===!0&&w.classList.add("basicLightbox--video"),d===!0&&w.classList.add("basicLightbox--iframe"),w}(g=function(y){var x=typeof y=="string",w=y instanceof HTMLElement==1;if(x===!1&&w===!1)throw new Error("Content must be a DOM element/node or string");return x===!0?Array.from(n(y,!0)):y.tagName==="TEMPLATE"?[y.content.cloneNode(!0)]:Array.from(y.children)}(g),u=function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if((y=Object.assign({},y)).closable==null&&(y.closable=!0),y.className==null&&(y.className=""),y.onShow==null&&(y.onShow=function(){}),y.onClose==null&&(y.onClose=function(){}),typeof y.closable!="boolean")throw new Error("Property `closable` must be a boolean");if(typeof y.className!="string")throw new Error("Property `className` must be a string");if(typeof y.onShow!="function")throw new Error("Property `onShow` must be a function");if(typeof y.onClose!="function")throw new Error("Property `onClose` must be a function");return y}(u)),p=function(y){return u.onClose(F)!==!1&&function(x,w){return x.classList.remove("basicLightbox--visible"),setTimeout(function(){return s(x)===!1||x.parentElement.removeChild(x),w()},410),!0}(l,function(){if(typeof y=="function")return y(F)})};u.closable===!0&&l.addEventListener("click",function(y){y.target===l&&p()});var F={element:function(){return l},visible:function(){return s(l)},show:function(y){return u.onShow(F)!==!1&&function(x,w){return document.body.appendChild(x),setTimeout(function(){requestAnimationFrame(function(){return x.classList.add("basicLightbox--visible"),w()})},10),!0}(l,function(){if(typeof y=="function")return y(F)})},close:p};return F}},{}]},{},[1])(1)})});var Ot=pt((Pr,nt)=>{var lr=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};var m=function(r){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,e=0,n={},i={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function o(a){return a instanceof s?new s(a.type,o(a.content),a.alias):Array.isArray(a)?a.map(o):a.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(f){var o=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(f.stack)||[])[1];if(o){var a=document.getElementsByTagName("script");for(var d in a)if(a[d].src==o)return a[d]}return null}},isActive:function(o,a,d){for(var f="no-"+a;o;){var h=o.classList;if(h.contains(a))return!0;if(h.contains(f))return!1;o=o.parentElement}return!!d}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(o,a){var d=i.util.clone(i.languages[o]);for(var f in a)d[f]=a[f];return d},insertBefore:function(o,a,d,f){f=f||i.languages;var h=f[o],b={};for(var L in h)if(h.hasOwnProperty(L)){if(L==a)for(var v in d)d.hasOwnProperty(v)&&(b[v]=d[v]);d.hasOwnProperty(L)||(b[L]=h[L])}var P=f[o];return f[o]=b,i.languages.DFS(i.languages,function(T,z){z===P&&T!=o&&(this[T]=b)}),b},DFS:function o(a,d,f,h){h=h||{};var b=i.util.objId;for(var L in a)if(a.hasOwnProperty(L)){d.call(a,L,a[L],f||L);var v=a[L],P=i.util.type(v);P==="Object"&&!h[b(v)]?(h[b(v)]=!0,o(v,d,null,h)):P==="Array"&&!h[b(v)]&&(h[b(v)]=!0,o(v,d,L,h))}}},plugins:{},highlightAll:function(o,a){i.highlightAllUnder(document,o,a)},highlightAllUnder:function(o,a,d){var f={callback:d,container:o,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",f),f.elements=Array.prototype.slice.apply(f.container.querySelectorAll(f.selector)),i.hooks.run("before-all-elements-highlight",f);for(var h=0,b;b=f.elements[h++];)i.highlightElement(b,a===!0,f.callback)},highlightElement:function(o,a,d){var f=i.util.getLanguage(o),h=i.languages[f];i.util.setLanguage(o,f);var b=o.parentElement;b&&b.nodeName.toLowerCase()==="pre"&&i.util.setLanguage(b,f);var L=o.textContent,v={element:o,language:f,grammar:h,code:L};function P(z){v.highlightedCode=z,i.hooks.run("before-insert",v),v.element.innerHTML=v.highlightedCode,i.hooks.run("after-highlight",v),i.hooks.run("complete",v),d&&d.call(v.element)}if(i.hooks.run("before-sanity-check",v),b=v.element.parentElement,b&&b.nodeName.toLowerCase()==="pre"&&!b.hasAttribute("tabindex")&&b.setAttribute("tabindex","0"),!v.code){i.hooks.run("complete",v),d&&d.call(v.element);return}if(i.hooks.run("before-highlight",v),!v.grammar){P(i.util.encode(v.code));return}if(a&&r.Worker){var T=new Worker(i.filename);T.onmessage=function(z){P(z.data)},T.postMessage(JSON.stringify({language:v.language,code:v.code,immediateClose:!0}))}else P(i.highlight(v.code,v.grammar,v.language))},highlight:function(o,a,d){var f={code:o,grammar:a,language:d};if(i.hooks.run("before-tokenize",f),!f.grammar)throw new Error('The language "'+f.language+'" has no grammar.');return f.tokens=i.tokenize(f.code,f.grammar),i.hooks.run("after-tokenize",f),s.stringify(i.util.encode(f.tokens),f.language)},tokenize:function(o,a){var d=a.rest;if(d){for(var f in d)a[f]=d[f];delete a.rest}var h=new l;return p(h,h.head,o),u(o,h,a,h.head,0),y(h)},hooks:{all:{},add:function(o,a){var d=i.hooks.all;d[o]=d[o]||[],d[o].push(a)},run:function(o,a){var d=i.hooks.all[o];if(!(!d||!d.length))for(var f=0,h;h=d[f++];)h(a)}},Token:s};r.Prism=i;function s(o,a,d,f){this.type=o,this.content=a,this.alias=d,this.length=(f||"").length|0}s.stringify=function o(a,d){if(typeof a=="string")return a;if(Array.isArray(a)){var f="";return a.forEach(function(P){f+=o(P,d)}),f}var h={type:a.type,content:o(a.content,d),tag:"span",classes:["token",a.type],attributes:{},language:d},b=a.alias;b&&(Array.isArray(b)?Array.prototype.push.apply(h.classes,b):h.classes.push(b)),i.hooks.run("wrap",h);var L="";for(var v in h.attributes)L+=" "+v+'="'+(h.attributes[v]||"").replace(/"/g,""")+'"';return"<"+h.tag+' class="'+h.classes.join(" ")+'"'+L+">"+h.content+""};function g(o,a,d,f){o.lastIndex=a;var h=o.exec(d);if(h&&f&&h[1]){var b=h[1].length;h.index+=b,h[0]=h[0].slice(b)}return h}function u(o,a,d,f,h,b){for(var L in d)if(!(!d.hasOwnProperty(L)||!d[L])){var v=d[L];v=Array.isArray(v)?v:[v];for(var P=0;P=b.reach);B+=S.value.length,S=S.next){var V=S.value;if(a.length>o.length)return;if(!(V instanceof s)){var Je=1,M;if(Ye){if(M=g(ge,B,o,pe),!M||M.index>=o.length)break;var Qe=M.index,Ht=M.index+M[0].length,Z=B;for(Z+=S.value.length;Qe>=Z;)S=S.next,Z+=S.value.length;if(Z-=S.value.length,B=Z,S.value instanceof s)continue;for(var me=S;me!==a.tail&&(Zb.reach&&(b.reach=dt);var tt=S.prev;ct&&(tt=p(a,tt,ct),B+=ct.length),F(a,tt,Je);var Nt=new s(L,z?i.tokenize(et,z):et,Ke,et);if(S=p(a,tt,Nt),Et&&p(a,S,Et),Je>1){var ht={cause:L+","+P,reach:dt};u(o,a,d,S.prev,B,ht),b&&ht.reach>b.reach&&(b.reach=ht.reach)}}}}}}function l(){var o={value:null,prev:null,next:null},a={value:null,prev:o,next:null};o.next=a,this.head=o,this.tail=a,this.length=0}function p(o,a,d){var f=a.next,h={value:d,prev:a,next:f};return a.next=h,f.prev=h,o.length++,h}function F(o,a,d){for(var f=a.next,h=0;h/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};m.languages.markup.tag.inside["attr-value"].inside.entity=m.languages.markup.entity;m.languages.markup.doctype.inside["internal-subset"].inside=m.languages.markup;m.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))});Object.defineProperty(m.languages.markup.tag,"addInlined",{value:function(t,e){var n={};n["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:m.languages[e]},n.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:n}};i["language-"+e]={pattern:/[\s\S]+/,inside:m.languages[e]};var s={};s[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},m.languages.insertBefore("markup","cdata",s)}});Object.defineProperty(m.languages.markup.tag,"addAttribute",{value:function(r,t){m.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:m.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});m.languages.html=m.languages.markup;m.languages.mathml=m.languages.markup;m.languages.svg=m.languages.markup;m.languages.xml=m.languages.extend("markup",{});m.languages.ssml=m.languages.xml;m.languages.atom=m.languages.xml;m.languages.rss=m.languages.xml;(function(r){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var e=r.languages.markup;e&&(e.tag.addInlined("style","css"),e.tag.addAttribute("style","css"))})(m);m.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};m.languages.javascript=m.languages.extend("clike",{"class-name":[m.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});m.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;m.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:m.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:m.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:m.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:m.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:m.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});m.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:m.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});m.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});m.languages.markup&&(m.languages.markup.tag.addInlined("script","javascript"),m.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));m.languages.js=m.languages.javascript;(function(){if(typeof m>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading\u2026",t=function(x,w){return"\u2716 Error "+x+" while fetching file: "+w},e="\u2716 Error: File does not exist or is empty",n={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},i="data-src-status",s="loading",g="loaded",u="failed",l="pre[data-src]:not(["+i+'="'+g+'"]):not(['+i+'="'+s+'"])';function p(x,w,k){var o=new XMLHttpRequest;o.open("GET",x,!0),o.onreadystatechange=function(){o.readyState==4&&(o.status<400&&o.responseText?w(o.responseText):o.status>=400?k(t(o.status,o.statusText)):k(e))},o.send(null)}function F(x){var w=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(x||"");if(w){var k=Number(w[1]),o=w[2],a=w[3];return o?a?[k,Number(a)]:[k,void 0]:[k,k]}}m.hooks.add("before-highlightall",function(x){x.selector+=", "+l}),m.hooks.add("before-sanity-check",function(x){var w=x.element;if(w.matches(l)){x.code="",w.setAttribute(i,s);var k=w.appendChild(document.createElement("CODE"));k.textContent=r;var o=w.getAttribute("data-src"),a=x.language;if(a==="none"){var d=(/\.(\w+)$/.exec(o)||[,"none"])[1];a=n[d]||d}m.util.setLanguage(k,a),m.util.setLanguage(w,a);var f=m.plugins.autoloader;f&&f.loadLanguages(a),p(o,function(h){w.setAttribute(i,g);var b=F(w.getAttribute("data-range"));if(b){var L=h.split(/\r\n?|\n/g),v=b[0],P=b[1]==null?L.length:b[1];v<0&&(v+=L.length),v=Math.max(0,Math.min(v-1,L.length)),P<0&&(P+=L.length),P=Math.max(0,Math.min(P,L.length)),h=L.slice(v,P).join(` +`),w.hasAttribute("data-start")||w.setAttribute("data-start",String(v+1))}k.textContent=h,m.highlightElement(k)},function(h){w.setAttribute(i,u),k.textContent=h})}}),m.plugins.fileHighlight={highlight:function(w){for(var k=(w||document).querySelectorAll(l),o=0,a;a=k[o++];)m.highlightElement(a)}};var y=!1;m.fileHighlight=function(){y||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),y=!0),m.plugins.fileHighlight.highlight.apply(this,arguments)}})()});var Ut=pt(G=>{"use strict";var st=G&&G.__assign||function(){return st=Object.assign||function(r){for(var t,e=1,n=arguments.length;e0&&e.hide()}),this.element.classList.remove(this.toastShowClass),this.element.classList.add(this.toastHideClass),this.trigger("hide"),this.animation){var n=function(){return e.remove()},i=function(){g||(e.element.addEventListener("transitionend",function(){return n()}),g=!0)},s=function(){e.show(),e.element.removeEventListener("transitionstart",function(){return i()}),e.element.removeEventListener("transitionend",function(){return n()}),e.element.removeEventListener("mouseover",function(){return s()}),e.element.addEventListener("mouseout",function(){return e.hide()})},g=!1;this.element.addEventListener("mouseover",function(){return s()}),this.element.addEventListener("transitionstart",function(){return i()});return}this.remove()}},r.prototype.remove=function(){this.element.parentNode===this.container&&(this.container.removeChild(this.element),this.trigger("remove"))},r.prototype.buildClose=function(t){var e=this,n=document.createElement("button");return n.setAttribute("title",t),n.appendChild(document.createTextNode(t)),n.addEventListener("click",function(){return e.hide()}),n},r.prototype.getContainer=function(t){var e=t.containerClass,n=t.containerElement,i=t.root,s=i.querySelector("".concat(n,".").concat(e));if(s)return s;var g=document.createElement(n);return g.classList.add(e),i.appendChild(g),g},r.prototype.on=function(t,e){this.events[t]||(this.events[t]=[]),this.events[t].push(e)},r.prototype.off=function(t,e){if(e===void 0&&(e=null),!e){this.events[t]=[];return}var n=this.events[t].indexOf(e);n===-1&&this.events[t].splice(n,1)},r.prototype.trigger=function(t){for(var e=this,n=[],i=1;i-1});var kt,$t;function ve(r){if(typeof r!="string"&&(r=String(r)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(r)||r==="")throw new TypeError('Invalid character in header field name: "'+r+'"');return r.toLowerCase()}function yt(r){return typeof r!="string"&&(r=String(r)),r}function vt(r){var t={next:function(){var e=r.shift();return{done:e===void 0,value:e}}};return q.iterable&&(t[Symbol.iterator]=function(){return t}),t}function C(r){this.map={},r instanceof C?r.forEach(function(t,e){this.append(e,t)},this):Array.isArray(r)?r.forEach(function(t){this.append(t[0],t[1])},this):r&&Object.getOwnPropertyNames(r).forEach(function(t){this.append(t,r[t])},this)}C.prototype.append=function(r,t){r=ve(r),t=yt(t);var e=this.map[r];this.map[r]=e?e+", "+t:t};C.prototype.delete=function(r){delete this.map[ve(r)]};C.prototype.get=function(r){return r=ve(r),this.has(r)?this.map[r]:null};C.prototype.has=function(r){return this.map.hasOwnProperty(ve(r))};C.prototype.set=function(r,t){this.map[ve(r)]=yt(t)};C.prototype.forEach=function(r,t){for(var e in this.map)this.map.hasOwnProperty(e)&&r.call(t,this.map[e],e,this)};C.prototype.keys=function(){var r=[];return this.forEach(function(t,e){r.push(e)}),vt(r)};C.prototype.values=function(){var r=[];return this.forEach(function(t){r.push(t)}),vt(r)};C.prototype.entries=function(){var r=[];return this.forEach(function(t,e){r.push([e,t])}),vt(r)};q.iterable&&(C.prototype[Symbol.iterator]=C.prototype.entries);function mt(r){if(r.bodyUsed)return Promise.reject(new TypeError("Already read"));r.bodyUsed=!0}function Tt(r){return new Promise(function(t,e){r.onload=function(){t(r.result)},r.onerror=function(){e(r.error)}})}function er(r){var t=new FileReader,e=Tt(t);return t.readAsArrayBuffer(r),e}function tr(r){var t=new FileReader,e=Tt(t);return t.readAsText(r),e}function rr(r){for(var t=new Uint8Array(r),e=new Array(t.length),n=0;n-1?t:r}function ee(r,t){if(!(this instanceof ee))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var e=t.body;if(r instanceof ee){if(r.bodyUsed)throw new TypeError("Already read");this.url=r.url,this.credentials=r.credentials,t.headers||(this.headers=new C(r.headers)),this.method=r.method,this.mode=r.mode,this.signal=r.signal,!e&&r._bodyInit!=null&&(e=r._bodyInit,r.bodyUsed=!0)}else this.url=String(r);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new C(t.headers)),this.method=ir(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&e)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(e),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var i=/\?/;this.url+=(i.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}ee.prototype.clone=function(){return new ee(this,{body:this._bodyInit})};function sr(r){var t=new FormData;return r.trim().split("&").forEach(function(e){if(e){var n=e.split("="),i=n.shift().replace(/\+/g," "),s=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(s))}}),t}function ar(r){var t=new C,e=r.replace(/\r?\n[\t ]+/g," ");return e.split("\r").map(function(n){return n.indexOf(` +`)===0?n.substr(1,n.length):n}).forEach(function(n){var i=n.split(":"),s=i.shift().trim();if(s){var g=i.join(":").trim();t.append(s,g)}}),t}Ct.call(ee.prototype);function H(r,t){if(!(this instanceof H))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new C(t.headers),this.url=t.url||"",this._initBody(r)}Ct.call(H.prototype);H.prototype.clone=function(){return new H(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new C(this.headers),url:this.url})};H.error=function(){var r=new H(null,{status:0,statusText:""});return r.type="error",r};var or=[301,302,303,307,308];H.redirect=function(r,t){if(or.indexOf(t)===-1)throw new RangeError("Invalid status code");return new H(null,{status:t,headers:{location:r}})};var Q=_.DOMException;try{new Q}catch{Q=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},Q.prototype=Object.create(Error.prototype),Q.prototype.constructor=Q}function St(r,t){return new Promise(function(e,n){var i=new ee(r,t);if(i.signal&&i.signal.aborted)return n(new Q("Aborted","AbortError"));var s=new XMLHttpRequest;function g(){s.abort()}s.onload=function(){var l={status:s.status,statusText:s.statusText,headers:ar(s.getAllResponseHeaders()||"")};l.url="responseURL"in s?s.responseURL:l.headers.get("X-Request-URL");var p="response"in s?s.response:s.responseText;setTimeout(function(){e(new H(p,l))},0)},s.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},s.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},s.onabort=function(){setTimeout(function(){n(new Q("Aborted","AbortError"))},0)};function u(l){try{return l===""&&_.location.href?_.location.href:l}catch{return l}}s.open(i.method,u(i.url),!0),i.credentials==="include"?s.withCredentials=!0:i.credentials==="omit"&&(s.withCredentials=!1),"responseType"in s&&(q.blob?s.responseType="blob":q.arrayBuffer&&i.headers.get("Content-Type")&&i.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(s.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof C)?Object.getOwnPropertyNames(t.headers).forEach(function(l){s.setRequestHeader(l,yt(t.headers[l]))}):i.headers.forEach(function(l,p){s.setRequestHeader(p,l)}),i.signal&&(i.signal.addEventListener("abort",g),s.onreadystatechange=function(){s.readyState===4&&i.signal.removeEventListener("abort",g)}),s.send(typeof i._bodyInit>"u"?null:i._bodyInit)})}St.polyfill=!0;_.fetch||(_.fetch=St,_.Headers=C,_.Request=ee,_.Response=H);var te={},I=class{hasEvent(t){return t in te}on(t,e){this.hasEvent(t)||(te[t]=[]),te[t].push(e)}off(t,e=null){if(!!this.hasEvent(t)){if(e===null)return te[t]=[];te[t]=te[t].filter(n=>n!==e)}}trigger(t,...e){if(this.hasEvent(t)){let n=!1;te[t].forEach(i=>{n||i(...e)===!1&&(n=!0)})}}};var be,U=class extends I{constructor(e=null){super();E(this,be,void 0);e!==null&&A(this,be,this.createNodeFromString(e))}get element(){return c(this,be)}createNodesFromString(e){let n=document.createElement("div"),i=document.createDocumentFragment();n.innerHTML=e;for(let s of n.childNodes)i.appendChild(s);return i}createNodeFromString(e){return this.createNodesFromString(e).firstChild}emptyNode(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild)}};be=new WeakMap;var It=gt(_t());var qt=gt(Ot());var ur=r=>r.replace(/^\/+|\/+$/g,""),cr=(...r)=>`/${r.map(ur).filter(t=>t).join("/")}`,O=cr;var it,D,Ee,we=class extends U{constructor(e,n=btoa){super(`
  • ${e.title} ${e.displaySize} @@ -13,17 +13,17 @@ -
  • `);b(this,nt,void 0);b(this,B,void 0);b(this,Ee,Object.freeze({video:e=>``,audio:e=>``,image:e=>`${e.title}`,font:e=>{let n={eot:"embedded-opentype",otf:"opentype",ttf:"truetype"},i=e.name.replace(/^.+\.([^.]+)$/,"$1").toLowerCase(),s=e.fullPath.replace(/\W+/g,"_"),l=`The quick brown fox jumps over the lazy dog. 0123456789
    +`);E(this,it,void 0);E(this,D,void 0);E(this,Ee,Object.freeze({video:e=>``,audio:e=>``,image:e=>`${e.title}`,font:e=>{let n={eot:"embedded-opentype",otf:"opentype",ttf:"truetype"},i=e.name.replace(/^.+\.([^.]+)$/,"$1").toLowerCase(),s=e.fullPath.replace(/\W+/g,"_"),g=`The quick brown fox jumps over the lazy dog. 0123456789
    Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz`;return`

    ${e.title}

    -

    ${l}

    -

    ${l}

    -

    ${l}

    -

    ${l}

    `},text:(e,n)=>`
    ${n.replace(/[<>]/g,i=>({"<":"<",">":">"})[i])}
    `,pdf:e=>``}));E(this,nt,n),E(this,B,e),this.element.classList.add(e.directory?"directory":"file",e.type?e.type:"unknown"),e.placeholder&&this.element.classList.add("loading"),e.del||this.element.querySelector(".delete").setAttribute("hidden",""),e.rename||this.element.querySelector(".rename").setAttribute("hidden",""),this.bindEvents()}bindEvents(e=this.element){this.on("entry:update",n=>{n===u(this,B)&&this.update()}),this.on("move:failed",n=>{n===u(this,B).fullPath&&this.loading(!1)}),this.on("delete:failed",n=>{n===u(this,B).fullPath&&this.loading(!1)}),e.addEventListener("click",()=>this.open()),e.querySelector("[download]").addEventListener("click",n=>n.stopPropagation()),e.querySelector(".delete").addEventListener("click",n=>{n.preventDefault(),n.stopPropagation(),this.del()}),e.querySelector(".rename").addEventListener("click",n=>{n.stopPropagation(),n.preventDefault(),this.rename()}),e.addEventListener("keydown",n=>{if(["F2","Delete","Enter"].includes(n.key)){if(n.preventDefault(),n.key==="F2"&&u(this,B).rename)this.rename();else if(n.key==="Delete"&&u(this,B).del)this.del();else if(n.key==="Enter"&&!u(this,B).directory){if(n.shiftKey)return this.download();this.open()}}})}del(){let e=u(this,B);if(!e.del)throw new TypeError(`'${e.name}' is read only.`);if(this.loading(),!confirm(`Are you sure you want to delete '${e.title}?'`))return this.loading(!1);this.trigger("delete",e.fullPath,e)}download(){u(this,B).directory||this.element.querySelector("[download]").click()}loading(e=!0){if(e)return this.element.classList.add("loading");this.element.classList.remove("loading")}open(){let e=u(this,B);if(this.loading(),e.directory)return this.trigger("go",e.fullPath,!1,()=>this.loading(!1));let n=(i,s=null)=>{let l=p=>{p.key==="Escape"&&f.close()},f=Ot.create(i,{className:e.type,onShow:()=>{this.loading(!1),document.addEventListener("keydown",l),s&&s(f)},onClose:()=>document.removeEventListener("keydown",l)});f.show()};["video","audio","image","font","pdf"].includes(e.type)?this.trigger("check",e.fullPath,()=>{n(u(this,Ee)[e.type](e))},()=>this.loading(!1)):(this.trigger("get",e.fullPath,i=>{if(!i)return this.loading(!1);if(e.type!=="text")return this.download();n(u(this,Ee).text(e,i),s=>Bt.default.highlightAllUnder(s.element()))}),this.loading(!1)),event.preventDefault()}rename(){let e=u(this,B);if(!e.rename)throw new TypeError(`'${e.name}' cannot be renamed.`);let n=this.element,i=n.querySelector(".title"),s=n.querySelector("input"),l=()=>{i.innerText=s.value,s.style.setProperty("width",`${i.scrollWidth}px`)},f=()=>{if(s.value!==e.title)return this.loading(),p(),this.trigger("move",e.fullPath,_(e.path,s.value),e);x()},p=()=>{s.removeEventListener("blur",L),s.removeEventListener("keydown",v),s.removeEventListener("input",A)},x=()=>(i.classList.remove("invisible"),s.classList.add("hidden"),s.value=e.title,l(),p(),n.focus()),L=()=>{f()},v=w=>{w.key==="Enter"?(w.stopPropagation(),w.preventDefault(),f()):w.key==="Escape"&&x()},A=()=>l();i.classList.add("invisible"),s.classList.remove("hidden"),s.value=e.title,l(),s.removeAttribute("readonly"),s.addEventListener("blur",L),s.addEventListener("keydown",v),s.addEventListener("input",A),s.focus()}update(){u(this,B).placeholder&&this.element.classList.contains("placeholder")&&this.element.classList.remove("placeholder")}};nt=new WeakMap,B=new WeakMap,Ee=new WeakMap;var It=(()=>{try{return document.querySelector(":focus-within"),!0}catch(r){return!1}})();var re,Ae,xe=class extends U{constructor(){super('');b(this,re,void 0);b(this,Ae,void 0);this.bindEvents()}bindEvents(){this.on("list:update:request",()=>this.loading()),this.on("list:update:success",n=>this.update(n)),this.on("list:update:failed",()=>this.loading(!1)),this.on("collection:update",n=>{n===u(this,re)&&this.update()}),this.on("entry:update",n=>{n.collection===u(this,re)&&this.update()});let e=n=>{if(!["ArrowUp","ArrowDown"].includes(n.key))return;n.preventDefault(),n.stopPropagation();let i=this.element.querySelector(`li:focus${It?", li:focus-within":""}`),s=i?i.nextSibling:this.element.querySelector("li:first-child"),l=i?i.previousSibling:null;n.key==="ArrowUp"&&l?l.focus():n.key==="ArrowDown"&&s&&s.focus()};document.addEventListener("keydown",e),this.element.addEventListener("keydown",e)}loading(e=!0){if(e)return this.element.classList.add("loading");this.element.classList.remove("loading")}update(e=u(this,re)){this.emptyNode(),E(this,Ae,e.map(n=>new we(n))),[...u(this,Ae).map(n=>n.element)].forEach(n=>this.element.appendChild(n)),this.loading(!1),E(this,re,e)}};re=new WeakMap,Ae=new WeakMap;var Fe=class extends U{constructor(){let t="
    ";super(t);let e=new xe;this.element.appendChild(e.element)}};var Le=class extends U{constructor(){let t=``;super(t),this.bindEvents()}bindEvents(t=this.element){t.querySelector('input[type="file"]').addEventListener("change",e=>$(this,null,function*(){for(let n of e.target.files)this.trigger("upload",location.pathname,n);t.value=null})),t.querySelector(".create-directory").addEventListener("click",e=>$(this,null,function*(){e.preventDefault();let n=prompt("","Directory name");!n||this.trigger("create-directory",X(O(location.pathname,n)),n,location.pathname)}))}};var oe=gt(Ut());var fr={PROPFIND:{headers:{Depth:1}}},Y=(r,t,e,n)=>fetch(t,rt(N(N({},fr[r]||null),e),{method:r})).then(i=>{if(!i.ok){n.trigger("error",{method:r,url:t,response:i});return}return i}),ke=class extends I{GET(t,e={}){return Y("GET",t,e,this)}HEAD(t,e={}){return Y("HEAD",t,e,this)}PUT(t,e={}){return Y("PUT",t,e,this)}PROPFIND(t,e={}){return Y("PROPFIND",t,e,this)}DELETE(t,e={}){return Y("DELETE",t,e,this)}MKCOL(t,e={}){return Y("MKCOL",t,e,this)}COPY(t,e={}){return Y("COPY",t,e,this)}MOVE(t,e={}){return Y("MOVE",t,e,this)}};var Pe,$e,le,ue,Te,Ce,Se,ce,De,de,_e,he,ne,ie,wt=class extends I{constructor({directory:e=!1,fullPath:n,title:i="",modified:s,size:g=0,mimeType:u="",del:l=!0,rename:p=!0,placeholder:F=!1,collection:y=null}){super();E(this,Pe,void 0);E(this,$e,void 0);E(this,le,void 0);E(this,ue,void 0);E(this,Te,void 0);E(this,Ce,void 0);E(this,Se,void 0);E(this,ce,void 0);E(this,De,void 0);E(this,de,void 0);E(this,_e,void 0);E(this,he,void 0);E(this,ne,void 0);E(this,ie,void 0);let[x,w]=this.getFilename(n);A(this,De,x),A(this,ce,w),A(this,$e,e),A(this,Te,n),A(this,ne,i),A(this,Se,s),A(this,he,g),A(this,Ce,u),A(this,Pe,l),A(this,_e,p),A(this,de,F),this.collection=y}createParentEntry(){return this.update({fullPath:this.path,title:"←",del:!1,rename:!1})}getFilename(e){let n=O(e).split(/\//),i=n.pop();return[O(...n),i]}update(e={}){return new wt(N({directory:this.directory,fullPath:this.fullPath,modified:this.modified,size:this.size,mimeType:this.mimeType,del:this.del,rename:this.rename,collection:this.collection},e))}get del(){return c(this,Pe)}get directory(){return c(this,$e)}get displaySize(){return this.directory?"":(c(this,le)||A(this,le,["bytes","KiB","MiB","GiB","TiB","PiB"].reduce((e,n)=>typeof e=="string"?e:e<1024?`${e.toFixed(2*(n==="bytes"?0:1))} ${n}`:e/1024,c(this,he))),c(this,le))}get extension(){return this.directory?"":(c(this,ue)||A(this,ue,this.name.split(".").pop()),c(this,ue))}get fullPath(){return c(this,Te)}get mimeType(){return c(this,Ce)}get modified(){return c(this,Se)}get name(){return c(this,ce)}get path(){return c(this,De)}get placeholder(){return c(this,de)}set placeholder(e){A(this,de,e),this.trigger("entry:update",this)}get rename(){return c(this,_e)}get size(){return c(this,he)}get title(){return c(this,ne)||A(this,ne,decodeURIComponent(c(this,ce))),c(this,ne)}get type(){if(!c(this,ie)){let e={text:/\.(?:te?xt|i?nfo|php|cgi|faq|ini|htaccess|log|md|sql|sfv|conf|sh|pl|pm|py|rb|(?:s?c|sa)ss|js|java|coffee|[sx]?html?|xml)$/i,image:/\.(?:jpe?g|gif|a?png|svg)$/i,video:/\.(?:mp(?:e?g)?4|mov|avi|webm|ogv|mkv)$/i,audio:/\.(?:mp3|wav|ogg|flac|mka)$/i,font:/\.(?:woff2?|eot|[ot]tf)$/i,pdf:/\.pdf$/i};for(let[n,i]of Object.entries(e))if(this.name.match(i))return A(this,ie,n);A(this,ie,"unknown")}return c(this,ie)}},K=wt;Pe=new WeakMap,$e=new WeakMap,le=new WeakMap,ue=new WeakMap,Te=new WeakMap,Ce=new WeakMap,Se=new WeakMap,ce=new WeakMap,De=new WeakMap,de=new WeakMap,_e=new WeakMap,he=new WeakMap,ne=new WeakMap,ie=new WeakMap;var se,R,Ie,qe,at,ot,Oe=class extends I{constructor(e,{sortDirectoriesFirst:n=!1}={}){super();E(this,se,void 0);E(this,R,void 0);E(this,Ie,void 0);E(this,qe,()=>c(this,R).sort((e,n)=>c(this,Ie)&&c(this,ot).call(this,e,n)||c(this,at).call(this,e,n)));E(this,at,(e,n)=>e.fullPathn.directory-e.directory);A(this,Ie,n),A(this,R,e.map(s=>new K(rt(N({},s),{collection:this}))));let i=c(this,R).shift();A(this,se,O(i.fullPath)),i.fullPath!=="/"&&c(this,R).unshift(i.createParentEntry()),c(this,qe).call(this),this.bindEvents()}bindEvents(){this.on("upload:request",(e,n)=>{O(e)===c(this,se)&&this.add(new K({fullPath:O(e,n.name),modified:n.lastModifiedDate,size:n.size,mimeType:n.type,placeholder:!0}))}),this.on("upload:success",(e,n)=>{let[i]=this.filter(s=>s.fullPath===O(e,n.name));i&&(i.placeholder=!1)}),this.on("upload:failed",(e,n)=>{let[i]=this.filter(s=>s.fullPath===O(e,n.name));i&&this.remove(i)}),this.on("delete:success",e=>{let[n]=this.filter(i=>i.fullPath===e);n&&this.remove(n)}),this.on("move:success",(e,n)=>{let[i]=this.filter(g=>g.fullPath===e);if(!i)return;let s=new K({directory:i.directory,fullPath:X(n),modified:i.modified,size:i.size,mimeType:i.mimeType,del:i.del});if(this.remove(i),i.path===s.path)return this.add(s);this.trigger("cache:invalidate",s.path)}),this.on("mkcol:success",(e,n,i)=>{O(i)===c(this,se)&&this.add(new K({directory:!0,fullPath:e,modified:new Date}))})}add(e){return e.collection=this,c(this,R).push(e),c(this,qe).call(this),this.trigger("collection:update",this),this}remove(e){return A(this,R,c(this,R).filter(n=>n!==e)),this.trigger("collection:update",this),this}map(e){return c(this,R).map(e)}filter(e){return c(this,R).filter(e)}get path(){return c(this,se)}};se=new WeakMap,R=new WeakMap,Ie=new WeakMap,qe=new WeakMap,at=new WeakMap,ot=new WeakMap;var fe,Re,lt,je,ae,Be=class{constructor(t,e=new DOMParser){E(this,fe,void 0);E(this,Re,void 0);E(this,lt,void 0);E(this,je,(t,e)=>t.getElementsByTagName(e)[0]);E(this,ae,(t,e)=>{let n=c(this,je).call(this,t,e);return n?n.textContent:""});A(this,lt,e),A(this,Re,e.parseFromString(t,"application/xml"))}collection({sortDirectoriesFirst:t=!1}={}){return c(this,fe)||A(this,fe,new Oe(this.responseToPrimitives(c(this,Re).getElementsByTagName("D:response")),{sortDirectoriesFirst:t})),c(this,fe)}responseToPrimitives(t){return Array.from(t).map(e=>({directory:!!c(this,je).call(this,e,"D:collection"),fullPath:c(this,ae).call(this,e,"D:href"),modified:Date.parse(c(this,ae).call(this,e,"lp1:getlastmodified")),size:parseInt(c(this,ae).call(this,e,"lp1:getcontentlength"),10),mimeType:c(this,ae).call(this,e,"D:getcontenttype")}))}};fe=new WeakMap,Re=new WeakMap,lt=new WeakMap,je=new WeakMap,ae=new WeakMap;var Ue,J,j,ze,He,W,Me=class extends I{constructor({bypassCheck:e,sortDirectoriesFirst:n},i=new Map,s=new ke){super();E(this,Ue,void 0);E(this,J,void 0);E(this,j,void 0);E(this,ze,void 0);E(this,He,e=>{let n=`${location.protocol}//${location.hostname}${location.port?`:${location.port}`:""}`,i=new RegExp(`^${n}`);if(!e.match(i)){if(e.match(/^http/))throw new TypeError(`Invalid destination host: '${e}'.`);return`${n}${e}`}return e});E(this,W,(e,n,...i)=>(this.trigger(`${n}:request`,...i),e().then(s=>s?(this.trigger(`${n}:success`,...i),s):(this.trigger(`${n}:failed`,...i),s)).catch(()=>{this.trigger(`${n}:failed`,...i)})));A(this,Ue,e),A(this,ze,n),A(this,J,i),A(this,j,s),this.bindEvents()}bindEvents(){this.on("cache:invalidate",e=>{c(this,J).has(e)&&c(this,J).delete(e)})}check(e){return $(this,null,function*(){return c(this,Ue)?{ok:!0,status:200}:c(this,j).HEAD(e)})}copy(e,n,i=null){return $(this,null,function*(){return c(this,W).call(this,()=>c(this,j).COPY(e,{headers:{Destination:c(this,He).call(this,n)}}),"copy",e,n,i)})}del(e,n=null){return $(this,null,function*(){return c(this,W).call(this,()=>c(this,j).DELETE(e),"delete",e,n)})}get(e){return $(this,null,function*(){return c(this,W).call(this,()=>c(this,j).GET(e),"get",e)})}list(e,n=!1){return $(this,null,function*(){if(e=X(e),!n){let l=yield c(this,J).get(e);if(l)return l}let i=yield this.check(e);if(!i||!i.ok&&i.status!==405)return;let s=yield c(this,j).PROPFIND(e),g=new Be(yield s.text()),u=g.collection({sortDirectoriesFirst:c(this,ze)});return c(this,J).set(e,u),u})}mkcol(e,n="",i=""){return $(this,null,function*(){return c(this,W).call(this,()=>c(this,j).MKCOL(e),"mkcol",e,n,i)})}move(e,n,i=null){return $(this,null,function*(){return c(this,W).call(this,()=>c(this,j).MOVE(e,{headers:{Destination:c(this,He).call(this,n)}}),"move",e,n,i)})}upload(e,n){return $(this,null,function*(){let i=O(e,n.name);return c(this,W).call(this,()=>c(this,j).PUT(i,{headers:{"Content-Type":n.type},body:n}),"upload",e,n)})}};Ue=new WeakMap,J=new WeakMap,j=new WeakMap,ze=new WeakMap,He=new WeakMap,W=new WeakMap;var Ne=class extends Error{};var We,Ve,Ze,Ge=class extends I{constructor(e,n={},i=new Me({bypassCheck:(s=>(s=n.bypassCheck)!=null?s:!1)(),sortDirectoriesFirst:(g=>(g=n.sortDirectoriesFirst)!=null?g:!1)()})){super();E(this,We,void 0);E(this,Ve,void 0);E(this,Ze,void 0);if(!(e instanceof HTMLElement))throw new TypeError(`Invalid container element: '${e}'.`);A(this,We,e),A(this,Ve,i),A(this,Ze,n)}get options(){return N({},c(this,Ze))}get dav(){return c(this,Ve)}get container(){return c(this,We)}render(){throw new Ne("'render' must be implemented in the child class.")}};We=new WeakMap,Ve=new WeakMap,Ze=new WeakMap;var Xe=class extends Ge{render(t=new Fe,e=new Le){this.container.appendChild(t.element),this.container.appendChild(e.element),this.bindEvents(),this.trigger("go")}bindEvents(t=this.container){let e=u=>{let l=document.createElement("span");return l.setAttribute(`on${u}`,""),typeof l[`on${u}`]=="function"},n=e("touchstart"),i=e("dragstart")&&e("drop"),s=u=>{document.title!==u&&(document.title=u)},g=u=>{location.pathname!==u&&history.pushState(history.state,u,u)};n&&this.container.classList.add("is-touch"),i||this.container.classList.add("no-drag-drop"),window.addEventListener("popstate",()=>{let u=location.pathname;if(t.dispatchEvent(new CustomEvent("preview:close",{bubbles:!0,detail:{preview:!0}})),u.endsWith("/"))return this.trigger("go");let l=u.replace(/[^/]+$/,"");this.trigger("go",l,{bypassPushState:!0,success:()=>{var p;return(p=this.container.querySelector(`main ul li[data-full-path="${u}"]`))==null?void 0:p.dispatchEvent(new CustomEvent("click"))}})}),i&&(["dragenter","dragover"].forEach(u=>{t.addEventListener(u,l=>{l.preventDefault(),l.stopPropagation(),t.classList.add("active")})}),["dragleave","drop"].forEach(u=>{t.addEventListener(u,l=>{l.preventDefault(),l.stopPropagation(),t.classList.remove("active")})}),t.addEventListener("drop",u=>$(this,null,function*(){let{files:l}=u.dataTransfer;for(let p of l)this.trigger("upload",location.pathname,p)}))),this.on("error",({method:u,url:l,response:p})=>{new oe.default({content:`${u} ${l} failed: ${p.statusText} (${p.status})`,type:"error"})}),this.on("upload",(u,l)=>$(this,null,function*(){let p=yield this.dav.list(u),[F]=p.filter(y=>y.name===l.name);if(F&&!confirm(`A file called '${F.title}' already exists, would you like to overwrite it?`))return!1;yield this.dav.upload(u,l)})),this.on("upload:success",(u,l)=>$(this,null,function*(){new oe.default({content:`'${l.name}' has been successfully uploaded.`,type:"success",hide:5})})),this.on("move",(u,l,p)=>$(this,null,function*(){yield this.dav.move(u,l,p)})),this.on("move:success",(u,l,p)=>{let[,F,y]=l.match(/^(.*)\/([^/]+\/?)$/),x=F&&F.replace(`${location.protocol}//${location.hostname}${location.port?`:${location.port}`:""}`,"");if(p.path===x||p.directory)return new oe.default({content:`'${p.title}' successfully renamed to '${decodeURIComponent(y||x)}'.`,type:"success",hide:5});new oe.default({content:`'${p.title}' successfully moved to '${decodeURIComponent(x)}'.`,type:"success",hide:5})}),this.on("delete",(u,l)=>$(this,null,function*(){yield this.dav.del(u,l)})),this.on("delete:success",(u,l)=>{new oe.default({content:`'${l.title}' has been deleted.`,type:"success",hide:5})}),this.on("get",(u,l)=>$(this,null,function*(){let p=yield this.dav.get(u);l(p&&(yield p.text()))})),this.on("check",(u,l,p)=>$(this,null,function*(){let F=yield this.dav.check(u);if(F&&F.ok&&l){l(F);return}p&&p()})),this.on("create-directory",(u,l,p)=>$(this,null,function*(){yield this.dav.mkcol(u,l,p)})),this.on("mkcol:success",(u,l)=>{new oe.default({content:`'${l}' has been created.`,type:"success",hide:5})}),this.on("go",(...x)=>$(this,[...x],function*(u=location.pathname,{bypassCache:l=!1,bypassPushState:p=!1,failure:F=null,success:y=null}={}){let w=location.pathname;this.trigger("list:update:request",u);let k=yield this.dav.list(u,l);if(!k){this.trigger("list:update:failed"),F&&F();return}this.trigger("list:update:success",k),p||g(u),s(`${decodeURIComponent(u)} | WebDAV`),y&&y(k)})),this.on("preview:opened",u=>{var l;document.body.classList.add("preview-open"),(l=this.container.querySelector(`[data-full-path="${u.fullPath}"]`))==null||l.focus(),g(u.fullPath),s(`${decodeURIComponent(u.fullPath)} | WebDAV`)}),this.on("preview:closed",(u,{preview:l=!1}={})=>{if(l)return;let p=X(u.path);document.body.classList.remove("preview-open"),g(p),s(`${decodeURIComponent(p)} | WebDAV`)})}};var zt=new Xe(document.body,{bypassCheck:!!document.querySelector("[data-disable-check]"),sortDirectoriesFirst:!!document.querySelector("[data-sort-directories-first]")});document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>zt.render()):zt.render();})(); /** * Prism: Lightweight, robust, elegant syntax highlighting *