diff --git a/assets/img/favicons/android-chrome-192x192.png b/assets/img/favicons/android-chrome-192x192.png new file mode 100644 index 0000000..4e50834 Binary files /dev/null and b/assets/img/favicons/android-chrome-192x192.png differ diff --git a/assets/img/favicons/android-chrome-512x512.png b/assets/img/favicons/android-chrome-512x512.png new file mode 100644 index 0000000..8971ff0 Binary files /dev/null and b/assets/img/favicons/android-chrome-512x512.png differ diff --git a/assets/img/favicons/apple-touch-icon.png b/assets/img/favicons/apple-touch-icon.png new file mode 100644 index 0000000..c173316 Binary files /dev/null and b/assets/img/favicons/apple-touch-icon.png differ diff --git a/assets/img/favicons/favicon-16x16.png b/assets/img/favicons/favicon-16x16.png new file mode 100644 index 0000000..ca78139 Binary files /dev/null and b/assets/img/favicons/favicon-16x16.png differ diff --git a/assets/img/favicons/favicon-32x32.png b/assets/img/favicons/favicon-32x32.png new file mode 100644 index 0000000..a9f3754 Binary files /dev/null and b/assets/img/favicons/favicon-32x32.png differ diff --git a/assets/img/favicons/favicon.ico b/assets/img/favicons/favicon.ico new file mode 100644 index 0000000..5c47840 Binary files /dev/null and b/assets/img/favicons/favicon.ico differ diff --git a/public/404.html b/public/404.html index c41e858..3f6f8a4 100644 --- a/public/404.html +++ b/public/404.html @@ -1,49 +1,883 @@ -404 Page not found | -Comprofix
404 Page not found
- - -

404: Page not found

Sorry, we've misplaced that URL or it's pointing to something that doesn't exist.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 404 Page not found | + + Comprofix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + +
+ 404 Page not found +
+ + + + + + + + +
+
+
+
+ +

404: Page not found

+
+

Sorry, we've misplaced that URL or it's pointing to something that doesn't exist.

+
+ +
+ + + +
+ +
+ +
+ + +
+

+ © + + + + + Comprofix. + + + + Some rights reserved. +

+ +

Using the Chirpy theme for Hugo. +

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Trending Tags

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
\ No newline at end of file + `; + }).join(''); + + this.resultsContainer.innerHTML = searchItems; + } + + + checkFieldsForMatch(item, term) { + const matches = { + inTitle: false, + inDesc: false, + inSection: false, + inContents: false + }; + + + if (DEFAULT_CONFIG.search.fields.title && this.containsTerm(item.searchableTitle, term)) { + matches.inTitle = true; + } + + if (DEFAULT_CONFIG.search.fields.description && this.containsTerm(item.searchableDesc, term)) { + matches.inDesc = true; + } + + if (DEFAULT_CONFIG.search.fields.section && this.containsTerm(item.searchableSection, term)) { + matches.inSection = true; + } + + if (DEFAULT_CONFIG.search.fields.contents && this.containsTerm(item.searchableContents, term)) { + matches.inContents = true; + } + + + if (matches.inTitle || matches.inDesc || matches.inSection || matches.inContents) { + return matches; + } + + + return false; + } + } + + const search = new FastSearch({ + searchInput: document.getElementById('search-input'), + resultsContainer: document.getElementById('search-results'), + json: `\/index.json` + }); + + +
+ + +
+ +
+ + \ No newline at end of file diff --git a/public/about/index.html b/public/about/index.html index a0bc083..f4d3e7d 100644 --- a/public/about/index.html +++ b/public/about/index.html @@ -1,53 +1,950 @@ -About | -Comprofix
About
- - -

About

Chirpy is a blog theme originally based on Jekyll. Due to Jekyll’s design limitations, it does not natively support internationalization (i18n) and requires third-party plugins for i18n functionality. To enable i18n support for Chirpy without the hassle of relying on third-party plugins, the hugo-theme-chirpy project migrated the Chirpy theme to Hugo with minimal adaptations. All features of Chirpy are available in hugo-theme-chirpy (though some functionalities may operate differently within the Hugo framework).

Follow the posts in the demo site to quickly set up a free personal blog!

Features -

  • Dark Mode: Enhanced readability in low-light environments.
  • Multilingual UI: Easily switch between different languages.
  • Efficient Post Organization: Use hierarchical categories, trending tags, recommended reading, and search functionalities.
  • Optimized Layout: Includes TOC, syntax highlighting, prompts, and more.
  • Rich Writing Extensions: Support for mathematical formulas, charts, flowcharts, and embedded media.
  • Multiple Comment Systems: Choose from various commenting options.
  • Web Analysis Tools: Integrated with multiple analytics tools.
  • Modern Web Technologies: Built for SEO and web performance.
  • RSS Feed Support: Keep your readers updated with RSS feeds.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + About | + + Comprofix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + +
+ About +
+ + + + + + + + +
+
+
+
+ +
+ + + +

+ About +

+
+

Chirpy is a blog theme originally based on Jekyll. Due to Jekyll’s design limitations, it does not natively support internationalization (i18n) and requires third-party plugins for i18n functionality. To enable i18n support for Chirpy without the hassle of relying on third-party plugins, the hugo-theme-chirpy project migrated the Chirpy theme to Hugo with minimal adaptations. All features of Chirpy are available in hugo-theme-chirpy (though some functionalities may operate differently within the Hugo framework).

+

Follow the posts in the demo site to quickly set up a free personal blog!

+

+ + Features + + +

    +
  • Dark Mode: Enhanced readability in low-light environments.
  • +
  • Multilingual UI: Easily switch between different languages.
  • +
  • Efficient Post Organization: Use hierarchical categories, trending tags, recommended reading, and search functionalities.
  • +
  • Optimized Layout: Includes TOC, syntax highlighting, prompts, and more.
  • +
  • Rich Writing Extensions: Support for mathematical formulas, charts, flowcharts, and embedded media.
  • +
  • Multiple Comment Systems: Choose from various commenting options.
  • +
  • Web Analysis Tools: Integrated with multiple analytics tools.
  • +
  • Modern Web Technologies: Built for SEO and web performance.
  • +
  • RSS Feed Support: Keep your readers updated with RSS feeds.
  • +
+ +
+ +
+ +
+ + + +
+ +
+ +
+ + +
+

+ © + + + + + Comprofix. + + + + Some rights reserved. +

+ +

Using the Chirpy theme for Hugo. +

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Trending Tags

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
\ No newline at end of file + `; + }).join(''); + + this.resultsContainer.innerHTML = searchItems; + } + + + checkFieldsForMatch(item, term) { + const matches = { + inTitle: false, + inDesc: false, + inSection: false, + inContents: false + }; + + + if (DEFAULT_CONFIG.search.fields.title && this.containsTerm(item.searchableTitle, term)) { + matches.inTitle = true; + } + + if (DEFAULT_CONFIG.search.fields.description && this.containsTerm(item.searchableDesc, term)) { + matches.inDesc = true; + } + + if (DEFAULT_CONFIG.search.fields.section && this.containsTerm(item.searchableSection, term)) { + matches.inSection = true; + } + + if (DEFAULT_CONFIG.search.fields.contents && this.containsTerm(item.searchableContents, term)) { + matches.inContents = true; + } + + + if (matches.inTitle || matches.inDesc || matches.inSection || matches.inContents) { + return matches; + } + + + return false; + } + } + + const search = new FastSearch({ + searchInput: document.getElementById('search-input'), + resultsContainer: document.getElementById('search-results'), + json: `\/index.json` + }); + + +
+ + +
+ +
+ + \ No newline at end of file diff --git a/public/archives/index.html b/public/archives/index.html index 077b6cb..e044859 100644 --- a/public/archives/index.html +++ b/public/archives/index.html @@ -1,53 +1,962 @@ -Archives | -Comprofix
Archives
- - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Archives | + + Comprofix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + +
+ Archives +
+ + + + + + + + +
+
+
+
+ + + + + + +
+ + + +
+ +
+ +
+ + +
+

+ © + + + + + Comprofix. + + + + Some rights reserved. +

+ +

Using the Chirpy theme for Hugo. +

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Trending Tags

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
\ No newline at end of file + `; + }).join(''); + + this.resultsContainer.innerHTML = searchItems; + } + + + checkFieldsForMatch(item, term) { + const matches = { + inTitle: false, + inDesc: false, + inSection: false, + inContents: false + }; + + + if (DEFAULT_CONFIG.search.fields.title && this.containsTerm(item.searchableTitle, term)) { + matches.inTitle = true; + } + + if (DEFAULT_CONFIG.search.fields.description && this.containsTerm(item.searchableDesc, term)) { + matches.inDesc = true; + } + + if (DEFAULT_CONFIG.search.fields.section && this.containsTerm(item.searchableSection, term)) { + matches.inSection = true; + } + + if (DEFAULT_CONFIG.search.fields.contents && this.containsTerm(item.searchableContents, term)) { + matches.inContents = true; + } + + + if (matches.inTitle || matches.inDesc || matches.inSection || matches.inContents) { + return matches; + } + + + return false; + } + } + + const search = new FastSearch({ + searchInput: document.getElementById('search-input'), + resultsContainer: document.getElementById('search-results'), + json: `\/index.json` + }); + + +
+ + +
+ +
+ + \ No newline at end of file diff --git a/public/categories/gitea/index.html b/public/categories/gitea/index.html index ddc7515..8f1e46a 100644 --- a/public/categories/gitea/index.html +++ b/public/categories/gitea/index.html @@ -1,54 +1,902 @@ -Gitea | -Comprofix
- - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gitea | + + Comprofix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + +
+ +
+ + + + + + + + +
+
+
+
+ +
+

+ + Gitea + 1 +

+ + +
+ +
+ + + +
+ +
+ +
+ + +
+

+ © + + + + + Comprofix. + + + + Some rights reserved. +

+ +

Using the Chirpy theme for Hugo. +

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Trending Tags

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
\ No newline at end of file + `; + }).join(''); + + this.resultsContainer.innerHTML = searchItems; + } + + + checkFieldsForMatch(item, term) { + const matches = { + inTitle: false, + inDesc: false, + inSection: false, + inContents: false + }; + + + if (DEFAULT_CONFIG.search.fields.title && this.containsTerm(item.searchableTitle, term)) { + matches.inTitle = true; + } + + if (DEFAULT_CONFIG.search.fields.description && this.containsTerm(item.searchableDesc, term)) { + matches.inDesc = true; + } + + if (DEFAULT_CONFIG.search.fields.section && this.containsTerm(item.searchableSection, term)) { + matches.inSection = true; + } + + if (DEFAULT_CONFIG.search.fields.contents && this.containsTerm(item.searchableContents, term)) { + matches.inContents = true; + } + + + if (matches.inTitle || matches.inDesc || matches.inSection || matches.inContents) { + return matches; + } + + + return false; + } + } + + const search = new FastSearch({ + searchInput: document.getElementById('search-input'), + resultsContainer: document.getElementById('search-results'), + json: `\/index.json` + }); + + +
+ + +
+ +
+ + \ No newline at end of file diff --git a/public/categories/gitea/index.xml b/public/categories/gitea/index.xml index 936bbc8..ec02acf 100644 --- a/public/categories/gitea/index.xml +++ b/public/categories/gitea/index.xml @@ -1,8 +1,19 @@ -Gitea on Comprofixhttps://comprofix.com/categories/gitea/Recent content in Gitea on ComprofixHugoenSat, 06 Sep 2025 13:28:05 +1000Continuous Integration & Continuous Deploymenthttps://comprofix.com/post/2024-09-21-websitedeployment/Sat, 21 Sep 2024 00:00:00 +0000https://comprofix.com/post/2024-09-21-websitedeployment/<p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> -<p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> -<h3 id="why-use-cicd" id=why-use-cicd> - - <span class="me-2">Why use CI/CD?</span> - <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> - -</h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p> \ No newline at end of file + + + + Gitea on Comprofix + http://localhost:1313/categories/gitea/ + Recent content in Gitea on Comprofix + Hugo + en + Sat, 21 Sep 2024 00:00:00 +0000 + + + Continuous Integration & Continuous Deployment + http://localhost:1313/post/2024-09-21-websitedeployment/ + Sat, 21 Sep 2024 00:00:00 +0000 + http://localhost:1313/post/2024-09-21-websitedeployment/ + <p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> <p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> <h3 id="why-use-cicd" id=why-use-cicd> <span class="me-2">Why use CI/CD?</span> <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> </h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p> + + + diff --git a/public/categories/homelab/index.html b/public/categories/homelab/index.html index b8dfdbf..cec3e8d 100644 --- a/public/categories/homelab/index.html +++ b/public/categories/homelab/index.html @@ -1,56 +1,908 @@ -Homelab | -Comprofix
- - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Homelab | + + Comprofix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + +
+ +
+ + + + + + + + +
+
+
+
+ +
+

+ + Homelab + 2 +

+ + +
+ +
+ + + +
+ +
+ +
+ + +
+

+ © + + + + + Comprofix. + + + + Some rights reserved. +

+ +

Using the Chirpy theme for Hugo. +

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Trending Tags

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
\ No newline at end of file + `; + }).join(''); + + this.resultsContainer.innerHTML = searchItems; + } + + + checkFieldsForMatch(item, term) { + const matches = { + inTitle: false, + inDesc: false, + inSection: false, + inContents: false + }; + + + if (DEFAULT_CONFIG.search.fields.title && this.containsTerm(item.searchableTitle, term)) { + matches.inTitle = true; + } + + if (DEFAULT_CONFIG.search.fields.description && this.containsTerm(item.searchableDesc, term)) { + matches.inDesc = true; + } + + if (DEFAULT_CONFIG.search.fields.section && this.containsTerm(item.searchableSection, term)) { + matches.inSection = true; + } + + if (DEFAULT_CONFIG.search.fields.contents && this.containsTerm(item.searchableContents, term)) { + matches.inContents = true; + } + + + if (matches.inTitle || matches.inDesc || matches.inSection || matches.inContents) { + return matches; + } + + + return false; + } + } + + const search = new FastSearch({ + searchInput: document.getElementById('search-input'), + resultsContainer: document.getElementById('search-results'), + json: `\/index.json` + }); + + +
+ + +
+ +
+ + \ No newline at end of file diff --git a/public/categories/homelab/index.xml b/public/categories/homelab/index.xml index 65102f2..a0c528f 100644 --- a/public/categories/homelab/index.xml +++ b/public/categories/homelab/index.xml @@ -1,10 +1,26 @@ -Homelab on Comprofixhttps://comprofix.com/categories/homelab/Recent content in Homelab on ComprofixHugoenSat, 06 Sep 2025 13:28:05 +1000Continuous Integration & Continuous Deploymenthttps://comprofix.com/post/2024-09-21-websitedeployment/Sat, 21 Sep 2024 00:00:00 +0000https://comprofix.com/post/2024-09-21-websitedeployment/<p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> -<p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> -<h3 id="why-use-cicd" id=why-use-cicd> - - <span class="me-2">Why use CI/CD?</span> - <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> - -</h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p>Reset and Restarthttps://comprofix.com/post/2024-09-05-resetrestart/Thu, 05 Sep 2024 00:00:00 +0000https://comprofix.com/post/2024-09-05-resetrestart/<p>It&rsquo;s time to reset the website and start building my blog again. I have had this domain for a number of years and it has always been used for my E-Mail.</p> -<p>But the website has been more of a play ground for experimenting and testing.</p> -<p>I am now hoping to get into the habit of writing more blog posts as I document my journey as I experiment with my HomeLab.</p> \ No newline at end of file + + + + Homelab on Comprofix + http://localhost:1313/categories/homelab/ + Recent content in Homelab on Comprofix + Hugo + en + Sat, 21 Sep 2024 00:00:00 +0000 + + + Continuous Integration & Continuous Deployment + http://localhost:1313/post/2024-09-21-websitedeployment/ + Sat, 21 Sep 2024 00:00:00 +0000 + http://localhost:1313/post/2024-09-21-websitedeployment/ + <p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> <p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> <h3 id="why-use-cicd" id=why-use-cicd> <span class="me-2">Why use CI/CD?</span> <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> </h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p> + + + Reset and Restart + http://localhost:1313/post/2024-09-05-resetrestart/ + Thu, 05 Sep 2024 00:00:00 +0000 + http://localhost:1313/post/2024-09-05-resetrestart/ + <p>It&rsquo;s time to reset the website and start building my blog again. I have had this domain for a number of years and it has always been used for my E-Mail.</p> <p>But the website has been more of a play ground for experimenting and testing.</p> <p>I am now hoping to get into the habit of writing more blog posts as I document my journey as I experiment with my HomeLab.</p> + + + diff --git a/public/categories/index.html b/public/categories/index.html index fca8150..a1f3f2f 100644 --- a/public/categories/index.html +++ b/public/categories/index.html @@ -1,58 +1,1002 @@ -Categories | -Comprofix
- - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Categories | + + Comprofix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + +
+ +
+ + + + + + + + +
+
+
+
+ +
+

+ Categories +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + homelab + + + 1 + + category, + + + 2 + + posts + + + + + + + +
+ + +
+
    + + + + + + + + + + + + + + + +
  • + + gitea + + 1 + + post + + +
  • + +
+
+ +
+ +
+
+ +
+ + + +
+ +
+ +
+ + +
+

+ © + + + + + Comprofix. + + + + Some rights reserved. +

+ +

Using the Chirpy theme for Hugo. +

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Trending Tags

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
\ No newline at end of file + `; + }).join(''); + + this.resultsContainer.innerHTML = searchItems; + } + + + checkFieldsForMatch(item, term) { + const matches = { + inTitle: false, + inDesc: false, + inSection: false, + inContents: false + }; + + + if (DEFAULT_CONFIG.search.fields.title && this.containsTerm(item.searchableTitle, term)) { + matches.inTitle = true; + } + + if (DEFAULT_CONFIG.search.fields.description && this.containsTerm(item.searchableDesc, term)) { + matches.inDesc = true; + } + + if (DEFAULT_CONFIG.search.fields.section && this.containsTerm(item.searchableSection, term)) { + matches.inSection = true; + } + + if (DEFAULT_CONFIG.search.fields.contents && this.containsTerm(item.searchableContents, term)) { + matches.inContents = true; + } + + + if (matches.inTitle || matches.inDesc || matches.inSection || matches.inContents) { + return matches; + } + + + return false; + } + } + + const search = new FastSearch({ + searchInput: document.getElementById('search-input'), + resultsContainer: document.getElementById('search-results'), + json: `\/index.json` + }); + + +
+ + +
+ +
+ + \ No newline at end of file diff --git a/public/categories/index.xml b/public/categories/index.xml index cfc8052..d83a858 100644 --- a/public/categories/index.xml +++ b/public/categories/index.xml @@ -1 +1,26 @@ -Categories on Comprofixhttps://comprofix.com/categories/Recent content in Categories on ComprofixHugoenGiteahttps://comprofix.com/categories/gitea/Sat, 21 Sep 2024 00:00:00 +0000https://comprofix.com/categories/gitea/Homelabhttps://comprofix.com/categories/homelab/Sat, 21 Sep 2024 00:00:00 +0000https://comprofix.com/categories/homelab/ \ No newline at end of file + + + + Categories on Comprofix + http://localhost:1313/categories/ + Recent content in Categories on Comprofix + Hugo + en + Sat, 21 Sep 2024 00:00:00 +0000 + + + Gitea + http://localhost:1313/categories/gitea/ + Sat, 21 Sep 2024 00:00:00 +0000 + http://localhost:1313/categories/gitea/ + + + + Homelab + http://localhost:1313/categories/homelab/ + Sat, 21 Sep 2024 00:00:00 +0000 + http://localhost:1313/categories/homelab/ + + + + diff --git a/public/img/favicons/apple-touch-icon.png b/public/img/favicons/apple-touch-icon.png index 648097f..c173316 100644 Binary files a/public/img/favicons/apple-touch-icon.png and b/public/img/favicons/apple-touch-icon.png differ diff --git a/public/img/favicons/favicon-16x16.png b/public/img/favicons/favicon-16x16.png index f44237a..ca78139 100644 Binary files a/public/img/favicons/favicon-16x16.png and b/public/img/favicons/favicon-16x16.png differ diff --git a/public/img/favicons/favicon-32x32.png b/public/img/favicons/favicon-32x32.png index d5d021d..a9f3754 100644 Binary files a/public/img/favicons/favicon-32x32.png and b/public/img/favicons/favicon-32x32.png differ diff --git a/public/img/favicons/favicon.ico b/public/img/favicons/favicon.ico index 5611568..5c47840 100644 Binary files a/public/img/favicons/favicon.ico and b/public/img/favicons/favicon.ico differ diff --git a/public/index.html b/public/index.html index f934e8e..37327d9 100644 --- a/public/index.html +++ b/public/index.html @@ -1,57 +1,1062 @@ -Comprofix
- - -
Preview Image

Continuous Integration & Continuous Deployment

Since the reset of the website, I have been working on getting it to auto build and deploy using Gitea Actions. Which is similar and compatible to GitHub Actions + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Comprofix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ +
+
+ +
+
+ + + + + +
+ +
+ + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+ Preview Image +
+ + + + +
+
+

Continuous Integration & Continuous Deployment

+ +
+

Since the reset of the website, I have been working on getting it to auto build and deploy using Gitea Actions. Which is similar and compatible to GitHub Actions Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry. -Why use CI/CD? It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.

+ +
\ No newline at end of file + `; + }).join(''); + + this.resultsContainer.innerHTML = searchItems; + } + + + checkFieldsForMatch(item, term) { + const matches = { + inTitle: false, + inDesc: false, + inSection: false, + inContents: false + }; + + + if (DEFAULT_CONFIG.search.fields.title && this.containsTerm(item.searchableTitle, term)) { + matches.inTitle = true; + } + + if (DEFAULT_CONFIG.search.fields.description && this.containsTerm(item.searchableDesc, term)) { + matches.inDesc = true; + } + + if (DEFAULT_CONFIG.search.fields.section && this.containsTerm(item.searchableSection, term)) { + matches.inSection = true; + } + + if (DEFAULT_CONFIG.search.fields.contents && this.containsTerm(item.searchableContents, term)) { + matches.inContents = true; + } + + + if (matches.inTitle || matches.inDesc || matches.inSection || matches.inContents) { + return matches; + } + + + return false; + } + } + + const search = new FastSearch({ + searchInput: document.getElementById('search-input'), + resultsContainer: document.getElementById('search-results'), + json: `\/index.json` + }); + + +
+ + +
+ +
+ + \ No newline at end of file diff --git a/public/index.json b/public/index.json index 0903e97..269c964 100644 --- a/public/index.json +++ b/public/index.json @@ -1 +1 @@ -[{"categories":["homelab","gitea"],"contents":"Since the reset of the website, I have been working on getting it to auto build and deploy using Gitea Actions. Which is similar and compatible to GitHub Actions\nBefore implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.\nWhy use CI/CD? It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.\nSetting up the Aciton To setup the action we first needed to create some \u0026ldquo;secrets\u0026rdquo; in the repo. Secrets are secure variables that are requied to interact with systems. Such as passwords, usernames, SSH Keys etc.\nAfter populating our secrets file we can then create our .gitea/workflows/build.yml file. This file contains all the steps to build, test and deploy the container.\n{% raw %}\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 on: push jobs: build-node: runs-on: ubuntu-latest container: image: catthehacker/ubuntu:act-latest steps: - name: checkout repo uses: actions/checkout@v4 - name: Use Node.js uses: actions/setup-node@v4 - name: Install Node Dependencies run: npm ci - name: Build 11ty Site run: npm run build --if-present - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to DockerHub uses: docker/login-action@v3 with: registry: git.comprofix.com username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_TOKEN }} - name: Build and push uses: docker/build-push-action@v6 with: context: ./ file: ./Dockerfile push: true tags: git.comprofix.com/mmckinnon/comprofix.com:latest publish: runs-on: ubuntu-latest steps: - name: checkout repo uses: actions/checkout@v4 - name: Publish Website run: | mkdir ~/.ssh echo \u0026#34;${{ secrets.SSH_KNOWN_HOSTS }}\u0026#34; \u0026gt;\u0026gt; ~/.ssh/known_hosts chmod 644 ~/.ssh/known_hosts eval $(ssh-agent -s) ssh-add \u0026lt;(echo \u0026#34;${{ secrets.SSH_PRIVATE_KEY }}\u0026#34;) ssh administrator@comprofix.com \u0026#34;cd /opt/comprofix; docker compose down\u0026#34; || true scp docker-compose.yml administrator@comprofix.com:/opt/comprofix ssh administrator@comprofix.com \u0026#34;cd /opt/comprofix; docker compose pull; docker compose up -d\u0026#34; {% endraw %}\nbuild.yml explained 1 on: push This tells the action to run when code is pushed to the repo. 1 2 3 runs-on: ubuntu-latest container: image: catthehacker/ubuntu:act-latest This specified the \u0026ldquo;container\u0026rdquo; to use to run all the steps on. This was crucial as running without a \u0026ldquo;conatiner\u0026rdquo; would fail as not all required dependencies where available 1 2 3 4 jobs: build-node: ... publish: These are the names of the separate jobs for the build action. The build node will build the site and create the new docker container and push to the registry. The publish will connect the host running the container and restart using the new container. 1 steps: Each job has a list of steps it performs on the code. Most of these a pretty self explaining on what they do. Everything from check out the code. Setup Node environment and build. Run the docker commands to login to the registry, build the container and push. Then the last job steps connect the host and pull the new container and start. Gitea Action Completes Once the new code was commited to the repo the Action was able to complete successfully.\n","permalink":"https://comprofix.com/post/2024-09-21-websitedeployment/","tags":["homelab","git","docker","ci","cd","continuous integration","continuous deployment"],"title":"Continuous Integration \u0026 Continuous Deployment"},{"categories":["homelab"],"contents":"It\u0026rsquo;s time to reset the website and start building my blog again. I have had this domain for a number of years and it has always been used for my E-Mail.\nBut the website has been more of a play ground for experimenting and testing.\nI am now hoping to get into the habit of writing more blog posts as I document my journey as I experiment with my HomeLab.\n","permalink":"https://comprofix.com/post/2024-09-05-resetrestart/","tags":["homelab"],"title":"Reset and Restart"},{"categories":null,"contents":"Chirpy is a blog theme originally based on Jekyll. Due to Jekyll\u0026rsquo;s design limitations, it does not natively support internationalization (i18n) and requires third-party plugins for i18n functionality. To enable i18n support for Chirpy without the hassle of relying on third-party plugins, the hugo-theme-chirpy project migrated the Chirpy theme to Hugo with minimal adaptations. All features of Chirpy are available in hugo-theme-chirpy (though some functionalities may operate differently within the Hugo framework).\nFollow the posts in the demo site to quickly set up a free personal blog!\nFeatures Dark Mode: Enhanced readability in low-light environments. Multilingual UI: Easily switch between different languages. Efficient Post Organization: Use hierarchical categories, trending tags, recommended reading, and search functionalities. Optimized Layout: Includes TOC, syntax highlighting, prompts, and more. Rich Writing Extensions: Support for mathematical formulas, charts, flowcharts, and embedded media. Multiple Comment Systems: Choose from various commenting options. Web Analysis Tools: Integrated with multiple analytics tools. Modern Web Technologies: Built for SEO and web performance. RSS Feed Support: Keep your readers updated with RSS feeds. ","permalink":"https://comprofix.com/about/","tags":null,"title":"About"},{"categories":null,"contents":"","permalink":"https://comprofix.com/archives/","tags":null,"title":"Archives"}] \ No newline at end of file +[{"categories":["homelab","gitea"],"contents":"Since the reset of the website, I have been working on getting it to auto build and deploy using Gitea Actions. Which is similar and compatible to GitHub Actions\nBefore implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.\nWhy use CI/CD? It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.\nSetting up the Aciton To setup the action we first needed to create some \u0026ldquo;secrets\u0026rdquo; in the repo. Secrets are secure variables that are requied to interact with systems. Such as passwords, usernames, SSH Keys etc.\nAfter populating our secrets file we can then create our .gitea/workflows/build.yml file. This file contains all the steps to build, test and deploy the container.\n{% raw %}\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 on: push jobs: build-node: runs-on: ubuntu-latest container: image: catthehacker/ubuntu:act-latest steps: - name: checkout repo uses: actions/checkout@v4 - name: Use Node.js uses: actions/setup-node@v4 - name: Install Node Dependencies run: npm ci - name: Build 11ty Site run: npm run build --if-present - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to DockerHub uses: docker/login-action@v3 with: registry: git.comprofix.com username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_TOKEN }} - name: Build and push uses: docker/build-push-action@v6 with: context: ./ file: ./Dockerfile push: true tags: git.comprofix.com/mmckinnon/comprofix.com:latest publish: runs-on: ubuntu-latest steps: - name: checkout repo uses: actions/checkout@v4 - name: Publish Website run: | mkdir ~/.ssh echo \u0026#34;${{ secrets.SSH_KNOWN_HOSTS }}\u0026#34; \u0026gt;\u0026gt; ~/.ssh/known_hosts chmod 644 ~/.ssh/known_hosts eval $(ssh-agent -s) ssh-add \u0026lt;(echo \u0026#34;${{ secrets.SSH_PRIVATE_KEY }}\u0026#34;) ssh administrator@comprofix.com \u0026#34;cd /opt/comprofix; docker compose down\u0026#34; || true scp docker-compose.yml administrator@comprofix.com:/opt/comprofix ssh administrator@comprofix.com \u0026#34;cd /opt/comprofix; docker compose pull; docker compose up -d\u0026#34; {% endraw %}\nbuild.yml explained 1 on: push This tells the action to run when code is pushed to the repo. 1 2 3 runs-on: ubuntu-latest container: image: catthehacker/ubuntu:act-latest This specified the \u0026ldquo;container\u0026rdquo; to use to run all the steps on. This was crucial as running without a \u0026ldquo;conatiner\u0026rdquo; would fail as not all required dependencies where available 1 2 3 4 jobs: build-node: ... publish: These are the names of the separate jobs for the build action. The build node will build the site and create the new docker container and push to the registry. The publish will connect the host running the container and restart using the new container. 1 steps: Each job has a list of steps it performs on the code. Most of these a pretty self explaining on what they do. Everything from check out the code. Setup Node environment and build. Run the docker commands to login to the registry, build the container and push. Then the last job steps connect the host and pull the new container and start. Gitea Action Completes Once the new code was commited to the repo the Action was able to complete successfully.\n","permalink":"http://localhost:1313/post/2024-09-21-websitedeployment/","tags":["homelab","git","docker","ci","cd","continuous integration","continuous deployment"],"title":"Continuous Integration \u0026 Continuous Deployment"},{"categories":["homelab"],"contents":"It\u0026rsquo;s time to reset the website and start building my blog again. I have had this domain for a number of years and it has always been used for my E-Mail.\nBut the website has been more of a play ground for experimenting and testing.\nI am now hoping to get into the habit of writing more blog posts as I document my journey as I experiment with my HomeLab.\n","permalink":"http://localhost:1313/post/2024-09-05-resetrestart/","tags":["homelab"],"title":"Reset and Restart"},{"categories":null,"contents":"Chirpy is a blog theme originally based on Jekyll. Due to Jekyll\u0026rsquo;s design limitations, it does not natively support internationalization (i18n) and requires third-party plugins for i18n functionality. To enable i18n support for Chirpy without the hassle of relying on third-party plugins, the hugo-theme-chirpy project migrated the Chirpy theme to Hugo with minimal adaptations. All features of Chirpy are available in hugo-theme-chirpy (though some functionalities may operate differently within the Hugo framework).\nFollow the posts in the demo site to quickly set up a free personal blog!\nFeatures Dark Mode: Enhanced readability in low-light environments. Multilingual UI: Easily switch between different languages. Efficient Post Organization: Use hierarchical categories, trending tags, recommended reading, and search functionalities. Optimized Layout: Includes TOC, syntax highlighting, prompts, and more. Rich Writing Extensions: Support for mathematical formulas, charts, flowcharts, and embedded media. Multiple Comment Systems: Choose from various commenting options. Web Analysis Tools: Integrated with multiple analytics tools. Modern Web Technologies: Built for SEO and web performance. RSS Feed Support: Keep your readers updated with RSS feeds. ","permalink":"http://localhost:1313/about/","tags":null,"title":"About"},{"categories":null,"contents":"","permalink":"http://localhost:1313/archives/","tags":null,"title":"Archives"}] \ No newline at end of file diff --git a/public/index.xml b/public/index.xml index 66c4497..45bbff1 100644 --- a/public/index.xml +++ b/public/index.xml @@ -1,11 +1,40 @@ -Comprofixhttps://comprofix.com/Recent content on ComprofixHugoenContinuous Integration & Continuous Deploymenthttps://comprofix.com/post/2024-09-21-websitedeployment/Sat, 21 Sep 2024 00:00:00 +0000https://comprofix.com/post/2024-09-21-websitedeployment/<p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> -<p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> -<h3 id="why-use-cicd" id=why-use-cicd> - - <span class="me-2">Why use CI/CD?</span> - <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> - -</h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p>Reset and Restarthttps://comprofix.com/post/2024-09-05-resetrestart/Thu, 05 Sep 2024 00:00:00 +0000https://comprofix.com/post/2024-09-05-resetrestart/<p>It&rsquo;s time to reset the website and start building my blog again. I have had this domain for a number of years and it has always been used for my E-Mail.</p> -<p>But the website has been more of a play ground for experimenting and testing.</p> -<p>I am now hoping to get into the habit of writing more blog posts as I document my journey as I experiment with my HomeLab.</p>Abouthttps://comprofix.com/about/Thu, 20 Apr 2023 00:00:00 +0000https://comprofix.com/about/<p><a href="https://github.com/cotes2020/jekyll-theme-chirpy">Chirpy</a> is a blog theme originally based on <a href="https://jekyllrb.com/">Jekyll</a>. Due to Jekyll&rsquo;s design limitations, it does not natively support internationalization (i18n) and requires third-party plugins for i18n functionality. To enable i18n support for Chirpy without the hassle of relying on third-party plugins, the <a href="https://github.com/geekifan/hugo-theme-chirpy">hugo-theme-chirpy</a> project migrated the Chirpy theme to <a href="https://gohugo.io/">Hugo</a> with minimal adaptations. All features of Chirpy are available in hugo-theme-chirpy (though some functionalities may operate differently within the Hugo framework).</p> -<p>Follow the posts in the demo site to quickly set up a free personal blog!</p>Archiveshttps://comprofix.com/archives/Mon, 01 Jan 0001 00:00:00 +0000https://comprofix.com/archives/ \ No newline at end of file + + + + Comprofix + http://localhost:1313/ + Recent content on Comprofix + Hugo + en + Sat, 21 Sep 2024 00:00:00 +0000 + + + Continuous Integration & Continuous Deployment + http://localhost:1313/post/2024-09-21-websitedeployment/ + Sat, 21 Sep 2024 00:00:00 +0000 + http://localhost:1313/post/2024-09-21-websitedeployment/ + <p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> <p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> <h3 id="why-use-cicd" id=why-use-cicd> <span class="me-2">Why use CI/CD?</span> <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> </h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p> + + + Reset and Restart + http://localhost:1313/post/2024-09-05-resetrestart/ + Thu, 05 Sep 2024 00:00:00 +0000 + http://localhost:1313/post/2024-09-05-resetrestart/ + <p>It&rsquo;s time to reset the website and start building my blog again. I have had this domain for a number of years and it has always been used for my E-Mail.</p> <p>But the website has been more of a play ground for experimenting and testing.</p> <p>I am now hoping to get into the habit of writing more blog posts as I document my journey as I experiment with my HomeLab.</p> + + + About + http://localhost:1313/about/ + Thu, 20 Apr 2023 00:00:00 +0000 + http://localhost:1313/about/ + <p><a href="https://github.com/cotes2020/jekyll-theme-chirpy">Chirpy</a> is a blog theme originally based on <a href="https://jekyllrb.com/">Jekyll</a>. Due to Jekyll&rsquo;s design limitations, it does not natively support internationalization (i18n) and requires third-party plugins for i18n functionality. To enable i18n support for Chirpy without the hassle of relying on third-party plugins, the <a href="https://github.com/geekifan/hugo-theme-chirpy">hugo-theme-chirpy</a> project migrated the Chirpy theme to <a href="https://gohugo.io/">Hugo</a> with minimal adaptations. All features of Chirpy are available in hugo-theme-chirpy (though some functionalities may operate differently within the Hugo framework).</p> <p>Follow the posts in the demo site to quickly set up a free personal blog!</p> + + + Archives + http://localhost:1313/archives/ + Mon, 01 Jan 0001 00:00:00 +0000 + http://localhost:1313/archives/ + + + + diff --git a/public/js/categories.js b/public/js/categories.js index 8984e2f..48f0943 100644 --- a/public/js/categories.js +++ b/public/js/categories.js @@ -1 +1,3379 @@ -(()=>{var Tn=Object.create;var le=Object.defineProperty,On=Object.defineProperties,Sn=Object.getOwnPropertyDescriptor,xn=Object.getOwnPropertyDescriptors,Cn=Object.getOwnPropertyNames,fr=Object.getOwnPropertySymbols,Ln=Object.getPrototypeOf,pr=Object.prototype.hasOwnProperty,Dn=Object.prototype.propertyIsEnumerable;var dr=e=>{throw TypeError(e)};var ce=(e,t,r)=>t in e?le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N=(e,t)=>{for(var r in t||(t={}))pr.call(t,r)&&ce(e,r,t[r]);if(fr)for(var r of fr(t))Dn.call(t,r)&&ce(e,r,t[r]);return e},hr=(e,t)=>On(e,xn(t));var Nn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var In=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Cn(t))!pr.call(e,o)&&o!==r&&le(e,o,{get:()=>t[o],enumerable:!(n=Sn(t,o))||n.enumerable});return e};var Pn=(e,t,r)=>(r=e!=null?Tn(Ln(e)):{},In(t||!e||!e.__esModule?le(r,"default",{value:e,enumerable:!0}):r,e));var Et=(e,t,r)=>ce(e,typeof t!="symbol"?t+"":t,r),mr=(e,t,r)=>t.has(e)||dr("Cannot "+r);var U=(e,t,r)=>(mr(e,t,"read from private field"),r?r.call(e):t.get(e)),_t=(e,t,r)=>t.has(e)?dr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Bt=(e,t,r,n)=>(mr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var en=Nn(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});function H(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ct(e){var t=H(e).Element;return e instanceof t||e instanceof Element}function k(e){var t=H(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Fr(e){if(typeof ShadowRoot=="undefined")return!1;var t=H(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var ot=Math.max,Gt=Math.min,lt=Math.round;function ut(e,t){t===void 0&&(t=!1);var r=e.getBoundingClientRect(),n=1,o=1;if(k(e)&&t){var s=e.offsetHeight,i=e.offsetWidth;i>0&&(n=lt(r.width)/i||1),s>0&&(o=lt(r.height)/s||1)}return{width:r.width/n,height:r.height/o,top:r.top/o,right:r.right/n,bottom:r.bottom/o,left:r.left/n,x:r.left/n,y:r.top/o}}function Le(e){var t=H(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function fo(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function po(e){return e===H(e)||!k(e)?Le(e):fo(e)}function q(e){return e?(e.nodeName||"").toLowerCase():null}function J(e){return((ct(e)?e.ownerDocument:e.document)||window.document).documentElement}function De(e){return ut(J(e)).left+Le(e).scrollLeft}function W(e){return H(e).getComputedStyle(e)}function Ne(e){var t=W(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function ho(e){var t=e.getBoundingClientRect(),r=lt(t.width)/e.offsetWidth||1,n=lt(t.height)/e.offsetHeight||1;return r!==1||n!==1}function mo(e,t,r){r===void 0&&(r=!1);var n=k(t),o=k(t)&&ho(t),s=J(t),i=ut(e,o),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((q(t)!=="body"||Ne(s))&&(a=po(t)),k(t)?(c=ut(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=De(s))),{x:i.left+a.scrollLeft-c.x,y:i.top+a.scrollTop-c.y,width:i.width,height:i.height}}function Ie(e){var t=ut(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function Kt(e){return q(e)==="html"?e:e.assignedSlot||e.parentNode||(Fr(e)?e.host:null)||J(e)}function Hr(e){return["html","body","#document"].indexOf(q(e))>=0?e.ownerDocument.body:k(e)&&Ne(e)?e:Hr(Kt(e))}function Ot(e,t){var r;t===void 0&&(t=[]);var n=Hr(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),s=H(n),i=o?[s].concat(s.visualViewport||[],Ne(n)?n:[]):n,a=t.concat(i);return o?a:a.concat(Ot(Kt(i)))}function go(e){return["table","td","th"].indexOf(q(e))>=0}function Nr(e){return!k(e)||W(e).position==="fixed"?null:e.offsetParent}function vo(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,r=navigator.userAgent.indexOf("Trident")!==-1;if(r&&k(e)){var n=W(e);if(n.position==="fixed")return null}for(var o=Kt(e);k(o)&&["html","body"].indexOf(q(o))<0;){var s=W(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function Ct(e){for(var t=H(e),r=Nr(e);r&&go(r)&&W(r).position==="static";)r=Nr(r);return r&&(q(r)==="html"||q(r)==="body"&&W(r).position==="static")?t:r||vo(e)||t}var I="top",$="bottom",B="right",P="left",Pe="auto",Lt=[I,$,B,P],ft="start",xt="end",bo="clippingParents",Vr="viewport",Tt="popper",yo="reference",Ir=Lt.reduce(function(e,t){return e.concat([t+"-"+ft,t+"-"+xt])},[]),qr=[].concat(Lt,[Pe]).reduce(function(e,t){return e.concat([t,t+"-"+ft,t+"-"+xt])},[]),Eo="beforeRead",_o="read",wo="afterRead",Ao="beforeMain",To="main",Oo="afterMain",So="beforeWrite",xo="write",Co="afterWrite",Lo=[Eo,_o,wo,Ao,To,Oo,So,xo,Co];function Do(e){var t=new Map,r=new Set,n=[];e.forEach(function(s){t.set(s.name,s)});function o(s){r.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(a){if(!r.has(a)){var c=t.get(a);c&&o(c)}}),n.push(s)}return e.forEach(function(s){r.has(s.name)||o(s)}),n}function No(e){var t=Do(e);return Lo.reduce(function(r,n){return r.concat(t.filter(function(o){return o.phase===n}))},[])}function Io(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function V(e){return e.split("-")[0]}function Po(e){var t=e.reduce(function(r,n){var o=r[n.name];return r[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}function Mo(e){var t=H(e),r=J(e),n=t.visualViewport,o=r.clientWidth,s=r.clientHeight,i=0,a=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(i=n.offsetLeft,a=n.offsetTop)),{width:o,height:s,x:i+De(e),y:a}}function Ro(e){var t,r=J(e),n=Le(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=ot(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=ot(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+De(e),c=-n.scrollTop;return W(o||r).direction==="rtl"&&(a+=ot(r.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:a,y:c}}function Wr(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Fr(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ce(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ko(e){var t=ut(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function Pr(e,t){return t===Vr?Ce(Mo(e)):ct(t)?ko(t):Ce(Ro(J(e)))}function $o(e){var t=Ot(Kt(e)),r=["absolute","fixed"].indexOf(W(e).position)>=0,n=r&&k(e)?Ct(e):e;return ct(n)?t.filter(function(o){return ct(o)&&Wr(o,n)&&q(o)!=="body"&&(r?W(o).position!=="static":!0)}):[]}function Bo(e,t,r){var n=t==="clippingParents"?$o(e):[].concat(t),o=[].concat(n,[r]),s=o[0],i=o.reduce(function(a,c){var u=Pr(e,c);return a.top=ot(u.top,a.top),a.right=Gt(u.right,a.right),a.bottom=Gt(u.bottom,a.bottom),a.left=ot(u.left,a.left),a},Pr(e,s));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}function pt(e){return e.split("-")[1]}function Me(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function zr(e){var t=e.reference,r=e.element,n=e.placement,o=n?V(n):null,s=n?pt(n):null,i=t.x+t.width/2-r.width/2,a=t.y+t.height/2-r.height/2,c;switch(o){case I:c={x:i,y:t.y-r.height};break;case $:c={x:i,y:t.y+t.height};break;case B:c={x:t.x+t.width,y:a};break;case P:c={x:t.x-r.width,y:a};break;default:c={x:t.x,y:t.y}}var u=o?Me(o):null;if(u!=null){var l=u==="y"?"height":"width";switch(s){case ft:c[u]=c[u]-(t[l]/2-r[l]/2);break;case xt:c[u]=c[u]+(t[l]/2-r[l]/2);break}}return c}function Ur(){return{top:0,right:0,bottom:0,left:0}}function Yr(e){return Object.assign({},Ur(),e)}function Gr(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}function dt(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=n===void 0?e.placement:n,s=r.boundary,i=s===void 0?bo:s,a=r.rootBoundary,c=a===void 0?Vr:a,u=r.elementContext,l=u===void 0?Tt:u,f=r.altBoundary,g=f===void 0?!1:f,p=r.padding,h=p===void 0?0:p,m=Yr(typeof h!="number"?h:Gr(h,Lt)),d=l===Tt?yo:Tt,w=e.rects.popper,A=e.elements[g?d:l],T=Bo(ct(A)?A:A.contextElement||J(e.elements.popper),i,c),v=ut(e.elements.reference),E=zr({reference:v,element:w,strategy:"absolute",placement:o}),b=Ce(Object.assign({},w,E)),y=l===Tt?b:v,O={top:T.top-y.top+m.top,bottom:y.bottom-T.bottom+m.bottom,left:T.left-y.left+m.left,right:y.right-T.right+m.right},x=e.modifiersData.offset;if(l===Tt&&x){var C=x[o];Object.keys(O).forEach(function(_){var L=[B,$].indexOf(_)>=0?1:-1,tt=[I,$].indexOf(_)>=0?"y":"x";O[_]+=C[tt]*L})}return O}var Mr={placement:"bottom",modifiers:[],strategy:"absolute"};function Rr(){for(var e=arguments.length,t=new Array(e),r=0;r=0?-1:1,s=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,i=s[0],a=s[1];return i=i||0,a=(a||0)*o,[P,B].indexOf(n)>=0?{x:a,y:i}:{x:i,y:a}}function Yo(e){var t=e.state,r=e.options,n=e.name,o=r.offset,s=o===void 0?[0,0]:o,i=qr.reduce(function(l,f){return l[f]=Uo(f,t.rects,s),l},{}),a=i[t.placement],c=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=i}var Kr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Yo},Go={left:"right",right:"left",bottom:"top",top:"bottom"};function Yt(e){return e.replace(/left|right|bottom|top/g,function(t){return Go[t]})}var Ko={start:"end",end:"start"};function $r(e){return e.replace(/start|end/g,function(t){return Ko[t]})}function Qo(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=r.boundary,s=r.rootBoundary,i=r.padding,a=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?qr:c,l=pt(n),f=l?a?Ir:Ir.filter(function(h){return pt(h)===l}):Lt,g=f.filter(function(h){return u.indexOf(h)>=0});g.length===0&&(g=f);var p=g.reduce(function(h,m){return h[m]=dt(e,{placement:m,boundary:o,rootBoundary:s,padding:i})[V(m)],h},{});return Object.keys(p).sort(function(h,m){return p[h]-p[m]})}function Xo(e){if(V(e)===Pe)return[];var t=Yt(e);return[$r(e),t,$r(t)]}function Jo(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,s=o===void 0?!0:o,i=r.altAxis,a=i===void 0?!0:i,c=r.fallbackPlacements,u=r.padding,l=r.boundary,f=r.rootBoundary,g=r.altBoundary,p=r.flipVariations,h=p===void 0?!0:p,m=r.allowedAutoPlacements,d=t.options.placement,w=V(d),A=w===d,T=c||(A||!h?[Yt(d)]:Xo(d)),v=[d].concat(T).reduce(function(st,G){return st.concat(V(G)===Pe?Qo(t,{placement:G,boundary:l,rootBoundary:f,padding:u,flipVariations:h,allowedAutoPlacements:m}):G)},[]),E=t.rects.reference,b=t.rects.popper,y=new Map,O=!0,x=v[0],C=0;C=0,vt=gt?"width":"height",R=dt(t,{placement:_,boundary:l,rootBoundary:f,altBoundary:g,padding:u}),j=gt?tt?B:P:tt?$:I;E[vt]>b[vt]&&(j=Yt(j));var Pt=Yt(j),et=[];if(s&&et.push(R[L]<=0),a&&et.push(R[j]<=0,R[Pt]<=0),et.every(function(st){return st})){x=_,O=!1;break}y.set(_,et)}if(O)for(var Mt=h?3:1,oe=function(G){var yt=v.find(function(kt){var rt=y.get(kt);if(rt)return rt.slice(0,G).every(function(ie){return ie})});if(yt)return x=yt,"break"},bt=Mt;bt>0;bt--){var Rt=oe(bt);if(Rt==="break")break}t.placement!==x&&(t.modifiersData[n]._skip=!0,t.placement=x,t.reset=!0)}}var Qr={name:"flip",enabled:!0,phase:"main",fn:Jo,requiresIfExists:["offset"],data:{_skip:!1}};function Zo(e){return e==="x"?"y":"x"}function St(e,t,r){return ot(e,Gt(t,r))}function ti(e,t,r){var n=St(e,t,r);return n>r?r:n}function ei(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,s=o===void 0?!0:o,i=r.altAxis,a=i===void 0?!1:i,c=r.boundary,u=r.rootBoundary,l=r.altBoundary,f=r.padding,g=r.tether,p=g===void 0?!0:g,h=r.tetherOffset,m=h===void 0?0:h,d=dt(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:l}),w=V(t.placement),A=pt(t.placement),T=!A,v=Me(w),E=Zo(v),b=t.modifiersData.popperOffsets,y=t.rects.reference,O=t.rects.popper,x=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,C=typeof x=="number"?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(b){if(s){var tt,gt=v==="y"?I:P,vt=v==="y"?$:B,R=v==="y"?"height":"width",j=b[v],Pt=j+d[gt],et=j-d[vt],Mt=p?-O[R]/2:0,oe=A===ft?y[R]:O[R],bt=A===ft?-O[R]:-y[R],Rt=t.elements.arrow,st=p&&Rt?Ie(Rt):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Ur(),yt=G[gt],kt=G[vt],rt=St(0,y[R],st[R]),ie=T?y[R]/2-Mt-rt-yt-C.mainAxis:oe-rt-yt-C.mainAxis,bn=T?-y[R]/2+Mt+rt+kt+C.mainAxis:bt+rt+kt+C.mainAxis,se=t.elements.arrow&&Ct(t.elements.arrow),yn=se?v==="y"?se.clientTop||0:se.clientLeft||0:0,rr=(tt=_==null?void 0:_[v])!=null?tt:0,En=j+ie-rr-yn,_n=j+bn-rr,nr=St(p?Gt(Pt,En):Pt,j,p?ot(et,_n):et);b[v]=nr,L[v]=nr-j}if(a){var or,wn=v==="x"?I:P,An=v==="x"?$:B,nt=b[E],$t=E==="y"?"height":"width",ir=nt+d[wn],sr=nt-d[An],ae=[I,P].indexOf(w)!==-1,ar=(or=_==null?void 0:_[E])!=null?or:0,cr=ae?ir:nt-y[$t]-O[$t]-ar+C.altAxis,lr=ae?nt+y[$t]+O[$t]-ar-C.altAxis:sr,ur=p&&ae?ti(cr,nt,lr):St(p?cr:ir,nt,p?lr:sr);b[E]=ur,L[E]=ur-nt}t.modifiersData[n]=L}}var Xr={name:"preventOverflow",enabled:!0,phase:"main",fn:ei,requiresIfExists:["offset"]},ri=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Yr(typeof t!="number"?t:Gr(t,Lt))};function ni(e){var t,r=e.state,n=e.name,o=e.options,s=r.elements.arrow,i=r.modifiersData.popperOffsets,a=V(r.placement),c=Me(a),u=[P,B].indexOf(a)>=0,l=u?"height":"width";if(!(!s||!i)){var f=ri(o.padding,r),g=Ie(s),p=c==="y"?I:P,h=c==="y"?$:B,m=r.rects.reference[l]+r.rects.reference[c]-i[c]-r.rects.popper[l],d=i[c]-r.rects.reference[c],w=Ct(s),A=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,T=m/2-d/2,v=f[p],E=A-g[l]-f[h],b=A/2-g[l]/2+T,y=St(v,b,E),O=c;r.modifiersData[n]=(t={},t[O]=y,t.centerOffset=y-b,t)}}function oi(e){var t=e.state,r=e.options,n=r.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||Wr(t.elements.popper,o)&&(t.elements.arrow=o))}var Jr={name:"arrow",enabled:!0,phase:"main",fn:ni,effect:oi,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Br(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function jr(e){return[I,B,$,P].some(function(t){return e[t]>=0})}function ii(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,i=dt(t,{elementContext:"reference"}),a=dt(t,{altBoundary:!0}),c=Br(i,n),u=Br(a,o,s),l=jr(c),f=jr(u);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}var Zr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ii},si=[ke,$e,Be,je],ai=Re({defaultModifiers:si}),tn=[ke,$e,Be,je,Kr,Qr,Xr,Jr,Zr],ci=Re({defaultModifiers:tn});D.applyStyles=je;D.arrow=Jr;D.computeStyles=Be;D.createPopper=ci;D.createPopperLite=ai;D.defaultModifiers=tn;D.detectOverflow=dt;D.eventListeners=ke;D.flip=Qr;D.hide=Zr;D.offset=Kr;D.popperGenerator=Re;D.popperOffsets=$e;D.preventOverflow=Xr});var K=new Map,jt={set(e,t,r){K.has(e)||K.set(e,new Map);let n=K.get(e);if(!n.has(t)&&n.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`);return}n.set(t,r)},get(e,t){return K.has(e)&&K.get(e).get(t)||null},remove(e,t){if(!K.has(e))return;let r=K.get(e);r.delete(t),r.size===0&&K.delete(e)}};var fe="transitionend",pe=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(t,r)=>`#${CSS.escape(r)}`)),e),gr=e=>e==null?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),vr=e=>{do e+=Math.floor(Math.random()*1e6);while(document.getElementById(e));return e},Mn=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:r}=window.getComputedStyle(e),n=Number.parseFloat(t),o=Number.parseFloat(r);return!n&&!o?0:(t=t.split(",")[0],r=r.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(r))*1e3)},Rn=e=>{e.dispatchEvent(new Event(fe))},X=e=>!e||typeof e!="object"?!1:(typeof e.jquery!="undefined"&&(e=e[0]),typeof e.nodeType!="undefined"),Y=e=>X(e)?e.jquery?e[0]:e:typeof e=="string"&&e.length>0?document.querySelector(pe(e)):null,br=e=>{if(!X(e)||e.getClientRects().length===0)return!1;let t=getComputedStyle(e).getPropertyValue("visibility")==="visible",r=e.closest("details:not([open])");if(!r)return t;if(r!==e){let n=e.closest("summary");if(n&&n.parentNode!==r||n===null)return!1}return t},yr=e=>!e||e.nodeType!==Node.ELEMENT_NODE||e.classList.contains("disabled")?!0:typeof e.disabled!="undefined"?e.disabled:e.hasAttribute("disabled")&&e.getAttribute("disabled")!=="false",de=e=>{if(!document.documentElement.attachShadow)return null;if(typeof e.getRootNode=="function"){let t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?de(e.parentNode):null},he=()=>{},Er=e=>{e.offsetHeight},me=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,ue=[],kn=e=>{document.readyState==="loading"?(ue.length||document.addEventListener("DOMContentLoaded",()=>{for(let t of ue)t()}),ue.push(e)):e()},ge=()=>document.documentElement.dir==="rtl",Ft=e=>{kn(()=>{let t=me();if(t){let r=e.NAME,n=t.fn[r];t.fn[r]=e.jQueryInterface,t.fn[r].Constructor=e,t.fn[r].noConflict=()=>(t.fn[r]=n,e.jQueryInterface)}})},Q=(e,t=[],r=e)=>typeof e=="function"?e.call(...t):r,_r=(e,t,r=!0)=>{if(!r){Q(e);return}let o=Mn(t)+5,s=!1,i=({target:a})=>{a===t&&(s=!0,t.removeEventListener(fe,i),Q(e))};t.addEventListener(fe,i),setTimeout(()=>{s||Rn(t)},o)};var $n=/[^.]*(?=\..*)\.|.*/,Bn=/\..*/,jn=/::\d+$/,ve={},wr=1,Tr={mouseenter:"mouseover",mouseleave:"mouseout"},Fn=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Or(e,t){return t&&`${t}::${wr++}`||e.uidEvent||wr++}function Sr(e){let t=Or(e);return e.uidEvent=t,ve[t]=ve[t]||{},ve[t]}function Hn(e,t){return function r(n){return Ee(n,{delegateTarget:e}),r.oneOff&&ye.off(e,n.type,t),t.apply(e,[n])}}function Vn(e,t,r){return function n(o){let s=e.querySelectorAll(t);for(let{target:i}=o;i&&i!==this;i=i.parentNode)for(let a of s)if(a===i)return Ee(o,{delegateTarget:i}),n.oneOff&&ye.off(e,o.type,t,r),r.apply(i,[o])}}function xr(e,t,r=null){return Object.values(e).find(n=>n.callable===t&&n.delegationSelector===r)}function Cr(e,t,r){let n=typeof t=="string",o=n?r:t||r,s=Lr(e);return Fn.has(s)||(s=e),[n,o,s]}function Ar(e,t,r,n,o){if(typeof t!="string"||!e)return;let[s,i,a]=Cr(t,r,n);t in Tr&&(i=(h=>function(m){if(!m.relatedTarget||m.relatedTarget!==m.delegateTarget&&!m.delegateTarget.contains(m.relatedTarget))return h.call(this,m)})(i));let c=Sr(e),u=c[a]||(c[a]={}),l=xr(u,i,s?r:null);if(l){l.oneOff=l.oneOff&&o;return}let f=Or(i,t.replace($n,"")),g=s?Vn(e,r,i):Hn(e,i);g.delegationSelector=s?r:null,g.callable=i,g.oneOff=o,g.uidEvent=f,u[f]=g,e.addEventListener(a,g,s)}function be(e,t,r,n,o){let s=xr(t[r],n,o);s&&(e.removeEventListener(r,s,!!o),delete t[r][s.uidEvent])}function qn(e,t,r,n){let o=t[r]||{};for(let[s,i]of Object.entries(o))s.includes(n)&&be(e,t,r,i.callable,i.delegationSelector)}function Lr(e){return e=e.replace(Bn,""),Tr[e]||e}var ye={on(e,t,r,n){Ar(e,t,r,n,!1)},one(e,t,r,n){Ar(e,t,r,n,!0)},off(e,t,r,n){if(typeof t!="string"||!e)return;let[o,s,i]=Cr(t,r,n),a=i!==t,c=Sr(e),u=c[i]||{},l=t.startsWith(".");if(typeof s!="undefined"){if(!Object.keys(u).length)return;be(e,c,i,s,o?r:null);return}if(l)for(let f of Object.keys(c))qn(e,c,f,t.slice(1));for(let[f,g]of Object.entries(u)){let p=f.replace(jn,"");(!a||t.includes(p))&&be(e,c,i,g.callable,g.delegationSelector)}},trigger(e,t,r){if(typeof t!="string"||!e)return null;let n=me(),o=Lr(t),s=t!==o,i=null,a=!0,c=!0,u=!1;s&&n&&(i=n.Event(t,r),n(e).trigger(i),a=!i.isPropagationStopped(),c=!i.isImmediatePropagationStopped(),u=i.isDefaultPrevented());let l=Ee(new Event(t,{bubbles:a,cancelable:!0}),r);return u&&l.preventDefault(),c&&e.dispatchEvent(l),l.defaultPrevented&&i&&i.preventDefault(),l}};function Ee(e,t={}){for(let[r,n]of Object.entries(t))try{e[r]=n}catch(o){Object.defineProperty(e,r,{configurable:!0,get(){return n}})}return e}var S=ye;function Dr(e){if(e==="true")return!0;if(e==="false")return!1;if(e===Number(e).toString())return Number(e);if(e===""||e==="null")return null;if(typeof e!="string")return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function _e(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}var Wn={setDataAttribute(e,t,r){e.setAttribute(`data-bs-${_e(t)}`,r)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${_e(t)}`)},getDataAttributes(e){if(!e)return{};let t={},r=Object.keys(e.dataset).filter(n=>n.startsWith("bs")&&!n.startsWith("bsConfig"));for(let n of r){let o=n.replace(/^bs/,"");o=o.charAt(0).toLowerCase()+o.slice(1),t[o]=Dr(e.dataset[n])}return t},getDataAttribute(e,t){return Dr(e.getAttribute(`data-bs-${_e(t)}`))}},wt=Wn;var we=class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,r){let n=X(r)?wt.getDataAttribute(r,"config"):{};return N(N(N(N({},this.constructor.Default),typeof n=="object"?n:{}),X(r)?wt.getDataAttributes(r):{}),typeof t=="object"?t:{})}_typeCheckConfig(t,r=this.constructor.DefaultType){for(let[n,o]of Object.entries(r)){let s=t[n],i=X(s)?"element":gr(s);if(!new RegExp(o).test(i))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${i}" but expected type "${o}".`)}}},Ht=we;var zn="5.3.8",Ae=class extends Ht{constructor(t,r){super(),t=Y(t),t&&(this._element=t,this._config=this._getConfig(r),jt.set(this._element,this.constructor.DATA_KEY,this))}dispose(){jt.remove(this._element,this.constructor.DATA_KEY),S.off(this._element,this.constructor.EVENT_KEY);for(let t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,r,n=!0){_r(t,r,n)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return jt.get(Y(t),this.DATA_KEY)}static getOrCreateInstance(t,r={}){return this.getInstance(t)||new this(t,typeof r=="object"?r:null)}static get VERSION(){return zn}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}},Vt=Ae;var Te=e=>{let t=e.getAttribute("data-bs-target");if(!t||t==="#"){let r=e.getAttribute("href");if(!r||!r.includes("#")&&!r.startsWith("."))return null;r.includes("#")&&!r.startsWith("#")&&(r=`#${r.split("#")[1]}`),t=r&&r!=="#"?r.trim():null}return t?t.split(",").map(r=>pe(r)).join(","):null},qt={find(e,t=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(t,e))},findOne(e,t=document.documentElement){return Element.prototype.querySelector.call(t,e)},children(e,t){return[].concat(...e.children).filter(r=>r.matches(t))},parents(e,t){let r=[],n=e.parentNode.closest(t);for(;n;)r.push(n),n=n.parentNode.closest(t);return r},prev(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return[r];r=r.previousElementSibling}return[]},next(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return[r];r=r.nextElementSibling}return[]},focusableChildren(e){let t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(r=>`${r}:not([tabindex^="-"])`).join(",");return this.find(t,e).filter(r=>!yr(r)&&br(r))},getSelectorFromElement(e){let t=Te(e);return t&&qt.findOne(t)?t:null},getElementFromSelector(e){let t=Te(e);return t?qt.findOne(t):null},getMultipleElementsFromSelector(e){let t=Te(e);return t?qt.find(t):[]}},F=qt;var Un="collapse",Yn="bs.collapse",At=`.${Yn}`,Gn=".data-api",Kn=`show${At}`,Qn=`shown${At}`,Xn=`hide${At}`,Jn=`hidden${At}`,Zn=`click${At}${Gn}`,Oe="show",at="collapse",Wt="collapsing",to="collapsed",eo=`:scope .${at} .${at}`,ro="collapse-horizontal",no="width",oo="height",io=".collapse.show, .collapse.collapsing",Se='[data-bs-toggle="collapse"]',so={parent:null,toggle:!0},ao={parent:"(null|element)",toggle:"boolean"},zt=class e extends Vt{constructor(t,r){super(t,r),this._isTransitioning=!1,this._triggerArray=[];let n=F.find(Se);for(let o of n){let s=F.getSelectorFromElement(o),i=F.find(s).filter(a=>a===this._element);s!==null&&i.length&&this._triggerArray.push(o)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return so}static get DefaultType(){return ao}static get NAME(){return Un}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(io).filter(a=>a!==this._element).map(a=>e.getOrCreateInstance(a,{toggle:!1}))),t.length&&t[0]._isTransitioning||S.trigger(this._element,Kn).defaultPrevented)return;for(let a of t)a.hide();let n=this._getDimension();this._element.classList.remove(at),this._element.classList.add(Wt),this._element.style[n]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;let o=()=>{this._isTransitioning=!1,this._element.classList.remove(Wt),this._element.classList.add(at,Oe),this._element.style[n]="",S.trigger(this._element,Qn)},i=`scroll${n[0].toUpperCase()+n.slice(1)}`;this._queueCallback(o,this._element,!0),this._element.style[n]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown()||S.trigger(this._element,Xn).defaultPrevented)return;let r=this._getDimension();this._element.style[r]=`${this._element.getBoundingClientRect()[r]}px`,Er(this._element),this._element.classList.add(Wt),this._element.classList.remove(at,Oe);for(let o of this._triggerArray){let s=F.getElementFromSelector(o);s&&!this._isShown(s)&&this._addAriaAndCollapsedClass([o],!1)}this._isTransitioning=!0;let n=()=>{this._isTransitioning=!1,this._element.classList.remove(Wt),this._element.classList.add(at),S.trigger(this._element,Jn)};this._element.style[r]="",this._queueCallback(n,this._element,!0)}_isShown(t=this._element){return t.classList.contains(Oe)}_configAfterMerge(t){return t.toggle=!!t.toggle,t.parent=Y(t.parent),t}_getDimension(){return this._element.classList.contains(ro)?no:oo}_initializeChildren(){if(!this._config.parent)return;let t=this._getFirstLevelChildren(Se);for(let r of t){let n=F.getElementFromSelector(r);n&&this._addAriaAndCollapsedClass([r],this._isShown(n))}}_getFirstLevelChildren(t){let r=F.find(eo,this._config.parent);return F.find(t,this._config.parent).filter(n=>!r.includes(n))}_addAriaAndCollapsedClass(t,r){if(t.length)for(let n of t)n.classList.toggle(to,!r),n.setAttribute("aria-expanded",r)}static jQueryInterface(t){let r={};return typeof t=="string"&&/show|hide/.test(t)&&(r.toggle=!1),this.each(function(){let n=e.getOrCreateInstance(this,r);if(typeof t=="string"){if(typeof n[t]=="undefined")throw new TypeError(`No method named "${t}"`);n[t]()}})}};S.on(document,Zn,Se,function(e){(e.target.tagName==="A"||e.delegateTarget&&e.delegateTarget.tagName==="A")&&e.preventDefault();for(let t of F.getMultipleElementsFromSelector(this))zt.getOrCreateInstance(t,{toggle:!1}).toggle()});Ft(zt);var co="l_",lo="h_",uo=document.getElementsByClassName("collapse");function xe(){[...uo].forEach(e=>{let t=lo+e.id.substring(co.length),r=document.getElementById(t);e.addEventListener("hide.bs.collapse",()=>{r&&(r.querySelector(".far.fa-folder-open").className="far fa-folder fa-fw",r.querySelector(".fas.fa-angle-down").classList.add("rotate"),r.classList.remove("hide-border-bottom"))}),e.addEventListener("show.bs.collapse",()=>{r&&(r.querySelector(".far.fa-folder").className="far fa-folder-open fa-fw",r.querySelector(".fas.fa-angle-down").classList.remove("rotate"),r.classList.add("hide-border-bottom"))})})}var We=Pn(en());var li=/^aria-[\w-]*$/i,Qt={"*":["class","dir","id","lang","role",li],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},ui=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),fi=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,pi=(e,t)=>{let r=e.nodeName.toLowerCase();return t.includes(r)?ui.has(r)?!!fi.test(e.nodeValue):!0:t.filter(n=>n instanceof RegExp).some(n=>n.test(r))};function rn(e,t,r){if(!e.length)return e;if(r&&typeof r=="function")return r(e);let o=new window.DOMParser().parseFromString(e,"text/html"),s=[].concat(...o.body.querySelectorAll("*"));for(let i of s){let a=i.nodeName.toLowerCase();if(!Object.keys(t).includes(a)){i.remove();continue}let c=[].concat(...i.attributes),u=[].concat(t["*"]||[],t[a]||[]);for(let l of c)pi(l,u)||i.removeAttribute(l.nodeName)}return o.body.innerHTML}var di="TemplateFactory",hi={allowList:Qt,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},mi={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},gi={entry:"(string|element|function|null)",selector:"(string|element)"},Fe=class extends Ht{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return hi}static get DefaultType(){return mi}static get NAME(){return di}getContent(){return Object.values(this._config.content).map(t=>this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content=N(N({},this._config.content),t),this}toHtml(){let t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(let[o,s]of Object.entries(this._config.content))this._setContent(t,s,o);let r=t.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&r.classList.add(...n.split(" ")),r}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(let[r,n]of Object.entries(t))super._typeCheckConfig({selector:r,entry:n},gi)}_setContent(t,r,n){let o=F.findOne(n,t);if(o){if(r=this._resolvePossibleFunction(r),!r){o.remove();return}if(X(r)){this._putElementInTemplate(Y(r),o);return}if(this._config.html){o.innerHTML=this._maybeSanitize(r);return}o.textContent=r}}_maybeSanitize(t){return this._config.sanitize?rn(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return Q(t,[void 0,this])}_putElementInTemplate(t,r){if(this._config.html){r.innerHTML="",r.append(t);return}r.textContent=t.textContent}},nn=Fe;var vi="tooltip",bi=new Set(["sanitize","allowList","sanitizeFn"]),He="fade",yi="modal",Xt="show",Ei=".tooltip-inner",on=`.${yi}`,sn="hide.bs.modal",Dt="hover",Ve="focus",qe="click",_i="manual",wi="hide",Ai="hidden",Ti="show",Oi="shown",Si="inserted",xi="click",Ci="focusin",Li="focusout",Di="mouseenter",Ni="mouseleave",Ii={AUTO:"auto",TOP:"top",RIGHT:ge()?"left":"right",BOTTOM:"bottom",LEFT:ge()?"right":"left"},Pi={allowList:Qt,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Mi={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"},Jt=class e extends Vt{constructor(t,r){if(typeof We=="undefined")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(t,r),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Pi}static get DefaultType(){return Mi}static get NAME(){return vi}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),S.off(this._element.closest(on),sn,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;let t=S.trigger(this._element,this.constructor.eventName(Ti)),n=(de(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!n)return;this._disposePopper();let o=this._getTipElement();this._element.setAttribute("aria-describedby",o.getAttribute("id"));let{container:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(o),S.trigger(this._element,this.constructor.eventName(Si))),this._popper=this._createPopper(o),o.classList.add(Xt),"ontouchstart"in document.documentElement)for(let a of[].concat(...document.body.children))S.on(a,"mouseover",he);let i=()=>{S.trigger(this._element,this.constructor.eventName(Oi)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(i,this.tip,this._isAnimated())}hide(){if(!this._isShown()||S.trigger(this._element,this.constructor.eventName(wi)).defaultPrevented)return;if(this._getTipElement().classList.remove(Xt),"ontouchstart"in document.documentElement)for(let o of[].concat(...document.body.children))S.off(o,"mouseover",he);this._activeTrigger[qe]=!1,this._activeTrigger[Ve]=!1,this._activeTrigger[Dt]=!1,this._isHovered=null;let n=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),S.trigger(this._element,this.constructor.eventName(Ai)))};this._queueCallback(n,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){let r=this._getTemplateFactory(t).toHtml();if(!r)return null;r.classList.remove(He,Xt),r.classList.add(`bs-${this.constructor.NAME}-auto`);let n=vr(this.constructor.NAME).toString();return r.setAttribute("id",n),this._isAnimated()&&r.classList.add(He),r}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new nn(hr(N({},this._config),{content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)})),this._templateFactory}_getContentForTemplate(){return{[Ei]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(He)}_isShown(){return this.tip&&this.tip.classList.contains(Xt)}_createPopper(t){let r=Q(this._config.placement,[this,t,this._element]),n=Ii[r.toUpperCase()];return We.createPopper(this._element,t,this._getPopperConfig(n))}_getOffset(){let{offset:t}=this._config;return typeof t=="string"?t.split(",").map(r=>Number.parseInt(r,10)):typeof t=="function"?r=>t(r,this._element):t}_resolvePossibleFunction(t){return Q(t,[this._element,this._element])}_getPopperConfig(t){let r={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:n=>{this._getTipElement().setAttribute("data-popper-placement",n.state.placement)}}]};return N(N({},r),Q(this._config.popperConfig,[void 0,r]))}_setListeners(){let t=this._config.trigger.split(" ");for(let r of t)if(r==="click")S.on(this._element,this.constructor.eventName(xi),this._config.selector,n=>{let o=this._initializeOnDelegatedTarget(n);o._activeTrigger[qe]=!(o._isShown()&&o._activeTrigger[qe]),o.toggle()});else if(r!==_i){let n=r===Dt?this.constructor.eventName(Di):this.constructor.eventName(Ci),o=r===Dt?this.constructor.eventName(Ni):this.constructor.eventName(Li);S.on(this._element,n,this._config.selector,s=>{let i=this._initializeOnDelegatedTarget(s);i._activeTrigger[s.type==="focusin"?Ve:Dt]=!0,i._enter()}),S.on(this._element,o,this._config.selector,s=>{let i=this._initializeOnDelegatedTarget(s);i._activeTrigger[s.type==="focusout"?Ve:Dt]=i._element.contains(s.relatedTarget),i._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},S.on(this._element.closest(on),sn,this._hideModalHandler)}_fixTitle(){let t=this._element.getAttribute("title");t&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,r){clearTimeout(this._timeout),this._timeout=setTimeout(t,r)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){let r=wt.getDataAttributes(this._element);for(let n of Object.keys(r))bi.has(n)&&delete r[n];return t=N(N({},r),typeof t=="object"&&t?t:{}),t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=t.container===!1?document.body:Y(t.container),typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),typeof t.title=="number"&&(t.title=t.title.toString()),typeof t.content=="number"&&(t.content=t.content.toString()),t}_getDelegateConfig(){let t={};for(let[r,n]of Object.entries(this._config))this.constructor.Default[r]!==n&&(t[r]=n);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){let r=e.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof r[t]=="undefined")throw new TypeError(`No method named "${t}"`);r[t]()}})}};Ft(Jt);var ze=Jt;var Ri=document.getElementById("toc-bar"),ki=document.getElementById("toc-solo-trigger"),$i=document.getElementsByClassName("toc-trigger"),z=document.getElementById("toc-popup"),Bi=document.getElementById("toc-popup-close"),an="overflow-hidden",Ue="closing",Nt,It,ht=class ht{static initBar(){new IntersectionObserver(r=>{r.forEach(n=>{Ri.classList.toggle("invisible",n.isIntersecting)})},{rootMargin:`-${U(this,It)}px 0px 0px 0px`}).observe(ki),Bt(this,Nt,!1)}static listenAnchors(){[...document.getElementsByClassName("toc-link")].forEach(r=>{r.onclick=()=>this.hidePopup()})}static refresh(){U(this,Nt)&&this.initComponents(),tocbot.refresh(this.options),this.listenAnchors()}static get popupOpened(){return z.open}static showPopup(){this.lockScroll(!0),z.showModal(),z.querySelector("li.is-active-li").scrollIntoView({block:"center"})}static hidePopup(){z.toggleAttribute(Ue),z.addEventListener("animationend",()=>{z.toggleAttribute(Ue),z.close()},{once:!0}),this.lockScroll(!1)}static lockScroll(t){document.documentElement.classList.toggle(an,t),document.body.classList.toggle(an,t)}static clickBackdrop(t){if(z.hasAttribute(Ue))return;let r=t.target.getBoundingClientRect();(t.clientXr.right||t.clientYr.bottom)&&this.hidePopup()}static initComponents(){this.initBar(),[...$i].forEach(t=>{t.onclick=()=>this.showPopup()}),z.onclick=t=>this.clickBackdrop(t),Bi.onclick=()=>this.hidePopup(),z.oncancel=t=>{t.preventDefault(),this.hidePopup()}}static init(){tocbot.init(this.options),this.listenAnchors(),this.initComponents()}};Nt=new WeakMap,It=new WeakMap,_t(ht,Nt,!0),_t(ht,It,48),Et(ht,"options",{tocSelector:"#toc-popup-content",contentSelector:".content",ignoreSelector:"[data-toc-skip]",headingSelector:"h2, h3, h4",orderedList:!1,scrollSmooth:!1,collapseDepth:4,headingsOffset:U(ht,It)});var Ye=ht;var Hs=matchMedia("(min-width: 1200px)");var qs=Theme.getThemeMapper("default","dark");var cn=document.getElementById("mode-toggle");function Ge(){cn&&cn.addEventListener("click",()=>{Theme.flip()})}function Ke(){let e=document.getElementById("back-to-top");window.addEventListener("scroll",()=>{window.scrollY>50?e.classList.add("show"):e.classList.remove("show")}),e.addEventListener("click",()=>{window.scrollTo({top:0})})}function Qe(){[...document.querySelectorAll('[data-bs-toggle="tooltip"]')].map(t=>new ze(t))}function Xe(){Ge(),Ke(),Qe()}var ji="sidebar-display",Fi=document.getElementById("sidebar"),Hi=document.getElementById("sidebar-trigger"),ln=document.getElementById("mask"),Z,Zt=class{static toggle(){Bt(this,Z,!U(this,Z)),document.body.toggleAttribute(ji,U(this,Z)),Fi.classList.toggle("z-2",U(this,Z)),ln.classList.toggle("d-none",!U(this,Z))}};Z=new WeakMap,_t(Zt,Z,!1);function Je(){Hi.onclick=ln.onclick=()=>Zt.toggle()}var un=document.getElementById("sidebar-trigger"),Ze=document.getElementById("search-trigger"),te=document.getElementById("search-cancel"),fn=document.querySelectorAll("#main-wrapper>.container>.row"),pn=document.getElementById("topbar-title"),ee=document.getElementById("search"),dn=document.getElementById("search-result-wrapper"),Vi=document.getElementById("search-results"),mt=document.getElementById("search-input"),re=document.getElementById("search-hints"),tr="d-block",M="d-none",hn="input-focus",mn="d-flex",ne=class{static on(){un.classList.add(M),pn.classList.add(M),Ze.classList.add(M),ee.classList.add(mn),te.classList.add(tr)}static off(){te.classList.remove(tr),ee.classList.remove(mn),un.classList.remove(M),pn.classList.remove(M),Ze.classList.remove(M)}},it=class{static on(){this.resultVisible||(dn.classList.remove(M),fn.forEach(t=>{t.classList.add(M)}),this.resultVisible=!0)}static off(){this.resultVisible&&(Vi.innerHTML="",re.classList.contains(M)&&re.classList.remove(M),dn.classList.add(M),fn.forEach(t=>{t.classList.remove(M)}),mt.textContent="",this.resultVisible=!1)}};Et(it,"resultVisible",!1);function gn(){return te.classList.contains(tr)}function vn(){Ze.addEventListener("click",()=>{ne.on(),it.on(),mt.focus()}),te.addEventListener("click",()=>{ne.off(),it.off()}),mt.addEventListener("focus",()=>{ee.classList.add(hn)}),mt.addEventListener("focusout",()=>{ee.classList.remove(hn)}),mt.addEventListener("input",()=>{mt.value===""?gn()?re.classList.remove(M):it.off():(it.on(),gn()&&re.classList.add(M))})}function er(){vn()}Xe();Je();er();xe();})(); +(() => { + var __create = Object.create; + var __defProp = Object.defineProperty; + var __defProps = Object.defineProperties; + var __getOwnPropDesc = Object.getOwnPropertyDescriptor; + var __getOwnPropDescs = Object.getOwnPropertyDescriptors; + var __getOwnPropNames = Object.getOwnPropertyNames; + var __getOwnPropSymbols = Object.getOwnPropertySymbols; + var __getProtoOf = Object.getPrototypeOf; + var __hasOwnProp = Object.prototype.hasOwnProperty; + var __propIsEnum = Object.prototype.propertyIsEnumerable; + var __typeError = (msg) => { + throw TypeError(msg); + }; + var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; + var __spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b)) { + if (__propIsEnum.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + } + return a; + }; + var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); + var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + }; + var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; + }; + var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); + var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg); + var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)); + var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value); + var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2@v2.21100.20000/package/dist/cjs/popper.js + var require_popper = __commonJS({ + "ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2@v2.21100.20000/package/dist/cjs/popper.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + function getWindow(node) { + if (node == null) { + return window; + } + if (node.toString() !== "[object Window]") { + var ownerDocument = node.ownerDocument; + return ownerDocument ? ownerDocument.defaultView || window : window; + } + return node; + } + function isElement2(node) { + var OwnElement = getWindow(node).Element; + return node instanceof OwnElement || node instanceof Element; + } + function isHTMLElement(node) { + var OwnElement = getWindow(node).HTMLElement; + return node instanceof OwnElement || node instanceof HTMLElement; + } + function isShadowRoot(node) { + if (typeof ShadowRoot === "undefined") { + return false; + } + var OwnElement = getWindow(node).ShadowRoot; + return node instanceof OwnElement || node instanceof ShadowRoot; + } + var max = Math.max; + var min = Math.min; + var round = Math.round; + function getBoundingClientRect(element, includeScale) { + if (includeScale === void 0) { + includeScale = false; + } + var rect = element.getBoundingClientRect(); + var scaleX = 1; + var scaleY = 1; + if (isHTMLElement(element) && includeScale) { + var offsetHeight = element.offsetHeight; + var offsetWidth = element.offsetWidth; + if (offsetWidth > 0) { + scaleX = round(rect.width) / offsetWidth || 1; + } + if (offsetHeight > 0) { + scaleY = round(rect.height) / offsetHeight || 1; + } + } + return { + width: rect.width / scaleX, + height: rect.height / scaleY, + top: rect.top / scaleY, + right: rect.right / scaleX, + bottom: rect.bottom / scaleY, + left: rect.left / scaleX, + x: rect.left / scaleX, + y: rect.top / scaleY + }; + } + function getWindowScroll(node) { + var win = getWindow(node); + var scrollLeft = win.pageXOffset; + var scrollTop = win.pageYOffset; + return { + scrollLeft, + scrollTop + }; + } + function getHTMLElementScroll(element) { + return { + scrollLeft: element.scrollLeft, + scrollTop: element.scrollTop + }; + } + function getNodeScroll(node) { + if (node === getWindow(node) || !isHTMLElement(node)) { + return getWindowScroll(node); + } else { + return getHTMLElementScroll(node); + } + } + function getNodeName(element) { + return element ? (element.nodeName || "").toLowerCase() : null; + } + function getDocumentElement(element) { + return ((isElement2(element) ? element.ownerDocument : ( + // $FlowFixMe[prop-missing] + element.document + )) || window.document).documentElement; + } + function getWindowScrollBarX(element) { + return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; + } + function getComputedStyle2(element) { + return getWindow(element).getComputedStyle(element); + } + function isScrollParent(element) { + var _getComputedStyle = getComputedStyle2(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY; + return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); + } + function isElementScaled(element) { + var rect = element.getBoundingClientRect(); + var scaleX = round(rect.width) / element.offsetWidth || 1; + var scaleY = round(rect.height) / element.offsetHeight || 1; + return scaleX !== 1 || scaleY !== 1; + } + function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { + if (isFixed === void 0) { + isFixed = false; + } + var isOffsetParentAnElement = isHTMLElement(offsetParent); + var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent); + var documentElement = getDocumentElement(offsetParent); + var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled); + var scroll = { + scrollLeft: 0, + scrollTop: 0 + }; + var offsets = { + x: 0, + y: 0 + }; + if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { + if (getNodeName(offsetParent) !== "body" || // https://github.com/popperjs/popper-core/issues/1078 + isScrollParent(documentElement)) { + scroll = getNodeScroll(offsetParent); + } + if (isHTMLElement(offsetParent)) { + offsets = getBoundingClientRect(offsetParent, true); + offsets.x += offsetParent.clientLeft; + offsets.y += offsetParent.clientTop; + } else if (documentElement) { + offsets.x = getWindowScrollBarX(documentElement); + } + } + return { + x: rect.left + scroll.scrollLeft - offsets.x, + y: rect.top + scroll.scrollTop - offsets.y, + width: rect.width, + height: rect.height + }; + } + function getLayoutRect(element) { + var clientRect = getBoundingClientRect(element); + var width = element.offsetWidth; + var height = element.offsetHeight; + if (Math.abs(clientRect.width - width) <= 1) { + width = clientRect.width; + } + if (Math.abs(clientRect.height - height) <= 1) { + height = clientRect.height; + } + return { + x: element.offsetLeft, + y: element.offsetTop, + width, + height + }; + } + function getParentNode(element) { + if (getNodeName(element) === "html") { + return element; + } + return ( + // this is a quicker (but less type safe) way to save quite some bytes from the bundle + // $FlowFixMe[incompatible-return] + // $FlowFixMe[prop-missing] + element.assignedSlot || // step into the shadow DOM of the parent of a slotted node + element.parentNode || // DOM Element detected + (isShadowRoot(element) ? element.host : null) || // ShadowRoot detected + // $FlowFixMe[incompatible-call]: HTMLElement is a Node + getDocumentElement(element) + ); + } + function getScrollParent(node) { + if (["html", "body", "#document"].indexOf(getNodeName(node)) >= 0) { + return node.ownerDocument.body; + } + if (isHTMLElement(node) && isScrollParent(node)) { + return node; + } + return getScrollParent(getParentNode(node)); + } + function listScrollParents(element, list) { + var _element$ownerDocumen; + if (list === void 0) { + list = []; + } + var scrollParent = getScrollParent(element); + var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body); + var win = getWindow(scrollParent); + var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; + var updatedList = list.concat(target); + return isBody ? updatedList : ( + // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here + updatedList.concat(listScrollParents(getParentNode(target))) + ); + } + function isTableElement(element) { + return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0; + } + function getTrueOffsetParent(element) { + if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837 + getComputedStyle2(element).position === "fixed") { + return null; + } + return element.offsetParent; + } + function getContainingBlock(element) { + var isFirefox = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1; + var isIE = navigator.userAgent.indexOf("Trident") !== -1; + if (isIE && isHTMLElement(element)) { + var elementCss = getComputedStyle2(element); + if (elementCss.position === "fixed") { + return null; + } + } + var currentNode = getParentNode(element); + while (isHTMLElement(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0) { + var css = getComputedStyle2(currentNode); + if (css.transform !== "none" || css.perspective !== "none" || css.contain === "paint" || ["transform", "perspective"].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === "filter" || isFirefox && css.filter && css.filter !== "none") { + return currentNode; + } else { + currentNode = currentNode.parentNode; + } + } + return null; + } + function getOffsetParent(element) { + var window2 = getWindow(element); + var offsetParent = getTrueOffsetParent(element); + while (offsetParent && isTableElement(offsetParent) && getComputedStyle2(offsetParent).position === "static") { + offsetParent = getTrueOffsetParent(offsetParent); + } + if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle2(offsetParent).position === "static")) { + return window2; + } + return offsetParent || getContainingBlock(element) || window2; + } + var top = "top"; + var bottom = "bottom"; + var right = "right"; + var left = "left"; + var auto = "auto"; + var basePlacements = [top, bottom, right, left]; + var start = "start"; + var end = "end"; + var clippingParents = "clippingParents"; + var viewport = "viewport"; + var popper = "popper"; + var reference = "reference"; + var variationPlacements = /* @__PURE__ */ basePlacements.reduce(function(acc, placement) { + return acc.concat([placement + "-" + start, placement + "-" + end]); + }, []); + var placements = /* @__PURE__ */ [].concat(basePlacements, [auto]).reduce(function(acc, placement) { + return acc.concat([placement, placement + "-" + start, placement + "-" + end]); + }, []); + var beforeRead = "beforeRead"; + var read = "read"; + var afterRead = "afterRead"; + var beforeMain = "beforeMain"; + var main = "main"; + var afterMain = "afterMain"; + var beforeWrite = "beforeWrite"; + var write = "write"; + var afterWrite = "afterWrite"; + var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite]; + function order(modifiers) { + var map = /* @__PURE__ */ new Map(); + var visited = /* @__PURE__ */ new Set(); + var result = []; + modifiers.forEach(function(modifier) { + map.set(modifier.name, modifier); + }); + function sort(modifier) { + visited.add(modifier.name); + var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); + requires.forEach(function(dep) { + if (!visited.has(dep)) { + var depModifier = map.get(dep); + if (depModifier) { + sort(depModifier); + } + } + }); + result.push(modifier); + } + modifiers.forEach(function(modifier) { + if (!visited.has(modifier.name)) { + sort(modifier); + } + }); + return result; + } + function orderModifiers(modifiers) { + var orderedModifiers = order(modifiers); + return modifierPhases.reduce(function(acc, phase) { + return acc.concat(orderedModifiers.filter(function(modifier) { + return modifier.phase === phase; + })); + }, []); + } + function debounce(fn) { + var pending; + return function() { + if (!pending) { + pending = new Promise(function(resolve) { + Promise.resolve().then(function() { + pending = void 0; + resolve(fn()); + }); + }); + } + return pending; + }; + } + function format(str) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + return [].concat(args).reduce(function(p, c) { + return p.replace(/%s/, c); + }, str); + } + var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s'; + var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available'; + var VALID_PROPERTIES = ["name", "enabled", "phase", "fn", "effect", "requires", "options"]; + function validateModifiers(modifiers) { + modifiers.forEach(function(modifier) { + [].concat(Object.keys(modifier), VALID_PROPERTIES).filter(function(value, index, self) { + return self.indexOf(value) === index; + }).forEach(function(key) { + switch (key) { + case "name": + if (typeof modifier.name !== "string") { + console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', '"' + String(modifier.name) + '"')); + } + break; + case "enabled": + if (typeof modifier.enabled !== "boolean") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', '"' + String(modifier.enabled) + '"')); + } + break; + case "phase": + if (modifierPhases.indexOf(modifier.phase) < 0) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(", "), '"' + String(modifier.phase) + '"')); + } + break; + case "fn": + if (typeof modifier.fn !== "function") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', '"' + String(modifier.fn) + '"')); + } + break; + case "effect": + if (modifier.effect != null && typeof modifier.effect !== "function") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', '"' + String(modifier.fn) + '"')); + } + break; + case "requires": + if (modifier.requires != null && !Array.isArray(modifier.requires)) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', '"' + String(modifier.requires) + '"')); + } + break; + case "requiresIfExists": + if (!Array.isArray(modifier.requiresIfExists)) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', '"' + String(modifier.requiresIfExists) + '"')); + } + break; + case "options": + case "data": + break; + default: + console.error('PopperJS: an invalid property has been provided to the "' + modifier.name + '" modifier, valid properties are ' + VALID_PROPERTIES.map(function(s) { + return '"' + s + '"'; + }).join(", ") + '; but "' + key + '" was provided.'); + } + modifier.requires && modifier.requires.forEach(function(requirement) { + if (modifiers.find(function(mod) { + return mod.name === requirement; + }) == null) { + console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement)); + } + }); + }); + }); + } + function uniqueBy(arr, fn) { + var identifiers = /* @__PURE__ */ new Set(); + return arr.filter(function(item) { + var identifier = fn(item); + if (!identifiers.has(identifier)) { + identifiers.add(identifier); + return true; + } + }); + } + function getBasePlacement(placement) { + return placement.split("-")[0]; + } + function mergeByName(modifiers) { + var merged = modifiers.reduce(function(merged2, current) { + var existing = merged2[current.name]; + merged2[current.name] = existing ? Object.assign({}, existing, current, { + options: Object.assign({}, existing.options, current.options), + data: Object.assign({}, existing.data, current.data) + }) : current; + return merged2; + }, {}); + return Object.keys(merged).map(function(key) { + return merged[key]; + }); + } + function getViewportRect(element) { + var win = getWindow(element); + var html = getDocumentElement(element); + var visualViewport = win.visualViewport; + var width = html.clientWidth; + var height = html.clientHeight; + var x = 0; + var y = 0; + if (visualViewport) { + width = visualViewport.width; + height = visualViewport.height; + if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { + x = visualViewport.offsetLeft; + y = visualViewport.offsetTop; + } + } + return { + width, + height, + x: x + getWindowScrollBarX(element), + y + }; + } + function getDocumentRect(element) { + var _element$ownerDocumen; + var html = getDocumentElement(element); + var winScroll = getWindowScroll(element); + var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; + var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); + var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); + var x = -winScroll.scrollLeft + getWindowScrollBarX(element); + var y = -winScroll.scrollTop; + if (getComputedStyle2(body || html).direction === "rtl") { + x += max(html.clientWidth, body ? body.clientWidth : 0) - width; + } + return { + width, + height, + x, + y + }; + } + function contains(parent, child) { + var rootNode = child.getRootNode && child.getRootNode(); + if (parent.contains(child)) { + return true; + } else if (rootNode && isShadowRoot(rootNode)) { + var next = child; + do { + if (next && parent.isSameNode(next)) { + return true; + } + next = next.parentNode || next.host; + } while (next); + } + return false; + } + function rectToClientRect(rect) { + return Object.assign({}, rect, { + left: rect.x, + top: rect.y, + right: rect.x + rect.width, + bottom: rect.y + rect.height + }); + } + function getInnerBoundingClientRect(element) { + var rect = getBoundingClientRect(element); + rect.top = rect.top + element.clientTop; + rect.left = rect.left + element.clientLeft; + rect.bottom = rect.top + element.clientHeight; + rect.right = rect.left + element.clientWidth; + rect.width = element.clientWidth; + rect.height = element.clientHeight; + rect.x = rect.left; + rect.y = rect.top; + return rect; + } + function getClientRectFromMixedType(element, clippingParent) { + return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement2(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); + } + function getClippingParents(element) { + var clippingParents2 = listScrollParents(getParentNode(element)); + var canEscapeClipping = ["absolute", "fixed"].indexOf(getComputedStyle2(element).position) >= 0; + var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element; + if (!isElement2(clipperElement)) { + return []; + } + return clippingParents2.filter(function(clippingParent) { + return isElement2(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body" && (canEscapeClipping ? getComputedStyle2(clippingParent).position !== "static" : true); + }); + } + function getClippingRect(element, boundary, rootBoundary) { + var mainClippingParents = boundary === "clippingParents" ? getClippingParents(element) : [].concat(boundary); + var clippingParents2 = [].concat(mainClippingParents, [rootBoundary]); + var firstClippingParent = clippingParents2[0]; + var clippingRect = clippingParents2.reduce(function(accRect, clippingParent) { + var rect = getClientRectFromMixedType(element, clippingParent); + accRect.top = max(rect.top, accRect.top); + accRect.right = min(rect.right, accRect.right); + accRect.bottom = min(rect.bottom, accRect.bottom); + accRect.left = max(rect.left, accRect.left); + return accRect; + }, getClientRectFromMixedType(element, firstClippingParent)); + clippingRect.width = clippingRect.right - clippingRect.left; + clippingRect.height = clippingRect.bottom - clippingRect.top; + clippingRect.x = clippingRect.left; + clippingRect.y = clippingRect.top; + return clippingRect; + } + function getVariation(placement) { + return placement.split("-")[1]; + } + function getMainAxisFromPlacement(placement) { + return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y"; + } + function computeOffsets(_ref) { + var reference2 = _ref.reference, element = _ref.element, placement = _ref.placement; + var basePlacement = placement ? getBasePlacement(placement) : null; + var variation = placement ? getVariation(placement) : null; + var commonX = reference2.x + reference2.width / 2 - element.width / 2; + var commonY = reference2.y + reference2.height / 2 - element.height / 2; + var offsets; + switch (basePlacement) { + case top: + offsets = { + x: commonX, + y: reference2.y - element.height + }; + break; + case bottom: + offsets = { + x: commonX, + y: reference2.y + reference2.height + }; + break; + case right: + offsets = { + x: reference2.x + reference2.width, + y: commonY + }; + break; + case left: + offsets = { + x: reference2.x - element.width, + y: commonY + }; + break; + default: + offsets = { + x: reference2.x, + y: reference2.y + }; + } + var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null; + if (mainAxis != null) { + var len = mainAxis === "y" ? "height" : "width"; + switch (variation) { + case start: + offsets[mainAxis] = offsets[mainAxis] - (reference2[len] / 2 - element[len] / 2); + break; + case end: + offsets[mainAxis] = offsets[mainAxis] + (reference2[len] / 2 - element[len] / 2); + break; + } + } + return offsets; + } + function getFreshSideObject() { + return { + top: 0, + right: 0, + bottom: 0, + left: 0 + }; + } + function mergePaddingObject(paddingObject) { + return Object.assign({}, getFreshSideObject(), paddingObject); + } + function expandToHashMap(value, keys) { + return keys.reduce(function(hashMap, key) { + hashMap[key] = value; + return hashMap; + }, {}); + } + function detectOverflow(state, options) { + if (options === void 0) { + options = {}; + } + var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding; + var paddingObject = mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements)); + var altContext = elementContext === popper ? reference : popper; + var popperRect = state.rects.popper; + var element = state.elements[altBoundary ? altContext : elementContext]; + var clippingClientRect = getClippingRect(isElement2(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary); + var referenceClientRect = getBoundingClientRect(state.elements.reference); + var popperOffsets2 = computeOffsets({ + reference: referenceClientRect, + element: popperRect, + strategy: "absolute", + placement + }); + var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets2)); + var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; + var overflowOffsets = { + top: clippingClientRect.top - elementClientRect.top + paddingObject.top, + bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, + left: clippingClientRect.left - elementClientRect.left + paddingObject.left, + right: elementClientRect.right - clippingClientRect.right + paddingObject.right + }; + var offsetData = state.modifiersData.offset; + if (elementContext === popper && offsetData) { + var offset2 = offsetData[placement]; + Object.keys(overflowOffsets).forEach(function(key) { + var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1; + var axis = [top, bottom].indexOf(key) >= 0 ? "y" : "x"; + overflowOffsets[key] += offset2[axis] * multiply; + }); + } + return overflowOffsets; + } + var INVALID_ELEMENT_ERROR = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element."; + var INFINITE_LOOP_ERROR = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash."; + var DEFAULT_OPTIONS = { + placement: "bottom", + modifiers: [], + strategy: "absolute" + }; + function areValidElements() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + return !args.some(function(element) { + return !(element && typeof element.getBoundingClientRect === "function"); + }); + } + function popperGenerator(generatorOptions) { + if (generatorOptions === void 0) { + generatorOptions = {}; + } + var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers2 = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2; + return function createPopper3(reference2, popper2, options) { + if (options === void 0) { + options = defaultOptions; + } + var state = { + placement: "bottom", + orderedModifiers: [], + options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), + modifiersData: {}, + elements: { + reference: reference2, + popper: popper2 + }, + attributes: {}, + styles: {} + }; + var effectCleanupFns = []; + var isDestroyed = false; + var instance = { + state, + setOptions: function setOptions(setOptionsAction) { + var options2 = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction; + cleanupModifierEffects(); + state.options = Object.assign({}, defaultOptions, state.options, options2); + state.scrollParents = { + reference: isElement2(reference2) ? listScrollParents(reference2) : reference2.contextElement ? listScrollParents(reference2.contextElement) : [], + popper: listScrollParents(popper2) + }; + var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers2, state.options.modifiers))); + state.orderedModifiers = orderedModifiers.filter(function(m) { + return m.enabled; + }); + if (true) { + var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function(_ref) { + var name = _ref.name; + return name; + }); + validateModifiers(modifiers); + if (getBasePlacement(state.options.placement) === auto) { + var flipModifier = state.orderedModifiers.find(function(_ref2) { + var name = _ref2.name; + return name === "flip"; + }); + if (!flipModifier) { + console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" ")); + } + } + var _getComputedStyle = getComputedStyle2(popper2), marginTop = _getComputedStyle.marginTop, marginRight = _getComputedStyle.marginRight, marginBottom = _getComputedStyle.marginBottom, marginLeft = _getComputedStyle.marginLeft; + if ([marginTop, marginRight, marginBottom, marginLeft].some(function(margin) { + return parseFloat(margin); + })) { + console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" ")); + } + } + runModifierEffects(); + return instance.update(); + }, + // Sync update – it will always be executed, even if not necessary. This + // is useful for low frequency updates where sync behavior simplifies the + // logic. + // For high frequency updates (e.g. `resize` and `scroll` events), always + // prefer the async Popper#update method + forceUpdate: function forceUpdate() { + if (isDestroyed) { + return; + } + var _state$elements = state.elements, reference3 = _state$elements.reference, popper3 = _state$elements.popper; + if (!areValidElements(reference3, popper3)) { + if (true) { + console.error(INVALID_ELEMENT_ERROR); + } + return; + } + state.rects = { + reference: getCompositeRect(reference3, getOffsetParent(popper3), state.options.strategy === "fixed"), + popper: getLayoutRect(popper3) + }; + state.reset = false; + state.placement = state.options.placement; + state.orderedModifiers.forEach(function(modifier) { + return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); + }); + var __debug_loops__ = 0; + for (var index = 0; index < state.orderedModifiers.length; index++) { + if (true) { + __debug_loops__ += 1; + if (__debug_loops__ > 100) { + console.error(INFINITE_LOOP_ERROR); + break; + } + } + if (state.reset === true) { + state.reset = false; + index = -1; + continue; + } + var _state$orderedModifie = state.orderedModifiers[index], fn = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name; + if (typeof fn === "function") { + state = fn({ + state, + options: _options, + name, + instance + }) || state; + } + } + }, + // Async and optimistically optimized update – it will not be executed if + // not necessary (debounced to run at most once-per-tick) + update: debounce(function() { + return new Promise(function(resolve) { + instance.forceUpdate(); + resolve(state); + }); + }), + destroy: function destroy() { + cleanupModifierEffects(); + isDestroyed = true; + } + }; + if (!areValidElements(reference2, popper2)) { + if (true) { + console.error(INVALID_ELEMENT_ERROR); + } + return instance; + } + instance.setOptions(options).then(function(state2) { + if (!isDestroyed && options.onFirstUpdate) { + options.onFirstUpdate(state2); + } + }); + function runModifierEffects() { + state.orderedModifiers.forEach(function(_ref3) { + var name = _ref3.name, _ref3$options = _ref3.options, options2 = _ref3$options === void 0 ? {} : _ref3$options, effect2 = _ref3.effect; + if (typeof effect2 === "function") { + var cleanupFn = effect2({ + state, + name, + instance, + options: options2 + }); + var noopFn = function noopFn2() { + }; + effectCleanupFns.push(cleanupFn || noopFn); + } + }); + } + function cleanupModifierEffects() { + effectCleanupFns.forEach(function(fn) { + return fn(); + }); + effectCleanupFns = []; + } + return instance; + }; + } + var passive = { + passive: true + }; + function effect$2(_ref) { + var state = _ref.state, instance = _ref.instance, options = _ref.options; + var _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? true : _options$resize; + var window2 = getWindow(state.elements.popper); + var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper); + if (scroll) { + scrollParents.forEach(function(scrollParent) { + scrollParent.addEventListener("scroll", instance.update, passive); + }); + } + if (resize) { + window2.addEventListener("resize", instance.update, passive); + } + return function() { + if (scroll) { + scrollParents.forEach(function(scrollParent) { + scrollParent.removeEventListener("scroll", instance.update, passive); + }); + } + if (resize) { + window2.removeEventListener("resize", instance.update, passive); + } + }; + } + var eventListeners = { + name: "eventListeners", + enabled: true, + phase: "write", + fn: function fn() { + }, + effect: effect$2, + data: {} + }; + function popperOffsets(_ref) { + var state = _ref.state, name = _ref.name; + state.modifiersData[name] = computeOffsets({ + reference: state.rects.reference, + element: state.rects.popper, + strategy: "absolute", + placement: state.placement + }); + } + var popperOffsets$1 = { + name: "popperOffsets", + enabled: true, + phase: "read", + fn: popperOffsets, + data: {} + }; + var unsetSides = { + top: "auto", + right: "auto", + bottom: "auto", + left: "auto" + }; + function roundOffsetsByDPR(_ref) { + var x = _ref.x, y = _ref.y; + var win = window; + var dpr = win.devicePixelRatio || 1; + return { + x: round(x * dpr) / dpr || 0, + y: round(y * dpr) / dpr || 0 + }; + } + function mapToStyles(_ref2) { + var _Object$assign2; + var popper2 = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed; + var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === "function" ? roundOffsets(offsets) : offsets, _ref3$x = _ref3.x, x = _ref3$x === void 0 ? 0 : _ref3$x, _ref3$y = _ref3.y, y = _ref3$y === void 0 ? 0 : _ref3$y; + var hasX = offsets.hasOwnProperty("x"); + var hasY = offsets.hasOwnProperty("y"); + var sideX = left; + var sideY = top; + var win = window; + if (adaptive) { + var offsetParent = getOffsetParent(popper2); + var heightProp = "clientHeight"; + var widthProp = "clientWidth"; + if (offsetParent === getWindow(popper2)) { + offsetParent = getDocumentElement(popper2); + if (getComputedStyle2(offsetParent).position !== "static" && position === "absolute") { + heightProp = "scrollHeight"; + widthProp = "scrollWidth"; + } + } + offsetParent = offsetParent; + if (placement === top || (placement === left || placement === right) && variation === end) { + sideY = bottom; + var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : ( + // $FlowFixMe[prop-missing] + offsetParent[heightProp] + ); + y -= offsetY - popperRect.height; + y *= gpuAcceleration ? 1 : -1; + } + if (placement === left || (placement === top || placement === bottom) && variation === end) { + sideX = right; + var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : ( + // $FlowFixMe[prop-missing] + offsetParent[widthProp] + ); + x -= offsetX - popperRect.width; + x *= gpuAcceleration ? 1 : -1; + } + } + var commonStyles = Object.assign({ + position + }, adaptive && unsetSides); + if (gpuAcceleration) { + var _Object$assign; + return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); + } + return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2)); + } + function computeStyles(_ref4) { + var state = _ref4.state, options = _ref4.options; + var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; + if (true) { + var transitionProperty = getComputedStyle2(state.elements.popper).transitionProperty || ""; + if (adaptive && ["transform", "top", "right", "bottom", "left"].some(function(property) { + return transitionProperty.indexOf(property) >= 0; + })) { + console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', "\n\n", 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", "\n\n", "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" ")); + } + } + var commonStyles = { + placement: getBasePlacement(state.placement), + variation: getVariation(state.placement), + popper: state.elements.popper, + popperRect: state.rects.popper, + gpuAcceleration, + isFixed: state.options.strategy === "fixed" + }; + if (state.modifiersData.popperOffsets != null) { + state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.popperOffsets, + position: state.options.strategy, + adaptive, + roundOffsets + }))); + } + if (state.modifiersData.arrow != null) { + state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.arrow, + position: "absolute", + adaptive: false, + roundOffsets + }))); + } + state.attributes.popper = Object.assign({}, state.attributes.popper, { + "data-popper-placement": state.placement + }); + } + var computeStyles$1 = { + name: "computeStyles", + enabled: true, + phase: "beforeWrite", + fn: computeStyles, + data: {} + }; + function applyStyles(_ref) { + var state = _ref.state; + Object.keys(state.elements).forEach(function(name) { + var style = state.styles[name] || {}; + var attributes = state.attributes[name] || {}; + var element = state.elements[name]; + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } + Object.assign(element.style, style); + Object.keys(attributes).forEach(function(name2) { + var value = attributes[name2]; + if (value === false) { + element.removeAttribute(name2); + } else { + element.setAttribute(name2, value === true ? "" : value); + } + }); + }); + } + function effect$1(_ref2) { + var state = _ref2.state; + var initialStyles = { + popper: { + position: state.options.strategy, + left: "0", + top: "0", + margin: "0" + }, + arrow: { + position: "absolute" + }, + reference: {} + }; + Object.assign(state.elements.popper.style, initialStyles.popper); + state.styles = initialStyles; + if (state.elements.arrow) { + Object.assign(state.elements.arrow.style, initialStyles.arrow); + } + return function() { + Object.keys(state.elements).forEach(function(name) { + var element = state.elements[name]; + var attributes = state.attributes[name] || {}; + var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); + var style = styleProperties.reduce(function(style2, property) { + style2[property] = ""; + return style2; + }, {}); + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } + Object.assign(element.style, style); + Object.keys(attributes).forEach(function(attribute) { + element.removeAttribute(attribute); + }); + }); + }; + } + var applyStyles$1 = { + name: "applyStyles", + enabled: true, + phase: "write", + fn: applyStyles, + effect: effect$1, + requires: ["computeStyles"] + }; + function distanceAndSkiddingToXY(placement, rects, offset2) { + var basePlacement = getBasePlacement(placement); + var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1; + var _ref = typeof offset2 === "function" ? offset2(Object.assign({}, rects, { + placement + })) : offset2, skidding = _ref[0], distance = _ref[1]; + skidding = skidding || 0; + distance = (distance || 0) * invertDistance; + return [left, right].indexOf(basePlacement) >= 0 ? { + x: distance, + y: skidding + } : { + x: skidding, + y: distance + }; + } + function offset(_ref2) { + var state = _ref2.state, options = _ref2.options, name = _ref2.name; + var _options$offset = options.offset, offset2 = _options$offset === void 0 ? [0, 0] : _options$offset; + var data = placements.reduce(function(acc, placement) { + acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset2); + return acc; + }, {}); + var _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y; + if (state.modifiersData.popperOffsets != null) { + state.modifiersData.popperOffsets.x += x; + state.modifiersData.popperOffsets.y += y; + } + state.modifiersData[name] = data; + } + var offset$1 = { + name: "offset", + enabled: true, + phase: "main", + requires: ["popperOffsets"], + fn: offset + }; + var hash$1 = { + left: "right", + right: "left", + bottom: "top", + top: "bottom" + }; + function getOppositePlacement(placement) { + return placement.replace(/left|right|bottom|top/g, function(matched) { + return hash$1[matched]; + }); + } + var hash = { + start: "end", + end: "start" + }; + function getOppositeVariationPlacement(placement) { + return placement.replace(/start|end/g, function(matched) { + return hash[matched]; + }); + } + function computeAutoPlacement(state, options) { + if (options === void 0) { + options = {}; + } + var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP; + var variation = getVariation(placement); + var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function(placement2) { + return getVariation(placement2) === variation; + }) : basePlacements; + var allowedPlacements = placements$1.filter(function(placement2) { + return allowedAutoPlacements.indexOf(placement2) >= 0; + }); + if (allowedPlacements.length === 0) { + allowedPlacements = placements$1; + if (true) { + console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" ")); + } + } + var overflows = allowedPlacements.reduce(function(acc, placement2) { + acc[placement2] = detectOverflow(state, { + placement: placement2, + boundary, + rootBoundary, + padding + })[getBasePlacement(placement2)]; + return acc; + }, {}); + return Object.keys(overflows).sort(function(a, b) { + return overflows[a] - overflows[b]; + }); + } + function getExpandedFallbackPlacements(placement) { + if (getBasePlacement(placement) === auto) { + return []; + } + var oppositePlacement = getOppositePlacement(placement); + return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; + } + function flip(_ref) { + var state = _ref.state, options = _ref.options, name = _ref.name; + if (state.modifiersData[name]._skip) { + return; + } + var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements; + var preferredPlacement = state.options.placement; + var basePlacement = getBasePlacement(preferredPlacement); + var isBasePlacement = basePlacement === preferredPlacement; + var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)); + var placements2 = [preferredPlacement].concat(fallbackPlacements).reduce(function(acc, placement2) { + return acc.concat(getBasePlacement(placement2) === auto ? computeAutoPlacement(state, { + placement: placement2, + boundary, + rootBoundary, + padding, + flipVariations, + allowedAutoPlacements + }) : placement2); + }, []); + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var checksMap = /* @__PURE__ */ new Map(); + var makeFallbackChecks = true; + var firstFittingPlacement = placements2[0]; + for (var i = 0; i < placements2.length; i++) { + var placement = placements2[i]; + var _basePlacement = getBasePlacement(placement); + var isStartVariation = getVariation(placement) === start; + var isVertical = [top, bottom].indexOf(_basePlacement) >= 0; + var len = isVertical ? "width" : "height"; + var overflow = detectOverflow(state, { + placement, + boundary, + rootBoundary, + altBoundary, + padding + }); + var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top; + if (referenceRect[len] > popperRect[len]) { + mainVariationSide = getOppositePlacement(mainVariationSide); + } + var altVariationSide = getOppositePlacement(mainVariationSide); + var checks = []; + if (checkMainAxis) { + checks.push(overflow[_basePlacement] <= 0); + } + if (checkAltAxis) { + checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0); + } + if (checks.every(function(check) { + return check; + })) { + firstFittingPlacement = placement; + makeFallbackChecks = false; + break; + } + checksMap.set(placement, checks); + } + if (makeFallbackChecks) { + var numberOfChecks = flipVariations ? 3 : 1; + var _loop = function _loop2(_i2) { + var fittingPlacement = placements2.find(function(placement2) { + var checks2 = checksMap.get(placement2); + if (checks2) { + return checks2.slice(0, _i2).every(function(check) { + return check; + }); + } + }); + if (fittingPlacement) { + firstFittingPlacement = fittingPlacement; + return "break"; + } + }; + for (var _i = numberOfChecks; _i > 0; _i--) { + var _ret = _loop(_i); + if (_ret === "break") break; + } + } + if (state.placement !== firstFittingPlacement) { + state.modifiersData[name]._skip = true; + state.placement = firstFittingPlacement; + state.reset = true; + } + } + var flip$1 = { + name: "flip", + enabled: true, + phase: "main", + fn: flip, + requiresIfExists: ["offset"], + data: { + _skip: false + } + }; + function getAltAxis(axis) { + return axis === "x" ? "y" : "x"; + } + function within(min$1, value, max$1) { + return max(min$1, min(value, max$1)); + } + function withinMaxClamp(min2, value, max2) { + var v = within(min2, value, max2); + return v > max2 ? max2 : v; + } + function preventOverflow(_ref) { + var state = _ref.state, options = _ref.options, name = _ref.name; + var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset; + var overflow = detectOverflow(state, { + boundary, + rootBoundary, + padding, + altBoundary + }); + var basePlacement = getBasePlacement(state.placement); + var variation = getVariation(state.placement); + var isBasePlacement = !variation; + var mainAxis = getMainAxisFromPlacement(basePlacement); + var altAxis = getAltAxis(mainAxis); + var popperOffsets2 = state.modifiersData.popperOffsets; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var tetherOffsetValue = typeof tetherOffset === "function" ? tetherOffset(Object.assign({}, state.rects, { + placement: state.placement + })) : tetherOffset; + var normalizedTetherOffsetValue = typeof tetherOffsetValue === "number" ? { + mainAxis: tetherOffsetValue, + altAxis: tetherOffsetValue + } : Object.assign({ + mainAxis: 0, + altAxis: 0 + }, tetherOffsetValue); + var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null; + var data = { + x: 0, + y: 0 + }; + if (!popperOffsets2) { + return; + } + if (checkMainAxis) { + var _offsetModifierState$; + var mainSide = mainAxis === "y" ? top : left; + var altSide = mainAxis === "y" ? bottom : right; + var len = mainAxis === "y" ? "height" : "width"; + var offset2 = popperOffsets2[mainAxis]; + var min$1 = offset2 + overflow[mainSide]; + var max$1 = offset2 - overflow[altSide]; + var additive = tether ? -popperRect[len] / 2 : 0; + var minLen = variation === start ? referenceRect[len] : popperRect[len]; + var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; + var arrowElement = state.elements.arrow; + var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { + width: 0, + height: 0 + }; + var arrowPaddingObject = state.modifiersData["arrow#persistent"] ? state.modifiersData["arrow#persistent"].padding : getFreshSideObject(); + var arrowPaddingMin = arrowPaddingObject[mainSide]; + var arrowPaddingMax = arrowPaddingObject[altSide]; + var arrowLen = within(0, referenceRect[len], arrowRect[len]); + var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis; + var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; + var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); + var clientOffset = arrowOffsetParent ? mainAxis === "y" ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; + var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0; + var tetherMin = offset2 + minOffset - offsetModifierValue - clientOffset; + var tetherMax = offset2 + maxOffset - offsetModifierValue; + var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset2, tether ? max(max$1, tetherMax) : max$1); + popperOffsets2[mainAxis] = preventedOffset; + data[mainAxis] = preventedOffset - offset2; + } + if (checkAltAxis) { + var _offsetModifierState$2; + var _mainSide = mainAxis === "x" ? top : left; + var _altSide = mainAxis === "x" ? bottom : right; + var _offset = popperOffsets2[altAxis]; + var _len = altAxis === "y" ? "height" : "width"; + var _min = _offset + overflow[_mainSide]; + var _max = _offset - overflow[_altSide]; + var isOriginSide = [top, left].indexOf(basePlacement) !== -1; + var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0; + var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis; + var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max; + var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max); + popperOffsets2[altAxis] = _preventedOffset; + data[altAxis] = _preventedOffset - _offset; + } + state.modifiersData[name] = data; + } + var preventOverflow$1 = { + name: "preventOverflow", + enabled: true, + phase: "main", + fn: preventOverflow, + requiresIfExists: ["offset"] + }; + var toPaddingObject = function toPaddingObject2(padding, state) { + padding = typeof padding === "function" ? padding(Object.assign({}, state.rects, { + placement: state.placement + })) : padding; + return mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements)); + }; + function arrow(_ref) { + var _state$modifiersData$; + var state = _ref.state, name = _ref.name, options = _ref.options; + var arrowElement = state.elements.arrow; + var popperOffsets2 = state.modifiersData.popperOffsets; + var basePlacement = getBasePlacement(state.placement); + var axis = getMainAxisFromPlacement(basePlacement); + var isVertical = [left, right].indexOf(basePlacement) >= 0; + var len = isVertical ? "height" : "width"; + if (!arrowElement || !popperOffsets2) { + return; + } + var paddingObject = toPaddingObject(options.padding, state); + var arrowRect = getLayoutRect(arrowElement); + var minProp = axis === "y" ? top : left; + var maxProp = axis === "y" ? bottom : right; + var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets2[axis] - state.rects.popper[len]; + var startDiff = popperOffsets2[axis] - state.rects.reference[axis]; + var arrowOffsetParent = getOffsetParent(arrowElement); + var clientSize = arrowOffsetParent ? axis === "y" ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0; + var centerToReference = endDiff / 2 - startDiff / 2; + var min2 = paddingObject[minProp]; + var max2 = clientSize - arrowRect[len] - paddingObject[maxProp]; + var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference; + var offset2 = within(min2, center, max2); + var axisProp = axis; + state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset2, _state$modifiersData$.centerOffset = offset2 - center, _state$modifiersData$); + } + function effect(_ref2) { + var state = _ref2.state, options = _ref2.options; + var _options$element = options.element, arrowElement = _options$element === void 0 ? "[data-popper-arrow]" : _options$element; + if (arrowElement == null) { + return; + } + if (typeof arrowElement === "string") { + arrowElement = state.elements.popper.querySelector(arrowElement); + if (!arrowElement) { + return; + } + } + if (true) { + if (!isHTMLElement(arrowElement)) { + console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', "To use an SVG arrow, wrap it in an HTMLElement that will be used as", "the arrow."].join(" ")); + } + } + if (!contains(state.elements.popper, arrowElement)) { + if (true) { + console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" ")); + } + return; + } + state.elements.arrow = arrowElement; + } + var arrow$1 = { + name: "arrow", + enabled: true, + phase: "main", + fn: arrow, + effect, + requires: ["popperOffsets"], + requiresIfExists: ["preventOverflow"] + }; + function getSideOffsets(overflow, rect, preventedOffsets) { + if (preventedOffsets === void 0) { + preventedOffsets = { + x: 0, + y: 0 + }; + } + return { + top: overflow.top - rect.height - preventedOffsets.y, + right: overflow.right - rect.width + preventedOffsets.x, + bottom: overflow.bottom - rect.height + preventedOffsets.y, + left: overflow.left - rect.width - preventedOffsets.x + }; + } + function isAnySideFullyClipped(overflow) { + return [top, right, bottom, left].some(function(side) { + return overflow[side] >= 0; + }); + } + function hide(_ref) { + var state = _ref.state, name = _ref.name; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var preventedOffsets = state.modifiersData.preventOverflow; + var referenceOverflow = detectOverflow(state, { + elementContext: "reference" + }); + var popperAltOverflow = detectOverflow(state, { + altBoundary: true + }); + var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect); + var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets); + var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets); + var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); + state.modifiersData[name] = { + referenceClippingOffsets, + popperEscapeOffsets, + isReferenceHidden, + hasPopperEscaped + }; + state.attributes.popper = Object.assign({}, state.attributes.popper, { + "data-popper-reference-hidden": isReferenceHidden, + "data-popper-escaped": hasPopperEscaped + }); + } + var hide$1 = { + name: "hide", + enabled: true, + phase: "main", + requiresIfExists: ["preventOverflow"], + fn: hide + }; + var defaultModifiers$1 = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1]; + var createPopper$1 = /* @__PURE__ */ popperGenerator({ + defaultModifiers: defaultModifiers$1 + }); + var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1]; + var createPopper2 = /* @__PURE__ */ popperGenerator({ + defaultModifiers + }); + exports.applyStyles = applyStyles$1; + exports.arrow = arrow$1; + exports.computeStyles = computeStyles$1; + exports.createPopper = createPopper2; + exports.createPopperLite = createPopper$1; + exports.defaultModifiers = defaultModifiers; + exports.detectOverflow = detectOverflow; + exports.eventListeners = eventListeners; + exports.flip = flip$1; + exports.hide = hide$1; + exports.offset = offset$1; + exports.popperGenerator = popperGenerator; + exports.popperOffsets = popperOffsets$1; + exports.preventOverflow = preventOverflow$1; + } + }); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/data.js + var elementMap = /* @__PURE__ */ new Map(); + var data_default = { + set(element, key, instance) { + if (!elementMap.has(element)) { + elementMap.set(element, /* @__PURE__ */ new Map()); + } + const instanceMap = elementMap.get(element); + if (!instanceMap.has(key) && instanceMap.size !== 0) { + console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`); + return; + } + instanceMap.set(key, instance); + }, + get(element, key) { + if (elementMap.has(element)) { + return elementMap.get(element).get(key) || null; + } + return null; + }, + remove(element, key) { + if (!elementMap.has(element)) { + return; + } + const instanceMap = elementMap.get(element); + instanceMap.delete(key); + if (instanceMap.size === 0) { + elementMap.delete(element); + } + } + }; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/index.js + var MAX_UID = 1e6; + var MILLISECONDS_MULTIPLIER = 1e3; + var TRANSITION_END = "transitionend"; + var parseSelector = (selector) => { + if (selector && window.CSS && window.CSS.escape) { + selector = selector.replace(/#([^\s"#']+)/g, (match, id) => `#${CSS.escape(id)}`); + } + return selector; + }; + var toType = (object) => { + if (object === null || object === void 0) { + return `${object}`; + } + return Object.prototype.toString.call(object).match(/\s([a-z]+)/i)[1].toLowerCase(); + }; + var getUID = (prefix) => { + do { + prefix += Math.floor(Math.random() * MAX_UID); + } while (document.getElementById(prefix)); + return prefix; + }; + var getTransitionDurationFromElement = (element) => { + if (!element) { + return 0; + } + let { transitionDuration, transitionDelay } = window.getComputedStyle(element); + const floatTransitionDuration = Number.parseFloat(transitionDuration); + const floatTransitionDelay = Number.parseFloat(transitionDelay); + if (!floatTransitionDuration && !floatTransitionDelay) { + return 0; + } + transitionDuration = transitionDuration.split(",")[0]; + transitionDelay = transitionDelay.split(",")[0]; + return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; + }; + var triggerTransitionEnd = (element) => { + element.dispatchEvent(new Event(TRANSITION_END)); + }; + var isElement = (object) => { + if (!object || typeof object !== "object") { + return false; + } + if (typeof object.jquery !== "undefined") { + object = object[0]; + } + return typeof object.nodeType !== "undefined"; + }; + var getElement = (object) => { + if (isElement(object)) { + return object.jquery ? object[0] : object; + } + if (typeof object === "string" && object.length > 0) { + return document.querySelector(parseSelector(object)); + } + return null; + }; + var isVisible = (element) => { + if (!isElement(element) || element.getClientRects().length === 0) { + return false; + } + const elementIsVisible = getComputedStyle(element).getPropertyValue("visibility") === "visible"; + const closedDetails = element.closest("details:not([open])"); + if (!closedDetails) { + return elementIsVisible; + } + if (closedDetails !== element) { + const summary = element.closest("summary"); + if (summary && summary.parentNode !== closedDetails) { + return false; + } + if (summary === null) { + return false; + } + } + return elementIsVisible; + }; + var isDisabled = (element) => { + if (!element || element.nodeType !== Node.ELEMENT_NODE) { + return true; + } + if (element.classList.contains("disabled")) { + return true; + } + if (typeof element.disabled !== "undefined") { + return element.disabled; + } + return element.hasAttribute("disabled") && element.getAttribute("disabled") !== "false"; + }; + var findShadowRoot = (element) => { + if (!document.documentElement.attachShadow) { + return null; + } + if (typeof element.getRootNode === "function") { + const root = element.getRootNode(); + return root instanceof ShadowRoot ? root : null; + } + if (element instanceof ShadowRoot) { + return element; + } + if (!element.parentNode) { + return null; + } + return findShadowRoot(element.parentNode); + }; + var noop = () => { + }; + var reflow = (element) => { + element.offsetHeight; + }; + var getjQuery = () => { + if (window.jQuery && !document.body.hasAttribute("data-bs-no-jquery")) { + return window.jQuery; + } + return null; + }; + var DOMContentLoadedCallbacks = []; + var onDOMContentLoaded = (callback) => { + if (document.readyState === "loading") { + if (!DOMContentLoadedCallbacks.length) { + document.addEventListener("DOMContentLoaded", () => { + for (const callback2 of DOMContentLoadedCallbacks) { + callback2(); + } + }); + } + DOMContentLoadedCallbacks.push(callback); + } else { + callback(); + } + }; + var isRTL = () => document.documentElement.dir === "rtl"; + var defineJQueryPlugin = (plugin) => { + onDOMContentLoaded(() => { + const $ = getjQuery(); + if ($) { + const name = plugin.NAME; + const JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; + $.fn[name].noConflict = () => { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; + } + }); + }; + var execute = (possibleCallback, args = [], defaultValue = possibleCallback) => { + return typeof possibleCallback === "function" ? possibleCallback.call(...args) : defaultValue; + }; + var executeAfterTransition = (callback, transitionElement, waitForTransition = true) => { + if (!waitForTransition) { + execute(callback); + return; + } + const durationPadding = 5; + const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding; + let called = false; + const handler = ({ target }) => { + if (target !== transitionElement) { + return; + } + called = true; + transitionElement.removeEventListener(TRANSITION_END, handler); + execute(callback); + }; + transitionElement.addEventListener(TRANSITION_END, handler); + setTimeout(() => { + if (!called) { + triggerTransitionEnd(transitionElement); + } + }, emulatedDuration); + }; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/event-handler.js + var namespaceRegex = /[^.]*(?=\..*)\.|.*/; + var stripNameRegex = /\..*/; + var stripUidRegex = /::\d+$/; + var eventRegistry = {}; + var uidEvent = 1; + var customEvents = { + mouseenter: "mouseover", + mouseleave: "mouseout" + }; + var nativeEvents = /* @__PURE__ */ new Set([ + "click", + "dblclick", + "mouseup", + "mousedown", + "contextmenu", + "mousewheel", + "DOMMouseScroll", + "mouseover", + "mouseout", + "mousemove", + "selectstart", + "selectend", + "keydown", + "keypress", + "keyup", + "orientationchange", + "touchstart", + "touchmove", + "touchend", + "touchcancel", + "pointerdown", + "pointermove", + "pointerup", + "pointerleave", + "pointercancel", + "gesturestart", + "gesturechange", + "gestureend", + "focus", + "blur", + "change", + "reset", + "select", + "submit", + "focusin", + "focusout", + "load", + "unload", + "beforeunload", + "resize", + "move", + "DOMContentLoaded", + "readystatechange", + "error", + "abort", + "scroll" + ]); + function makeEventUid(element, uid) { + return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++; + } + function getElementEvents(element) { + const uid = makeEventUid(element); + element.uidEvent = uid; + eventRegistry[uid] = eventRegistry[uid] || {}; + return eventRegistry[uid]; + } + function bootstrapHandler(element, fn) { + return function handler(event) { + hydrateObj(event, { delegateTarget: element }); + if (handler.oneOff) { + EventHandler.off(element, event.type, fn); + } + return fn.apply(element, [event]); + }; + } + function bootstrapDelegationHandler(element, selector, fn) { + return function handler(event) { + const domElements = element.querySelectorAll(selector); + for (let { target } = event; target && target !== this; target = target.parentNode) { + for (const domElement of domElements) { + if (domElement !== target) { + continue; + } + hydrateObj(event, { delegateTarget: target }); + if (handler.oneOff) { + EventHandler.off(element, event.type, selector, fn); + } + return fn.apply(target, [event]); + } + } + }; + } + function findHandler(events, callable, delegationSelector = null) { + return Object.values(events).find((event) => event.callable === callable && event.delegationSelector === delegationSelector); + } + function normalizeParameters(originalTypeEvent, handler, delegationFunction) { + const isDelegated = typeof handler === "string"; + const callable = isDelegated ? delegationFunction : handler || delegationFunction; + let typeEvent = getTypeEvent(originalTypeEvent); + if (!nativeEvents.has(typeEvent)) { + typeEvent = originalTypeEvent; + } + return [isDelegated, callable, typeEvent]; + } + function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) { + if (typeof originalTypeEvent !== "string" || !element) { + return; + } + let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); + if (originalTypeEvent in customEvents) { + const wrapFunction = (fn2) => { + return function(event) { + if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) { + return fn2.call(this, event); + } + }; + }; + callable = wrapFunction(callable); + } + const events = getElementEvents(element); + const handlers = events[typeEvent] || (events[typeEvent] = {}); + const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null); + if (previousFunction) { + previousFunction.oneOff = previousFunction.oneOff && oneOff; + return; + } + const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, "")); + const fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable); + fn.delegationSelector = isDelegated ? handler : null; + fn.callable = callable; + fn.oneOff = oneOff; + fn.uidEvent = uid; + handlers[uid] = fn; + element.addEventListener(typeEvent, fn, isDelegated); + } + function removeHandler(element, events, typeEvent, handler, delegationSelector) { + const fn = findHandler(events[typeEvent], handler, delegationSelector); + if (!fn) { + return; + } + element.removeEventListener(typeEvent, fn, Boolean(delegationSelector)); + delete events[typeEvent][fn.uidEvent]; + } + function removeNamespacedHandlers(element, events, typeEvent, namespace) { + const storeElementEvent = events[typeEvent] || {}; + for (const [handlerKey, event] of Object.entries(storeElementEvent)) { + if (handlerKey.includes(namespace)) { + removeHandler(element, events, typeEvent, event.callable, event.delegationSelector); + } + } + } + function getTypeEvent(event) { + event = event.replace(stripNameRegex, ""); + return customEvents[event] || event; + } + var EventHandler = { + on(element, event, handler, delegationFunction) { + addHandler(element, event, handler, delegationFunction, false); + }, + one(element, event, handler, delegationFunction) { + addHandler(element, event, handler, delegationFunction, true); + }, + off(element, originalTypeEvent, handler, delegationFunction) { + if (typeof originalTypeEvent !== "string" || !element) { + return; + } + const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); + const inNamespace = typeEvent !== originalTypeEvent; + const events = getElementEvents(element); + const storeElementEvent = events[typeEvent] || {}; + const isNamespace = originalTypeEvent.startsWith("."); + if (typeof callable !== "undefined") { + if (!Object.keys(storeElementEvent).length) { + return; + } + removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null); + return; + } + if (isNamespace) { + for (const elementEvent of Object.keys(events)) { + removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1)); + } + } + for (const [keyHandlers, event] of Object.entries(storeElementEvent)) { + const handlerKey = keyHandlers.replace(stripUidRegex, ""); + if (!inNamespace || originalTypeEvent.includes(handlerKey)) { + removeHandler(element, events, typeEvent, event.callable, event.delegationSelector); + } + } + }, + trigger(element, event, args) { + if (typeof event !== "string" || !element) { + return null; + } + const $ = getjQuery(); + const typeEvent = getTypeEvent(event); + const inNamespace = event !== typeEvent; + let jQueryEvent = null; + let bubbles = true; + let nativeDispatch = true; + let defaultPrevented = false; + if (inNamespace && $) { + jQueryEvent = $.Event(event, args); + $(element).trigger(jQueryEvent); + bubbles = !jQueryEvent.isPropagationStopped(); + nativeDispatch = !jQueryEvent.isImmediatePropagationStopped(); + defaultPrevented = jQueryEvent.isDefaultPrevented(); + } + const evt = hydrateObj(new Event(event, { bubbles, cancelable: true }), args); + if (defaultPrevented) { + evt.preventDefault(); + } + if (nativeDispatch) { + element.dispatchEvent(evt); + } + if (evt.defaultPrevented && jQueryEvent) { + jQueryEvent.preventDefault(); + } + return evt; + } + }; + function hydrateObj(obj, meta = {}) { + for (const [key, value] of Object.entries(meta)) { + try { + obj[key] = value; + } catch (e) { + Object.defineProperty(obj, key, { + configurable: true, + get() { + return value; + } + }); + } + } + return obj; + } + var event_handler_default = EventHandler; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/manipulator.js + function normalizeData(value) { + if (value === "true") { + return true; + } + if (value === "false") { + return false; + } + if (value === Number(value).toString()) { + return Number(value); + } + if (value === "" || value === "null") { + return null; + } + if (typeof value !== "string") { + return value; + } + try { + return JSON.parse(decodeURIComponent(value)); + } catch (e) { + return value; + } + } + function normalizeDataKey(key) { + return key.replace(/[A-Z]/g, (chr) => `-${chr.toLowerCase()}`); + } + var Manipulator = { + setDataAttribute(element, key, value) { + element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value); + }, + removeDataAttribute(element, key) { + element.removeAttribute(`data-bs-${normalizeDataKey(key)}`); + }, + getDataAttributes(element) { + if (!element) { + return {}; + } + const attributes = {}; + const bsKeys = Object.keys(element.dataset).filter((key) => key.startsWith("bs") && !key.startsWith("bsConfig")); + for (const key of bsKeys) { + let pureKey = key.replace(/^bs/, ""); + pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1); + attributes[pureKey] = normalizeData(element.dataset[key]); + } + return attributes; + }, + getDataAttribute(element, key) { + return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`)); + } + }; + var manipulator_default = Manipulator; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/config.js + var Config = class { + // Getters + static get Default() { + return {}; + } + static get DefaultType() { + return {}; + } + static get NAME() { + throw new Error('You have to implement the static method "NAME", for each component!'); + } + _getConfig(config) { + config = this._mergeConfigObj(config); + config = this._configAfterMerge(config); + this._typeCheckConfig(config); + return config; + } + _configAfterMerge(config) { + return config; + } + _mergeConfigObj(config, element) { + const jsonConfig = isElement(element) ? manipulator_default.getDataAttribute(element, "config") : {}; + return __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, this.constructor.Default), typeof jsonConfig === "object" ? jsonConfig : {}), isElement(element) ? manipulator_default.getDataAttributes(element) : {}), typeof config === "object" ? config : {}); + } + _typeCheckConfig(config, configTypes = this.constructor.DefaultType) { + for (const [property, expectedTypes] of Object.entries(configTypes)) { + const value = config[property]; + const valueType = isElement(value) ? "element" : toType(value); + if (!new RegExp(expectedTypes).test(valueType)) { + throw new TypeError( + `${this.constructor.NAME.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".` + ); + } + } + } + }; + var config_default = Config; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/base-component.js + var VERSION = "5.3.8"; + var BaseComponent = class extends config_default { + constructor(element, config) { + super(); + element = getElement(element); + if (!element) { + return; + } + this._element = element; + this._config = this._getConfig(config); + data_default.set(this._element, this.constructor.DATA_KEY, this); + } + // Public + dispose() { + data_default.remove(this._element, this.constructor.DATA_KEY); + event_handler_default.off(this._element, this.constructor.EVENT_KEY); + for (const propertyName of Object.getOwnPropertyNames(this)) { + this[propertyName] = null; + } + } + // Private + _queueCallback(callback, element, isAnimated = true) { + executeAfterTransition(callback, element, isAnimated); + } + _getConfig(config) { + config = this._mergeConfigObj(config, this._element); + config = this._configAfterMerge(config); + this._typeCheckConfig(config); + return config; + } + // Static + static getInstance(element) { + return data_default.get(getElement(element), this.DATA_KEY); + } + static getOrCreateInstance(element, config = {}) { + return this.getInstance(element) || new this(element, typeof config === "object" ? config : null); + } + static get VERSION() { + return VERSION; + } + static get DATA_KEY() { + return `bs.${this.NAME}`; + } + static get EVENT_KEY() { + return `.${this.DATA_KEY}`; + } + static eventName(name) { + return `${name}${this.EVENT_KEY}`; + } + }; + var base_component_default = BaseComponent; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/selector-engine.js + var getSelector = (element) => { + let selector = element.getAttribute("data-bs-target"); + if (!selector || selector === "#") { + let hrefAttribute = element.getAttribute("href"); + if (!hrefAttribute || !hrefAttribute.includes("#") && !hrefAttribute.startsWith(".")) { + return null; + } + if (hrefAttribute.includes("#") && !hrefAttribute.startsWith("#")) { + hrefAttribute = `#${hrefAttribute.split("#")[1]}`; + } + selector = hrefAttribute && hrefAttribute !== "#" ? hrefAttribute.trim() : null; + } + return selector ? selector.split(",").map((sel) => parseSelector(sel)).join(",") : null; + }; + var SelectorEngine = { + find(selector, element = document.documentElement) { + return [].concat(...Element.prototype.querySelectorAll.call(element, selector)); + }, + findOne(selector, element = document.documentElement) { + return Element.prototype.querySelector.call(element, selector); + }, + children(element, selector) { + return [].concat(...element.children).filter((child) => child.matches(selector)); + }, + parents(element, selector) { + const parents = []; + let ancestor = element.parentNode.closest(selector); + while (ancestor) { + parents.push(ancestor); + ancestor = ancestor.parentNode.closest(selector); + } + return parents; + }, + prev(element, selector) { + let previous = element.previousElementSibling; + while (previous) { + if (previous.matches(selector)) { + return [previous]; + } + previous = previous.previousElementSibling; + } + return []; + }, + // TODO: this is now unused; remove later along with prev() + next(element, selector) { + let next = element.nextElementSibling; + while (next) { + if (next.matches(selector)) { + return [next]; + } + next = next.nextElementSibling; + } + return []; + }, + focusableChildren(element) { + const focusables = [ + "a", + "button", + "input", + "textarea", + "select", + "details", + "[tabindex]", + '[contenteditable="true"]' + ].map((selector) => `${selector}:not([tabindex^="-"])`).join(","); + return this.find(focusables, element).filter((el) => !isDisabled(el) && isVisible(el)); + }, + getSelectorFromElement(element) { + const selector = getSelector(element); + if (selector) { + return SelectorEngine.findOne(selector) ? selector : null; + } + return null; + }, + getElementFromSelector(element) { + const selector = getSelector(element); + return selector ? SelectorEngine.findOne(selector) : null; + }, + getMultipleElementsFromSelector(element) { + const selector = getSelector(element); + return selector ? SelectorEngine.find(selector) : []; + } + }; + var selector_engine_default = SelectorEngine; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/collapse.js + var NAME = "collapse"; + var DATA_KEY = "bs.collapse"; + var EVENT_KEY = `.${DATA_KEY}`; + var DATA_API_KEY = ".data-api"; + var EVENT_SHOW = `show${EVENT_KEY}`; + var EVENT_SHOWN = `shown${EVENT_KEY}`; + var EVENT_HIDE = `hide${EVENT_KEY}`; + var EVENT_HIDDEN = `hidden${EVENT_KEY}`; + var EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`; + var CLASS_NAME_SHOW = "show"; + var CLASS_NAME_COLLAPSE = "collapse"; + var CLASS_NAME_COLLAPSING = "collapsing"; + var CLASS_NAME_COLLAPSED = "collapsed"; + var CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`; + var CLASS_NAME_HORIZONTAL = "collapse-horizontal"; + var WIDTH = "width"; + var HEIGHT = "height"; + var SELECTOR_ACTIVES = ".collapse.show, .collapse.collapsing"; + var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]'; + var Default = { + parent: null, + toggle: true + }; + var DefaultType = { + parent: "(null|element)", + toggle: "boolean" + }; + var Collapse = class _Collapse extends base_component_default { + constructor(element, config) { + super(element, config); + this._isTransitioning = false; + this._triggerArray = []; + const toggleList = selector_engine_default.find(SELECTOR_DATA_TOGGLE); + for (const elem of toggleList) { + const selector = selector_engine_default.getSelectorFromElement(elem); + const filterElement = selector_engine_default.find(selector).filter((foundElement) => foundElement === this._element); + if (selector !== null && filterElement.length) { + this._triggerArray.push(elem); + } + } + this._initializeChildren(); + if (!this._config.parent) { + this._addAriaAndCollapsedClass(this._triggerArray, this._isShown()); + } + if (this._config.toggle) { + this.toggle(); + } + } + // Getters + static get Default() { + return Default; + } + static get DefaultType() { + return DefaultType; + } + static get NAME() { + return NAME; + } + // Public + toggle() { + if (this._isShown()) { + this.hide(); + } else { + this.show(); + } + } + show() { + if (this._isTransitioning || this._isShown()) { + return; + } + let activeChildren = []; + if (this._config.parent) { + activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter((element) => element !== this._element).map((element) => _Collapse.getOrCreateInstance(element, { toggle: false })); + } + if (activeChildren.length && activeChildren[0]._isTransitioning) { + return; + } + const startEvent = event_handler_default.trigger(this._element, EVENT_SHOW); + if (startEvent.defaultPrevented) { + return; + } + for (const activeInstance of activeChildren) { + activeInstance.hide(); + } + const dimension = this._getDimension(); + this._element.classList.remove(CLASS_NAME_COLLAPSE); + this._element.classList.add(CLASS_NAME_COLLAPSING); + this._element.style[dimension] = 0; + this._addAriaAndCollapsedClass(this._triggerArray, true); + this._isTransitioning = true; + const complete = () => { + this._isTransitioning = false; + this._element.classList.remove(CLASS_NAME_COLLAPSING); + this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW); + this._element.style[dimension] = ""; + event_handler_default.trigger(this._element, EVENT_SHOWN); + }; + const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); + const scrollSize = `scroll${capitalizedDimension}`; + this._queueCallback(complete, this._element, true); + this._element.style[dimension] = `${this._element[scrollSize]}px`; + } + hide() { + if (this._isTransitioning || !this._isShown()) { + return; + } + const startEvent = event_handler_default.trigger(this._element, EVENT_HIDE); + if (startEvent.defaultPrevented) { + return; + } + const dimension = this._getDimension(); + this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`; + reflow(this._element); + this._element.classList.add(CLASS_NAME_COLLAPSING); + this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW); + for (const trigger of this._triggerArray) { + const element = selector_engine_default.getElementFromSelector(trigger); + if (element && !this._isShown(element)) { + this._addAriaAndCollapsedClass([trigger], false); + } + } + this._isTransitioning = true; + const complete = () => { + this._isTransitioning = false; + this._element.classList.remove(CLASS_NAME_COLLAPSING); + this._element.classList.add(CLASS_NAME_COLLAPSE); + event_handler_default.trigger(this._element, EVENT_HIDDEN); + }; + this._element.style[dimension] = ""; + this._queueCallback(complete, this._element, true); + } + // Private + _isShown(element = this._element) { + return element.classList.contains(CLASS_NAME_SHOW); + } + _configAfterMerge(config) { + config.toggle = Boolean(config.toggle); + config.parent = getElement(config.parent); + return config; + } + _getDimension() { + return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT; + } + _initializeChildren() { + if (!this._config.parent) { + return; + } + const children2 = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE); + for (const element of children2) { + const selected = selector_engine_default.getElementFromSelector(element); + if (selected) { + this._addAriaAndCollapsedClass([element], this._isShown(selected)); + } + } + } + _getFirstLevelChildren(selector) { + const children2 = selector_engine_default.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent); + return selector_engine_default.find(selector, this._config.parent).filter((element) => !children2.includes(element)); + } + _addAriaAndCollapsedClass(triggerArray, isOpen) { + if (!triggerArray.length) { + return; + } + for (const element of triggerArray) { + element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen); + element.setAttribute("aria-expanded", isOpen); + } + } + // Static + static jQueryInterface(config) { + const _config = {}; + if (typeof config === "string" && /show|hide/.test(config)) { + _config.toggle = false; + } + return this.each(function() { + const data = _Collapse.getOrCreateInstance(this, _config); + if (typeof config === "string") { + if (typeof data[config] === "undefined") { + throw new TypeError(`No method named "${config}"`); + } + data[config](); + } + }); + } + }; + event_handler_default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function(event) { + if (event.target.tagName === "A" || event.delegateTarget && event.delegateTarget.tagName === "A") { + event.preventDefault(); + } + for (const element of selector_engine_default.getMultipleElementsFromSelector(this)) { + Collapse.getOrCreateInstance(element, { toggle: false }).toggle(); + } + }); + defineJQueryPlugin(Collapse); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/category-collapse.js + var childPrefix = "l_"; + var parentPrefix = "h_"; + var children = document.getElementsByClassName("collapse"); + function categoryCollapse() { + [...children].forEach((elem) => { + const id = parentPrefix + elem.id.substring(childPrefix.length); + const parent = document.getElementById(id); + elem.addEventListener("hide.bs.collapse", () => { + if (parent) { + parent.querySelector(".far.fa-folder-open").className = "far fa-folder fa-fw"; + parent.querySelector(".fas.fa-angle-down").classList.add("rotate"); + parent.classList.remove("hide-border-bottom"); + } + }); + elem.addEventListener("show.bs.collapse", () => { + if (parent) { + parent.querySelector(".far.fa-folder").className = "far fa-folder-open fa-fw"; + parent.querySelector(".fas.fa-angle-down").classList.remove("rotate"); + parent.classList.add("hide-border-bottom"); + } + }); + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/tooltip.js + var Popper = __toESM(require_popper()); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/sanitizer.js + var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i; + var DefaultAllowlist = { + // Global attributes allowed on any supplied element below. + "*": ["class", "dir", "id", "lang", "role", ARIA_ATTRIBUTE_PATTERN], + a: ["target", "href", "title", "rel"], + area: [], + b: [], + br: [], + col: [], + code: [], + dd: [], + div: [], + dl: [], + dt: [], + em: [], + hr: [], + h1: [], + h2: [], + h3: [], + h4: [], + h5: [], + h6: [], + i: [], + img: ["src", "srcset", "alt", "title", "width", "height"], + li: [], + ol: [], + p: [], + pre: [], + s: [], + small: [], + span: [], + sub: [], + sup: [], + strong: [], + u: [], + ul: [] + }; + var uriAttributes = /* @__PURE__ */ new Set([ + "background", + "cite", + "href", + "itemtype", + "longdesc", + "poster", + "src", + "xlink:href" + ]); + var SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i; + var allowedAttribute = (attribute, allowedAttributeList) => { + const attributeName = attribute.nodeName.toLowerCase(); + if (allowedAttributeList.includes(attributeName)) { + if (uriAttributes.has(attributeName)) { + return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue)); + } + return true; + } + return allowedAttributeList.filter((attributeRegex) => attributeRegex instanceof RegExp).some((regex) => regex.test(attributeName)); + }; + function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) { + if (!unsafeHtml.length) { + return unsafeHtml; + } + if (sanitizeFunction && typeof sanitizeFunction === "function") { + return sanitizeFunction(unsafeHtml); + } + const domParser = new window.DOMParser(); + const createdDocument = domParser.parseFromString(unsafeHtml, "text/html"); + const elements = [].concat(...createdDocument.body.querySelectorAll("*")); + for (const element of elements) { + const elementName = element.nodeName.toLowerCase(); + if (!Object.keys(allowList).includes(elementName)) { + element.remove(); + continue; + } + const attributeList = [].concat(...element.attributes); + const allowedAttributes = [].concat(allowList["*"] || [], allowList[elementName] || []); + for (const attribute of attributeList) { + if (!allowedAttribute(attribute, allowedAttributes)) { + element.removeAttribute(attribute.nodeName); + } + } + } + return createdDocument.body.innerHTML; + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/template-factory.js + var NAME2 = "TemplateFactory"; + var Default2 = { + allowList: DefaultAllowlist, + content: {}, + // { selector : text , selector2 : text2 , } + extraClass: "", + html: false, + sanitize: true, + sanitizeFn: null, + template: "
" + }; + var DefaultType2 = { + allowList: "object", + content: "object", + extraClass: "(string|function)", + html: "boolean", + sanitize: "boolean", + sanitizeFn: "(null|function)", + template: "string" + }; + var DefaultContentType = { + entry: "(string|element|function|null)", + selector: "(string|element)" + }; + var TemplateFactory = class extends config_default { + constructor(config) { + super(); + this._config = this._getConfig(config); + } + // Getters + static get Default() { + return Default2; + } + static get DefaultType() { + return DefaultType2; + } + static get NAME() { + return NAME2; + } + // Public + getContent() { + return Object.values(this._config.content).map((config) => this._resolvePossibleFunction(config)).filter(Boolean); + } + hasContent() { + return this.getContent().length > 0; + } + changeContent(content2) { + this._checkContent(content2); + this._config.content = __spreadValues(__spreadValues({}, this._config.content), content2); + return this; + } + toHtml() { + const templateWrapper = document.createElement("div"); + templateWrapper.innerHTML = this._maybeSanitize(this._config.template); + for (const [selector, text] of Object.entries(this._config.content)) { + this._setContent(templateWrapper, text, selector); + } + const template = templateWrapper.children[0]; + const extraClass = this._resolvePossibleFunction(this._config.extraClass); + if (extraClass) { + template.classList.add(...extraClass.split(" ")); + } + return template; + } + // Private + _typeCheckConfig(config) { + super._typeCheckConfig(config); + this._checkContent(config.content); + } + _checkContent(arg) { + for (const [selector, content2] of Object.entries(arg)) { + super._typeCheckConfig({ selector, entry: content2 }, DefaultContentType); + } + } + _setContent(template, content2, selector) { + const templateElement = selector_engine_default.findOne(selector, template); + if (!templateElement) { + return; + } + content2 = this._resolvePossibleFunction(content2); + if (!content2) { + templateElement.remove(); + return; + } + if (isElement(content2)) { + this._putElementInTemplate(getElement(content2), templateElement); + return; + } + if (this._config.html) { + templateElement.innerHTML = this._maybeSanitize(content2); + return; + } + templateElement.textContent = content2; + } + _maybeSanitize(arg) { + return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg; + } + _resolvePossibleFunction(arg) { + return execute(arg, [void 0, this]); + } + _putElementInTemplate(element, templateElement) { + if (this._config.html) { + templateElement.innerHTML = ""; + templateElement.append(element); + return; + } + templateElement.textContent = element.textContent; + } + }; + var template_factory_default = TemplateFactory; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/tooltip.js + var NAME3 = "tooltip"; + var DISALLOWED_ATTRIBUTES = /* @__PURE__ */ new Set(["sanitize", "allowList", "sanitizeFn"]); + var CLASS_NAME_FADE = "fade"; + var CLASS_NAME_MODAL = "modal"; + var CLASS_NAME_SHOW2 = "show"; + var SELECTOR_TOOLTIP_INNER = ".tooltip-inner"; + var SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`; + var EVENT_MODAL_HIDE = "hide.bs.modal"; + var TRIGGER_HOVER = "hover"; + var TRIGGER_FOCUS = "focus"; + var TRIGGER_CLICK = "click"; + var TRIGGER_MANUAL = "manual"; + var EVENT_HIDE2 = "hide"; + var EVENT_HIDDEN2 = "hidden"; + var EVENT_SHOW2 = "show"; + var EVENT_SHOWN2 = "shown"; + var EVENT_INSERTED = "inserted"; + var EVENT_CLICK = "click"; + var EVENT_FOCUSIN = "focusin"; + var EVENT_FOCUSOUT = "focusout"; + var EVENT_MOUSEENTER = "mouseenter"; + var EVENT_MOUSELEAVE = "mouseleave"; + var AttachmentMap = { + AUTO: "auto", + TOP: "top", + RIGHT: isRTL() ? "left" : "right", + BOTTOM: "bottom", + LEFT: isRTL() ? "right" : "left" + }; + var Default3 = { + allowList: DefaultAllowlist, + animation: true, + boundary: "clippingParents", + container: false, + customClass: "", + delay: 0, + fallbackPlacements: ["top", "right", "bottom", "left"], + html: false, + offset: [0, 6], + placement: "top", + popperConfig: null, + sanitize: true, + sanitizeFn: null, + selector: false, + template: '', + title: "", + trigger: "hover focus" + }; + var DefaultType3 = { + allowList: "object", + animation: "boolean", + boundary: "(string|element)", + container: "(string|element|boolean)", + customClass: "(string|function)", + delay: "(number|object)", + fallbackPlacements: "array", + html: "boolean", + offset: "(array|string|function)", + placement: "(string|function)", + popperConfig: "(null|object|function)", + sanitize: "boolean", + sanitizeFn: "(null|function)", + selector: "(string|boolean)", + template: "string", + title: "(string|element|function)", + trigger: "string" + }; + var Tooltip = class _Tooltip extends base_component_default { + constructor(element, config) { + if (typeof Popper === "undefined") { + throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)"); + } + super(element, config); + this._isEnabled = true; + this._timeout = 0; + this._isHovered = null; + this._activeTrigger = {}; + this._popper = null; + this._templateFactory = null; + this._newContent = null; + this.tip = null; + this._setListeners(); + if (!this._config.selector) { + this._fixTitle(); + } + } + // Getters + static get Default() { + return Default3; + } + static get DefaultType() { + return DefaultType3; + } + static get NAME() { + return NAME3; + } + // Public + enable() { + this._isEnabled = true; + } + disable() { + this._isEnabled = false; + } + toggleEnabled() { + this._isEnabled = !this._isEnabled; + } + toggle() { + if (!this._isEnabled) { + return; + } + if (this._isShown()) { + this._leave(); + return; + } + this._enter(); + } + dispose() { + clearTimeout(this._timeout); + event_handler_default.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler); + if (this._element.getAttribute("data-bs-original-title")) { + this._element.setAttribute("title", this._element.getAttribute("data-bs-original-title")); + } + this._disposePopper(); + super.dispose(); + } + show() { + if (this._element.style.display === "none") { + throw new Error("Please use show on visible elements"); + } + if (!(this._isWithContent() && this._isEnabled)) { + return; + } + const showEvent = event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_SHOW2)); + const shadowRoot = findShadowRoot(this._element); + const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element); + if (showEvent.defaultPrevented || !isInTheDom) { + return; + } + this._disposePopper(); + const tip = this._getTipElement(); + this._element.setAttribute("aria-describedby", tip.getAttribute("id")); + const { container } = this._config; + if (!this._element.ownerDocument.documentElement.contains(this.tip)) { + container.append(tip); + event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_INSERTED)); + } + this._popper = this._createPopper(tip); + tip.classList.add(CLASS_NAME_SHOW2); + if ("ontouchstart" in document.documentElement) { + for (const element of [].concat(...document.body.children)) { + event_handler_default.on(element, "mouseover", noop); + } + } + const complete = () => { + event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_SHOWN2)); + if (this._isHovered === false) { + this._leave(); + } + this._isHovered = false; + }; + this._queueCallback(complete, this.tip, this._isAnimated()); + } + hide() { + if (!this._isShown()) { + return; + } + const hideEvent = event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_HIDE2)); + if (hideEvent.defaultPrevented) { + return; + } + const tip = this._getTipElement(); + tip.classList.remove(CLASS_NAME_SHOW2); + if ("ontouchstart" in document.documentElement) { + for (const element of [].concat(...document.body.children)) { + event_handler_default.off(element, "mouseover", noop); + } + } + this._activeTrigger[TRIGGER_CLICK] = false; + this._activeTrigger[TRIGGER_FOCUS] = false; + this._activeTrigger[TRIGGER_HOVER] = false; + this._isHovered = null; + const complete = () => { + if (this._isWithActiveTrigger()) { + return; + } + if (!this._isHovered) { + this._disposePopper(); + } + this._element.removeAttribute("aria-describedby"); + event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN2)); + }; + this._queueCallback(complete, this.tip, this._isAnimated()); + } + update() { + if (this._popper) { + this._popper.update(); + } + } + // Protected + _isWithContent() { + return Boolean(this._getTitle()); + } + _getTipElement() { + if (!this.tip) { + this.tip = this._createTipElement(this._newContent || this._getContentForTemplate()); + } + return this.tip; + } + _createTipElement(content2) { + const tip = this._getTemplateFactory(content2).toHtml(); + if (!tip) { + return null; + } + tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW2); + tip.classList.add(`bs-${this.constructor.NAME}-auto`); + const tipId = getUID(this.constructor.NAME).toString(); + tip.setAttribute("id", tipId); + if (this._isAnimated()) { + tip.classList.add(CLASS_NAME_FADE); + } + return tip; + } + setContent(content2) { + this._newContent = content2; + if (this._isShown()) { + this._disposePopper(); + this.show(); + } + } + _getTemplateFactory(content2) { + if (this._templateFactory) { + this._templateFactory.changeContent(content2); + } else { + this._templateFactory = new template_factory_default(__spreadProps(__spreadValues({}, this._config), { + // the `content` var has to be after `this._config` + // to override config.content in case of popover + content: content2, + extraClass: this._resolvePossibleFunction(this._config.customClass) + })); + } + return this._templateFactory; + } + _getContentForTemplate() { + return { + [SELECTOR_TOOLTIP_INNER]: this._getTitle() + }; + } + _getTitle() { + return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute("data-bs-original-title"); + } + // Private + _initializeOnDelegatedTarget(event) { + return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig()); + } + _isAnimated() { + return this._config.animation || this.tip && this.tip.classList.contains(CLASS_NAME_FADE); + } + _isShown() { + return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW2); + } + _createPopper(tip) { + const placement = execute(this._config.placement, [this, tip, this._element]); + const attachment = AttachmentMap[placement.toUpperCase()]; + return Popper.createPopper(this._element, tip, this._getPopperConfig(attachment)); + } + _getOffset() { + const { offset } = this._config; + if (typeof offset === "string") { + return offset.split(",").map((value) => Number.parseInt(value, 10)); + } + if (typeof offset === "function") { + return (popperData) => offset(popperData, this._element); + } + return offset; + } + _resolvePossibleFunction(arg) { + return execute(arg, [this._element, this._element]); + } + _getPopperConfig(attachment) { + const defaultBsPopperConfig = { + placement: attachment, + modifiers: [ + { + name: "flip", + options: { + fallbackPlacements: this._config.fallbackPlacements + } + }, + { + name: "offset", + options: { + offset: this._getOffset() + } + }, + { + name: "preventOverflow", + options: { + boundary: this._config.boundary + } + }, + { + name: "arrow", + options: { + element: `.${this.constructor.NAME}-arrow` + } + }, + { + name: "preSetPlacement", + enabled: true, + phase: "beforeMain", + fn: (data) => { + this._getTipElement().setAttribute("data-popper-placement", data.state.placement); + } + } + ] + }; + return __spreadValues(__spreadValues({}, defaultBsPopperConfig), execute(this._config.popperConfig, [void 0, defaultBsPopperConfig])); + } + _setListeners() { + const triggers = this._config.trigger.split(" "); + for (const trigger of triggers) { + if (trigger === "click") { + event_handler_default.on(this._element, this.constructor.eventName(EVENT_CLICK), this._config.selector, (event) => { + const context = this._initializeOnDelegatedTarget(event); + context._activeTrigger[TRIGGER_CLICK] = !(context._isShown() && context._activeTrigger[TRIGGER_CLICK]); + context.toggle(); + }); + } else if (trigger !== TRIGGER_MANUAL) { + const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN); + const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT); + event_handler_default.on(this._element, eventIn, this._config.selector, (event) => { + const context = this._initializeOnDelegatedTarget(event); + context._activeTrigger[event.type === "focusin" ? TRIGGER_FOCUS : TRIGGER_HOVER] = true; + context._enter(); + }); + event_handler_default.on(this._element, eventOut, this._config.selector, (event) => { + const context = this._initializeOnDelegatedTarget(event); + context._activeTrigger[event.type === "focusout" ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget); + context._leave(); + }); + } + } + this._hideModalHandler = () => { + if (this._element) { + this.hide(); + } + }; + event_handler_default.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler); + } + _fixTitle() { + const title = this._element.getAttribute("title"); + if (!title) { + return; + } + if (!this._element.getAttribute("aria-label") && !this._element.textContent.trim()) { + this._element.setAttribute("aria-label", title); + } + this._element.setAttribute("data-bs-original-title", title); + this._element.removeAttribute("title"); + } + _enter() { + if (this._isShown() || this._isHovered) { + this._isHovered = true; + return; + } + this._isHovered = true; + this._setTimeout(() => { + if (this._isHovered) { + this.show(); + } + }, this._config.delay.show); + } + _leave() { + if (this._isWithActiveTrigger()) { + return; + } + this._isHovered = false; + this._setTimeout(() => { + if (!this._isHovered) { + this.hide(); + } + }, this._config.delay.hide); + } + _setTimeout(handler, timeout) { + clearTimeout(this._timeout); + this._timeout = setTimeout(handler, timeout); + } + _isWithActiveTrigger() { + return Object.values(this._activeTrigger).includes(true); + } + _getConfig(config) { + const dataAttributes = manipulator_default.getDataAttributes(this._element); + for (const dataAttribute of Object.keys(dataAttributes)) { + if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) { + delete dataAttributes[dataAttribute]; + } + } + config = __spreadValues(__spreadValues({}, dataAttributes), typeof config === "object" && config ? config : {}); + config = this._mergeConfigObj(config); + config = this._configAfterMerge(config); + this._typeCheckConfig(config); + return config; + } + _configAfterMerge(config) { + config.container = config.container === false ? document.body : getElement(config.container); + if (typeof config.delay === "number") { + config.delay = { + show: config.delay, + hide: config.delay + }; + } + if (typeof config.title === "number") { + config.title = config.title.toString(); + } + if (typeof config.content === "number") { + config.content = config.content.toString(); + } + return config; + } + _getDelegateConfig() { + const config = {}; + for (const [key, value] of Object.entries(this._config)) { + if (this.constructor.Default[key] !== value) { + config[key] = value; + } + } + config.selector = false; + config.trigger = "manual"; + return config; + } + _disposePopper() { + if (this._popper) { + this._popper.destroy(); + this._popper = null; + } + if (this.tip) { + this.tip.remove(); + this.tip = null; + } + } + // Static + static jQueryInterface(config) { + return this.each(function() { + const data = _Tooltip.getOrCreateInstance(this, config); + if (typeof config !== "string") { + return; + } + if (typeof data[config] === "undefined") { + throw new TypeError(`No method named "${config}"`); + } + data[config](); + }); + } + }; + defineJQueryPlugin(Tooltip); + var tooltip_default = Tooltip; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/toc/toc-mobile.js + var $tocBar = document.getElementById("toc-bar"); + var $soloTrigger = document.getElementById("toc-solo-trigger"); + var $triggers = document.getElementsByClassName("toc-trigger"); + var $popup = document.getElementById("toc-popup"); + var $btnClose = document.getElementById("toc-popup-close"); + var SCROLL_LOCK = "overflow-hidden"; + var CLOSING = "closing"; + var _invisible, _barHeight; + var _TocMobile = class _TocMobile { + static initBar() { + const observer = new IntersectionObserver( + (entries) => { + entries.forEach((entry) => { + $tocBar.classList.toggle("invisible", entry.isIntersecting); + }); + }, + { rootMargin: `-${__privateGet(this, _barHeight)}px 0px 0px 0px` } + ); + observer.observe($soloTrigger); + __privateSet(this, _invisible, false); + } + static listenAnchors() { + const $anchors = document.getElementsByClassName("toc-link"); + [...$anchors].forEach((anchor) => { + anchor.onclick = () => this.hidePopup(); + }); + } + static refresh() { + if (__privateGet(this, _invisible)) { + this.initComponents(); + } + tocbot.refresh(this.options); + this.listenAnchors(); + } + static get popupOpened() { + return $popup.open; + } + static showPopup() { + this.lockScroll(true); + $popup.showModal(); + const activeItem = $popup.querySelector("li.is-active-li"); + activeItem.scrollIntoView({ block: "center" }); + } + static hidePopup() { + $popup.toggleAttribute(CLOSING); + $popup.addEventListener( + "animationend", + () => { + $popup.toggleAttribute(CLOSING); + $popup.close(); + }, + { once: true } + ); + this.lockScroll(false); + } + static lockScroll(enable) { + document.documentElement.classList.toggle(SCROLL_LOCK, enable); + document.body.classList.toggle(SCROLL_LOCK, enable); + } + static clickBackdrop(event) { + if ($popup.hasAttribute(CLOSING)) { + return; + } + const rect = event.target.getBoundingClientRect(); + if (event.clientX < rect.left || event.clientX > rect.right || event.clientY < rect.top || event.clientY > rect.bottom) { + this.hidePopup(); + } + } + static initComponents() { + this.initBar(); + [...$triggers].forEach((trigger) => { + trigger.onclick = () => this.showPopup(); + }); + $popup.onclick = (e) => this.clickBackdrop(e); + $btnClose.onclick = () => this.hidePopup(); + $popup.oncancel = (e) => { + e.preventDefault(); + this.hidePopup(); + }; + } + static init() { + tocbot.init(this.options); + this.listenAnchors(); + this.initComponents(); + } + }; + _invisible = new WeakMap(); + _barHeight = new WeakMap(); + __privateAdd(_TocMobile, _invisible, true); + __privateAdd(_TocMobile, _barHeight, 16 * 3); + // 3rem + __publicField(_TocMobile, "options", { + tocSelector: "#toc-popup-content", + contentSelector: ".content", + ignoreSelector: "[data-toc-skip]", + headingSelector: "h2, h3, h4", + orderedList: false, + scrollSmooth: false, + collapseDepth: 4, + headingsOffset: __privateGet(_TocMobile, _barHeight) + }); + var TocMobile = _TocMobile; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/toc/toc-desktop.js + var TocDesktop = class { + static refresh() { + tocbot.refresh(this.options); + } + static init() { + tocbot.init(this.options); + } + }; + /* Tocbot options Ref: https://github.com/tscanlin/tocbot#usage */ + __publicField(TocDesktop, "options", { + tocSelector: "#toc", + contentSelector: ".content", + ignoreSelector: "[data-toc-skip]", + headingSelector: "h2, h3, h4", + orderedList: false, + scrollSmooth: false, + headingsOffset: 16 * 2 + // 2rem + }); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/toc.js + var desktopMode = matchMedia("(min-width: 1200px)"); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/mermaid.js + var themeMapper = Theme.getThemeMapper("default", "dark"); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/mode-toggle.js + var $toggle = document.getElementById("mode-toggle"); + function modeWatcher() { + if (!$toggle) { + return; + } + $toggle.addEventListener("click", () => { + Theme.flip(); + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/back-to-top.js + function back2top() { + const btn = document.getElementById("back-to-top"); + window.addEventListener("scroll", () => { + if (window.scrollY > 50) { + btn.classList.add("show"); + } else { + btn.classList.remove("show"); + } + }); + btn.addEventListener("click", () => { + window.scrollTo({ top: 0 }); + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/tooltip-loader.js + function loadTooptip() { + const tooltipTriggerList = document.querySelectorAll( + '[data-bs-toggle="tooltip"]' + ); + [...tooltipTriggerList].map( + (tooltipTriggerEl) => new tooltip_default(tooltipTriggerEl) + ); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/layouts/basic.js + function basic() { + modeWatcher(); + back2top(); + loadTooptip(); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/layouts/sidebar.js + var ATTR_DISPLAY = "sidebar-display"; + var $sidebar = document.getElementById("sidebar"); + var $trigger = document.getElementById("sidebar-trigger"); + var $mask = document.getElementById("mask"); + var _isExpanded; + var SidebarUtil = class { + static toggle() { + __privateSet(this, _isExpanded, !__privateGet(this, _isExpanded)); + document.body.toggleAttribute(ATTR_DISPLAY, __privateGet(this, _isExpanded)); + $sidebar.classList.toggle("z-2", __privateGet(this, _isExpanded)); + $mask.classList.toggle("d-none", !__privateGet(this, _isExpanded)); + } + }; + _isExpanded = new WeakMap(); + __privateAdd(SidebarUtil, _isExpanded, false); + function initSidebar() { + $trigger.onclick = $mask.onclick = () => SidebarUtil.toggle(); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/search-display.js + var btnSbTrigger = document.getElementById("sidebar-trigger"); + var btnSearchTrigger = document.getElementById("search-trigger"); + var btnCancel = document.getElementById("search-cancel"); + var content = document.querySelectorAll("#main-wrapper>.container>.row"); + var topbarTitle = document.getElementById("topbar-title"); + var search = document.getElementById("search"); + var resultWrapper = document.getElementById("search-result-wrapper"); + var results = document.getElementById("search-results"); + var input = document.getElementById("search-input"); + var hints = document.getElementById("search-hints"); + var LOADED = "d-block"; + var UNLOADED = "d-none"; + var FOCUS = "input-focus"; + var FLEX = "d-flex"; + var MobileSearchBar = class { + static on() { + btnSbTrigger.classList.add(UNLOADED); + topbarTitle.classList.add(UNLOADED); + btnSearchTrigger.classList.add(UNLOADED); + search.classList.add(FLEX); + btnCancel.classList.add(LOADED); + } + static off() { + btnCancel.classList.remove(LOADED); + search.classList.remove(FLEX); + btnSbTrigger.classList.remove(UNLOADED); + topbarTitle.classList.remove(UNLOADED); + btnSearchTrigger.classList.remove(UNLOADED); + } + }; + var ResultSwitch = class { + static on() { + if (!this.resultVisible) { + resultWrapper.classList.remove(UNLOADED); + content.forEach((el) => { + el.classList.add(UNLOADED); + }); + this.resultVisible = true; + } + } + static off() { + if (this.resultVisible) { + results.innerHTML = ""; + if (hints.classList.contains(UNLOADED)) { + hints.classList.remove(UNLOADED); + } + resultWrapper.classList.add(UNLOADED); + content.forEach((el) => { + el.classList.remove(UNLOADED); + }); + input.textContent = ""; + this.resultVisible = false; + } + } + }; + __publicField(ResultSwitch, "resultVisible", false); + function isMobileView() { + return btnCancel.classList.contains(LOADED); + } + function displaySearch() { + btnSearchTrigger.addEventListener("click", () => { + MobileSearchBar.on(); + ResultSwitch.on(); + input.focus(); + }); + btnCancel.addEventListener("click", () => { + MobileSearchBar.off(); + ResultSwitch.off(); + }); + input.addEventListener("focus", () => { + search.classList.add(FOCUS); + }); + input.addEventListener("focusout", () => { + search.classList.remove(FOCUS); + }); + input.addEventListener("input", () => { + if (input.value === "") { + if (isMobileView()) { + hints.classList.remove(UNLOADED); + } else { + ResultSwitch.off(); + } + } else { + ResultSwitch.on(); + if (isMobileView()) { + hints.classList.add(UNLOADED); + } + } + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/layouts/topbar.js + function initTopbar() { + displaySearch(); + } + + // + basic(); + initSidebar(); + initTopbar(); + categoryCollapse(); +})(); diff --git a/public/js/commons.js b/public/js/commons.js index 056308e..6cde0a9 100644 --- a/public/js/commons.js +++ b/public/js/commons.js @@ -1 +1,3356 @@ -(()=>{var An=Object.create;var le=Object.defineProperty,Tn=Object.defineProperties,On=Object.getOwnPropertyDescriptor,Sn=Object.getOwnPropertyDescriptors,xn=Object.getOwnPropertyNames,ur=Object.getOwnPropertySymbols,Cn=Object.getPrototypeOf,fr=Object.prototype.hasOwnProperty,Ln=Object.prototype.propertyIsEnumerable;var pr=e=>{throw TypeError(e)};var ce=(e,t,r)=>t in e?le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N=(e,t)=>{for(var r in t||(t={}))fr.call(t,r)&&ce(e,r,t[r]);if(ur)for(var r of ur(t))Ln.call(t,r)&&ce(e,r,t[r]);return e},dr=(e,t)=>Tn(e,Sn(t));var Dn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Nn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of xn(t))!fr.call(e,o)&&o!==r&&le(e,o,{get:()=>t[o],enumerable:!(n=On(t,o))||n.enumerable});return e};var In=(e,t,r)=>(r=e!=null?An(Cn(e)):{},Nn(t||!e||!e.__esModule?le(r,"default",{value:e,enumerable:!0}):r,e));var Et=(e,t,r)=>ce(e,typeof t!="symbol"?t+"":t,r),hr=(e,t,r)=>t.has(e)||pr("Cannot "+r);var U=(e,t,r)=>(hr(e,t,"read from private field"),r?r.call(e):t.get(e)),_t=(e,t,r)=>t.has(e)?pr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Bt=(e,t,r,n)=>(hr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var tn=Dn(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});function H(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ct(e){var t=H(e).Element;return e instanceof t||e instanceof Element}function k(e){var t=H(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function jr(e){if(typeof ShadowRoot=="undefined")return!1;var t=H(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var ot=Math.max,Gt=Math.min,lt=Math.round;function ut(e,t){t===void 0&&(t=!1);var r=e.getBoundingClientRect(),n=1,o=1;if(k(e)&&t){var s=e.offsetHeight,i=e.offsetWidth;i>0&&(n=lt(r.width)/i||1),s>0&&(o=lt(r.height)/s||1)}return{width:r.width/n,height:r.height/o,top:r.top/o,right:r.right/n,bottom:r.bottom/o,left:r.left/n,x:r.left/n,y:r.top/o}}function Ce(e){var t=H(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function ao(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function co(e){return e===H(e)||!k(e)?Ce(e):ao(e)}function q(e){return e?(e.nodeName||"").toLowerCase():null}function J(e){return((ct(e)?e.ownerDocument:e.document)||window.document).documentElement}function Le(e){return ut(J(e)).left+Ce(e).scrollLeft}function W(e){return H(e).getComputedStyle(e)}function De(e){var t=W(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function lo(e){var t=e.getBoundingClientRect(),r=lt(t.width)/e.offsetWidth||1,n=lt(t.height)/e.offsetHeight||1;return r!==1||n!==1}function uo(e,t,r){r===void 0&&(r=!1);var n=k(t),o=k(t)&&lo(t),s=J(t),i=ut(e,o),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((q(t)!=="body"||De(s))&&(a=co(t)),k(t)?(c=ut(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=Le(s))),{x:i.left+a.scrollLeft-c.x,y:i.top+a.scrollTop-c.y,width:i.width,height:i.height}}function Ne(e){var t=ut(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function Kt(e){return q(e)==="html"?e:e.assignedSlot||e.parentNode||(jr(e)?e.host:null)||J(e)}function Fr(e){return["html","body","#document"].indexOf(q(e))>=0?e.ownerDocument.body:k(e)&&De(e)?e:Fr(Kt(e))}function Ot(e,t){var r;t===void 0&&(t=[]);var n=Fr(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),s=H(n),i=o?[s].concat(s.visualViewport||[],De(n)?n:[]):n,a=t.concat(i);return o?a:a.concat(Ot(Kt(i)))}function fo(e){return["table","td","th"].indexOf(q(e))>=0}function Dr(e){return!k(e)||W(e).position==="fixed"?null:e.offsetParent}function po(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,r=navigator.userAgent.indexOf("Trident")!==-1;if(r&&k(e)){var n=W(e);if(n.position==="fixed")return null}for(var o=Kt(e);k(o)&&["html","body"].indexOf(q(o))<0;){var s=W(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function Ct(e){for(var t=H(e),r=Dr(e);r&&fo(r)&&W(r).position==="static";)r=Dr(r);return r&&(q(r)==="html"||q(r)==="body"&&W(r).position==="static")?t:r||po(e)||t}var I="top",$="bottom",B="right",P="left",Ie="auto",Lt=[I,$,B,P],ft="start",xt="end",ho="clippingParents",Hr="viewport",Tt="popper",mo="reference",Nr=Lt.reduce(function(e,t){return e.concat([t+"-"+ft,t+"-"+xt])},[]),Vr=[].concat(Lt,[Ie]).reduce(function(e,t){return e.concat([t,t+"-"+ft,t+"-"+xt])},[]),go="beforeRead",vo="read",bo="afterRead",yo="beforeMain",Eo="main",_o="afterMain",wo="beforeWrite",Ao="write",To="afterWrite",Oo=[go,vo,bo,yo,Eo,_o,wo,Ao,To];function So(e){var t=new Map,r=new Set,n=[];e.forEach(function(s){t.set(s.name,s)});function o(s){r.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(a){if(!r.has(a)){var c=t.get(a);c&&o(c)}}),n.push(s)}return e.forEach(function(s){r.has(s.name)||o(s)}),n}function xo(e){var t=So(e);return Oo.reduce(function(r,n){return r.concat(t.filter(function(o){return o.phase===n}))},[])}function Co(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function V(e){return e.split("-")[0]}function Lo(e){var t=e.reduce(function(r,n){var o=r[n.name];return r[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}function Do(e){var t=H(e),r=J(e),n=t.visualViewport,o=r.clientWidth,s=r.clientHeight,i=0,a=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(i=n.offsetLeft,a=n.offsetTop)),{width:o,height:s,x:i+Le(e),y:a}}function No(e){var t,r=J(e),n=Ce(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=ot(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=ot(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+Le(e),c=-n.scrollTop;return W(o||r).direction==="rtl"&&(a+=ot(r.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:a,y:c}}function qr(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&jr(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function xe(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Io(e){var t=ut(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function Ir(e,t){return t===Hr?xe(Do(e)):ct(t)?Io(t):xe(No(J(e)))}function Po(e){var t=Ot(Kt(e)),r=["absolute","fixed"].indexOf(W(e).position)>=0,n=r&&k(e)?Ct(e):e;return ct(n)?t.filter(function(o){return ct(o)&&qr(o,n)&&q(o)!=="body"&&(r?W(o).position!=="static":!0)}):[]}function Mo(e,t,r){var n=t==="clippingParents"?Po(e):[].concat(t),o=[].concat(n,[r]),s=o[0],i=o.reduce(function(a,c){var u=Ir(e,c);return a.top=ot(u.top,a.top),a.right=Gt(u.right,a.right),a.bottom=Gt(u.bottom,a.bottom),a.left=ot(u.left,a.left),a},Ir(e,s));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}function pt(e){return e.split("-")[1]}function Pe(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Wr(e){var t=e.reference,r=e.element,n=e.placement,o=n?V(n):null,s=n?pt(n):null,i=t.x+t.width/2-r.width/2,a=t.y+t.height/2-r.height/2,c;switch(o){case I:c={x:i,y:t.y-r.height};break;case $:c={x:i,y:t.y+t.height};break;case B:c={x:t.x+t.width,y:a};break;case P:c={x:t.x-r.width,y:a};break;default:c={x:t.x,y:t.y}}var u=o?Pe(o):null;if(u!=null){var l=u==="y"?"height":"width";switch(s){case ft:c[u]=c[u]-(t[l]/2-r[l]/2);break;case xt:c[u]=c[u]+(t[l]/2-r[l]/2);break}}return c}function zr(){return{top:0,right:0,bottom:0,left:0}}function Ur(e){return Object.assign({},zr(),e)}function Yr(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}function dt(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=n===void 0?e.placement:n,s=r.boundary,i=s===void 0?ho:s,a=r.rootBoundary,c=a===void 0?Hr:a,u=r.elementContext,l=u===void 0?Tt:u,f=r.altBoundary,g=f===void 0?!1:f,p=r.padding,h=p===void 0?0:p,m=Ur(typeof h!="number"?h:Yr(h,Lt)),d=l===Tt?mo:Tt,w=e.rects.popper,A=e.elements[g?d:l],T=Mo(ct(A)?A:A.contextElement||J(e.elements.popper),i,c),v=ut(e.elements.reference),E=Wr({reference:v,element:w,strategy:"absolute",placement:o}),b=xe(Object.assign({},w,E)),y=l===Tt?b:v,O={top:T.top-y.top+m.top,bottom:y.bottom-T.bottom+m.bottom,left:T.left-y.left+m.left,right:y.right-T.right+m.right},x=e.modifiersData.offset;if(l===Tt&&x){var C=x[o];Object.keys(O).forEach(function(_){var L=[B,$].indexOf(_)>=0?1:-1,tt=[I,$].indexOf(_)>=0?"y":"x";O[_]+=C[tt]*L})}return O}var Pr={placement:"bottom",modifiers:[],strategy:"absolute"};function Mr(){for(var e=arguments.length,t=new Array(e),r=0;r=0?-1:1,s=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,i=s[0],a=s[1];return i=i||0,a=(a||0)*o,[P,B].indexOf(n)>=0?{x:a,y:i}:{x:i,y:a}}function qo(e){var t=e.state,r=e.options,n=e.name,o=r.offset,s=o===void 0?[0,0]:o,i=Vr.reduce(function(l,f){return l[f]=Vo(f,t.rects,s),l},{}),a=i[t.placement],c=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=i}var Gr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:qo},Wo={left:"right",right:"left",bottom:"top",top:"bottom"};function Yt(e){return e.replace(/left|right|bottom|top/g,function(t){return Wo[t]})}var zo={start:"end",end:"start"};function kr(e){return e.replace(/start|end/g,function(t){return zo[t]})}function Uo(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=r.boundary,s=r.rootBoundary,i=r.padding,a=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?Vr:c,l=pt(n),f=l?a?Nr:Nr.filter(function(h){return pt(h)===l}):Lt,g=f.filter(function(h){return u.indexOf(h)>=0});g.length===0&&(g=f);var p=g.reduce(function(h,m){return h[m]=dt(e,{placement:m,boundary:o,rootBoundary:s,padding:i})[V(m)],h},{});return Object.keys(p).sort(function(h,m){return p[h]-p[m]})}function Yo(e){if(V(e)===Ie)return[];var t=Yt(e);return[kr(e),t,kr(t)]}function Go(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,s=o===void 0?!0:o,i=r.altAxis,a=i===void 0?!0:i,c=r.fallbackPlacements,u=r.padding,l=r.boundary,f=r.rootBoundary,g=r.altBoundary,p=r.flipVariations,h=p===void 0?!0:p,m=r.allowedAutoPlacements,d=t.options.placement,w=V(d),A=w===d,T=c||(A||!h?[Yt(d)]:Yo(d)),v=[d].concat(T).reduce(function(st,G){return st.concat(V(G)===Ie?Uo(t,{placement:G,boundary:l,rootBoundary:f,padding:u,flipVariations:h,allowedAutoPlacements:m}):G)},[]),E=t.rects.reference,b=t.rects.popper,y=new Map,O=!0,x=v[0],C=0;C=0,vt=gt?"width":"height",R=dt(t,{placement:_,boundary:l,rootBoundary:f,altBoundary:g,padding:u}),j=gt?tt?B:P:tt?$:I;E[vt]>b[vt]&&(j=Yt(j));var Pt=Yt(j),et=[];if(s&&et.push(R[L]<=0),a&&et.push(R[j]<=0,R[Pt]<=0),et.every(function(st){return st})){x=_,O=!1;break}y.set(_,et)}if(O)for(var Mt=h?3:1,oe=function(G){var yt=v.find(function(kt){var rt=y.get(kt);if(rt)return rt.slice(0,G).every(function(ie){return ie})});if(yt)return x=yt,"break"},bt=Mt;bt>0;bt--){var Rt=oe(bt);if(Rt==="break")break}t.placement!==x&&(t.modifiersData[n]._skip=!0,t.placement=x,t.reset=!0)}}var Kr={name:"flip",enabled:!0,phase:"main",fn:Go,requiresIfExists:["offset"],data:{_skip:!1}};function Ko(e){return e==="x"?"y":"x"}function St(e,t,r){return ot(e,Gt(t,r))}function Qo(e,t,r){var n=St(e,t,r);return n>r?r:n}function Xo(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,s=o===void 0?!0:o,i=r.altAxis,a=i===void 0?!1:i,c=r.boundary,u=r.rootBoundary,l=r.altBoundary,f=r.padding,g=r.tether,p=g===void 0?!0:g,h=r.tetherOffset,m=h===void 0?0:h,d=dt(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:l}),w=V(t.placement),A=pt(t.placement),T=!A,v=Pe(w),E=Ko(v),b=t.modifiersData.popperOffsets,y=t.rects.reference,O=t.rects.popper,x=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,C=typeof x=="number"?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(b){if(s){var tt,gt=v==="y"?I:P,vt=v==="y"?$:B,R=v==="y"?"height":"width",j=b[v],Pt=j+d[gt],et=j-d[vt],Mt=p?-O[R]/2:0,oe=A===ft?y[R]:O[R],bt=A===ft?-O[R]:-y[R],Rt=t.elements.arrow,st=p&&Rt?Ne(Rt):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:zr(),yt=G[gt],kt=G[vt],rt=St(0,y[R],st[R]),ie=T?y[R]/2-Mt-rt-yt-C.mainAxis:oe-rt-yt-C.mainAxis,vn=T?-y[R]/2+Mt+rt+kt+C.mainAxis:bt+rt+kt+C.mainAxis,se=t.elements.arrow&&Ct(t.elements.arrow),bn=se?v==="y"?se.clientTop||0:se.clientLeft||0:0,er=(tt=_==null?void 0:_[v])!=null?tt:0,yn=j+ie-er-bn,En=j+vn-er,rr=St(p?Gt(Pt,yn):Pt,j,p?ot(et,En):et);b[v]=rr,L[v]=rr-j}if(a){var nr,_n=v==="x"?I:P,wn=v==="x"?$:B,nt=b[E],$t=E==="y"?"height":"width",or=nt+d[_n],ir=nt-d[wn],ae=[I,P].indexOf(w)!==-1,sr=(nr=_==null?void 0:_[E])!=null?nr:0,ar=ae?or:nt-y[$t]-O[$t]-sr+C.altAxis,cr=ae?nt+y[$t]+O[$t]-sr-C.altAxis:ir,lr=p&&ae?Qo(ar,nt,cr):St(p?ar:or,nt,p?cr:ir);b[E]=lr,L[E]=lr-nt}t.modifiersData[n]=L}}var Qr={name:"preventOverflow",enabled:!0,phase:"main",fn:Xo,requiresIfExists:["offset"]},Jo=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Ur(typeof t!="number"?t:Yr(t,Lt))};function Zo(e){var t,r=e.state,n=e.name,o=e.options,s=r.elements.arrow,i=r.modifiersData.popperOffsets,a=V(r.placement),c=Pe(a),u=[P,B].indexOf(a)>=0,l=u?"height":"width";if(!(!s||!i)){var f=Jo(o.padding,r),g=Ne(s),p=c==="y"?I:P,h=c==="y"?$:B,m=r.rects.reference[l]+r.rects.reference[c]-i[c]-r.rects.popper[l],d=i[c]-r.rects.reference[c],w=Ct(s),A=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,T=m/2-d/2,v=f[p],E=A-g[l]-f[h],b=A/2-g[l]/2+T,y=St(v,b,E),O=c;r.modifiersData[n]=(t={},t[O]=y,t.centerOffset=y-b,t)}}function ti(e){var t=e.state,r=e.options,n=r.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||qr(t.elements.popper,o)&&(t.elements.arrow=o))}var Xr={name:"arrow",enabled:!0,phase:"main",fn:Zo,effect:ti,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function $r(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Br(e){return[I,B,$,P].some(function(t){return e[t]>=0})}function ei(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,i=dt(t,{elementContext:"reference"}),a=dt(t,{altBoundary:!0}),c=$r(i,n),u=$r(a,o,s),l=Br(c),f=Br(u);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}var Jr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ei},ri=[Re,ke,$e,Be],ni=Me({defaultModifiers:ri}),Zr=[Re,ke,$e,Be,Gr,Kr,Qr,Xr,Jr],oi=Me({defaultModifiers:Zr});D.applyStyles=Be;D.arrow=Xr;D.computeStyles=$e;D.createPopper=oi;D.createPopperLite=ni;D.defaultModifiers=Zr;D.detectOverflow=dt;D.eventListeners=Re;D.flip=Kr;D.hide=Jr;D.offset=Gr;D.popperGenerator=Me;D.popperOffsets=ke;D.preventOverflow=Qr});var K=new Map,jt={set(e,t,r){K.has(e)||K.set(e,new Map);let n=K.get(e);if(!n.has(t)&&n.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`);return}n.set(t,r)},get(e,t){return K.has(e)&&K.get(e).get(t)||null},remove(e,t){if(!K.has(e))return;let r=K.get(e);r.delete(t),r.size===0&&K.delete(e)}};var fe="transitionend",pe=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(t,r)=>`#${CSS.escape(r)}`)),e),mr=e=>e==null?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),gr=e=>{do e+=Math.floor(Math.random()*1e6);while(document.getElementById(e));return e},Pn=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:r}=window.getComputedStyle(e),n=Number.parseFloat(t),o=Number.parseFloat(r);return!n&&!o?0:(t=t.split(",")[0],r=r.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(r))*1e3)},Mn=e=>{e.dispatchEvent(new Event(fe))},X=e=>!e||typeof e!="object"?!1:(typeof e.jquery!="undefined"&&(e=e[0]),typeof e.nodeType!="undefined"),Y=e=>X(e)?e.jquery?e[0]:e:typeof e=="string"&&e.length>0?document.querySelector(pe(e)):null,vr=e=>{if(!X(e)||e.getClientRects().length===0)return!1;let t=getComputedStyle(e).getPropertyValue("visibility")==="visible",r=e.closest("details:not([open])");if(!r)return t;if(r!==e){let n=e.closest("summary");if(n&&n.parentNode!==r||n===null)return!1}return t},br=e=>!e||e.nodeType!==Node.ELEMENT_NODE||e.classList.contains("disabled")?!0:typeof e.disabled!="undefined"?e.disabled:e.hasAttribute("disabled")&&e.getAttribute("disabled")!=="false",de=e=>{if(!document.documentElement.attachShadow)return null;if(typeof e.getRootNode=="function"){let t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?de(e.parentNode):null},he=()=>{},yr=e=>{e.offsetHeight},me=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,ue=[],Rn=e=>{document.readyState==="loading"?(ue.length||document.addEventListener("DOMContentLoaded",()=>{for(let t of ue)t()}),ue.push(e)):e()},ge=()=>document.documentElement.dir==="rtl",Ft=e=>{Rn(()=>{let t=me();if(t){let r=e.NAME,n=t.fn[r];t.fn[r]=e.jQueryInterface,t.fn[r].Constructor=e,t.fn[r].noConflict=()=>(t.fn[r]=n,e.jQueryInterface)}})},Q=(e,t=[],r=e)=>typeof e=="function"?e.call(...t):r,Er=(e,t,r=!0)=>{if(!r){Q(e);return}let o=Pn(t)+5,s=!1,i=({target:a})=>{a===t&&(s=!0,t.removeEventListener(fe,i),Q(e))};t.addEventListener(fe,i),setTimeout(()=>{s||Mn(t)},o)};var kn=/[^.]*(?=\..*)\.|.*/,$n=/\..*/,Bn=/::\d+$/,ve={},_r=1,Ar={mouseenter:"mouseover",mouseleave:"mouseout"},jn=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Tr(e,t){return t&&`${t}::${_r++}`||e.uidEvent||_r++}function Or(e){let t=Tr(e);return e.uidEvent=t,ve[t]=ve[t]||{},ve[t]}function Fn(e,t){return function r(n){return Ee(n,{delegateTarget:e}),r.oneOff&&ye.off(e,n.type,t),t.apply(e,[n])}}function Hn(e,t,r){return function n(o){let s=e.querySelectorAll(t);for(let{target:i}=o;i&&i!==this;i=i.parentNode)for(let a of s)if(a===i)return Ee(o,{delegateTarget:i}),n.oneOff&&ye.off(e,o.type,t,r),r.apply(i,[o])}}function Sr(e,t,r=null){return Object.values(e).find(n=>n.callable===t&&n.delegationSelector===r)}function xr(e,t,r){let n=typeof t=="string",o=n?r:t||r,s=Cr(e);return jn.has(s)||(s=e),[n,o,s]}function wr(e,t,r,n,o){if(typeof t!="string"||!e)return;let[s,i,a]=xr(t,r,n);t in Ar&&(i=(h=>function(m){if(!m.relatedTarget||m.relatedTarget!==m.delegateTarget&&!m.delegateTarget.contains(m.relatedTarget))return h.call(this,m)})(i));let c=Or(e),u=c[a]||(c[a]={}),l=Sr(u,i,s?r:null);if(l){l.oneOff=l.oneOff&&o;return}let f=Tr(i,t.replace(kn,"")),g=s?Hn(e,r,i):Fn(e,i);g.delegationSelector=s?r:null,g.callable=i,g.oneOff=o,g.uidEvent=f,u[f]=g,e.addEventListener(a,g,s)}function be(e,t,r,n,o){let s=Sr(t[r],n,o);s&&(e.removeEventListener(r,s,!!o),delete t[r][s.uidEvent])}function Vn(e,t,r,n){let o=t[r]||{};for(let[s,i]of Object.entries(o))s.includes(n)&&be(e,t,r,i.callable,i.delegationSelector)}function Cr(e){return e=e.replace($n,""),Ar[e]||e}var ye={on(e,t,r,n){wr(e,t,r,n,!1)},one(e,t,r,n){wr(e,t,r,n,!0)},off(e,t,r,n){if(typeof t!="string"||!e)return;let[o,s,i]=xr(t,r,n),a=i!==t,c=Or(e),u=c[i]||{},l=t.startsWith(".");if(typeof s!="undefined"){if(!Object.keys(u).length)return;be(e,c,i,s,o?r:null);return}if(l)for(let f of Object.keys(c))Vn(e,c,f,t.slice(1));for(let[f,g]of Object.entries(u)){let p=f.replace(Bn,"");(!a||t.includes(p))&&be(e,c,i,g.callable,g.delegationSelector)}},trigger(e,t,r){if(typeof t!="string"||!e)return null;let n=me(),o=Cr(t),s=t!==o,i=null,a=!0,c=!0,u=!1;s&&n&&(i=n.Event(t,r),n(e).trigger(i),a=!i.isPropagationStopped(),c=!i.isImmediatePropagationStopped(),u=i.isDefaultPrevented());let l=Ee(new Event(t,{bubbles:a,cancelable:!0}),r);return u&&l.preventDefault(),c&&e.dispatchEvent(l),l.defaultPrevented&&i&&i.preventDefault(),l}};function Ee(e,t={}){for(let[r,n]of Object.entries(t))try{e[r]=n}catch(o){Object.defineProperty(e,r,{configurable:!0,get(){return n}})}return e}var S=ye;function Lr(e){if(e==="true")return!0;if(e==="false")return!1;if(e===Number(e).toString())return Number(e);if(e===""||e==="null")return null;if(typeof e!="string")return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function _e(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}var qn={setDataAttribute(e,t,r){e.setAttribute(`data-bs-${_e(t)}`,r)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${_e(t)}`)},getDataAttributes(e){if(!e)return{};let t={},r=Object.keys(e.dataset).filter(n=>n.startsWith("bs")&&!n.startsWith("bsConfig"));for(let n of r){let o=n.replace(/^bs/,"");o=o.charAt(0).toLowerCase()+o.slice(1),t[o]=Lr(e.dataset[n])}return t},getDataAttribute(e,t){return Lr(e.getAttribute(`data-bs-${_e(t)}`))}},wt=qn;var we=class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,r){let n=X(r)?wt.getDataAttribute(r,"config"):{};return N(N(N(N({},this.constructor.Default),typeof n=="object"?n:{}),X(r)?wt.getDataAttributes(r):{}),typeof t=="object"?t:{})}_typeCheckConfig(t,r=this.constructor.DefaultType){for(let[n,o]of Object.entries(r)){let s=t[n],i=X(s)?"element":mr(s);if(!new RegExp(o).test(i))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${i}" but expected type "${o}".`)}}},Ht=we;var Wn="5.3.8",Ae=class extends Ht{constructor(t,r){super(),t=Y(t),t&&(this._element=t,this._config=this._getConfig(r),jt.set(this._element,this.constructor.DATA_KEY,this))}dispose(){jt.remove(this._element,this.constructor.DATA_KEY),S.off(this._element,this.constructor.EVENT_KEY);for(let t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,r,n=!0){Er(t,r,n)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return jt.get(Y(t),this.DATA_KEY)}static getOrCreateInstance(t,r={}){return this.getInstance(t)||new this(t,typeof r=="object"?r:null)}static get VERSION(){return Wn}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}},Vt=Ae;var Te=e=>{let t=e.getAttribute("data-bs-target");if(!t||t==="#"){let r=e.getAttribute("href");if(!r||!r.includes("#")&&!r.startsWith("."))return null;r.includes("#")&&!r.startsWith("#")&&(r=`#${r.split("#")[1]}`),t=r&&r!=="#"?r.trim():null}return t?t.split(",").map(r=>pe(r)).join(","):null},qt={find(e,t=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(t,e))},findOne(e,t=document.documentElement){return Element.prototype.querySelector.call(t,e)},children(e,t){return[].concat(...e.children).filter(r=>r.matches(t))},parents(e,t){let r=[],n=e.parentNode.closest(t);for(;n;)r.push(n),n=n.parentNode.closest(t);return r},prev(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return[r];r=r.previousElementSibling}return[]},next(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return[r];r=r.nextElementSibling}return[]},focusableChildren(e){let t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(r=>`${r}:not([tabindex^="-"])`).join(",");return this.find(t,e).filter(r=>!br(r)&&vr(r))},getSelectorFromElement(e){let t=Te(e);return t&&qt.findOne(t)?t:null},getElementFromSelector(e){let t=Te(e);return t?qt.findOne(t):null},getMultipleElementsFromSelector(e){let t=Te(e);return t?qt.find(t):[]}},F=qt;var zn="collapse",Un="bs.collapse",At=`.${Un}`,Yn=".data-api",Gn=`show${At}`,Kn=`shown${At}`,Qn=`hide${At}`,Xn=`hidden${At}`,Jn=`click${At}${Yn}`,Oe="show",at="collapse",Wt="collapsing",Zn="collapsed",to=`:scope .${at} .${at}`,eo="collapse-horizontal",ro="width",no="height",oo=".collapse.show, .collapse.collapsing",Se='[data-bs-toggle="collapse"]',io={parent:null,toggle:!0},so={parent:"(null|element)",toggle:"boolean"},zt=class e extends Vt{constructor(t,r){super(t,r),this._isTransitioning=!1,this._triggerArray=[];let n=F.find(Se);for(let o of n){let s=F.getSelectorFromElement(o),i=F.find(s).filter(a=>a===this._element);s!==null&&i.length&&this._triggerArray.push(o)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return io}static get DefaultType(){return so}static get NAME(){return zn}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(oo).filter(a=>a!==this._element).map(a=>e.getOrCreateInstance(a,{toggle:!1}))),t.length&&t[0]._isTransitioning||S.trigger(this._element,Gn).defaultPrevented)return;for(let a of t)a.hide();let n=this._getDimension();this._element.classList.remove(at),this._element.classList.add(Wt),this._element.style[n]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;let o=()=>{this._isTransitioning=!1,this._element.classList.remove(Wt),this._element.classList.add(at,Oe),this._element.style[n]="",S.trigger(this._element,Kn)},i=`scroll${n[0].toUpperCase()+n.slice(1)}`;this._queueCallback(o,this._element,!0),this._element.style[n]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown()||S.trigger(this._element,Qn).defaultPrevented)return;let r=this._getDimension();this._element.style[r]=`${this._element.getBoundingClientRect()[r]}px`,yr(this._element),this._element.classList.add(Wt),this._element.classList.remove(at,Oe);for(let o of this._triggerArray){let s=F.getElementFromSelector(o);s&&!this._isShown(s)&&this._addAriaAndCollapsedClass([o],!1)}this._isTransitioning=!0;let n=()=>{this._isTransitioning=!1,this._element.classList.remove(Wt),this._element.classList.add(at),S.trigger(this._element,Xn)};this._element.style[r]="",this._queueCallback(n,this._element,!0)}_isShown(t=this._element){return t.classList.contains(Oe)}_configAfterMerge(t){return t.toggle=!!t.toggle,t.parent=Y(t.parent),t}_getDimension(){return this._element.classList.contains(eo)?ro:no}_initializeChildren(){if(!this._config.parent)return;let t=this._getFirstLevelChildren(Se);for(let r of t){let n=F.getElementFromSelector(r);n&&this._addAriaAndCollapsedClass([r],this._isShown(n))}}_getFirstLevelChildren(t){let r=F.find(to,this._config.parent);return F.find(t,this._config.parent).filter(n=>!r.includes(n))}_addAriaAndCollapsedClass(t,r){if(t.length)for(let n of t)n.classList.toggle(Zn,!r),n.setAttribute("aria-expanded",r)}static jQueryInterface(t){let r={};return typeof t=="string"&&/show|hide/.test(t)&&(r.toggle=!1),this.each(function(){let n=e.getOrCreateInstance(this,r);if(typeof t=="string"){if(typeof n[t]=="undefined")throw new TypeError(`No method named "${t}"`);n[t]()}})}};S.on(document,Jn,Se,function(e){(e.target.tagName==="A"||e.delegateTarget&&e.delegateTarget.tagName==="A")&&e.preventDefault();for(let t of F.getMultipleElementsFromSelector(this))zt.getOrCreateInstance(t,{toggle:!1}).toggle()});Ft(zt);var cs=document.getElementsByClassName("collapse");var qe=In(tn());var ii=/^aria-[\w-]*$/i,Qt={"*":["class","dir","id","lang","role",ii],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},si=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),ai=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,ci=(e,t)=>{let r=e.nodeName.toLowerCase();return t.includes(r)?si.has(r)?!!ai.test(e.nodeValue):!0:t.filter(n=>n instanceof RegExp).some(n=>n.test(r))};function en(e,t,r){if(!e.length)return e;if(r&&typeof r=="function")return r(e);let o=new window.DOMParser().parseFromString(e,"text/html"),s=[].concat(...o.body.querySelectorAll("*"));for(let i of s){let a=i.nodeName.toLowerCase();if(!Object.keys(t).includes(a)){i.remove();continue}let c=[].concat(...i.attributes),u=[].concat(t["*"]||[],t[a]||[]);for(let l of c)ci(l,u)||i.removeAttribute(l.nodeName)}return o.body.innerHTML}var li="TemplateFactory",ui={allowList:Qt,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},fi={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},pi={entry:"(string|element|function|null)",selector:"(string|element)"},je=class extends Ht{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return ui}static get DefaultType(){return fi}static get NAME(){return li}getContent(){return Object.values(this._config.content).map(t=>this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content=N(N({},this._config.content),t),this}toHtml(){let t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(let[o,s]of Object.entries(this._config.content))this._setContent(t,s,o);let r=t.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&r.classList.add(...n.split(" ")),r}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(let[r,n]of Object.entries(t))super._typeCheckConfig({selector:r,entry:n},pi)}_setContent(t,r,n){let o=F.findOne(n,t);if(o){if(r=this._resolvePossibleFunction(r),!r){o.remove();return}if(X(r)){this._putElementInTemplate(Y(r),o);return}if(this._config.html){o.innerHTML=this._maybeSanitize(r);return}o.textContent=r}}_maybeSanitize(t){return this._config.sanitize?en(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return Q(t,[void 0,this])}_putElementInTemplate(t,r){if(this._config.html){r.innerHTML="",r.append(t);return}r.textContent=t.textContent}},rn=je;var di="tooltip",hi=new Set(["sanitize","allowList","sanitizeFn"]),Fe="fade",mi="modal",Xt="show",gi=".tooltip-inner",nn=`.${mi}`,on="hide.bs.modal",Dt="hover",He="focus",Ve="click",vi="manual",bi="hide",yi="hidden",Ei="show",_i="shown",wi="inserted",Ai="click",Ti="focusin",Oi="focusout",Si="mouseenter",xi="mouseleave",Ci={AUTO:"auto",TOP:"top",RIGHT:ge()?"left":"right",BOTTOM:"bottom",LEFT:ge()?"right":"left"},Li={allowList:Qt,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Di={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"},Jt=class e extends Vt{constructor(t,r){if(typeof qe=="undefined")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(t,r),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Li}static get DefaultType(){return Di}static get NAME(){return di}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),S.off(this._element.closest(nn),on,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;let t=S.trigger(this._element,this.constructor.eventName(Ei)),n=(de(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!n)return;this._disposePopper();let o=this._getTipElement();this._element.setAttribute("aria-describedby",o.getAttribute("id"));let{container:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(o),S.trigger(this._element,this.constructor.eventName(wi))),this._popper=this._createPopper(o),o.classList.add(Xt),"ontouchstart"in document.documentElement)for(let a of[].concat(...document.body.children))S.on(a,"mouseover",he);let i=()=>{S.trigger(this._element,this.constructor.eventName(_i)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(i,this.tip,this._isAnimated())}hide(){if(!this._isShown()||S.trigger(this._element,this.constructor.eventName(bi)).defaultPrevented)return;if(this._getTipElement().classList.remove(Xt),"ontouchstart"in document.documentElement)for(let o of[].concat(...document.body.children))S.off(o,"mouseover",he);this._activeTrigger[Ve]=!1,this._activeTrigger[He]=!1,this._activeTrigger[Dt]=!1,this._isHovered=null;let n=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),S.trigger(this._element,this.constructor.eventName(yi)))};this._queueCallback(n,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){let r=this._getTemplateFactory(t).toHtml();if(!r)return null;r.classList.remove(Fe,Xt),r.classList.add(`bs-${this.constructor.NAME}-auto`);let n=gr(this.constructor.NAME).toString();return r.setAttribute("id",n),this._isAnimated()&&r.classList.add(Fe),r}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new rn(dr(N({},this._config),{content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)})),this._templateFactory}_getContentForTemplate(){return{[gi]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Fe)}_isShown(){return this.tip&&this.tip.classList.contains(Xt)}_createPopper(t){let r=Q(this._config.placement,[this,t,this._element]),n=Ci[r.toUpperCase()];return qe.createPopper(this._element,t,this._getPopperConfig(n))}_getOffset(){let{offset:t}=this._config;return typeof t=="string"?t.split(",").map(r=>Number.parseInt(r,10)):typeof t=="function"?r=>t(r,this._element):t}_resolvePossibleFunction(t){return Q(t,[this._element,this._element])}_getPopperConfig(t){let r={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:n=>{this._getTipElement().setAttribute("data-popper-placement",n.state.placement)}}]};return N(N({},r),Q(this._config.popperConfig,[void 0,r]))}_setListeners(){let t=this._config.trigger.split(" ");for(let r of t)if(r==="click")S.on(this._element,this.constructor.eventName(Ai),this._config.selector,n=>{let o=this._initializeOnDelegatedTarget(n);o._activeTrigger[Ve]=!(o._isShown()&&o._activeTrigger[Ve]),o.toggle()});else if(r!==vi){let n=r===Dt?this.constructor.eventName(Si):this.constructor.eventName(Ti),o=r===Dt?this.constructor.eventName(xi):this.constructor.eventName(Oi);S.on(this._element,n,this._config.selector,s=>{let i=this._initializeOnDelegatedTarget(s);i._activeTrigger[s.type==="focusin"?He:Dt]=!0,i._enter()}),S.on(this._element,o,this._config.selector,s=>{let i=this._initializeOnDelegatedTarget(s);i._activeTrigger[s.type==="focusout"?He:Dt]=i._element.contains(s.relatedTarget),i._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},S.on(this._element.closest(nn),on,this._hideModalHandler)}_fixTitle(){let t=this._element.getAttribute("title");t&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,r){clearTimeout(this._timeout),this._timeout=setTimeout(t,r)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){let r=wt.getDataAttributes(this._element);for(let n of Object.keys(r))hi.has(n)&&delete r[n];return t=N(N({},r),typeof t=="object"&&t?t:{}),t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=t.container===!1?document.body:Y(t.container),typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),typeof t.title=="number"&&(t.title=t.title.toString()),typeof t.content=="number"&&(t.content=t.content.toString()),t}_getDelegateConfig(){let t={};for(let[r,n]of Object.entries(this._config))this.constructor.Default[r]!==n&&(t[r]=n);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){let r=e.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof r[t]=="undefined")throw new TypeError(`No method named "${t}"`);r[t]()}})}};Ft(Jt);var We=Jt;var Ni=document.getElementById("toc-bar"),Ii=document.getElementById("toc-solo-trigger"),Pi=document.getElementsByClassName("toc-trigger"),z=document.getElementById("toc-popup"),Mi=document.getElementById("toc-popup-close"),sn="overflow-hidden",ze="closing",Nt,It,ht=class ht{static initBar(){new IntersectionObserver(r=>{r.forEach(n=>{Ni.classList.toggle("invisible",n.isIntersecting)})},{rootMargin:`-${U(this,It)}px 0px 0px 0px`}).observe(Ii),Bt(this,Nt,!1)}static listenAnchors(){[...document.getElementsByClassName("toc-link")].forEach(r=>{r.onclick=()=>this.hidePopup()})}static refresh(){U(this,Nt)&&this.initComponents(),tocbot.refresh(this.options),this.listenAnchors()}static get popupOpened(){return z.open}static showPopup(){this.lockScroll(!0),z.showModal(),z.querySelector("li.is-active-li").scrollIntoView({block:"center"})}static hidePopup(){z.toggleAttribute(ze),z.addEventListener("animationend",()=>{z.toggleAttribute(ze),z.close()},{once:!0}),this.lockScroll(!1)}static lockScroll(t){document.documentElement.classList.toggle(sn,t),document.body.classList.toggle(sn,t)}static clickBackdrop(t){if(z.hasAttribute(ze))return;let r=t.target.getBoundingClientRect();(t.clientXr.right||t.clientYr.bottom)&&this.hidePopup()}static initComponents(){this.initBar(),[...Pi].forEach(t=>{t.onclick=()=>this.showPopup()}),z.onclick=t=>this.clickBackdrop(t),Mi.onclick=()=>this.hidePopup(),z.oncancel=t=>{t.preventDefault(),this.hidePopup()}}static init(){tocbot.init(this.options),this.listenAnchors(),this.initComponents()}};Nt=new WeakMap,It=new WeakMap,_t(ht,Nt,!0),_t(ht,It,48),Et(ht,"options",{tocSelector:"#toc-popup-content",contentSelector:".content",ignoreSelector:"[data-toc-skip]",headingSelector:"h2, h3, h4",orderedList:!1,scrollSmooth:!1,collapseDepth:4,headingsOffset:U(ht,It)});var Ue=ht;var Bs=matchMedia("(min-width: 1200px)");var Fs=Theme.getThemeMapper("default","dark");var an=document.getElementById("mode-toggle");function Ye(){an&&an.addEventListener("click",()=>{Theme.flip()})}function Ge(){let e=document.getElementById("back-to-top");window.addEventListener("scroll",()=>{window.scrollY>50?e.classList.add("show"):e.classList.remove("show")}),e.addEventListener("click",()=>{window.scrollTo({top:0})})}function Ke(){[...document.querySelectorAll('[data-bs-toggle="tooltip"]')].map(t=>new We(t))}function Qe(){Ye(),Ge(),Ke()}var Ri="sidebar-display",ki=document.getElementById("sidebar"),$i=document.getElementById("sidebar-trigger"),cn=document.getElementById("mask"),Z,Zt=class{static toggle(){Bt(this,Z,!U(this,Z)),document.body.toggleAttribute(Ri,U(this,Z)),ki.classList.toggle("z-2",U(this,Z)),cn.classList.toggle("d-none",!U(this,Z))}};Z=new WeakMap,_t(Zt,Z,!1);function Xe(){$i.onclick=cn.onclick=()=>Zt.toggle()}var ln=document.getElementById("sidebar-trigger"),Je=document.getElementById("search-trigger"),te=document.getElementById("search-cancel"),un=document.querySelectorAll("#main-wrapper>.container>.row"),fn=document.getElementById("topbar-title"),ee=document.getElementById("search"),pn=document.getElementById("search-result-wrapper"),Bi=document.getElementById("search-results"),mt=document.getElementById("search-input"),re=document.getElementById("search-hints"),Ze="d-block",M="d-none",dn="input-focus",hn="d-flex",ne=class{static on(){ln.classList.add(M),fn.classList.add(M),Je.classList.add(M),ee.classList.add(hn),te.classList.add(Ze)}static off(){te.classList.remove(Ze),ee.classList.remove(hn),ln.classList.remove(M),fn.classList.remove(M),Je.classList.remove(M)}},it=class{static on(){this.resultVisible||(pn.classList.remove(M),un.forEach(t=>{t.classList.add(M)}),this.resultVisible=!0)}static off(){this.resultVisible&&(Bi.innerHTML="",re.classList.contains(M)&&re.classList.remove(M),pn.classList.add(M),un.forEach(t=>{t.classList.remove(M)}),mt.textContent="",this.resultVisible=!1)}};Et(it,"resultVisible",!1);function mn(){return te.classList.contains(Ze)}function gn(){Je.addEventListener("click",()=>{ne.on(),it.on(),mt.focus()}),te.addEventListener("click",()=>{ne.off(),it.off()}),mt.addEventListener("focus",()=>{ee.classList.add(dn)}),mt.addEventListener("focusout",()=>{ee.classList.remove(dn)}),mt.addEventListener("input",()=>{mt.value===""?mn()?re.classList.remove(M):it.off():(it.on(),mn()&&re.classList.add(M))})}function tr(){gn()}Xe();tr();Qe();})(); +(() => { + var __create = Object.create; + var __defProp = Object.defineProperty; + var __defProps = Object.defineProperties; + var __getOwnPropDesc = Object.getOwnPropertyDescriptor; + var __getOwnPropDescs = Object.getOwnPropertyDescriptors; + var __getOwnPropNames = Object.getOwnPropertyNames; + var __getOwnPropSymbols = Object.getOwnPropertySymbols; + var __getProtoOf = Object.getPrototypeOf; + var __hasOwnProp = Object.prototype.hasOwnProperty; + var __propIsEnum = Object.prototype.propertyIsEnumerable; + var __typeError = (msg) => { + throw TypeError(msg); + }; + var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; + var __spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b)) { + if (__propIsEnum.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + } + return a; + }; + var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); + var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + }; + var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; + }; + var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); + var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg); + var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)); + var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value); + var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2@v2.21100.20000/package/dist/cjs/popper.js + var require_popper = __commonJS({ + "ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2@v2.21100.20000/package/dist/cjs/popper.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + function getWindow(node) { + if (node == null) { + return window; + } + if (node.toString() !== "[object Window]") { + var ownerDocument = node.ownerDocument; + return ownerDocument ? ownerDocument.defaultView || window : window; + } + return node; + } + function isElement2(node) { + var OwnElement = getWindow(node).Element; + return node instanceof OwnElement || node instanceof Element; + } + function isHTMLElement(node) { + var OwnElement = getWindow(node).HTMLElement; + return node instanceof OwnElement || node instanceof HTMLElement; + } + function isShadowRoot(node) { + if (typeof ShadowRoot === "undefined") { + return false; + } + var OwnElement = getWindow(node).ShadowRoot; + return node instanceof OwnElement || node instanceof ShadowRoot; + } + var max = Math.max; + var min = Math.min; + var round = Math.round; + function getBoundingClientRect(element, includeScale) { + if (includeScale === void 0) { + includeScale = false; + } + var rect = element.getBoundingClientRect(); + var scaleX = 1; + var scaleY = 1; + if (isHTMLElement(element) && includeScale) { + var offsetHeight = element.offsetHeight; + var offsetWidth = element.offsetWidth; + if (offsetWidth > 0) { + scaleX = round(rect.width) / offsetWidth || 1; + } + if (offsetHeight > 0) { + scaleY = round(rect.height) / offsetHeight || 1; + } + } + return { + width: rect.width / scaleX, + height: rect.height / scaleY, + top: rect.top / scaleY, + right: rect.right / scaleX, + bottom: rect.bottom / scaleY, + left: rect.left / scaleX, + x: rect.left / scaleX, + y: rect.top / scaleY + }; + } + function getWindowScroll(node) { + var win = getWindow(node); + var scrollLeft = win.pageXOffset; + var scrollTop = win.pageYOffset; + return { + scrollLeft, + scrollTop + }; + } + function getHTMLElementScroll(element) { + return { + scrollLeft: element.scrollLeft, + scrollTop: element.scrollTop + }; + } + function getNodeScroll(node) { + if (node === getWindow(node) || !isHTMLElement(node)) { + return getWindowScroll(node); + } else { + return getHTMLElementScroll(node); + } + } + function getNodeName(element) { + return element ? (element.nodeName || "").toLowerCase() : null; + } + function getDocumentElement(element) { + return ((isElement2(element) ? element.ownerDocument : ( + // $FlowFixMe[prop-missing] + element.document + )) || window.document).documentElement; + } + function getWindowScrollBarX(element) { + return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; + } + function getComputedStyle2(element) { + return getWindow(element).getComputedStyle(element); + } + function isScrollParent(element) { + var _getComputedStyle = getComputedStyle2(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY; + return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); + } + function isElementScaled(element) { + var rect = element.getBoundingClientRect(); + var scaleX = round(rect.width) / element.offsetWidth || 1; + var scaleY = round(rect.height) / element.offsetHeight || 1; + return scaleX !== 1 || scaleY !== 1; + } + function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { + if (isFixed === void 0) { + isFixed = false; + } + var isOffsetParentAnElement = isHTMLElement(offsetParent); + var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent); + var documentElement = getDocumentElement(offsetParent); + var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled); + var scroll = { + scrollLeft: 0, + scrollTop: 0 + }; + var offsets = { + x: 0, + y: 0 + }; + if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { + if (getNodeName(offsetParent) !== "body" || // https://github.com/popperjs/popper-core/issues/1078 + isScrollParent(documentElement)) { + scroll = getNodeScroll(offsetParent); + } + if (isHTMLElement(offsetParent)) { + offsets = getBoundingClientRect(offsetParent, true); + offsets.x += offsetParent.clientLeft; + offsets.y += offsetParent.clientTop; + } else if (documentElement) { + offsets.x = getWindowScrollBarX(documentElement); + } + } + return { + x: rect.left + scroll.scrollLeft - offsets.x, + y: rect.top + scroll.scrollTop - offsets.y, + width: rect.width, + height: rect.height + }; + } + function getLayoutRect(element) { + var clientRect = getBoundingClientRect(element); + var width = element.offsetWidth; + var height = element.offsetHeight; + if (Math.abs(clientRect.width - width) <= 1) { + width = clientRect.width; + } + if (Math.abs(clientRect.height - height) <= 1) { + height = clientRect.height; + } + return { + x: element.offsetLeft, + y: element.offsetTop, + width, + height + }; + } + function getParentNode(element) { + if (getNodeName(element) === "html") { + return element; + } + return ( + // this is a quicker (but less type safe) way to save quite some bytes from the bundle + // $FlowFixMe[incompatible-return] + // $FlowFixMe[prop-missing] + element.assignedSlot || // step into the shadow DOM of the parent of a slotted node + element.parentNode || // DOM Element detected + (isShadowRoot(element) ? element.host : null) || // ShadowRoot detected + // $FlowFixMe[incompatible-call]: HTMLElement is a Node + getDocumentElement(element) + ); + } + function getScrollParent(node) { + if (["html", "body", "#document"].indexOf(getNodeName(node)) >= 0) { + return node.ownerDocument.body; + } + if (isHTMLElement(node) && isScrollParent(node)) { + return node; + } + return getScrollParent(getParentNode(node)); + } + function listScrollParents(element, list) { + var _element$ownerDocumen; + if (list === void 0) { + list = []; + } + var scrollParent = getScrollParent(element); + var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body); + var win = getWindow(scrollParent); + var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; + var updatedList = list.concat(target); + return isBody ? updatedList : ( + // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here + updatedList.concat(listScrollParents(getParentNode(target))) + ); + } + function isTableElement(element) { + return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0; + } + function getTrueOffsetParent(element) { + if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837 + getComputedStyle2(element).position === "fixed") { + return null; + } + return element.offsetParent; + } + function getContainingBlock(element) { + var isFirefox = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1; + var isIE = navigator.userAgent.indexOf("Trident") !== -1; + if (isIE && isHTMLElement(element)) { + var elementCss = getComputedStyle2(element); + if (elementCss.position === "fixed") { + return null; + } + } + var currentNode = getParentNode(element); + while (isHTMLElement(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0) { + var css = getComputedStyle2(currentNode); + if (css.transform !== "none" || css.perspective !== "none" || css.contain === "paint" || ["transform", "perspective"].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === "filter" || isFirefox && css.filter && css.filter !== "none") { + return currentNode; + } else { + currentNode = currentNode.parentNode; + } + } + return null; + } + function getOffsetParent(element) { + var window2 = getWindow(element); + var offsetParent = getTrueOffsetParent(element); + while (offsetParent && isTableElement(offsetParent) && getComputedStyle2(offsetParent).position === "static") { + offsetParent = getTrueOffsetParent(offsetParent); + } + if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle2(offsetParent).position === "static")) { + return window2; + } + return offsetParent || getContainingBlock(element) || window2; + } + var top = "top"; + var bottom = "bottom"; + var right = "right"; + var left = "left"; + var auto = "auto"; + var basePlacements = [top, bottom, right, left]; + var start = "start"; + var end = "end"; + var clippingParents = "clippingParents"; + var viewport = "viewport"; + var popper = "popper"; + var reference = "reference"; + var variationPlacements = /* @__PURE__ */ basePlacements.reduce(function(acc, placement) { + return acc.concat([placement + "-" + start, placement + "-" + end]); + }, []); + var placements = /* @__PURE__ */ [].concat(basePlacements, [auto]).reduce(function(acc, placement) { + return acc.concat([placement, placement + "-" + start, placement + "-" + end]); + }, []); + var beforeRead = "beforeRead"; + var read = "read"; + var afterRead = "afterRead"; + var beforeMain = "beforeMain"; + var main = "main"; + var afterMain = "afterMain"; + var beforeWrite = "beforeWrite"; + var write = "write"; + var afterWrite = "afterWrite"; + var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite]; + function order(modifiers) { + var map = /* @__PURE__ */ new Map(); + var visited = /* @__PURE__ */ new Set(); + var result = []; + modifiers.forEach(function(modifier) { + map.set(modifier.name, modifier); + }); + function sort(modifier) { + visited.add(modifier.name); + var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); + requires.forEach(function(dep) { + if (!visited.has(dep)) { + var depModifier = map.get(dep); + if (depModifier) { + sort(depModifier); + } + } + }); + result.push(modifier); + } + modifiers.forEach(function(modifier) { + if (!visited.has(modifier.name)) { + sort(modifier); + } + }); + return result; + } + function orderModifiers(modifiers) { + var orderedModifiers = order(modifiers); + return modifierPhases.reduce(function(acc, phase) { + return acc.concat(orderedModifiers.filter(function(modifier) { + return modifier.phase === phase; + })); + }, []); + } + function debounce(fn) { + var pending; + return function() { + if (!pending) { + pending = new Promise(function(resolve) { + Promise.resolve().then(function() { + pending = void 0; + resolve(fn()); + }); + }); + } + return pending; + }; + } + function format(str) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + return [].concat(args).reduce(function(p, c) { + return p.replace(/%s/, c); + }, str); + } + var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s'; + var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available'; + var VALID_PROPERTIES = ["name", "enabled", "phase", "fn", "effect", "requires", "options"]; + function validateModifiers(modifiers) { + modifiers.forEach(function(modifier) { + [].concat(Object.keys(modifier), VALID_PROPERTIES).filter(function(value, index, self) { + return self.indexOf(value) === index; + }).forEach(function(key) { + switch (key) { + case "name": + if (typeof modifier.name !== "string") { + console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', '"' + String(modifier.name) + '"')); + } + break; + case "enabled": + if (typeof modifier.enabled !== "boolean") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', '"' + String(modifier.enabled) + '"')); + } + break; + case "phase": + if (modifierPhases.indexOf(modifier.phase) < 0) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(", "), '"' + String(modifier.phase) + '"')); + } + break; + case "fn": + if (typeof modifier.fn !== "function") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', '"' + String(modifier.fn) + '"')); + } + break; + case "effect": + if (modifier.effect != null && typeof modifier.effect !== "function") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', '"' + String(modifier.fn) + '"')); + } + break; + case "requires": + if (modifier.requires != null && !Array.isArray(modifier.requires)) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', '"' + String(modifier.requires) + '"')); + } + break; + case "requiresIfExists": + if (!Array.isArray(modifier.requiresIfExists)) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', '"' + String(modifier.requiresIfExists) + '"')); + } + break; + case "options": + case "data": + break; + default: + console.error('PopperJS: an invalid property has been provided to the "' + modifier.name + '" modifier, valid properties are ' + VALID_PROPERTIES.map(function(s) { + return '"' + s + '"'; + }).join(", ") + '; but "' + key + '" was provided.'); + } + modifier.requires && modifier.requires.forEach(function(requirement) { + if (modifiers.find(function(mod) { + return mod.name === requirement; + }) == null) { + console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement)); + } + }); + }); + }); + } + function uniqueBy(arr, fn) { + var identifiers = /* @__PURE__ */ new Set(); + return arr.filter(function(item) { + var identifier = fn(item); + if (!identifiers.has(identifier)) { + identifiers.add(identifier); + return true; + } + }); + } + function getBasePlacement(placement) { + return placement.split("-")[0]; + } + function mergeByName(modifiers) { + var merged = modifiers.reduce(function(merged2, current) { + var existing = merged2[current.name]; + merged2[current.name] = existing ? Object.assign({}, existing, current, { + options: Object.assign({}, existing.options, current.options), + data: Object.assign({}, existing.data, current.data) + }) : current; + return merged2; + }, {}); + return Object.keys(merged).map(function(key) { + return merged[key]; + }); + } + function getViewportRect(element) { + var win = getWindow(element); + var html = getDocumentElement(element); + var visualViewport = win.visualViewport; + var width = html.clientWidth; + var height = html.clientHeight; + var x = 0; + var y = 0; + if (visualViewport) { + width = visualViewport.width; + height = visualViewport.height; + if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { + x = visualViewport.offsetLeft; + y = visualViewport.offsetTop; + } + } + return { + width, + height, + x: x + getWindowScrollBarX(element), + y + }; + } + function getDocumentRect(element) { + var _element$ownerDocumen; + var html = getDocumentElement(element); + var winScroll = getWindowScroll(element); + var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; + var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); + var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); + var x = -winScroll.scrollLeft + getWindowScrollBarX(element); + var y = -winScroll.scrollTop; + if (getComputedStyle2(body || html).direction === "rtl") { + x += max(html.clientWidth, body ? body.clientWidth : 0) - width; + } + return { + width, + height, + x, + y + }; + } + function contains(parent, child) { + var rootNode = child.getRootNode && child.getRootNode(); + if (parent.contains(child)) { + return true; + } else if (rootNode && isShadowRoot(rootNode)) { + var next = child; + do { + if (next && parent.isSameNode(next)) { + return true; + } + next = next.parentNode || next.host; + } while (next); + } + return false; + } + function rectToClientRect(rect) { + return Object.assign({}, rect, { + left: rect.x, + top: rect.y, + right: rect.x + rect.width, + bottom: rect.y + rect.height + }); + } + function getInnerBoundingClientRect(element) { + var rect = getBoundingClientRect(element); + rect.top = rect.top + element.clientTop; + rect.left = rect.left + element.clientLeft; + rect.bottom = rect.top + element.clientHeight; + rect.right = rect.left + element.clientWidth; + rect.width = element.clientWidth; + rect.height = element.clientHeight; + rect.x = rect.left; + rect.y = rect.top; + return rect; + } + function getClientRectFromMixedType(element, clippingParent) { + return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement2(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); + } + function getClippingParents(element) { + var clippingParents2 = listScrollParents(getParentNode(element)); + var canEscapeClipping = ["absolute", "fixed"].indexOf(getComputedStyle2(element).position) >= 0; + var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element; + if (!isElement2(clipperElement)) { + return []; + } + return clippingParents2.filter(function(clippingParent) { + return isElement2(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body" && (canEscapeClipping ? getComputedStyle2(clippingParent).position !== "static" : true); + }); + } + function getClippingRect(element, boundary, rootBoundary) { + var mainClippingParents = boundary === "clippingParents" ? getClippingParents(element) : [].concat(boundary); + var clippingParents2 = [].concat(mainClippingParents, [rootBoundary]); + var firstClippingParent = clippingParents2[0]; + var clippingRect = clippingParents2.reduce(function(accRect, clippingParent) { + var rect = getClientRectFromMixedType(element, clippingParent); + accRect.top = max(rect.top, accRect.top); + accRect.right = min(rect.right, accRect.right); + accRect.bottom = min(rect.bottom, accRect.bottom); + accRect.left = max(rect.left, accRect.left); + return accRect; + }, getClientRectFromMixedType(element, firstClippingParent)); + clippingRect.width = clippingRect.right - clippingRect.left; + clippingRect.height = clippingRect.bottom - clippingRect.top; + clippingRect.x = clippingRect.left; + clippingRect.y = clippingRect.top; + return clippingRect; + } + function getVariation(placement) { + return placement.split("-")[1]; + } + function getMainAxisFromPlacement(placement) { + return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y"; + } + function computeOffsets(_ref) { + var reference2 = _ref.reference, element = _ref.element, placement = _ref.placement; + var basePlacement = placement ? getBasePlacement(placement) : null; + var variation = placement ? getVariation(placement) : null; + var commonX = reference2.x + reference2.width / 2 - element.width / 2; + var commonY = reference2.y + reference2.height / 2 - element.height / 2; + var offsets; + switch (basePlacement) { + case top: + offsets = { + x: commonX, + y: reference2.y - element.height + }; + break; + case bottom: + offsets = { + x: commonX, + y: reference2.y + reference2.height + }; + break; + case right: + offsets = { + x: reference2.x + reference2.width, + y: commonY + }; + break; + case left: + offsets = { + x: reference2.x - element.width, + y: commonY + }; + break; + default: + offsets = { + x: reference2.x, + y: reference2.y + }; + } + var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null; + if (mainAxis != null) { + var len = mainAxis === "y" ? "height" : "width"; + switch (variation) { + case start: + offsets[mainAxis] = offsets[mainAxis] - (reference2[len] / 2 - element[len] / 2); + break; + case end: + offsets[mainAxis] = offsets[mainAxis] + (reference2[len] / 2 - element[len] / 2); + break; + } + } + return offsets; + } + function getFreshSideObject() { + return { + top: 0, + right: 0, + bottom: 0, + left: 0 + }; + } + function mergePaddingObject(paddingObject) { + return Object.assign({}, getFreshSideObject(), paddingObject); + } + function expandToHashMap(value, keys) { + return keys.reduce(function(hashMap, key) { + hashMap[key] = value; + return hashMap; + }, {}); + } + function detectOverflow(state, options) { + if (options === void 0) { + options = {}; + } + var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding; + var paddingObject = mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements)); + var altContext = elementContext === popper ? reference : popper; + var popperRect = state.rects.popper; + var element = state.elements[altBoundary ? altContext : elementContext]; + var clippingClientRect = getClippingRect(isElement2(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary); + var referenceClientRect = getBoundingClientRect(state.elements.reference); + var popperOffsets2 = computeOffsets({ + reference: referenceClientRect, + element: popperRect, + strategy: "absolute", + placement + }); + var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets2)); + var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; + var overflowOffsets = { + top: clippingClientRect.top - elementClientRect.top + paddingObject.top, + bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, + left: clippingClientRect.left - elementClientRect.left + paddingObject.left, + right: elementClientRect.right - clippingClientRect.right + paddingObject.right + }; + var offsetData = state.modifiersData.offset; + if (elementContext === popper && offsetData) { + var offset2 = offsetData[placement]; + Object.keys(overflowOffsets).forEach(function(key) { + var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1; + var axis = [top, bottom].indexOf(key) >= 0 ? "y" : "x"; + overflowOffsets[key] += offset2[axis] * multiply; + }); + } + return overflowOffsets; + } + var INVALID_ELEMENT_ERROR = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element."; + var INFINITE_LOOP_ERROR = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash."; + var DEFAULT_OPTIONS = { + placement: "bottom", + modifiers: [], + strategy: "absolute" + }; + function areValidElements() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + return !args.some(function(element) { + return !(element && typeof element.getBoundingClientRect === "function"); + }); + } + function popperGenerator(generatorOptions) { + if (generatorOptions === void 0) { + generatorOptions = {}; + } + var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers2 = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2; + return function createPopper3(reference2, popper2, options) { + if (options === void 0) { + options = defaultOptions; + } + var state = { + placement: "bottom", + orderedModifiers: [], + options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), + modifiersData: {}, + elements: { + reference: reference2, + popper: popper2 + }, + attributes: {}, + styles: {} + }; + var effectCleanupFns = []; + var isDestroyed = false; + var instance = { + state, + setOptions: function setOptions(setOptionsAction) { + var options2 = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction; + cleanupModifierEffects(); + state.options = Object.assign({}, defaultOptions, state.options, options2); + state.scrollParents = { + reference: isElement2(reference2) ? listScrollParents(reference2) : reference2.contextElement ? listScrollParents(reference2.contextElement) : [], + popper: listScrollParents(popper2) + }; + var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers2, state.options.modifiers))); + state.orderedModifiers = orderedModifiers.filter(function(m) { + return m.enabled; + }); + if (true) { + var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function(_ref) { + var name = _ref.name; + return name; + }); + validateModifiers(modifiers); + if (getBasePlacement(state.options.placement) === auto) { + var flipModifier = state.orderedModifiers.find(function(_ref2) { + var name = _ref2.name; + return name === "flip"; + }); + if (!flipModifier) { + console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" ")); + } + } + var _getComputedStyle = getComputedStyle2(popper2), marginTop = _getComputedStyle.marginTop, marginRight = _getComputedStyle.marginRight, marginBottom = _getComputedStyle.marginBottom, marginLeft = _getComputedStyle.marginLeft; + if ([marginTop, marginRight, marginBottom, marginLeft].some(function(margin) { + return parseFloat(margin); + })) { + console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" ")); + } + } + runModifierEffects(); + return instance.update(); + }, + // Sync update – it will always be executed, even if not necessary. This + // is useful for low frequency updates where sync behavior simplifies the + // logic. + // For high frequency updates (e.g. `resize` and `scroll` events), always + // prefer the async Popper#update method + forceUpdate: function forceUpdate() { + if (isDestroyed) { + return; + } + var _state$elements = state.elements, reference3 = _state$elements.reference, popper3 = _state$elements.popper; + if (!areValidElements(reference3, popper3)) { + if (true) { + console.error(INVALID_ELEMENT_ERROR); + } + return; + } + state.rects = { + reference: getCompositeRect(reference3, getOffsetParent(popper3), state.options.strategy === "fixed"), + popper: getLayoutRect(popper3) + }; + state.reset = false; + state.placement = state.options.placement; + state.orderedModifiers.forEach(function(modifier) { + return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); + }); + var __debug_loops__ = 0; + for (var index = 0; index < state.orderedModifiers.length; index++) { + if (true) { + __debug_loops__ += 1; + if (__debug_loops__ > 100) { + console.error(INFINITE_LOOP_ERROR); + break; + } + } + if (state.reset === true) { + state.reset = false; + index = -1; + continue; + } + var _state$orderedModifie = state.orderedModifiers[index], fn = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name; + if (typeof fn === "function") { + state = fn({ + state, + options: _options, + name, + instance + }) || state; + } + } + }, + // Async and optimistically optimized update – it will not be executed if + // not necessary (debounced to run at most once-per-tick) + update: debounce(function() { + return new Promise(function(resolve) { + instance.forceUpdate(); + resolve(state); + }); + }), + destroy: function destroy() { + cleanupModifierEffects(); + isDestroyed = true; + } + }; + if (!areValidElements(reference2, popper2)) { + if (true) { + console.error(INVALID_ELEMENT_ERROR); + } + return instance; + } + instance.setOptions(options).then(function(state2) { + if (!isDestroyed && options.onFirstUpdate) { + options.onFirstUpdate(state2); + } + }); + function runModifierEffects() { + state.orderedModifiers.forEach(function(_ref3) { + var name = _ref3.name, _ref3$options = _ref3.options, options2 = _ref3$options === void 0 ? {} : _ref3$options, effect2 = _ref3.effect; + if (typeof effect2 === "function") { + var cleanupFn = effect2({ + state, + name, + instance, + options: options2 + }); + var noopFn = function noopFn2() { + }; + effectCleanupFns.push(cleanupFn || noopFn); + } + }); + } + function cleanupModifierEffects() { + effectCleanupFns.forEach(function(fn) { + return fn(); + }); + effectCleanupFns = []; + } + return instance; + }; + } + var passive = { + passive: true + }; + function effect$2(_ref) { + var state = _ref.state, instance = _ref.instance, options = _ref.options; + var _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? true : _options$resize; + var window2 = getWindow(state.elements.popper); + var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper); + if (scroll) { + scrollParents.forEach(function(scrollParent) { + scrollParent.addEventListener("scroll", instance.update, passive); + }); + } + if (resize) { + window2.addEventListener("resize", instance.update, passive); + } + return function() { + if (scroll) { + scrollParents.forEach(function(scrollParent) { + scrollParent.removeEventListener("scroll", instance.update, passive); + }); + } + if (resize) { + window2.removeEventListener("resize", instance.update, passive); + } + }; + } + var eventListeners = { + name: "eventListeners", + enabled: true, + phase: "write", + fn: function fn() { + }, + effect: effect$2, + data: {} + }; + function popperOffsets(_ref) { + var state = _ref.state, name = _ref.name; + state.modifiersData[name] = computeOffsets({ + reference: state.rects.reference, + element: state.rects.popper, + strategy: "absolute", + placement: state.placement + }); + } + var popperOffsets$1 = { + name: "popperOffsets", + enabled: true, + phase: "read", + fn: popperOffsets, + data: {} + }; + var unsetSides = { + top: "auto", + right: "auto", + bottom: "auto", + left: "auto" + }; + function roundOffsetsByDPR(_ref) { + var x = _ref.x, y = _ref.y; + var win = window; + var dpr = win.devicePixelRatio || 1; + return { + x: round(x * dpr) / dpr || 0, + y: round(y * dpr) / dpr || 0 + }; + } + function mapToStyles(_ref2) { + var _Object$assign2; + var popper2 = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed; + var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === "function" ? roundOffsets(offsets) : offsets, _ref3$x = _ref3.x, x = _ref3$x === void 0 ? 0 : _ref3$x, _ref3$y = _ref3.y, y = _ref3$y === void 0 ? 0 : _ref3$y; + var hasX = offsets.hasOwnProperty("x"); + var hasY = offsets.hasOwnProperty("y"); + var sideX = left; + var sideY = top; + var win = window; + if (adaptive) { + var offsetParent = getOffsetParent(popper2); + var heightProp = "clientHeight"; + var widthProp = "clientWidth"; + if (offsetParent === getWindow(popper2)) { + offsetParent = getDocumentElement(popper2); + if (getComputedStyle2(offsetParent).position !== "static" && position === "absolute") { + heightProp = "scrollHeight"; + widthProp = "scrollWidth"; + } + } + offsetParent = offsetParent; + if (placement === top || (placement === left || placement === right) && variation === end) { + sideY = bottom; + var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : ( + // $FlowFixMe[prop-missing] + offsetParent[heightProp] + ); + y -= offsetY - popperRect.height; + y *= gpuAcceleration ? 1 : -1; + } + if (placement === left || (placement === top || placement === bottom) && variation === end) { + sideX = right; + var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : ( + // $FlowFixMe[prop-missing] + offsetParent[widthProp] + ); + x -= offsetX - popperRect.width; + x *= gpuAcceleration ? 1 : -1; + } + } + var commonStyles = Object.assign({ + position + }, adaptive && unsetSides); + if (gpuAcceleration) { + var _Object$assign; + return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); + } + return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2)); + } + function computeStyles(_ref4) { + var state = _ref4.state, options = _ref4.options; + var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; + if (true) { + var transitionProperty = getComputedStyle2(state.elements.popper).transitionProperty || ""; + if (adaptive && ["transform", "top", "right", "bottom", "left"].some(function(property) { + return transitionProperty.indexOf(property) >= 0; + })) { + console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', "\n\n", 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", "\n\n", "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" ")); + } + } + var commonStyles = { + placement: getBasePlacement(state.placement), + variation: getVariation(state.placement), + popper: state.elements.popper, + popperRect: state.rects.popper, + gpuAcceleration, + isFixed: state.options.strategy === "fixed" + }; + if (state.modifiersData.popperOffsets != null) { + state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.popperOffsets, + position: state.options.strategy, + adaptive, + roundOffsets + }))); + } + if (state.modifiersData.arrow != null) { + state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.arrow, + position: "absolute", + adaptive: false, + roundOffsets + }))); + } + state.attributes.popper = Object.assign({}, state.attributes.popper, { + "data-popper-placement": state.placement + }); + } + var computeStyles$1 = { + name: "computeStyles", + enabled: true, + phase: "beforeWrite", + fn: computeStyles, + data: {} + }; + function applyStyles(_ref) { + var state = _ref.state; + Object.keys(state.elements).forEach(function(name) { + var style = state.styles[name] || {}; + var attributes = state.attributes[name] || {}; + var element = state.elements[name]; + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } + Object.assign(element.style, style); + Object.keys(attributes).forEach(function(name2) { + var value = attributes[name2]; + if (value === false) { + element.removeAttribute(name2); + } else { + element.setAttribute(name2, value === true ? "" : value); + } + }); + }); + } + function effect$1(_ref2) { + var state = _ref2.state; + var initialStyles = { + popper: { + position: state.options.strategy, + left: "0", + top: "0", + margin: "0" + }, + arrow: { + position: "absolute" + }, + reference: {} + }; + Object.assign(state.elements.popper.style, initialStyles.popper); + state.styles = initialStyles; + if (state.elements.arrow) { + Object.assign(state.elements.arrow.style, initialStyles.arrow); + } + return function() { + Object.keys(state.elements).forEach(function(name) { + var element = state.elements[name]; + var attributes = state.attributes[name] || {}; + var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); + var style = styleProperties.reduce(function(style2, property) { + style2[property] = ""; + return style2; + }, {}); + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } + Object.assign(element.style, style); + Object.keys(attributes).forEach(function(attribute) { + element.removeAttribute(attribute); + }); + }); + }; + } + var applyStyles$1 = { + name: "applyStyles", + enabled: true, + phase: "write", + fn: applyStyles, + effect: effect$1, + requires: ["computeStyles"] + }; + function distanceAndSkiddingToXY(placement, rects, offset2) { + var basePlacement = getBasePlacement(placement); + var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1; + var _ref = typeof offset2 === "function" ? offset2(Object.assign({}, rects, { + placement + })) : offset2, skidding = _ref[0], distance = _ref[1]; + skidding = skidding || 0; + distance = (distance || 0) * invertDistance; + return [left, right].indexOf(basePlacement) >= 0 ? { + x: distance, + y: skidding + } : { + x: skidding, + y: distance + }; + } + function offset(_ref2) { + var state = _ref2.state, options = _ref2.options, name = _ref2.name; + var _options$offset = options.offset, offset2 = _options$offset === void 0 ? [0, 0] : _options$offset; + var data = placements.reduce(function(acc, placement) { + acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset2); + return acc; + }, {}); + var _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y; + if (state.modifiersData.popperOffsets != null) { + state.modifiersData.popperOffsets.x += x; + state.modifiersData.popperOffsets.y += y; + } + state.modifiersData[name] = data; + } + var offset$1 = { + name: "offset", + enabled: true, + phase: "main", + requires: ["popperOffsets"], + fn: offset + }; + var hash$1 = { + left: "right", + right: "left", + bottom: "top", + top: "bottom" + }; + function getOppositePlacement(placement) { + return placement.replace(/left|right|bottom|top/g, function(matched) { + return hash$1[matched]; + }); + } + var hash = { + start: "end", + end: "start" + }; + function getOppositeVariationPlacement(placement) { + return placement.replace(/start|end/g, function(matched) { + return hash[matched]; + }); + } + function computeAutoPlacement(state, options) { + if (options === void 0) { + options = {}; + } + var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP; + var variation = getVariation(placement); + var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function(placement2) { + return getVariation(placement2) === variation; + }) : basePlacements; + var allowedPlacements = placements$1.filter(function(placement2) { + return allowedAutoPlacements.indexOf(placement2) >= 0; + }); + if (allowedPlacements.length === 0) { + allowedPlacements = placements$1; + if (true) { + console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" ")); + } + } + var overflows = allowedPlacements.reduce(function(acc, placement2) { + acc[placement2] = detectOverflow(state, { + placement: placement2, + boundary, + rootBoundary, + padding + })[getBasePlacement(placement2)]; + return acc; + }, {}); + return Object.keys(overflows).sort(function(a, b) { + return overflows[a] - overflows[b]; + }); + } + function getExpandedFallbackPlacements(placement) { + if (getBasePlacement(placement) === auto) { + return []; + } + var oppositePlacement = getOppositePlacement(placement); + return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; + } + function flip(_ref) { + var state = _ref.state, options = _ref.options, name = _ref.name; + if (state.modifiersData[name]._skip) { + return; + } + var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements; + var preferredPlacement = state.options.placement; + var basePlacement = getBasePlacement(preferredPlacement); + var isBasePlacement = basePlacement === preferredPlacement; + var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)); + var placements2 = [preferredPlacement].concat(fallbackPlacements).reduce(function(acc, placement2) { + return acc.concat(getBasePlacement(placement2) === auto ? computeAutoPlacement(state, { + placement: placement2, + boundary, + rootBoundary, + padding, + flipVariations, + allowedAutoPlacements + }) : placement2); + }, []); + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var checksMap = /* @__PURE__ */ new Map(); + var makeFallbackChecks = true; + var firstFittingPlacement = placements2[0]; + for (var i = 0; i < placements2.length; i++) { + var placement = placements2[i]; + var _basePlacement = getBasePlacement(placement); + var isStartVariation = getVariation(placement) === start; + var isVertical = [top, bottom].indexOf(_basePlacement) >= 0; + var len = isVertical ? "width" : "height"; + var overflow = detectOverflow(state, { + placement, + boundary, + rootBoundary, + altBoundary, + padding + }); + var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top; + if (referenceRect[len] > popperRect[len]) { + mainVariationSide = getOppositePlacement(mainVariationSide); + } + var altVariationSide = getOppositePlacement(mainVariationSide); + var checks = []; + if (checkMainAxis) { + checks.push(overflow[_basePlacement] <= 0); + } + if (checkAltAxis) { + checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0); + } + if (checks.every(function(check) { + return check; + })) { + firstFittingPlacement = placement; + makeFallbackChecks = false; + break; + } + checksMap.set(placement, checks); + } + if (makeFallbackChecks) { + var numberOfChecks = flipVariations ? 3 : 1; + var _loop = function _loop2(_i2) { + var fittingPlacement = placements2.find(function(placement2) { + var checks2 = checksMap.get(placement2); + if (checks2) { + return checks2.slice(0, _i2).every(function(check) { + return check; + }); + } + }); + if (fittingPlacement) { + firstFittingPlacement = fittingPlacement; + return "break"; + } + }; + for (var _i = numberOfChecks; _i > 0; _i--) { + var _ret = _loop(_i); + if (_ret === "break") break; + } + } + if (state.placement !== firstFittingPlacement) { + state.modifiersData[name]._skip = true; + state.placement = firstFittingPlacement; + state.reset = true; + } + } + var flip$1 = { + name: "flip", + enabled: true, + phase: "main", + fn: flip, + requiresIfExists: ["offset"], + data: { + _skip: false + } + }; + function getAltAxis(axis) { + return axis === "x" ? "y" : "x"; + } + function within(min$1, value, max$1) { + return max(min$1, min(value, max$1)); + } + function withinMaxClamp(min2, value, max2) { + var v = within(min2, value, max2); + return v > max2 ? max2 : v; + } + function preventOverflow(_ref) { + var state = _ref.state, options = _ref.options, name = _ref.name; + var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset; + var overflow = detectOverflow(state, { + boundary, + rootBoundary, + padding, + altBoundary + }); + var basePlacement = getBasePlacement(state.placement); + var variation = getVariation(state.placement); + var isBasePlacement = !variation; + var mainAxis = getMainAxisFromPlacement(basePlacement); + var altAxis = getAltAxis(mainAxis); + var popperOffsets2 = state.modifiersData.popperOffsets; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var tetherOffsetValue = typeof tetherOffset === "function" ? tetherOffset(Object.assign({}, state.rects, { + placement: state.placement + })) : tetherOffset; + var normalizedTetherOffsetValue = typeof tetherOffsetValue === "number" ? { + mainAxis: tetherOffsetValue, + altAxis: tetherOffsetValue + } : Object.assign({ + mainAxis: 0, + altAxis: 0 + }, tetherOffsetValue); + var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null; + var data = { + x: 0, + y: 0 + }; + if (!popperOffsets2) { + return; + } + if (checkMainAxis) { + var _offsetModifierState$; + var mainSide = mainAxis === "y" ? top : left; + var altSide = mainAxis === "y" ? bottom : right; + var len = mainAxis === "y" ? "height" : "width"; + var offset2 = popperOffsets2[mainAxis]; + var min$1 = offset2 + overflow[mainSide]; + var max$1 = offset2 - overflow[altSide]; + var additive = tether ? -popperRect[len] / 2 : 0; + var minLen = variation === start ? referenceRect[len] : popperRect[len]; + var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; + var arrowElement = state.elements.arrow; + var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { + width: 0, + height: 0 + }; + var arrowPaddingObject = state.modifiersData["arrow#persistent"] ? state.modifiersData["arrow#persistent"].padding : getFreshSideObject(); + var arrowPaddingMin = arrowPaddingObject[mainSide]; + var arrowPaddingMax = arrowPaddingObject[altSide]; + var arrowLen = within(0, referenceRect[len], arrowRect[len]); + var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis; + var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; + var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); + var clientOffset = arrowOffsetParent ? mainAxis === "y" ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; + var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0; + var tetherMin = offset2 + minOffset - offsetModifierValue - clientOffset; + var tetherMax = offset2 + maxOffset - offsetModifierValue; + var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset2, tether ? max(max$1, tetherMax) : max$1); + popperOffsets2[mainAxis] = preventedOffset; + data[mainAxis] = preventedOffset - offset2; + } + if (checkAltAxis) { + var _offsetModifierState$2; + var _mainSide = mainAxis === "x" ? top : left; + var _altSide = mainAxis === "x" ? bottom : right; + var _offset = popperOffsets2[altAxis]; + var _len = altAxis === "y" ? "height" : "width"; + var _min = _offset + overflow[_mainSide]; + var _max = _offset - overflow[_altSide]; + var isOriginSide = [top, left].indexOf(basePlacement) !== -1; + var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0; + var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis; + var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max; + var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max); + popperOffsets2[altAxis] = _preventedOffset; + data[altAxis] = _preventedOffset - _offset; + } + state.modifiersData[name] = data; + } + var preventOverflow$1 = { + name: "preventOverflow", + enabled: true, + phase: "main", + fn: preventOverflow, + requiresIfExists: ["offset"] + }; + var toPaddingObject = function toPaddingObject2(padding, state) { + padding = typeof padding === "function" ? padding(Object.assign({}, state.rects, { + placement: state.placement + })) : padding; + return mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements)); + }; + function arrow(_ref) { + var _state$modifiersData$; + var state = _ref.state, name = _ref.name, options = _ref.options; + var arrowElement = state.elements.arrow; + var popperOffsets2 = state.modifiersData.popperOffsets; + var basePlacement = getBasePlacement(state.placement); + var axis = getMainAxisFromPlacement(basePlacement); + var isVertical = [left, right].indexOf(basePlacement) >= 0; + var len = isVertical ? "height" : "width"; + if (!arrowElement || !popperOffsets2) { + return; + } + var paddingObject = toPaddingObject(options.padding, state); + var arrowRect = getLayoutRect(arrowElement); + var minProp = axis === "y" ? top : left; + var maxProp = axis === "y" ? bottom : right; + var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets2[axis] - state.rects.popper[len]; + var startDiff = popperOffsets2[axis] - state.rects.reference[axis]; + var arrowOffsetParent = getOffsetParent(arrowElement); + var clientSize = arrowOffsetParent ? axis === "y" ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0; + var centerToReference = endDiff / 2 - startDiff / 2; + var min2 = paddingObject[minProp]; + var max2 = clientSize - arrowRect[len] - paddingObject[maxProp]; + var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference; + var offset2 = within(min2, center, max2); + var axisProp = axis; + state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset2, _state$modifiersData$.centerOffset = offset2 - center, _state$modifiersData$); + } + function effect(_ref2) { + var state = _ref2.state, options = _ref2.options; + var _options$element = options.element, arrowElement = _options$element === void 0 ? "[data-popper-arrow]" : _options$element; + if (arrowElement == null) { + return; + } + if (typeof arrowElement === "string") { + arrowElement = state.elements.popper.querySelector(arrowElement); + if (!arrowElement) { + return; + } + } + if (true) { + if (!isHTMLElement(arrowElement)) { + console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', "To use an SVG arrow, wrap it in an HTMLElement that will be used as", "the arrow."].join(" ")); + } + } + if (!contains(state.elements.popper, arrowElement)) { + if (true) { + console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" ")); + } + return; + } + state.elements.arrow = arrowElement; + } + var arrow$1 = { + name: "arrow", + enabled: true, + phase: "main", + fn: arrow, + effect, + requires: ["popperOffsets"], + requiresIfExists: ["preventOverflow"] + }; + function getSideOffsets(overflow, rect, preventedOffsets) { + if (preventedOffsets === void 0) { + preventedOffsets = { + x: 0, + y: 0 + }; + } + return { + top: overflow.top - rect.height - preventedOffsets.y, + right: overflow.right - rect.width + preventedOffsets.x, + bottom: overflow.bottom - rect.height + preventedOffsets.y, + left: overflow.left - rect.width - preventedOffsets.x + }; + } + function isAnySideFullyClipped(overflow) { + return [top, right, bottom, left].some(function(side) { + return overflow[side] >= 0; + }); + } + function hide(_ref) { + var state = _ref.state, name = _ref.name; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var preventedOffsets = state.modifiersData.preventOverflow; + var referenceOverflow = detectOverflow(state, { + elementContext: "reference" + }); + var popperAltOverflow = detectOverflow(state, { + altBoundary: true + }); + var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect); + var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets); + var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets); + var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); + state.modifiersData[name] = { + referenceClippingOffsets, + popperEscapeOffsets, + isReferenceHidden, + hasPopperEscaped + }; + state.attributes.popper = Object.assign({}, state.attributes.popper, { + "data-popper-reference-hidden": isReferenceHidden, + "data-popper-escaped": hasPopperEscaped + }); + } + var hide$1 = { + name: "hide", + enabled: true, + phase: "main", + requiresIfExists: ["preventOverflow"], + fn: hide + }; + var defaultModifiers$1 = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1]; + var createPopper$1 = /* @__PURE__ */ popperGenerator({ + defaultModifiers: defaultModifiers$1 + }); + var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1]; + var createPopper2 = /* @__PURE__ */ popperGenerator({ + defaultModifiers + }); + exports.applyStyles = applyStyles$1; + exports.arrow = arrow$1; + exports.computeStyles = computeStyles$1; + exports.createPopper = createPopper2; + exports.createPopperLite = createPopper$1; + exports.defaultModifiers = defaultModifiers; + exports.detectOverflow = detectOverflow; + exports.eventListeners = eventListeners; + exports.flip = flip$1; + exports.hide = hide$1; + exports.offset = offset$1; + exports.popperGenerator = popperGenerator; + exports.popperOffsets = popperOffsets$1; + exports.preventOverflow = preventOverflow$1; + } + }); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/data.js + var elementMap = /* @__PURE__ */ new Map(); + var data_default = { + set(element, key, instance) { + if (!elementMap.has(element)) { + elementMap.set(element, /* @__PURE__ */ new Map()); + } + const instanceMap = elementMap.get(element); + if (!instanceMap.has(key) && instanceMap.size !== 0) { + console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`); + return; + } + instanceMap.set(key, instance); + }, + get(element, key) { + if (elementMap.has(element)) { + return elementMap.get(element).get(key) || null; + } + return null; + }, + remove(element, key) { + if (!elementMap.has(element)) { + return; + } + const instanceMap = elementMap.get(element); + instanceMap.delete(key); + if (instanceMap.size === 0) { + elementMap.delete(element); + } + } + }; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/index.js + var MAX_UID = 1e6; + var MILLISECONDS_MULTIPLIER = 1e3; + var TRANSITION_END = "transitionend"; + var parseSelector = (selector) => { + if (selector && window.CSS && window.CSS.escape) { + selector = selector.replace(/#([^\s"#']+)/g, (match, id) => `#${CSS.escape(id)}`); + } + return selector; + }; + var toType = (object) => { + if (object === null || object === void 0) { + return `${object}`; + } + return Object.prototype.toString.call(object).match(/\s([a-z]+)/i)[1].toLowerCase(); + }; + var getUID = (prefix) => { + do { + prefix += Math.floor(Math.random() * MAX_UID); + } while (document.getElementById(prefix)); + return prefix; + }; + var getTransitionDurationFromElement = (element) => { + if (!element) { + return 0; + } + let { transitionDuration, transitionDelay } = window.getComputedStyle(element); + const floatTransitionDuration = Number.parseFloat(transitionDuration); + const floatTransitionDelay = Number.parseFloat(transitionDelay); + if (!floatTransitionDuration && !floatTransitionDelay) { + return 0; + } + transitionDuration = transitionDuration.split(",")[0]; + transitionDelay = transitionDelay.split(",")[0]; + return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; + }; + var triggerTransitionEnd = (element) => { + element.dispatchEvent(new Event(TRANSITION_END)); + }; + var isElement = (object) => { + if (!object || typeof object !== "object") { + return false; + } + if (typeof object.jquery !== "undefined") { + object = object[0]; + } + return typeof object.nodeType !== "undefined"; + }; + var getElement = (object) => { + if (isElement(object)) { + return object.jquery ? object[0] : object; + } + if (typeof object === "string" && object.length > 0) { + return document.querySelector(parseSelector(object)); + } + return null; + }; + var isVisible = (element) => { + if (!isElement(element) || element.getClientRects().length === 0) { + return false; + } + const elementIsVisible = getComputedStyle(element).getPropertyValue("visibility") === "visible"; + const closedDetails = element.closest("details:not([open])"); + if (!closedDetails) { + return elementIsVisible; + } + if (closedDetails !== element) { + const summary = element.closest("summary"); + if (summary && summary.parentNode !== closedDetails) { + return false; + } + if (summary === null) { + return false; + } + } + return elementIsVisible; + }; + var isDisabled = (element) => { + if (!element || element.nodeType !== Node.ELEMENT_NODE) { + return true; + } + if (element.classList.contains("disabled")) { + return true; + } + if (typeof element.disabled !== "undefined") { + return element.disabled; + } + return element.hasAttribute("disabled") && element.getAttribute("disabled") !== "false"; + }; + var findShadowRoot = (element) => { + if (!document.documentElement.attachShadow) { + return null; + } + if (typeof element.getRootNode === "function") { + const root = element.getRootNode(); + return root instanceof ShadowRoot ? root : null; + } + if (element instanceof ShadowRoot) { + return element; + } + if (!element.parentNode) { + return null; + } + return findShadowRoot(element.parentNode); + }; + var noop = () => { + }; + var reflow = (element) => { + element.offsetHeight; + }; + var getjQuery = () => { + if (window.jQuery && !document.body.hasAttribute("data-bs-no-jquery")) { + return window.jQuery; + } + return null; + }; + var DOMContentLoadedCallbacks = []; + var onDOMContentLoaded = (callback) => { + if (document.readyState === "loading") { + if (!DOMContentLoadedCallbacks.length) { + document.addEventListener("DOMContentLoaded", () => { + for (const callback2 of DOMContentLoadedCallbacks) { + callback2(); + } + }); + } + DOMContentLoadedCallbacks.push(callback); + } else { + callback(); + } + }; + var isRTL = () => document.documentElement.dir === "rtl"; + var defineJQueryPlugin = (plugin) => { + onDOMContentLoaded(() => { + const $ = getjQuery(); + if ($) { + const name = plugin.NAME; + const JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; + $.fn[name].noConflict = () => { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; + } + }); + }; + var execute = (possibleCallback, args = [], defaultValue = possibleCallback) => { + return typeof possibleCallback === "function" ? possibleCallback.call(...args) : defaultValue; + }; + var executeAfterTransition = (callback, transitionElement, waitForTransition = true) => { + if (!waitForTransition) { + execute(callback); + return; + } + const durationPadding = 5; + const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding; + let called = false; + const handler = ({ target }) => { + if (target !== transitionElement) { + return; + } + called = true; + transitionElement.removeEventListener(TRANSITION_END, handler); + execute(callback); + }; + transitionElement.addEventListener(TRANSITION_END, handler); + setTimeout(() => { + if (!called) { + triggerTransitionEnd(transitionElement); + } + }, emulatedDuration); + }; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/event-handler.js + var namespaceRegex = /[^.]*(?=\..*)\.|.*/; + var stripNameRegex = /\..*/; + var stripUidRegex = /::\d+$/; + var eventRegistry = {}; + var uidEvent = 1; + var customEvents = { + mouseenter: "mouseover", + mouseleave: "mouseout" + }; + var nativeEvents = /* @__PURE__ */ new Set([ + "click", + "dblclick", + "mouseup", + "mousedown", + "contextmenu", + "mousewheel", + "DOMMouseScroll", + "mouseover", + "mouseout", + "mousemove", + "selectstart", + "selectend", + "keydown", + "keypress", + "keyup", + "orientationchange", + "touchstart", + "touchmove", + "touchend", + "touchcancel", + "pointerdown", + "pointermove", + "pointerup", + "pointerleave", + "pointercancel", + "gesturestart", + "gesturechange", + "gestureend", + "focus", + "blur", + "change", + "reset", + "select", + "submit", + "focusin", + "focusout", + "load", + "unload", + "beforeunload", + "resize", + "move", + "DOMContentLoaded", + "readystatechange", + "error", + "abort", + "scroll" + ]); + function makeEventUid(element, uid) { + return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++; + } + function getElementEvents(element) { + const uid = makeEventUid(element); + element.uidEvent = uid; + eventRegistry[uid] = eventRegistry[uid] || {}; + return eventRegistry[uid]; + } + function bootstrapHandler(element, fn) { + return function handler(event) { + hydrateObj(event, { delegateTarget: element }); + if (handler.oneOff) { + EventHandler.off(element, event.type, fn); + } + return fn.apply(element, [event]); + }; + } + function bootstrapDelegationHandler(element, selector, fn) { + return function handler(event) { + const domElements = element.querySelectorAll(selector); + for (let { target } = event; target && target !== this; target = target.parentNode) { + for (const domElement of domElements) { + if (domElement !== target) { + continue; + } + hydrateObj(event, { delegateTarget: target }); + if (handler.oneOff) { + EventHandler.off(element, event.type, selector, fn); + } + return fn.apply(target, [event]); + } + } + }; + } + function findHandler(events, callable, delegationSelector = null) { + return Object.values(events).find((event) => event.callable === callable && event.delegationSelector === delegationSelector); + } + function normalizeParameters(originalTypeEvent, handler, delegationFunction) { + const isDelegated = typeof handler === "string"; + const callable = isDelegated ? delegationFunction : handler || delegationFunction; + let typeEvent = getTypeEvent(originalTypeEvent); + if (!nativeEvents.has(typeEvent)) { + typeEvent = originalTypeEvent; + } + return [isDelegated, callable, typeEvent]; + } + function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) { + if (typeof originalTypeEvent !== "string" || !element) { + return; + } + let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); + if (originalTypeEvent in customEvents) { + const wrapFunction = (fn2) => { + return function(event) { + if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) { + return fn2.call(this, event); + } + }; + }; + callable = wrapFunction(callable); + } + const events = getElementEvents(element); + const handlers = events[typeEvent] || (events[typeEvent] = {}); + const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null); + if (previousFunction) { + previousFunction.oneOff = previousFunction.oneOff && oneOff; + return; + } + const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, "")); + const fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable); + fn.delegationSelector = isDelegated ? handler : null; + fn.callable = callable; + fn.oneOff = oneOff; + fn.uidEvent = uid; + handlers[uid] = fn; + element.addEventListener(typeEvent, fn, isDelegated); + } + function removeHandler(element, events, typeEvent, handler, delegationSelector) { + const fn = findHandler(events[typeEvent], handler, delegationSelector); + if (!fn) { + return; + } + element.removeEventListener(typeEvent, fn, Boolean(delegationSelector)); + delete events[typeEvent][fn.uidEvent]; + } + function removeNamespacedHandlers(element, events, typeEvent, namespace) { + const storeElementEvent = events[typeEvent] || {}; + for (const [handlerKey, event] of Object.entries(storeElementEvent)) { + if (handlerKey.includes(namespace)) { + removeHandler(element, events, typeEvent, event.callable, event.delegationSelector); + } + } + } + function getTypeEvent(event) { + event = event.replace(stripNameRegex, ""); + return customEvents[event] || event; + } + var EventHandler = { + on(element, event, handler, delegationFunction) { + addHandler(element, event, handler, delegationFunction, false); + }, + one(element, event, handler, delegationFunction) { + addHandler(element, event, handler, delegationFunction, true); + }, + off(element, originalTypeEvent, handler, delegationFunction) { + if (typeof originalTypeEvent !== "string" || !element) { + return; + } + const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); + const inNamespace = typeEvent !== originalTypeEvent; + const events = getElementEvents(element); + const storeElementEvent = events[typeEvent] || {}; + const isNamespace = originalTypeEvent.startsWith("."); + if (typeof callable !== "undefined") { + if (!Object.keys(storeElementEvent).length) { + return; + } + removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null); + return; + } + if (isNamespace) { + for (const elementEvent of Object.keys(events)) { + removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1)); + } + } + for (const [keyHandlers, event] of Object.entries(storeElementEvent)) { + const handlerKey = keyHandlers.replace(stripUidRegex, ""); + if (!inNamespace || originalTypeEvent.includes(handlerKey)) { + removeHandler(element, events, typeEvent, event.callable, event.delegationSelector); + } + } + }, + trigger(element, event, args) { + if (typeof event !== "string" || !element) { + return null; + } + const $ = getjQuery(); + const typeEvent = getTypeEvent(event); + const inNamespace = event !== typeEvent; + let jQueryEvent = null; + let bubbles = true; + let nativeDispatch = true; + let defaultPrevented = false; + if (inNamespace && $) { + jQueryEvent = $.Event(event, args); + $(element).trigger(jQueryEvent); + bubbles = !jQueryEvent.isPropagationStopped(); + nativeDispatch = !jQueryEvent.isImmediatePropagationStopped(); + defaultPrevented = jQueryEvent.isDefaultPrevented(); + } + const evt = hydrateObj(new Event(event, { bubbles, cancelable: true }), args); + if (defaultPrevented) { + evt.preventDefault(); + } + if (nativeDispatch) { + element.dispatchEvent(evt); + } + if (evt.defaultPrevented && jQueryEvent) { + jQueryEvent.preventDefault(); + } + return evt; + } + }; + function hydrateObj(obj, meta = {}) { + for (const [key, value] of Object.entries(meta)) { + try { + obj[key] = value; + } catch (e) { + Object.defineProperty(obj, key, { + configurable: true, + get() { + return value; + } + }); + } + } + return obj; + } + var event_handler_default = EventHandler; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/manipulator.js + function normalizeData(value) { + if (value === "true") { + return true; + } + if (value === "false") { + return false; + } + if (value === Number(value).toString()) { + return Number(value); + } + if (value === "" || value === "null") { + return null; + } + if (typeof value !== "string") { + return value; + } + try { + return JSON.parse(decodeURIComponent(value)); + } catch (e) { + return value; + } + } + function normalizeDataKey(key) { + return key.replace(/[A-Z]/g, (chr) => `-${chr.toLowerCase()}`); + } + var Manipulator = { + setDataAttribute(element, key, value) { + element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value); + }, + removeDataAttribute(element, key) { + element.removeAttribute(`data-bs-${normalizeDataKey(key)}`); + }, + getDataAttributes(element) { + if (!element) { + return {}; + } + const attributes = {}; + const bsKeys = Object.keys(element.dataset).filter((key) => key.startsWith("bs") && !key.startsWith("bsConfig")); + for (const key of bsKeys) { + let pureKey = key.replace(/^bs/, ""); + pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1); + attributes[pureKey] = normalizeData(element.dataset[key]); + } + return attributes; + }, + getDataAttribute(element, key) { + return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`)); + } + }; + var manipulator_default = Manipulator; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/config.js + var Config = class { + // Getters + static get Default() { + return {}; + } + static get DefaultType() { + return {}; + } + static get NAME() { + throw new Error('You have to implement the static method "NAME", for each component!'); + } + _getConfig(config) { + config = this._mergeConfigObj(config); + config = this._configAfterMerge(config); + this._typeCheckConfig(config); + return config; + } + _configAfterMerge(config) { + return config; + } + _mergeConfigObj(config, element) { + const jsonConfig = isElement(element) ? manipulator_default.getDataAttribute(element, "config") : {}; + return __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, this.constructor.Default), typeof jsonConfig === "object" ? jsonConfig : {}), isElement(element) ? manipulator_default.getDataAttributes(element) : {}), typeof config === "object" ? config : {}); + } + _typeCheckConfig(config, configTypes = this.constructor.DefaultType) { + for (const [property, expectedTypes] of Object.entries(configTypes)) { + const value = config[property]; + const valueType = isElement(value) ? "element" : toType(value); + if (!new RegExp(expectedTypes).test(valueType)) { + throw new TypeError( + `${this.constructor.NAME.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".` + ); + } + } + } + }; + var config_default = Config; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/base-component.js + var VERSION = "5.3.8"; + var BaseComponent = class extends config_default { + constructor(element, config) { + super(); + element = getElement(element); + if (!element) { + return; + } + this._element = element; + this._config = this._getConfig(config); + data_default.set(this._element, this.constructor.DATA_KEY, this); + } + // Public + dispose() { + data_default.remove(this._element, this.constructor.DATA_KEY); + event_handler_default.off(this._element, this.constructor.EVENT_KEY); + for (const propertyName of Object.getOwnPropertyNames(this)) { + this[propertyName] = null; + } + } + // Private + _queueCallback(callback, element, isAnimated = true) { + executeAfterTransition(callback, element, isAnimated); + } + _getConfig(config) { + config = this._mergeConfigObj(config, this._element); + config = this._configAfterMerge(config); + this._typeCheckConfig(config); + return config; + } + // Static + static getInstance(element) { + return data_default.get(getElement(element), this.DATA_KEY); + } + static getOrCreateInstance(element, config = {}) { + return this.getInstance(element) || new this(element, typeof config === "object" ? config : null); + } + static get VERSION() { + return VERSION; + } + static get DATA_KEY() { + return `bs.${this.NAME}`; + } + static get EVENT_KEY() { + return `.${this.DATA_KEY}`; + } + static eventName(name) { + return `${name}${this.EVENT_KEY}`; + } + }; + var base_component_default = BaseComponent; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/selector-engine.js + var getSelector = (element) => { + let selector = element.getAttribute("data-bs-target"); + if (!selector || selector === "#") { + let hrefAttribute = element.getAttribute("href"); + if (!hrefAttribute || !hrefAttribute.includes("#") && !hrefAttribute.startsWith(".")) { + return null; + } + if (hrefAttribute.includes("#") && !hrefAttribute.startsWith("#")) { + hrefAttribute = `#${hrefAttribute.split("#")[1]}`; + } + selector = hrefAttribute && hrefAttribute !== "#" ? hrefAttribute.trim() : null; + } + return selector ? selector.split(",").map((sel) => parseSelector(sel)).join(",") : null; + }; + var SelectorEngine = { + find(selector, element = document.documentElement) { + return [].concat(...Element.prototype.querySelectorAll.call(element, selector)); + }, + findOne(selector, element = document.documentElement) { + return Element.prototype.querySelector.call(element, selector); + }, + children(element, selector) { + return [].concat(...element.children).filter((child) => child.matches(selector)); + }, + parents(element, selector) { + const parents = []; + let ancestor = element.parentNode.closest(selector); + while (ancestor) { + parents.push(ancestor); + ancestor = ancestor.parentNode.closest(selector); + } + return parents; + }, + prev(element, selector) { + let previous = element.previousElementSibling; + while (previous) { + if (previous.matches(selector)) { + return [previous]; + } + previous = previous.previousElementSibling; + } + return []; + }, + // TODO: this is now unused; remove later along with prev() + next(element, selector) { + let next = element.nextElementSibling; + while (next) { + if (next.matches(selector)) { + return [next]; + } + next = next.nextElementSibling; + } + return []; + }, + focusableChildren(element) { + const focusables = [ + "a", + "button", + "input", + "textarea", + "select", + "details", + "[tabindex]", + '[contenteditable="true"]' + ].map((selector) => `${selector}:not([tabindex^="-"])`).join(","); + return this.find(focusables, element).filter((el) => !isDisabled(el) && isVisible(el)); + }, + getSelectorFromElement(element) { + const selector = getSelector(element); + if (selector) { + return SelectorEngine.findOne(selector) ? selector : null; + } + return null; + }, + getElementFromSelector(element) { + const selector = getSelector(element); + return selector ? SelectorEngine.findOne(selector) : null; + }, + getMultipleElementsFromSelector(element) { + const selector = getSelector(element); + return selector ? SelectorEngine.find(selector) : []; + } + }; + var selector_engine_default = SelectorEngine; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/collapse.js + var NAME = "collapse"; + var DATA_KEY = "bs.collapse"; + var EVENT_KEY = `.${DATA_KEY}`; + var DATA_API_KEY = ".data-api"; + var EVENT_SHOW = `show${EVENT_KEY}`; + var EVENT_SHOWN = `shown${EVENT_KEY}`; + var EVENT_HIDE = `hide${EVENT_KEY}`; + var EVENT_HIDDEN = `hidden${EVENT_KEY}`; + var EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`; + var CLASS_NAME_SHOW = "show"; + var CLASS_NAME_COLLAPSE = "collapse"; + var CLASS_NAME_COLLAPSING = "collapsing"; + var CLASS_NAME_COLLAPSED = "collapsed"; + var CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`; + var CLASS_NAME_HORIZONTAL = "collapse-horizontal"; + var WIDTH = "width"; + var HEIGHT = "height"; + var SELECTOR_ACTIVES = ".collapse.show, .collapse.collapsing"; + var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]'; + var Default = { + parent: null, + toggle: true + }; + var DefaultType = { + parent: "(null|element)", + toggle: "boolean" + }; + var Collapse = class _Collapse extends base_component_default { + constructor(element, config) { + super(element, config); + this._isTransitioning = false; + this._triggerArray = []; + const toggleList = selector_engine_default.find(SELECTOR_DATA_TOGGLE); + for (const elem of toggleList) { + const selector = selector_engine_default.getSelectorFromElement(elem); + const filterElement = selector_engine_default.find(selector).filter((foundElement) => foundElement === this._element); + if (selector !== null && filterElement.length) { + this._triggerArray.push(elem); + } + } + this._initializeChildren(); + if (!this._config.parent) { + this._addAriaAndCollapsedClass(this._triggerArray, this._isShown()); + } + if (this._config.toggle) { + this.toggle(); + } + } + // Getters + static get Default() { + return Default; + } + static get DefaultType() { + return DefaultType; + } + static get NAME() { + return NAME; + } + // Public + toggle() { + if (this._isShown()) { + this.hide(); + } else { + this.show(); + } + } + show() { + if (this._isTransitioning || this._isShown()) { + return; + } + let activeChildren = []; + if (this._config.parent) { + activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter((element) => element !== this._element).map((element) => _Collapse.getOrCreateInstance(element, { toggle: false })); + } + if (activeChildren.length && activeChildren[0]._isTransitioning) { + return; + } + const startEvent = event_handler_default.trigger(this._element, EVENT_SHOW); + if (startEvent.defaultPrevented) { + return; + } + for (const activeInstance of activeChildren) { + activeInstance.hide(); + } + const dimension = this._getDimension(); + this._element.classList.remove(CLASS_NAME_COLLAPSE); + this._element.classList.add(CLASS_NAME_COLLAPSING); + this._element.style[dimension] = 0; + this._addAriaAndCollapsedClass(this._triggerArray, true); + this._isTransitioning = true; + const complete = () => { + this._isTransitioning = false; + this._element.classList.remove(CLASS_NAME_COLLAPSING); + this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW); + this._element.style[dimension] = ""; + event_handler_default.trigger(this._element, EVENT_SHOWN); + }; + const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); + const scrollSize = `scroll${capitalizedDimension}`; + this._queueCallback(complete, this._element, true); + this._element.style[dimension] = `${this._element[scrollSize]}px`; + } + hide() { + if (this._isTransitioning || !this._isShown()) { + return; + } + const startEvent = event_handler_default.trigger(this._element, EVENT_HIDE); + if (startEvent.defaultPrevented) { + return; + } + const dimension = this._getDimension(); + this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`; + reflow(this._element); + this._element.classList.add(CLASS_NAME_COLLAPSING); + this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW); + for (const trigger of this._triggerArray) { + const element = selector_engine_default.getElementFromSelector(trigger); + if (element && !this._isShown(element)) { + this._addAriaAndCollapsedClass([trigger], false); + } + } + this._isTransitioning = true; + const complete = () => { + this._isTransitioning = false; + this._element.classList.remove(CLASS_NAME_COLLAPSING); + this._element.classList.add(CLASS_NAME_COLLAPSE); + event_handler_default.trigger(this._element, EVENT_HIDDEN); + }; + this._element.style[dimension] = ""; + this._queueCallback(complete, this._element, true); + } + // Private + _isShown(element = this._element) { + return element.classList.contains(CLASS_NAME_SHOW); + } + _configAfterMerge(config) { + config.toggle = Boolean(config.toggle); + config.parent = getElement(config.parent); + return config; + } + _getDimension() { + return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT; + } + _initializeChildren() { + if (!this._config.parent) { + return; + } + const children2 = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE); + for (const element of children2) { + const selected = selector_engine_default.getElementFromSelector(element); + if (selected) { + this._addAriaAndCollapsedClass([element], this._isShown(selected)); + } + } + } + _getFirstLevelChildren(selector) { + const children2 = selector_engine_default.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent); + return selector_engine_default.find(selector, this._config.parent).filter((element) => !children2.includes(element)); + } + _addAriaAndCollapsedClass(triggerArray, isOpen) { + if (!triggerArray.length) { + return; + } + for (const element of triggerArray) { + element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen); + element.setAttribute("aria-expanded", isOpen); + } + } + // Static + static jQueryInterface(config) { + const _config = {}; + if (typeof config === "string" && /show|hide/.test(config)) { + _config.toggle = false; + } + return this.each(function() { + const data = _Collapse.getOrCreateInstance(this, _config); + if (typeof config === "string") { + if (typeof data[config] === "undefined") { + throw new TypeError(`No method named "${config}"`); + } + data[config](); + } + }); + } + }; + event_handler_default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function(event) { + if (event.target.tagName === "A" || event.delegateTarget && event.delegateTarget.tagName === "A") { + event.preventDefault(); + } + for (const element of selector_engine_default.getMultipleElementsFromSelector(this)) { + Collapse.getOrCreateInstance(element, { toggle: false }).toggle(); + } + }); + defineJQueryPlugin(Collapse); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/category-collapse.js + var children = document.getElementsByClassName("collapse"); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/tooltip.js + var Popper = __toESM(require_popper()); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/sanitizer.js + var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i; + var DefaultAllowlist = { + // Global attributes allowed on any supplied element below. + "*": ["class", "dir", "id", "lang", "role", ARIA_ATTRIBUTE_PATTERN], + a: ["target", "href", "title", "rel"], + area: [], + b: [], + br: [], + col: [], + code: [], + dd: [], + div: [], + dl: [], + dt: [], + em: [], + hr: [], + h1: [], + h2: [], + h3: [], + h4: [], + h5: [], + h6: [], + i: [], + img: ["src", "srcset", "alt", "title", "width", "height"], + li: [], + ol: [], + p: [], + pre: [], + s: [], + small: [], + span: [], + sub: [], + sup: [], + strong: [], + u: [], + ul: [] + }; + var uriAttributes = /* @__PURE__ */ new Set([ + "background", + "cite", + "href", + "itemtype", + "longdesc", + "poster", + "src", + "xlink:href" + ]); + var SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i; + var allowedAttribute = (attribute, allowedAttributeList) => { + const attributeName = attribute.nodeName.toLowerCase(); + if (allowedAttributeList.includes(attributeName)) { + if (uriAttributes.has(attributeName)) { + return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue)); + } + return true; + } + return allowedAttributeList.filter((attributeRegex) => attributeRegex instanceof RegExp).some((regex) => regex.test(attributeName)); + }; + function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) { + if (!unsafeHtml.length) { + return unsafeHtml; + } + if (sanitizeFunction && typeof sanitizeFunction === "function") { + return sanitizeFunction(unsafeHtml); + } + const domParser = new window.DOMParser(); + const createdDocument = domParser.parseFromString(unsafeHtml, "text/html"); + const elements = [].concat(...createdDocument.body.querySelectorAll("*")); + for (const element of elements) { + const elementName = element.nodeName.toLowerCase(); + if (!Object.keys(allowList).includes(elementName)) { + element.remove(); + continue; + } + const attributeList = [].concat(...element.attributes); + const allowedAttributes = [].concat(allowList["*"] || [], allowList[elementName] || []); + for (const attribute of attributeList) { + if (!allowedAttribute(attribute, allowedAttributes)) { + element.removeAttribute(attribute.nodeName); + } + } + } + return createdDocument.body.innerHTML; + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/template-factory.js + var NAME2 = "TemplateFactory"; + var Default2 = { + allowList: DefaultAllowlist, + content: {}, + // { selector : text , selector2 : text2 , } + extraClass: "", + html: false, + sanitize: true, + sanitizeFn: null, + template: "
" + }; + var DefaultType2 = { + allowList: "object", + content: "object", + extraClass: "(string|function)", + html: "boolean", + sanitize: "boolean", + sanitizeFn: "(null|function)", + template: "string" + }; + var DefaultContentType = { + entry: "(string|element|function|null)", + selector: "(string|element)" + }; + var TemplateFactory = class extends config_default { + constructor(config) { + super(); + this._config = this._getConfig(config); + } + // Getters + static get Default() { + return Default2; + } + static get DefaultType() { + return DefaultType2; + } + static get NAME() { + return NAME2; + } + // Public + getContent() { + return Object.values(this._config.content).map((config) => this._resolvePossibleFunction(config)).filter(Boolean); + } + hasContent() { + return this.getContent().length > 0; + } + changeContent(content2) { + this._checkContent(content2); + this._config.content = __spreadValues(__spreadValues({}, this._config.content), content2); + return this; + } + toHtml() { + const templateWrapper = document.createElement("div"); + templateWrapper.innerHTML = this._maybeSanitize(this._config.template); + for (const [selector, text] of Object.entries(this._config.content)) { + this._setContent(templateWrapper, text, selector); + } + const template = templateWrapper.children[0]; + const extraClass = this._resolvePossibleFunction(this._config.extraClass); + if (extraClass) { + template.classList.add(...extraClass.split(" ")); + } + return template; + } + // Private + _typeCheckConfig(config) { + super._typeCheckConfig(config); + this._checkContent(config.content); + } + _checkContent(arg) { + for (const [selector, content2] of Object.entries(arg)) { + super._typeCheckConfig({ selector, entry: content2 }, DefaultContentType); + } + } + _setContent(template, content2, selector) { + const templateElement = selector_engine_default.findOne(selector, template); + if (!templateElement) { + return; + } + content2 = this._resolvePossibleFunction(content2); + if (!content2) { + templateElement.remove(); + return; + } + if (isElement(content2)) { + this._putElementInTemplate(getElement(content2), templateElement); + return; + } + if (this._config.html) { + templateElement.innerHTML = this._maybeSanitize(content2); + return; + } + templateElement.textContent = content2; + } + _maybeSanitize(arg) { + return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg; + } + _resolvePossibleFunction(arg) { + return execute(arg, [void 0, this]); + } + _putElementInTemplate(element, templateElement) { + if (this._config.html) { + templateElement.innerHTML = ""; + templateElement.append(element); + return; + } + templateElement.textContent = element.textContent; + } + }; + var template_factory_default = TemplateFactory; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/tooltip.js + var NAME3 = "tooltip"; + var DISALLOWED_ATTRIBUTES = /* @__PURE__ */ new Set(["sanitize", "allowList", "sanitizeFn"]); + var CLASS_NAME_FADE = "fade"; + var CLASS_NAME_MODAL = "modal"; + var CLASS_NAME_SHOW2 = "show"; + var SELECTOR_TOOLTIP_INNER = ".tooltip-inner"; + var SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`; + var EVENT_MODAL_HIDE = "hide.bs.modal"; + var TRIGGER_HOVER = "hover"; + var TRIGGER_FOCUS = "focus"; + var TRIGGER_CLICK = "click"; + var TRIGGER_MANUAL = "manual"; + var EVENT_HIDE2 = "hide"; + var EVENT_HIDDEN2 = "hidden"; + var EVENT_SHOW2 = "show"; + var EVENT_SHOWN2 = "shown"; + var EVENT_INSERTED = "inserted"; + var EVENT_CLICK = "click"; + var EVENT_FOCUSIN = "focusin"; + var EVENT_FOCUSOUT = "focusout"; + var EVENT_MOUSEENTER = "mouseenter"; + var EVENT_MOUSELEAVE = "mouseleave"; + var AttachmentMap = { + AUTO: "auto", + TOP: "top", + RIGHT: isRTL() ? "left" : "right", + BOTTOM: "bottom", + LEFT: isRTL() ? "right" : "left" + }; + var Default3 = { + allowList: DefaultAllowlist, + animation: true, + boundary: "clippingParents", + container: false, + customClass: "", + delay: 0, + fallbackPlacements: ["top", "right", "bottom", "left"], + html: false, + offset: [0, 6], + placement: "top", + popperConfig: null, + sanitize: true, + sanitizeFn: null, + selector: false, + template: '', + title: "", + trigger: "hover focus" + }; + var DefaultType3 = { + allowList: "object", + animation: "boolean", + boundary: "(string|element)", + container: "(string|element|boolean)", + customClass: "(string|function)", + delay: "(number|object)", + fallbackPlacements: "array", + html: "boolean", + offset: "(array|string|function)", + placement: "(string|function)", + popperConfig: "(null|object|function)", + sanitize: "boolean", + sanitizeFn: "(null|function)", + selector: "(string|boolean)", + template: "string", + title: "(string|element|function)", + trigger: "string" + }; + var Tooltip = class _Tooltip extends base_component_default { + constructor(element, config) { + if (typeof Popper === "undefined") { + throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)"); + } + super(element, config); + this._isEnabled = true; + this._timeout = 0; + this._isHovered = null; + this._activeTrigger = {}; + this._popper = null; + this._templateFactory = null; + this._newContent = null; + this.tip = null; + this._setListeners(); + if (!this._config.selector) { + this._fixTitle(); + } + } + // Getters + static get Default() { + return Default3; + } + static get DefaultType() { + return DefaultType3; + } + static get NAME() { + return NAME3; + } + // Public + enable() { + this._isEnabled = true; + } + disable() { + this._isEnabled = false; + } + toggleEnabled() { + this._isEnabled = !this._isEnabled; + } + toggle() { + if (!this._isEnabled) { + return; + } + if (this._isShown()) { + this._leave(); + return; + } + this._enter(); + } + dispose() { + clearTimeout(this._timeout); + event_handler_default.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler); + if (this._element.getAttribute("data-bs-original-title")) { + this._element.setAttribute("title", this._element.getAttribute("data-bs-original-title")); + } + this._disposePopper(); + super.dispose(); + } + show() { + if (this._element.style.display === "none") { + throw new Error("Please use show on visible elements"); + } + if (!(this._isWithContent() && this._isEnabled)) { + return; + } + const showEvent = event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_SHOW2)); + const shadowRoot = findShadowRoot(this._element); + const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element); + if (showEvent.defaultPrevented || !isInTheDom) { + return; + } + this._disposePopper(); + const tip = this._getTipElement(); + this._element.setAttribute("aria-describedby", tip.getAttribute("id")); + const { container } = this._config; + if (!this._element.ownerDocument.documentElement.contains(this.tip)) { + container.append(tip); + event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_INSERTED)); + } + this._popper = this._createPopper(tip); + tip.classList.add(CLASS_NAME_SHOW2); + if ("ontouchstart" in document.documentElement) { + for (const element of [].concat(...document.body.children)) { + event_handler_default.on(element, "mouseover", noop); + } + } + const complete = () => { + event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_SHOWN2)); + if (this._isHovered === false) { + this._leave(); + } + this._isHovered = false; + }; + this._queueCallback(complete, this.tip, this._isAnimated()); + } + hide() { + if (!this._isShown()) { + return; + } + const hideEvent = event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_HIDE2)); + if (hideEvent.defaultPrevented) { + return; + } + const tip = this._getTipElement(); + tip.classList.remove(CLASS_NAME_SHOW2); + if ("ontouchstart" in document.documentElement) { + for (const element of [].concat(...document.body.children)) { + event_handler_default.off(element, "mouseover", noop); + } + } + this._activeTrigger[TRIGGER_CLICK] = false; + this._activeTrigger[TRIGGER_FOCUS] = false; + this._activeTrigger[TRIGGER_HOVER] = false; + this._isHovered = null; + const complete = () => { + if (this._isWithActiveTrigger()) { + return; + } + if (!this._isHovered) { + this._disposePopper(); + } + this._element.removeAttribute("aria-describedby"); + event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN2)); + }; + this._queueCallback(complete, this.tip, this._isAnimated()); + } + update() { + if (this._popper) { + this._popper.update(); + } + } + // Protected + _isWithContent() { + return Boolean(this._getTitle()); + } + _getTipElement() { + if (!this.tip) { + this.tip = this._createTipElement(this._newContent || this._getContentForTemplate()); + } + return this.tip; + } + _createTipElement(content2) { + const tip = this._getTemplateFactory(content2).toHtml(); + if (!tip) { + return null; + } + tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW2); + tip.classList.add(`bs-${this.constructor.NAME}-auto`); + const tipId = getUID(this.constructor.NAME).toString(); + tip.setAttribute("id", tipId); + if (this._isAnimated()) { + tip.classList.add(CLASS_NAME_FADE); + } + return tip; + } + setContent(content2) { + this._newContent = content2; + if (this._isShown()) { + this._disposePopper(); + this.show(); + } + } + _getTemplateFactory(content2) { + if (this._templateFactory) { + this._templateFactory.changeContent(content2); + } else { + this._templateFactory = new template_factory_default(__spreadProps(__spreadValues({}, this._config), { + // the `content` var has to be after `this._config` + // to override config.content in case of popover + content: content2, + extraClass: this._resolvePossibleFunction(this._config.customClass) + })); + } + return this._templateFactory; + } + _getContentForTemplate() { + return { + [SELECTOR_TOOLTIP_INNER]: this._getTitle() + }; + } + _getTitle() { + return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute("data-bs-original-title"); + } + // Private + _initializeOnDelegatedTarget(event) { + return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig()); + } + _isAnimated() { + return this._config.animation || this.tip && this.tip.classList.contains(CLASS_NAME_FADE); + } + _isShown() { + return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW2); + } + _createPopper(tip) { + const placement = execute(this._config.placement, [this, tip, this._element]); + const attachment = AttachmentMap[placement.toUpperCase()]; + return Popper.createPopper(this._element, tip, this._getPopperConfig(attachment)); + } + _getOffset() { + const { offset } = this._config; + if (typeof offset === "string") { + return offset.split(",").map((value) => Number.parseInt(value, 10)); + } + if (typeof offset === "function") { + return (popperData) => offset(popperData, this._element); + } + return offset; + } + _resolvePossibleFunction(arg) { + return execute(arg, [this._element, this._element]); + } + _getPopperConfig(attachment) { + const defaultBsPopperConfig = { + placement: attachment, + modifiers: [ + { + name: "flip", + options: { + fallbackPlacements: this._config.fallbackPlacements + } + }, + { + name: "offset", + options: { + offset: this._getOffset() + } + }, + { + name: "preventOverflow", + options: { + boundary: this._config.boundary + } + }, + { + name: "arrow", + options: { + element: `.${this.constructor.NAME}-arrow` + } + }, + { + name: "preSetPlacement", + enabled: true, + phase: "beforeMain", + fn: (data) => { + this._getTipElement().setAttribute("data-popper-placement", data.state.placement); + } + } + ] + }; + return __spreadValues(__spreadValues({}, defaultBsPopperConfig), execute(this._config.popperConfig, [void 0, defaultBsPopperConfig])); + } + _setListeners() { + const triggers = this._config.trigger.split(" "); + for (const trigger of triggers) { + if (trigger === "click") { + event_handler_default.on(this._element, this.constructor.eventName(EVENT_CLICK), this._config.selector, (event) => { + const context = this._initializeOnDelegatedTarget(event); + context._activeTrigger[TRIGGER_CLICK] = !(context._isShown() && context._activeTrigger[TRIGGER_CLICK]); + context.toggle(); + }); + } else if (trigger !== TRIGGER_MANUAL) { + const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN); + const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT); + event_handler_default.on(this._element, eventIn, this._config.selector, (event) => { + const context = this._initializeOnDelegatedTarget(event); + context._activeTrigger[event.type === "focusin" ? TRIGGER_FOCUS : TRIGGER_HOVER] = true; + context._enter(); + }); + event_handler_default.on(this._element, eventOut, this._config.selector, (event) => { + const context = this._initializeOnDelegatedTarget(event); + context._activeTrigger[event.type === "focusout" ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget); + context._leave(); + }); + } + } + this._hideModalHandler = () => { + if (this._element) { + this.hide(); + } + }; + event_handler_default.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler); + } + _fixTitle() { + const title = this._element.getAttribute("title"); + if (!title) { + return; + } + if (!this._element.getAttribute("aria-label") && !this._element.textContent.trim()) { + this._element.setAttribute("aria-label", title); + } + this._element.setAttribute("data-bs-original-title", title); + this._element.removeAttribute("title"); + } + _enter() { + if (this._isShown() || this._isHovered) { + this._isHovered = true; + return; + } + this._isHovered = true; + this._setTimeout(() => { + if (this._isHovered) { + this.show(); + } + }, this._config.delay.show); + } + _leave() { + if (this._isWithActiveTrigger()) { + return; + } + this._isHovered = false; + this._setTimeout(() => { + if (!this._isHovered) { + this.hide(); + } + }, this._config.delay.hide); + } + _setTimeout(handler, timeout) { + clearTimeout(this._timeout); + this._timeout = setTimeout(handler, timeout); + } + _isWithActiveTrigger() { + return Object.values(this._activeTrigger).includes(true); + } + _getConfig(config) { + const dataAttributes = manipulator_default.getDataAttributes(this._element); + for (const dataAttribute of Object.keys(dataAttributes)) { + if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) { + delete dataAttributes[dataAttribute]; + } + } + config = __spreadValues(__spreadValues({}, dataAttributes), typeof config === "object" && config ? config : {}); + config = this._mergeConfigObj(config); + config = this._configAfterMerge(config); + this._typeCheckConfig(config); + return config; + } + _configAfterMerge(config) { + config.container = config.container === false ? document.body : getElement(config.container); + if (typeof config.delay === "number") { + config.delay = { + show: config.delay, + hide: config.delay + }; + } + if (typeof config.title === "number") { + config.title = config.title.toString(); + } + if (typeof config.content === "number") { + config.content = config.content.toString(); + } + return config; + } + _getDelegateConfig() { + const config = {}; + for (const [key, value] of Object.entries(this._config)) { + if (this.constructor.Default[key] !== value) { + config[key] = value; + } + } + config.selector = false; + config.trigger = "manual"; + return config; + } + _disposePopper() { + if (this._popper) { + this._popper.destroy(); + this._popper = null; + } + if (this.tip) { + this.tip.remove(); + this.tip = null; + } + } + // Static + static jQueryInterface(config) { + return this.each(function() { + const data = _Tooltip.getOrCreateInstance(this, config); + if (typeof config !== "string") { + return; + } + if (typeof data[config] === "undefined") { + throw new TypeError(`No method named "${config}"`); + } + data[config](); + }); + } + }; + defineJQueryPlugin(Tooltip); + var tooltip_default = Tooltip; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/toc/toc-mobile.js + var $tocBar = document.getElementById("toc-bar"); + var $soloTrigger = document.getElementById("toc-solo-trigger"); + var $triggers = document.getElementsByClassName("toc-trigger"); + var $popup = document.getElementById("toc-popup"); + var $btnClose = document.getElementById("toc-popup-close"); + var SCROLL_LOCK = "overflow-hidden"; + var CLOSING = "closing"; + var _invisible, _barHeight; + var _TocMobile = class _TocMobile { + static initBar() { + const observer = new IntersectionObserver( + (entries) => { + entries.forEach((entry) => { + $tocBar.classList.toggle("invisible", entry.isIntersecting); + }); + }, + { rootMargin: `-${__privateGet(this, _barHeight)}px 0px 0px 0px` } + ); + observer.observe($soloTrigger); + __privateSet(this, _invisible, false); + } + static listenAnchors() { + const $anchors = document.getElementsByClassName("toc-link"); + [...$anchors].forEach((anchor) => { + anchor.onclick = () => this.hidePopup(); + }); + } + static refresh() { + if (__privateGet(this, _invisible)) { + this.initComponents(); + } + tocbot.refresh(this.options); + this.listenAnchors(); + } + static get popupOpened() { + return $popup.open; + } + static showPopup() { + this.lockScroll(true); + $popup.showModal(); + const activeItem = $popup.querySelector("li.is-active-li"); + activeItem.scrollIntoView({ block: "center" }); + } + static hidePopup() { + $popup.toggleAttribute(CLOSING); + $popup.addEventListener( + "animationend", + () => { + $popup.toggleAttribute(CLOSING); + $popup.close(); + }, + { once: true } + ); + this.lockScroll(false); + } + static lockScroll(enable) { + document.documentElement.classList.toggle(SCROLL_LOCK, enable); + document.body.classList.toggle(SCROLL_LOCK, enable); + } + static clickBackdrop(event) { + if ($popup.hasAttribute(CLOSING)) { + return; + } + const rect = event.target.getBoundingClientRect(); + if (event.clientX < rect.left || event.clientX > rect.right || event.clientY < rect.top || event.clientY > rect.bottom) { + this.hidePopup(); + } + } + static initComponents() { + this.initBar(); + [...$triggers].forEach((trigger) => { + trigger.onclick = () => this.showPopup(); + }); + $popup.onclick = (e) => this.clickBackdrop(e); + $btnClose.onclick = () => this.hidePopup(); + $popup.oncancel = (e) => { + e.preventDefault(); + this.hidePopup(); + }; + } + static init() { + tocbot.init(this.options); + this.listenAnchors(); + this.initComponents(); + } + }; + _invisible = new WeakMap(); + _barHeight = new WeakMap(); + __privateAdd(_TocMobile, _invisible, true); + __privateAdd(_TocMobile, _barHeight, 16 * 3); + // 3rem + __publicField(_TocMobile, "options", { + tocSelector: "#toc-popup-content", + contentSelector: ".content", + ignoreSelector: "[data-toc-skip]", + headingSelector: "h2, h3, h4", + orderedList: false, + scrollSmooth: false, + collapseDepth: 4, + headingsOffset: __privateGet(_TocMobile, _barHeight) + }); + var TocMobile = _TocMobile; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/toc/toc-desktop.js + var TocDesktop = class { + static refresh() { + tocbot.refresh(this.options); + } + static init() { + tocbot.init(this.options); + } + }; + /* Tocbot options Ref: https://github.com/tscanlin/tocbot#usage */ + __publicField(TocDesktop, "options", { + tocSelector: "#toc", + contentSelector: ".content", + ignoreSelector: "[data-toc-skip]", + headingSelector: "h2, h3, h4", + orderedList: false, + scrollSmooth: false, + headingsOffset: 16 * 2 + // 2rem + }); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/toc.js + var desktopMode = matchMedia("(min-width: 1200px)"); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/mermaid.js + var themeMapper = Theme.getThemeMapper("default", "dark"); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/mode-toggle.js + var $toggle = document.getElementById("mode-toggle"); + function modeWatcher() { + if (!$toggle) { + return; + } + $toggle.addEventListener("click", () => { + Theme.flip(); + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/back-to-top.js + function back2top() { + const btn = document.getElementById("back-to-top"); + window.addEventListener("scroll", () => { + if (window.scrollY > 50) { + btn.classList.add("show"); + } else { + btn.classList.remove("show"); + } + }); + btn.addEventListener("click", () => { + window.scrollTo({ top: 0 }); + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/tooltip-loader.js + function loadTooptip() { + const tooltipTriggerList = document.querySelectorAll( + '[data-bs-toggle="tooltip"]' + ); + [...tooltipTriggerList].map( + (tooltipTriggerEl) => new tooltip_default(tooltipTriggerEl) + ); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/layouts/basic.js + function basic() { + modeWatcher(); + back2top(); + loadTooptip(); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/layouts/sidebar.js + var ATTR_DISPLAY = "sidebar-display"; + var $sidebar = document.getElementById("sidebar"); + var $trigger = document.getElementById("sidebar-trigger"); + var $mask = document.getElementById("mask"); + var _isExpanded; + var SidebarUtil = class { + static toggle() { + __privateSet(this, _isExpanded, !__privateGet(this, _isExpanded)); + document.body.toggleAttribute(ATTR_DISPLAY, __privateGet(this, _isExpanded)); + $sidebar.classList.toggle("z-2", __privateGet(this, _isExpanded)); + $mask.classList.toggle("d-none", !__privateGet(this, _isExpanded)); + } + }; + _isExpanded = new WeakMap(); + __privateAdd(SidebarUtil, _isExpanded, false); + function initSidebar() { + $trigger.onclick = $mask.onclick = () => SidebarUtil.toggle(); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/search-display.js + var btnSbTrigger = document.getElementById("sidebar-trigger"); + var btnSearchTrigger = document.getElementById("search-trigger"); + var btnCancel = document.getElementById("search-cancel"); + var content = document.querySelectorAll("#main-wrapper>.container>.row"); + var topbarTitle = document.getElementById("topbar-title"); + var search = document.getElementById("search"); + var resultWrapper = document.getElementById("search-result-wrapper"); + var results = document.getElementById("search-results"); + var input = document.getElementById("search-input"); + var hints = document.getElementById("search-hints"); + var LOADED = "d-block"; + var UNLOADED = "d-none"; + var FOCUS = "input-focus"; + var FLEX = "d-flex"; + var MobileSearchBar = class { + static on() { + btnSbTrigger.classList.add(UNLOADED); + topbarTitle.classList.add(UNLOADED); + btnSearchTrigger.classList.add(UNLOADED); + search.classList.add(FLEX); + btnCancel.classList.add(LOADED); + } + static off() { + btnCancel.classList.remove(LOADED); + search.classList.remove(FLEX); + btnSbTrigger.classList.remove(UNLOADED); + topbarTitle.classList.remove(UNLOADED); + btnSearchTrigger.classList.remove(UNLOADED); + } + }; + var ResultSwitch = class { + static on() { + if (!this.resultVisible) { + resultWrapper.classList.remove(UNLOADED); + content.forEach((el) => { + el.classList.add(UNLOADED); + }); + this.resultVisible = true; + } + } + static off() { + if (this.resultVisible) { + results.innerHTML = ""; + if (hints.classList.contains(UNLOADED)) { + hints.classList.remove(UNLOADED); + } + resultWrapper.classList.add(UNLOADED); + content.forEach((el) => { + el.classList.remove(UNLOADED); + }); + input.textContent = ""; + this.resultVisible = false; + } + } + }; + __publicField(ResultSwitch, "resultVisible", false); + function isMobileView() { + return btnCancel.classList.contains(LOADED); + } + function displaySearch() { + btnSearchTrigger.addEventListener("click", () => { + MobileSearchBar.on(); + ResultSwitch.on(); + input.focus(); + }); + btnCancel.addEventListener("click", () => { + MobileSearchBar.off(); + ResultSwitch.off(); + }); + input.addEventListener("focus", () => { + search.classList.add(FOCUS); + }); + input.addEventListener("focusout", () => { + search.classList.remove(FOCUS); + }); + input.addEventListener("input", () => { + if (input.value === "") { + if (isMobileView()) { + hints.classList.remove(UNLOADED); + } else { + ResultSwitch.off(); + } + } else { + ResultSwitch.on(); + if (isMobileView()) { + hints.classList.add(UNLOADED); + } + } + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/layouts/topbar.js + function initTopbar() { + displaySearch(); + } + + // + initSidebar(); + initTopbar(); + basic(); +})(); diff --git a/public/js/home.js b/public/js/home.js index 20ecb56..466cda3 100644 --- a/public/js/home.js +++ b/public/js/home.js @@ -1 +1,3440 @@ -(()=>{var Dn=Object.create;var ue=Object.defineProperty,Nn=Object.defineProperties,In=Object.getOwnPropertyDescriptor,Pn=Object.getOwnPropertyDescriptors,Mn=Object.getOwnPropertyNames,mr=Object.getOwnPropertySymbols,Rn=Object.getPrototypeOf,gr=Object.prototype.hasOwnProperty,kn=Object.prototype.propertyIsEnumerable;var vr=e=>{throw TypeError(e)};var le=(e,t,r)=>t in e?ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N=(e,t)=>{for(var r in t||(t={}))gr.call(t,r)&&le(e,r,t[r]);if(mr)for(var r of mr(t))kn.call(t,r)&&le(e,r,t[r]);return e},br=(e,t)=>Nn(e,Pn(t));var $n=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Bn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Mn(t))!gr.call(e,o)&&o!==r&&ue(e,o,{get:()=>t[o],enumerable:!(n=In(t,o))||n.enumerable});return e};var jn=(e,t,r)=>(r=e!=null?Dn(Rn(e)):{},Bn(t||!e||!e.__esModule?ue(r,"default",{value:e,enumerable:!0}):r,e));var _t=(e,t,r)=>le(e,typeof t!="symbol"?t+"":t,r),yr=(e,t,r)=>t.has(e)||vr("Cannot "+r);var U=(e,t,r)=>(yr(e,t,"read from private field"),r?r.call(e):t.get(e)),wt=(e,t,r)=>t.has(e)?vr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),jt=(e,t,r,n)=>(yr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var sn=$n(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});function H(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function lt(e){var t=H(e).Element;return e instanceof t||e instanceof Element}function k(e){var t=H(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Wr(e){if(typeof ShadowRoot=="undefined")return!1;var t=H(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var it=Math.max,Kt=Math.min,ut=Math.round;function ft(e,t){t===void 0&&(t=!1);var r=e.getBoundingClientRect(),n=1,o=1;if(k(e)&&t){var s=e.offsetHeight,i=e.offsetWidth;i>0&&(n=ut(r.width)/i||1),s>0&&(o=ut(r.height)/s||1)}return{width:r.width/n,height:r.height/o,top:r.top/o,right:r.right/n,bottom:r.bottom/o,left:r.left/n,x:r.left/n,y:r.top/o}}function Le(e){var t=H(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function mo(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function go(e){return e===H(e)||!k(e)?Le(e):mo(e)}function q(e){return e?(e.nodeName||"").toLowerCase():null}function J(e){return((lt(e)?e.ownerDocument:e.document)||window.document).documentElement}function De(e){return ft(J(e)).left+Le(e).scrollLeft}function W(e){return H(e).getComputedStyle(e)}function Ne(e){var t=W(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function vo(e){var t=e.getBoundingClientRect(),r=ut(t.width)/e.offsetWidth||1,n=ut(t.height)/e.offsetHeight||1;return r!==1||n!==1}function bo(e,t,r){r===void 0&&(r=!1);var n=k(t),o=k(t)&&vo(t),s=J(t),i=ft(e,o),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((q(t)!=="body"||Ne(s))&&(a=go(t)),k(t)?(c=ft(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=De(s))),{x:i.left+a.scrollLeft-c.x,y:i.top+a.scrollTop-c.y,width:i.width,height:i.height}}function Ie(e){var t=ft(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function Qt(e){return q(e)==="html"?e:e.assignedSlot||e.parentNode||(Wr(e)?e.host:null)||J(e)}function zr(e){return["html","body","#document"].indexOf(q(e))>=0?e.ownerDocument.body:k(e)&&Ne(e)?e:zr(Qt(e))}function St(e,t){var r;t===void 0&&(t=[]);var n=zr(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),s=H(n),i=o?[s].concat(s.visualViewport||[],Ne(n)?n:[]):n,a=t.concat(i);return o?a:a.concat(St(Qt(i)))}function yo(e){return["table","td","th"].indexOf(q(e))>=0}function Rr(e){return!k(e)||W(e).position==="fixed"?null:e.offsetParent}function Eo(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,r=navigator.userAgent.indexOf("Trident")!==-1;if(r&&k(e)){var n=W(e);if(n.position==="fixed")return null}for(var o=Qt(e);k(o)&&["html","body"].indexOf(q(o))<0;){var s=W(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function Lt(e){for(var t=H(e),r=Rr(e);r&&yo(r)&&W(r).position==="static";)r=Rr(r);return r&&(q(r)==="html"||q(r)==="body"&&W(r).position==="static")?t:r||Eo(e)||t}var I="top",$="bottom",B="right",P="left",Pe="auto",Dt=[I,$,B,P],pt="start",Ct="end",_o="clippingParents",Ur="viewport",Ot="popper",wo="reference",kr=Dt.reduce(function(e,t){return e.concat([t+"-"+pt,t+"-"+Ct])},[]),Yr=[].concat(Dt,[Pe]).reduce(function(e,t){return e.concat([t,t+"-"+pt,t+"-"+Ct])},[]),Ao="beforeRead",To="read",Oo="afterRead",So="beforeMain",xo="main",Co="afterMain",Lo="beforeWrite",Do="write",No="afterWrite",Io=[Ao,To,Oo,So,xo,Co,Lo,Do,No];function Po(e){var t=new Map,r=new Set,n=[];e.forEach(function(s){t.set(s.name,s)});function o(s){r.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(a){if(!r.has(a)){var c=t.get(a);c&&o(c)}}),n.push(s)}return e.forEach(function(s){r.has(s.name)||o(s)}),n}function Mo(e){var t=Po(e);return Io.reduce(function(r,n){return r.concat(t.filter(function(o){return o.phase===n}))},[])}function Ro(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function V(e){return e.split("-")[0]}function ko(e){var t=e.reduce(function(r,n){var o=r[n.name];return r[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}function $o(e){var t=H(e),r=J(e),n=t.visualViewport,o=r.clientWidth,s=r.clientHeight,i=0,a=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(i=n.offsetLeft,a=n.offsetTop)),{width:o,height:s,x:i+De(e),y:a}}function Bo(e){var t,r=J(e),n=Le(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=it(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=it(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+De(e),c=-n.scrollTop;return W(o||r).direction==="rtl"&&(a+=it(r.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:a,y:c}}function Gr(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Wr(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ce(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function jo(e){var t=ft(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function $r(e,t){return t===Ur?Ce($o(e)):lt(t)?jo(t):Ce(Bo(J(e)))}function Fo(e){var t=St(Qt(e)),r=["absolute","fixed"].indexOf(W(e).position)>=0,n=r&&k(e)?Lt(e):e;return lt(n)?t.filter(function(o){return lt(o)&&Gr(o,n)&&q(o)!=="body"&&(r?W(o).position!=="static":!0)}):[]}function Ho(e,t,r){var n=t==="clippingParents"?Fo(e):[].concat(t),o=[].concat(n,[r]),s=o[0],i=o.reduce(function(a,c){var u=$r(e,c);return a.top=it(u.top,a.top),a.right=Kt(u.right,a.right),a.bottom=Kt(u.bottom,a.bottom),a.left=it(u.left,a.left),a},$r(e,s));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}function dt(e){return e.split("-")[1]}function Me(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Kr(e){var t=e.reference,r=e.element,n=e.placement,o=n?V(n):null,s=n?dt(n):null,i=t.x+t.width/2-r.width/2,a=t.y+t.height/2-r.height/2,c;switch(o){case I:c={x:i,y:t.y-r.height};break;case $:c={x:i,y:t.y+t.height};break;case B:c={x:t.x+t.width,y:a};break;case P:c={x:t.x-r.width,y:a};break;default:c={x:t.x,y:t.y}}var u=o?Me(o):null;if(u!=null){var l=u==="y"?"height":"width";switch(s){case pt:c[u]=c[u]-(t[l]/2-r[l]/2);break;case Ct:c[u]=c[u]+(t[l]/2-r[l]/2);break}}return c}function Qr(){return{top:0,right:0,bottom:0,left:0}}function Xr(e){return Object.assign({},Qr(),e)}function Jr(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}function ht(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=n===void 0?e.placement:n,s=r.boundary,i=s===void 0?_o:s,a=r.rootBoundary,c=a===void 0?Ur:a,u=r.elementContext,l=u===void 0?Ot:u,f=r.altBoundary,g=f===void 0?!1:f,p=r.padding,h=p===void 0?0:p,m=Xr(typeof h!="number"?h:Jr(h,Dt)),d=l===Ot?wo:Ot,w=e.rects.popper,A=e.elements[g?d:l],T=Ho(lt(A)?A:A.contextElement||J(e.elements.popper),i,c),v=ft(e.elements.reference),E=Kr({reference:v,element:w,strategy:"absolute",placement:o}),b=Ce(Object.assign({},w,E)),y=l===Ot?b:v,O={top:T.top-y.top+m.top,bottom:y.bottom-T.bottom+m.bottom,left:T.left-y.left+m.left,right:y.right-T.right+m.right},x=e.modifiersData.offset;if(l===Ot&&x){var C=x[o];Object.keys(O).forEach(function(_){var L=[B,$].indexOf(_)>=0?1:-1,et=[I,$].indexOf(_)>=0?"y":"x";O[_]+=C[et]*L})}return O}var Br={placement:"bottom",modifiers:[],strategy:"absolute"};function jr(){for(var e=arguments.length,t=new Array(e),r=0;r=0?-1:1,s=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,i=s[0],a=s[1];return i=i||0,a=(a||0)*o,[P,B].indexOf(n)>=0?{x:a,y:i}:{x:i,y:a}}function Qo(e){var t=e.state,r=e.options,n=e.name,o=r.offset,s=o===void 0?[0,0]:o,i=Yr.reduce(function(l,f){return l[f]=Ko(f,t.rects,s),l},{}),a=i[t.placement],c=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=i}var Zr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Qo},Xo={left:"right",right:"left",bottom:"top",top:"bottom"};function Gt(e){return e.replace(/left|right|bottom|top/g,function(t){return Xo[t]})}var Jo={start:"end",end:"start"};function Hr(e){return e.replace(/start|end/g,function(t){return Jo[t]})}function Zo(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=r.boundary,s=r.rootBoundary,i=r.padding,a=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?Yr:c,l=dt(n),f=l?a?kr:kr.filter(function(h){return dt(h)===l}):Dt,g=f.filter(function(h){return u.indexOf(h)>=0});g.length===0&&(g=f);var p=g.reduce(function(h,m){return h[m]=ht(e,{placement:m,boundary:o,rootBoundary:s,padding:i})[V(m)],h},{});return Object.keys(p).sort(function(h,m){return p[h]-p[m]})}function ti(e){if(V(e)===Pe)return[];var t=Gt(e);return[Hr(e),t,Hr(t)]}function ei(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,s=o===void 0?!0:o,i=r.altAxis,a=i===void 0?!0:i,c=r.fallbackPlacements,u=r.padding,l=r.boundary,f=r.rootBoundary,g=r.altBoundary,p=r.flipVariations,h=p===void 0?!0:p,m=r.allowedAutoPlacements,d=t.options.placement,w=V(d),A=w===d,T=c||(A||!h?[Gt(d)]:ti(d)),v=[d].concat(T).reduce(function(at,G){return at.concat(V(G)===Pe?Zo(t,{placement:G,boundary:l,rootBoundary:f,padding:u,flipVariations:h,allowedAutoPlacements:m}):G)},[]),E=t.rects.reference,b=t.rects.popper,y=new Map,O=!0,x=v[0],C=0;C=0,bt=vt?"width":"height",R=ht(t,{placement:_,boundary:l,rootBoundary:f,altBoundary:g,padding:u}),j=vt?et?B:P:et?$:I;E[bt]>b[bt]&&(j=Gt(j));var Mt=Gt(j),rt=[];if(s&&rt.push(R[L]<=0),a&&rt.push(R[j]<=0,R[Mt]<=0),rt.every(function(at){return at})){x=_,O=!1;break}y.set(_,rt)}if(O)for(var Rt=h?3:1,ie=function(G){var Et=v.find(function($t){var nt=y.get($t);if(nt)return nt.slice(0,G).every(function(se){return se})});if(Et)return x=Et,"break"},yt=Rt;yt>0;yt--){var kt=ie(yt);if(kt==="break")break}t.placement!==x&&(t.modifiersData[n]._skip=!0,t.placement=x,t.reset=!0)}}var tn={name:"flip",enabled:!0,phase:"main",fn:ei,requiresIfExists:["offset"],data:{_skip:!1}};function ri(e){return e==="x"?"y":"x"}function xt(e,t,r){return it(e,Kt(t,r))}function ni(e,t,r){var n=xt(e,t,r);return n>r?r:n}function oi(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,s=o===void 0?!0:o,i=r.altAxis,a=i===void 0?!1:i,c=r.boundary,u=r.rootBoundary,l=r.altBoundary,f=r.padding,g=r.tether,p=g===void 0?!0:g,h=r.tetherOffset,m=h===void 0?0:h,d=ht(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:l}),w=V(t.placement),A=dt(t.placement),T=!A,v=Me(w),E=ri(v),b=t.modifiersData.popperOffsets,y=t.rects.reference,O=t.rects.popper,x=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,C=typeof x=="number"?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(b){if(s){var et,vt=v==="y"?I:P,bt=v==="y"?$:B,R=v==="y"?"height":"width",j=b[v],Mt=j+d[vt],rt=j-d[bt],Rt=p?-O[R]/2:0,ie=A===pt?y[R]:O[R],yt=A===pt?-O[R]:-y[R],kt=t.elements.arrow,at=p&&kt?Ie(kt):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Qr(),Et=G[vt],$t=G[bt],nt=xt(0,y[R],at[R]),se=T?y[R]/2-Rt-nt-Et-C.mainAxis:ie-nt-Et-C.mainAxis,Tn=T?-y[R]/2+Rt+nt+$t+C.mainAxis:yt+nt+$t+C.mainAxis,ae=t.elements.arrow&&Lt(t.elements.arrow),On=ae?v==="y"?ae.clientTop||0:ae.clientLeft||0:0,sr=(et=_==null?void 0:_[v])!=null?et:0,Sn=j+se-sr-On,xn=j+Tn-sr,ar=xt(p?Kt(Mt,Sn):Mt,j,p?it(rt,xn):rt);b[v]=ar,L[v]=ar-j}if(a){var cr,Cn=v==="x"?I:P,Ln=v==="x"?$:B,ot=b[E],Bt=E==="y"?"height":"width",lr=ot+d[Cn],ur=ot-d[Ln],ce=[I,P].indexOf(w)!==-1,fr=(cr=_==null?void 0:_[E])!=null?cr:0,pr=ce?lr:ot-y[Bt]-O[Bt]-fr+C.altAxis,dr=ce?ot+y[Bt]+O[Bt]-fr-C.altAxis:ur,hr=p&&ce?ni(pr,ot,dr):xt(p?pr:lr,ot,p?dr:ur);b[E]=hr,L[E]=hr-ot}t.modifiersData[n]=L}}var en={name:"preventOverflow",enabled:!0,phase:"main",fn:oi,requiresIfExists:["offset"]},ii=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Xr(typeof t!="number"?t:Jr(t,Dt))};function si(e){var t,r=e.state,n=e.name,o=e.options,s=r.elements.arrow,i=r.modifiersData.popperOffsets,a=V(r.placement),c=Me(a),u=[P,B].indexOf(a)>=0,l=u?"height":"width";if(!(!s||!i)){var f=ii(o.padding,r),g=Ie(s),p=c==="y"?I:P,h=c==="y"?$:B,m=r.rects.reference[l]+r.rects.reference[c]-i[c]-r.rects.popper[l],d=i[c]-r.rects.reference[c],w=Lt(s),A=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,T=m/2-d/2,v=f[p],E=A-g[l]-f[h],b=A/2-g[l]/2+T,y=xt(v,b,E),O=c;r.modifiersData[n]=(t={},t[O]=y,t.centerOffset=y-b,t)}}function ai(e){var t=e.state,r=e.options,n=r.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||Gr(t.elements.popper,o)&&(t.elements.arrow=o))}var rn={name:"arrow",enabled:!0,phase:"main",fn:si,effect:ai,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Vr(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function qr(e){return[I,B,$,P].some(function(t){return e[t]>=0})}function ci(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,i=ht(t,{elementContext:"reference"}),a=ht(t,{altBoundary:!0}),c=Vr(i,n),u=Vr(a,o,s),l=qr(c),f=qr(u);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}var nn={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ci},li=[ke,$e,Be,je],ui=Re({defaultModifiers:li}),on=[ke,$e,Be,je,Zr,tn,en,rn,nn],fi=Re({defaultModifiers:on});D.applyStyles=je;D.arrow=rn;D.computeStyles=Be;D.createPopper=fi;D.createPopperLite=ui;D.defaultModifiers=on;D.detectOverflow=ht;D.eventListeners=ke;D.flip=tn;D.hide=nn;D.offset=Zr;D.popperGenerator=Re;D.popperOffsets=$e;D.preventOverflow=en});var K=new Map,Ft={set(e,t,r){K.has(e)||K.set(e,new Map);let n=K.get(e);if(!n.has(t)&&n.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`);return}n.set(t,r)},get(e,t){return K.has(e)&&K.get(e).get(t)||null},remove(e,t){if(!K.has(e))return;let r=K.get(e);r.delete(t),r.size===0&&K.delete(e)}};var pe="transitionend",de=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(t,r)=>`#${CSS.escape(r)}`)),e),Er=e=>e==null?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),_r=e=>{do e+=Math.floor(Math.random()*1e6);while(document.getElementById(e));return e},Fn=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:r}=window.getComputedStyle(e),n=Number.parseFloat(t),o=Number.parseFloat(r);return!n&&!o?0:(t=t.split(",")[0],r=r.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(r))*1e3)},Hn=e=>{e.dispatchEvent(new Event(pe))},X=e=>!e||typeof e!="object"?!1:(typeof e.jquery!="undefined"&&(e=e[0]),typeof e.nodeType!="undefined"),Y=e=>X(e)?e.jquery?e[0]:e:typeof e=="string"&&e.length>0?document.querySelector(de(e)):null,wr=e=>{if(!X(e)||e.getClientRects().length===0)return!1;let t=getComputedStyle(e).getPropertyValue("visibility")==="visible",r=e.closest("details:not([open])");if(!r)return t;if(r!==e){let n=e.closest("summary");if(n&&n.parentNode!==r||n===null)return!1}return t},Ar=e=>!e||e.nodeType!==Node.ELEMENT_NODE||e.classList.contains("disabled")?!0:typeof e.disabled!="undefined"?e.disabled:e.hasAttribute("disabled")&&e.getAttribute("disabled")!=="false",he=e=>{if(!document.documentElement.attachShadow)return null;if(typeof e.getRootNode=="function"){let t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?he(e.parentNode):null},me=()=>{},Tr=e=>{e.offsetHeight},ge=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,fe=[],Vn=e=>{document.readyState==="loading"?(fe.length||document.addEventListener("DOMContentLoaded",()=>{for(let t of fe)t()}),fe.push(e)):e()},ve=()=>document.documentElement.dir==="rtl",Ht=e=>{Vn(()=>{let t=ge();if(t){let r=e.NAME,n=t.fn[r];t.fn[r]=e.jQueryInterface,t.fn[r].Constructor=e,t.fn[r].noConflict=()=>(t.fn[r]=n,e.jQueryInterface)}})},Q=(e,t=[],r=e)=>typeof e=="function"?e.call(...t):r,Or=(e,t,r=!0)=>{if(!r){Q(e);return}let o=Fn(t)+5,s=!1,i=({target:a})=>{a===t&&(s=!0,t.removeEventListener(pe,i),Q(e))};t.addEventListener(pe,i),setTimeout(()=>{s||Hn(t)},o)};var qn=/[^.]*(?=\..*)\.|.*/,Wn=/\..*/,zn=/::\d+$/,be={},Sr=1,Cr={mouseenter:"mouseover",mouseleave:"mouseout"},Un=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Lr(e,t){return t&&`${t}::${Sr++}`||e.uidEvent||Sr++}function Dr(e){let t=Lr(e);return e.uidEvent=t,be[t]=be[t]||{},be[t]}function Yn(e,t){return function r(n){return _e(n,{delegateTarget:e}),r.oneOff&&Ee.off(e,n.type,t),t.apply(e,[n])}}function Gn(e,t,r){return function n(o){let s=e.querySelectorAll(t);for(let{target:i}=o;i&&i!==this;i=i.parentNode)for(let a of s)if(a===i)return _e(o,{delegateTarget:i}),n.oneOff&&Ee.off(e,o.type,t,r),r.apply(i,[o])}}function Nr(e,t,r=null){return Object.values(e).find(n=>n.callable===t&&n.delegationSelector===r)}function Ir(e,t,r){let n=typeof t=="string",o=n?r:t||r,s=Pr(e);return Un.has(s)||(s=e),[n,o,s]}function xr(e,t,r,n,o){if(typeof t!="string"||!e)return;let[s,i,a]=Ir(t,r,n);t in Cr&&(i=(h=>function(m){if(!m.relatedTarget||m.relatedTarget!==m.delegateTarget&&!m.delegateTarget.contains(m.relatedTarget))return h.call(this,m)})(i));let c=Dr(e),u=c[a]||(c[a]={}),l=Nr(u,i,s?r:null);if(l){l.oneOff=l.oneOff&&o;return}let f=Lr(i,t.replace(qn,"")),g=s?Gn(e,r,i):Yn(e,i);g.delegationSelector=s?r:null,g.callable=i,g.oneOff=o,g.uidEvent=f,u[f]=g,e.addEventListener(a,g,s)}function ye(e,t,r,n,o){let s=Nr(t[r],n,o);s&&(e.removeEventListener(r,s,!!o),delete t[r][s.uidEvent])}function Kn(e,t,r,n){let o=t[r]||{};for(let[s,i]of Object.entries(o))s.includes(n)&&ye(e,t,r,i.callable,i.delegationSelector)}function Pr(e){return e=e.replace(Wn,""),Cr[e]||e}var Ee={on(e,t,r,n){xr(e,t,r,n,!1)},one(e,t,r,n){xr(e,t,r,n,!0)},off(e,t,r,n){if(typeof t!="string"||!e)return;let[o,s,i]=Ir(t,r,n),a=i!==t,c=Dr(e),u=c[i]||{},l=t.startsWith(".");if(typeof s!="undefined"){if(!Object.keys(u).length)return;ye(e,c,i,s,o?r:null);return}if(l)for(let f of Object.keys(c))Kn(e,c,f,t.slice(1));for(let[f,g]of Object.entries(u)){let p=f.replace(zn,"");(!a||t.includes(p))&&ye(e,c,i,g.callable,g.delegationSelector)}},trigger(e,t,r){if(typeof t!="string"||!e)return null;let n=ge(),o=Pr(t),s=t!==o,i=null,a=!0,c=!0,u=!1;s&&n&&(i=n.Event(t,r),n(e).trigger(i),a=!i.isPropagationStopped(),c=!i.isImmediatePropagationStopped(),u=i.isDefaultPrevented());let l=_e(new Event(t,{bubbles:a,cancelable:!0}),r);return u&&l.preventDefault(),c&&e.dispatchEvent(l),l.defaultPrevented&&i&&i.preventDefault(),l}};function _e(e,t={}){for(let[r,n]of Object.entries(t))try{e[r]=n}catch(o){Object.defineProperty(e,r,{configurable:!0,get(){return n}})}return e}var S=Ee;function Mr(e){if(e==="true")return!0;if(e==="false")return!1;if(e===Number(e).toString())return Number(e);if(e===""||e==="null")return null;if(typeof e!="string")return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function we(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}var Qn={setDataAttribute(e,t,r){e.setAttribute(`data-bs-${we(t)}`,r)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${we(t)}`)},getDataAttributes(e){if(!e)return{};let t={},r=Object.keys(e.dataset).filter(n=>n.startsWith("bs")&&!n.startsWith("bsConfig"));for(let n of r){let o=n.replace(/^bs/,"");o=o.charAt(0).toLowerCase()+o.slice(1),t[o]=Mr(e.dataset[n])}return t},getDataAttribute(e,t){return Mr(e.getAttribute(`data-bs-${we(t)}`))}},At=Qn;var Ae=class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,r){let n=X(r)?At.getDataAttribute(r,"config"):{};return N(N(N(N({},this.constructor.Default),typeof n=="object"?n:{}),X(r)?At.getDataAttributes(r):{}),typeof t=="object"?t:{})}_typeCheckConfig(t,r=this.constructor.DefaultType){for(let[n,o]of Object.entries(r)){let s=t[n],i=X(s)?"element":Er(s);if(!new RegExp(o).test(i))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${i}" but expected type "${o}".`)}}},Vt=Ae;var Xn="5.3.8",Te=class extends Vt{constructor(t,r){super(),t=Y(t),t&&(this._element=t,this._config=this._getConfig(r),Ft.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Ft.remove(this._element,this.constructor.DATA_KEY),S.off(this._element,this.constructor.EVENT_KEY);for(let t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,r,n=!0){Or(t,r,n)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return Ft.get(Y(t),this.DATA_KEY)}static getOrCreateInstance(t,r={}){return this.getInstance(t)||new this(t,typeof r=="object"?r:null)}static get VERSION(){return Xn}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}},qt=Te;var Oe=e=>{let t=e.getAttribute("data-bs-target");if(!t||t==="#"){let r=e.getAttribute("href");if(!r||!r.includes("#")&&!r.startsWith("."))return null;r.includes("#")&&!r.startsWith("#")&&(r=`#${r.split("#")[1]}`),t=r&&r!=="#"?r.trim():null}return t?t.split(",").map(r=>de(r)).join(","):null},Wt={find(e,t=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(t,e))},findOne(e,t=document.documentElement){return Element.prototype.querySelector.call(t,e)},children(e,t){return[].concat(...e.children).filter(r=>r.matches(t))},parents(e,t){let r=[],n=e.parentNode.closest(t);for(;n;)r.push(n),n=n.parentNode.closest(t);return r},prev(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return[r];r=r.previousElementSibling}return[]},next(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return[r];r=r.nextElementSibling}return[]},focusableChildren(e){let t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(r=>`${r}:not([tabindex^="-"])`).join(",");return this.find(t,e).filter(r=>!Ar(r)&&wr(r))},getSelectorFromElement(e){let t=Oe(e);return t&&Wt.findOne(t)?t:null},getElementFromSelector(e){let t=Oe(e);return t?Wt.findOne(t):null},getMultipleElementsFromSelector(e){let t=Oe(e);return t?Wt.find(t):[]}},F=Wt;var Jn="collapse",Zn="bs.collapse",Tt=`.${Zn}`,to=".data-api",eo=`show${Tt}`,ro=`shown${Tt}`,no=`hide${Tt}`,oo=`hidden${Tt}`,io=`click${Tt}${to}`,Se="show",ct="collapse",zt="collapsing",so="collapsed",ao=`:scope .${ct} .${ct}`,co="collapse-horizontal",lo="width",uo="height",fo=".collapse.show, .collapse.collapsing",xe='[data-bs-toggle="collapse"]',po={parent:null,toggle:!0},ho={parent:"(null|element)",toggle:"boolean"},Ut=class e extends qt{constructor(t,r){super(t,r),this._isTransitioning=!1,this._triggerArray=[];let n=F.find(xe);for(let o of n){let s=F.getSelectorFromElement(o),i=F.find(s).filter(a=>a===this._element);s!==null&&i.length&&this._triggerArray.push(o)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return po}static get DefaultType(){return ho}static get NAME(){return Jn}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(fo).filter(a=>a!==this._element).map(a=>e.getOrCreateInstance(a,{toggle:!1}))),t.length&&t[0]._isTransitioning||S.trigger(this._element,eo).defaultPrevented)return;for(let a of t)a.hide();let n=this._getDimension();this._element.classList.remove(ct),this._element.classList.add(zt),this._element.style[n]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;let o=()=>{this._isTransitioning=!1,this._element.classList.remove(zt),this._element.classList.add(ct,Se),this._element.style[n]="",S.trigger(this._element,ro)},i=`scroll${n[0].toUpperCase()+n.slice(1)}`;this._queueCallback(o,this._element,!0),this._element.style[n]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown()||S.trigger(this._element,no).defaultPrevented)return;let r=this._getDimension();this._element.style[r]=`${this._element.getBoundingClientRect()[r]}px`,Tr(this._element),this._element.classList.add(zt),this._element.classList.remove(ct,Se);for(let o of this._triggerArray){let s=F.getElementFromSelector(o);s&&!this._isShown(s)&&this._addAriaAndCollapsedClass([o],!1)}this._isTransitioning=!0;let n=()=>{this._isTransitioning=!1,this._element.classList.remove(zt),this._element.classList.add(ct),S.trigger(this._element,oo)};this._element.style[r]="",this._queueCallback(n,this._element,!0)}_isShown(t=this._element){return t.classList.contains(Se)}_configAfterMerge(t){return t.toggle=!!t.toggle,t.parent=Y(t.parent),t}_getDimension(){return this._element.classList.contains(co)?lo:uo}_initializeChildren(){if(!this._config.parent)return;let t=this._getFirstLevelChildren(xe);for(let r of t){let n=F.getElementFromSelector(r);n&&this._addAriaAndCollapsedClass([r],this._isShown(n))}}_getFirstLevelChildren(t){let r=F.find(ao,this._config.parent);return F.find(t,this._config.parent).filter(n=>!r.includes(n))}_addAriaAndCollapsedClass(t,r){if(t.length)for(let n of t)n.classList.toggle(so,!r),n.setAttribute("aria-expanded",r)}static jQueryInterface(t){let r={};return typeof t=="string"&&/show|hide/.test(t)&&(r.toggle=!1),this.each(function(){let n=e.getOrCreateInstance(this,r);if(typeof t=="string"){if(typeof n[t]=="undefined")throw new TypeError(`No method named "${t}"`);n[t]()}})}};S.on(document,io,xe,function(e){(e.target.tagName==="A"||e.delegateTarget&&e.delegateTarget.tagName==="A")&&e.preventDefault();for(let t of F.getMultipleElementsFromSelector(this))Ut.getOrCreateInstance(t,{toggle:!1}).toggle()});Ht(Ut);var vs=document.getElementsByClassName("collapse");var We=jn(sn());var pi=/^aria-[\w-]*$/i,Xt={"*":["class","dir","id","lang","role",pi],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},di=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),hi=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,mi=(e,t)=>{let r=e.nodeName.toLowerCase();return t.includes(r)?di.has(r)?!!hi.test(e.nodeValue):!0:t.filter(n=>n instanceof RegExp).some(n=>n.test(r))};function an(e,t,r){if(!e.length)return e;if(r&&typeof r=="function")return r(e);let o=new window.DOMParser().parseFromString(e,"text/html"),s=[].concat(...o.body.querySelectorAll("*"));for(let i of s){let a=i.nodeName.toLowerCase();if(!Object.keys(t).includes(a)){i.remove();continue}let c=[].concat(...i.attributes),u=[].concat(t["*"]||[],t[a]||[]);for(let l of c)mi(l,u)||i.removeAttribute(l.nodeName)}return o.body.innerHTML}var gi="TemplateFactory",vi={allowList:Xt,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},bi={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},yi={entry:"(string|element|function|null)",selector:"(string|element)"},Fe=class extends Vt{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return vi}static get DefaultType(){return bi}static get NAME(){return gi}getContent(){return Object.values(this._config.content).map(t=>this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content=N(N({},this._config.content),t),this}toHtml(){let t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(let[o,s]of Object.entries(this._config.content))this._setContent(t,s,o);let r=t.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&r.classList.add(...n.split(" ")),r}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(let[r,n]of Object.entries(t))super._typeCheckConfig({selector:r,entry:n},yi)}_setContent(t,r,n){let o=F.findOne(n,t);if(o){if(r=this._resolvePossibleFunction(r),!r){o.remove();return}if(X(r)){this._putElementInTemplate(Y(r),o);return}if(this._config.html){o.innerHTML=this._maybeSanitize(r);return}o.textContent=r}}_maybeSanitize(t){return this._config.sanitize?an(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return Q(t,[void 0,this])}_putElementInTemplate(t,r){if(this._config.html){r.innerHTML="",r.append(t);return}r.textContent=t.textContent}},cn=Fe;var Ei="tooltip",_i=new Set(["sanitize","allowList","sanitizeFn"]),He="fade",wi="modal",Jt="show",Ai=".tooltip-inner",ln=`.${wi}`,un="hide.bs.modal",Nt="hover",Ve="focus",qe="click",Ti="manual",Oi="hide",Si="hidden",xi="show",Ci="shown",Li="inserted",Di="click",Ni="focusin",Ii="focusout",Pi="mouseenter",Mi="mouseleave",Ri={AUTO:"auto",TOP:"top",RIGHT:ve()?"left":"right",BOTTOM:"bottom",LEFT:ve()?"right":"left"},ki={allowList:Xt,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},$i={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"},Zt=class e extends qt{constructor(t,r){if(typeof We=="undefined")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(t,r),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return ki}static get DefaultType(){return $i}static get NAME(){return Ei}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),S.off(this._element.closest(ln),un,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;let t=S.trigger(this._element,this.constructor.eventName(xi)),n=(he(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!n)return;this._disposePopper();let o=this._getTipElement();this._element.setAttribute("aria-describedby",o.getAttribute("id"));let{container:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(o),S.trigger(this._element,this.constructor.eventName(Li))),this._popper=this._createPopper(o),o.classList.add(Jt),"ontouchstart"in document.documentElement)for(let a of[].concat(...document.body.children))S.on(a,"mouseover",me);let i=()=>{S.trigger(this._element,this.constructor.eventName(Ci)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(i,this.tip,this._isAnimated())}hide(){if(!this._isShown()||S.trigger(this._element,this.constructor.eventName(Oi)).defaultPrevented)return;if(this._getTipElement().classList.remove(Jt),"ontouchstart"in document.documentElement)for(let o of[].concat(...document.body.children))S.off(o,"mouseover",me);this._activeTrigger[qe]=!1,this._activeTrigger[Ve]=!1,this._activeTrigger[Nt]=!1,this._isHovered=null;let n=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),S.trigger(this._element,this.constructor.eventName(Si)))};this._queueCallback(n,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){let r=this._getTemplateFactory(t).toHtml();if(!r)return null;r.classList.remove(He,Jt),r.classList.add(`bs-${this.constructor.NAME}-auto`);let n=_r(this.constructor.NAME).toString();return r.setAttribute("id",n),this._isAnimated()&&r.classList.add(He),r}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new cn(br(N({},this._config),{content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)})),this._templateFactory}_getContentForTemplate(){return{[Ai]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(He)}_isShown(){return this.tip&&this.tip.classList.contains(Jt)}_createPopper(t){let r=Q(this._config.placement,[this,t,this._element]),n=Ri[r.toUpperCase()];return We.createPopper(this._element,t,this._getPopperConfig(n))}_getOffset(){let{offset:t}=this._config;return typeof t=="string"?t.split(",").map(r=>Number.parseInt(r,10)):typeof t=="function"?r=>t(r,this._element):t}_resolvePossibleFunction(t){return Q(t,[this._element,this._element])}_getPopperConfig(t){let r={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:n=>{this._getTipElement().setAttribute("data-popper-placement",n.state.placement)}}]};return N(N({},r),Q(this._config.popperConfig,[void 0,r]))}_setListeners(){let t=this._config.trigger.split(" ");for(let r of t)if(r==="click")S.on(this._element,this.constructor.eventName(Di),this._config.selector,n=>{let o=this._initializeOnDelegatedTarget(n);o._activeTrigger[qe]=!(o._isShown()&&o._activeTrigger[qe]),o.toggle()});else if(r!==Ti){let n=r===Nt?this.constructor.eventName(Pi):this.constructor.eventName(Ni),o=r===Nt?this.constructor.eventName(Mi):this.constructor.eventName(Ii);S.on(this._element,n,this._config.selector,s=>{let i=this._initializeOnDelegatedTarget(s);i._activeTrigger[s.type==="focusin"?Ve:Nt]=!0,i._enter()}),S.on(this._element,o,this._config.selector,s=>{let i=this._initializeOnDelegatedTarget(s);i._activeTrigger[s.type==="focusout"?Ve:Nt]=i._element.contains(s.relatedTarget),i._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},S.on(this._element.closest(ln),un,this._hideModalHandler)}_fixTitle(){let t=this._element.getAttribute("title");t&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,r){clearTimeout(this._timeout),this._timeout=setTimeout(t,r)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){let r=At.getDataAttributes(this._element);for(let n of Object.keys(r))_i.has(n)&&delete r[n];return t=N(N({},r),typeof t=="object"&&t?t:{}),t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=t.container===!1?document.body:Y(t.container),typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),typeof t.title=="number"&&(t.title=t.title.toString()),typeof t.content=="number"&&(t.content=t.content.toString()),t}_getDelegateConfig(){let t={};for(let[r,n]of Object.entries(this._config))this.constructor.Default[r]!==n&&(t[r]=n);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){let r=e.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof r[t]=="undefined")throw new TypeError(`No method named "${t}"`);r[t]()}})}};Ht(Zt);var ze=Zt;var fn="data-src",pn="data-lqip",Ue={SHIMMER:"shimmer",BLUR:"blur"};function Ye(e){this.parentElement.classList.remove(e)}function Bi(){this.complete&&(this.hasAttribute(pn)?Ye.call(this,Ue.BLUR):Ye.call(this,Ue.SHIMMER))}function ji(){let e=this.getAttribute(fn);this.setAttribute("src",encodeURI(e)),this.removeAttribute(fn)}function Ge(){let e=document.querySelectorAll("article img");if(e.length===0)return;e.forEach(r=>{r.addEventListener("load",Bi)}),document.querySelectorAll('article img[loading="lazy"]').forEach(r=>{r.complete&&Ye.call(r,Ue.SHIMMER)});let t=document.querySelectorAll(`article img[${pn}="true"]`);t.length&&t.forEach(r=>{ji.call(r)})}var Z=class{static get attrTimestamp(){return"data-ts"}static get attrDateFormat(){return"data-df"}static get locale(){return document.documentElement.getAttribute("lang").substring(0,2)}static getTimestamp(t){return Number(t.getAttribute(this.attrTimestamp))}static getDateFormat(t){return t.getAttribute(this.attrDateFormat)}};function Ke(){dayjs.locale(Z.locale),dayjs.extend(window.dayjs_plugin_localizedFormat),document.querySelectorAll(`[${Z.attrTimestamp}]`).forEach(e=>{let t=dayjs.unix(Z.getTimestamp(e)),r=t.format(Z.getDateFormat(e));if(e.textContent=r,e.removeAttribute(Z.attrTimestamp),e.removeAttribute(Z.attrDateFormat),e.hasAttribute("data-bs-toggle")&&e.getAttribute("data-bs-toggle")==="tooltip"){let n=t.format("llll");e.setAttribute("data-bs-title",n)}})}var Fi=document.getElementById("toc-bar"),Hi=document.getElementById("toc-solo-trigger"),Vi=document.getElementsByClassName("toc-trigger"),z=document.getElementById("toc-popup"),qi=document.getElementById("toc-popup-close"),dn="overflow-hidden",Qe="closing",It,Pt,mt=class mt{static initBar(){new IntersectionObserver(r=>{r.forEach(n=>{Fi.classList.toggle("invisible",n.isIntersecting)})},{rootMargin:`-${U(this,Pt)}px 0px 0px 0px`}).observe(Hi),jt(this,It,!1)}static listenAnchors(){[...document.getElementsByClassName("toc-link")].forEach(r=>{r.onclick=()=>this.hidePopup()})}static refresh(){U(this,It)&&this.initComponents(),tocbot.refresh(this.options),this.listenAnchors()}static get popupOpened(){return z.open}static showPopup(){this.lockScroll(!0),z.showModal(),z.querySelector("li.is-active-li").scrollIntoView({block:"center"})}static hidePopup(){z.toggleAttribute(Qe),z.addEventListener("animationend",()=>{z.toggleAttribute(Qe),z.close()},{once:!0}),this.lockScroll(!1)}static lockScroll(t){document.documentElement.classList.toggle(dn,t),document.body.classList.toggle(dn,t)}static clickBackdrop(t){if(z.hasAttribute(Qe))return;let r=t.target.getBoundingClientRect();(t.clientXr.right||t.clientYr.bottom)&&this.hidePopup()}static initComponents(){this.initBar(),[...Vi].forEach(t=>{t.onclick=()=>this.showPopup()}),z.onclick=t=>this.clickBackdrop(t),qi.onclick=()=>this.hidePopup(),z.oncancel=t=>{t.preventDefault(),this.hidePopup()}}static init(){tocbot.init(this.options),this.listenAnchors(),this.initComponents()}};It=new WeakMap,Pt=new WeakMap,wt(mt,It,!0),wt(mt,Pt,48),_t(mt,"options",{tocSelector:"#toc-popup-content",contentSelector:".content",ignoreSelector:"[data-toc-skip]",headingSelector:"h2, h3, h4",orderedList:!1,scrollSmooth:!1,collapseDepth:4,headingsOffset:U(mt,Pt)});var Xe=mt;var Ys=matchMedia("(min-width: 1200px)");var Ks=Theme.getThemeMapper("default","dark");var hn=document.getElementById("mode-toggle");function Je(){hn&&hn.addEventListener("click",()=>{Theme.flip()})}function Ze(){let e=document.getElementById("back-to-top");window.addEventListener("scroll",()=>{window.scrollY>50?e.classList.add("show"):e.classList.remove("show")}),e.addEventListener("click",()=>{window.scrollTo({top:0})})}function tr(){[...document.querySelectorAll('[data-bs-toggle="tooltip"]')].map(t=>new ze(t))}function er(){Je(),Ze(),tr()}var Wi="sidebar-display",zi=document.getElementById("sidebar"),Ui=document.getElementById("sidebar-trigger"),mn=document.getElementById("mask"),tt,te=class{static toggle(){jt(this,tt,!U(this,tt)),document.body.toggleAttribute(Wi,U(this,tt)),zi.classList.toggle("z-2",U(this,tt)),mn.classList.toggle("d-none",!U(this,tt))}};tt=new WeakMap,wt(te,tt,!1);function rr(){Ui.onclick=mn.onclick=()=>te.toggle()}var gn=document.getElementById("sidebar-trigger"),nr=document.getElementById("search-trigger"),ee=document.getElementById("search-cancel"),vn=document.querySelectorAll("#main-wrapper>.container>.row"),bn=document.getElementById("topbar-title"),re=document.getElementById("search"),yn=document.getElementById("search-result-wrapper"),Yi=document.getElementById("search-results"),gt=document.getElementById("search-input"),ne=document.getElementById("search-hints"),or="d-block",M="d-none",En="input-focus",_n="d-flex",oe=class{static on(){gn.classList.add(M),bn.classList.add(M),nr.classList.add(M),re.classList.add(_n),ee.classList.add(or)}static off(){ee.classList.remove(or),re.classList.remove(_n),gn.classList.remove(M),bn.classList.remove(M),nr.classList.remove(M)}},st=class{static on(){this.resultVisible||(yn.classList.remove(M),vn.forEach(t=>{t.classList.add(M)}),this.resultVisible=!0)}static off(){this.resultVisible&&(Yi.innerHTML="",ne.classList.contains(M)&&ne.classList.remove(M),yn.classList.add(M),vn.forEach(t=>{t.classList.remove(M)}),gt.textContent="",this.resultVisible=!1)}};_t(st,"resultVisible",!1);function wn(){return ee.classList.contains(or)}function An(){nr.addEventListener("click",()=>{oe.on(),st.on(),gt.focus()}),ee.addEventListener("click",()=>{oe.off(),st.off()}),gt.addEventListener("focus",()=>{re.classList.add(En)}),gt.addEventListener("focusout",()=>{re.classList.remove(En)}),gt.addEventListener("input",()=>{gt.value===""?wn()?ne.classList.remove(M):st.off():(st.on(),wn()&&ne.classList.add(M))})}function ir(){An()}Ge();Ke();rr();ir();er();})(); +(() => { + var __create = Object.create; + var __defProp = Object.defineProperty; + var __defProps = Object.defineProperties; + var __getOwnPropDesc = Object.getOwnPropertyDescriptor; + var __getOwnPropDescs = Object.getOwnPropertyDescriptors; + var __getOwnPropNames = Object.getOwnPropertyNames; + var __getOwnPropSymbols = Object.getOwnPropertySymbols; + var __getProtoOf = Object.getPrototypeOf; + var __hasOwnProp = Object.prototype.hasOwnProperty; + var __propIsEnum = Object.prototype.propertyIsEnumerable; + var __typeError = (msg) => { + throw TypeError(msg); + }; + var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; + var __spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b)) { + if (__propIsEnum.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + } + return a; + }; + var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); + var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + }; + var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; + }; + var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); + var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg); + var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)); + var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value); + var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2@v2.21100.20000/package/dist/cjs/popper.js + var require_popper = __commonJS({ + "ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2@v2.21100.20000/package/dist/cjs/popper.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + function getWindow(node) { + if (node == null) { + return window; + } + if (node.toString() !== "[object Window]") { + var ownerDocument = node.ownerDocument; + return ownerDocument ? ownerDocument.defaultView || window : window; + } + return node; + } + function isElement2(node) { + var OwnElement = getWindow(node).Element; + return node instanceof OwnElement || node instanceof Element; + } + function isHTMLElement(node) { + var OwnElement = getWindow(node).HTMLElement; + return node instanceof OwnElement || node instanceof HTMLElement; + } + function isShadowRoot(node) { + if (typeof ShadowRoot === "undefined") { + return false; + } + var OwnElement = getWindow(node).ShadowRoot; + return node instanceof OwnElement || node instanceof ShadowRoot; + } + var max = Math.max; + var min = Math.min; + var round = Math.round; + function getBoundingClientRect(element, includeScale) { + if (includeScale === void 0) { + includeScale = false; + } + var rect = element.getBoundingClientRect(); + var scaleX = 1; + var scaleY = 1; + if (isHTMLElement(element) && includeScale) { + var offsetHeight = element.offsetHeight; + var offsetWidth = element.offsetWidth; + if (offsetWidth > 0) { + scaleX = round(rect.width) / offsetWidth || 1; + } + if (offsetHeight > 0) { + scaleY = round(rect.height) / offsetHeight || 1; + } + } + return { + width: rect.width / scaleX, + height: rect.height / scaleY, + top: rect.top / scaleY, + right: rect.right / scaleX, + bottom: rect.bottom / scaleY, + left: rect.left / scaleX, + x: rect.left / scaleX, + y: rect.top / scaleY + }; + } + function getWindowScroll(node) { + var win = getWindow(node); + var scrollLeft = win.pageXOffset; + var scrollTop = win.pageYOffset; + return { + scrollLeft, + scrollTop + }; + } + function getHTMLElementScroll(element) { + return { + scrollLeft: element.scrollLeft, + scrollTop: element.scrollTop + }; + } + function getNodeScroll(node) { + if (node === getWindow(node) || !isHTMLElement(node)) { + return getWindowScroll(node); + } else { + return getHTMLElementScroll(node); + } + } + function getNodeName(element) { + return element ? (element.nodeName || "").toLowerCase() : null; + } + function getDocumentElement(element) { + return ((isElement2(element) ? element.ownerDocument : ( + // $FlowFixMe[prop-missing] + element.document + )) || window.document).documentElement; + } + function getWindowScrollBarX(element) { + return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; + } + function getComputedStyle2(element) { + return getWindow(element).getComputedStyle(element); + } + function isScrollParent(element) { + var _getComputedStyle = getComputedStyle2(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY; + return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); + } + function isElementScaled(element) { + var rect = element.getBoundingClientRect(); + var scaleX = round(rect.width) / element.offsetWidth || 1; + var scaleY = round(rect.height) / element.offsetHeight || 1; + return scaleX !== 1 || scaleY !== 1; + } + function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { + if (isFixed === void 0) { + isFixed = false; + } + var isOffsetParentAnElement = isHTMLElement(offsetParent); + var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent); + var documentElement = getDocumentElement(offsetParent); + var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled); + var scroll = { + scrollLeft: 0, + scrollTop: 0 + }; + var offsets = { + x: 0, + y: 0 + }; + if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { + if (getNodeName(offsetParent) !== "body" || // https://github.com/popperjs/popper-core/issues/1078 + isScrollParent(documentElement)) { + scroll = getNodeScroll(offsetParent); + } + if (isHTMLElement(offsetParent)) { + offsets = getBoundingClientRect(offsetParent, true); + offsets.x += offsetParent.clientLeft; + offsets.y += offsetParent.clientTop; + } else if (documentElement) { + offsets.x = getWindowScrollBarX(documentElement); + } + } + return { + x: rect.left + scroll.scrollLeft - offsets.x, + y: rect.top + scroll.scrollTop - offsets.y, + width: rect.width, + height: rect.height + }; + } + function getLayoutRect(element) { + var clientRect = getBoundingClientRect(element); + var width = element.offsetWidth; + var height = element.offsetHeight; + if (Math.abs(clientRect.width - width) <= 1) { + width = clientRect.width; + } + if (Math.abs(clientRect.height - height) <= 1) { + height = clientRect.height; + } + return { + x: element.offsetLeft, + y: element.offsetTop, + width, + height + }; + } + function getParentNode(element) { + if (getNodeName(element) === "html") { + return element; + } + return ( + // this is a quicker (but less type safe) way to save quite some bytes from the bundle + // $FlowFixMe[incompatible-return] + // $FlowFixMe[prop-missing] + element.assignedSlot || // step into the shadow DOM of the parent of a slotted node + element.parentNode || // DOM Element detected + (isShadowRoot(element) ? element.host : null) || // ShadowRoot detected + // $FlowFixMe[incompatible-call]: HTMLElement is a Node + getDocumentElement(element) + ); + } + function getScrollParent(node) { + if (["html", "body", "#document"].indexOf(getNodeName(node)) >= 0) { + return node.ownerDocument.body; + } + if (isHTMLElement(node) && isScrollParent(node)) { + return node; + } + return getScrollParent(getParentNode(node)); + } + function listScrollParents(element, list) { + var _element$ownerDocumen; + if (list === void 0) { + list = []; + } + var scrollParent = getScrollParent(element); + var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body); + var win = getWindow(scrollParent); + var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; + var updatedList = list.concat(target); + return isBody ? updatedList : ( + // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here + updatedList.concat(listScrollParents(getParentNode(target))) + ); + } + function isTableElement(element) { + return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0; + } + function getTrueOffsetParent(element) { + if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837 + getComputedStyle2(element).position === "fixed") { + return null; + } + return element.offsetParent; + } + function getContainingBlock(element) { + var isFirefox = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1; + var isIE = navigator.userAgent.indexOf("Trident") !== -1; + if (isIE && isHTMLElement(element)) { + var elementCss = getComputedStyle2(element); + if (elementCss.position === "fixed") { + return null; + } + } + var currentNode = getParentNode(element); + while (isHTMLElement(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0) { + var css = getComputedStyle2(currentNode); + if (css.transform !== "none" || css.perspective !== "none" || css.contain === "paint" || ["transform", "perspective"].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === "filter" || isFirefox && css.filter && css.filter !== "none") { + return currentNode; + } else { + currentNode = currentNode.parentNode; + } + } + return null; + } + function getOffsetParent(element) { + var window2 = getWindow(element); + var offsetParent = getTrueOffsetParent(element); + while (offsetParent && isTableElement(offsetParent) && getComputedStyle2(offsetParent).position === "static") { + offsetParent = getTrueOffsetParent(offsetParent); + } + if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle2(offsetParent).position === "static")) { + return window2; + } + return offsetParent || getContainingBlock(element) || window2; + } + var top = "top"; + var bottom = "bottom"; + var right = "right"; + var left = "left"; + var auto = "auto"; + var basePlacements = [top, bottom, right, left]; + var start = "start"; + var end = "end"; + var clippingParents = "clippingParents"; + var viewport = "viewport"; + var popper = "popper"; + var reference = "reference"; + var variationPlacements = /* @__PURE__ */ basePlacements.reduce(function(acc, placement) { + return acc.concat([placement + "-" + start, placement + "-" + end]); + }, []); + var placements = /* @__PURE__ */ [].concat(basePlacements, [auto]).reduce(function(acc, placement) { + return acc.concat([placement, placement + "-" + start, placement + "-" + end]); + }, []); + var beforeRead = "beforeRead"; + var read = "read"; + var afterRead = "afterRead"; + var beforeMain = "beforeMain"; + var main = "main"; + var afterMain = "afterMain"; + var beforeWrite = "beforeWrite"; + var write = "write"; + var afterWrite = "afterWrite"; + var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite]; + function order(modifiers) { + var map = /* @__PURE__ */ new Map(); + var visited = /* @__PURE__ */ new Set(); + var result = []; + modifiers.forEach(function(modifier) { + map.set(modifier.name, modifier); + }); + function sort(modifier) { + visited.add(modifier.name); + var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); + requires.forEach(function(dep) { + if (!visited.has(dep)) { + var depModifier = map.get(dep); + if (depModifier) { + sort(depModifier); + } + } + }); + result.push(modifier); + } + modifiers.forEach(function(modifier) { + if (!visited.has(modifier.name)) { + sort(modifier); + } + }); + return result; + } + function orderModifiers(modifiers) { + var orderedModifiers = order(modifiers); + return modifierPhases.reduce(function(acc, phase) { + return acc.concat(orderedModifiers.filter(function(modifier) { + return modifier.phase === phase; + })); + }, []); + } + function debounce(fn) { + var pending; + return function() { + if (!pending) { + pending = new Promise(function(resolve) { + Promise.resolve().then(function() { + pending = void 0; + resolve(fn()); + }); + }); + } + return pending; + }; + } + function format(str) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + return [].concat(args).reduce(function(p, c) { + return p.replace(/%s/, c); + }, str); + } + var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s'; + var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available'; + var VALID_PROPERTIES = ["name", "enabled", "phase", "fn", "effect", "requires", "options"]; + function validateModifiers(modifiers) { + modifiers.forEach(function(modifier) { + [].concat(Object.keys(modifier), VALID_PROPERTIES).filter(function(value, index, self) { + return self.indexOf(value) === index; + }).forEach(function(key) { + switch (key) { + case "name": + if (typeof modifier.name !== "string") { + console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', '"' + String(modifier.name) + '"')); + } + break; + case "enabled": + if (typeof modifier.enabled !== "boolean") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', '"' + String(modifier.enabled) + '"')); + } + break; + case "phase": + if (modifierPhases.indexOf(modifier.phase) < 0) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(", "), '"' + String(modifier.phase) + '"')); + } + break; + case "fn": + if (typeof modifier.fn !== "function") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', '"' + String(modifier.fn) + '"')); + } + break; + case "effect": + if (modifier.effect != null && typeof modifier.effect !== "function") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', '"' + String(modifier.fn) + '"')); + } + break; + case "requires": + if (modifier.requires != null && !Array.isArray(modifier.requires)) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', '"' + String(modifier.requires) + '"')); + } + break; + case "requiresIfExists": + if (!Array.isArray(modifier.requiresIfExists)) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', '"' + String(modifier.requiresIfExists) + '"')); + } + break; + case "options": + case "data": + break; + default: + console.error('PopperJS: an invalid property has been provided to the "' + modifier.name + '" modifier, valid properties are ' + VALID_PROPERTIES.map(function(s) { + return '"' + s + '"'; + }).join(", ") + '; but "' + key + '" was provided.'); + } + modifier.requires && modifier.requires.forEach(function(requirement) { + if (modifiers.find(function(mod) { + return mod.name === requirement; + }) == null) { + console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement)); + } + }); + }); + }); + } + function uniqueBy(arr, fn) { + var identifiers = /* @__PURE__ */ new Set(); + return arr.filter(function(item) { + var identifier = fn(item); + if (!identifiers.has(identifier)) { + identifiers.add(identifier); + return true; + } + }); + } + function getBasePlacement(placement) { + return placement.split("-")[0]; + } + function mergeByName(modifiers) { + var merged = modifiers.reduce(function(merged2, current) { + var existing = merged2[current.name]; + merged2[current.name] = existing ? Object.assign({}, existing, current, { + options: Object.assign({}, existing.options, current.options), + data: Object.assign({}, existing.data, current.data) + }) : current; + return merged2; + }, {}); + return Object.keys(merged).map(function(key) { + return merged[key]; + }); + } + function getViewportRect(element) { + var win = getWindow(element); + var html = getDocumentElement(element); + var visualViewport = win.visualViewport; + var width = html.clientWidth; + var height = html.clientHeight; + var x = 0; + var y = 0; + if (visualViewport) { + width = visualViewport.width; + height = visualViewport.height; + if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { + x = visualViewport.offsetLeft; + y = visualViewport.offsetTop; + } + } + return { + width, + height, + x: x + getWindowScrollBarX(element), + y + }; + } + function getDocumentRect(element) { + var _element$ownerDocumen; + var html = getDocumentElement(element); + var winScroll = getWindowScroll(element); + var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; + var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); + var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); + var x = -winScroll.scrollLeft + getWindowScrollBarX(element); + var y = -winScroll.scrollTop; + if (getComputedStyle2(body || html).direction === "rtl") { + x += max(html.clientWidth, body ? body.clientWidth : 0) - width; + } + return { + width, + height, + x, + y + }; + } + function contains(parent, child) { + var rootNode = child.getRootNode && child.getRootNode(); + if (parent.contains(child)) { + return true; + } else if (rootNode && isShadowRoot(rootNode)) { + var next = child; + do { + if (next && parent.isSameNode(next)) { + return true; + } + next = next.parentNode || next.host; + } while (next); + } + return false; + } + function rectToClientRect(rect) { + return Object.assign({}, rect, { + left: rect.x, + top: rect.y, + right: rect.x + rect.width, + bottom: rect.y + rect.height + }); + } + function getInnerBoundingClientRect(element) { + var rect = getBoundingClientRect(element); + rect.top = rect.top + element.clientTop; + rect.left = rect.left + element.clientLeft; + rect.bottom = rect.top + element.clientHeight; + rect.right = rect.left + element.clientWidth; + rect.width = element.clientWidth; + rect.height = element.clientHeight; + rect.x = rect.left; + rect.y = rect.top; + return rect; + } + function getClientRectFromMixedType(element, clippingParent) { + return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement2(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); + } + function getClippingParents(element) { + var clippingParents2 = listScrollParents(getParentNode(element)); + var canEscapeClipping = ["absolute", "fixed"].indexOf(getComputedStyle2(element).position) >= 0; + var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element; + if (!isElement2(clipperElement)) { + return []; + } + return clippingParents2.filter(function(clippingParent) { + return isElement2(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body" && (canEscapeClipping ? getComputedStyle2(clippingParent).position !== "static" : true); + }); + } + function getClippingRect(element, boundary, rootBoundary) { + var mainClippingParents = boundary === "clippingParents" ? getClippingParents(element) : [].concat(boundary); + var clippingParents2 = [].concat(mainClippingParents, [rootBoundary]); + var firstClippingParent = clippingParents2[0]; + var clippingRect = clippingParents2.reduce(function(accRect, clippingParent) { + var rect = getClientRectFromMixedType(element, clippingParent); + accRect.top = max(rect.top, accRect.top); + accRect.right = min(rect.right, accRect.right); + accRect.bottom = min(rect.bottom, accRect.bottom); + accRect.left = max(rect.left, accRect.left); + return accRect; + }, getClientRectFromMixedType(element, firstClippingParent)); + clippingRect.width = clippingRect.right - clippingRect.left; + clippingRect.height = clippingRect.bottom - clippingRect.top; + clippingRect.x = clippingRect.left; + clippingRect.y = clippingRect.top; + return clippingRect; + } + function getVariation(placement) { + return placement.split("-")[1]; + } + function getMainAxisFromPlacement(placement) { + return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y"; + } + function computeOffsets(_ref) { + var reference2 = _ref.reference, element = _ref.element, placement = _ref.placement; + var basePlacement = placement ? getBasePlacement(placement) : null; + var variation = placement ? getVariation(placement) : null; + var commonX = reference2.x + reference2.width / 2 - element.width / 2; + var commonY = reference2.y + reference2.height / 2 - element.height / 2; + var offsets; + switch (basePlacement) { + case top: + offsets = { + x: commonX, + y: reference2.y - element.height + }; + break; + case bottom: + offsets = { + x: commonX, + y: reference2.y + reference2.height + }; + break; + case right: + offsets = { + x: reference2.x + reference2.width, + y: commonY + }; + break; + case left: + offsets = { + x: reference2.x - element.width, + y: commonY + }; + break; + default: + offsets = { + x: reference2.x, + y: reference2.y + }; + } + var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null; + if (mainAxis != null) { + var len = mainAxis === "y" ? "height" : "width"; + switch (variation) { + case start: + offsets[mainAxis] = offsets[mainAxis] - (reference2[len] / 2 - element[len] / 2); + break; + case end: + offsets[mainAxis] = offsets[mainAxis] + (reference2[len] / 2 - element[len] / 2); + break; + } + } + return offsets; + } + function getFreshSideObject() { + return { + top: 0, + right: 0, + bottom: 0, + left: 0 + }; + } + function mergePaddingObject(paddingObject) { + return Object.assign({}, getFreshSideObject(), paddingObject); + } + function expandToHashMap(value, keys) { + return keys.reduce(function(hashMap, key) { + hashMap[key] = value; + return hashMap; + }, {}); + } + function detectOverflow(state, options) { + if (options === void 0) { + options = {}; + } + var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding; + var paddingObject = mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements)); + var altContext = elementContext === popper ? reference : popper; + var popperRect = state.rects.popper; + var element = state.elements[altBoundary ? altContext : elementContext]; + var clippingClientRect = getClippingRect(isElement2(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary); + var referenceClientRect = getBoundingClientRect(state.elements.reference); + var popperOffsets2 = computeOffsets({ + reference: referenceClientRect, + element: popperRect, + strategy: "absolute", + placement + }); + var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets2)); + var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; + var overflowOffsets = { + top: clippingClientRect.top - elementClientRect.top + paddingObject.top, + bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, + left: clippingClientRect.left - elementClientRect.left + paddingObject.left, + right: elementClientRect.right - clippingClientRect.right + paddingObject.right + }; + var offsetData = state.modifiersData.offset; + if (elementContext === popper && offsetData) { + var offset2 = offsetData[placement]; + Object.keys(overflowOffsets).forEach(function(key) { + var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1; + var axis = [top, bottom].indexOf(key) >= 0 ? "y" : "x"; + overflowOffsets[key] += offset2[axis] * multiply; + }); + } + return overflowOffsets; + } + var INVALID_ELEMENT_ERROR = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element."; + var INFINITE_LOOP_ERROR = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash."; + var DEFAULT_OPTIONS = { + placement: "bottom", + modifiers: [], + strategy: "absolute" + }; + function areValidElements() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + return !args.some(function(element) { + return !(element && typeof element.getBoundingClientRect === "function"); + }); + } + function popperGenerator(generatorOptions) { + if (generatorOptions === void 0) { + generatorOptions = {}; + } + var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers2 = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2; + return function createPopper3(reference2, popper2, options) { + if (options === void 0) { + options = defaultOptions; + } + var state = { + placement: "bottom", + orderedModifiers: [], + options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), + modifiersData: {}, + elements: { + reference: reference2, + popper: popper2 + }, + attributes: {}, + styles: {} + }; + var effectCleanupFns = []; + var isDestroyed = false; + var instance = { + state, + setOptions: function setOptions(setOptionsAction) { + var options2 = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction; + cleanupModifierEffects(); + state.options = Object.assign({}, defaultOptions, state.options, options2); + state.scrollParents = { + reference: isElement2(reference2) ? listScrollParents(reference2) : reference2.contextElement ? listScrollParents(reference2.contextElement) : [], + popper: listScrollParents(popper2) + }; + var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers2, state.options.modifiers))); + state.orderedModifiers = orderedModifiers.filter(function(m) { + return m.enabled; + }); + if (true) { + var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function(_ref) { + var name = _ref.name; + return name; + }); + validateModifiers(modifiers); + if (getBasePlacement(state.options.placement) === auto) { + var flipModifier = state.orderedModifiers.find(function(_ref2) { + var name = _ref2.name; + return name === "flip"; + }); + if (!flipModifier) { + console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" ")); + } + } + var _getComputedStyle = getComputedStyle2(popper2), marginTop = _getComputedStyle.marginTop, marginRight = _getComputedStyle.marginRight, marginBottom = _getComputedStyle.marginBottom, marginLeft = _getComputedStyle.marginLeft; + if ([marginTop, marginRight, marginBottom, marginLeft].some(function(margin) { + return parseFloat(margin); + })) { + console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" ")); + } + } + runModifierEffects(); + return instance.update(); + }, + // Sync update – it will always be executed, even if not necessary. This + // is useful for low frequency updates where sync behavior simplifies the + // logic. + // For high frequency updates (e.g. `resize` and `scroll` events), always + // prefer the async Popper#update method + forceUpdate: function forceUpdate() { + if (isDestroyed) { + return; + } + var _state$elements = state.elements, reference3 = _state$elements.reference, popper3 = _state$elements.popper; + if (!areValidElements(reference3, popper3)) { + if (true) { + console.error(INVALID_ELEMENT_ERROR); + } + return; + } + state.rects = { + reference: getCompositeRect(reference3, getOffsetParent(popper3), state.options.strategy === "fixed"), + popper: getLayoutRect(popper3) + }; + state.reset = false; + state.placement = state.options.placement; + state.orderedModifiers.forEach(function(modifier) { + return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); + }); + var __debug_loops__ = 0; + for (var index = 0; index < state.orderedModifiers.length; index++) { + if (true) { + __debug_loops__ += 1; + if (__debug_loops__ > 100) { + console.error(INFINITE_LOOP_ERROR); + break; + } + } + if (state.reset === true) { + state.reset = false; + index = -1; + continue; + } + var _state$orderedModifie = state.orderedModifiers[index], fn = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name; + if (typeof fn === "function") { + state = fn({ + state, + options: _options, + name, + instance + }) || state; + } + } + }, + // Async and optimistically optimized update – it will not be executed if + // not necessary (debounced to run at most once-per-tick) + update: debounce(function() { + return new Promise(function(resolve) { + instance.forceUpdate(); + resolve(state); + }); + }), + destroy: function destroy() { + cleanupModifierEffects(); + isDestroyed = true; + } + }; + if (!areValidElements(reference2, popper2)) { + if (true) { + console.error(INVALID_ELEMENT_ERROR); + } + return instance; + } + instance.setOptions(options).then(function(state2) { + if (!isDestroyed && options.onFirstUpdate) { + options.onFirstUpdate(state2); + } + }); + function runModifierEffects() { + state.orderedModifiers.forEach(function(_ref3) { + var name = _ref3.name, _ref3$options = _ref3.options, options2 = _ref3$options === void 0 ? {} : _ref3$options, effect2 = _ref3.effect; + if (typeof effect2 === "function") { + var cleanupFn = effect2({ + state, + name, + instance, + options: options2 + }); + var noopFn = function noopFn2() { + }; + effectCleanupFns.push(cleanupFn || noopFn); + } + }); + } + function cleanupModifierEffects() { + effectCleanupFns.forEach(function(fn) { + return fn(); + }); + effectCleanupFns = []; + } + return instance; + }; + } + var passive = { + passive: true + }; + function effect$2(_ref) { + var state = _ref.state, instance = _ref.instance, options = _ref.options; + var _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? true : _options$resize; + var window2 = getWindow(state.elements.popper); + var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper); + if (scroll) { + scrollParents.forEach(function(scrollParent) { + scrollParent.addEventListener("scroll", instance.update, passive); + }); + } + if (resize) { + window2.addEventListener("resize", instance.update, passive); + } + return function() { + if (scroll) { + scrollParents.forEach(function(scrollParent) { + scrollParent.removeEventListener("scroll", instance.update, passive); + }); + } + if (resize) { + window2.removeEventListener("resize", instance.update, passive); + } + }; + } + var eventListeners = { + name: "eventListeners", + enabled: true, + phase: "write", + fn: function fn() { + }, + effect: effect$2, + data: {} + }; + function popperOffsets(_ref) { + var state = _ref.state, name = _ref.name; + state.modifiersData[name] = computeOffsets({ + reference: state.rects.reference, + element: state.rects.popper, + strategy: "absolute", + placement: state.placement + }); + } + var popperOffsets$1 = { + name: "popperOffsets", + enabled: true, + phase: "read", + fn: popperOffsets, + data: {} + }; + var unsetSides = { + top: "auto", + right: "auto", + bottom: "auto", + left: "auto" + }; + function roundOffsetsByDPR(_ref) { + var x = _ref.x, y = _ref.y; + var win = window; + var dpr = win.devicePixelRatio || 1; + return { + x: round(x * dpr) / dpr || 0, + y: round(y * dpr) / dpr || 0 + }; + } + function mapToStyles(_ref2) { + var _Object$assign2; + var popper2 = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed; + var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === "function" ? roundOffsets(offsets) : offsets, _ref3$x = _ref3.x, x = _ref3$x === void 0 ? 0 : _ref3$x, _ref3$y = _ref3.y, y = _ref3$y === void 0 ? 0 : _ref3$y; + var hasX = offsets.hasOwnProperty("x"); + var hasY = offsets.hasOwnProperty("y"); + var sideX = left; + var sideY = top; + var win = window; + if (adaptive) { + var offsetParent = getOffsetParent(popper2); + var heightProp = "clientHeight"; + var widthProp = "clientWidth"; + if (offsetParent === getWindow(popper2)) { + offsetParent = getDocumentElement(popper2); + if (getComputedStyle2(offsetParent).position !== "static" && position === "absolute") { + heightProp = "scrollHeight"; + widthProp = "scrollWidth"; + } + } + offsetParent = offsetParent; + if (placement === top || (placement === left || placement === right) && variation === end) { + sideY = bottom; + var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : ( + // $FlowFixMe[prop-missing] + offsetParent[heightProp] + ); + y -= offsetY - popperRect.height; + y *= gpuAcceleration ? 1 : -1; + } + if (placement === left || (placement === top || placement === bottom) && variation === end) { + sideX = right; + var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : ( + // $FlowFixMe[prop-missing] + offsetParent[widthProp] + ); + x -= offsetX - popperRect.width; + x *= gpuAcceleration ? 1 : -1; + } + } + var commonStyles = Object.assign({ + position + }, adaptive && unsetSides); + if (gpuAcceleration) { + var _Object$assign; + return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); + } + return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2)); + } + function computeStyles(_ref4) { + var state = _ref4.state, options = _ref4.options; + var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; + if (true) { + var transitionProperty = getComputedStyle2(state.elements.popper).transitionProperty || ""; + if (adaptive && ["transform", "top", "right", "bottom", "left"].some(function(property) { + return transitionProperty.indexOf(property) >= 0; + })) { + console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', "\n\n", 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", "\n\n", "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" ")); + } + } + var commonStyles = { + placement: getBasePlacement(state.placement), + variation: getVariation(state.placement), + popper: state.elements.popper, + popperRect: state.rects.popper, + gpuAcceleration, + isFixed: state.options.strategy === "fixed" + }; + if (state.modifiersData.popperOffsets != null) { + state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.popperOffsets, + position: state.options.strategy, + adaptive, + roundOffsets + }))); + } + if (state.modifiersData.arrow != null) { + state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.arrow, + position: "absolute", + adaptive: false, + roundOffsets + }))); + } + state.attributes.popper = Object.assign({}, state.attributes.popper, { + "data-popper-placement": state.placement + }); + } + var computeStyles$1 = { + name: "computeStyles", + enabled: true, + phase: "beforeWrite", + fn: computeStyles, + data: {} + }; + function applyStyles(_ref) { + var state = _ref.state; + Object.keys(state.elements).forEach(function(name) { + var style = state.styles[name] || {}; + var attributes = state.attributes[name] || {}; + var element = state.elements[name]; + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } + Object.assign(element.style, style); + Object.keys(attributes).forEach(function(name2) { + var value = attributes[name2]; + if (value === false) { + element.removeAttribute(name2); + } else { + element.setAttribute(name2, value === true ? "" : value); + } + }); + }); + } + function effect$1(_ref2) { + var state = _ref2.state; + var initialStyles = { + popper: { + position: state.options.strategy, + left: "0", + top: "0", + margin: "0" + }, + arrow: { + position: "absolute" + }, + reference: {} + }; + Object.assign(state.elements.popper.style, initialStyles.popper); + state.styles = initialStyles; + if (state.elements.arrow) { + Object.assign(state.elements.arrow.style, initialStyles.arrow); + } + return function() { + Object.keys(state.elements).forEach(function(name) { + var element = state.elements[name]; + var attributes = state.attributes[name] || {}; + var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); + var style = styleProperties.reduce(function(style2, property) { + style2[property] = ""; + return style2; + }, {}); + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } + Object.assign(element.style, style); + Object.keys(attributes).forEach(function(attribute) { + element.removeAttribute(attribute); + }); + }); + }; + } + var applyStyles$1 = { + name: "applyStyles", + enabled: true, + phase: "write", + fn: applyStyles, + effect: effect$1, + requires: ["computeStyles"] + }; + function distanceAndSkiddingToXY(placement, rects, offset2) { + var basePlacement = getBasePlacement(placement); + var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1; + var _ref = typeof offset2 === "function" ? offset2(Object.assign({}, rects, { + placement + })) : offset2, skidding = _ref[0], distance = _ref[1]; + skidding = skidding || 0; + distance = (distance || 0) * invertDistance; + return [left, right].indexOf(basePlacement) >= 0 ? { + x: distance, + y: skidding + } : { + x: skidding, + y: distance + }; + } + function offset(_ref2) { + var state = _ref2.state, options = _ref2.options, name = _ref2.name; + var _options$offset = options.offset, offset2 = _options$offset === void 0 ? [0, 0] : _options$offset; + var data = placements.reduce(function(acc, placement) { + acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset2); + return acc; + }, {}); + var _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y; + if (state.modifiersData.popperOffsets != null) { + state.modifiersData.popperOffsets.x += x; + state.modifiersData.popperOffsets.y += y; + } + state.modifiersData[name] = data; + } + var offset$1 = { + name: "offset", + enabled: true, + phase: "main", + requires: ["popperOffsets"], + fn: offset + }; + var hash$1 = { + left: "right", + right: "left", + bottom: "top", + top: "bottom" + }; + function getOppositePlacement(placement) { + return placement.replace(/left|right|bottom|top/g, function(matched) { + return hash$1[matched]; + }); + } + var hash = { + start: "end", + end: "start" + }; + function getOppositeVariationPlacement(placement) { + return placement.replace(/start|end/g, function(matched) { + return hash[matched]; + }); + } + function computeAutoPlacement(state, options) { + if (options === void 0) { + options = {}; + } + var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP; + var variation = getVariation(placement); + var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function(placement2) { + return getVariation(placement2) === variation; + }) : basePlacements; + var allowedPlacements = placements$1.filter(function(placement2) { + return allowedAutoPlacements.indexOf(placement2) >= 0; + }); + if (allowedPlacements.length === 0) { + allowedPlacements = placements$1; + if (true) { + console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" ")); + } + } + var overflows = allowedPlacements.reduce(function(acc, placement2) { + acc[placement2] = detectOverflow(state, { + placement: placement2, + boundary, + rootBoundary, + padding + })[getBasePlacement(placement2)]; + return acc; + }, {}); + return Object.keys(overflows).sort(function(a, b) { + return overflows[a] - overflows[b]; + }); + } + function getExpandedFallbackPlacements(placement) { + if (getBasePlacement(placement) === auto) { + return []; + } + var oppositePlacement = getOppositePlacement(placement); + return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; + } + function flip(_ref) { + var state = _ref.state, options = _ref.options, name = _ref.name; + if (state.modifiersData[name]._skip) { + return; + } + var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements; + var preferredPlacement = state.options.placement; + var basePlacement = getBasePlacement(preferredPlacement); + var isBasePlacement = basePlacement === preferredPlacement; + var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)); + var placements2 = [preferredPlacement].concat(fallbackPlacements).reduce(function(acc, placement2) { + return acc.concat(getBasePlacement(placement2) === auto ? computeAutoPlacement(state, { + placement: placement2, + boundary, + rootBoundary, + padding, + flipVariations, + allowedAutoPlacements + }) : placement2); + }, []); + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var checksMap = /* @__PURE__ */ new Map(); + var makeFallbackChecks = true; + var firstFittingPlacement = placements2[0]; + for (var i = 0; i < placements2.length; i++) { + var placement = placements2[i]; + var _basePlacement = getBasePlacement(placement); + var isStartVariation = getVariation(placement) === start; + var isVertical = [top, bottom].indexOf(_basePlacement) >= 0; + var len = isVertical ? "width" : "height"; + var overflow = detectOverflow(state, { + placement, + boundary, + rootBoundary, + altBoundary, + padding + }); + var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top; + if (referenceRect[len] > popperRect[len]) { + mainVariationSide = getOppositePlacement(mainVariationSide); + } + var altVariationSide = getOppositePlacement(mainVariationSide); + var checks = []; + if (checkMainAxis) { + checks.push(overflow[_basePlacement] <= 0); + } + if (checkAltAxis) { + checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0); + } + if (checks.every(function(check) { + return check; + })) { + firstFittingPlacement = placement; + makeFallbackChecks = false; + break; + } + checksMap.set(placement, checks); + } + if (makeFallbackChecks) { + var numberOfChecks = flipVariations ? 3 : 1; + var _loop = function _loop2(_i2) { + var fittingPlacement = placements2.find(function(placement2) { + var checks2 = checksMap.get(placement2); + if (checks2) { + return checks2.slice(0, _i2).every(function(check) { + return check; + }); + } + }); + if (fittingPlacement) { + firstFittingPlacement = fittingPlacement; + return "break"; + } + }; + for (var _i = numberOfChecks; _i > 0; _i--) { + var _ret = _loop(_i); + if (_ret === "break") break; + } + } + if (state.placement !== firstFittingPlacement) { + state.modifiersData[name]._skip = true; + state.placement = firstFittingPlacement; + state.reset = true; + } + } + var flip$1 = { + name: "flip", + enabled: true, + phase: "main", + fn: flip, + requiresIfExists: ["offset"], + data: { + _skip: false + } + }; + function getAltAxis(axis) { + return axis === "x" ? "y" : "x"; + } + function within(min$1, value, max$1) { + return max(min$1, min(value, max$1)); + } + function withinMaxClamp(min2, value, max2) { + var v = within(min2, value, max2); + return v > max2 ? max2 : v; + } + function preventOverflow(_ref) { + var state = _ref.state, options = _ref.options, name = _ref.name; + var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset; + var overflow = detectOverflow(state, { + boundary, + rootBoundary, + padding, + altBoundary + }); + var basePlacement = getBasePlacement(state.placement); + var variation = getVariation(state.placement); + var isBasePlacement = !variation; + var mainAxis = getMainAxisFromPlacement(basePlacement); + var altAxis = getAltAxis(mainAxis); + var popperOffsets2 = state.modifiersData.popperOffsets; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var tetherOffsetValue = typeof tetherOffset === "function" ? tetherOffset(Object.assign({}, state.rects, { + placement: state.placement + })) : tetherOffset; + var normalizedTetherOffsetValue = typeof tetherOffsetValue === "number" ? { + mainAxis: tetherOffsetValue, + altAxis: tetherOffsetValue + } : Object.assign({ + mainAxis: 0, + altAxis: 0 + }, tetherOffsetValue); + var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null; + var data = { + x: 0, + y: 0 + }; + if (!popperOffsets2) { + return; + } + if (checkMainAxis) { + var _offsetModifierState$; + var mainSide = mainAxis === "y" ? top : left; + var altSide = mainAxis === "y" ? bottom : right; + var len = mainAxis === "y" ? "height" : "width"; + var offset2 = popperOffsets2[mainAxis]; + var min$1 = offset2 + overflow[mainSide]; + var max$1 = offset2 - overflow[altSide]; + var additive = tether ? -popperRect[len] / 2 : 0; + var minLen = variation === start ? referenceRect[len] : popperRect[len]; + var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; + var arrowElement = state.elements.arrow; + var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { + width: 0, + height: 0 + }; + var arrowPaddingObject = state.modifiersData["arrow#persistent"] ? state.modifiersData["arrow#persistent"].padding : getFreshSideObject(); + var arrowPaddingMin = arrowPaddingObject[mainSide]; + var arrowPaddingMax = arrowPaddingObject[altSide]; + var arrowLen = within(0, referenceRect[len], arrowRect[len]); + var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis; + var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; + var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); + var clientOffset = arrowOffsetParent ? mainAxis === "y" ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; + var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0; + var tetherMin = offset2 + minOffset - offsetModifierValue - clientOffset; + var tetherMax = offset2 + maxOffset - offsetModifierValue; + var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset2, tether ? max(max$1, tetherMax) : max$1); + popperOffsets2[mainAxis] = preventedOffset; + data[mainAxis] = preventedOffset - offset2; + } + if (checkAltAxis) { + var _offsetModifierState$2; + var _mainSide = mainAxis === "x" ? top : left; + var _altSide = mainAxis === "x" ? bottom : right; + var _offset = popperOffsets2[altAxis]; + var _len = altAxis === "y" ? "height" : "width"; + var _min = _offset + overflow[_mainSide]; + var _max = _offset - overflow[_altSide]; + var isOriginSide = [top, left].indexOf(basePlacement) !== -1; + var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0; + var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis; + var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max; + var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max); + popperOffsets2[altAxis] = _preventedOffset; + data[altAxis] = _preventedOffset - _offset; + } + state.modifiersData[name] = data; + } + var preventOverflow$1 = { + name: "preventOverflow", + enabled: true, + phase: "main", + fn: preventOverflow, + requiresIfExists: ["offset"] + }; + var toPaddingObject = function toPaddingObject2(padding, state) { + padding = typeof padding === "function" ? padding(Object.assign({}, state.rects, { + placement: state.placement + })) : padding; + return mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements)); + }; + function arrow(_ref) { + var _state$modifiersData$; + var state = _ref.state, name = _ref.name, options = _ref.options; + var arrowElement = state.elements.arrow; + var popperOffsets2 = state.modifiersData.popperOffsets; + var basePlacement = getBasePlacement(state.placement); + var axis = getMainAxisFromPlacement(basePlacement); + var isVertical = [left, right].indexOf(basePlacement) >= 0; + var len = isVertical ? "height" : "width"; + if (!arrowElement || !popperOffsets2) { + return; + } + var paddingObject = toPaddingObject(options.padding, state); + var arrowRect = getLayoutRect(arrowElement); + var minProp = axis === "y" ? top : left; + var maxProp = axis === "y" ? bottom : right; + var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets2[axis] - state.rects.popper[len]; + var startDiff = popperOffsets2[axis] - state.rects.reference[axis]; + var arrowOffsetParent = getOffsetParent(arrowElement); + var clientSize = arrowOffsetParent ? axis === "y" ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0; + var centerToReference = endDiff / 2 - startDiff / 2; + var min2 = paddingObject[minProp]; + var max2 = clientSize - arrowRect[len] - paddingObject[maxProp]; + var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference; + var offset2 = within(min2, center, max2); + var axisProp = axis; + state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset2, _state$modifiersData$.centerOffset = offset2 - center, _state$modifiersData$); + } + function effect(_ref2) { + var state = _ref2.state, options = _ref2.options; + var _options$element = options.element, arrowElement = _options$element === void 0 ? "[data-popper-arrow]" : _options$element; + if (arrowElement == null) { + return; + } + if (typeof arrowElement === "string") { + arrowElement = state.elements.popper.querySelector(arrowElement); + if (!arrowElement) { + return; + } + } + if (true) { + if (!isHTMLElement(arrowElement)) { + console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', "To use an SVG arrow, wrap it in an HTMLElement that will be used as", "the arrow."].join(" ")); + } + } + if (!contains(state.elements.popper, arrowElement)) { + if (true) { + console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" ")); + } + return; + } + state.elements.arrow = arrowElement; + } + var arrow$1 = { + name: "arrow", + enabled: true, + phase: "main", + fn: arrow, + effect, + requires: ["popperOffsets"], + requiresIfExists: ["preventOverflow"] + }; + function getSideOffsets(overflow, rect, preventedOffsets) { + if (preventedOffsets === void 0) { + preventedOffsets = { + x: 0, + y: 0 + }; + } + return { + top: overflow.top - rect.height - preventedOffsets.y, + right: overflow.right - rect.width + preventedOffsets.x, + bottom: overflow.bottom - rect.height + preventedOffsets.y, + left: overflow.left - rect.width - preventedOffsets.x + }; + } + function isAnySideFullyClipped(overflow) { + return [top, right, bottom, left].some(function(side) { + return overflow[side] >= 0; + }); + } + function hide(_ref) { + var state = _ref.state, name = _ref.name; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var preventedOffsets = state.modifiersData.preventOverflow; + var referenceOverflow = detectOverflow(state, { + elementContext: "reference" + }); + var popperAltOverflow = detectOverflow(state, { + altBoundary: true + }); + var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect); + var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets); + var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets); + var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); + state.modifiersData[name] = { + referenceClippingOffsets, + popperEscapeOffsets, + isReferenceHidden, + hasPopperEscaped + }; + state.attributes.popper = Object.assign({}, state.attributes.popper, { + "data-popper-reference-hidden": isReferenceHidden, + "data-popper-escaped": hasPopperEscaped + }); + } + var hide$1 = { + name: "hide", + enabled: true, + phase: "main", + requiresIfExists: ["preventOverflow"], + fn: hide + }; + var defaultModifiers$1 = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1]; + var createPopper$1 = /* @__PURE__ */ popperGenerator({ + defaultModifiers: defaultModifiers$1 + }); + var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1]; + var createPopper2 = /* @__PURE__ */ popperGenerator({ + defaultModifiers + }); + exports.applyStyles = applyStyles$1; + exports.arrow = arrow$1; + exports.computeStyles = computeStyles$1; + exports.createPopper = createPopper2; + exports.createPopperLite = createPopper$1; + exports.defaultModifiers = defaultModifiers; + exports.detectOverflow = detectOverflow; + exports.eventListeners = eventListeners; + exports.flip = flip$1; + exports.hide = hide$1; + exports.offset = offset$1; + exports.popperGenerator = popperGenerator; + exports.popperOffsets = popperOffsets$1; + exports.preventOverflow = preventOverflow$1; + } + }); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/data.js + var elementMap = /* @__PURE__ */ new Map(); + var data_default = { + set(element, key, instance) { + if (!elementMap.has(element)) { + elementMap.set(element, /* @__PURE__ */ new Map()); + } + const instanceMap = elementMap.get(element); + if (!instanceMap.has(key) && instanceMap.size !== 0) { + console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`); + return; + } + instanceMap.set(key, instance); + }, + get(element, key) { + if (elementMap.has(element)) { + return elementMap.get(element).get(key) || null; + } + return null; + }, + remove(element, key) { + if (!elementMap.has(element)) { + return; + } + const instanceMap = elementMap.get(element); + instanceMap.delete(key); + if (instanceMap.size === 0) { + elementMap.delete(element); + } + } + }; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/index.js + var MAX_UID = 1e6; + var MILLISECONDS_MULTIPLIER = 1e3; + var TRANSITION_END = "transitionend"; + var parseSelector = (selector) => { + if (selector && window.CSS && window.CSS.escape) { + selector = selector.replace(/#([^\s"#']+)/g, (match, id) => `#${CSS.escape(id)}`); + } + return selector; + }; + var toType = (object) => { + if (object === null || object === void 0) { + return `${object}`; + } + return Object.prototype.toString.call(object).match(/\s([a-z]+)/i)[1].toLowerCase(); + }; + var getUID = (prefix) => { + do { + prefix += Math.floor(Math.random() * MAX_UID); + } while (document.getElementById(prefix)); + return prefix; + }; + var getTransitionDurationFromElement = (element) => { + if (!element) { + return 0; + } + let { transitionDuration, transitionDelay } = window.getComputedStyle(element); + const floatTransitionDuration = Number.parseFloat(transitionDuration); + const floatTransitionDelay = Number.parseFloat(transitionDelay); + if (!floatTransitionDuration && !floatTransitionDelay) { + return 0; + } + transitionDuration = transitionDuration.split(",")[0]; + transitionDelay = transitionDelay.split(",")[0]; + return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; + }; + var triggerTransitionEnd = (element) => { + element.dispatchEvent(new Event(TRANSITION_END)); + }; + var isElement = (object) => { + if (!object || typeof object !== "object") { + return false; + } + if (typeof object.jquery !== "undefined") { + object = object[0]; + } + return typeof object.nodeType !== "undefined"; + }; + var getElement = (object) => { + if (isElement(object)) { + return object.jquery ? object[0] : object; + } + if (typeof object === "string" && object.length > 0) { + return document.querySelector(parseSelector(object)); + } + return null; + }; + var isVisible = (element) => { + if (!isElement(element) || element.getClientRects().length === 0) { + return false; + } + const elementIsVisible = getComputedStyle(element).getPropertyValue("visibility") === "visible"; + const closedDetails = element.closest("details:not([open])"); + if (!closedDetails) { + return elementIsVisible; + } + if (closedDetails !== element) { + const summary = element.closest("summary"); + if (summary && summary.parentNode !== closedDetails) { + return false; + } + if (summary === null) { + return false; + } + } + return elementIsVisible; + }; + var isDisabled = (element) => { + if (!element || element.nodeType !== Node.ELEMENT_NODE) { + return true; + } + if (element.classList.contains("disabled")) { + return true; + } + if (typeof element.disabled !== "undefined") { + return element.disabled; + } + return element.hasAttribute("disabled") && element.getAttribute("disabled") !== "false"; + }; + var findShadowRoot = (element) => { + if (!document.documentElement.attachShadow) { + return null; + } + if (typeof element.getRootNode === "function") { + const root = element.getRootNode(); + return root instanceof ShadowRoot ? root : null; + } + if (element instanceof ShadowRoot) { + return element; + } + if (!element.parentNode) { + return null; + } + return findShadowRoot(element.parentNode); + }; + var noop = () => { + }; + var reflow = (element) => { + element.offsetHeight; + }; + var getjQuery = () => { + if (window.jQuery && !document.body.hasAttribute("data-bs-no-jquery")) { + return window.jQuery; + } + return null; + }; + var DOMContentLoadedCallbacks = []; + var onDOMContentLoaded = (callback) => { + if (document.readyState === "loading") { + if (!DOMContentLoadedCallbacks.length) { + document.addEventListener("DOMContentLoaded", () => { + for (const callback2 of DOMContentLoadedCallbacks) { + callback2(); + } + }); + } + DOMContentLoadedCallbacks.push(callback); + } else { + callback(); + } + }; + var isRTL = () => document.documentElement.dir === "rtl"; + var defineJQueryPlugin = (plugin) => { + onDOMContentLoaded(() => { + const $ = getjQuery(); + if ($) { + const name = plugin.NAME; + const JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; + $.fn[name].noConflict = () => { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; + } + }); + }; + var execute = (possibleCallback, args = [], defaultValue = possibleCallback) => { + return typeof possibleCallback === "function" ? possibleCallback.call(...args) : defaultValue; + }; + var executeAfterTransition = (callback, transitionElement, waitForTransition = true) => { + if (!waitForTransition) { + execute(callback); + return; + } + const durationPadding = 5; + const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding; + let called = false; + const handler = ({ target }) => { + if (target !== transitionElement) { + return; + } + called = true; + transitionElement.removeEventListener(TRANSITION_END, handler); + execute(callback); + }; + transitionElement.addEventListener(TRANSITION_END, handler); + setTimeout(() => { + if (!called) { + triggerTransitionEnd(transitionElement); + } + }, emulatedDuration); + }; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/event-handler.js + var namespaceRegex = /[^.]*(?=\..*)\.|.*/; + var stripNameRegex = /\..*/; + var stripUidRegex = /::\d+$/; + var eventRegistry = {}; + var uidEvent = 1; + var customEvents = { + mouseenter: "mouseover", + mouseleave: "mouseout" + }; + var nativeEvents = /* @__PURE__ */ new Set([ + "click", + "dblclick", + "mouseup", + "mousedown", + "contextmenu", + "mousewheel", + "DOMMouseScroll", + "mouseover", + "mouseout", + "mousemove", + "selectstart", + "selectend", + "keydown", + "keypress", + "keyup", + "orientationchange", + "touchstart", + "touchmove", + "touchend", + "touchcancel", + "pointerdown", + "pointermove", + "pointerup", + "pointerleave", + "pointercancel", + "gesturestart", + "gesturechange", + "gestureend", + "focus", + "blur", + "change", + "reset", + "select", + "submit", + "focusin", + "focusout", + "load", + "unload", + "beforeunload", + "resize", + "move", + "DOMContentLoaded", + "readystatechange", + "error", + "abort", + "scroll" + ]); + function makeEventUid(element, uid) { + return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++; + } + function getElementEvents(element) { + const uid = makeEventUid(element); + element.uidEvent = uid; + eventRegistry[uid] = eventRegistry[uid] || {}; + return eventRegistry[uid]; + } + function bootstrapHandler(element, fn) { + return function handler(event) { + hydrateObj(event, { delegateTarget: element }); + if (handler.oneOff) { + EventHandler.off(element, event.type, fn); + } + return fn.apply(element, [event]); + }; + } + function bootstrapDelegationHandler(element, selector, fn) { + return function handler(event) { + const domElements = element.querySelectorAll(selector); + for (let { target } = event; target && target !== this; target = target.parentNode) { + for (const domElement of domElements) { + if (domElement !== target) { + continue; + } + hydrateObj(event, { delegateTarget: target }); + if (handler.oneOff) { + EventHandler.off(element, event.type, selector, fn); + } + return fn.apply(target, [event]); + } + } + }; + } + function findHandler(events, callable, delegationSelector = null) { + return Object.values(events).find((event) => event.callable === callable && event.delegationSelector === delegationSelector); + } + function normalizeParameters(originalTypeEvent, handler, delegationFunction) { + const isDelegated = typeof handler === "string"; + const callable = isDelegated ? delegationFunction : handler || delegationFunction; + let typeEvent = getTypeEvent(originalTypeEvent); + if (!nativeEvents.has(typeEvent)) { + typeEvent = originalTypeEvent; + } + return [isDelegated, callable, typeEvent]; + } + function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) { + if (typeof originalTypeEvent !== "string" || !element) { + return; + } + let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); + if (originalTypeEvent in customEvents) { + const wrapFunction = (fn2) => { + return function(event) { + if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) { + return fn2.call(this, event); + } + }; + }; + callable = wrapFunction(callable); + } + const events = getElementEvents(element); + const handlers = events[typeEvent] || (events[typeEvent] = {}); + const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null); + if (previousFunction) { + previousFunction.oneOff = previousFunction.oneOff && oneOff; + return; + } + const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, "")); + const fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable); + fn.delegationSelector = isDelegated ? handler : null; + fn.callable = callable; + fn.oneOff = oneOff; + fn.uidEvent = uid; + handlers[uid] = fn; + element.addEventListener(typeEvent, fn, isDelegated); + } + function removeHandler(element, events, typeEvent, handler, delegationSelector) { + const fn = findHandler(events[typeEvent], handler, delegationSelector); + if (!fn) { + return; + } + element.removeEventListener(typeEvent, fn, Boolean(delegationSelector)); + delete events[typeEvent][fn.uidEvent]; + } + function removeNamespacedHandlers(element, events, typeEvent, namespace) { + const storeElementEvent = events[typeEvent] || {}; + for (const [handlerKey, event] of Object.entries(storeElementEvent)) { + if (handlerKey.includes(namespace)) { + removeHandler(element, events, typeEvent, event.callable, event.delegationSelector); + } + } + } + function getTypeEvent(event) { + event = event.replace(stripNameRegex, ""); + return customEvents[event] || event; + } + var EventHandler = { + on(element, event, handler, delegationFunction) { + addHandler(element, event, handler, delegationFunction, false); + }, + one(element, event, handler, delegationFunction) { + addHandler(element, event, handler, delegationFunction, true); + }, + off(element, originalTypeEvent, handler, delegationFunction) { + if (typeof originalTypeEvent !== "string" || !element) { + return; + } + const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); + const inNamespace = typeEvent !== originalTypeEvent; + const events = getElementEvents(element); + const storeElementEvent = events[typeEvent] || {}; + const isNamespace = originalTypeEvent.startsWith("."); + if (typeof callable !== "undefined") { + if (!Object.keys(storeElementEvent).length) { + return; + } + removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null); + return; + } + if (isNamespace) { + for (const elementEvent of Object.keys(events)) { + removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1)); + } + } + for (const [keyHandlers, event] of Object.entries(storeElementEvent)) { + const handlerKey = keyHandlers.replace(stripUidRegex, ""); + if (!inNamespace || originalTypeEvent.includes(handlerKey)) { + removeHandler(element, events, typeEvent, event.callable, event.delegationSelector); + } + } + }, + trigger(element, event, args) { + if (typeof event !== "string" || !element) { + return null; + } + const $ = getjQuery(); + const typeEvent = getTypeEvent(event); + const inNamespace = event !== typeEvent; + let jQueryEvent = null; + let bubbles = true; + let nativeDispatch = true; + let defaultPrevented = false; + if (inNamespace && $) { + jQueryEvent = $.Event(event, args); + $(element).trigger(jQueryEvent); + bubbles = !jQueryEvent.isPropagationStopped(); + nativeDispatch = !jQueryEvent.isImmediatePropagationStopped(); + defaultPrevented = jQueryEvent.isDefaultPrevented(); + } + const evt = hydrateObj(new Event(event, { bubbles, cancelable: true }), args); + if (defaultPrevented) { + evt.preventDefault(); + } + if (nativeDispatch) { + element.dispatchEvent(evt); + } + if (evt.defaultPrevented && jQueryEvent) { + jQueryEvent.preventDefault(); + } + return evt; + } + }; + function hydrateObj(obj, meta = {}) { + for (const [key, value] of Object.entries(meta)) { + try { + obj[key] = value; + } catch (e) { + Object.defineProperty(obj, key, { + configurable: true, + get() { + return value; + } + }); + } + } + return obj; + } + var event_handler_default = EventHandler; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/manipulator.js + function normalizeData(value) { + if (value === "true") { + return true; + } + if (value === "false") { + return false; + } + if (value === Number(value).toString()) { + return Number(value); + } + if (value === "" || value === "null") { + return null; + } + if (typeof value !== "string") { + return value; + } + try { + return JSON.parse(decodeURIComponent(value)); + } catch (e) { + return value; + } + } + function normalizeDataKey(key) { + return key.replace(/[A-Z]/g, (chr) => `-${chr.toLowerCase()}`); + } + var Manipulator = { + setDataAttribute(element, key, value) { + element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value); + }, + removeDataAttribute(element, key) { + element.removeAttribute(`data-bs-${normalizeDataKey(key)}`); + }, + getDataAttributes(element) { + if (!element) { + return {}; + } + const attributes = {}; + const bsKeys = Object.keys(element.dataset).filter((key) => key.startsWith("bs") && !key.startsWith("bsConfig")); + for (const key of bsKeys) { + let pureKey = key.replace(/^bs/, ""); + pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1); + attributes[pureKey] = normalizeData(element.dataset[key]); + } + return attributes; + }, + getDataAttribute(element, key) { + return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`)); + } + }; + var manipulator_default = Manipulator; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/config.js + var Config = class { + // Getters + static get Default() { + return {}; + } + static get DefaultType() { + return {}; + } + static get NAME() { + throw new Error('You have to implement the static method "NAME", for each component!'); + } + _getConfig(config) { + config = this._mergeConfigObj(config); + config = this._configAfterMerge(config); + this._typeCheckConfig(config); + return config; + } + _configAfterMerge(config) { + return config; + } + _mergeConfigObj(config, element) { + const jsonConfig = isElement(element) ? manipulator_default.getDataAttribute(element, "config") : {}; + return __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, this.constructor.Default), typeof jsonConfig === "object" ? jsonConfig : {}), isElement(element) ? manipulator_default.getDataAttributes(element) : {}), typeof config === "object" ? config : {}); + } + _typeCheckConfig(config, configTypes = this.constructor.DefaultType) { + for (const [property, expectedTypes] of Object.entries(configTypes)) { + const value = config[property]; + const valueType = isElement(value) ? "element" : toType(value); + if (!new RegExp(expectedTypes).test(valueType)) { + throw new TypeError( + `${this.constructor.NAME.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".` + ); + } + } + } + }; + var config_default = Config; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/base-component.js + var VERSION = "5.3.8"; + var BaseComponent = class extends config_default { + constructor(element, config) { + super(); + element = getElement(element); + if (!element) { + return; + } + this._element = element; + this._config = this._getConfig(config); + data_default.set(this._element, this.constructor.DATA_KEY, this); + } + // Public + dispose() { + data_default.remove(this._element, this.constructor.DATA_KEY); + event_handler_default.off(this._element, this.constructor.EVENT_KEY); + for (const propertyName of Object.getOwnPropertyNames(this)) { + this[propertyName] = null; + } + } + // Private + _queueCallback(callback, element, isAnimated = true) { + executeAfterTransition(callback, element, isAnimated); + } + _getConfig(config) { + config = this._mergeConfigObj(config, this._element); + config = this._configAfterMerge(config); + this._typeCheckConfig(config); + return config; + } + // Static + static getInstance(element) { + return data_default.get(getElement(element), this.DATA_KEY); + } + static getOrCreateInstance(element, config = {}) { + return this.getInstance(element) || new this(element, typeof config === "object" ? config : null); + } + static get VERSION() { + return VERSION; + } + static get DATA_KEY() { + return `bs.${this.NAME}`; + } + static get EVENT_KEY() { + return `.${this.DATA_KEY}`; + } + static eventName(name) { + return `${name}${this.EVENT_KEY}`; + } + }; + var base_component_default = BaseComponent; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/selector-engine.js + var getSelector = (element) => { + let selector = element.getAttribute("data-bs-target"); + if (!selector || selector === "#") { + let hrefAttribute = element.getAttribute("href"); + if (!hrefAttribute || !hrefAttribute.includes("#") && !hrefAttribute.startsWith(".")) { + return null; + } + if (hrefAttribute.includes("#") && !hrefAttribute.startsWith("#")) { + hrefAttribute = `#${hrefAttribute.split("#")[1]}`; + } + selector = hrefAttribute && hrefAttribute !== "#" ? hrefAttribute.trim() : null; + } + return selector ? selector.split(",").map((sel) => parseSelector(sel)).join(",") : null; + }; + var SelectorEngine = { + find(selector, element = document.documentElement) { + return [].concat(...Element.prototype.querySelectorAll.call(element, selector)); + }, + findOne(selector, element = document.documentElement) { + return Element.prototype.querySelector.call(element, selector); + }, + children(element, selector) { + return [].concat(...element.children).filter((child) => child.matches(selector)); + }, + parents(element, selector) { + const parents = []; + let ancestor = element.parentNode.closest(selector); + while (ancestor) { + parents.push(ancestor); + ancestor = ancestor.parentNode.closest(selector); + } + return parents; + }, + prev(element, selector) { + let previous = element.previousElementSibling; + while (previous) { + if (previous.matches(selector)) { + return [previous]; + } + previous = previous.previousElementSibling; + } + return []; + }, + // TODO: this is now unused; remove later along with prev() + next(element, selector) { + let next = element.nextElementSibling; + while (next) { + if (next.matches(selector)) { + return [next]; + } + next = next.nextElementSibling; + } + return []; + }, + focusableChildren(element) { + const focusables = [ + "a", + "button", + "input", + "textarea", + "select", + "details", + "[tabindex]", + '[contenteditable="true"]' + ].map((selector) => `${selector}:not([tabindex^="-"])`).join(","); + return this.find(focusables, element).filter((el) => !isDisabled(el) && isVisible(el)); + }, + getSelectorFromElement(element) { + const selector = getSelector(element); + if (selector) { + return SelectorEngine.findOne(selector) ? selector : null; + } + return null; + }, + getElementFromSelector(element) { + const selector = getSelector(element); + return selector ? SelectorEngine.findOne(selector) : null; + }, + getMultipleElementsFromSelector(element) { + const selector = getSelector(element); + return selector ? SelectorEngine.find(selector) : []; + } + }; + var selector_engine_default = SelectorEngine; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/collapse.js + var NAME = "collapse"; + var DATA_KEY = "bs.collapse"; + var EVENT_KEY = `.${DATA_KEY}`; + var DATA_API_KEY = ".data-api"; + var EVENT_SHOW = `show${EVENT_KEY}`; + var EVENT_SHOWN = `shown${EVENT_KEY}`; + var EVENT_HIDE = `hide${EVENT_KEY}`; + var EVENT_HIDDEN = `hidden${EVENT_KEY}`; + var EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`; + var CLASS_NAME_SHOW = "show"; + var CLASS_NAME_COLLAPSE = "collapse"; + var CLASS_NAME_COLLAPSING = "collapsing"; + var CLASS_NAME_COLLAPSED = "collapsed"; + var CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`; + var CLASS_NAME_HORIZONTAL = "collapse-horizontal"; + var WIDTH = "width"; + var HEIGHT = "height"; + var SELECTOR_ACTIVES = ".collapse.show, .collapse.collapsing"; + var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]'; + var Default = { + parent: null, + toggle: true + }; + var DefaultType = { + parent: "(null|element)", + toggle: "boolean" + }; + var Collapse = class _Collapse extends base_component_default { + constructor(element, config) { + super(element, config); + this._isTransitioning = false; + this._triggerArray = []; + const toggleList = selector_engine_default.find(SELECTOR_DATA_TOGGLE); + for (const elem of toggleList) { + const selector = selector_engine_default.getSelectorFromElement(elem); + const filterElement = selector_engine_default.find(selector).filter((foundElement) => foundElement === this._element); + if (selector !== null && filterElement.length) { + this._triggerArray.push(elem); + } + } + this._initializeChildren(); + if (!this._config.parent) { + this._addAriaAndCollapsedClass(this._triggerArray, this._isShown()); + } + if (this._config.toggle) { + this.toggle(); + } + } + // Getters + static get Default() { + return Default; + } + static get DefaultType() { + return DefaultType; + } + static get NAME() { + return NAME; + } + // Public + toggle() { + if (this._isShown()) { + this.hide(); + } else { + this.show(); + } + } + show() { + if (this._isTransitioning || this._isShown()) { + return; + } + let activeChildren = []; + if (this._config.parent) { + activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter((element) => element !== this._element).map((element) => _Collapse.getOrCreateInstance(element, { toggle: false })); + } + if (activeChildren.length && activeChildren[0]._isTransitioning) { + return; + } + const startEvent = event_handler_default.trigger(this._element, EVENT_SHOW); + if (startEvent.defaultPrevented) { + return; + } + for (const activeInstance of activeChildren) { + activeInstance.hide(); + } + const dimension = this._getDimension(); + this._element.classList.remove(CLASS_NAME_COLLAPSE); + this._element.classList.add(CLASS_NAME_COLLAPSING); + this._element.style[dimension] = 0; + this._addAriaAndCollapsedClass(this._triggerArray, true); + this._isTransitioning = true; + const complete = () => { + this._isTransitioning = false; + this._element.classList.remove(CLASS_NAME_COLLAPSING); + this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW); + this._element.style[dimension] = ""; + event_handler_default.trigger(this._element, EVENT_SHOWN); + }; + const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); + const scrollSize = `scroll${capitalizedDimension}`; + this._queueCallback(complete, this._element, true); + this._element.style[dimension] = `${this._element[scrollSize]}px`; + } + hide() { + if (this._isTransitioning || !this._isShown()) { + return; + } + const startEvent = event_handler_default.trigger(this._element, EVENT_HIDE); + if (startEvent.defaultPrevented) { + return; + } + const dimension = this._getDimension(); + this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`; + reflow(this._element); + this._element.classList.add(CLASS_NAME_COLLAPSING); + this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW); + for (const trigger of this._triggerArray) { + const element = selector_engine_default.getElementFromSelector(trigger); + if (element && !this._isShown(element)) { + this._addAriaAndCollapsedClass([trigger], false); + } + } + this._isTransitioning = true; + const complete = () => { + this._isTransitioning = false; + this._element.classList.remove(CLASS_NAME_COLLAPSING); + this._element.classList.add(CLASS_NAME_COLLAPSE); + event_handler_default.trigger(this._element, EVENT_HIDDEN); + }; + this._element.style[dimension] = ""; + this._queueCallback(complete, this._element, true); + } + // Private + _isShown(element = this._element) { + return element.classList.contains(CLASS_NAME_SHOW); + } + _configAfterMerge(config) { + config.toggle = Boolean(config.toggle); + config.parent = getElement(config.parent); + return config; + } + _getDimension() { + return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT; + } + _initializeChildren() { + if (!this._config.parent) { + return; + } + const children2 = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE); + for (const element of children2) { + const selected = selector_engine_default.getElementFromSelector(element); + if (selected) { + this._addAriaAndCollapsedClass([element], this._isShown(selected)); + } + } + } + _getFirstLevelChildren(selector) { + const children2 = selector_engine_default.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent); + return selector_engine_default.find(selector, this._config.parent).filter((element) => !children2.includes(element)); + } + _addAriaAndCollapsedClass(triggerArray, isOpen) { + if (!triggerArray.length) { + return; + } + for (const element of triggerArray) { + element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen); + element.setAttribute("aria-expanded", isOpen); + } + } + // Static + static jQueryInterface(config) { + const _config = {}; + if (typeof config === "string" && /show|hide/.test(config)) { + _config.toggle = false; + } + return this.each(function() { + const data = _Collapse.getOrCreateInstance(this, _config); + if (typeof config === "string") { + if (typeof data[config] === "undefined") { + throw new TypeError(`No method named "${config}"`); + } + data[config](); + } + }); + } + }; + event_handler_default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function(event) { + if (event.target.tagName === "A" || event.delegateTarget && event.delegateTarget.tagName === "A") { + event.preventDefault(); + } + for (const element of selector_engine_default.getMultipleElementsFromSelector(this)) { + Collapse.getOrCreateInstance(element, { toggle: false }).toggle(); + } + }); + defineJQueryPlugin(Collapse); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/category-collapse.js + var children = document.getElementsByClassName("collapse"); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/tooltip.js + var Popper = __toESM(require_popper()); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/sanitizer.js + var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i; + var DefaultAllowlist = { + // Global attributes allowed on any supplied element below. + "*": ["class", "dir", "id", "lang", "role", ARIA_ATTRIBUTE_PATTERN], + a: ["target", "href", "title", "rel"], + area: [], + b: [], + br: [], + col: [], + code: [], + dd: [], + div: [], + dl: [], + dt: [], + em: [], + hr: [], + h1: [], + h2: [], + h3: [], + h4: [], + h5: [], + h6: [], + i: [], + img: ["src", "srcset", "alt", "title", "width", "height"], + li: [], + ol: [], + p: [], + pre: [], + s: [], + small: [], + span: [], + sub: [], + sup: [], + strong: [], + u: [], + ul: [] + }; + var uriAttributes = /* @__PURE__ */ new Set([ + "background", + "cite", + "href", + "itemtype", + "longdesc", + "poster", + "src", + "xlink:href" + ]); + var SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i; + var allowedAttribute = (attribute, allowedAttributeList) => { + const attributeName = attribute.nodeName.toLowerCase(); + if (allowedAttributeList.includes(attributeName)) { + if (uriAttributes.has(attributeName)) { + return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue)); + } + return true; + } + return allowedAttributeList.filter((attributeRegex) => attributeRegex instanceof RegExp).some((regex) => regex.test(attributeName)); + }; + function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) { + if (!unsafeHtml.length) { + return unsafeHtml; + } + if (sanitizeFunction && typeof sanitizeFunction === "function") { + return sanitizeFunction(unsafeHtml); + } + const domParser = new window.DOMParser(); + const createdDocument = domParser.parseFromString(unsafeHtml, "text/html"); + const elements = [].concat(...createdDocument.body.querySelectorAll("*")); + for (const element of elements) { + const elementName = element.nodeName.toLowerCase(); + if (!Object.keys(allowList).includes(elementName)) { + element.remove(); + continue; + } + const attributeList = [].concat(...element.attributes); + const allowedAttributes = [].concat(allowList["*"] || [], allowList[elementName] || []); + for (const attribute of attributeList) { + if (!allowedAttribute(attribute, allowedAttributes)) { + element.removeAttribute(attribute.nodeName); + } + } + } + return createdDocument.body.innerHTML; + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/template-factory.js + var NAME2 = "TemplateFactory"; + var Default2 = { + allowList: DefaultAllowlist, + content: {}, + // { selector : text , selector2 : text2 , } + extraClass: "", + html: false, + sanitize: true, + sanitizeFn: null, + template: "
" + }; + var DefaultType2 = { + allowList: "object", + content: "object", + extraClass: "(string|function)", + html: "boolean", + sanitize: "boolean", + sanitizeFn: "(null|function)", + template: "string" + }; + var DefaultContentType = { + entry: "(string|element|function|null)", + selector: "(string|element)" + }; + var TemplateFactory = class extends config_default { + constructor(config) { + super(); + this._config = this._getConfig(config); + } + // Getters + static get Default() { + return Default2; + } + static get DefaultType() { + return DefaultType2; + } + static get NAME() { + return NAME2; + } + // Public + getContent() { + return Object.values(this._config.content).map((config) => this._resolvePossibleFunction(config)).filter(Boolean); + } + hasContent() { + return this.getContent().length > 0; + } + changeContent(content2) { + this._checkContent(content2); + this._config.content = __spreadValues(__spreadValues({}, this._config.content), content2); + return this; + } + toHtml() { + const templateWrapper = document.createElement("div"); + templateWrapper.innerHTML = this._maybeSanitize(this._config.template); + for (const [selector, text] of Object.entries(this._config.content)) { + this._setContent(templateWrapper, text, selector); + } + const template = templateWrapper.children[0]; + const extraClass = this._resolvePossibleFunction(this._config.extraClass); + if (extraClass) { + template.classList.add(...extraClass.split(" ")); + } + return template; + } + // Private + _typeCheckConfig(config) { + super._typeCheckConfig(config); + this._checkContent(config.content); + } + _checkContent(arg) { + for (const [selector, content2] of Object.entries(arg)) { + super._typeCheckConfig({ selector, entry: content2 }, DefaultContentType); + } + } + _setContent(template, content2, selector) { + const templateElement = selector_engine_default.findOne(selector, template); + if (!templateElement) { + return; + } + content2 = this._resolvePossibleFunction(content2); + if (!content2) { + templateElement.remove(); + return; + } + if (isElement(content2)) { + this._putElementInTemplate(getElement(content2), templateElement); + return; + } + if (this._config.html) { + templateElement.innerHTML = this._maybeSanitize(content2); + return; + } + templateElement.textContent = content2; + } + _maybeSanitize(arg) { + return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg; + } + _resolvePossibleFunction(arg) { + return execute(arg, [void 0, this]); + } + _putElementInTemplate(element, templateElement) { + if (this._config.html) { + templateElement.innerHTML = ""; + templateElement.append(element); + return; + } + templateElement.textContent = element.textContent; + } + }; + var template_factory_default = TemplateFactory; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/tooltip.js + var NAME3 = "tooltip"; + var DISALLOWED_ATTRIBUTES = /* @__PURE__ */ new Set(["sanitize", "allowList", "sanitizeFn"]); + var CLASS_NAME_FADE = "fade"; + var CLASS_NAME_MODAL = "modal"; + var CLASS_NAME_SHOW2 = "show"; + var SELECTOR_TOOLTIP_INNER = ".tooltip-inner"; + var SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`; + var EVENT_MODAL_HIDE = "hide.bs.modal"; + var TRIGGER_HOVER = "hover"; + var TRIGGER_FOCUS = "focus"; + var TRIGGER_CLICK = "click"; + var TRIGGER_MANUAL = "manual"; + var EVENT_HIDE2 = "hide"; + var EVENT_HIDDEN2 = "hidden"; + var EVENT_SHOW2 = "show"; + var EVENT_SHOWN2 = "shown"; + var EVENT_INSERTED = "inserted"; + var EVENT_CLICK = "click"; + var EVENT_FOCUSIN = "focusin"; + var EVENT_FOCUSOUT = "focusout"; + var EVENT_MOUSEENTER = "mouseenter"; + var EVENT_MOUSELEAVE = "mouseleave"; + var AttachmentMap = { + AUTO: "auto", + TOP: "top", + RIGHT: isRTL() ? "left" : "right", + BOTTOM: "bottom", + LEFT: isRTL() ? "right" : "left" + }; + var Default3 = { + allowList: DefaultAllowlist, + animation: true, + boundary: "clippingParents", + container: false, + customClass: "", + delay: 0, + fallbackPlacements: ["top", "right", "bottom", "left"], + html: false, + offset: [0, 6], + placement: "top", + popperConfig: null, + sanitize: true, + sanitizeFn: null, + selector: false, + template: '', + title: "", + trigger: "hover focus" + }; + var DefaultType3 = { + allowList: "object", + animation: "boolean", + boundary: "(string|element)", + container: "(string|element|boolean)", + customClass: "(string|function)", + delay: "(number|object)", + fallbackPlacements: "array", + html: "boolean", + offset: "(array|string|function)", + placement: "(string|function)", + popperConfig: "(null|object|function)", + sanitize: "boolean", + sanitizeFn: "(null|function)", + selector: "(string|boolean)", + template: "string", + title: "(string|element|function)", + trigger: "string" + }; + var Tooltip = class _Tooltip extends base_component_default { + constructor(element, config) { + if (typeof Popper === "undefined") { + throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)"); + } + super(element, config); + this._isEnabled = true; + this._timeout = 0; + this._isHovered = null; + this._activeTrigger = {}; + this._popper = null; + this._templateFactory = null; + this._newContent = null; + this.tip = null; + this._setListeners(); + if (!this._config.selector) { + this._fixTitle(); + } + } + // Getters + static get Default() { + return Default3; + } + static get DefaultType() { + return DefaultType3; + } + static get NAME() { + return NAME3; + } + // Public + enable() { + this._isEnabled = true; + } + disable() { + this._isEnabled = false; + } + toggleEnabled() { + this._isEnabled = !this._isEnabled; + } + toggle() { + if (!this._isEnabled) { + return; + } + if (this._isShown()) { + this._leave(); + return; + } + this._enter(); + } + dispose() { + clearTimeout(this._timeout); + event_handler_default.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler); + if (this._element.getAttribute("data-bs-original-title")) { + this._element.setAttribute("title", this._element.getAttribute("data-bs-original-title")); + } + this._disposePopper(); + super.dispose(); + } + show() { + if (this._element.style.display === "none") { + throw new Error("Please use show on visible elements"); + } + if (!(this._isWithContent() && this._isEnabled)) { + return; + } + const showEvent = event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_SHOW2)); + const shadowRoot = findShadowRoot(this._element); + const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element); + if (showEvent.defaultPrevented || !isInTheDom) { + return; + } + this._disposePopper(); + const tip = this._getTipElement(); + this._element.setAttribute("aria-describedby", tip.getAttribute("id")); + const { container } = this._config; + if (!this._element.ownerDocument.documentElement.contains(this.tip)) { + container.append(tip); + event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_INSERTED)); + } + this._popper = this._createPopper(tip); + tip.classList.add(CLASS_NAME_SHOW2); + if ("ontouchstart" in document.documentElement) { + for (const element of [].concat(...document.body.children)) { + event_handler_default.on(element, "mouseover", noop); + } + } + const complete = () => { + event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_SHOWN2)); + if (this._isHovered === false) { + this._leave(); + } + this._isHovered = false; + }; + this._queueCallback(complete, this.tip, this._isAnimated()); + } + hide() { + if (!this._isShown()) { + return; + } + const hideEvent = event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_HIDE2)); + if (hideEvent.defaultPrevented) { + return; + } + const tip = this._getTipElement(); + tip.classList.remove(CLASS_NAME_SHOW2); + if ("ontouchstart" in document.documentElement) { + for (const element of [].concat(...document.body.children)) { + event_handler_default.off(element, "mouseover", noop); + } + } + this._activeTrigger[TRIGGER_CLICK] = false; + this._activeTrigger[TRIGGER_FOCUS] = false; + this._activeTrigger[TRIGGER_HOVER] = false; + this._isHovered = null; + const complete = () => { + if (this._isWithActiveTrigger()) { + return; + } + if (!this._isHovered) { + this._disposePopper(); + } + this._element.removeAttribute("aria-describedby"); + event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN2)); + }; + this._queueCallback(complete, this.tip, this._isAnimated()); + } + update() { + if (this._popper) { + this._popper.update(); + } + } + // Protected + _isWithContent() { + return Boolean(this._getTitle()); + } + _getTipElement() { + if (!this.tip) { + this.tip = this._createTipElement(this._newContent || this._getContentForTemplate()); + } + return this.tip; + } + _createTipElement(content2) { + const tip = this._getTemplateFactory(content2).toHtml(); + if (!tip) { + return null; + } + tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW2); + tip.classList.add(`bs-${this.constructor.NAME}-auto`); + const tipId = getUID(this.constructor.NAME).toString(); + tip.setAttribute("id", tipId); + if (this._isAnimated()) { + tip.classList.add(CLASS_NAME_FADE); + } + return tip; + } + setContent(content2) { + this._newContent = content2; + if (this._isShown()) { + this._disposePopper(); + this.show(); + } + } + _getTemplateFactory(content2) { + if (this._templateFactory) { + this._templateFactory.changeContent(content2); + } else { + this._templateFactory = new template_factory_default(__spreadProps(__spreadValues({}, this._config), { + // the `content` var has to be after `this._config` + // to override config.content in case of popover + content: content2, + extraClass: this._resolvePossibleFunction(this._config.customClass) + })); + } + return this._templateFactory; + } + _getContentForTemplate() { + return { + [SELECTOR_TOOLTIP_INNER]: this._getTitle() + }; + } + _getTitle() { + return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute("data-bs-original-title"); + } + // Private + _initializeOnDelegatedTarget(event) { + return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig()); + } + _isAnimated() { + return this._config.animation || this.tip && this.tip.classList.contains(CLASS_NAME_FADE); + } + _isShown() { + return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW2); + } + _createPopper(tip) { + const placement = execute(this._config.placement, [this, tip, this._element]); + const attachment = AttachmentMap[placement.toUpperCase()]; + return Popper.createPopper(this._element, tip, this._getPopperConfig(attachment)); + } + _getOffset() { + const { offset } = this._config; + if (typeof offset === "string") { + return offset.split(",").map((value) => Number.parseInt(value, 10)); + } + if (typeof offset === "function") { + return (popperData) => offset(popperData, this._element); + } + return offset; + } + _resolvePossibleFunction(arg) { + return execute(arg, [this._element, this._element]); + } + _getPopperConfig(attachment) { + const defaultBsPopperConfig = { + placement: attachment, + modifiers: [ + { + name: "flip", + options: { + fallbackPlacements: this._config.fallbackPlacements + } + }, + { + name: "offset", + options: { + offset: this._getOffset() + } + }, + { + name: "preventOverflow", + options: { + boundary: this._config.boundary + } + }, + { + name: "arrow", + options: { + element: `.${this.constructor.NAME}-arrow` + } + }, + { + name: "preSetPlacement", + enabled: true, + phase: "beforeMain", + fn: (data) => { + this._getTipElement().setAttribute("data-popper-placement", data.state.placement); + } + } + ] + }; + return __spreadValues(__spreadValues({}, defaultBsPopperConfig), execute(this._config.popperConfig, [void 0, defaultBsPopperConfig])); + } + _setListeners() { + const triggers = this._config.trigger.split(" "); + for (const trigger of triggers) { + if (trigger === "click") { + event_handler_default.on(this._element, this.constructor.eventName(EVENT_CLICK), this._config.selector, (event) => { + const context = this._initializeOnDelegatedTarget(event); + context._activeTrigger[TRIGGER_CLICK] = !(context._isShown() && context._activeTrigger[TRIGGER_CLICK]); + context.toggle(); + }); + } else if (trigger !== TRIGGER_MANUAL) { + const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN); + const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT); + event_handler_default.on(this._element, eventIn, this._config.selector, (event) => { + const context = this._initializeOnDelegatedTarget(event); + context._activeTrigger[event.type === "focusin" ? TRIGGER_FOCUS : TRIGGER_HOVER] = true; + context._enter(); + }); + event_handler_default.on(this._element, eventOut, this._config.selector, (event) => { + const context = this._initializeOnDelegatedTarget(event); + context._activeTrigger[event.type === "focusout" ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget); + context._leave(); + }); + } + } + this._hideModalHandler = () => { + if (this._element) { + this.hide(); + } + }; + event_handler_default.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler); + } + _fixTitle() { + const title = this._element.getAttribute("title"); + if (!title) { + return; + } + if (!this._element.getAttribute("aria-label") && !this._element.textContent.trim()) { + this._element.setAttribute("aria-label", title); + } + this._element.setAttribute("data-bs-original-title", title); + this._element.removeAttribute("title"); + } + _enter() { + if (this._isShown() || this._isHovered) { + this._isHovered = true; + return; + } + this._isHovered = true; + this._setTimeout(() => { + if (this._isHovered) { + this.show(); + } + }, this._config.delay.show); + } + _leave() { + if (this._isWithActiveTrigger()) { + return; + } + this._isHovered = false; + this._setTimeout(() => { + if (!this._isHovered) { + this.hide(); + } + }, this._config.delay.hide); + } + _setTimeout(handler, timeout) { + clearTimeout(this._timeout); + this._timeout = setTimeout(handler, timeout); + } + _isWithActiveTrigger() { + return Object.values(this._activeTrigger).includes(true); + } + _getConfig(config) { + const dataAttributes = manipulator_default.getDataAttributes(this._element); + for (const dataAttribute of Object.keys(dataAttributes)) { + if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) { + delete dataAttributes[dataAttribute]; + } + } + config = __spreadValues(__spreadValues({}, dataAttributes), typeof config === "object" && config ? config : {}); + config = this._mergeConfigObj(config); + config = this._configAfterMerge(config); + this._typeCheckConfig(config); + return config; + } + _configAfterMerge(config) { + config.container = config.container === false ? document.body : getElement(config.container); + if (typeof config.delay === "number") { + config.delay = { + show: config.delay, + hide: config.delay + }; + } + if (typeof config.title === "number") { + config.title = config.title.toString(); + } + if (typeof config.content === "number") { + config.content = config.content.toString(); + } + return config; + } + _getDelegateConfig() { + const config = {}; + for (const [key, value] of Object.entries(this._config)) { + if (this.constructor.Default[key] !== value) { + config[key] = value; + } + } + config.selector = false; + config.trigger = "manual"; + return config; + } + _disposePopper() { + if (this._popper) { + this._popper.destroy(); + this._popper = null; + } + if (this.tip) { + this.tip.remove(); + this.tip = null; + } + } + // Static + static jQueryInterface(config) { + return this.each(function() { + const data = _Tooltip.getOrCreateInstance(this, config); + if (typeof config !== "string") { + return; + } + if (typeof data[config] === "undefined") { + throw new TypeError(`No method named "${config}"`); + } + data[config](); + }); + } + }; + defineJQueryPlugin(Tooltip); + var tooltip_default = Tooltip; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/img-loading.js + var ATTR_DATA_SRC = "data-src"; + var ATTR_DATA_LQIP = "data-lqip"; + var cover = { + SHIMMER: "shimmer", + BLUR: "blur" + }; + function removeCover(clzss) { + this.parentElement.classList.remove(clzss); + } + function handleImage() { + if (!this.complete) { + return; + } + if (this.hasAttribute(ATTR_DATA_LQIP)) { + removeCover.call(this, cover.BLUR); + } else { + removeCover.call(this, cover.SHIMMER); + } + } + function switchLQIP() { + const src = this.getAttribute(ATTR_DATA_SRC); + this.setAttribute("src", encodeURI(src)); + this.removeAttribute(ATTR_DATA_SRC); + } + function loadImg() { + const images = document.querySelectorAll("article img"); + if (images.length === 0) { + return; + } + images.forEach((img) => { + img.addEventListener("load", handleImage); + }); + document.querySelectorAll('article img[loading="lazy"]').forEach((img) => { + if (img.complete) { + removeCover.call(img, cover.SHIMMER); + } + }); + const lqips = document.querySelectorAll( + `article img[${ATTR_DATA_LQIP}="true"]` + ); + if (lqips.length) { + lqips.forEach((lqip) => { + switchLQIP.call(lqip); + }); + } + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/locale-datetime.js + var LocaleHelper = class { + static get attrTimestamp() { + return "data-ts"; + } + static get attrDateFormat() { + return "data-df"; + } + static get locale() { + return document.documentElement.getAttribute("lang").substring(0, 2); + } + static getTimestamp(elem) { + return Number(elem.getAttribute(this.attrTimestamp)); + } + static getDateFormat(elem) { + return elem.getAttribute(this.attrDateFormat); + } + }; + function initLocaleDatetime() { + dayjs.locale(LocaleHelper.locale); + dayjs.extend(window.dayjs_plugin_localizedFormat); + document.querySelectorAll(`[${LocaleHelper.attrTimestamp}]`).forEach((elem) => { + const date = dayjs.unix(LocaleHelper.getTimestamp(elem)); + const text = date.format(LocaleHelper.getDateFormat(elem)); + elem.textContent = text; + elem.removeAttribute(LocaleHelper.attrTimestamp); + elem.removeAttribute(LocaleHelper.attrDateFormat); + if (elem.hasAttribute("data-bs-toggle") && elem.getAttribute("data-bs-toggle") === "tooltip") { + const tooltipText = date.format("llll"); + elem.setAttribute("data-bs-title", tooltipText); + } + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/toc/toc-mobile.js + var $tocBar = document.getElementById("toc-bar"); + var $soloTrigger = document.getElementById("toc-solo-trigger"); + var $triggers = document.getElementsByClassName("toc-trigger"); + var $popup = document.getElementById("toc-popup"); + var $btnClose = document.getElementById("toc-popup-close"); + var SCROLL_LOCK = "overflow-hidden"; + var CLOSING = "closing"; + var _invisible, _barHeight; + var _TocMobile = class _TocMobile { + static initBar() { + const observer = new IntersectionObserver( + (entries) => { + entries.forEach((entry) => { + $tocBar.classList.toggle("invisible", entry.isIntersecting); + }); + }, + { rootMargin: `-${__privateGet(this, _barHeight)}px 0px 0px 0px` } + ); + observer.observe($soloTrigger); + __privateSet(this, _invisible, false); + } + static listenAnchors() { + const $anchors = document.getElementsByClassName("toc-link"); + [...$anchors].forEach((anchor) => { + anchor.onclick = () => this.hidePopup(); + }); + } + static refresh() { + if (__privateGet(this, _invisible)) { + this.initComponents(); + } + tocbot.refresh(this.options); + this.listenAnchors(); + } + static get popupOpened() { + return $popup.open; + } + static showPopup() { + this.lockScroll(true); + $popup.showModal(); + const activeItem = $popup.querySelector("li.is-active-li"); + activeItem.scrollIntoView({ block: "center" }); + } + static hidePopup() { + $popup.toggleAttribute(CLOSING); + $popup.addEventListener( + "animationend", + () => { + $popup.toggleAttribute(CLOSING); + $popup.close(); + }, + { once: true } + ); + this.lockScroll(false); + } + static lockScroll(enable) { + document.documentElement.classList.toggle(SCROLL_LOCK, enable); + document.body.classList.toggle(SCROLL_LOCK, enable); + } + static clickBackdrop(event) { + if ($popup.hasAttribute(CLOSING)) { + return; + } + const rect = event.target.getBoundingClientRect(); + if (event.clientX < rect.left || event.clientX > rect.right || event.clientY < rect.top || event.clientY > rect.bottom) { + this.hidePopup(); + } + } + static initComponents() { + this.initBar(); + [...$triggers].forEach((trigger) => { + trigger.onclick = () => this.showPopup(); + }); + $popup.onclick = (e) => this.clickBackdrop(e); + $btnClose.onclick = () => this.hidePopup(); + $popup.oncancel = (e) => { + e.preventDefault(); + this.hidePopup(); + }; + } + static init() { + tocbot.init(this.options); + this.listenAnchors(); + this.initComponents(); + } + }; + _invisible = new WeakMap(); + _barHeight = new WeakMap(); + __privateAdd(_TocMobile, _invisible, true); + __privateAdd(_TocMobile, _barHeight, 16 * 3); + // 3rem + __publicField(_TocMobile, "options", { + tocSelector: "#toc-popup-content", + contentSelector: ".content", + ignoreSelector: "[data-toc-skip]", + headingSelector: "h2, h3, h4", + orderedList: false, + scrollSmooth: false, + collapseDepth: 4, + headingsOffset: __privateGet(_TocMobile, _barHeight) + }); + var TocMobile = _TocMobile; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/toc/toc-desktop.js + var TocDesktop = class { + static refresh() { + tocbot.refresh(this.options); + } + static init() { + tocbot.init(this.options); + } + }; + /* Tocbot options Ref: https://github.com/tscanlin/tocbot#usage */ + __publicField(TocDesktop, "options", { + tocSelector: "#toc", + contentSelector: ".content", + ignoreSelector: "[data-toc-skip]", + headingSelector: "h2, h3, h4", + orderedList: false, + scrollSmooth: false, + headingsOffset: 16 * 2 + // 2rem + }); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/toc.js + var desktopMode = matchMedia("(min-width: 1200px)"); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/mermaid.js + var themeMapper = Theme.getThemeMapper("default", "dark"); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/mode-toggle.js + var $toggle = document.getElementById("mode-toggle"); + function modeWatcher() { + if (!$toggle) { + return; + } + $toggle.addEventListener("click", () => { + Theme.flip(); + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/back-to-top.js + function back2top() { + const btn = document.getElementById("back-to-top"); + window.addEventListener("scroll", () => { + if (window.scrollY > 50) { + btn.classList.add("show"); + } else { + btn.classList.remove("show"); + } + }); + btn.addEventListener("click", () => { + window.scrollTo({ top: 0 }); + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/tooltip-loader.js + function loadTooptip() { + const tooltipTriggerList = document.querySelectorAll( + '[data-bs-toggle="tooltip"]' + ); + [...tooltipTriggerList].map( + (tooltipTriggerEl) => new tooltip_default(tooltipTriggerEl) + ); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/layouts/basic.js + function basic() { + modeWatcher(); + back2top(); + loadTooptip(); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/layouts/sidebar.js + var ATTR_DISPLAY = "sidebar-display"; + var $sidebar = document.getElementById("sidebar"); + var $trigger = document.getElementById("sidebar-trigger"); + var $mask = document.getElementById("mask"); + var _isExpanded; + var SidebarUtil = class { + static toggle() { + __privateSet(this, _isExpanded, !__privateGet(this, _isExpanded)); + document.body.toggleAttribute(ATTR_DISPLAY, __privateGet(this, _isExpanded)); + $sidebar.classList.toggle("z-2", __privateGet(this, _isExpanded)); + $mask.classList.toggle("d-none", !__privateGet(this, _isExpanded)); + } + }; + _isExpanded = new WeakMap(); + __privateAdd(SidebarUtil, _isExpanded, false); + function initSidebar() { + $trigger.onclick = $mask.onclick = () => SidebarUtil.toggle(); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/search-display.js + var btnSbTrigger = document.getElementById("sidebar-trigger"); + var btnSearchTrigger = document.getElementById("search-trigger"); + var btnCancel = document.getElementById("search-cancel"); + var content = document.querySelectorAll("#main-wrapper>.container>.row"); + var topbarTitle = document.getElementById("topbar-title"); + var search = document.getElementById("search"); + var resultWrapper = document.getElementById("search-result-wrapper"); + var results = document.getElementById("search-results"); + var input = document.getElementById("search-input"); + var hints = document.getElementById("search-hints"); + var LOADED = "d-block"; + var UNLOADED = "d-none"; + var FOCUS = "input-focus"; + var FLEX = "d-flex"; + var MobileSearchBar = class { + static on() { + btnSbTrigger.classList.add(UNLOADED); + topbarTitle.classList.add(UNLOADED); + btnSearchTrigger.classList.add(UNLOADED); + search.classList.add(FLEX); + btnCancel.classList.add(LOADED); + } + static off() { + btnCancel.classList.remove(LOADED); + search.classList.remove(FLEX); + btnSbTrigger.classList.remove(UNLOADED); + topbarTitle.classList.remove(UNLOADED); + btnSearchTrigger.classList.remove(UNLOADED); + } + }; + var ResultSwitch = class { + static on() { + if (!this.resultVisible) { + resultWrapper.classList.remove(UNLOADED); + content.forEach((el) => { + el.classList.add(UNLOADED); + }); + this.resultVisible = true; + } + } + static off() { + if (this.resultVisible) { + results.innerHTML = ""; + if (hints.classList.contains(UNLOADED)) { + hints.classList.remove(UNLOADED); + } + resultWrapper.classList.add(UNLOADED); + content.forEach((el) => { + el.classList.remove(UNLOADED); + }); + input.textContent = ""; + this.resultVisible = false; + } + } + }; + __publicField(ResultSwitch, "resultVisible", false); + function isMobileView() { + return btnCancel.classList.contains(LOADED); + } + function displaySearch() { + btnSearchTrigger.addEventListener("click", () => { + MobileSearchBar.on(); + ResultSwitch.on(); + input.focus(); + }); + btnCancel.addEventListener("click", () => { + MobileSearchBar.off(); + ResultSwitch.off(); + }); + input.addEventListener("focus", () => { + search.classList.add(FOCUS); + }); + input.addEventListener("focusout", () => { + search.classList.remove(FOCUS); + }); + input.addEventListener("input", () => { + if (input.value === "") { + if (isMobileView()) { + hints.classList.remove(UNLOADED); + } else { + ResultSwitch.off(); + } + } else { + ResultSwitch.on(); + if (isMobileView()) { + hints.classList.add(UNLOADED); + } + } + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/layouts/topbar.js + function initTopbar() { + displaySearch(); + } + + // + loadImg(); + initLocaleDatetime(); + initSidebar(); + initTopbar(); + basic(); +})(); diff --git a/public/js/misc.js b/public/js/misc.js index 7fc8614..07aca0d 100644 --- a/public/js/misc.js +++ b/public/js/misc.js @@ -1 +1,3391 @@ -(()=>{var On=Object.create;var ue=Object.defineProperty,Sn=Object.defineProperties,xn=Object.getOwnPropertyDescriptor,Cn=Object.getOwnPropertyDescriptors,Ln=Object.getOwnPropertyNames,pr=Object.getOwnPropertySymbols,Dn=Object.getPrototypeOf,dr=Object.prototype.hasOwnProperty,Nn=Object.prototype.propertyIsEnumerable;var hr=e=>{throw TypeError(e)};var le=(e,t,r)=>t in e?ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N=(e,t)=>{for(var r in t||(t={}))dr.call(t,r)&&le(e,r,t[r]);if(pr)for(var r of pr(t))Nn.call(t,r)&&le(e,r,t[r]);return e},mr=(e,t)=>Sn(e,Cn(t));var In=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Pn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ln(t))!dr.call(e,o)&&o!==r&&ue(e,o,{get:()=>t[o],enumerable:!(n=xn(t,o))||n.enumerable});return e};var Mn=(e,t,r)=>(r=e!=null?On(Dn(e)):{},Pn(t||!e||!e.__esModule?ue(r,"default",{value:e,enumerable:!0}):r,e));var _t=(e,t,r)=>le(e,typeof t!="symbol"?t+"":t,r),gr=(e,t,r)=>t.has(e)||hr("Cannot "+r);var U=(e,t,r)=>(gr(e,t,"read from private field"),r?r.call(e):t.get(e)),wt=(e,t,r)=>t.has(e)?hr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),jt=(e,t,r,n)=>(gr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var rn=In(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});function H(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function lt(e){var t=H(e).Element;return e instanceof t||e instanceof Element}function k(e){var t=H(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Hr(e){if(typeof ShadowRoot=="undefined")return!1;var t=H(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var it=Math.max,Kt=Math.min,ut=Math.round;function ft(e,t){t===void 0&&(t=!1);var r=e.getBoundingClientRect(),n=1,o=1;if(k(e)&&t){var s=e.offsetHeight,i=e.offsetWidth;i>0&&(n=ut(r.width)/i||1),s>0&&(o=ut(r.height)/s||1)}return{width:r.width/n,height:r.height/o,top:r.top/o,right:r.right/n,bottom:r.bottom/o,left:r.left/n,x:r.left/n,y:r.top/o}}function Le(e){var t=H(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function lo(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function uo(e){return e===H(e)||!k(e)?Le(e):lo(e)}function q(e){return e?(e.nodeName||"").toLowerCase():null}function J(e){return((lt(e)?e.ownerDocument:e.document)||window.document).documentElement}function De(e){return ft(J(e)).left+Le(e).scrollLeft}function W(e){return H(e).getComputedStyle(e)}function Ne(e){var t=W(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function fo(e){var t=e.getBoundingClientRect(),r=ut(t.width)/e.offsetWidth||1,n=ut(t.height)/e.offsetHeight||1;return r!==1||n!==1}function po(e,t,r){r===void 0&&(r=!1);var n=k(t),o=k(t)&&fo(t),s=J(t),i=ft(e,o),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((q(t)!=="body"||Ne(s))&&(a=uo(t)),k(t)?(c=ft(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=De(s))),{x:i.left+a.scrollLeft-c.x,y:i.top+a.scrollTop-c.y,width:i.width,height:i.height}}function Ie(e){var t=ft(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function Qt(e){return q(e)==="html"?e:e.assignedSlot||e.parentNode||(Hr(e)?e.host:null)||J(e)}function Vr(e){return["html","body","#document"].indexOf(q(e))>=0?e.ownerDocument.body:k(e)&&Ne(e)?e:Vr(Qt(e))}function St(e,t){var r;t===void 0&&(t=[]);var n=Vr(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),s=H(n),i=o?[s].concat(s.visualViewport||[],Ne(n)?n:[]):n,a=t.concat(i);return o?a:a.concat(St(Qt(i)))}function ho(e){return["table","td","th"].indexOf(q(e))>=0}function Ir(e){return!k(e)||W(e).position==="fixed"?null:e.offsetParent}function mo(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,r=navigator.userAgent.indexOf("Trident")!==-1;if(r&&k(e)){var n=W(e);if(n.position==="fixed")return null}for(var o=Qt(e);k(o)&&["html","body"].indexOf(q(o))<0;){var s=W(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function Lt(e){for(var t=H(e),r=Ir(e);r&&ho(r)&&W(r).position==="static";)r=Ir(r);return r&&(q(r)==="html"||q(r)==="body"&&W(r).position==="static")?t:r||mo(e)||t}var I="top",$="bottom",B="right",P="left",Pe="auto",Dt=[I,$,B,P],pt="start",Ct="end",go="clippingParents",qr="viewport",Ot="popper",vo="reference",Pr=Dt.reduce(function(e,t){return e.concat([t+"-"+pt,t+"-"+Ct])},[]),Wr=[].concat(Dt,[Pe]).reduce(function(e,t){return e.concat([t,t+"-"+pt,t+"-"+Ct])},[]),bo="beforeRead",yo="read",Eo="afterRead",_o="beforeMain",wo="main",Ao="afterMain",To="beforeWrite",Oo="write",So="afterWrite",xo=[bo,yo,Eo,_o,wo,Ao,To,Oo,So];function Co(e){var t=new Map,r=new Set,n=[];e.forEach(function(s){t.set(s.name,s)});function o(s){r.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(a){if(!r.has(a)){var c=t.get(a);c&&o(c)}}),n.push(s)}return e.forEach(function(s){r.has(s.name)||o(s)}),n}function Lo(e){var t=Co(e);return xo.reduce(function(r,n){return r.concat(t.filter(function(o){return o.phase===n}))},[])}function Do(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function V(e){return e.split("-")[0]}function No(e){var t=e.reduce(function(r,n){var o=r[n.name];return r[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}function Io(e){var t=H(e),r=J(e),n=t.visualViewport,o=r.clientWidth,s=r.clientHeight,i=0,a=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(i=n.offsetLeft,a=n.offsetTop)),{width:o,height:s,x:i+De(e),y:a}}function Po(e){var t,r=J(e),n=Le(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=it(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=it(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+De(e),c=-n.scrollTop;return W(o||r).direction==="rtl"&&(a+=it(r.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:a,y:c}}function zr(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Hr(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ce(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Mo(e){var t=ft(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function Mr(e,t){return t===qr?Ce(Io(e)):lt(t)?Mo(t):Ce(Po(J(e)))}function Ro(e){var t=St(Qt(e)),r=["absolute","fixed"].indexOf(W(e).position)>=0,n=r&&k(e)?Lt(e):e;return lt(n)?t.filter(function(o){return lt(o)&&zr(o,n)&&q(o)!=="body"&&(r?W(o).position!=="static":!0)}):[]}function ko(e,t,r){var n=t==="clippingParents"?Ro(e):[].concat(t),o=[].concat(n,[r]),s=o[0],i=o.reduce(function(a,c){var u=Mr(e,c);return a.top=it(u.top,a.top),a.right=Kt(u.right,a.right),a.bottom=Kt(u.bottom,a.bottom),a.left=it(u.left,a.left),a},Mr(e,s));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}function dt(e){return e.split("-")[1]}function Me(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ur(e){var t=e.reference,r=e.element,n=e.placement,o=n?V(n):null,s=n?dt(n):null,i=t.x+t.width/2-r.width/2,a=t.y+t.height/2-r.height/2,c;switch(o){case I:c={x:i,y:t.y-r.height};break;case $:c={x:i,y:t.y+t.height};break;case B:c={x:t.x+t.width,y:a};break;case P:c={x:t.x-r.width,y:a};break;default:c={x:t.x,y:t.y}}var u=o?Me(o):null;if(u!=null){var l=u==="y"?"height":"width";switch(s){case pt:c[u]=c[u]-(t[l]/2-r[l]/2);break;case Ct:c[u]=c[u]+(t[l]/2-r[l]/2);break}}return c}function Yr(){return{top:0,right:0,bottom:0,left:0}}function Gr(e){return Object.assign({},Yr(),e)}function Kr(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}function ht(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=n===void 0?e.placement:n,s=r.boundary,i=s===void 0?go:s,a=r.rootBoundary,c=a===void 0?qr:a,u=r.elementContext,l=u===void 0?Ot:u,f=r.altBoundary,g=f===void 0?!1:f,p=r.padding,h=p===void 0?0:p,m=Gr(typeof h!="number"?h:Kr(h,Dt)),d=l===Ot?vo:Ot,w=e.rects.popper,A=e.elements[g?d:l],T=ko(lt(A)?A:A.contextElement||J(e.elements.popper),i,c),v=ft(e.elements.reference),E=Ur({reference:v,element:w,strategy:"absolute",placement:o}),b=Ce(Object.assign({},w,E)),y=l===Ot?b:v,O={top:T.top-y.top+m.top,bottom:y.bottom-T.bottom+m.bottom,left:T.left-y.left+m.left,right:y.right-T.right+m.right},x=e.modifiersData.offset;if(l===Ot&&x){var C=x[o];Object.keys(O).forEach(function(_){var L=[B,$].indexOf(_)>=0?1:-1,et=[I,$].indexOf(_)>=0?"y":"x";O[_]+=C[et]*L})}return O}var Rr={placement:"bottom",modifiers:[],strategy:"absolute"};function kr(){for(var e=arguments.length,t=new Array(e),r=0;r=0?-1:1,s=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,i=s[0],a=s[1];return i=i||0,a=(a||0)*o,[P,B].indexOf(n)>=0?{x:a,y:i}:{x:i,y:a}}function zo(e){var t=e.state,r=e.options,n=e.name,o=r.offset,s=o===void 0?[0,0]:o,i=Wr.reduce(function(l,f){return l[f]=Wo(f,t.rects,s),l},{}),a=i[t.placement],c=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=i}var Qr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:zo},Uo={left:"right",right:"left",bottom:"top",top:"bottom"};function Gt(e){return e.replace(/left|right|bottom|top/g,function(t){return Uo[t]})}var Yo={start:"end",end:"start"};function Br(e){return e.replace(/start|end/g,function(t){return Yo[t]})}function Go(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=r.boundary,s=r.rootBoundary,i=r.padding,a=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?Wr:c,l=dt(n),f=l?a?Pr:Pr.filter(function(h){return dt(h)===l}):Dt,g=f.filter(function(h){return u.indexOf(h)>=0});g.length===0&&(g=f);var p=g.reduce(function(h,m){return h[m]=ht(e,{placement:m,boundary:o,rootBoundary:s,padding:i})[V(m)],h},{});return Object.keys(p).sort(function(h,m){return p[h]-p[m]})}function Ko(e){if(V(e)===Pe)return[];var t=Gt(e);return[Br(e),t,Br(t)]}function Qo(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,s=o===void 0?!0:o,i=r.altAxis,a=i===void 0?!0:i,c=r.fallbackPlacements,u=r.padding,l=r.boundary,f=r.rootBoundary,g=r.altBoundary,p=r.flipVariations,h=p===void 0?!0:p,m=r.allowedAutoPlacements,d=t.options.placement,w=V(d),A=w===d,T=c||(A||!h?[Gt(d)]:Ko(d)),v=[d].concat(T).reduce(function(at,G){return at.concat(V(G)===Pe?Go(t,{placement:G,boundary:l,rootBoundary:f,padding:u,flipVariations:h,allowedAutoPlacements:m}):G)},[]),E=t.rects.reference,b=t.rects.popper,y=new Map,O=!0,x=v[0],C=0;C=0,bt=vt?"width":"height",R=ht(t,{placement:_,boundary:l,rootBoundary:f,altBoundary:g,padding:u}),j=vt?et?B:P:et?$:I;E[bt]>b[bt]&&(j=Gt(j));var Mt=Gt(j),rt=[];if(s&&rt.push(R[L]<=0),a&&rt.push(R[j]<=0,R[Mt]<=0),rt.every(function(at){return at})){x=_,O=!1;break}y.set(_,rt)}if(O)for(var Rt=h?3:1,ie=function(G){var Et=v.find(function($t){var nt=y.get($t);if(nt)return nt.slice(0,G).every(function(se){return se})});if(Et)return x=Et,"break"},yt=Rt;yt>0;yt--){var kt=ie(yt);if(kt==="break")break}t.placement!==x&&(t.modifiersData[n]._skip=!0,t.placement=x,t.reset=!0)}}var Xr={name:"flip",enabled:!0,phase:"main",fn:Qo,requiresIfExists:["offset"],data:{_skip:!1}};function Xo(e){return e==="x"?"y":"x"}function xt(e,t,r){return it(e,Kt(t,r))}function Jo(e,t,r){var n=xt(e,t,r);return n>r?r:n}function Zo(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,s=o===void 0?!0:o,i=r.altAxis,a=i===void 0?!1:i,c=r.boundary,u=r.rootBoundary,l=r.altBoundary,f=r.padding,g=r.tether,p=g===void 0?!0:g,h=r.tetherOffset,m=h===void 0?0:h,d=ht(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:l}),w=V(t.placement),A=dt(t.placement),T=!A,v=Me(w),E=Xo(v),b=t.modifiersData.popperOffsets,y=t.rects.reference,O=t.rects.popper,x=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,C=typeof x=="number"?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(b){if(s){var et,vt=v==="y"?I:P,bt=v==="y"?$:B,R=v==="y"?"height":"width",j=b[v],Mt=j+d[vt],rt=j-d[bt],Rt=p?-O[R]/2:0,ie=A===pt?y[R]:O[R],yt=A===pt?-O[R]:-y[R],kt=t.elements.arrow,at=p&&kt?Ie(kt):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Yr(),Et=G[vt],$t=G[bt],nt=xt(0,y[R],at[R]),se=T?y[R]/2-Rt-nt-Et-C.mainAxis:ie-nt-Et-C.mainAxis,yn=T?-y[R]/2+Rt+nt+$t+C.mainAxis:yt+nt+$t+C.mainAxis,ae=t.elements.arrow&&Lt(t.elements.arrow),En=ae?v==="y"?ae.clientTop||0:ae.clientLeft||0:0,nr=(et=_==null?void 0:_[v])!=null?et:0,_n=j+se-nr-En,wn=j+yn-nr,or=xt(p?Kt(Mt,_n):Mt,j,p?it(rt,wn):rt);b[v]=or,L[v]=or-j}if(a){var ir,An=v==="x"?I:P,Tn=v==="x"?$:B,ot=b[E],Bt=E==="y"?"height":"width",sr=ot+d[An],ar=ot-d[Tn],ce=[I,P].indexOf(w)!==-1,cr=(ir=_==null?void 0:_[E])!=null?ir:0,lr=ce?sr:ot-y[Bt]-O[Bt]-cr+C.altAxis,ur=ce?ot+y[Bt]+O[Bt]-cr-C.altAxis:ar,fr=p&&ce?Jo(lr,ot,ur):xt(p?lr:sr,ot,p?ur:ar);b[E]=fr,L[E]=fr-ot}t.modifiersData[n]=L}}var Jr={name:"preventOverflow",enabled:!0,phase:"main",fn:Zo,requiresIfExists:["offset"]},ti=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Gr(typeof t!="number"?t:Kr(t,Dt))};function ei(e){var t,r=e.state,n=e.name,o=e.options,s=r.elements.arrow,i=r.modifiersData.popperOffsets,a=V(r.placement),c=Me(a),u=[P,B].indexOf(a)>=0,l=u?"height":"width";if(!(!s||!i)){var f=ti(o.padding,r),g=Ie(s),p=c==="y"?I:P,h=c==="y"?$:B,m=r.rects.reference[l]+r.rects.reference[c]-i[c]-r.rects.popper[l],d=i[c]-r.rects.reference[c],w=Lt(s),A=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,T=m/2-d/2,v=f[p],E=A-g[l]-f[h],b=A/2-g[l]/2+T,y=xt(v,b,E),O=c;r.modifiersData[n]=(t={},t[O]=y,t.centerOffset=y-b,t)}}function ri(e){var t=e.state,r=e.options,n=r.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||zr(t.elements.popper,o)&&(t.elements.arrow=o))}var Zr={name:"arrow",enabled:!0,phase:"main",fn:ei,effect:ri,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function jr(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Fr(e){return[I,B,$,P].some(function(t){return e[t]>=0})}function ni(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,i=ht(t,{elementContext:"reference"}),a=ht(t,{altBoundary:!0}),c=jr(i,n),u=jr(a,o,s),l=Fr(c),f=Fr(u);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}var tn={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ni},oi=[ke,$e,Be,je],ii=Re({defaultModifiers:oi}),en=[ke,$e,Be,je,Qr,Xr,Jr,Zr,tn],si=Re({defaultModifiers:en});D.applyStyles=je;D.arrow=Zr;D.computeStyles=Be;D.createPopper=si;D.createPopperLite=ii;D.defaultModifiers=en;D.detectOverflow=ht;D.eventListeners=ke;D.flip=Xr;D.hide=tn;D.offset=Qr;D.popperGenerator=Re;D.popperOffsets=$e;D.preventOverflow=Jr});var K=new Map,Ft={set(e,t,r){K.has(e)||K.set(e,new Map);let n=K.get(e);if(!n.has(t)&&n.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`);return}n.set(t,r)},get(e,t){return K.has(e)&&K.get(e).get(t)||null},remove(e,t){if(!K.has(e))return;let r=K.get(e);r.delete(t),r.size===0&&K.delete(e)}};var pe="transitionend",de=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(t,r)=>`#${CSS.escape(r)}`)),e),vr=e=>e==null?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),br=e=>{do e+=Math.floor(Math.random()*1e6);while(document.getElementById(e));return e},Rn=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:r}=window.getComputedStyle(e),n=Number.parseFloat(t),o=Number.parseFloat(r);return!n&&!o?0:(t=t.split(",")[0],r=r.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(r))*1e3)},kn=e=>{e.dispatchEvent(new Event(pe))},X=e=>!e||typeof e!="object"?!1:(typeof e.jquery!="undefined"&&(e=e[0]),typeof e.nodeType!="undefined"),Y=e=>X(e)?e.jquery?e[0]:e:typeof e=="string"&&e.length>0?document.querySelector(de(e)):null,yr=e=>{if(!X(e)||e.getClientRects().length===0)return!1;let t=getComputedStyle(e).getPropertyValue("visibility")==="visible",r=e.closest("details:not([open])");if(!r)return t;if(r!==e){let n=e.closest("summary");if(n&&n.parentNode!==r||n===null)return!1}return t},Er=e=>!e||e.nodeType!==Node.ELEMENT_NODE||e.classList.contains("disabled")?!0:typeof e.disabled!="undefined"?e.disabled:e.hasAttribute("disabled")&&e.getAttribute("disabled")!=="false",he=e=>{if(!document.documentElement.attachShadow)return null;if(typeof e.getRootNode=="function"){let t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?he(e.parentNode):null},me=()=>{},_r=e=>{e.offsetHeight},ge=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,fe=[],$n=e=>{document.readyState==="loading"?(fe.length||document.addEventListener("DOMContentLoaded",()=>{for(let t of fe)t()}),fe.push(e)):e()},ve=()=>document.documentElement.dir==="rtl",Ht=e=>{$n(()=>{let t=ge();if(t){let r=e.NAME,n=t.fn[r];t.fn[r]=e.jQueryInterface,t.fn[r].Constructor=e,t.fn[r].noConflict=()=>(t.fn[r]=n,e.jQueryInterface)}})},Q=(e,t=[],r=e)=>typeof e=="function"?e.call(...t):r,wr=(e,t,r=!0)=>{if(!r){Q(e);return}let o=Rn(t)+5,s=!1,i=({target:a})=>{a===t&&(s=!0,t.removeEventListener(pe,i),Q(e))};t.addEventListener(pe,i),setTimeout(()=>{s||kn(t)},o)};var Bn=/[^.]*(?=\..*)\.|.*/,jn=/\..*/,Fn=/::\d+$/,be={},Ar=1,Or={mouseenter:"mouseover",mouseleave:"mouseout"},Hn=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Sr(e,t){return t&&`${t}::${Ar++}`||e.uidEvent||Ar++}function xr(e){let t=Sr(e);return e.uidEvent=t,be[t]=be[t]||{},be[t]}function Vn(e,t){return function r(n){return _e(n,{delegateTarget:e}),r.oneOff&&Ee.off(e,n.type,t),t.apply(e,[n])}}function qn(e,t,r){return function n(o){let s=e.querySelectorAll(t);for(let{target:i}=o;i&&i!==this;i=i.parentNode)for(let a of s)if(a===i)return _e(o,{delegateTarget:i}),n.oneOff&&Ee.off(e,o.type,t,r),r.apply(i,[o])}}function Cr(e,t,r=null){return Object.values(e).find(n=>n.callable===t&&n.delegationSelector===r)}function Lr(e,t,r){let n=typeof t=="string",o=n?r:t||r,s=Dr(e);return Hn.has(s)||(s=e),[n,o,s]}function Tr(e,t,r,n,o){if(typeof t!="string"||!e)return;let[s,i,a]=Lr(t,r,n);t in Or&&(i=(h=>function(m){if(!m.relatedTarget||m.relatedTarget!==m.delegateTarget&&!m.delegateTarget.contains(m.relatedTarget))return h.call(this,m)})(i));let c=xr(e),u=c[a]||(c[a]={}),l=Cr(u,i,s?r:null);if(l){l.oneOff=l.oneOff&&o;return}let f=Sr(i,t.replace(Bn,"")),g=s?qn(e,r,i):Vn(e,i);g.delegationSelector=s?r:null,g.callable=i,g.oneOff=o,g.uidEvent=f,u[f]=g,e.addEventListener(a,g,s)}function ye(e,t,r,n,o){let s=Cr(t[r],n,o);s&&(e.removeEventListener(r,s,!!o),delete t[r][s.uidEvent])}function Wn(e,t,r,n){let o=t[r]||{};for(let[s,i]of Object.entries(o))s.includes(n)&&ye(e,t,r,i.callable,i.delegationSelector)}function Dr(e){return e=e.replace(jn,""),Or[e]||e}var Ee={on(e,t,r,n){Tr(e,t,r,n,!1)},one(e,t,r,n){Tr(e,t,r,n,!0)},off(e,t,r,n){if(typeof t!="string"||!e)return;let[o,s,i]=Lr(t,r,n),a=i!==t,c=xr(e),u=c[i]||{},l=t.startsWith(".");if(typeof s!="undefined"){if(!Object.keys(u).length)return;ye(e,c,i,s,o?r:null);return}if(l)for(let f of Object.keys(c))Wn(e,c,f,t.slice(1));for(let[f,g]of Object.entries(u)){let p=f.replace(Fn,"");(!a||t.includes(p))&&ye(e,c,i,g.callable,g.delegationSelector)}},trigger(e,t,r){if(typeof t!="string"||!e)return null;let n=ge(),o=Dr(t),s=t!==o,i=null,a=!0,c=!0,u=!1;s&&n&&(i=n.Event(t,r),n(e).trigger(i),a=!i.isPropagationStopped(),c=!i.isImmediatePropagationStopped(),u=i.isDefaultPrevented());let l=_e(new Event(t,{bubbles:a,cancelable:!0}),r);return u&&l.preventDefault(),c&&e.dispatchEvent(l),l.defaultPrevented&&i&&i.preventDefault(),l}};function _e(e,t={}){for(let[r,n]of Object.entries(t))try{e[r]=n}catch(o){Object.defineProperty(e,r,{configurable:!0,get(){return n}})}return e}var S=Ee;function Nr(e){if(e==="true")return!0;if(e==="false")return!1;if(e===Number(e).toString())return Number(e);if(e===""||e==="null")return null;if(typeof e!="string")return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function we(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}var zn={setDataAttribute(e,t,r){e.setAttribute(`data-bs-${we(t)}`,r)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${we(t)}`)},getDataAttributes(e){if(!e)return{};let t={},r=Object.keys(e.dataset).filter(n=>n.startsWith("bs")&&!n.startsWith("bsConfig"));for(let n of r){let o=n.replace(/^bs/,"");o=o.charAt(0).toLowerCase()+o.slice(1),t[o]=Nr(e.dataset[n])}return t},getDataAttribute(e,t){return Nr(e.getAttribute(`data-bs-${we(t)}`))}},At=zn;var Ae=class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,r){let n=X(r)?At.getDataAttribute(r,"config"):{};return N(N(N(N({},this.constructor.Default),typeof n=="object"?n:{}),X(r)?At.getDataAttributes(r):{}),typeof t=="object"?t:{})}_typeCheckConfig(t,r=this.constructor.DefaultType){for(let[n,o]of Object.entries(r)){let s=t[n],i=X(s)?"element":vr(s);if(!new RegExp(o).test(i))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${i}" but expected type "${o}".`)}}},Vt=Ae;var Un="5.3.8",Te=class extends Vt{constructor(t,r){super(),t=Y(t),t&&(this._element=t,this._config=this._getConfig(r),Ft.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Ft.remove(this._element,this.constructor.DATA_KEY),S.off(this._element,this.constructor.EVENT_KEY);for(let t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,r,n=!0){wr(t,r,n)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return Ft.get(Y(t),this.DATA_KEY)}static getOrCreateInstance(t,r={}){return this.getInstance(t)||new this(t,typeof r=="object"?r:null)}static get VERSION(){return Un}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}},qt=Te;var Oe=e=>{let t=e.getAttribute("data-bs-target");if(!t||t==="#"){let r=e.getAttribute("href");if(!r||!r.includes("#")&&!r.startsWith("."))return null;r.includes("#")&&!r.startsWith("#")&&(r=`#${r.split("#")[1]}`),t=r&&r!=="#"?r.trim():null}return t?t.split(",").map(r=>de(r)).join(","):null},Wt={find(e,t=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(t,e))},findOne(e,t=document.documentElement){return Element.prototype.querySelector.call(t,e)},children(e,t){return[].concat(...e.children).filter(r=>r.matches(t))},parents(e,t){let r=[],n=e.parentNode.closest(t);for(;n;)r.push(n),n=n.parentNode.closest(t);return r},prev(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return[r];r=r.previousElementSibling}return[]},next(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return[r];r=r.nextElementSibling}return[]},focusableChildren(e){let t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(r=>`${r}:not([tabindex^="-"])`).join(",");return this.find(t,e).filter(r=>!Er(r)&&yr(r))},getSelectorFromElement(e){let t=Oe(e);return t&&Wt.findOne(t)?t:null},getElementFromSelector(e){let t=Oe(e);return t?Wt.findOne(t):null},getMultipleElementsFromSelector(e){let t=Oe(e);return t?Wt.find(t):[]}},F=Wt;var Yn="collapse",Gn="bs.collapse",Tt=`.${Gn}`,Kn=".data-api",Qn=`show${Tt}`,Xn=`shown${Tt}`,Jn=`hide${Tt}`,Zn=`hidden${Tt}`,to=`click${Tt}${Kn}`,Se="show",ct="collapse",zt="collapsing",eo="collapsed",ro=`:scope .${ct} .${ct}`,no="collapse-horizontal",oo="width",io="height",so=".collapse.show, .collapse.collapsing",xe='[data-bs-toggle="collapse"]',ao={parent:null,toggle:!0},co={parent:"(null|element)",toggle:"boolean"},Ut=class e extends qt{constructor(t,r){super(t,r),this._isTransitioning=!1,this._triggerArray=[];let n=F.find(xe);for(let o of n){let s=F.getSelectorFromElement(o),i=F.find(s).filter(a=>a===this._element);s!==null&&i.length&&this._triggerArray.push(o)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return ao}static get DefaultType(){return co}static get NAME(){return Yn}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(so).filter(a=>a!==this._element).map(a=>e.getOrCreateInstance(a,{toggle:!1}))),t.length&&t[0]._isTransitioning||S.trigger(this._element,Qn).defaultPrevented)return;for(let a of t)a.hide();let n=this._getDimension();this._element.classList.remove(ct),this._element.classList.add(zt),this._element.style[n]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;let o=()=>{this._isTransitioning=!1,this._element.classList.remove(zt),this._element.classList.add(ct,Se),this._element.style[n]="",S.trigger(this._element,Xn)},i=`scroll${n[0].toUpperCase()+n.slice(1)}`;this._queueCallback(o,this._element,!0),this._element.style[n]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown()||S.trigger(this._element,Jn).defaultPrevented)return;let r=this._getDimension();this._element.style[r]=`${this._element.getBoundingClientRect()[r]}px`,_r(this._element),this._element.classList.add(zt),this._element.classList.remove(ct,Se);for(let o of this._triggerArray){let s=F.getElementFromSelector(o);s&&!this._isShown(s)&&this._addAriaAndCollapsedClass([o],!1)}this._isTransitioning=!0;let n=()=>{this._isTransitioning=!1,this._element.classList.remove(zt),this._element.classList.add(ct),S.trigger(this._element,Zn)};this._element.style[r]="",this._queueCallback(n,this._element,!0)}_isShown(t=this._element){return t.classList.contains(Se)}_configAfterMerge(t){return t.toggle=!!t.toggle,t.parent=Y(t.parent),t}_getDimension(){return this._element.classList.contains(no)?oo:io}_initializeChildren(){if(!this._config.parent)return;let t=this._getFirstLevelChildren(xe);for(let r of t){let n=F.getElementFromSelector(r);n&&this._addAriaAndCollapsedClass([r],this._isShown(n))}}_getFirstLevelChildren(t){let r=F.find(ro,this._config.parent);return F.find(t,this._config.parent).filter(n=>!r.includes(n))}_addAriaAndCollapsedClass(t,r){if(t.length)for(let n of t)n.classList.toggle(eo,!r),n.setAttribute("aria-expanded",r)}static jQueryInterface(t){let r={};return typeof t=="string"&&/show|hide/.test(t)&&(r.toggle=!1),this.each(function(){let n=e.getOrCreateInstance(this,r);if(typeof t=="string"){if(typeof n[t]=="undefined")throw new TypeError(`No method named "${t}"`);n[t]()}})}};S.on(document,to,xe,function(e){(e.target.tagName==="A"||e.delegateTarget&&e.delegateTarget.tagName==="A")&&e.preventDefault();for(let t of F.getMultipleElementsFromSelector(this))Ut.getOrCreateInstance(t,{toggle:!1}).toggle()});Ht(Ut);var us=document.getElementsByClassName("collapse");var We=Mn(rn());var ai=/^aria-[\w-]*$/i,Xt={"*":["class","dir","id","lang","role",ai],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},ci=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),li=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,ui=(e,t)=>{let r=e.nodeName.toLowerCase();return t.includes(r)?ci.has(r)?!!li.test(e.nodeValue):!0:t.filter(n=>n instanceof RegExp).some(n=>n.test(r))};function nn(e,t,r){if(!e.length)return e;if(r&&typeof r=="function")return r(e);let o=new window.DOMParser().parseFromString(e,"text/html"),s=[].concat(...o.body.querySelectorAll("*"));for(let i of s){let a=i.nodeName.toLowerCase();if(!Object.keys(t).includes(a)){i.remove();continue}let c=[].concat(...i.attributes),u=[].concat(t["*"]||[],t[a]||[]);for(let l of c)ui(l,u)||i.removeAttribute(l.nodeName)}return o.body.innerHTML}var fi="TemplateFactory",pi={allowList:Xt,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},di={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},hi={entry:"(string|element|function|null)",selector:"(string|element)"},Fe=class extends Vt{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return pi}static get DefaultType(){return di}static get NAME(){return fi}getContent(){return Object.values(this._config.content).map(t=>this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content=N(N({},this._config.content),t),this}toHtml(){let t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(let[o,s]of Object.entries(this._config.content))this._setContent(t,s,o);let r=t.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&r.classList.add(...n.split(" ")),r}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(let[r,n]of Object.entries(t))super._typeCheckConfig({selector:r,entry:n},hi)}_setContent(t,r,n){let o=F.findOne(n,t);if(o){if(r=this._resolvePossibleFunction(r),!r){o.remove();return}if(X(r)){this._putElementInTemplate(Y(r),o);return}if(this._config.html){o.innerHTML=this._maybeSanitize(r);return}o.textContent=r}}_maybeSanitize(t){return this._config.sanitize?nn(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return Q(t,[void 0,this])}_putElementInTemplate(t,r){if(this._config.html){r.innerHTML="",r.append(t);return}r.textContent=t.textContent}},on=Fe;var mi="tooltip",gi=new Set(["sanitize","allowList","sanitizeFn"]),He="fade",vi="modal",Jt="show",bi=".tooltip-inner",sn=`.${vi}`,an="hide.bs.modal",Nt="hover",Ve="focus",qe="click",yi="manual",Ei="hide",_i="hidden",wi="show",Ai="shown",Ti="inserted",Oi="click",Si="focusin",xi="focusout",Ci="mouseenter",Li="mouseleave",Di={AUTO:"auto",TOP:"top",RIGHT:ve()?"left":"right",BOTTOM:"bottom",LEFT:ve()?"right":"left"},Ni={allowList:Xt,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Ii={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"},Zt=class e extends qt{constructor(t,r){if(typeof We=="undefined")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(t,r),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Ni}static get DefaultType(){return Ii}static get NAME(){return mi}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),S.off(this._element.closest(sn),an,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;let t=S.trigger(this._element,this.constructor.eventName(wi)),n=(he(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!n)return;this._disposePopper();let o=this._getTipElement();this._element.setAttribute("aria-describedby",o.getAttribute("id"));let{container:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(o),S.trigger(this._element,this.constructor.eventName(Ti))),this._popper=this._createPopper(o),o.classList.add(Jt),"ontouchstart"in document.documentElement)for(let a of[].concat(...document.body.children))S.on(a,"mouseover",me);let i=()=>{S.trigger(this._element,this.constructor.eventName(Ai)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(i,this.tip,this._isAnimated())}hide(){if(!this._isShown()||S.trigger(this._element,this.constructor.eventName(Ei)).defaultPrevented)return;if(this._getTipElement().classList.remove(Jt),"ontouchstart"in document.documentElement)for(let o of[].concat(...document.body.children))S.off(o,"mouseover",me);this._activeTrigger[qe]=!1,this._activeTrigger[Ve]=!1,this._activeTrigger[Nt]=!1,this._isHovered=null;let n=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),S.trigger(this._element,this.constructor.eventName(_i)))};this._queueCallback(n,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){let r=this._getTemplateFactory(t).toHtml();if(!r)return null;r.classList.remove(He,Jt),r.classList.add(`bs-${this.constructor.NAME}-auto`);let n=br(this.constructor.NAME).toString();return r.setAttribute("id",n),this._isAnimated()&&r.classList.add(He),r}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new on(mr(N({},this._config),{content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)})),this._templateFactory}_getContentForTemplate(){return{[bi]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(He)}_isShown(){return this.tip&&this.tip.classList.contains(Jt)}_createPopper(t){let r=Q(this._config.placement,[this,t,this._element]),n=Di[r.toUpperCase()];return We.createPopper(this._element,t,this._getPopperConfig(n))}_getOffset(){let{offset:t}=this._config;return typeof t=="string"?t.split(",").map(r=>Number.parseInt(r,10)):typeof t=="function"?r=>t(r,this._element):t}_resolvePossibleFunction(t){return Q(t,[this._element,this._element])}_getPopperConfig(t){let r={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:n=>{this._getTipElement().setAttribute("data-popper-placement",n.state.placement)}}]};return N(N({},r),Q(this._config.popperConfig,[void 0,r]))}_setListeners(){let t=this._config.trigger.split(" ");for(let r of t)if(r==="click")S.on(this._element,this.constructor.eventName(Oi),this._config.selector,n=>{let o=this._initializeOnDelegatedTarget(n);o._activeTrigger[qe]=!(o._isShown()&&o._activeTrigger[qe]),o.toggle()});else if(r!==yi){let n=r===Nt?this.constructor.eventName(Ci):this.constructor.eventName(Si),o=r===Nt?this.constructor.eventName(Li):this.constructor.eventName(xi);S.on(this._element,n,this._config.selector,s=>{let i=this._initializeOnDelegatedTarget(s);i._activeTrigger[s.type==="focusin"?Ve:Nt]=!0,i._enter()}),S.on(this._element,o,this._config.selector,s=>{let i=this._initializeOnDelegatedTarget(s);i._activeTrigger[s.type==="focusout"?Ve:Nt]=i._element.contains(s.relatedTarget),i._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},S.on(this._element.closest(sn),an,this._hideModalHandler)}_fixTitle(){let t=this._element.getAttribute("title");t&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,r){clearTimeout(this._timeout),this._timeout=setTimeout(t,r)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){let r=At.getDataAttributes(this._element);for(let n of Object.keys(r))gi.has(n)&&delete r[n];return t=N(N({},r),typeof t=="object"&&t?t:{}),t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=t.container===!1?document.body:Y(t.container),typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),typeof t.title=="number"&&(t.title=t.title.toString()),typeof t.content=="number"&&(t.content=t.content.toString()),t}_getDelegateConfig(){let t={};for(let[r,n]of Object.entries(this._config))this.constructor.Default[r]!==n&&(t[r]=n);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){let r=e.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof r[t]=="undefined")throw new TypeError(`No method named "${t}"`);r[t]()}})}};Ht(Zt);var ze=Zt;var Z=class{static get attrTimestamp(){return"data-ts"}static get attrDateFormat(){return"data-df"}static get locale(){return document.documentElement.getAttribute("lang").substring(0,2)}static getTimestamp(t){return Number(t.getAttribute(this.attrTimestamp))}static getDateFormat(t){return t.getAttribute(this.attrDateFormat)}};function Ue(){dayjs.locale(Z.locale),dayjs.extend(window.dayjs_plugin_localizedFormat),document.querySelectorAll(`[${Z.attrTimestamp}]`).forEach(e=>{let t=dayjs.unix(Z.getTimestamp(e)),r=t.format(Z.getDateFormat(e));if(e.textContent=r,e.removeAttribute(Z.attrTimestamp),e.removeAttribute(Z.attrDateFormat),e.hasAttribute("data-bs-toggle")&&e.getAttribute("data-bs-toggle")==="tooltip"){let n=t.format("llll");e.setAttribute("data-bs-title",n)}})}var Pi=document.getElementById("toc-bar"),Mi=document.getElementById("toc-solo-trigger"),Ri=document.getElementsByClassName("toc-trigger"),z=document.getElementById("toc-popup"),ki=document.getElementById("toc-popup-close"),cn="overflow-hidden",Ye="closing",It,Pt,mt=class mt{static initBar(){new IntersectionObserver(r=>{r.forEach(n=>{Pi.classList.toggle("invisible",n.isIntersecting)})},{rootMargin:`-${U(this,Pt)}px 0px 0px 0px`}).observe(Mi),jt(this,It,!1)}static listenAnchors(){[...document.getElementsByClassName("toc-link")].forEach(r=>{r.onclick=()=>this.hidePopup()})}static refresh(){U(this,It)&&this.initComponents(),tocbot.refresh(this.options),this.listenAnchors()}static get popupOpened(){return z.open}static showPopup(){this.lockScroll(!0),z.showModal(),z.querySelector("li.is-active-li").scrollIntoView({block:"center"})}static hidePopup(){z.toggleAttribute(Ye),z.addEventListener("animationend",()=>{z.toggleAttribute(Ye),z.close()},{once:!0}),this.lockScroll(!1)}static lockScroll(t){document.documentElement.classList.toggle(cn,t),document.body.classList.toggle(cn,t)}static clickBackdrop(t){if(z.hasAttribute(Ye))return;let r=t.target.getBoundingClientRect();(t.clientXr.right||t.clientYr.bottom)&&this.hidePopup()}static initComponents(){this.initBar(),[...Ri].forEach(t=>{t.onclick=()=>this.showPopup()}),z.onclick=t=>this.clickBackdrop(t),ki.onclick=()=>this.hidePopup(),z.oncancel=t=>{t.preventDefault(),this.hidePopup()}}static init(){tocbot.init(this.options),this.listenAnchors(),this.initComponents()}};It=new WeakMap,Pt=new WeakMap,wt(mt,It,!0),wt(mt,Pt,48),_t(mt,"options",{tocSelector:"#toc-popup-content",contentSelector:".content",ignoreSelector:"[data-toc-skip]",headingSelector:"h2, h3, h4",orderedList:!1,scrollSmooth:!1,collapseDepth:4,headingsOffset:U(mt,Pt)});var Ge=mt;var Fs=matchMedia("(min-width: 1200px)");var Vs=Theme.getThemeMapper("default","dark");var ln=document.getElementById("mode-toggle");function Ke(){ln&&ln.addEventListener("click",()=>{Theme.flip()})}function Qe(){let e=document.getElementById("back-to-top");window.addEventListener("scroll",()=>{window.scrollY>50?e.classList.add("show"):e.classList.remove("show")}),e.addEventListener("click",()=>{window.scrollTo({top:0})})}function Xe(){[...document.querySelectorAll('[data-bs-toggle="tooltip"]')].map(t=>new ze(t))}function Je(){Ke(),Qe(),Xe()}var $i="sidebar-display",Bi=document.getElementById("sidebar"),ji=document.getElementById("sidebar-trigger"),un=document.getElementById("mask"),tt,te=class{static toggle(){jt(this,tt,!U(this,tt)),document.body.toggleAttribute($i,U(this,tt)),Bi.classList.toggle("z-2",U(this,tt)),un.classList.toggle("d-none",!U(this,tt))}};tt=new WeakMap,wt(te,tt,!1);function Ze(){ji.onclick=un.onclick=()=>te.toggle()}var fn=document.getElementById("sidebar-trigger"),tr=document.getElementById("search-trigger"),ee=document.getElementById("search-cancel"),pn=document.querySelectorAll("#main-wrapper>.container>.row"),dn=document.getElementById("topbar-title"),re=document.getElementById("search"),hn=document.getElementById("search-result-wrapper"),Fi=document.getElementById("search-results"),gt=document.getElementById("search-input"),ne=document.getElementById("search-hints"),er="d-block",M="d-none",mn="input-focus",gn="d-flex",oe=class{static on(){fn.classList.add(M),dn.classList.add(M),tr.classList.add(M),re.classList.add(gn),ee.classList.add(er)}static off(){ee.classList.remove(er),re.classList.remove(gn),fn.classList.remove(M),dn.classList.remove(M),tr.classList.remove(M)}},st=class{static on(){this.resultVisible||(hn.classList.remove(M),pn.forEach(t=>{t.classList.add(M)}),this.resultVisible=!0)}static off(){this.resultVisible&&(Fi.innerHTML="",ne.classList.contains(M)&&ne.classList.remove(M),hn.classList.add(M),pn.forEach(t=>{t.classList.remove(M)}),gt.textContent="",this.resultVisible=!1)}};_t(st,"resultVisible",!1);function vn(){return ee.classList.contains(er)}function bn(){tr.addEventListener("click",()=>{oe.on(),st.on(),gt.focus()}),ee.addEventListener("click",()=>{oe.off(),st.off()}),gt.addEventListener("focus",()=>{re.classList.add(mn)}),gt.addEventListener("focusout",()=>{re.classList.remove(mn)}),gt.addEventListener("input",()=>{gt.value===""?vn()?ne.classList.remove(M):st.off():(st.on(),vn()&&ne.classList.add(M))})}function rr(){bn()}Ze();rr();Ue();Je();})(); +(() => { + var __create = Object.create; + var __defProp = Object.defineProperty; + var __defProps = Object.defineProperties; + var __getOwnPropDesc = Object.getOwnPropertyDescriptor; + var __getOwnPropDescs = Object.getOwnPropertyDescriptors; + var __getOwnPropNames = Object.getOwnPropertyNames; + var __getOwnPropSymbols = Object.getOwnPropertySymbols; + var __getProtoOf = Object.getPrototypeOf; + var __hasOwnProp = Object.prototype.hasOwnProperty; + var __propIsEnum = Object.prototype.propertyIsEnumerable; + var __typeError = (msg) => { + throw TypeError(msg); + }; + var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; + var __spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b)) { + if (__propIsEnum.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + } + return a; + }; + var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); + var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + }; + var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; + }; + var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); + var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg); + var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)); + var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value); + var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2@v2.21100.20000/package/dist/cjs/popper.js + var require_popper = __commonJS({ + "ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2@v2.21100.20000/package/dist/cjs/popper.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + function getWindow(node) { + if (node == null) { + return window; + } + if (node.toString() !== "[object Window]") { + var ownerDocument = node.ownerDocument; + return ownerDocument ? ownerDocument.defaultView || window : window; + } + return node; + } + function isElement2(node) { + var OwnElement = getWindow(node).Element; + return node instanceof OwnElement || node instanceof Element; + } + function isHTMLElement(node) { + var OwnElement = getWindow(node).HTMLElement; + return node instanceof OwnElement || node instanceof HTMLElement; + } + function isShadowRoot(node) { + if (typeof ShadowRoot === "undefined") { + return false; + } + var OwnElement = getWindow(node).ShadowRoot; + return node instanceof OwnElement || node instanceof ShadowRoot; + } + var max = Math.max; + var min = Math.min; + var round = Math.round; + function getBoundingClientRect(element, includeScale) { + if (includeScale === void 0) { + includeScale = false; + } + var rect = element.getBoundingClientRect(); + var scaleX = 1; + var scaleY = 1; + if (isHTMLElement(element) && includeScale) { + var offsetHeight = element.offsetHeight; + var offsetWidth = element.offsetWidth; + if (offsetWidth > 0) { + scaleX = round(rect.width) / offsetWidth || 1; + } + if (offsetHeight > 0) { + scaleY = round(rect.height) / offsetHeight || 1; + } + } + return { + width: rect.width / scaleX, + height: rect.height / scaleY, + top: rect.top / scaleY, + right: rect.right / scaleX, + bottom: rect.bottom / scaleY, + left: rect.left / scaleX, + x: rect.left / scaleX, + y: rect.top / scaleY + }; + } + function getWindowScroll(node) { + var win = getWindow(node); + var scrollLeft = win.pageXOffset; + var scrollTop = win.pageYOffset; + return { + scrollLeft, + scrollTop + }; + } + function getHTMLElementScroll(element) { + return { + scrollLeft: element.scrollLeft, + scrollTop: element.scrollTop + }; + } + function getNodeScroll(node) { + if (node === getWindow(node) || !isHTMLElement(node)) { + return getWindowScroll(node); + } else { + return getHTMLElementScroll(node); + } + } + function getNodeName(element) { + return element ? (element.nodeName || "").toLowerCase() : null; + } + function getDocumentElement(element) { + return ((isElement2(element) ? element.ownerDocument : ( + // $FlowFixMe[prop-missing] + element.document + )) || window.document).documentElement; + } + function getWindowScrollBarX(element) { + return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; + } + function getComputedStyle2(element) { + return getWindow(element).getComputedStyle(element); + } + function isScrollParent(element) { + var _getComputedStyle = getComputedStyle2(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY; + return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); + } + function isElementScaled(element) { + var rect = element.getBoundingClientRect(); + var scaleX = round(rect.width) / element.offsetWidth || 1; + var scaleY = round(rect.height) / element.offsetHeight || 1; + return scaleX !== 1 || scaleY !== 1; + } + function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { + if (isFixed === void 0) { + isFixed = false; + } + var isOffsetParentAnElement = isHTMLElement(offsetParent); + var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent); + var documentElement = getDocumentElement(offsetParent); + var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled); + var scroll = { + scrollLeft: 0, + scrollTop: 0 + }; + var offsets = { + x: 0, + y: 0 + }; + if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { + if (getNodeName(offsetParent) !== "body" || // https://github.com/popperjs/popper-core/issues/1078 + isScrollParent(documentElement)) { + scroll = getNodeScroll(offsetParent); + } + if (isHTMLElement(offsetParent)) { + offsets = getBoundingClientRect(offsetParent, true); + offsets.x += offsetParent.clientLeft; + offsets.y += offsetParent.clientTop; + } else if (documentElement) { + offsets.x = getWindowScrollBarX(documentElement); + } + } + return { + x: rect.left + scroll.scrollLeft - offsets.x, + y: rect.top + scroll.scrollTop - offsets.y, + width: rect.width, + height: rect.height + }; + } + function getLayoutRect(element) { + var clientRect = getBoundingClientRect(element); + var width = element.offsetWidth; + var height = element.offsetHeight; + if (Math.abs(clientRect.width - width) <= 1) { + width = clientRect.width; + } + if (Math.abs(clientRect.height - height) <= 1) { + height = clientRect.height; + } + return { + x: element.offsetLeft, + y: element.offsetTop, + width, + height + }; + } + function getParentNode(element) { + if (getNodeName(element) === "html") { + return element; + } + return ( + // this is a quicker (but less type safe) way to save quite some bytes from the bundle + // $FlowFixMe[incompatible-return] + // $FlowFixMe[prop-missing] + element.assignedSlot || // step into the shadow DOM of the parent of a slotted node + element.parentNode || // DOM Element detected + (isShadowRoot(element) ? element.host : null) || // ShadowRoot detected + // $FlowFixMe[incompatible-call]: HTMLElement is a Node + getDocumentElement(element) + ); + } + function getScrollParent(node) { + if (["html", "body", "#document"].indexOf(getNodeName(node)) >= 0) { + return node.ownerDocument.body; + } + if (isHTMLElement(node) && isScrollParent(node)) { + return node; + } + return getScrollParent(getParentNode(node)); + } + function listScrollParents(element, list) { + var _element$ownerDocumen; + if (list === void 0) { + list = []; + } + var scrollParent = getScrollParent(element); + var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body); + var win = getWindow(scrollParent); + var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; + var updatedList = list.concat(target); + return isBody ? updatedList : ( + // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here + updatedList.concat(listScrollParents(getParentNode(target))) + ); + } + function isTableElement(element) { + return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0; + } + function getTrueOffsetParent(element) { + if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837 + getComputedStyle2(element).position === "fixed") { + return null; + } + return element.offsetParent; + } + function getContainingBlock(element) { + var isFirefox = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1; + var isIE = navigator.userAgent.indexOf("Trident") !== -1; + if (isIE && isHTMLElement(element)) { + var elementCss = getComputedStyle2(element); + if (elementCss.position === "fixed") { + return null; + } + } + var currentNode = getParentNode(element); + while (isHTMLElement(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0) { + var css = getComputedStyle2(currentNode); + if (css.transform !== "none" || css.perspective !== "none" || css.contain === "paint" || ["transform", "perspective"].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === "filter" || isFirefox && css.filter && css.filter !== "none") { + return currentNode; + } else { + currentNode = currentNode.parentNode; + } + } + return null; + } + function getOffsetParent(element) { + var window2 = getWindow(element); + var offsetParent = getTrueOffsetParent(element); + while (offsetParent && isTableElement(offsetParent) && getComputedStyle2(offsetParent).position === "static") { + offsetParent = getTrueOffsetParent(offsetParent); + } + if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle2(offsetParent).position === "static")) { + return window2; + } + return offsetParent || getContainingBlock(element) || window2; + } + var top = "top"; + var bottom = "bottom"; + var right = "right"; + var left = "left"; + var auto = "auto"; + var basePlacements = [top, bottom, right, left]; + var start = "start"; + var end = "end"; + var clippingParents = "clippingParents"; + var viewport = "viewport"; + var popper = "popper"; + var reference = "reference"; + var variationPlacements = /* @__PURE__ */ basePlacements.reduce(function(acc, placement) { + return acc.concat([placement + "-" + start, placement + "-" + end]); + }, []); + var placements = /* @__PURE__ */ [].concat(basePlacements, [auto]).reduce(function(acc, placement) { + return acc.concat([placement, placement + "-" + start, placement + "-" + end]); + }, []); + var beforeRead = "beforeRead"; + var read = "read"; + var afterRead = "afterRead"; + var beforeMain = "beforeMain"; + var main = "main"; + var afterMain = "afterMain"; + var beforeWrite = "beforeWrite"; + var write = "write"; + var afterWrite = "afterWrite"; + var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite]; + function order(modifiers) { + var map = /* @__PURE__ */ new Map(); + var visited = /* @__PURE__ */ new Set(); + var result = []; + modifiers.forEach(function(modifier) { + map.set(modifier.name, modifier); + }); + function sort(modifier) { + visited.add(modifier.name); + var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); + requires.forEach(function(dep) { + if (!visited.has(dep)) { + var depModifier = map.get(dep); + if (depModifier) { + sort(depModifier); + } + } + }); + result.push(modifier); + } + modifiers.forEach(function(modifier) { + if (!visited.has(modifier.name)) { + sort(modifier); + } + }); + return result; + } + function orderModifiers(modifiers) { + var orderedModifiers = order(modifiers); + return modifierPhases.reduce(function(acc, phase) { + return acc.concat(orderedModifiers.filter(function(modifier) { + return modifier.phase === phase; + })); + }, []); + } + function debounce(fn) { + var pending; + return function() { + if (!pending) { + pending = new Promise(function(resolve) { + Promise.resolve().then(function() { + pending = void 0; + resolve(fn()); + }); + }); + } + return pending; + }; + } + function format(str) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + return [].concat(args).reduce(function(p, c) { + return p.replace(/%s/, c); + }, str); + } + var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s'; + var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available'; + var VALID_PROPERTIES = ["name", "enabled", "phase", "fn", "effect", "requires", "options"]; + function validateModifiers(modifiers) { + modifiers.forEach(function(modifier) { + [].concat(Object.keys(modifier), VALID_PROPERTIES).filter(function(value, index, self) { + return self.indexOf(value) === index; + }).forEach(function(key) { + switch (key) { + case "name": + if (typeof modifier.name !== "string") { + console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', '"' + String(modifier.name) + '"')); + } + break; + case "enabled": + if (typeof modifier.enabled !== "boolean") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', '"' + String(modifier.enabled) + '"')); + } + break; + case "phase": + if (modifierPhases.indexOf(modifier.phase) < 0) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(", "), '"' + String(modifier.phase) + '"')); + } + break; + case "fn": + if (typeof modifier.fn !== "function") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', '"' + String(modifier.fn) + '"')); + } + break; + case "effect": + if (modifier.effect != null && typeof modifier.effect !== "function") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', '"' + String(modifier.fn) + '"')); + } + break; + case "requires": + if (modifier.requires != null && !Array.isArray(modifier.requires)) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', '"' + String(modifier.requires) + '"')); + } + break; + case "requiresIfExists": + if (!Array.isArray(modifier.requiresIfExists)) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', '"' + String(modifier.requiresIfExists) + '"')); + } + break; + case "options": + case "data": + break; + default: + console.error('PopperJS: an invalid property has been provided to the "' + modifier.name + '" modifier, valid properties are ' + VALID_PROPERTIES.map(function(s) { + return '"' + s + '"'; + }).join(", ") + '; but "' + key + '" was provided.'); + } + modifier.requires && modifier.requires.forEach(function(requirement) { + if (modifiers.find(function(mod) { + return mod.name === requirement; + }) == null) { + console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement)); + } + }); + }); + }); + } + function uniqueBy(arr, fn) { + var identifiers = /* @__PURE__ */ new Set(); + return arr.filter(function(item) { + var identifier = fn(item); + if (!identifiers.has(identifier)) { + identifiers.add(identifier); + return true; + } + }); + } + function getBasePlacement(placement) { + return placement.split("-")[0]; + } + function mergeByName(modifiers) { + var merged = modifiers.reduce(function(merged2, current) { + var existing = merged2[current.name]; + merged2[current.name] = existing ? Object.assign({}, existing, current, { + options: Object.assign({}, existing.options, current.options), + data: Object.assign({}, existing.data, current.data) + }) : current; + return merged2; + }, {}); + return Object.keys(merged).map(function(key) { + return merged[key]; + }); + } + function getViewportRect(element) { + var win = getWindow(element); + var html = getDocumentElement(element); + var visualViewport = win.visualViewport; + var width = html.clientWidth; + var height = html.clientHeight; + var x = 0; + var y = 0; + if (visualViewport) { + width = visualViewport.width; + height = visualViewport.height; + if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { + x = visualViewport.offsetLeft; + y = visualViewport.offsetTop; + } + } + return { + width, + height, + x: x + getWindowScrollBarX(element), + y + }; + } + function getDocumentRect(element) { + var _element$ownerDocumen; + var html = getDocumentElement(element); + var winScroll = getWindowScroll(element); + var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; + var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); + var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); + var x = -winScroll.scrollLeft + getWindowScrollBarX(element); + var y = -winScroll.scrollTop; + if (getComputedStyle2(body || html).direction === "rtl") { + x += max(html.clientWidth, body ? body.clientWidth : 0) - width; + } + return { + width, + height, + x, + y + }; + } + function contains(parent, child) { + var rootNode = child.getRootNode && child.getRootNode(); + if (parent.contains(child)) { + return true; + } else if (rootNode && isShadowRoot(rootNode)) { + var next = child; + do { + if (next && parent.isSameNode(next)) { + return true; + } + next = next.parentNode || next.host; + } while (next); + } + return false; + } + function rectToClientRect(rect) { + return Object.assign({}, rect, { + left: rect.x, + top: rect.y, + right: rect.x + rect.width, + bottom: rect.y + rect.height + }); + } + function getInnerBoundingClientRect(element) { + var rect = getBoundingClientRect(element); + rect.top = rect.top + element.clientTop; + rect.left = rect.left + element.clientLeft; + rect.bottom = rect.top + element.clientHeight; + rect.right = rect.left + element.clientWidth; + rect.width = element.clientWidth; + rect.height = element.clientHeight; + rect.x = rect.left; + rect.y = rect.top; + return rect; + } + function getClientRectFromMixedType(element, clippingParent) { + return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement2(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); + } + function getClippingParents(element) { + var clippingParents2 = listScrollParents(getParentNode(element)); + var canEscapeClipping = ["absolute", "fixed"].indexOf(getComputedStyle2(element).position) >= 0; + var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element; + if (!isElement2(clipperElement)) { + return []; + } + return clippingParents2.filter(function(clippingParent) { + return isElement2(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body" && (canEscapeClipping ? getComputedStyle2(clippingParent).position !== "static" : true); + }); + } + function getClippingRect(element, boundary, rootBoundary) { + var mainClippingParents = boundary === "clippingParents" ? getClippingParents(element) : [].concat(boundary); + var clippingParents2 = [].concat(mainClippingParents, [rootBoundary]); + var firstClippingParent = clippingParents2[0]; + var clippingRect = clippingParents2.reduce(function(accRect, clippingParent) { + var rect = getClientRectFromMixedType(element, clippingParent); + accRect.top = max(rect.top, accRect.top); + accRect.right = min(rect.right, accRect.right); + accRect.bottom = min(rect.bottom, accRect.bottom); + accRect.left = max(rect.left, accRect.left); + return accRect; + }, getClientRectFromMixedType(element, firstClippingParent)); + clippingRect.width = clippingRect.right - clippingRect.left; + clippingRect.height = clippingRect.bottom - clippingRect.top; + clippingRect.x = clippingRect.left; + clippingRect.y = clippingRect.top; + return clippingRect; + } + function getVariation(placement) { + return placement.split("-")[1]; + } + function getMainAxisFromPlacement(placement) { + return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y"; + } + function computeOffsets(_ref) { + var reference2 = _ref.reference, element = _ref.element, placement = _ref.placement; + var basePlacement = placement ? getBasePlacement(placement) : null; + var variation = placement ? getVariation(placement) : null; + var commonX = reference2.x + reference2.width / 2 - element.width / 2; + var commonY = reference2.y + reference2.height / 2 - element.height / 2; + var offsets; + switch (basePlacement) { + case top: + offsets = { + x: commonX, + y: reference2.y - element.height + }; + break; + case bottom: + offsets = { + x: commonX, + y: reference2.y + reference2.height + }; + break; + case right: + offsets = { + x: reference2.x + reference2.width, + y: commonY + }; + break; + case left: + offsets = { + x: reference2.x - element.width, + y: commonY + }; + break; + default: + offsets = { + x: reference2.x, + y: reference2.y + }; + } + var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null; + if (mainAxis != null) { + var len = mainAxis === "y" ? "height" : "width"; + switch (variation) { + case start: + offsets[mainAxis] = offsets[mainAxis] - (reference2[len] / 2 - element[len] / 2); + break; + case end: + offsets[mainAxis] = offsets[mainAxis] + (reference2[len] / 2 - element[len] / 2); + break; + } + } + return offsets; + } + function getFreshSideObject() { + return { + top: 0, + right: 0, + bottom: 0, + left: 0 + }; + } + function mergePaddingObject(paddingObject) { + return Object.assign({}, getFreshSideObject(), paddingObject); + } + function expandToHashMap(value, keys) { + return keys.reduce(function(hashMap, key) { + hashMap[key] = value; + return hashMap; + }, {}); + } + function detectOverflow(state, options) { + if (options === void 0) { + options = {}; + } + var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding; + var paddingObject = mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements)); + var altContext = elementContext === popper ? reference : popper; + var popperRect = state.rects.popper; + var element = state.elements[altBoundary ? altContext : elementContext]; + var clippingClientRect = getClippingRect(isElement2(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary); + var referenceClientRect = getBoundingClientRect(state.elements.reference); + var popperOffsets2 = computeOffsets({ + reference: referenceClientRect, + element: popperRect, + strategy: "absolute", + placement + }); + var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets2)); + var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; + var overflowOffsets = { + top: clippingClientRect.top - elementClientRect.top + paddingObject.top, + bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, + left: clippingClientRect.left - elementClientRect.left + paddingObject.left, + right: elementClientRect.right - clippingClientRect.right + paddingObject.right + }; + var offsetData = state.modifiersData.offset; + if (elementContext === popper && offsetData) { + var offset2 = offsetData[placement]; + Object.keys(overflowOffsets).forEach(function(key) { + var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1; + var axis = [top, bottom].indexOf(key) >= 0 ? "y" : "x"; + overflowOffsets[key] += offset2[axis] * multiply; + }); + } + return overflowOffsets; + } + var INVALID_ELEMENT_ERROR = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element."; + var INFINITE_LOOP_ERROR = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash."; + var DEFAULT_OPTIONS = { + placement: "bottom", + modifiers: [], + strategy: "absolute" + }; + function areValidElements() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + return !args.some(function(element) { + return !(element && typeof element.getBoundingClientRect === "function"); + }); + } + function popperGenerator(generatorOptions) { + if (generatorOptions === void 0) { + generatorOptions = {}; + } + var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers2 = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2; + return function createPopper3(reference2, popper2, options) { + if (options === void 0) { + options = defaultOptions; + } + var state = { + placement: "bottom", + orderedModifiers: [], + options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), + modifiersData: {}, + elements: { + reference: reference2, + popper: popper2 + }, + attributes: {}, + styles: {} + }; + var effectCleanupFns = []; + var isDestroyed = false; + var instance = { + state, + setOptions: function setOptions(setOptionsAction) { + var options2 = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction; + cleanupModifierEffects(); + state.options = Object.assign({}, defaultOptions, state.options, options2); + state.scrollParents = { + reference: isElement2(reference2) ? listScrollParents(reference2) : reference2.contextElement ? listScrollParents(reference2.contextElement) : [], + popper: listScrollParents(popper2) + }; + var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers2, state.options.modifiers))); + state.orderedModifiers = orderedModifiers.filter(function(m) { + return m.enabled; + }); + if (true) { + var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function(_ref) { + var name = _ref.name; + return name; + }); + validateModifiers(modifiers); + if (getBasePlacement(state.options.placement) === auto) { + var flipModifier = state.orderedModifiers.find(function(_ref2) { + var name = _ref2.name; + return name === "flip"; + }); + if (!flipModifier) { + console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" ")); + } + } + var _getComputedStyle = getComputedStyle2(popper2), marginTop = _getComputedStyle.marginTop, marginRight = _getComputedStyle.marginRight, marginBottom = _getComputedStyle.marginBottom, marginLeft = _getComputedStyle.marginLeft; + if ([marginTop, marginRight, marginBottom, marginLeft].some(function(margin) { + return parseFloat(margin); + })) { + console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" ")); + } + } + runModifierEffects(); + return instance.update(); + }, + // Sync update – it will always be executed, even if not necessary. This + // is useful for low frequency updates where sync behavior simplifies the + // logic. + // For high frequency updates (e.g. `resize` and `scroll` events), always + // prefer the async Popper#update method + forceUpdate: function forceUpdate() { + if (isDestroyed) { + return; + } + var _state$elements = state.elements, reference3 = _state$elements.reference, popper3 = _state$elements.popper; + if (!areValidElements(reference3, popper3)) { + if (true) { + console.error(INVALID_ELEMENT_ERROR); + } + return; + } + state.rects = { + reference: getCompositeRect(reference3, getOffsetParent(popper3), state.options.strategy === "fixed"), + popper: getLayoutRect(popper3) + }; + state.reset = false; + state.placement = state.options.placement; + state.orderedModifiers.forEach(function(modifier) { + return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); + }); + var __debug_loops__ = 0; + for (var index = 0; index < state.orderedModifiers.length; index++) { + if (true) { + __debug_loops__ += 1; + if (__debug_loops__ > 100) { + console.error(INFINITE_LOOP_ERROR); + break; + } + } + if (state.reset === true) { + state.reset = false; + index = -1; + continue; + } + var _state$orderedModifie = state.orderedModifiers[index], fn = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name; + if (typeof fn === "function") { + state = fn({ + state, + options: _options, + name, + instance + }) || state; + } + } + }, + // Async and optimistically optimized update – it will not be executed if + // not necessary (debounced to run at most once-per-tick) + update: debounce(function() { + return new Promise(function(resolve) { + instance.forceUpdate(); + resolve(state); + }); + }), + destroy: function destroy() { + cleanupModifierEffects(); + isDestroyed = true; + } + }; + if (!areValidElements(reference2, popper2)) { + if (true) { + console.error(INVALID_ELEMENT_ERROR); + } + return instance; + } + instance.setOptions(options).then(function(state2) { + if (!isDestroyed && options.onFirstUpdate) { + options.onFirstUpdate(state2); + } + }); + function runModifierEffects() { + state.orderedModifiers.forEach(function(_ref3) { + var name = _ref3.name, _ref3$options = _ref3.options, options2 = _ref3$options === void 0 ? {} : _ref3$options, effect2 = _ref3.effect; + if (typeof effect2 === "function") { + var cleanupFn = effect2({ + state, + name, + instance, + options: options2 + }); + var noopFn = function noopFn2() { + }; + effectCleanupFns.push(cleanupFn || noopFn); + } + }); + } + function cleanupModifierEffects() { + effectCleanupFns.forEach(function(fn) { + return fn(); + }); + effectCleanupFns = []; + } + return instance; + }; + } + var passive = { + passive: true + }; + function effect$2(_ref) { + var state = _ref.state, instance = _ref.instance, options = _ref.options; + var _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? true : _options$resize; + var window2 = getWindow(state.elements.popper); + var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper); + if (scroll) { + scrollParents.forEach(function(scrollParent) { + scrollParent.addEventListener("scroll", instance.update, passive); + }); + } + if (resize) { + window2.addEventListener("resize", instance.update, passive); + } + return function() { + if (scroll) { + scrollParents.forEach(function(scrollParent) { + scrollParent.removeEventListener("scroll", instance.update, passive); + }); + } + if (resize) { + window2.removeEventListener("resize", instance.update, passive); + } + }; + } + var eventListeners = { + name: "eventListeners", + enabled: true, + phase: "write", + fn: function fn() { + }, + effect: effect$2, + data: {} + }; + function popperOffsets(_ref) { + var state = _ref.state, name = _ref.name; + state.modifiersData[name] = computeOffsets({ + reference: state.rects.reference, + element: state.rects.popper, + strategy: "absolute", + placement: state.placement + }); + } + var popperOffsets$1 = { + name: "popperOffsets", + enabled: true, + phase: "read", + fn: popperOffsets, + data: {} + }; + var unsetSides = { + top: "auto", + right: "auto", + bottom: "auto", + left: "auto" + }; + function roundOffsetsByDPR(_ref) { + var x = _ref.x, y = _ref.y; + var win = window; + var dpr = win.devicePixelRatio || 1; + return { + x: round(x * dpr) / dpr || 0, + y: round(y * dpr) / dpr || 0 + }; + } + function mapToStyles(_ref2) { + var _Object$assign2; + var popper2 = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed; + var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === "function" ? roundOffsets(offsets) : offsets, _ref3$x = _ref3.x, x = _ref3$x === void 0 ? 0 : _ref3$x, _ref3$y = _ref3.y, y = _ref3$y === void 0 ? 0 : _ref3$y; + var hasX = offsets.hasOwnProperty("x"); + var hasY = offsets.hasOwnProperty("y"); + var sideX = left; + var sideY = top; + var win = window; + if (adaptive) { + var offsetParent = getOffsetParent(popper2); + var heightProp = "clientHeight"; + var widthProp = "clientWidth"; + if (offsetParent === getWindow(popper2)) { + offsetParent = getDocumentElement(popper2); + if (getComputedStyle2(offsetParent).position !== "static" && position === "absolute") { + heightProp = "scrollHeight"; + widthProp = "scrollWidth"; + } + } + offsetParent = offsetParent; + if (placement === top || (placement === left || placement === right) && variation === end) { + sideY = bottom; + var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : ( + // $FlowFixMe[prop-missing] + offsetParent[heightProp] + ); + y -= offsetY - popperRect.height; + y *= gpuAcceleration ? 1 : -1; + } + if (placement === left || (placement === top || placement === bottom) && variation === end) { + sideX = right; + var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : ( + // $FlowFixMe[prop-missing] + offsetParent[widthProp] + ); + x -= offsetX - popperRect.width; + x *= gpuAcceleration ? 1 : -1; + } + } + var commonStyles = Object.assign({ + position + }, adaptive && unsetSides); + if (gpuAcceleration) { + var _Object$assign; + return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); + } + return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2)); + } + function computeStyles(_ref4) { + var state = _ref4.state, options = _ref4.options; + var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; + if (true) { + var transitionProperty = getComputedStyle2(state.elements.popper).transitionProperty || ""; + if (adaptive && ["transform", "top", "right", "bottom", "left"].some(function(property) { + return transitionProperty.indexOf(property) >= 0; + })) { + console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', "\n\n", 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", "\n\n", "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" ")); + } + } + var commonStyles = { + placement: getBasePlacement(state.placement), + variation: getVariation(state.placement), + popper: state.elements.popper, + popperRect: state.rects.popper, + gpuAcceleration, + isFixed: state.options.strategy === "fixed" + }; + if (state.modifiersData.popperOffsets != null) { + state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.popperOffsets, + position: state.options.strategy, + adaptive, + roundOffsets + }))); + } + if (state.modifiersData.arrow != null) { + state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.arrow, + position: "absolute", + adaptive: false, + roundOffsets + }))); + } + state.attributes.popper = Object.assign({}, state.attributes.popper, { + "data-popper-placement": state.placement + }); + } + var computeStyles$1 = { + name: "computeStyles", + enabled: true, + phase: "beforeWrite", + fn: computeStyles, + data: {} + }; + function applyStyles(_ref) { + var state = _ref.state; + Object.keys(state.elements).forEach(function(name) { + var style = state.styles[name] || {}; + var attributes = state.attributes[name] || {}; + var element = state.elements[name]; + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } + Object.assign(element.style, style); + Object.keys(attributes).forEach(function(name2) { + var value = attributes[name2]; + if (value === false) { + element.removeAttribute(name2); + } else { + element.setAttribute(name2, value === true ? "" : value); + } + }); + }); + } + function effect$1(_ref2) { + var state = _ref2.state; + var initialStyles = { + popper: { + position: state.options.strategy, + left: "0", + top: "0", + margin: "0" + }, + arrow: { + position: "absolute" + }, + reference: {} + }; + Object.assign(state.elements.popper.style, initialStyles.popper); + state.styles = initialStyles; + if (state.elements.arrow) { + Object.assign(state.elements.arrow.style, initialStyles.arrow); + } + return function() { + Object.keys(state.elements).forEach(function(name) { + var element = state.elements[name]; + var attributes = state.attributes[name] || {}; + var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); + var style = styleProperties.reduce(function(style2, property) { + style2[property] = ""; + return style2; + }, {}); + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } + Object.assign(element.style, style); + Object.keys(attributes).forEach(function(attribute) { + element.removeAttribute(attribute); + }); + }); + }; + } + var applyStyles$1 = { + name: "applyStyles", + enabled: true, + phase: "write", + fn: applyStyles, + effect: effect$1, + requires: ["computeStyles"] + }; + function distanceAndSkiddingToXY(placement, rects, offset2) { + var basePlacement = getBasePlacement(placement); + var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1; + var _ref = typeof offset2 === "function" ? offset2(Object.assign({}, rects, { + placement + })) : offset2, skidding = _ref[0], distance = _ref[1]; + skidding = skidding || 0; + distance = (distance || 0) * invertDistance; + return [left, right].indexOf(basePlacement) >= 0 ? { + x: distance, + y: skidding + } : { + x: skidding, + y: distance + }; + } + function offset(_ref2) { + var state = _ref2.state, options = _ref2.options, name = _ref2.name; + var _options$offset = options.offset, offset2 = _options$offset === void 0 ? [0, 0] : _options$offset; + var data = placements.reduce(function(acc, placement) { + acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset2); + return acc; + }, {}); + var _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y; + if (state.modifiersData.popperOffsets != null) { + state.modifiersData.popperOffsets.x += x; + state.modifiersData.popperOffsets.y += y; + } + state.modifiersData[name] = data; + } + var offset$1 = { + name: "offset", + enabled: true, + phase: "main", + requires: ["popperOffsets"], + fn: offset + }; + var hash$1 = { + left: "right", + right: "left", + bottom: "top", + top: "bottom" + }; + function getOppositePlacement(placement) { + return placement.replace(/left|right|bottom|top/g, function(matched) { + return hash$1[matched]; + }); + } + var hash = { + start: "end", + end: "start" + }; + function getOppositeVariationPlacement(placement) { + return placement.replace(/start|end/g, function(matched) { + return hash[matched]; + }); + } + function computeAutoPlacement(state, options) { + if (options === void 0) { + options = {}; + } + var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP; + var variation = getVariation(placement); + var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function(placement2) { + return getVariation(placement2) === variation; + }) : basePlacements; + var allowedPlacements = placements$1.filter(function(placement2) { + return allowedAutoPlacements.indexOf(placement2) >= 0; + }); + if (allowedPlacements.length === 0) { + allowedPlacements = placements$1; + if (true) { + console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" ")); + } + } + var overflows = allowedPlacements.reduce(function(acc, placement2) { + acc[placement2] = detectOverflow(state, { + placement: placement2, + boundary, + rootBoundary, + padding + })[getBasePlacement(placement2)]; + return acc; + }, {}); + return Object.keys(overflows).sort(function(a, b) { + return overflows[a] - overflows[b]; + }); + } + function getExpandedFallbackPlacements(placement) { + if (getBasePlacement(placement) === auto) { + return []; + } + var oppositePlacement = getOppositePlacement(placement); + return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; + } + function flip(_ref) { + var state = _ref.state, options = _ref.options, name = _ref.name; + if (state.modifiersData[name]._skip) { + return; + } + var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements; + var preferredPlacement = state.options.placement; + var basePlacement = getBasePlacement(preferredPlacement); + var isBasePlacement = basePlacement === preferredPlacement; + var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)); + var placements2 = [preferredPlacement].concat(fallbackPlacements).reduce(function(acc, placement2) { + return acc.concat(getBasePlacement(placement2) === auto ? computeAutoPlacement(state, { + placement: placement2, + boundary, + rootBoundary, + padding, + flipVariations, + allowedAutoPlacements + }) : placement2); + }, []); + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var checksMap = /* @__PURE__ */ new Map(); + var makeFallbackChecks = true; + var firstFittingPlacement = placements2[0]; + for (var i = 0; i < placements2.length; i++) { + var placement = placements2[i]; + var _basePlacement = getBasePlacement(placement); + var isStartVariation = getVariation(placement) === start; + var isVertical = [top, bottom].indexOf(_basePlacement) >= 0; + var len = isVertical ? "width" : "height"; + var overflow = detectOverflow(state, { + placement, + boundary, + rootBoundary, + altBoundary, + padding + }); + var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top; + if (referenceRect[len] > popperRect[len]) { + mainVariationSide = getOppositePlacement(mainVariationSide); + } + var altVariationSide = getOppositePlacement(mainVariationSide); + var checks = []; + if (checkMainAxis) { + checks.push(overflow[_basePlacement] <= 0); + } + if (checkAltAxis) { + checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0); + } + if (checks.every(function(check) { + return check; + })) { + firstFittingPlacement = placement; + makeFallbackChecks = false; + break; + } + checksMap.set(placement, checks); + } + if (makeFallbackChecks) { + var numberOfChecks = flipVariations ? 3 : 1; + var _loop = function _loop2(_i2) { + var fittingPlacement = placements2.find(function(placement2) { + var checks2 = checksMap.get(placement2); + if (checks2) { + return checks2.slice(0, _i2).every(function(check) { + return check; + }); + } + }); + if (fittingPlacement) { + firstFittingPlacement = fittingPlacement; + return "break"; + } + }; + for (var _i = numberOfChecks; _i > 0; _i--) { + var _ret = _loop(_i); + if (_ret === "break") break; + } + } + if (state.placement !== firstFittingPlacement) { + state.modifiersData[name]._skip = true; + state.placement = firstFittingPlacement; + state.reset = true; + } + } + var flip$1 = { + name: "flip", + enabled: true, + phase: "main", + fn: flip, + requiresIfExists: ["offset"], + data: { + _skip: false + } + }; + function getAltAxis(axis) { + return axis === "x" ? "y" : "x"; + } + function within(min$1, value, max$1) { + return max(min$1, min(value, max$1)); + } + function withinMaxClamp(min2, value, max2) { + var v = within(min2, value, max2); + return v > max2 ? max2 : v; + } + function preventOverflow(_ref) { + var state = _ref.state, options = _ref.options, name = _ref.name; + var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset; + var overflow = detectOverflow(state, { + boundary, + rootBoundary, + padding, + altBoundary + }); + var basePlacement = getBasePlacement(state.placement); + var variation = getVariation(state.placement); + var isBasePlacement = !variation; + var mainAxis = getMainAxisFromPlacement(basePlacement); + var altAxis = getAltAxis(mainAxis); + var popperOffsets2 = state.modifiersData.popperOffsets; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var tetherOffsetValue = typeof tetherOffset === "function" ? tetherOffset(Object.assign({}, state.rects, { + placement: state.placement + })) : tetherOffset; + var normalizedTetherOffsetValue = typeof tetherOffsetValue === "number" ? { + mainAxis: tetherOffsetValue, + altAxis: tetherOffsetValue + } : Object.assign({ + mainAxis: 0, + altAxis: 0 + }, tetherOffsetValue); + var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null; + var data = { + x: 0, + y: 0 + }; + if (!popperOffsets2) { + return; + } + if (checkMainAxis) { + var _offsetModifierState$; + var mainSide = mainAxis === "y" ? top : left; + var altSide = mainAxis === "y" ? bottom : right; + var len = mainAxis === "y" ? "height" : "width"; + var offset2 = popperOffsets2[mainAxis]; + var min$1 = offset2 + overflow[mainSide]; + var max$1 = offset2 - overflow[altSide]; + var additive = tether ? -popperRect[len] / 2 : 0; + var minLen = variation === start ? referenceRect[len] : popperRect[len]; + var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; + var arrowElement = state.elements.arrow; + var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { + width: 0, + height: 0 + }; + var arrowPaddingObject = state.modifiersData["arrow#persistent"] ? state.modifiersData["arrow#persistent"].padding : getFreshSideObject(); + var arrowPaddingMin = arrowPaddingObject[mainSide]; + var arrowPaddingMax = arrowPaddingObject[altSide]; + var arrowLen = within(0, referenceRect[len], arrowRect[len]); + var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis; + var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; + var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); + var clientOffset = arrowOffsetParent ? mainAxis === "y" ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; + var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0; + var tetherMin = offset2 + minOffset - offsetModifierValue - clientOffset; + var tetherMax = offset2 + maxOffset - offsetModifierValue; + var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset2, tether ? max(max$1, tetherMax) : max$1); + popperOffsets2[mainAxis] = preventedOffset; + data[mainAxis] = preventedOffset - offset2; + } + if (checkAltAxis) { + var _offsetModifierState$2; + var _mainSide = mainAxis === "x" ? top : left; + var _altSide = mainAxis === "x" ? bottom : right; + var _offset = popperOffsets2[altAxis]; + var _len = altAxis === "y" ? "height" : "width"; + var _min = _offset + overflow[_mainSide]; + var _max = _offset - overflow[_altSide]; + var isOriginSide = [top, left].indexOf(basePlacement) !== -1; + var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0; + var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis; + var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max; + var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max); + popperOffsets2[altAxis] = _preventedOffset; + data[altAxis] = _preventedOffset - _offset; + } + state.modifiersData[name] = data; + } + var preventOverflow$1 = { + name: "preventOverflow", + enabled: true, + phase: "main", + fn: preventOverflow, + requiresIfExists: ["offset"] + }; + var toPaddingObject = function toPaddingObject2(padding, state) { + padding = typeof padding === "function" ? padding(Object.assign({}, state.rects, { + placement: state.placement + })) : padding; + return mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements)); + }; + function arrow(_ref) { + var _state$modifiersData$; + var state = _ref.state, name = _ref.name, options = _ref.options; + var arrowElement = state.elements.arrow; + var popperOffsets2 = state.modifiersData.popperOffsets; + var basePlacement = getBasePlacement(state.placement); + var axis = getMainAxisFromPlacement(basePlacement); + var isVertical = [left, right].indexOf(basePlacement) >= 0; + var len = isVertical ? "height" : "width"; + if (!arrowElement || !popperOffsets2) { + return; + } + var paddingObject = toPaddingObject(options.padding, state); + var arrowRect = getLayoutRect(arrowElement); + var minProp = axis === "y" ? top : left; + var maxProp = axis === "y" ? bottom : right; + var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets2[axis] - state.rects.popper[len]; + var startDiff = popperOffsets2[axis] - state.rects.reference[axis]; + var arrowOffsetParent = getOffsetParent(arrowElement); + var clientSize = arrowOffsetParent ? axis === "y" ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0; + var centerToReference = endDiff / 2 - startDiff / 2; + var min2 = paddingObject[minProp]; + var max2 = clientSize - arrowRect[len] - paddingObject[maxProp]; + var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference; + var offset2 = within(min2, center, max2); + var axisProp = axis; + state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset2, _state$modifiersData$.centerOffset = offset2 - center, _state$modifiersData$); + } + function effect(_ref2) { + var state = _ref2.state, options = _ref2.options; + var _options$element = options.element, arrowElement = _options$element === void 0 ? "[data-popper-arrow]" : _options$element; + if (arrowElement == null) { + return; + } + if (typeof arrowElement === "string") { + arrowElement = state.elements.popper.querySelector(arrowElement); + if (!arrowElement) { + return; + } + } + if (true) { + if (!isHTMLElement(arrowElement)) { + console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', "To use an SVG arrow, wrap it in an HTMLElement that will be used as", "the arrow."].join(" ")); + } + } + if (!contains(state.elements.popper, arrowElement)) { + if (true) { + console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" ")); + } + return; + } + state.elements.arrow = arrowElement; + } + var arrow$1 = { + name: "arrow", + enabled: true, + phase: "main", + fn: arrow, + effect, + requires: ["popperOffsets"], + requiresIfExists: ["preventOverflow"] + }; + function getSideOffsets(overflow, rect, preventedOffsets) { + if (preventedOffsets === void 0) { + preventedOffsets = { + x: 0, + y: 0 + }; + } + return { + top: overflow.top - rect.height - preventedOffsets.y, + right: overflow.right - rect.width + preventedOffsets.x, + bottom: overflow.bottom - rect.height + preventedOffsets.y, + left: overflow.left - rect.width - preventedOffsets.x + }; + } + function isAnySideFullyClipped(overflow) { + return [top, right, bottom, left].some(function(side) { + return overflow[side] >= 0; + }); + } + function hide(_ref) { + var state = _ref.state, name = _ref.name; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var preventedOffsets = state.modifiersData.preventOverflow; + var referenceOverflow = detectOverflow(state, { + elementContext: "reference" + }); + var popperAltOverflow = detectOverflow(state, { + altBoundary: true + }); + var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect); + var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets); + var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets); + var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); + state.modifiersData[name] = { + referenceClippingOffsets, + popperEscapeOffsets, + isReferenceHidden, + hasPopperEscaped + }; + state.attributes.popper = Object.assign({}, state.attributes.popper, { + "data-popper-reference-hidden": isReferenceHidden, + "data-popper-escaped": hasPopperEscaped + }); + } + var hide$1 = { + name: "hide", + enabled: true, + phase: "main", + requiresIfExists: ["preventOverflow"], + fn: hide + }; + var defaultModifiers$1 = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1]; + var createPopper$1 = /* @__PURE__ */ popperGenerator({ + defaultModifiers: defaultModifiers$1 + }); + var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1]; + var createPopper2 = /* @__PURE__ */ popperGenerator({ + defaultModifiers + }); + exports.applyStyles = applyStyles$1; + exports.arrow = arrow$1; + exports.computeStyles = computeStyles$1; + exports.createPopper = createPopper2; + exports.createPopperLite = createPopper$1; + exports.defaultModifiers = defaultModifiers; + exports.detectOverflow = detectOverflow; + exports.eventListeners = eventListeners; + exports.flip = flip$1; + exports.hide = hide$1; + exports.offset = offset$1; + exports.popperGenerator = popperGenerator; + exports.popperOffsets = popperOffsets$1; + exports.preventOverflow = preventOverflow$1; + } + }); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/data.js + var elementMap = /* @__PURE__ */ new Map(); + var data_default = { + set(element, key, instance) { + if (!elementMap.has(element)) { + elementMap.set(element, /* @__PURE__ */ new Map()); + } + const instanceMap = elementMap.get(element); + if (!instanceMap.has(key) && instanceMap.size !== 0) { + console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`); + return; + } + instanceMap.set(key, instance); + }, + get(element, key) { + if (elementMap.has(element)) { + return elementMap.get(element).get(key) || null; + } + return null; + }, + remove(element, key) { + if (!elementMap.has(element)) { + return; + } + const instanceMap = elementMap.get(element); + instanceMap.delete(key); + if (instanceMap.size === 0) { + elementMap.delete(element); + } + } + }; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/index.js + var MAX_UID = 1e6; + var MILLISECONDS_MULTIPLIER = 1e3; + var TRANSITION_END = "transitionend"; + var parseSelector = (selector) => { + if (selector && window.CSS && window.CSS.escape) { + selector = selector.replace(/#([^\s"#']+)/g, (match, id) => `#${CSS.escape(id)}`); + } + return selector; + }; + var toType = (object) => { + if (object === null || object === void 0) { + return `${object}`; + } + return Object.prototype.toString.call(object).match(/\s([a-z]+)/i)[1].toLowerCase(); + }; + var getUID = (prefix) => { + do { + prefix += Math.floor(Math.random() * MAX_UID); + } while (document.getElementById(prefix)); + return prefix; + }; + var getTransitionDurationFromElement = (element) => { + if (!element) { + return 0; + } + let { transitionDuration, transitionDelay } = window.getComputedStyle(element); + const floatTransitionDuration = Number.parseFloat(transitionDuration); + const floatTransitionDelay = Number.parseFloat(transitionDelay); + if (!floatTransitionDuration && !floatTransitionDelay) { + return 0; + } + transitionDuration = transitionDuration.split(",")[0]; + transitionDelay = transitionDelay.split(",")[0]; + return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; + }; + var triggerTransitionEnd = (element) => { + element.dispatchEvent(new Event(TRANSITION_END)); + }; + var isElement = (object) => { + if (!object || typeof object !== "object") { + return false; + } + if (typeof object.jquery !== "undefined") { + object = object[0]; + } + return typeof object.nodeType !== "undefined"; + }; + var getElement = (object) => { + if (isElement(object)) { + return object.jquery ? object[0] : object; + } + if (typeof object === "string" && object.length > 0) { + return document.querySelector(parseSelector(object)); + } + return null; + }; + var isVisible = (element) => { + if (!isElement(element) || element.getClientRects().length === 0) { + return false; + } + const elementIsVisible = getComputedStyle(element).getPropertyValue("visibility") === "visible"; + const closedDetails = element.closest("details:not([open])"); + if (!closedDetails) { + return elementIsVisible; + } + if (closedDetails !== element) { + const summary = element.closest("summary"); + if (summary && summary.parentNode !== closedDetails) { + return false; + } + if (summary === null) { + return false; + } + } + return elementIsVisible; + }; + var isDisabled = (element) => { + if (!element || element.nodeType !== Node.ELEMENT_NODE) { + return true; + } + if (element.classList.contains("disabled")) { + return true; + } + if (typeof element.disabled !== "undefined") { + return element.disabled; + } + return element.hasAttribute("disabled") && element.getAttribute("disabled") !== "false"; + }; + var findShadowRoot = (element) => { + if (!document.documentElement.attachShadow) { + return null; + } + if (typeof element.getRootNode === "function") { + const root = element.getRootNode(); + return root instanceof ShadowRoot ? root : null; + } + if (element instanceof ShadowRoot) { + return element; + } + if (!element.parentNode) { + return null; + } + return findShadowRoot(element.parentNode); + }; + var noop = () => { + }; + var reflow = (element) => { + element.offsetHeight; + }; + var getjQuery = () => { + if (window.jQuery && !document.body.hasAttribute("data-bs-no-jquery")) { + return window.jQuery; + } + return null; + }; + var DOMContentLoadedCallbacks = []; + var onDOMContentLoaded = (callback) => { + if (document.readyState === "loading") { + if (!DOMContentLoadedCallbacks.length) { + document.addEventListener("DOMContentLoaded", () => { + for (const callback2 of DOMContentLoadedCallbacks) { + callback2(); + } + }); + } + DOMContentLoadedCallbacks.push(callback); + } else { + callback(); + } + }; + var isRTL = () => document.documentElement.dir === "rtl"; + var defineJQueryPlugin = (plugin) => { + onDOMContentLoaded(() => { + const $ = getjQuery(); + if ($) { + const name = plugin.NAME; + const JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; + $.fn[name].noConflict = () => { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; + } + }); + }; + var execute = (possibleCallback, args = [], defaultValue = possibleCallback) => { + return typeof possibleCallback === "function" ? possibleCallback.call(...args) : defaultValue; + }; + var executeAfterTransition = (callback, transitionElement, waitForTransition = true) => { + if (!waitForTransition) { + execute(callback); + return; + } + const durationPadding = 5; + const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding; + let called = false; + const handler = ({ target }) => { + if (target !== transitionElement) { + return; + } + called = true; + transitionElement.removeEventListener(TRANSITION_END, handler); + execute(callback); + }; + transitionElement.addEventListener(TRANSITION_END, handler); + setTimeout(() => { + if (!called) { + triggerTransitionEnd(transitionElement); + } + }, emulatedDuration); + }; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/event-handler.js + var namespaceRegex = /[^.]*(?=\..*)\.|.*/; + var stripNameRegex = /\..*/; + var stripUidRegex = /::\d+$/; + var eventRegistry = {}; + var uidEvent = 1; + var customEvents = { + mouseenter: "mouseover", + mouseleave: "mouseout" + }; + var nativeEvents = /* @__PURE__ */ new Set([ + "click", + "dblclick", + "mouseup", + "mousedown", + "contextmenu", + "mousewheel", + "DOMMouseScroll", + "mouseover", + "mouseout", + "mousemove", + "selectstart", + "selectend", + "keydown", + "keypress", + "keyup", + "orientationchange", + "touchstart", + "touchmove", + "touchend", + "touchcancel", + "pointerdown", + "pointermove", + "pointerup", + "pointerleave", + "pointercancel", + "gesturestart", + "gesturechange", + "gestureend", + "focus", + "blur", + "change", + "reset", + "select", + "submit", + "focusin", + "focusout", + "load", + "unload", + "beforeunload", + "resize", + "move", + "DOMContentLoaded", + "readystatechange", + "error", + "abort", + "scroll" + ]); + function makeEventUid(element, uid) { + return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++; + } + function getElementEvents(element) { + const uid = makeEventUid(element); + element.uidEvent = uid; + eventRegistry[uid] = eventRegistry[uid] || {}; + return eventRegistry[uid]; + } + function bootstrapHandler(element, fn) { + return function handler(event) { + hydrateObj(event, { delegateTarget: element }); + if (handler.oneOff) { + EventHandler.off(element, event.type, fn); + } + return fn.apply(element, [event]); + }; + } + function bootstrapDelegationHandler(element, selector, fn) { + return function handler(event) { + const domElements = element.querySelectorAll(selector); + for (let { target } = event; target && target !== this; target = target.parentNode) { + for (const domElement of domElements) { + if (domElement !== target) { + continue; + } + hydrateObj(event, { delegateTarget: target }); + if (handler.oneOff) { + EventHandler.off(element, event.type, selector, fn); + } + return fn.apply(target, [event]); + } + } + }; + } + function findHandler(events, callable, delegationSelector = null) { + return Object.values(events).find((event) => event.callable === callable && event.delegationSelector === delegationSelector); + } + function normalizeParameters(originalTypeEvent, handler, delegationFunction) { + const isDelegated = typeof handler === "string"; + const callable = isDelegated ? delegationFunction : handler || delegationFunction; + let typeEvent = getTypeEvent(originalTypeEvent); + if (!nativeEvents.has(typeEvent)) { + typeEvent = originalTypeEvent; + } + return [isDelegated, callable, typeEvent]; + } + function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) { + if (typeof originalTypeEvent !== "string" || !element) { + return; + } + let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); + if (originalTypeEvent in customEvents) { + const wrapFunction = (fn2) => { + return function(event) { + if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) { + return fn2.call(this, event); + } + }; + }; + callable = wrapFunction(callable); + } + const events = getElementEvents(element); + const handlers = events[typeEvent] || (events[typeEvent] = {}); + const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null); + if (previousFunction) { + previousFunction.oneOff = previousFunction.oneOff && oneOff; + return; + } + const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, "")); + const fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable); + fn.delegationSelector = isDelegated ? handler : null; + fn.callable = callable; + fn.oneOff = oneOff; + fn.uidEvent = uid; + handlers[uid] = fn; + element.addEventListener(typeEvent, fn, isDelegated); + } + function removeHandler(element, events, typeEvent, handler, delegationSelector) { + const fn = findHandler(events[typeEvent], handler, delegationSelector); + if (!fn) { + return; + } + element.removeEventListener(typeEvent, fn, Boolean(delegationSelector)); + delete events[typeEvent][fn.uidEvent]; + } + function removeNamespacedHandlers(element, events, typeEvent, namespace) { + const storeElementEvent = events[typeEvent] || {}; + for (const [handlerKey, event] of Object.entries(storeElementEvent)) { + if (handlerKey.includes(namespace)) { + removeHandler(element, events, typeEvent, event.callable, event.delegationSelector); + } + } + } + function getTypeEvent(event) { + event = event.replace(stripNameRegex, ""); + return customEvents[event] || event; + } + var EventHandler = { + on(element, event, handler, delegationFunction) { + addHandler(element, event, handler, delegationFunction, false); + }, + one(element, event, handler, delegationFunction) { + addHandler(element, event, handler, delegationFunction, true); + }, + off(element, originalTypeEvent, handler, delegationFunction) { + if (typeof originalTypeEvent !== "string" || !element) { + return; + } + const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); + const inNamespace = typeEvent !== originalTypeEvent; + const events = getElementEvents(element); + const storeElementEvent = events[typeEvent] || {}; + const isNamespace = originalTypeEvent.startsWith("."); + if (typeof callable !== "undefined") { + if (!Object.keys(storeElementEvent).length) { + return; + } + removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null); + return; + } + if (isNamespace) { + for (const elementEvent of Object.keys(events)) { + removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1)); + } + } + for (const [keyHandlers, event] of Object.entries(storeElementEvent)) { + const handlerKey = keyHandlers.replace(stripUidRegex, ""); + if (!inNamespace || originalTypeEvent.includes(handlerKey)) { + removeHandler(element, events, typeEvent, event.callable, event.delegationSelector); + } + } + }, + trigger(element, event, args) { + if (typeof event !== "string" || !element) { + return null; + } + const $ = getjQuery(); + const typeEvent = getTypeEvent(event); + const inNamespace = event !== typeEvent; + let jQueryEvent = null; + let bubbles = true; + let nativeDispatch = true; + let defaultPrevented = false; + if (inNamespace && $) { + jQueryEvent = $.Event(event, args); + $(element).trigger(jQueryEvent); + bubbles = !jQueryEvent.isPropagationStopped(); + nativeDispatch = !jQueryEvent.isImmediatePropagationStopped(); + defaultPrevented = jQueryEvent.isDefaultPrevented(); + } + const evt = hydrateObj(new Event(event, { bubbles, cancelable: true }), args); + if (defaultPrevented) { + evt.preventDefault(); + } + if (nativeDispatch) { + element.dispatchEvent(evt); + } + if (evt.defaultPrevented && jQueryEvent) { + jQueryEvent.preventDefault(); + } + return evt; + } + }; + function hydrateObj(obj, meta = {}) { + for (const [key, value] of Object.entries(meta)) { + try { + obj[key] = value; + } catch (e) { + Object.defineProperty(obj, key, { + configurable: true, + get() { + return value; + } + }); + } + } + return obj; + } + var event_handler_default = EventHandler; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/manipulator.js + function normalizeData(value) { + if (value === "true") { + return true; + } + if (value === "false") { + return false; + } + if (value === Number(value).toString()) { + return Number(value); + } + if (value === "" || value === "null") { + return null; + } + if (typeof value !== "string") { + return value; + } + try { + return JSON.parse(decodeURIComponent(value)); + } catch (e) { + return value; + } + } + function normalizeDataKey(key) { + return key.replace(/[A-Z]/g, (chr) => `-${chr.toLowerCase()}`); + } + var Manipulator = { + setDataAttribute(element, key, value) { + element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value); + }, + removeDataAttribute(element, key) { + element.removeAttribute(`data-bs-${normalizeDataKey(key)}`); + }, + getDataAttributes(element) { + if (!element) { + return {}; + } + const attributes = {}; + const bsKeys = Object.keys(element.dataset).filter((key) => key.startsWith("bs") && !key.startsWith("bsConfig")); + for (const key of bsKeys) { + let pureKey = key.replace(/^bs/, ""); + pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1); + attributes[pureKey] = normalizeData(element.dataset[key]); + } + return attributes; + }, + getDataAttribute(element, key) { + return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`)); + } + }; + var manipulator_default = Manipulator; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/config.js + var Config = class { + // Getters + static get Default() { + return {}; + } + static get DefaultType() { + return {}; + } + static get NAME() { + throw new Error('You have to implement the static method "NAME", for each component!'); + } + _getConfig(config) { + config = this._mergeConfigObj(config); + config = this._configAfterMerge(config); + this._typeCheckConfig(config); + return config; + } + _configAfterMerge(config) { + return config; + } + _mergeConfigObj(config, element) { + const jsonConfig = isElement(element) ? manipulator_default.getDataAttribute(element, "config") : {}; + return __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, this.constructor.Default), typeof jsonConfig === "object" ? jsonConfig : {}), isElement(element) ? manipulator_default.getDataAttributes(element) : {}), typeof config === "object" ? config : {}); + } + _typeCheckConfig(config, configTypes = this.constructor.DefaultType) { + for (const [property, expectedTypes] of Object.entries(configTypes)) { + const value = config[property]; + const valueType = isElement(value) ? "element" : toType(value); + if (!new RegExp(expectedTypes).test(valueType)) { + throw new TypeError( + `${this.constructor.NAME.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".` + ); + } + } + } + }; + var config_default = Config; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/base-component.js + var VERSION = "5.3.8"; + var BaseComponent = class extends config_default { + constructor(element, config) { + super(); + element = getElement(element); + if (!element) { + return; + } + this._element = element; + this._config = this._getConfig(config); + data_default.set(this._element, this.constructor.DATA_KEY, this); + } + // Public + dispose() { + data_default.remove(this._element, this.constructor.DATA_KEY); + event_handler_default.off(this._element, this.constructor.EVENT_KEY); + for (const propertyName of Object.getOwnPropertyNames(this)) { + this[propertyName] = null; + } + } + // Private + _queueCallback(callback, element, isAnimated = true) { + executeAfterTransition(callback, element, isAnimated); + } + _getConfig(config) { + config = this._mergeConfigObj(config, this._element); + config = this._configAfterMerge(config); + this._typeCheckConfig(config); + return config; + } + // Static + static getInstance(element) { + return data_default.get(getElement(element), this.DATA_KEY); + } + static getOrCreateInstance(element, config = {}) { + return this.getInstance(element) || new this(element, typeof config === "object" ? config : null); + } + static get VERSION() { + return VERSION; + } + static get DATA_KEY() { + return `bs.${this.NAME}`; + } + static get EVENT_KEY() { + return `.${this.DATA_KEY}`; + } + static eventName(name) { + return `${name}${this.EVENT_KEY}`; + } + }; + var base_component_default = BaseComponent; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/selector-engine.js + var getSelector = (element) => { + let selector = element.getAttribute("data-bs-target"); + if (!selector || selector === "#") { + let hrefAttribute = element.getAttribute("href"); + if (!hrefAttribute || !hrefAttribute.includes("#") && !hrefAttribute.startsWith(".")) { + return null; + } + if (hrefAttribute.includes("#") && !hrefAttribute.startsWith("#")) { + hrefAttribute = `#${hrefAttribute.split("#")[1]}`; + } + selector = hrefAttribute && hrefAttribute !== "#" ? hrefAttribute.trim() : null; + } + return selector ? selector.split(",").map((sel) => parseSelector(sel)).join(",") : null; + }; + var SelectorEngine = { + find(selector, element = document.documentElement) { + return [].concat(...Element.prototype.querySelectorAll.call(element, selector)); + }, + findOne(selector, element = document.documentElement) { + return Element.prototype.querySelector.call(element, selector); + }, + children(element, selector) { + return [].concat(...element.children).filter((child) => child.matches(selector)); + }, + parents(element, selector) { + const parents = []; + let ancestor = element.parentNode.closest(selector); + while (ancestor) { + parents.push(ancestor); + ancestor = ancestor.parentNode.closest(selector); + } + return parents; + }, + prev(element, selector) { + let previous = element.previousElementSibling; + while (previous) { + if (previous.matches(selector)) { + return [previous]; + } + previous = previous.previousElementSibling; + } + return []; + }, + // TODO: this is now unused; remove later along with prev() + next(element, selector) { + let next = element.nextElementSibling; + while (next) { + if (next.matches(selector)) { + return [next]; + } + next = next.nextElementSibling; + } + return []; + }, + focusableChildren(element) { + const focusables = [ + "a", + "button", + "input", + "textarea", + "select", + "details", + "[tabindex]", + '[contenteditable="true"]' + ].map((selector) => `${selector}:not([tabindex^="-"])`).join(","); + return this.find(focusables, element).filter((el) => !isDisabled(el) && isVisible(el)); + }, + getSelectorFromElement(element) { + const selector = getSelector(element); + if (selector) { + return SelectorEngine.findOne(selector) ? selector : null; + } + return null; + }, + getElementFromSelector(element) { + const selector = getSelector(element); + return selector ? SelectorEngine.findOne(selector) : null; + }, + getMultipleElementsFromSelector(element) { + const selector = getSelector(element); + return selector ? SelectorEngine.find(selector) : []; + } + }; + var selector_engine_default = SelectorEngine; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/collapse.js + var NAME = "collapse"; + var DATA_KEY = "bs.collapse"; + var EVENT_KEY = `.${DATA_KEY}`; + var DATA_API_KEY = ".data-api"; + var EVENT_SHOW = `show${EVENT_KEY}`; + var EVENT_SHOWN = `shown${EVENT_KEY}`; + var EVENT_HIDE = `hide${EVENT_KEY}`; + var EVENT_HIDDEN = `hidden${EVENT_KEY}`; + var EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`; + var CLASS_NAME_SHOW = "show"; + var CLASS_NAME_COLLAPSE = "collapse"; + var CLASS_NAME_COLLAPSING = "collapsing"; + var CLASS_NAME_COLLAPSED = "collapsed"; + var CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`; + var CLASS_NAME_HORIZONTAL = "collapse-horizontal"; + var WIDTH = "width"; + var HEIGHT = "height"; + var SELECTOR_ACTIVES = ".collapse.show, .collapse.collapsing"; + var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]'; + var Default = { + parent: null, + toggle: true + }; + var DefaultType = { + parent: "(null|element)", + toggle: "boolean" + }; + var Collapse = class _Collapse extends base_component_default { + constructor(element, config) { + super(element, config); + this._isTransitioning = false; + this._triggerArray = []; + const toggleList = selector_engine_default.find(SELECTOR_DATA_TOGGLE); + for (const elem of toggleList) { + const selector = selector_engine_default.getSelectorFromElement(elem); + const filterElement = selector_engine_default.find(selector).filter((foundElement) => foundElement === this._element); + if (selector !== null && filterElement.length) { + this._triggerArray.push(elem); + } + } + this._initializeChildren(); + if (!this._config.parent) { + this._addAriaAndCollapsedClass(this._triggerArray, this._isShown()); + } + if (this._config.toggle) { + this.toggle(); + } + } + // Getters + static get Default() { + return Default; + } + static get DefaultType() { + return DefaultType; + } + static get NAME() { + return NAME; + } + // Public + toggle() { + if (this._isShown()) { + this.hide(); + } else { + this.show(); + } + } + show() { + if (this._isTransitioning || this._isShown()) { + return; + } + let activeChildren = []; + if (this._config.parent) { + activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter((element) => element !== this._element).map((element) => _Collapse.getOrCreateInstance(element, { toggle: false })); + } + if (activeChildren.length && activeChildren[0]._isTransitioning) { + return; + } + const startEvent = event_handler_default.trigger(this._element, EVENT_SHOW); + if (startEvent.defaultPrevented) { + return; + } + for (const activeInstance of activeChildren) { + activeInstance.hide(); + } + const dimension = this._getDimension(); + this._element.classList.remove(CLASS_NAME_COLLAPSE); + this._element.classList.add(CLASS_NAME_COLLAPSING); + this._element.style[dimension] = 0; + this._addAriaAndCollapsedClass(this._triggerArray, true); + this._isTransitioning = true; + const complete = () => { + this._isTransitioning = false; + this._element.classList.remove(CLASS_NAME_COLLAPSING); + this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW); + this._element.style[dimension] = ""; + event_handler_default.trigger(this._element, EVENT_SHOWN); + }; + const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); + const scrollSize = `scroll${capitalizedDimension}`; + this._queueCallback(complete, this._element, true); + this._element.style[dimension] = `${this._element[scrollSize]}px`; + } + hide() { + if (this._isTransitioning || !this._isShown()) { + return; + } + const startEvent = event_handler_default.trigger(this._element, EVENT_HIDE); + if (startEvent.defaultPrevented) { + return; + } + const dimension = this._getDimension(); + this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`; + reflow(this._element); + this._element.classList.add(CLASS_NAME_COLLAPSING); + this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW); + for (const trigger of this._triggerArray) { + const element = selector_engine_default.getElementFromSelector(trigger); + if (element && !this._isShown(element)) { + this._addAriaAndCollapsedClass([trigger], false); + } + } + this._isTransitioning = true; + const complete = () => { + this._isTransitioning = false; + this._element.classList.remove(CLASS_NAME_COLLAPSING); + this._element.classList.add(CLASS_NAME_COLLAPSE); + event_handler_default.trigger(this._element, EVENT_HIDDEN); + }; + this._element.style[dimension] = ""; + this._queueCallback(complete, this._element, true); + } + // Private + _isShown(element = this._element) { + return element.classList.contains(CLASS_NAME_SHOW); + } + _configAfterMerge(config) { + config.toggle = Boolean(config.toggle); + config.parent = getElement(config.parent); + return config; + } + _getDimension() { + return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT; + } + _initializeChildren() { + if (!this._config.parent) { + return; + } + const children2 = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE); + for (const element of children2) { + const selected = selector_engine_default.getElementFromSelector(element); + if (selected) { + this._addAriaAndCollapsedClass([element], this._isShown(selected)); + } + } + } + _getFirstLevelChildren(selector) { + const children2 = selector_engine_default.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent); + return selector_engine_default.find(selector, this._config.parent).filter((element) => !children2.includes(element)); + } + _addAriaAndCollapsedClass(triggerArray, isOpen) { + if (!triggerArray.length) { + return; + } + for (const element of triggerArray) { + element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen); + element.setAttribute("aria-expanded", isOpen); + } + } + // Static + static jQueryInterface(config) { + const _config = {}; + if (typeof config === "string" && /show|hide/.test(config)) { + _config.toggle = false; + } + return this.each(function() { + const data = _Collapse.getOrCreateInstance(this, _config); + if (typeof config === "string") { + if (typeof data[config] === "undefined") { + throw new TypeError(`No method named "${config}"`); + } + data[config](); + } + }); + } + }; + event_handler_default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function(event) { + if (event.target.tagName === "A" || event.delegateTarget && event.delegateTarget.tagName === "A") { + event.preventDefault(); + } + for (const element of selector_engine_default.getMultipleElementsFromSelector(this)) { + Collapse.getOrCreateInstance(element, { toggle: false }).toggle(); + } + }); + defineJQueryPlugin(Collapse); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/category-collapse.js + var children = document.getElementsByClassName("collapse"); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/tooltip.js + var Popper = __toESM(require_popper()); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/sanitizer.js + var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i; + var DefaultAllowlist = { + // Global attributes allowed on any supplied element below. + "*": ["class", "dir", "id", "lang", "role", ARIA_ATTRIBUTE_PATTERN], + a: ["target", "href", "title", "rel"], + area: [], + b: [], + br: [], + col: [], + code: [], + dd: [], + div: [], + dl: [], + dt: [], + em: [], + hr: [], + h1: [], + h2: [], + h3: [], + h4: [], + h5: [], + h6: [], + i: [], + img: ["src", "srcset", "alt", "title", "width", "height"], + li: [], + ol: [], + p: [], + pre: [], + s: [], + small: [], + span: [], + sub: [], + sup: [], + strong: [], + u: [], + ul: [] + }; + var uriAttributes = /* @__PURE__ */ new Set([ + "background", + "cite", + "href", + "itemtype", + "longdesc", + "poster", + "src", + "xlink:href" + ]); + var SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i; + var allowedAttribute = (attribute, allowedAttributeList) => { + const attributeName = attribute.nodeName.toLowerCase(); + if (allowedAttributeList.includes(attributeName)) { + if (uriAttributes.has(attributeName)) { + return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue)); + } + return true; + } + return allowedAttributeList.filter((attributeRegex) => attributeRegex instanceof RegExp).some((regex) => regex.test(attributeName)); + }; + function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) { + if (!unsafeHtml.length) { + return unsafeHtml; + } + if (sanitizeFunction && typeof sanitizeFunction === "function") { + return sanitizeFunction(unsafeHtml); + } + const domParser = new window.DOMParser(); + const createdDocument = domParser.parseFromString(unsafeHtml, "text/html"); + const elements = [].concat(...createdDocument.body.querySelectorAll("*")); + for (const element of elements) { + const elementName = element.nodeName.toLowerCase(); + if (!Object.keys(allowList).includes(elementName)) { + element.remove(); + continue; + } + const attributeList = [].concat(...element.attributes); + const allowedAttributes = [].concat(allowList["*"] || [], allowList[elementName] || []); + for (const attribute of attributeList) { + if (!allowedAttribute(attribute, allowedAttributes)) { + element.removeAttribute(attribute.nodeName); + } + } + } + return createdDocument.body.innerHTML; + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/template-factory.js + var NAME2 = "TemplateFactory"; + var Default2 = { + allowList: DefaultAllowlist, + content: {}, + // { selector : text , selector2 : text2 , } + extraClass: "", + html: false, + sanitize: true, + sanitizeFn: null, + template: "
" + }; + var DefaultType2 = { + allowList: "object", + content: "object", + extraClass: "(string|function)", + html: "boolean", + sanitize: "boolean", + sanitizeFn: "(null|function)", + template: "string" + }; + var DefaultContentType = { + entry: "(string|element|function|null)", + selector: "(string|element)" + }; + var TemplateFactory = class extends config_default { + constructor(config) { + super(); + this._config = this._getConfig(config); + } + // Getters + static get Default() { + return Default2; + } + static get DefaultType() { + return DefaultType2; + } + static get NAME() { + return NAME2; + } + // Public + getContent() { + return Object.values(this._config.content).map((config) => this._resolvePossibleFunction(config)).filter(Boolean); + } + hasContent() { + return this.getContent().length > 0; + } + changeContent(content2) { + this._checkContent(content2); + this._config.content = __spreadValues(__spreadValues({}, this._config.content), content2); + return this; + } + toHtml() { + const templateWrapper = document.createElement("div"); + templateWrapper.innerHTML = this._maybeSanitize(this._config.template); + for (const [selector, text] of Object.entries(this._config.content)) { + this._setContent(templateWrapper, text, selector); + } + const template = templateWrapper.children[0]; + const extraClass = this._resolvePossibleFunction(this._config.extraClass); + if (extraClass) { + template.classList.add(...extraClass.split(" ")); + } + return template; + } + // Private + _typeCheckConfig(config) { + super._typeCheckConfig(config); + this._checkContent(config.content); + } + _checkContent(arg) { + for (const [selector, content2] of Object.entries(arg)) { + super._typeCheckConfig({ selector, entry: content2 }, DefaultContentType); + } + } + _setContent(template, content2, selector) { + const templateElement = selector_engine_default.findOne(selector, template); + if (!templateElement) { + return; + } + content2 = this._resolvePossibleFunction(content2); + if (!content2) { + templateElement.remove(); + return; + } + if (isElement(content2)) { + this._putElementInTemplate(getElement(content2), templateElement); + return; + } + if (this._config.html) { + templateElement.innerHTML = this._maybeSanitize(content2); + return; + } + templateElement.textContent = content2; + } + _maybeSanitize(arg) { + return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg; + } + _resolvePossibleFunction(arg) { + return execute(arg, [void 0, this]); + } + _putElementInTemplate(element, templateElement) { + if (this._config.html) { + templateElement.innerHTML = ""; + templateElement.append(element); + return; + } + templateElement.textContent = element.textContent; + } + }; + var template_factory_default = TemplateFactory; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/tooltip.js + var NAME3 = "tooltip"; + var DISALLOWED_ATTRIBUTES = /* @__PURE__ */ new Set(["sanitize", "allowList", "sanitizeFn"]); + var CLASS_NAME_FADE = "fade"; + var CLASS_NAME_MODAL = "modal"; + var CLASS_NAME_SHOW2 = "show"; + var SELECTOR_TOOLTIP_INNER = ".tooltip-inner"; + var SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`; + var EVENT_MODAL_HIDE = "hide.bs.modal"; + var TRIGGER_HOVER = "hover"; + var TRIGGER_FOCUS = "focus"; + var TRIGGER_CLICK = "click"; + var TRIGGER_MANUAL = "manual"; + var EVENT_HIDE2 = "hide"; + var EVENT_HIDDEN2 = "hidden"; + var EVENT_SHOW2 = "show"; + var EVENT_SHOWN2 = "shown"; + var EVENT_INSERTED = "inserted"; + var EVENT_CLICK = "click"; + var EVENT_FOCUSIN = "focusin"; + var EVENT_FOCUSOUT = "focusout"; + var EVENT_MOUSEENTER = "mouseenter"; + var EVENT_MOUSELEAVE = "mouseleave"; + var AttachmentMap = { + AUTO: "auto", + TOP: "top", + RIGHT: isRTL() ? "left" : "right", + BOTTOM: "bottom", + LEFT: isRTL() ? "right" : "left" + }; + var Default3 = { + allowList: DefaultAllowlist, + animation: true, + boundary: "clippingParents", + container: false, + customClass: "", + delay: 0, + fallbackPlacements: ["top", "right", "bottom", "left"], + html: false, + offset: [0, 6], + placement: "top", + popperConfig: null, + sanitize: true, + sanitizeFn: null, + selector: false, + template: '', + title: "", + trigger: "hover focus" + }; + var DefaultType3 = { + allowList: "object", + animation: "boolean", + boundary: "(string|element)", + container: "(string|element|boolean)", + customClass: "(string|function)", + delay: "(number|object)", + fallbackPlacements: "array", + html: "boolean", + offset: "(array|string|function)", + placement: "(string|function)", + popperConfig: "(null|object|function)", + sanitize: "boolean", + sanitizeFn: "(null|function)", + selector: "(string|boolean)", + template: "string", + title: "(string|element|function)", + trigger: "string" + }; + var Tooltip = class _Tooltip extends base_component_default { + constructor(element, config) { + if (typeof Popper === "undefined") { + throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)"); + } + super(element, config); + this._isEnabled = true; + this._timeout = 0; + this._isHovered = null; + this._activeTrigger = {}; + this._popper = null; + this._templateFactory = null; + this._newContent = null; + this.tip = null; + this._setListeners(); + if (!this._config.selector) { + this._fixTitle(); + } + } + // Getters + static get Default() { + return Default3; + } + static get DefaultType() { + return DefaultType3; + } + static get NAME() { + return NAME3; + } + // Public + enable() { + this._isEnabled = true; + } + disable() { + this._isEnabled = false; + } + toggleEnabled() { + this._isEnabled = !this._isEnabled; + } + toggle() { + if (!this._isEnabled) { + return; + } + if (this._isShown()) { + this._leave(); + return; + } + this._enter(); + } + dispose() { + clearTimeout(this._timeout); + event_handler_default.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler); + if (this._element.getAttribute("data-bs-original-title")) { + this._element.setAttribute("title", this._element.getAttribute("data-bs-original-title")); + } + this._disposePopper(); + super.dispose(); + } + show() { + if (this._element.style.display === "none") { + throw new Error("Please use show on visible elements"); + } + if (!(this._isWithContent() && this._isEnabled)) { + return; + } + const showEvent = event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_SHOW2)); + const shadowRoot = findShadowRoot(this._element); + const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element); + if (showEvent.defaultPrevented || !isInTheDom) { + return; + } + this._disposePopper(); + const tip = this._getTipElement(); + this._element.setAttribute("aria-describedby", tip.getAttribute("id")); + const { container } = this._config; + if (!this._element.ownerDocument.documentElement.contains(this.tip)) { + container.append(tip); + event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_INSERTED)); + } + this._popper = this._createPopper(tip); + tip.classList.add(CLASS_NAME_SHOW2); + if ("ontouchstart" in document.documentElement) { + for (const element of [].concat(...document.body.children)) { + event_handler_default.on(element, "mouseover", noop); + } + } + const complete = () => { + event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_SHOWN2)); + if (this._isHovered === false) { + this._leave(); + } + this._isHovered = false; + }; + this._queueCallback(complete, this.tip, this._isAnimated()); + } + hide() { + if (!this._isShown()) { + return; + } + const hideEvent = event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_HIDE2)); + if (hideEvent.defaultPrevented) { + return; + } + const tip = this._getTipElement(); + tip.classList.remove(CLASS_NAME_SHOW2); + if ("ontouchstart" in document.documentElement) { + for (const element of [].concat(...document.body.children)) { + event_handler_default.off(element, "mouseover", noop); + } + } + this._activeTrigger[TRIGGER_CLICK] = false; + this._activeTrigger[TRIGGER_FOCUS] = false; + this._activeTrigger[TRIGGER_HOVER] = false; + this._isHovered = null; + const complete = () => { + if (this._isWithActiveTrigger()) { + return; + } + if (!this._isHovered) { + this._disposePopper(); + } + this._element.removeAttribute("aria-describedby"); + event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN2)); + }; + this._queueCallback(complete, this.tip, this._isAnimated()); + } + update() { + if (this._popper) { + this._popper.update(); + } + } + // Protected + _isWithContent() { + return Boolean(this._getTitle()); + } + _getTipElement() { + if (!this.tip) { + this.tip = this._createTipElement(this._newContent || this._getContentForTemplate()); + } + return this.tip; + } + _createTipElement(content2) { + const tip = this._getTemplateFactory(content2).toHtml(); + if (!tip) { + return null; + } + tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW2); + tip.classList.add(`bs-${this.constructor.NAME}-auto`); + const tipId = getUID(this.constructor.NAME).toString(); + tip.setAttribute("id", tipId); + if (this._isAnimated()) { + tip.classList.add(CLASS_NAME_FADE); + } + return tip; + } + setContent(content2) { + this._newContent = content2; + if (this._isShown()) { + this._disposePopper(); + this.show(); + } + } + _getTemplateFactory(content2) { + if (this._templateFactory) { + this._templateFactory.changeContent(content2); + } else { + this._templateFactory = new template_factory_default(__spreadProps(__spreadValues({}, this._config), { + // the `content` var has to be after `this._config` + // to override config.content in case of popover + content: content2, + extraClass: this._resolvePossibleFunction(this._config.customClass) + })); + } + return this._templateFactory; + } + _getContentForTemplate() { + return { + [SELECTOR_TOOLTIP_INNER]: this._getTitle() + }; + } + _getTitle() { + return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute("data-bs-original-title"); + } + // Private + _initializeOnDelegatedTarget(event) { + return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig()); + } + _isAnimated() { + return this._config.animation || this.tip && this.tip.classList.contains(CLASS_NAME_FADE); + } + _isShown() { + return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW2); + } + _createPopper(tip) { + const placement = execute(this._config.placement, [this, tip, this._element]); + const attachment = AttachmentMap[placement.toUpperCase()]; + return Popper.createPopper(this._element, tip, this._getPopperConfig(attachment)); + } + _getOffset() { + const { offset } = this._config; + if (typeof offset === "string") { + return offset.split(",").map((value) => Number.parseInt(value, 10)); + } + if (typeof offset === "function") { + return (popperData) => offset(popperData, this._element); + } + return offset; + } + _resolvePossibleFunction(arg) { + return execute(arg, [this._element, this._element]); + } + _getPopperConfig(attachment) { + const defaultBsPopperConfig = { + placement: attachment, + modifiers: [ + { + name: "flip", + options: { + fallbackPlacements: this._config.fallbackPlacements + } + }, + { + name: "offset", + options: { + offset: this._getOffset() + } + }, + { + name: "preventOverflow", + options: { + boundary: this._config.boundary + } + }, + { + name: "arrow", + options: { + element: `.${this.constructor.NAME}-arrow` + } + }, + { + name: "preSetPlacement", + enabled: true, + phase: "beforeMain", + fn: (data) => { + this._getTipElement().setAttribute("data-popper-placement", data.state.placement); + } + } + ] + }; + return __spreadValues(__spreadValues({}, defaultBsPopperConfig), execute(this._config.popperConfig, [void 0, defaultBsPopperConfig])); + } + _setListeners() { + const triggers = this._config.trigger.split(" "); + for (const trigger of triggers) { + if (trigger === "click") { + event_handler_default.on(this._element, this.constructor.eventName(EVENT_CLICK), this._config.selector, (event) => { + const context = this._initializeOnDelegatedTarget(event); + context._activeTrigger[TRIGGER_CLICK] = !(context._isShown() && context._activeTrigger[TRIGGER_CLICK]); + context.toggle(); + }); + } else if (trigger !== TRIGGER_MANUAL) { + const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN); + const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT); + event_handler_default.on(this._element, eventIn, this._config.selector, (event) => { + const context = this._initializeOnDelegatedTarget(event); + context._activeTrigger[event.type === "focusin" ? TRIGGER_FOCUS : TRIGGER_HOVER] = true; + context._enter(); + }); + event_handler_default.on(this._element, eventOut, this._config.selector, (event) => { + const context = this._initializeOnDelegatedTarget(event); + context._activeTrigger[event.type === "focusout" ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget); + context._leave(); + }); + } + } + this._hideModalHandler = () => { + if (this._element) { + this.hide(); + } + }; + event_handler_default.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler); + } + _fixTitle() { + const title = this._element.getAttribute("title"); + if (!title) { + return; + } + if (!this._element.getAttribute("aria-label") && !this._element.textContent.trim()) { + this._element.setAttribute("aria-label", title); + } + this._element.setAttribute("data-bs-original-title", title); + this._element.removeAttribute("title"); + } + _enter() { + if (this._isShown() || this._isHovered) { + this._isHovered = true; + return; + } + this._isHovered = true; + this._setTimeout(() => { + if (this._isHovered) { + this.show(); + } + }, this._config.delay.show); + } + _leave() { + if (this._isWithActiveTrigger()) { + return; + } + this._isHovered = false; + this._setTimeout(() => { + if (!this._isHovered) { + this.hide(); + } + }, this._config.delay.hide); + } + _setTimeout(handler, timeout) { + clearTimeout(this._timeout); + this._timeout = setTimeout(handler, timeout); + } + _isWithActiveTrigger() { + return Object.values(this._activeTrigger).includes(true); + } + _getConfig(config) { + const dataAttributes = manipulator_default.getDataAttributes(this._element); + for (const dataAttribute of Object.keys(dataAttributes)) { + if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) { + delete dataAttributes[dataAttribute]; + } + } + config = __spreadValues(__spreadValues({}, dataAttributes), typeof config === "object" && config ? config : {}); + config = this._mergeConfigObj(config); + config = this._configAfterMerge(config); + this._typeCheckConfig(config); + return config; + } + _configAfterMerge(config) { + config.container = config.container === false ? document.body : getElement(config.container); + if (typeof config.delay === "number") { + config.delay = { + show: config.delay, + hide: config.delay + }; + } + if (typeof config.title === "number") { + config.title = config.title.toString(); + } + if (typeof config.content === "number") { + config.content = config.content.toString(); + } + return config; + } + _getDelegateConfig() { + const config = {}; + for (const [key, value] of Object.entries(this._config)) { + if (this.constructor.Default[key] !== value) { + config[key] = value; + } + } + config.selector = false; + config.trigger = "manual"; + return config; + } + _disposePopper() { + if (this._popper) { + this._popper.destroy(); + this._popper = null; + } + if (this.tip) { + this.tip.remove(); + this.tip = null; + } + } + // Static + static jQueryInterface(config) { + return this.each(function() { + const data = _Tooltip.getOrCreateInstance(this, config); + if (typeof config !== "string") { + return; + } + if (typeof data[config] === "undefined") { + throw new TypeError(`No method named "${config}"`); + } + data[config](); + }); + } + }; + defineJQueryPlugin(Tooltip); + var tooltip_default = Tooltip; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/locale-datetime.js + var LocaleHelper = class { + static get attrTimestamp() { + return "data-ts"; + } + static get attrDateFormat() { + return "data-df"; + } + static get locale() { + return document.documentElement.getAttribute("lang").substring(0, 2); + } + static getTimestamp(elem) { + return Number(elem.getAttribute(this.attrTimestamp)); + } + static getDateFormat(elem) { + return elem.getAttribute(this.attrDateFormat); + } + }; + function initLocaleDatetime() { + dayjs.locale(LocaleHelper.locale); + dayjs.extend(window.dayjs_plugin_localizedFormat); + document.querySelectorAll(`[${LocaleHelper.attrTimestamp}]`).forEach((elem) => { + const date = dayjs.unix(LocaleHelper.getTimestamp(elem)); + const text = date.format(LocaleHelper.getDateFormat(elem)); + elem.textContent = text; + elem.removeAttribute(LocaleHelper.attrTimestamp); + elem.removeAttribute(LocaleHelper.attrDateFormat); + if (elem.hasAttribute("data-bs-toggle") && elem.getAttribute("data-bs-toggle") === "tooltip") { + const tooltipText = date.format("llll"); + elem.setAttribute("data-bs-title", tooltipText); + } + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/toc/toc-mobile.js + var $tocBar = document.getElementById("toc-bar"); + var $soloTrigger = document.getElementById("toc-solo-trigger"); + var $triggers = document.getElementsByClassName("toc-trigger"); + var $popup = document.getElementById("toc-popup"); + var $btnClose = document.getElementById("toc-popup-close"); + var SCROLL_LOCK = "overflow-hidden"; + var CLOSING = "closing"; + var _invisible, _barHeight; + var _TocMobile = class _TocMobile { + static initBar() { + const observer = new IntersectionObserver( + (entries) => { + entries.forEach((entry) => { + $tocBar.classList.toggle("invisible", entry.isIntersecting); + }); + }, + { rootMargin: `-${__privateGet(this, _barHeight)}px 0px 0px 0px` } + ); + observer.observe($soloTrigger); + __privateSet(this, _invisible, false); + } + static listenAnchors() { + const $anchors = document.getElementsByClassName("toc-link"); + [...$anchors].forEach((anchor) => { + anchor.onclick = () => this.hidePopup(); + }); + } + static refresh() { + if (__privateGet(this, _invisible)) { + this.initComponents(); + } + tocbot.refresh(this.options); + this.listenAnchors(); + } + static get popupOpened() { + return $popup.open; + } + static showPopup() { + this.lockScroll(true); + $popup.showModal(); + const activeItem = $popup.querySelector("li.is-active-li"); + activeItem.scrollIntoView({ block: "center" }); + } + static hidePopup() { + $popup.toggleAttribute(CLOSING); + $popup.addEventListener( + "animationend", + () => { + $popup.toggleAttribute(CLOSING); + $popup.close(); + }, + { once: true } + ); + this.lockScroll(false); + } + static lockScroll(enable) { + document.documentElement.classList.toggle(SCROLL_LOCK, enable); + document.body.classList.toggle(SCROLL_LOCK, enable); + } + static clickBackdrop(event) { + if ($popup.hasAttribute(CLOSING)) { + return; + } + const rect = event.target.getBoundingClientRect(); + if (event.clientX < rect.left || event.clientX > rect.right || event.clientY < rect.top || event.clientY > rect.bottom) { + this.hidePopup(); + } + } + static initComponents() { + this.initBar(); + [...$triggers].forEach((trigger) => { + trigger.onclick = () => this.showPopup(); + }); + $popup.onclick = (e) => this.clickBackdrop(e); + $btnClose.onclick = () => this.hidePopup(); + $popup.oncancel = (e) => { + e.preventDefault(); + this.hidePopup(); + }; + } + static init() { + tocbot.init(this.options); + this.listenAnchors(); + this.initComponents(); + } + }; + _invisible = new WeakMap(); + _barHeight = new WeakMap(); + __privateAdd(_TocMobile, _invisible, true); + __privateAdd(_TocMobile, _barHeight, 16 * 3); + // 3rem + __publicField(_TocMobile, "options", { + tocSelector: "#toc-popup-content", + contentSelector: ".content", + ignoreSelector: "[data-toc-skip]", + headingSelector: "h2, h3, h4", + orderedList: false, + scrollSmooth: false, + collapseDepth: 4, + headingsOffset: __privateGet(_TocMobile, _barHeight) + }); + var TocMobile = _TocMobile; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/toc/toc-desktop.js + var TocDesktop = class { + static refresh() { + tocbot.refresh(this.options); + } + static init() { + tocbot.init(this.options); + } + }; + /* Tocbot options Ref: https://github.com/tscanlin/tocbot#usage */ + __publicField(TocDesktop, "options", { + tocSelector: "#toc", + contentSelector: ".content", + ignoreSelector: "[data-toc-skip]", + headingSelector: "h2, h3, h4", + orderedList: false, + scrollSmooth: false, + headingsOffset: 16 * 2 + // 2rem + }); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/toc.js + var desktopMode = matchMedia("(min-width: 1200px)"); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/mermaid.js + var themeMapper = Theme.getThemeMapper("default", "dark"); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/mode-toggle.js + var $toggle = document.getElementById("mode-toggle"); + function modeWatcher() { + if (!$toggle) { + return; + } + $toggle.addEventListener("click", () => { + Theme.flip(); + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/back-to-top.js + function back2top() { + const btn = document.getElementById("back-to-top"); + window.addEventListener("scroll", () => { + if (window.scrollY > 50) { + btn.classList.add("show"); + } else { + btn.classList.remove("show"); + } + }); + btn.addEventListener("click", () => { + window.scrollTo({ top: 0 }); + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/tooltip-loader.js + function loadTooptip() { + const tooltipTriggerList = document.querySelectorAll( + '[data-bs-toggle="tooltip"]' + ); + [...tooltipTriggerList].map( + (tooltipTriggerEl) => new tooltip_default(tooltipTriggerEl) + ); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/layouts/basic.js + function basic() { + modeWatcher(); + back2top(); + loadTooptip(); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/layouts/sidebar.js + var ATTR_DISPLAY = "sidebar-display"; + var $sidebar = document.getElementById("sidebar"); + var $trigger = document.getElementById("sidebar-trigger"); + var $mask = document.getElementById("mask"); + var _isExpanded; + var SidebarUtil = class { + static toggle() { + __privateSet(this, _isExpanded, !__privateGet(this, _isExpanded)); + document.body.toggleAttribute(ATTR_DISPLAY, __privateGet(this, _isExpanded)); + $sidebar.classList.toggle("z-2", __privateGet(this, _isExpanded)); + $mask.classList.toggle("d-none", !__privateGet(this, _isExpanded)); + } + }; + _isExpanded = new WeakMap(); + __privateAdd(SidebarUtil, _isExpanded, false); + function initSidebar() { + $trigger.onclick = $mask.onclick = () => SidebarUtil.toggle(); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/search-display.js + var btnSbTrigger = document.getElementById("sidebar-trigger"); + var btnSearchTrigger = document.getElementById("search-trigger"); + var btnCancel = document.getElementById("search-cancel"); + var content = document.querySelectorAll("#main-wrapper>.container>.row"); + var topbarTitle = document.getElementById("topbar-title"); + var search = document.getElementById("search"); + var resultWrapper = document.getElementById("search-result-wrapper"); + var results = document.getElementById("search-results"); + var input = document.getElementById("search-input"); + var hints = document.getElementById("search-hints"); + var LOADED = "d-block"; + var UNLOADED = "d-none"; + var FOCUS = "input-focus"; + var FLEX = "d-flex"; + var MobileSearchBar = class { + static on() { + btnSbTrigger.classList.add(UNLOADED); + topbarTitle.classList.add(UNLOADED); + btnSearchTrigger.classList.add(UNLOADED); + search.classList.add(FLEX); + btnCancel.classList.add(LOADED); + } + static off() { + btnCancel.classList.remove(LOADED); + search.classList.remove(FLEX); + btnSbTrigger.classList.remove(UNLOADED); + topbarTitle.classList.remove(UNLOADED); + btnSearchTrigger.classList.remove(UNLOADED); + } + }; + var ResultSwitch = class { + static on() { + if (!this.resultVisible) { + resultWrapper.classList.remove(UNLOADED); + content.forEach((el) => { + el.classList.add(UNLOADED); + }); + this.resultVisible = true; + } + } + static off() { + if (this.resultVisible) { + results.innerHTML = ""; + if (hints.classList.contains(UNLOADED)) { + hints.classList.remove(UNLOADED); + } + resultWrapper.classList.add(UNLOADED); + content.forEach((el) => { + el.classList.remove(UNLOADED); + }); + input.textContent = ""; + this.resultVisible = false; + } + } + }; + __publicField(ResultSwitch, "resultVisible", false); + function isMobileView() { + return btnCancel.classList.contains(LOADED); + } + function displaySearch() { + btnSearchTrigger.addEventListener("click", () => { + MobileSearchBar.on(); + ResultSwitch.on(); + input.focus(); + }); + btnCancel.addEventListener("click", () => { + MobileSearchBar.off(); + ResultSwitch.off(); + }); + input.addEventListener("focus", () => { + search.classList.add(FOCUS); + }); + input.addEventListener("focusout", () => { + search.classList.remove(FOCUS); + }); + input.addEventListener("input", () => { + if (input.value === "") { + if (isMobileView()) { + hints.classList.remove(UNLOADED); + } else { + ResultSwitch.off(); + } + } else { + ResultSwitch.on(); + if (isMobileView()) { + hints.classList.add(UNLOADED); + } + } + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/layouts/topbar.js + function initTopbar() { + displaySearch(); + } + + // + initSidebar(); + initTopbar(); + initLocaleDatetime(); + basic(); +})(); diff --git a/public/js/modules/theme.js b/public/js/modules/theme.js index c375005..ef91a86 100644 --- a/public/js/modules/theme.js +++ b/public/js/modules/theme.js @@ -1 +1,128 @@ -(()=>{var L=Object.defineProperty;var w=i=>{throw TypeError(i)};var k=(i,s,a)=>s in i?L(i,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[s]=a;var M=(i,s,a)=>k(i,typeof s!="symbol"?s+"":s,a),b=(i,s,a)=>s.has(i)||w("Cannot "+a);var e=(i,s,a)=>(b(i,s,"read from private field"),a?a.call(i):s.get(i)),o=(i,s,a)=>s.has(i)?w("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,a);var r=(i,s,a)=>(b(i,s,"access private method"),a);var c,n,m,t,d,K,l,g,A,D,I,f,h=class h{static get DARK(){return"dark"}static get LIGHT(){return"light"}static get ID(){return"theme-mode"}static get visualState(){return e(this,t,l)?e(this,t,d):e(this,t,g)?this.DARK:this.LIGHT}static getThemeMapper(s,a){return{[this.LIGHT]:s,[this.DARK]:a}}static init(){this.switchable&&(e(this,m).addEventListener("change",()=>{let s=e(this,t,d);r(this,t,I).call(this),s!==this.visualState&&r(this,t,f).call(this)}),e(this,t,l)&&(e(this,t,K)?r(this,t,A).call(this):r(this,t,D).call(this)))}static flip(){e(this,t,l)?r(this,t,I).call(this):e(this,t,g)?r(this,t,D).call(this):r(this,t,A).call(this),r(this,t,f).call(this)}};c=new WeakMap,n=new WeakMap,m=new WeakMap,t=new WeakSet,d=function(){return sessionStorage.getItem(e(this,c))||document.documentElement.getAttribute(e(this,n))},K=function(){return e(this,t,d)===this.DARK},l=function(){return e(this,t,d)!==null},g=function(){return e(this,m).matches},A=function(){document.documentElement.setAttribute(e(this,n),this.DARK),sessionStorage.setItem(e(this,c),this.DARK)},D=function(){document.documentElement.setAttribute(e(this,n),this.LIGHT),sessionStorage.setItem(e(this,c),this.LIGHT)},I=function(){document.documentElement.removeAttribute(e(this,n)),sessionStorage.removeItem(e(this,c))},f=function(){window.postMessage({id:this.ID},"*")},o(h,t),o(h,c,"mode"),o(h,n,"data-mode"),o(h,m,window.matchMedia("(prefers-color-scheme: dark)")),M(h,"switchable",!document.documentElement.hasAttribute(e(h,n)));var u=h;u.init();var E=u;window.Theme=u;})(); +(() => { + var __defProp = Object.defineProperty; + var __typeError = (msg) => { + throw TypeError(msg); + }; + var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; + var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); + var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg); + var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)); + var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value); + var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method); + + // + var _modeKey, _modeAttr, _darkMedia, _Theme_static, mode_get, isDarkMode_get, hasMode_get, sysDark_get, setDark_fn, setLight_fn, clearMode_fn, notify_fn; + var _Theme = class _Theme { + static get DARK() { + return "dark"; + } + static get LIGHT() { + return "light"; + } + /** + * @returns {string} Theme mode identifier + */ + static get ID() { + return "theme-mode"; + } + /** + * Gets the current visual state of the theme. + * + * @returns {string} The current visual state, either the mode if it exists, + * or the system dark mode state ('dark' or 'light'). + */ + static get visualState() { + if (__privateGet(this, _Theme_static, hasMode_get)) { + return __privateGet(this, _Theme_static, mode_get); + } else { + return __privateGet(this, _Theme_static, sysDark_get) ? this.DARK : this.LIGHT; + } + } + /** + * Maps theme modes to provided values + * @param {string} light Value for light mode + * @param {string} dark Value for dark mode + * @returns {Object} Mapped values + */ + static getThemeMapper(light, dark) { + return { + [this.LIGHT]: light, + [this.DARK]: dark + }; + } + /** + * Initializes the theme based on system preferences or stored mode + */ + static init() { + if (!this.switchable) { + return; + } + __privateGet(this, _darkMedia).addEventListener("change", () => { + const lastMode = __privateGet(this, _Theme_static, mode_get); + __privateMethod(this, _Theme_static, clearMode_fn).call(this); + if (lastMode !== this.visualState) { + __privateMethod(this, _Theme_static, notify_fn).call(this); + } + }); + if (!__privateGet(this, _Theme_static, hasMode_get)) { + return; + } + if (__privateGet(this, _Theme_static, isDarkMode_get)) { + __privateMethod(this, _Theme_static, setDark_fn).call(this); + } else { + __privateMethod(this, _Theme_static, setLight_fn).call(this); + } + } + /** + * Flips the current theme mode + */ + static flip() { + if (__privateGet(this, _Theme_static, hasMode_get)) { + __privateMethod(this, _Theme_static, clearMode_fn).call(this); + } else { + __privateGet(this, _Theme_static, sysDark_get) ? __privateMethod(this, _Theme_static, setLight_fn).call(this) : __privateMethod(this, _Theme_static, setDark_fn).call(this); + } + __privateMethod(this, _Theme_static, notify_fn).call(this); + } + }; + _modeKey = new WeakMap(); + _modeAttr = new WeakMap(); + _darkMedia = new WeakMap(); + _Theme_static = new WeakSet(); + mode_get = function() { + return sessionStorage.getItem(__privateGet(this, _modeKey)) || document.documentElement.getAttribute(__privateGet(this, _modeAttr)); + }; + isDarkMode_get = function() { + return __privateGet(this, _Theme_static, mode_get) === this.DARK; + }; + hasMode_get = function() { + return __privateGet(this, _Theme_static, mode_get) !== null; + }; + sysDark_get = function() { + return __privateGet(this, _darkMedia).matches; + }; + setDark_fn = function() { + document.documentElement.setAttribute(__privateGet(this, _modeAttr), this.DARK); + sessionStorage.setItem(__privateGet(this, _modeKey), this.DARK); + }; + setLight_fn = function() { + document.documentElement.setAttribute(__privateGet(this, _modeAttr), this.LIGHT); + sessionStorage.setItem(__privateGet(this, _modeKey), this.LIGHT); + }; + clearMode_fn = function() { + document.documentElement.removeAttribute(__privateGet(this, _modeAttr)); + sessionStorage.removeItem(__privateGet(this, _modeKey)); + }; + notify_fn = function() { + window.postMessage({ id: this.ID }, "*"); + }; + __privateAdd(_Theme, _Theme_static); + __privateAdd(_Theme, _modeKey, "mode"); + __privateAdd(_Theme, _modeAttr, "data-mode"); + __privateAdd(_Theme, _darkMedia, window.matchMedia("(prefers-color-scheme: dark)")); + __publicField(_Theme, "switchable", !document.documentElement.hasAttribute(__privateGet(_Theme, _modeAttr))); + var Theme = _Theme; + Theme.init(); + var stdin_default = Theme; + window.Theme = Theme; +})(); diff --git a/public/js/page.js b/public/js/page.js index 7d5a00d..c8c9f7d 100644 --- a/public/js/page.js +++ b/public/js/page.js @@ -1 +1,3584 @@ -(()=>{var Wn=Object.create;var de=Object.defineProperty,zn=Object.defineProperties,Un=Object.getOwnPropertyDescriptor,Yn=Object.getOwnPropertyDescriptors,Gn=Object.getOwnPropertyNames,wr=Object.getOwnPropertySymbols,Kn=Object.getPrototypeOf,Ar=Object.prototype.hasOwnProperty,Qn=Object.prototype.propertyIsEnumerable;var Tr=e=>{throw TypeError(e)};var pe=(e,t,r)=>t in e?de(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N=(e,t)=>{for(var r in t||(t={}))Ar.call(t,r)&&pe(e,r,t[r]);if(wr)for(var r of wr(t))Qn.call(t,r)&&pe(e,r,t[r]);return e},Or=(e,t)=>zn(e,Yn(t));var Xn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Jn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Gn(t))!Ar.call(e,o)&&o!==r&&de(e,o,{get:()=>t[o],enumerable:!(n=Un(t,o))||n.enumerable});return e};var Zn=(e,t,r)=>(r=e!=null?Wn(Kn(e)):{},Jn(t||!e||!e.__esModule?de(r,"default",{value:e,enumerable:!0}):r,e));var wt=(e,t,r)=>pe(e,typeof t!="symbol"?t+"":t,r),Sr=(e,t,r)=>t.has(e)||Tr("Cannot "+r);var U=(e,t,r)=>(Sr(e,t,"read from private field"),r?r.call(e):t.get(e)),At=(e,t,r)=>t.has(e)?Tr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Ht=(e,t,r,n)=>(Sr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var dn=Xn(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});function H(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function lt(e){var t=H(e).Element;return e instanceof t||e instanceof Element}function k(e){var t=H(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Xr(e){if(typeof ShadowRoot=="undefined")return!1;var t=H(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var it=Math.max,Xt=Math.min,ut=Math.round;function ft(e,t){t===void 0&&(t=!1);var r=e.getBoundingClientRect(),n=1,o=1;if(k(e)&&t){var s=e.offsetHeight,i=e.offsetWidth;i>0&&(n=ut(r.width)/i||1),s>0&&(o=ut(r.height)/s||1)}return{width:r.width/n,height:r.height/o,top:r.top/o,right:r.right/n,bottom:r.bottom/o,left:r.left/n,x:r.left/n,y:r.top/o}}function Ie(e){var t=H(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function Lo(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Do(e){return e===H(e)||!k(e)?Ie(e):Lo(e)}function q(e){return e?(e.nodeName||"").toLowerCase():null}function J(e){return((lt(e)?e.ownerDocument:e.document)||window.document).documentElement}function Pe(e){return ft(J(e)).left+Ie(e).scrollLeft}function W(e){return H(e).getComputedStyle(e)}function Me(e){var t=W(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function No(e){var t=e.getBoundingClientRect(),r=ut(t.width)/e.offsetWidth||1,n=ut(t.height)/e.offsetHeight||1;return r!==1||n!==1}function Io(e,t,r){r===void 0&&(r=!1);var n=k(t),o=k(t)&&No(t),s=J(t),i=ft(e,o),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((q(t)!=="body"||Me(s))&&(a=Do(t)),k(t)?(c=ft(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=Pe(s))),{x:i.left+a.scrollLeft-c.x,y:i.top+a.scrollTop-c.y,width:i.width,height:i.height}}function Re(e){var t=ft(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function Jt(e){return q(e)==="html"?e:e.assignedSlot||e.parentNode||(Xr(e)?e.host:null)||J(e)}function Jr(e){return["html","body","#document"].indexOf(q(e))>=0?e.ownerDocument.body:k(e)&&Me(e)?e:Jr(Jt(e))}function xt(e,t){var r;t===void 0&&(t=[]);var n=Jr(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),s=H(n),i=o?[s].concat(s.visualViewport||[],Me(n)?n:[]):n,a=t.concat(i);return o?a:a.concat(xt(Jt(i)))}function Po(e){return["table","td","th"].indexOf(q(e))>=0}function Vr(e){return!k(e)||W(e).position==="fixed"?null:e.offsetParent}function Mo(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,r=navigator.userAgent.indexOf("Trident")!==-1;if(r&&k(e)){var n=W(e);if(n.position==="fixed")return null}for(var o=Jt(e);k(o)&&["html","body"].indexOf(q(o))<0;){var s=W(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function Dt(e){for(var t=H(e),r=Vr(e);r&&Po(r)&&W(r).position==="static";)r=Vr(r);return r&&(q(r)==="html"||q(r)==="body"&&W(r).position==="static")?t:r||Mo(e)||t}var I="top",$="bottom",B="right",P="left",ke="auto",Nt=[I,$,B,P],pt="start",Lt="end",Ro="clippingParents",Zr="viewport",St="popper",ko="reference",qr=Nt.reduce(function(e,t){return e.concat([t+"-"+pt,t+"-"+Lt])},[]),tn=[].concat(Nt,[ke]).reduce(function(e,t){return e.concat([t,t+"-"+pt,t+"-"+Lt])},[]),$o="beforeRead",Bo="read",jo="afterRead",Fo="beforeMain",Ho="main",Vo="afterMain",qo="beforeWrite",Wo="write",zo="afterWrite",Uo=[$o,Bo,jo,Fo,Ho,Vo,qo,Wo,zo];function Yo(e){var t=new Map,r=new Set,n=[];e.forEach(function(s){t.set(s.name,s)});function o(s){r.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(a){if(!r.has(a)){var c=t.get(a);c&&o(c)}}),n.push(s)}return e.forEach(function(s){r.has(s.name)||o(s)}),n}function Go(e){var t=Yo(e);return Uo.reduce(function(r,n){return r.concat(t.filter(function(o){return o.phase===n}))},[])}function Ko(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function V(e){return e.split("-")[0]}function Qo(e){var t=e.reduce(function(r,n){var o=r[n.name];return r[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}function Xo(e){var t=H(e),r=J(e),n=t.visualViewport,o=r.clientWidth,s=r.clientHeight,i=0,a=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(i=n.offsetLeft,a=n.offsetTop)),{width:o,height:s,x:i+Pe(e),y:a}}function Jo(e){var t,r=J(e),n=Ie(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=it(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=it(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+Pe(e),c=-n.scrollTop;return W(o||r).direction==="rtl"&&(a+=it(r.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:a,y:c}}function en(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Xr(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ne(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Zo(e){var t=ft(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function Wr(e,t){return t===Zr?Ne(Xo(e)):lt(t)?Zo(t):Ne(Jo(J(e)))}function ti(e){var t=xt(Jt(e)),r=["absolute","fixed"].indexOf(W(e).position)>=0,n=r&&k(e)?Dt(e):e;return lt(n)?t.filter(function(o){return lt(o)&&en(o,n)&&q(o)!=="body"&&(r?W(o).position!=="static":!0)}):[]}function ei(e,t,r){var n=t==="clippingParents"?ti(e):[].concat(t),o=[].concat(n,[r]),s=o[0],i=o.reduce(function(a,c){var u=Wr(e,c);return a.top=it(u.top,a.top),a.right=Xt(u.right,a.right),a.bottom=Xt(u.bottom,a.bottom),a.left=it(u.left,a.left),a},Wr(e,s));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}function dt(e){return e.split("-")[1]}function $e(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function rn(e){var t=e.reference,r=e.element,n=e.placement,o=n?V(n):null,s=n?dt(n):null,i=t.x+t.width/2-r.width/2,a=t.y+t.height/2-r.height/2,c;switch(o){case I:c={x:i,y:t.y-r.height};break;case $:c={x:i,y:t.y+t.height};break;case B:c={x:t.x+t.width,y:a};break;case P:c={x:t.x-r.width,y:a};break;default:c={x:t.x,y:t.y}}var u=o?$e(o):null;if(u!=null){var l=u==="y"?"height":"width";switch(s){case pt:c[u]=c[u]-(t[l]/2-r[l]/2);break;case Lt:c[u]=c[u]+(t[l]/2-r[l]/2);break}}return c}function nn(){return{top:0,right:0,bottom:0,left:0}}function on(e){return Object.assign({},nn(),e)}function sn(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}function ht(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=n===void 0?e.placement:n,s=r.boundary,i=s===void 0?Ro:s,a=r.rootBoundary,c=a===void 0?Zr:a,u=r.elementContext,l=u===void 0?St:u,f=r.altBoundary,g=f===void 0?!1:f,p=r.padding,h=p===void 0?0:p,m=on(typeof h!="number"?h:sn(h,Nt)),d=l===St?ko:St,w=e.rects.popper,A=e.elements[g?d:l],T=ei(lt(A)?A:A.contextElement||J(e.elements.popper),i,c),v=ft(e.elements.reference),E=rn({reference:v,element:w,strategy:"absolute",placement:o}),b=Ne(Object.assign({},w,E)),y=l===St?b:v,O={top:T.top-y.top+m.top,bottom:y.bottom-T.bottom+m.bottom,left:T.left-y.left+m.left,right:y.right-T.right+m.right},x=e.modifiersData.offset;if(l===St&&x){var C=x[o];Object.keys(O).forEach(function(_){var L=[B,$].indexOf(_)>=0?1:-1,et=[I,$].indexOf(_)>=0?"y":"x";O[_]+=C[et]*L})}return O}var zr={placement:"bottom",modifiers:[],strategy:"absolute"};function Ur(){for(var e=arguments.length,t=new Array(e),r=0;r=0?-1:1,s=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,i=s[0],a=s[1];return i=i||0,a=(a||0)*o,[P,B].indexOf(n)>=0?{x:a,y:i}:{x:i,y:a}}function ui(e){var t=e.state,r=e.options,n=e.name,o=r.offset,s=o===void 0?[0,0]:o,i=tn.reduce(function(l,f){return l[f]=li(f,t.rects,s),l},{}),a=i[t.placement],c=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=i}var an={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ui},fi={left:"right",right:"left",bottom:"top",top:"bottom"};function Qt(e){return e.replace(/left|right|bottom|top/g,function(t){return fi[t]})}var pi={start:"end",end:"start"};function Gr(e){return e.replace(/start|end/g,function(t){return pi[t]})}function di(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=r.boundary,s=r.rootBoundary,i=r.padding,a=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?tn:c,l=dt(n),f=l?a?qr:qr.filter(function(h){return dt(h)===l}):Nt,g=f.filter(function(h){return u.indexOf(h)>=0});g.length===0&&(g=f);var p=g.reduce(function(h,m){return h[m]=ht(e,{placement:m,boundary:o,rootBoundary:s,padding:i})[V(m)],h},{});return Object.keys(p).sort(function(h,m){return p[h]-p[m]})}function hi(e){if(V(e)===ke)return[];var t=Qt(e);return[Gr(e),t,Gr(t)]}function mi(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,s=o===void 0?!0:o,i=r.altAxis,a=i===void 0?!0:i,c=r.fallbackPlacements,u=r.padding,l=r.boundary,f=r.rootBoundary,g=r.altBoundary,p=r.flipVariations,h=p===void 0?!0:p,m=r.allowedAutoPlacements,d=t.options.placement,w=V(d),A=w===d,T=c||(A||!h?[Qt(d)]:hi(d)),v=[d].concat(T).reduce(function(at,G){return at.concat(V(G)===ke?di(t,{placement:G,boundary:l,rootBoundary:f,padding:u,flipVariations:h,allowedAutoPlacements:m}):G)},[]),E=t.rects.reference,b=t.rects.popper,y=new Map,O=!0,x=v[0],C=0;C=0,yt=bt?"width":"height",R=ht(t,{placement:_,boundary:l,rootBoundary:f,altBoundary:g,padding:u}),j=bt?et?B:P:et?$:I;E[yt]>b[yt]&&(j=Qt(j));var kt=Qt(j),rt=[];if(s&&rt.push(R[L]<=0),a&&rt.push(R[j]<=0,R[kt]<=0),rt.every(function(at){return at})){x=_,O=!1;break}y.set(_,rt)}if(O)for(var $t=h?3:1,ce=function(G){var _t=v.find(function(jt){var nt=y.get(jt);if(nt)return nt.slice(0,G).every(function(le){return le})});if(_t)return x=_t,"break"},Et=$t;Et>0;Et--){var Bt=ce(Et);if(Bt==="break")break}t.placement!==x&&(t.modifiersData[n]._skip=!0,t.placement=x,t.reset=!0)}}var cn={name:"flip",enabled:!0,phase:"main",fn:mi,requiresIfExists:["offset"],data:{_skip:!1}};function gi(e){return e==="x"?"y":"x"}function Ct(e,t,r){return it(e,Xt(t,r))}function vi(e,t,r){var n=Ct(e,t,r);return n>r?r:n}function bi(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,s=o===void 0?!0:o,i=r.altAxis,a=i===void 0?!1:i,c=r.boundary,u=r.rootBoundary,l=r.altBoundary,f=r.padding,g=r.tether,p=g===void 0?!0:g,h=r.tetherOffset,m=h===void 0?0:h,d=ht(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:l}),w=V(t.placement),A=dt(t.placement),T=!A,v=$e(w),E=gi(v),b=t.modifiersData.popperOffsets,y=t.rects.reference,O=t.rects.popper,x=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,C=typeof x=="number"?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(b){if(s){var et,bt=v==="y"?I:P,yt=v==="y"?$:B,R=v==="y"?"height":"width",j=b[v],kt=j+d[bt],rt=j-d[yt],$t=p?-O[R]/2:0,ce=A===pt?y[R]:O[R],Et=A===pt?-O[R]:-y[R],Bt=t.elements.arrow,at=p&&Bt?Re(Bt):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:nn(),_t=G[bt],jt=G[yt],nt=Ct(0,y[R],at[R]),le=T?y[R]/2-$t-nt-_t-C.mainAxis:ce-nt-_t-C.mainAxis,Bn=T?-y[R]/2+$t+nt+jt+C.mainAxis:Et+nt+jt+C.mainAxis,ue=t.elements.arrow&&Dt(t.elements.arrow),jn=ue?v==="y"?ue.clientTop||0:ue.clientLeft||0:0,dr=(et=_==null?void 0:_[v])!=null?et:0,Fn=j+le-dr-jn,Hn=j+Bn-dr,hr=Ct(p?Xt(kt,Fn):kt,j,p?it(rt,Hn):rt);b[v]=hr,L[v]=hr-j}if(a){var mr,Vn=v==="x"?I:P,qn=v==="x"?$:B,ot=b[E],Ft=E==="y"?"height":"width",gr=ot+d[Vn],vr=ot-d[qn],fe=[I,P].indexOf(w)!==-1,br=(mr=_==null?void 0:_[E])!=null?mr:0,yr=fe?gr:ot-y[Ft]-O[Ft]-br+C.altAxis,Er=fe?ot+y[Ft]+O[Ft]-br-C.altAxis:vr,_r=p&&fe?vi(yr,ot,Er):Ct(p?yr:gr,ot,p?Er:vr);b[E]=_r,L[E]=_r-ot}t.modifiersData[n]=L}}var ln={name:"preventOverflow",enabled:!0,phase:"main",fn:bi,requiresIfExists:["offset"]},yi=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,on(typeof t!="number"?t:sn(t,Nt))};function Ei(e){var t,r=e.state,n=e.name,o=e.options,s=r.elements.arrow,i=r.modifiersData.popperOffsets,a=V(r.placement),c=$e(a),u=[P,B].indexOf(a)>=0,l=u?"height":"width";if(!(!s||!i)){var f=yi(o.padding,r),g=Re(s),p=c==="y"?I:P,h=c==="y"?$:B,m=r.rects.reference[l]+r.rects.reference[c]-i[c]-r.rects.popper[l],d=i[c]-r.rects.reference[c],w=Dt(s),A=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,T=m/2-d/2,v=f[p],E=A-g[l]-f[h],b=A/2-g[l]/2+T,y=Ct(v,b,E),O=c;r.modifiersData[n]=(t={},t[O]=y,t.centerOffset=y-b,t)}}function _i(e){var t=e.state,r=e.options,n=r.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||en(t.elements.popper,o)&&(t.elements.arrow=o))}var un={name:"arrow",enabled:!0,phase:"main",fn:Ei,effect:_i,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Kr(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Qr(e){return[I,B,$,P].some(function(t){return e[t]>=0})}function wi(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,i=ht(t,{elementContext:"reference"}),a=ht(t,{altBoundary:!0}),c=Kr(i,n),u=Kr(a,o,s),l=Qr(c),f=Qr(u);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}var fn={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:wi},Ai=[je,Fe,He,Ve],Ti=Be({defaultModifiers:Ai}),pn=[je,Fe,He,Ve,an,cn,ln,un,fn],Oi=Be({defaultModifiers:pn});D.applyStyles=Ve;D.arrow=un;D.computeStyles=He;D.createPopper=Oi;D.createPopperLite=Ti;D.defaultModifiers=pn;D.detectOverflow=ht;D.eventListeners=je;D.flip=cn;D.hide=fn;D.offset=an;D.popperGenerator=Be;D.popperOffsets=Fe;D.preventOverflow=ln});var K=new Map,Vt={set(e,t,r){K.has(e)||K.set(e,new Map);let n=K.get(e);if(!n.has(t)&&n.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`);return}n.set(t,r)},get(e,t){return K.has(e)&&K.get(e).get(t)||null},remove(e,t){if(!K.has(e))return;let r=K.get(e);r.delete(t),r.size===0&&K.delete(e)}};var me="transitionend",ge=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(t,r)=>`#${CSS.escape(r)}`)),e),xr=e=>e==null?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),Cr=e=>{do e+=Math.floor(Math.random()*1e6);while(document.getElementById(e));return e},to=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:r}=window.getComputedStyle(e),n=Number.parseFloat(t),o=Number.parseFloat(r);return!n&&!o?0:(t=t.split(",")[0],r=r.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(r))*1e3)},eo=e=>{e.dispatchEvent(new Event(me))},X=e=>!e||typeof e!="object"?!1:(typeof e.jquery!="undefined"&&(e=e[0]),typeof e.nodeType!="undefined"),Y=e=>X(e)?e.jquery?e[0]:e:typeof e=="string"&&e.length>0?document.querySelector(ge(e)):null,Lr=e=>{if(!X(e)||e.getClientRects().length===0)return!1;let t=getComputedStyle(e).getPropertyValue("visibility")==="visible",r=e.closest("details:not([open])");if(!r)return t;if(r!==e){let n=e.closest("summary");if(n&&n.parentNode!==r||n===null)return!1}return t},Dr=e=>!e||e.nodeType!==Node.ELEMENT_NODE||e.classList.contains("disabled")?!0:typeof e.disabled!="undefined"?e.disabled:e.hasAttribute("disabled")&&e.getAttribute("disabled")!=="false",ve=e=>{if(!document.documentElement.attachShadow)return null;if(typeof e.getRootNode=="function"){let t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?ve(e.parentNode):null},be=()=>{},Nr=e=>{e.offsetHeight},ye=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,he=[],ro=e=>{document.readyState==="loading"?(he.length||document.addEventListener("DOMContentLoaded",()=>{for(let t of he)t()}),he.push(e)):e()},Ee=()=>document.documentElement.dir==="rtl",qt=e=>{ro(()=>{let t=ye();if(t){let r=e.NAME,n=t.fn[r];t.fn[r]=e.jQueryInterface,t.fn[r].Constructor=e,t.fn[r].noConflict=()=>(t.fn[r]=n,e.jQueryInterface)}})},Q=(e,t=[],r=e)=>typeof e=="function"?e.call(...t):r,Ir=(e,t,r=!0)=>{if(!r){Q(e);return}let o=to(t)+5,s=!1,i=({target:a})=>{a===t&&(s=!0,t.removeEventListener(me,i),Q(e))};t.addEventListener(me,i),setTimeout(()=>{s||eo(t)},o)};var no=/[^.]*(?=\..*)\.|.*/,oo=/\..*/,io=/::\d+$/,_e={},Pr=1,Rr={mouseenter:"mouseover",mouseleave:"mouseout"},so=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function kr(e,t){return t&&`${t}::${Pr++}`||e.uidEvent||Pr++}function $r(e){let t=kr(e);return e.uidEvent=t,_e[t]=_e[t]||{},_e[t]}function ao(e,t){return function r(n){return Te(n,{delegateTarget:e}),r.oneOff&&Ae.off(e,n.type,t),t.apply(e,[n])}}function co(e,t,r){return function n(o){let s=e.querySelectorAll(t);for(let{target:i}=o;i&&i!==this;i=i.parentNode)for(let a of s)if(a===i)return Te(o,{delegateTarget:i}),n.oneOff&&Ae.off(e,o.type,t,r),r.apply(i,[o])}}function Br(e,t,r=null){return Object.values(e).find(n=>n.callable===t&&n.delegationSelector===r)}function jr(e,t,r){let n=typeof t=="string",o=n?r:t||r,s=Fr(e);return so.has(s)||(s=e),[n,o,s]}function Mr(e,t,r,n,o){if(typeof t!="string"||!e)return;let[s,i,a]=jr(t,r,n);t in Rr&&(i=(h=>function(m){if(!m.relatedTarget||m.relatedTarget!==m.delegateTarget&&!m.delegateTarget.contains(m.relatedTarget))return h.call(this,m)})(i));let c=$r(e),u=c[a]||(c[a]={}),l=Br(u,i,s?r:null);if(l){l.oneOff=l.oneOff&&o;return}let f=kr(i,t.replace(no,"")),g=s?co(e,r,i):ao(e,i);g.delegationSelector=s?r:null,g.callable=i,g.oneOff=o,g.uidEvent=f,u[f]=g,e.addEventListener(a,g,s)}function we(e,t,r,n,o){let s=Br(t[r],n,o);s&&(e.removeEventListener(r,s,!!o),delete t[r][s.uidEvent])}function lo(e,t,r,n){let o=t[r]||{};for(let[s,i]of Object.entries(o))s.includes(n)&&we(e,t,r,i.callable,i.delegationSelector)}function Fr(e){return e=e.replace(oo,""),Rr[e]||e}var Ae={on(e,t,r,n){Mr(e,t,r,n,!1)},one(e,t,r,n){Mr(e,t,r,n,!0)},off(e,t,r,n){if(typeof t!="string"||!e)return;let[o,s,i]=jr(t,r,n),a=i!==t,c=$r(e),u=c[i]||{},l=t.startsWith(".");if(typeof s!="undefined"){if(!Object.keys(u).length)return;we(e,c,i,s,o?r:null);return}if(l)for(let f of Object.keys(c))lo(e,c,f,t.slice(1));for(let[f,g]of Object.entries(u)){let p=f.replace(io,"");(!a||t.includes(p))&&we(e,c,i,g.callable,g.delegationSelector)}},trigger(e,t,r){if(typeof t!="string"||!e)return null;let n=ye(),o=Fr(t),s=t!==o,i=null,a=!0,c=!0,u=!1;s&&n&&(i=n.Event(t,r),n(e).trigger(i),a=!i.isPropagationStopped(),c=!i.isImmediatePropagationStopped(),u=i.isDefaultPrevented());let l=Te(new Event(t,{bubbles:a,cancelable:!0}),r);return u&&l.preventDefault(),c&&e.dispatchEvent(l),l.defaultPrevented&&i&&i.preventDefault(),l}};function Te(e,t={}){for(let[r,n]of Object.entries(t))try{e[r]=n}catch(o){Object.defineProperty(e,r,{configurable:!0,get(){return n}})}return e}var S=Ae;function Hr(e){if(e==="true")return!0;if(e==="false")return!1;if(e===Number(e).toString())return Number(e);if(e===""||e==="null")return null;if(typeof e!="string")return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function Oe(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}var uo={setDataAttribute(e,t,r){e.setAttribute(`data-bs-${Oe(t)}`,r)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${Oe(t)}`)},getDataAttributes(e){if(!e)return{};let t={},r=Object.keys(e.dataset).filter(n=>n.startsWith("bs")&&!n.startsWith("bsConfig"));for(let n of r){let o=n.replace(/^bs/,"");o=o.charAt(0).toLowerCase()+o.slice(1),t[o]=Hr(e.dataset[n])}return t},getDataAttribute(e,t){return Hr(e.getAttribute(`data-bs-${Oe(t)}`))}},Tt=uo;var Se=class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,r){let n=X(r)?Tt.getDataAttribute(r,"config"):{};return N(N(N(N({},this.constructor.Default),typeof n=="object"?n:{}),X(r)?Tt.getDataAttributes(r):{}),typeof t=="object"?t:{})}_typeCheckConfig(t,r=this.constructor.DefaultType){for(let[n,o]of Object.entries(r)){let s=t[n],i=X(s)?"element":xr(s);if(!new RegExp(o).test(i))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${i}" but expected type "${o}".`)}}},Wt=Se;var fo="5.3.8",xe=class extends Wt{constructor(t,r){super(),t=Y(t),t&&(this._element=t,this._config=this._getConfig(r),Vt.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Vt.remove(this._element,this.constructor.DATA_KEY),S.off(this._element,this.constructor.EVENT_KEY);for(let t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,r,n=!0){Ir(t,r,n)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return Vt.get(Y(t),this.DATA_KEY)}static getOrCreateInstance(t,r={}){return this.getInstance(t)||new this(t,typeof r=="object"?r:null)}static get VERSION(){return fo}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}},zt=xe;var Ce=e=>{let t=e.getAttribute("data-bs-target");if(!t||t==="#"){let r=e.getAttribute("href");if(!r||!r.includes("#")&&!r.startsWith("."))return null;r.includes("#")&&!r.startsWith("#")&&(r=`#${r.split("#")[1]}`),t=r&&r!=="#"?r.trim():null}return t?t.split(",").map(r=>ge(r)).join(","):null},Ut={find(e,t=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(t,e))},findOne(e,t=document.documentElement){return Element.prototype.querySelector.call(t,e)},children(e,t){return[].concat(...e.children).filter(r=>r.matches(t))},parents(e,t){let r=[],n=e.parentNode.closest(t);for(;n;)r.push(n),n=n.parentNode.closest(t);return r},prev(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return[r];r=r.previousElementSibling}return[]},next(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return[r];r=r.nextElementSibling}return[]},focusableChildren(e){let t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(r=>`${r}:not([tabindex^="-"])`).join(",");return this.find(t,e).filter(r=>!Dr(r)&&Lr(r))},getSelectorFromElement(e){let t=Ce(e);return t&&Ut.findOne(t)?t:null},getElementFromSelector(e){let t=Ce(e);return t?Ut.findOne(t):null},getMultipleElementsFromSelector(e){let t=Ce(e);return t?Ut.find(t):[]}},F=Ut;var po="collapse",ho="bs.collapse",Ot=`.${ho}`,mo=".data-api",go=`show${Ot}`,vo=`shown${Ot}`,bo=`hide${Ot}`,yo=`hidden${Ot}`,Eo=`click${Ot}${mo}`,Le="show",ct="collapse",Yt="collapsing",_o="collapsed",wo=`:scope .${ct} .${ct}`,Ao="collapse-horizontal",To="width",Oo="height",So=".collapse.show, .collapse.collapsing",De='[data-bs-toggle="collapse"]',xo={parent:null,toggle:!0},Co={parent:"(null|element)",toggle:"boolean"},Gt=class e extends zt{constructor(t,r){super(t,r),this._isTransitioning=!1,this._triggerArray=[];let n=F.find(De);for(let o of n){let s=F.getSelectorFromElement(o),i=F.find(s).filter(a=>a===this._element);s!==null&&i.length&&this._triggerArray.push(o)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return xo}static get DefaultType(){return Co}static get NAME(){return po}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(So).filter(a=>a!==this._element).map(a=>e.getOrCreateInstance(a,{toggle:!1}))),t.length&&t[0]._isTransitioning||S.trigger(this._element,go).defaultPrevented)return;for(let a of t)a.hide();let n=this._getDimension();this._element.classList.remove(ct),this._element.classList.add(Yt),this._element.style[n]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;let o=()=>{this._isTransitioning=!1,this._element.classList.remove(Yt),this._element.classList.add(ct,Le),this._element.style[n]="",S.trigger(this._element,vo)},i=`scroll${n[0].toUpperCase()+n.slice(1)}`;this._queueCallback(o,this._element,!0),this._element.style[n]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown()||S.trigger(this._element,bo).defaultPrevented)return;let r=this._getDimension();this._element.style[r]=`${this._element.getBoundingClientRect()[r]}px`,Nr(this._element),this._element.classList.add(Yt),this._element.classList.remove(ct,Le);for(let o of this._triggerArray){let s=F.getElementFromSelector(o);s&&!this._isShown(s)&&this._addAriaAndCollapsedClass([o],!1)}this._isTransitioning=!0;let n=()=>{this._isTransitioning=!1,this._element.classList.remove(Yt),this._element.classList.add(ct),S.trigger(this._element,yo)};this._element.style[r]="",this._queueCallback(n,this._element,!0)}_isShown(t=this._element){return t.classList.contains(Le)}_configAfterMerge(t){return t.toggle=!!t.toggle,t.parent=Y(t.parent),t}_getDimension(){return this._element.classList.contains(Ao)?To:Oo}_initializeChildren(){if(!this._config.parent)return;let t=this._getFirstLevelChildren(De);for(let r of t){let n=F.getElementFromSelector(r);n&&this._addAriaAndCollapsedClass([r],this._isShown(n))}}_getFirstLevelChildren(t){let r=F.find(wo,this._config.parent);return F.find(t,this._config.parent).filter(n=>!r.includes(n))}_addAriaAndCollapsedClass(t,r){if(t.length)for(let n of t)n.classList.toggle(_o,!r),n.setAttribute("aria-expanded",r)}static jQueryInterface(t){let r={};return typeof t=="string"&&/show|hide/.test(t)&&(r.toggle=!1),this.each(function(){let n=e.getOrCreateInstance(this,r);if(typeof t=="string"){if(typeof n[t]=="undefined")throw new TypeError(`No method named "${t}"`);n[t]()}})}};S.on(document,Eo,De,function(e){(e.target.tagName==="A"||e.delegateTarget&&e.delegateTarget.tagName==="A")&&e.preventDefault();for(let t of F.getMultipleElementsFromSelector(this))Gt.getOrCreateInstance(t,{toggle:!1}).toggle()});qt(Gt);var Vs=document.getElementsByClassName("collapse");var Ye=Zn(dn());var Si=/^aria-[\w-]*$/i,Zt={"*":["class","dir","id","lang","role",Si],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},xi=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Ci=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Li=(e,t)=>{let r=e.nodeName.toLowerCase();return t.includes(r)?xi.has(r)?!!Ci.test(e.nodeValue):!0:t.filter(n=>n instanceof RegExp).some(n=>n.test(r))};function hn(e,t,r){if(!e.length)return e;if(r&&typeof r=="function")return r(e);let o=new window.DOMParser().parseFromString(e,"text/html"),s=[].concat(...o.body.querySelectorAll("*"));for(let i of s){let a=i.nodeName.toLowerCase();if(!Object.keys(t).includes(a)){i.remove();continue}let c=[].concat(...i.attributes),u=[].concat(t["*"]||[],t[a]||[]);for(let l of c)Li(l,u)||i.removeAttribute(l.nodeName)}return o.body.innerHTML}var Di="TemplateFactory",Ni={allowList:Zt,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},Ii={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Pi={entry:"(string|element|function|null)",selector:"(string|element)"},qe=class extends Wt{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Ni}static get DefaultType(){return Ii}static get NAME(){return Di}getContent(){return Object.values(this._config.content).map(t=>this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content=N(N({},this._config.content),t),this}toHtml(){let t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(let[o,s]of Object.entries(this._config.content))this._setContent(t,s,o);let r=t.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&r.classList.add(...n.split(" ")),r}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(let[r,n]of Object.entries(t))super._typeCheckConfig({selector:r,entry:n},Pi)}_setContent(t,r,n){let o=F.findOne(n,t);if(o){if(r=this._resolvePossibleFunction(r),!r){o.remove();return}if(X(r)){this._putElementInTemplate(Y(r),o);return}if(this._config.html){o.innerHTML=this._maybeSanitize(r);return}o.textContent=r}}_maybeSanitize(t){return this._config.sanitize?hn(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return Q(t,[void 0,this])}_putElementInTemplate(t,r){if(this._config.html){r.innerHTML="",r.append(t);return}r.textContent=t.textContent}},mn=qe;var Mi="tooltip",Ri=new Set(["sanitize","allowList","sanitizeFn"]),We="fade",ki="modal",te="show",$i=".tooltip-inner",gn=`.${ki}`,vn="hide.bs.modal",It="hover",ze="focus",Ue="click",Bi="manual",ji="hide",Fi="hidden",Hi="show",Vi="shown",qi="inserted",Wi="click",zi="focusin",Ui="focusout",Yi="mouseenter",Gi="mouseleave",Ki={AUTO:"auto",TOP:"top",RIGHT:Ee()?"left":"right",BOTTOM:"bottom",LEFT:Ee()?"right":"left"},Qi={allowList:Zt,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Xi={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"},ee=class e extends zt{constructor(t,r){if(typeof Ye=="undefined")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(t,r),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Qi}static get DefaultType(){return Xi}static get NAME(){return Mi}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),S.off(this._element.closest(gn),vn,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;let t=S.trigger(this._element,this.constructor.eventName(Hi)),n=(ve(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!n)return;this._disposePopper();let o=this._getTipElement();this._element.setAttribute("aria-describedby",o.getAttribute("id"));let{container:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(o),S.trigger(this._element,this.constructor.eventName(qi))),this._popper=this._createPopper(o),o.classList.add(te),"ontouchstart"in document.documentElement)for(let a of[].concat(...document.body.children))S.on(a,"mouseover",be);let i=()=>{S.trigger(this._element,this.constructor.eventName(Vi)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(i,this.tip,this._isAnimated())}hide(){if(!this._isShown()||S.trigger(this._element,this.constructor.eventName(ji)).defaultPrevented)return;if(this._getTipElement().classList.remove(te),"ontouchstart"in document.documentElement)for(let o of[].concat(...document.body.children))S.off(o,"mouseover",be);this._activeTrigger[Ue]=!1,this._activeTrigger[ze]=!1,this._activeTrigger[It]=!1,this._isHovered=null;let n=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),S.trigger(this._element,this.constructor.eventName(Fi)))};this._queueCallback(n,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){let r=this._getTemplateFactory(t).toHtml();if(!r)return null;r.classList.remove(We,te),r.classList.add(`bs-${this.constructor.NAME}-auto`);let n=Cr(this.constructor.NAME).toString();return r.setAttribute("id",n),this._isAnimated()&&r.classList.add(We),r}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new mn(Or(N({},this._config),{content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)})),this._templateFactory}_getContentForTemplate(){return{[$i]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(We)}_isShown(){return this.tip&&this.tip.classList.contains(te)}_createPopper(t){let r=Q(this._config.placement,[this,t,this._element]),n=Ki[r.toUpperCase()];return Ye.createPopper(this._element,t,this._getPopperConfig(n))}_getOffset(){let{offset:t}=this._config;return typeof t=="string"?t.split(",").map(r=>Number.parseInt(r,10)):typeof t=="function"?r=>t(r,this._element):t}_resolvePossibleFunction(t){return Q(t,[this._element,this._element])}_getPopperConfig(t){let r={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:n=>{this._getTipElement().setAttribute("data-popper-placement",n.state.placement)}}]};return N(N({},r),Q(this._config.popperConfig,[void 0,r]))}_setListeners(){let t=this._config.trigger.split(" ");for(let r of t)if(r==="click")S.on(this._element,this.constructor.eventName(Wi),this._config.selector,n=>{let o=this._initializeOnDelegatedTarget(n);o._activeTrigger[Ue]=!(o._isShown()&&o._activeTrigger[Ue]),o.toggle()});else if(r!==Bi){let n=r===It?this.constructor.eventName(Yi):this.constructor.eventName(zi),o=r===It?this.constructor.eventName(Gi):this.constructor.eventName(Ui);S.on(this._element,n,this._config.selector,s=>{let i=this._initializeOnDelegatedTarget(s);i._activeTrigger[s.type==="focusin"?ze:It]=!0,i._enter()}),S.on(this._element,o,this._config.selector,s=>{let i=this._initializeOnDelegatedTarget(s);i._activeTrigger[s.type==="focusout"?ze:It]=i._element.contains(s.relatedTarget),i._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},S.on(this._element.closest(gn),vn,this._hideModalHandler)}_fixTitle(){let t=this._element.getAttribute("title");t&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,r){clearTimeout(this._timeout),this._timeout=setTimeout(t,r)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){let r=Tt.getDataAttributes(this._element);for(let n of Object.keys(r))Ri.has(n)&&delete r[n];return t=N(N({},r),typeof t=="object"&&t?t:{}),t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=t.container===!1?document.body:Y(t.container),typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),typeof t.title=="number"&&(t.title=t.title.toString()),typeof t.content=="number"&&(t.content=t.content.toString()),t}_getDelegateConfig(){let t={};for(let[r,n]of Object.entries(this._config))this.constructor.Default[r]!==n&&(t[r]=n);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){let r=e.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof r[t]=="undefined")throw new TypeError(`No method named "${t}"`);r[t]()}})}};qt(ee);var Z=ee;var bn=".code-header>button",Ji="far fa-clipboard",Zi="fas fa-check",re="timeout",yn="data-title-succeed",Pt="data-bs-original-title",Ge=2e3;function En(e){if(e.hasAttribute(re)){let t=e.getAttribute(re);if(Number(t)>Date.now())return!0}return!1}function _n(e){e.setAttribute(re,Date.now()+Ge)}function wn(e){e.removeAttribute(re)}function ts(e){let t=e.getAttribute(yn);e.setAttribute(Pt,t),Z.getInstance(e).show()}function es(e){Z.getInstance(e).hide(),e.removeAttribute(Pt)}function rs(e){e.children[0].setAttribute("class",Zi)}function ns(e){e.children[0].setAttribute("class",Ji)}function os(){let e=document.querySelectorAll(bn);if(e.length===0)return;let t=new ClipboardJS(bn,{target:r=>r.parentNode.nextElementSibling.querySelectorAll("code")[1]});[...e].map(r=>new Z(r,{placement:"left"})),t.on("success",r=>{let n=r.trigger;r.clearSelection(),!En(n)&&(rs(n),ts(n),_n(n),setTimeout(()=>{es(n),ns(n),wn(n)},Ge))})}function is(){let e=document.getElementById("copy-link");e!==null&&(e.addEventListener("click",t=>{let r=t.target;En(r)||navigator.clipboard.writeText(window.location.href).then(()=>{let n=r.getAttribute(Pt),o=r.getAttribute(yn);r.setAttribute(Pt,o),Z.getInstance(r).show(),_n(r),setTimeout(()=>{r.setAttribute(Pt,n),wn(r)},Ge)})}),e.addEventListener("mouseleave",t=>{Z.getInstance(t.target).hide()}))}function Ke(){os(),is()}var An="data-src",Tn="data-lqip",Qe={SHIMMER:"shimmer",BLUR:"blur"};function Xe(e){this.parentElement.classList.remove(e)}function ss(){this.complete&&(this.hasAttribute(Tn)?Xe.call(this,Qe.BLUR):Xe.call(this,Qe.SHIMMER))}function as(){let e=this.getAttribute(An);this.setAttribute("src",encodeURI(e)),this.removeAttribute(An)}function Je(){let e=document.querySelectorAll("article img");if(e.length===0)return;e.forEach(r=>{r.addEventListener("load",ss)}),document.querySelectorAll('article img[loading="lazy"]').forEach(r=>{r.complete&&Xe.call(r,Qe.SHIMMER)});let t=document.querySelectorAll(`article img[${Tn}="true"]`);t.length&&t.forEach(r=>{as.call(r)})}var Ze=".popup:not(.dark)",On=".popup:not(.light)",mt=Ze;function cs(e,t){mt===Ze?mt=On:mt=Ze,t===null&&(t=GLightbox({selector:`${mt}`})),[e,t]=[t,e]}function tr(){if(document.querySelector(".popup")===null)return;let e=!(document.querySelector(".popup.light")===null&&document.querySelector(".popup.dark")===null);Theme.visualState===Theme.DARK&&(mt=On);let t=GLightbox({selector:`${mt}`});if(e&&Theme.switchable){let r=null;window.addEventListener("message",n=>{n.source===window&&n.data&&n.data.id===Theme.ID&&cs(t,r)})}}var ls=document.getElementById("toc-bar"),us=document.getElementById("toc-solo-trigger"),fs=document.getElementsByClassName("toc-trigger"),z=document.getElementById("toc-popup"),ps=document.getElementById("toc-popup-close"),Sn="overflow-hidden",er="closing",Mt,Rt,gt=class gt{static initBar(){new IntersectionObserver(r=>{r.forEach(n=>{ls.classList.toggle("invisible",n.isIntersecting)})},{rootMargin:`-${U(this,Rt)}px 0px 0px 0px`}).observe(us),Ht(this,Mt,!1)}static listenAnchors(){[...document.getElementsByClassName("toc-link")].forEach(r=>{r.onclick=()=>this.hidePopup()})}static refresh(){U(this,Mt)&&this.initComponents(),tocbot.refresh(this.options),this.listenAnchors()}static get popupOpened(){return z.open}static showPopup(){this.lockScroll(!0),z.showModal(),z.querySelector("li.is-active-li").scrollIntoView({block:"center"})}static hidePopup(){z.toggleAttribute(er),z.addEventListener("animationend",()=>{z.toggleAttribute(er),z.close()},{once:!0}),this.lockScroll(!1)}static lockScroll(t){document.documentElement.classList.toggle(Sn,t),document.body.classList.toggle(Sn,t)}static clickBackdrop(t){if(z.hasAttribute(er))return;let r=t.target.getBoundingClientRect();(t.clientXr.right||t.clientYr.bottom)&&this.hidePopup()}static initComponents(){this.initBar(),[...fs].forEach(t=>{t.onclick=()=>this.showPopup()}),z.onclick=t=>this.clickBackdrop(t),ps.onclick=()=>this.hidePopup(),z.oncancel=t=>{t.preventDefault(),this.hidePopup()}}static init(){tocbot.init(this.options),this.listenAnchors(),this.initComponents()}};Mt=new WeakMap,Rt=new WeakMap,At(gt,Mt,!0),At(gt,Rt,48),wt(gt,"options",{tocSelector:"#toc-popup-content",contentSelector:".content",ignoreSelector:"[data-toc-skip]",headingSelector:"h2, h3, h4",orderedList:!1,scrollSmooth:!1,collapseDepth:4,headingsOffset:U(gt,Rt)});var rr=gt;var ba=matchMedia("(min-width: 1200px)");var nr="mermaid",xn=Theme.getThemeMapper("default","dark");function ds(e){if(e.source===window&&e.data&&e.data.id===Theme.ID){[...document.getElementsByClassName(nr)].forEach(n=>{let o=n.previousSibling.children.item(0).textContent;n.textContent=o,n.removeAttribute("data-processed")});let r=xn[Theme.visualState];mermaid.initialize({theme:r}),mermaid.init(null,`.${nr}`)}}function hs(e){let t=e.textContent,r=e.parentElement;r.classList.add("d-none");let n=document.createElement("pre");n.classList.add(nr);let o=document.createTextNode(t);n.appendChild(o),r.after(n)}function or(){if(typeof mermaid=="undefined"||typeof mermaid.initialize!="function")return;let t={theme:xn[Theme.visualState]};[...document.getElementsByClassName("language-mermaid")].forEach(hs),mermaid.initialize(t),Theme.switchable&&window.addEventListener("message",ds)}var Cn=document.getElementById("mode-toggle");function ir(){Cn&&Cn.addEventListener("click",()=>{Theme.flip()})}function sr(){let e=document.getElementById("back-to-top");window.addEventListener("scroll",()=>{window.scrollY>50?e.classList.add("show"):e.classList.remove("show")}),e.addEventListener("click",()=>{window.scrollTo({top:0})})}function ar(){[...document.querySelectorAll('[data-bs-toggle="tooltip"]')].map(t=>new Z(t))}function cr(){ir(),sr(),ar()}var ms="sidebar-display",gs=document.getElementById("sidebar"),vs=document.getElementById("sidebar-trigger"),Ln=document.getElementById("mask"),tt,ne=class{static toggle(){Ht(this,tt,!U(this,tt)),document.body.toggleAttribute(ms,U(this,tt)),gs.classList.toggle("z-2",U(this,tt)),Ln.classList.toggle("d-none",!U(this,tt))}};tt=new WeakMap,At(ne,tt,!1);function lr(){vs.onclick=Ln.onclick=()=>ne.toggle()}var Dn=document.getElementById("sidebar-trigger"),ur=document.getElementById("search-trigger"),oe=document.getElementById("search-cancel"),Nn=document.querySelectorAll("#main-wrapper>.container>.row"),In=document.getElementById("topbar-title"),ie=document.getElementById("search"),Pn=document.getElementById("search-result-wrapper"),bs=document.getElementById("search-results"),vt=document.getElementById("search-input"),se=document.getElementById("search-hints"),fr="d-block",M="d-none",Mn="input-focus",Rn="d-flex",ae=class{static on(){Dn.classList.add(M),In.classList.add(M),ur.classList.add(M),ie.classList.add(Rn),oe.classList.add(fr)}static off(){oe.classList.remove(fr),ie.classList.remove(Rn),Dn.classList.remove(M),In.classList.remove(M),ur.classList.remove(M)}},st=class{static on(){this.resultVisible||(Pn.classList.remove(M),Nn.forEach(t=>{t.classList.add(M)}),this.resultVisible=!0)}static off(){this.resultVisible&&(bs.innerHTML="",se.classList.contains(M)&&se.classList.remove(M),Pn.classList.add(M),Nn.forEach(t=>{t.classList.remove(M)}),vt.textContent="",this.resultVisible=!1)}};wt(st,"resultVisible",!1);function kn(){return oe.classList.contains(fr)}function $n(){ur.addEventListener("click",()=>{ae.on(),st.on(),vt.focus()}),oe.addEventListener("click",()=>{ae.off(),st.off()}),vt.addEventListener("focus",()=>{ie.classList.add(Mn)}),vt.addEventListener("focusout",()=>{ie.classList.remove(Mn)}),vt.addEventListener("input",()=>{vt.value===""?kn()?se.classList.remove(M):st.off():(st.on(),kn()&&se.classList.add(M))})}function pr(){$n()}Je();tr();lr();pr();Ke();or();cr();})(); +(() => { + var __create = Object.create; + var __defProp = Object.defineProperty; + var __defProps = Object.defineProperties; + var __getOwnPropDesc = Object.getOwnPropertyDescriptor; + var __getOwnPropDescs = Object.getOwnPropertyDescriptors; + var __getOwnPropNames = Object.getOwnPropertyNames; + var __getOwnPropSymbols = Object.getOwnPropertySymbols; + var __getProtoOf = Object.getPrototypeOf; + var __hasOwnProp = Object.prototype.hasOwnProperty; + var __propIsEnum = Object.prototype.propertyIsEnumerable; + var __typeError = (msg) => { + throw TypeError(msg); + }; + var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; + var __spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b)) { + if (__propIsEnum.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + } + return a; + }; + var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); + var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + }; + var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; + }; + var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); + var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg); + var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)); + var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value); + var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2@v2.21100.20000/package/dist/cjs/popper.js + var require_popper = __commonJS({ + "ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2@v2.21100.20000/package/dist/cjs/popper.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + function getWindow(node) { + if (node == null) { + return window; + } + if (node.toString() !== "[object Window]") { + var ownerDocument = node.ownerDocument; + return ownerDocument ? ownerDocument.defaultView || window : window; + } + return node; + } + function isElement2(node) { + var OwnElement = getWindow(node).Element; + return node instanceof OwnElement || node instanceof Element; + } + function isHTMLElement(node) { + var OwnElement = getWindow(node).HTMLElement; + return node instanceof OwnElement || node instanceof HTMLElement; + } + function isShadowRoot(node) { + if (typeof ShadowRoot === "undefined") { + return false; + } + var OwnElement = getWindow(node).ShadowRoot; + return node instanceof OwnElement || node instanceof ShadowRoot; + } + var max = Math.max; + var min = Math.min; + var round = Math.round; + function getBoundingClientRect(element, includeScale) { + if (includeScale === void 0) { + includeScale = false; + } + var rect = element.getBoundingClientRect(); + var scaleX = 1; + var scaleY = 1; + if (isHTMLElement(element) && includeScale) { + var offsetHeight = element.offsetHeight; + var offsetWidth = element.offsetWidth; + if (offsetWidth > 0) { + scaleX = round(rect.width) / offsetWidth || 1; + } + if (offsetHeight > 0) { + scaleY = round(rect.height) / offsetHeight || 1; + } + } + return { + width: rect.width / scaleX, + height: rect.height / scaleY, + top: rect.top / scaleY, + right: rect.right / scaleX, + bottom: rect.bottom / scaleY, + left: rect.left / scaleX, + x: rect.left / scaleX, + y: rect.top / scaleY + }; + } + function getWindowScroll(node) { + var win = getWindow(node); + var scrollLeft = win.pageXOffset; + var scrollTop = win.pageYOffset; + return { + scrollLeft, + scrollTop + }; + } + function getHTMLElementScroll(element) { + return { + scrollLeft: element.scrollLeft, + scrollTop: element.scrollTop + }; + } + function getNodeScroll(node) { + if (node === getWindow(node) || !isHTMLElement(node)) { + return getWindowScroll(node); + } else { + return getHTMLElementScroll(node); + } + } + function getNodeName(element) { + return element ? (element.nodeName || "").toLowerCase() : null; + } + function getDocumentElement(element) { + return ((isElement2(element) ? element.ownerDocument : ( + // $FlowFixMe[prop-missing] + element.document + )) || window.document).documentElement; + } + function getWindowScrollBarX(element) { + return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; + } + function getComputedStyle2(element) { + return getWindow(element).getComputedStyle(element); + } + function isScrollParent(element) { + var _getComputedStyle = getComputedStyle2(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY; + return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); + } + function isElementScaled(element) { + var rect = element.getBoundingClientRect(); + var scaleX = round(rect.width) / element.offsetWidth || 1; + var scaleY = round(rect.height) / element.offsetHeight || 1; + return scaleX !== 1 || scaleY !== 1; + } + function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { + if (isFixed === void 0) { + isFixed = false; + } + var isOffsetParentAnElement = isHTMLElement(offsetParent); + var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent); + var documentElement = getDocumentElement(offsetParent); + var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled); + var scroll = { + scrollLeft: 0, + scrollTop: 0 + }; + var offsets = { + x: 0, + y: 0 + }; + if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { + if (getNodeName(offsetParent) !== "body" || // https://github.com/popperjs/popper-core/issues/1078 + isScrollParent(documentElement)) { + scroll = getNodeScroll(offsetParent); + } + if (isHTMLElement(offsetParent)) { + offsets = getBoundingClientRect(offsetParent, true); + offsets.x += offsetParent.clientLeft; + offsets.y += offsetParent.clientTop; + } else if (documentElement) { + offsets.x = getWindowScrollBarX(documentElement); + } + } + return { + x: rect.left + scroll.scrollLeft - offsets.x, + y: rect.top + scroll.scrollTop - offsets.y, + width: rect.width, + height: rect.height + }; + } + function getLayoutRect(element) { + var clientRect = getBoundingClientRect(element); + var width = element.offsetWidth; + var height = element.offsetHeight; + if (Math.abs(clientRect.width - width) <= 1) { + width = clientRect.width; + } + if (Math.abs(clientRect.height - height) <= 1) { + height = clientRect.height; + } + return { + x: element.offsetLeft, + y: element.offsetTop, + width, + height + }; + } + function getParentNode(element) { + if (getNodeName(element) === "html") { + return element; + } + return ( + // this is a quicker (but less type safe) way to save quite some bytes from the bundle + // $FlowFixMe[incompatible-return] + // $FlowFixMe[prop-missing] + element.assignedSlot || // step into the shadow DOM of the parent of a slotted node + element.parentNode || // DOM Element detected + (isShadowRoot(element) ? element.host : null) || // ShadowRoot detected + // $FlowFixMe[incompatible-call]: HTMLElement is a Node + getDocumentElement(element) + ); + } + function getScrollParent(node) { + if (["html", "body", "#document"].indexOf(getNodeName(node)) >= 0) { + return node.ownerDocument.body; + } + if (isHTMLElement(node) && isScrollParent(node)) { + return node; + } + return getScrollParent(getParentNode(node)); + } + function listScrollParents(element, list) { + var _element$ownerDocumen; + if (list === void 0) { + list = []; + } + var scrollParent = getScrollParent(element); + var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body); + var win = getWindow(scrollParent); + var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; + var updatedList = list.concat(target); + return isBody ? updatedList : ( + // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here + updatedList.concat(listScrollParents(getParentNode(target))) + ); + } + function isTableElement(element) { + return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0; + } + function getTrueOffsetParent(element) { + if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837 + getComputedStyle2(element).position === "fixed") { + return null; + } + return element.offsetParent; + } + function getContainingBlock(element) { + var isFirefox = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1; + var isIE = navigator.userAgent.indexOf("Trident") !== -1; + if (isIE && isHTMLElement(element)) { + var elementCss = getComputedStyle2(element); + if (elementCss.position === "fixed") { + return null; + } + } + var currentNode = getParentNode(element); + while (isHTMLElement(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0) { + var css = getComputedStyle2(currentNode); + if (css.transform !== "none" || css.perspective !== "none" || css.contain === "paint" || ["transform", "perspective"].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === "filter" || isFirefox && css.filter && css.filter !== "none") { + return currentNode; + } else { + currentNode = currentNode.parentNode; + } + } + return null; + } + function getOffsetParent(element) { + var window2 = getWindow(element); + var offsetParent = getTrueOffsetParent(element); + while (offsetParent && isTableElement(offsetParent) && getComputedStyle2(offsetParent).position === "static") { + offsetParent = getTrueOffsetParent(offsetParent); + } + if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle2(offsetParent).position === "static")) { + return window2; + } + return offsetParent || getContainingBlock(element) || window2; + } + var top = "top"; + var bottom = "bottom"; + var right = "right"; + var left = "left"; + var auto = "auto"; + var basePlacements = [top, bottom, right, left]; + var start = "start"; + var end = "end"; + var clippingParents = "clippingParents"; + var viewport = "viewport"; + var popper = "popper"; + var reference = "reference"; + var variationPlacements = /* @__PURE__ */ basePlacements.reduce(function(acc, placement) { + return acc.concat([placement + "-" + start, placement + "-" + end]); + }, []); + var placements = /* @__PURE__ */ [].concat(basePlacements, [auto]).reduce(function(acc, placement) { + return acc.concat([placement, placement + "-" + start, placement + "-" + end]); + }, []); + var beforeRead = "beforeRead"; + var read = "read"; + var afterRead = "afterRead"; + var beforeMain = "beforeMain"; + var main = "main"; + var afterMain = "afterMain"; + var beforeWrite = "beforeWrite"; + var write = "write"; + var afterWrite = "afterWrite"; + var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite]; + function order(modifiers) { + var map = /* @__PURE__ */ new Map(); + var visited = /* @__PURE__ */ new Set(); + var result = []; + modifiers.forEach(function(modifier) { + map.set(modifier.name, modifier); + }); + function sort(modifier) { + visited.add(modifier.name); + var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); + requires.forEach(function(dep) { + if (!visited.has(dep)) { + var depModifier = map.get(dep); + if (depModifier) { + sort(depModifier); + } + } + }); + result.push(modifier); + } + modifiers.forEach(function(modifier) { + if (!visited.has(modifier.name)) { + sort(modifier); + } + }); + return result; + } + function orderModifiers(modifiers) { + var orderedModifiers = order(modifiers); + return modifierPhases.reduce(function(acc, phase) { + return acc.concat(orderedModifiers.filter(function(modifier) { + return modifier.phase === phase; + })); + }, []); + } + function debounce(fn) { + var pending; + return function() { + if (!pending) { + pending = new Promise(function(resolve) { + Promise.resolve().then(function() { + pending = void 0; + resolve(fn()); + }); + }); + } + return pending; + }; + } + function format(str) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + return [].concat(args).reduce(function(p, c) { + return p.replace(/%s/, c); + }, str); + } + var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s'; + var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available'; + var VALID_PROPERTIES = ["name", "enabled", "phase", "fn", "effect", "requires", "options"]; + function validateModifiers(modifiers) { + modifiers.forEach(function(modifier) { + [].concat(Object.keys(modifier), VALID_PROPERTIES).filter(function(value, index, self) { + return self.indexOf(value) === index; + }).forEach(function(key) { + switch (key) { + case "name": + if (typeof modifier.name !== "string") { + console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', '"' + String(modifier.name) + '"')); + } + break; + case "enabled": + if (typeof modifier.enabled !== "boolean") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', '"' + String(modifier.enabled) + '"')); + } + break; + case "phase": + if (modifierPhases.indexOf(modifier.phase) < 0) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(", "), '"' + String(modifier.phase) + '"')); + } + break; + case "fn": + if (typeof modifier.fn !== "function") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', '"' + String(modifier.fn) + '"')); + } + break; + case "effect": + if (modifier.effect != null && typeof modifier.effect !== "function") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', '"' + String(modifier.fn) + '"')); + } + break; + case "requires": + if (modifier.requires != null && !Array.isArray(modifier.requires)) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', '"' + String(modifier.requires) + '"')); + } + break; + case "requiresIfExists": + if (!Array.isArray(modifier.requiresIfExists)) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', '"' + String(modifier.requiresIfExists) + '"')); + } + break; + case "options": + case "data": + break; + default: + console.error('PopperJS: an invalid property has been provided to the "' + modifier.name + '" modifier, valid properties are ' + VALID_PROPERTIES.map(function(s) { + return '"' + s + '"'; + }).join(", ") + '; but "' + key + '" was provided.'); + } + modifier.requires && modifier.requires.forEach(function(requirement) { + if (modifiers.find(function(mod) { + return mod.name === requirement; + }) == null) { + console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement)); + } + }); + }); + }); + } + function uniqueBy(arr, fn) { + var identifiers = /* @__PURE__ */ new Set(); + return arr.filter(function(item) { + var identifier = fn(item); + if (!identifiers.has(identifier)) { + identifiers.add(identifier); + return true; + } + }); + } + function getBasePlacement(placement) { + return placement.split("-")[0]; + } + function mergeByName(modifiers) { + var merged = modifiers.reduce(function(merged2, current) { + var existing = merged2[current.name]; + merged2[current.name] = existing ? Object.assign({}, existing, current, { + options: Object.assign({}, existing.options, current.options), + data: Object.assign({}, existing.data, current.data) + }) : current; + return merged2; + }, {}); + return Object.keys(merged).map(function(key) { + return merged[key]; + }); + } + function getViewportRect(element) { + var win = getWindow(element); + var html = getDocumentElement(element); + var visualViewport = win.visualViewport; + var width = html.clientWidth; + var height = html.clientHeight; + var x = 0; + var y = 0; + if (visualViewport) { + width = visualViewport.width; + height = visualViewport.height; + if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { + x = visualViewport.offsetLeft; + y = visualViewport.offsetTop; + } + } + return { + width, + height, + x: x + getWindowScrollBarX(element), + y + }; + } + function getDocumentRect(element) { + var _element$ownerDocumen; + var html = getDocumentElement(element); + var winScroll = getWindowScroll(element); + var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; + var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); + var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); + var x = -winScroll.scrollLeft + getWindowScrollBarX(element); + var y = -winScroll.scrollTop; + if (getComputedStyle2(body || html).direction === "rtl") { + x += max(html.clientWidth, body ? body.clientWidth : 0) - width; + } + return { + width, + height, + x, + y + }; + } + function contains(parent, child) { + var rootNode = child.getRootNode && child.getRootNode(); + if (parent.contains(child)) { + return true; + } else if (rootNode && isShadowRoot(rootNode)) { + var next = child; + do { + if (next && parent.isSameNode(next)) { + return true; + } + next = next.parentNode || next.host; + } while (next); + } + return false; + } + function rectToClientRect(rect) { + return Object.assign({}, rect, { + left: rect.x, + top: rect.y, + right: rect.x + rect.width, + bottom: rect.y + rect.height + }); + } + function getInnerBoundingClientRect(element) { + var rect = getBoundingClientRect(element); + rect.top = rect.top + element.clientTop; + rect.left = rect.left + element.clientLeft; + rect.bottom = rect.top + element.clientHeight; + rect.right = rect.left + element.clientWidth; + rect.width = element.clientWidth; + rect.height = element.clientHeight; + rect.x = rect.left; + rect.y = rect.top; + return rect; + } + function getClientRectFromMixedType(element, clippingParent) { + return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement2(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); + } + function getClippingParents(element) { + var clippingParents2 = listScrollParents(getParentNode(element)); + var canEscapeClipping = ["absolute", "fixed"].indexOf(getComputedStyle2(element).position) >= 0; + var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element; + if (!isElement2(clipperElement)) { + return []; + } + return clippingParents2.filter(function(clippingParent) { + return isElement2(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body" && (canEscapeClipping ? getComputedStyle2(clippingParent).position !== "static" : true); + }); + } + function getClippingRect(element, boundary, rootBoundary) { + var mainClippingParents = boundary === "clippingParents" ? getClippingParents(element) : [].concat(boundary); + var clippingParents2 = [].concat(mainClippingParents, [rootBoundary]); + var firstClippingParent = clippingParents2[0]; + var clippingRect = clippingParents2.reduce(function(accRect, clippingParent) { + var rect = getClientRectFromMixedType(element, clippingParent); + accRect.top = max(rect.top, accRect.top); + accRect.right = min(rect.right, accRect.right); + accRect.bottom = min(rect.bottom, accRect.bottom); + accRect.left = max(rect.left, accRect.left); + return accRect; + }, getClientRectFromMixedType(element, firstClippingParent)); + clippingRect.width = clippingRect.right - clippingRect.left; + clippingRect.height = clippingRect.bottom - clippingRect.top; + clippingRect.x = clippingRect.left; + clippingRect.y = clippingRect.top; + return clippingRect; + } + function getVariation(placement) { + return placement.split("-")[1]; + } + function getMainAxisFromPlacement(placement) { + return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y"; + } + function computeOffsets(_ref) { + var reference2 = _ref.reference, element = _ref.element, placement = _ref.placement; + var basePlacement = placement ? getBasePlacement(placement) : null; + var variation = placement ? getVariation(placement) : null; + var commonX = reference2.x + reference2.width / 2 - element.width / 2; + var commonY = reference2.y + reference2.height / 2 - element.height / 2; + var offsets; + switch (basePlacement) { + case top: + offsets = { + x: commonX, + y: reference2.y - element.height + }; + break; + case bottom: + offsets = { + x: commonX, + y: reference2.y + reference2.height + }; + break; + case right: + offsets = { + x: reference2.x + reference2.width, + y: commonY + }; + break; + case left: + offsets = { + x: reference2.x - element.width, + y: commonY + }; + break; + default: + offsets = { + x: reference2.x, + y: reference2.y + }; + } + var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null; + if (mainAxis != null) { + var len = mainAxis === "y" ? "height" : "width"; + switch (variation) { + case start: + offsets[mainAxis] = offsets[mainAxis] - (reference2[len] / 2 - element[len] / 2); + break; + case end: + offsets[mainAxis] = offsets[mainAxis] + (reference2[len] / 2 - element[len] / 2); + break; + } + } + return offsets; + } + function getFreshSideObject() { + return { + top: 0, + right: 0, + bottom: 0, + left: 0 + }; + } + function mergePaddingObject(paddingObject) { + return Object.assign({}, getFreshSideObject(), paddingObject); + } + function expandToHashMap(value, keys) { + return keys.reduce(function(hashMap, key) { + hashMap[key] = value; + return hashMap; + }, {}); + } + function detectOverflow(state, options) { + if (options === void 0) { + options = {}; + } + var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding; + var paddingObject = mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements)); + var altContext = elementContext === popper ? reference : popper; + var popperRect = state.rects.popper; + var element = state.elements[altBoundary ? altContext : elementContext]; + var clippingClientRect = getClippingRect(isElement2(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary); + var referenceClientRect = getBoundingClientRect(state.elements.reference); + var popperOffsets2 = computeOffsets({ + reference: referenceClientRect, + element: popperRect, + strategy: "absolute", + placement + }); + var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets2)); + var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; + var overflowOffsets = { + top: clippingClientRect.top - elementClientRect.top + paddingObject.top, + bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, + left: clippingClientRect.left - elementClientRect.left + paddingObject.left, + right: elementClientRect.right - clippingClientRect.right + paddingObject.right + }; + var offsetData = state.modifiersData.offset; + if (elementContext === popper && offsetData) { + var offset2 = offsetData[placement]; + Object.keys(overflowOffsets).forEach(function(key) { + var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1; + var axis = [top, bottom].indexOf(key) >= 0 ? "y" : "x"; + overflowOffsets[key] += offset2[axis] * multiply; + }); + } + return overflowOffsets; + } + var INVALID_ELEMENT_ERROR = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element."; + var INFINITE_LOOP_ERROR = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash."; + var DEFAULT_OPTIONS = { + placement: "bottom", + modifiers: [], + strategy: "absolute" + }; + function areValidElements() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + return !args.some(function(element) { + return !(element && typeof element.getBoundingClientRect === "function"); + }); + } + function popperGenerator(generatorOptions) { + if (generatorOptions === void 0) { + generatorOptions = {}; + } + var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers2 = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2; + return function createPopper3(reference2, popper2, options) { + if (options === void 0) { + options = defaultOptions; + } + var state = { + placement: "bottom", + orderedModifiers: [], + options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), + modifiersData: {}, + elements: { + reference: reference2, + popper: popper2 + }, + attributes: {}, + styles: {} + }; + var effectCleanupFns = []; + var isDestroyed = false; + var instance = { + state, + setOptions: function setOptions(setOptionsAction) { + var options2 = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction; + cleanupModifierEffects(); + state.options = Object.assign({}, defaultOptions, state.options, options2); + state.scrollParents = { + reference: isElement2(reference2) ? listScrollParents(reference2) : reference2.contextElement ? listScrollParents(reference2.contextElement) : [], + popper: listScrollParents(popper2) + }; + var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers2, state.options.modifiers))); + state.orderedModifiers = orderedModifiers.filter(function(m) { + return m.enabled; + }); + if (true) { + var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function(_ref) { + var name = _ref.name; + return name; + }); + validateModifiers(modifiers); + if (getBasePlacement(state.options.placement) === auto) { + var flipModifier = state.orderedModifiers.find(function(_ref2) { + var name = _ref2.name; + return name === "flip"; + }); + if (!flipModifier) { + console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" ")); + } + } + var _getComputedStyle = getComputedStyle2(popper2), marginTop = _getComputedStyle.marginTop, marginRight = _getComputedStyle.marginRight, marginBottom = _getComputedStyle.marginBottom, marginLeft = _getComputedStyle.marginLeft; + if ([marginTop, marginRight, marginBottom, marginLeft].some(function(margin) { + return parseFloat(margin); + })) { + console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" ")); + } + } + runModifierEffects(); + return instance.update(); + }, + // Sync update – it will always be executed, even if not necessary. This + // is useful for low frequency updates where sync behavior simplifies the + // logic. + // For high frequency updates (e.g. `resize` and `scroll` events), always + // prefer the async Popper#update method + forceUpdate: function forceUpdate() { + if (isDestroyed) { + return; + } + var _state$elements = state.elements, reference3 = _state$elements.reference, popper3 = _state$elements.popper; + if (!areValidElements(reference3, popper3)) { + if (true) { + console.error(INVALID_ELEMENT_ERROR); + } + return; + } + state.rects = { + reference: getCompositeRect(reference3, getOffsetParent(popper3), state.options.strategy === "fixed"), + popper: getLayoutRect(popper3) + }; + state.reset = false; + state.placement = state.options.placement; + state.orderedModifiers.forEach(function(modifier) { + return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); + }); + var __debug_loops__ = 0; + for (var index = 0; index < state.orderedModifiers.length; index++) { + if (true) { + __debug_loops__ += 1; + if (__debug_loops__ > 100) { + console.error(INFINITE_LOOP_ERROR); + break; + } + } + if (state.reset === true) { + state.reset = false; + index = -1; + continue; + } + var _state$orderedModifie = state.orderedModifiers[index], fn = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name; + if (typeof fn === "function") { + state = fn({ + state, + options: _options, + name, + instance + }) || state; + } + } + }, + // Async and optimistically optimized update – it will not be executed if + // not necessary (debounced to run at most once-per-tick) + update: debounce(function() { + return new Promise(function(resolve) { + instance.forceUpdate(); + resolve(state); + }); + }), + destroy: function destroy() { + cleanupModifierEffects(); + isDestroyed = true; + } + }; + if (!areValidElements(reference2, popper2)) { + if (true) { + console.error(INVALID_ELEMENT_ERROR); + } + return instance; + } + instance.setOptions(options).then(function(state2) { + if (!isDestroyed && options.onFirstUpdate) { + options.onFirstUpdate(state2); + } + }); + function runModifierEffects() { + state.orderedModifiers.forEach(function(_ref3) { + var name = _ref3.name, _ref3$options = _ref3.options, options2 = _ref3$options === void 0 ? {} : _ref3$options, effect2 = _ref3.effect; + if (typeof effect2 === "function") { + var cleanupFn = effect2({ + state, + name, + instance, + options: options2 + }); + var noopFn = function noopFn2() { + }; + effectCleanupFns.push(cleanupFn || noopFn); + } + }); + } + function cleanupModifierEffects() { + effectCleanupFns.forEach(function(fn) { + return fn(); + }); + effectCleanupFns = []; + } + return instance; + }; + } + var passive = { + passive: true + }; + function effect$2(_ref) { + var state = _ref.state, instance = _ref.instance, options = _ref.options; + var _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? true : _options$resize; + var window2 = getWindow(state.elements.popper); + var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper); + if (scroll) { + scrollParents.forEach(function(scrollParent) { + scrollParent.addEventListener("scroll", instance.update, passive); + }); + } + if (resize) { + window2.addEventListener("resize", instance.update, passive); + } + return function() { + if (scroll) { + scrollParents.forEach(function(scrollParent) { + scrollParent.removeEventListener("scroll", instance.update, passive); + }); + } + if (resize) { + window2.removeEventListener("resize", instance.update, passive); + } + }; + } + var eventListeners = { + name: "eventListeners", + enabled: true, + phase: "write", + fn: function fn() { + }, + effect: effect$2, + data: {} + }; + function popperOffsets(_ref) { + var state = _ref.state, name = _ref.name; + state.modifiersData[name] = computeOffsets({ + reference: state.rects.reference, + element: state.rects.popper, + strategy: "absolute", + placement: state.placement + }); + } + var popperOffsets$1 = { + name: "popperOffsets", + enabled: true, + phase: "read", + fn: popperOffsets, + data: {} + }; + var unsetSides = { + top: "auto", + right: "auto", + bottom: "auto", + left: "auto" + }; + function roundOffsetsByDPR(_ref) { + var x = _ref.x, y = _ref.y; + var win = window; + var dpr = win.devicePixelRatio || 1; + return { + x: round(x * dpr) / dpr || 0, + y: round(y * dpr) / dpr || 0 + }; + } + function mapToStyles(_ref2) { + var _Object$assign2; + var popper2 = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed; + var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === "function" ? roundOffsets(offsets) : offsets, _ref3$x = _ref3.x, x = _ref3$x === void 0 ? 0 : _ref3$x, _ref3$y = _ref3.y, y = _ref3$y === void 0 ? 0 : _ref3$y; + var hasX = offsets.hasOwnProperty("x"); + var hasY = offsets.hasOwnProperty("y"); + var sideX = left; + var sideY = top; + var win = window; + if (adaptive) { + var offsetParent = getOffsetParent(popper2); + var heightProp = "clientHeight"; + var widthProp = "clientWidth"; + if (offsetParent === getWindow(popper2)) { + offsetParent = getDocumentElement(popper2); + if (getComputedStyle2(offsetParent).position !== "static" && position === "absolute") { + heightProp = "scrollHeight"; + widthProp = "scrollWidth"; + } + } + offsetParent = offsetParent; + if (placement === top || (placement === left || placement === right) && variation === end) { + sideY = bottom; + var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : ( + // $FlowFixMe[prop-missing] + offsetParent[heightProp] + ); + y -= offsetY - popperRect.height; + y *= gpuAcceleration ? 1 : -1; + } + if (placement === left || (placement === top || placement === bottom) && variation === end) { + sideX = right; + var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : ( + // $FlowFixMe[prop-missing] + offsetParent[widthProp] + ); + x -= offsetX - popperRect.width; + x *= gpuAcceleration ? 1 : -1; + } + } + var commonStyles = Object.assign({ + position + }, adaptive && unsetSides); + if (gpuAcceleration) { + var _Object$assign; + return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); + } + return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2)); + } + function computeStyles(_ref4) { + var state = _ref4.state, options = _ref4.options; + var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; + if (true) { + var transitionProperty = getComputedStyle2(state.elements.popper).transitionProperty || ""; + if (adaptive && ["transform", "top", "right", "bottom", "left"].some(function(property) { + return transitionProperty.indexOf(property) >= 0; + })) { + console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', "\n\n", 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", "\n\n", "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" ")); + } + } + var commonStyles = { + placement: getBasePlacement(state.placement), + variation: getVariation(state.placement), + popper: state.elements.popper, + popperRect: state.rects.popper, + gpuAcceleration, + isFixed: state.options.strategy === "fixed" + }; + if (state.modifiersData.popperOffsets != null) { + state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.popperOffsets, + position: state.options.strategy, + adaptive, + roundOffsets + }))); + } + if (state.modifiersData.arrow != null) { + state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.arrow, + position: "absolute", + adaptive: false, + roundOffsets + }))); + } + state.attributes.popper = Object.assign({}, state.attributes.popper, { + "data-popper-placement": state.placement + }); + } + var computeStyles$1 = { + name: "computeStyles", + enabled: true, + phase: "beforeWrite", + fn: computeStyles, + data: {} + }; + function applyStyles(_ref) { + var state = _ref.state; + Object.keys(state.elements).forEach(function(name) { + var style = state.styles[name] || {}; + var attributes = state.attributes[name] || {}; + var element = state.elements[name]; + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } + Object.assign(element.style, style); + Object.keys(attributes).forEach(function(name2) { + var value = attributes[name2]; + if (value === false) { + element.removeAttribute(name2); + } else { + element.setAttribute(name2, value === true ? "" : value); + } + }); + }); + } + function effect$1(_ref2) { + var state = _ref2.state; + var initialStyles = { + popper: { + position: state.options.strategy, + left: "0", + top: "0", + margin: "0" + }, + arrow: { + position: "absolute" + }, + reference: {} + }; + Object.assign(state.elements.popper.style, initialStyles.popper); + state.styles = initialStyles; + if (state.elements.arrow) { + Object.assign(state.elements.arrow.style, initialStyles.arrow); + } + return function() { + Object.keys(state.elements).forEach(function(name) { + var element = state.elements[name]; + var attributes = state.attributes[name] || {}; + var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); + var style = styleProperties.reduce(function(style2, property) { + style2[property] = ""; + return style2; + }, {}); + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } + Object.assign(element.style, style); + Object.keys(attributes).forEach(function(attribute) { + element.removeAttribute(attribute); + }); + }); + }; + } + var applyStyles$1 = { + name: "applyStyles", + enabled: true, + phase: "write", + fn: applyStyles, + effect: effect$1, + requires: ["computeStyles"] + }; + function distanceAndSkiddingToXY(placement, rects, offset2) { + var basePlacement = getBasePlacement(placement); + var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1; + var _ref = typeof offset2 === "function" ? offset2(Object.assign({}, rects, { + placement + })) : offset2, skidding = _ref[0], distance = _ref[1]; + skidding = skidding || 0; + distance = (distance || 0) * invertDistance; + return [left, right].indexOf(basePlacement) >= 0 ? { + x: distance, + y: skidding + } : { + x: skidding, + y: distance + }; + } + function offset(_ref2) { + var state = _ref2.state, options = _ref2.options, name = _ref2.name; + var _options$offset = options.offset, offset2 = _options$offset === void 0 ? [0, 0] : _options$offset; + var data = placements.reduce(function(acc, placement) { + acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset2); + return acc; + }, {}); + var _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y; + if (state.modifiersData.popperOffsets != null) { + state.modifiersData.popperOffsets.x += x; + state.modifiersData.popperOffsets.y += y; + } + state.modifiersData[name] = data; + } + var offset$1 = { + name: "offset", + enabled: true, + phase: "main", + requires: ["popperOffsets"], + fn: offset + }; + var hash$1 = { + left: "right", + right: "left", + bottom: "top", + top: "bottom" + }; + function getOppositePlacement(placement) { + return placement.replace(/left|right|bottom|top/g, function(matched) { + return hash$1[matched]; + }); + } + var hash = { + start: "end", + end: "start" + }; + function getOppositeVariationPlacement(placement) { + return placement.replace(/start|end/g, function(matched) { + return hash[matched]; + }); + } + function computeAutoPlacement(state, options) { + if (options === void 0) { + options = {}; + } + var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP; + var variation = getVariation(placement); + var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function(placement2) { + return getVariation(placement2) === variation; + }) : basePlacements; + var allowedPlacements = placements$1.filter(function(placement2) { + return allowedAutoPlacements.indexOf(placement2) >= 0; + }); + if (allowedPlacements.length === 0) { + allowedPlacements = placements$1; + if (true) { + console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" ")); + } + } + var overflows = allowedPlacements.reduce(function(acc, placement2) { + acc[placement2] = detectOverflow(state, { + placement: placement2, + boundary, + rootBoundary, + padding + })[getBasePlacement(placement2)]; + return acc; + }, {}); + return Object.keys(overflows).sort(function(a, b) { + return overflows[a] - overflows[b]; + }); + } + function getExpandedFallbackPlacements(placement) { + if (getBasePlacement(placement) === auto) { + return []; + } + var oppositePlacement = getOppositePlacement(placement); + return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; + } + function flip(_ref) { + var state = _ref.state, options = _ref.options, name = _ref.name; + if (state.modifiersData[name]._skip) { + return; + } + var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements; + var preferredPlacement = state.options.placement; + var basePlacement = getBasePlacement(preferredPlacement); + var isBasePlacement = basePlacement === preferredPlacement; + var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)); + var placements2 = [preferredPlacement].concat(fallbackPlacements).reduce(function(acc, placement2) { + return acc.concat(getBasePlacement(placement2) === auto ? computeAutoPlacement(state, { + placement: placement2, + boundary, + rootBoundary, + padding, + flipVariations, + allowedAutoPlacements + }) : placement2); + }, []); + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var checksMap = /* @__PURE__ */ new Map(); + var makeFallbackChecks = true; + var firstFittingPlacement = placements2[0]; + for (var i = 0; i < placements2.length; i++) { + var placement = placements2[i]; + var _basePlacement = getBasePlacement(placement); + var isStartVariation = getVariation(placement) === start; + var isVertical = [top, bottom].indexOf(_basePlacement) >= 0; + var len = isVertical ? "width" : "height"; + var overflow = detectOverflow(state, { + placement, + boundary, + rootBoundary, + altBoundary, + padding + }); + var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top; + if (referenceRect[len] > popperRect[len]) { + mainVariationSide = getOppositePlacement(mainVariationSide); + } + var altVariationSide = getOppositePlacement(mainVariationSide); + var checks = []; + if (checkMainAxis) { + checks.push(overflow[_basePlacement] <= 0); + } + if (checkAltAxis) { + checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0); + } + if (checks.every(function(check) { + return check; + })) { + firstFittingPlacement = placement; + makeFallbackChecks = false; + break; + } + checksMap.set(placement, checks); + } + if (makeFallbackChecks) { + var numberOfChecks = flipVariations ? 3 : 1; + var _loop = function _loop2(_i2) { + var fittingPlacement = placements2.find(function(placement2) { + var checks2 = checksMap.get(placement2); + if (checks2) { + return checks2.slice(0, _i2).every(function(check) { + return check; + }); + } + }); + if (fittingPlacement) { + firstFittingPlacement = fittingPlacement; + return "break"; + } + }; + for (var _i = numberOfChecks; _i > 0; _i--) { + var _ret = _loop(_i); + if (_ret === "break") break; + } + } + if (state.placement !== firstFittingPlacement) { + state.modifiersData[name]._skip = true; + state.placement = firstFittingPlacement; + state.reset = true; + } + } + var flip$1 = { + name: "flip", + enabled: true, + phase: "main", + fn: flip, + requiresIfExists: ["offset"], + data: { + _skip: false + } + }; + function getAltAxis(axis) { + return axis === "x" ? "y" : "x"; + } + function within(min$1, value, max$1) { + return max(min$1, min(value, max$1)); + } + function withinMaxClamp(min2, value, max2) { + var v = within(min2, value, max2); + return v > max2 ? max2 : v; + } + function preventOverflow(_ref) { + var state = _ref.state, options = _ref.options, name = _ref.name; + var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset; + var overflow = detectOverflow(state, { + boundary, + rootBoundary, + padding, + altBoundary + }); + var basePlacement = getBasePlacement(state.placement); + var variation = getVariation(state.placement); + var isBasePlacement = !variation; + var mainAxis = getMainAxisFromPlacement(basePlacement); + var altAxis = getAltAxis(mainAxis); + var popperOffsets2 = state.modifiersData.popperOffsets; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var tetherOffsetValue = typeof tetherOffset === "function" ? tetherOffset(Object.assign({}, state.rects, { + placement: state.placement + })) : tetherOffset; + var normalizedTetherOffsetValue = typeof tetherOffsetValue === "number" ? { + mainAxis: tetherOffsetValue, + altAxis: tetherOffsetValue + } : Object.assign({ + mainAxis: 0, + altAxis: 0 + }, tetherOffsetValue); + var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null; + var data = { + x: 0, + y: 0 + }; + if (!popperOffsets2) { + return; + } + if (checkMainAxis) { + var _offsetModifierState$; + var mainSide = mainAxis === "y" ? top : left; + var altSide = mainAxis === "y" ? bottom : right; + var len = mainAxis === "y" ? "height" : "width"; + var offset2 = popperOffsets2[mainAxis]; + var min$1 = offset2 + overflow[mainSide]; + var max$1 = offset2 - overflow[altSide]; + var additive = tether ? -popperRect[len] / 2 : 0; + var minLen = variation === start ? referenceRect[len] : popperRect[len]; + var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; + var arrowElement = state.elements.arrow; + var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { + width: 0, + height: 0 + }; + var arrowPaddingObject = state.modifiersData["arrow#persistent"] ? state.modifiersData["arrow#persistent"].padding : getFreshSideObject(); + var arrowPaddingMin = arrowPaddingObject[mainSide]; + var arrowPaddingMax = arrowPaddingObject[altSide]; + var arrowLen = within(0, referenceRect[len], arrowRect[len]); + var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis; + var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; + var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); + var clientOffset = arrowOffsetParent ? mainAxis === "y" ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; + var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0; + var tetherMin = offset2 + minOffset - offsetModifierValue - clientOffset; + var tetherMax = offset2 + maxOffset - offsetModifierValue; + var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset2, tether ? max(max$1, tetherMax) : max$1); + popperOffsets2[mainAxis] = preventedOffset; + data[mainAxis] = preventedOffset - offset2; + } + if (checkAltAxis) { + var _offsetModifierState$2; + var _mainSide = mainAxis === "x" ? top : left; + var _altSide = mainAxis === "x" ? bottom : right; + var _offset = popperOffsets2[altAxis]; + var _len = altAxis === "y" ? "height" : "width"; + var _min = _offset + overflow[_mainSide]; + var _max = _offset - overflow[_altSide]; + var isOriginSide = [top, left].indexOf(basePlacement) !== -1; + var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0; + var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis; + var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max; + var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max); + popperOffsets2[altAxis] = _preventedOffset; + data[altAxis] = _preventedOffset - _offset; + } + state.modifiersData[name] = data; + } + var preventOverflow$1 = { + name: "preventOverflow", + enabled: true, + phase: "main", + fn: preventOverflow, + requiresIfExists: ["offset"] + }; + var toPaddingObject = function toPaddingObject2(padding, state) { + padding = typeof padding === "function" ? padding(Object.assign({}, state.rects, { + placement: state.placement + })) : padding; + return mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements)); + }; + function arrow(_ref) { + var _state$modifiersData$; + var state = _ref.state, name = _ref.name, options = _ref.options; + var arrowElement = state.elements.arrow; + var popperOffsets2 = state.modifiersData.popperOffsets; + var basePlacement = getBasePlacement(state.placement); + var axis = getMainAxisFromPlacement(basePlacement); + var isVertical = [left, right].indexOf(basePlacement) >= 0; + var len = isVertical ? "height" : "width"; + if (!arrowElement || !popperOffsets2) { + return; + } + var paddingObject = toPaddingObject(options.padding, state); + var arrowRect = getLayoutRect(arrowElement); + var minProp = axis === "y" ? top : left; + var maxProp = axis === "y" ? bottom : right; + var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets2[axis] - state.rects.popper[len]; + var startDiff = popperOffsets2[axis] - state.rects.reference[axis]; + var arrowOffsetParent = getOffsetParent(arrowElement); + var clientSize = arrowOffsetParent ? axis === "y" ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0; + var centerToReference = endDiff / 2 - startDiff / 2; + var min2 = paddingObject[minProp]; + var max2 = clientSize - arrowRect[len] - paddingObject[maxProp]; + var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference; + var offset2 = within(min2, center, max2); + var axisProp = axis; + state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset2, _state$modifiersData$.centerOffset = offset2 - center, _state$modifiersData$); + } + function effect(_ref2) { + var state = _ref2.state, options = _ref2.options; + var _options$element = options.element, arrowElement = _options$element === void 0 ? "[data-popper-arrow]" : _options$element; + if (arrowElement == null) { + return; + } + if (typeof arrowElement === "string") { + arrowElement = state.elements.popper.querySelector(arrowElement); + if (!arrowElement) { + return; + } + } + if (true) { + if (!isHTMLElement(arrowElement)) { + console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', "To use an SVG arrow, wrap it in an HTMLElement that will be used as", "the arrow."].join(" ")); + } + } + if (!contains(state.elements.popper, arrowElement)) { + if (true) { + console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" ")); + } + return; + } + state.elements.arrow = arrowElement; + } + var arrow$1 = { + name: "arrow", + enabled: true, + phase: "main", + fn: arrow, + effect, + requires: ["popperOffsets"], + requiresIfExists: ["preventOverflow"] + }; + function getSideOffsets(overflow, rect, preventedOffsets) { + if (preventedOffsets === void 0) { + preventedOffsets = { + x: 0, + y: 0 + }; + } + return { + top: overflow.top - rect.height - preventedOffsets.y, + right: overflow.right - rect.width + preventedOffsets.x, + bottom: overflow.bottom - rect.height + preventedOffsets.y, + left: overflow.left - rect.width - preventedOffsets.x + }; + } + function isAnySideFullyClipped(overflow) { + return [top, right, bottom, left].some(function(side) { + return overflow[side] >= 0; + }); + } + function hide(_ref) { + var state = _ref.state, name = _ref.name; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var preventedOffsets = state.modifiersData.preventOverflow; + var referenceOverflow = detectOverflow(state, { + elementContext: "reference" + }); + var popperAltOverflow = detectOverflow(state, { + altBoundary: true + }); + var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect); + var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets); + var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets); + var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); + state.modifiersData[name] = { + referenceClippingOffsets, + popperEscapeOffsets, + isReferenceHidden, + hasPopperEscaped + }; + state.attributes.popper = Object.assign({}, state.attributes.popper, { + "data-popper-reference-hidden": isReferenceHidden, + "data-popper-escaped": hasPopperEscaped + }); + } + var hide$1 = { + name: "hide", + enabled: true, + phase: "main", + requiresIfExists: ["preventOverflow"], + fn: hide + }; + var defaultModifiers$1 = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1]; + var createPopper$1 = /* @__PURE__ */ popperGenerator({ + defaultModifiers: defaultModifiers$1 + }); + var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1]; + var createPopper2 = /* @__PURE__ */ popperGenerator({ + defaultModifiers + }); + exports.applyStyles = applyStyles$1; + exports.arrow = arrow$1; + exports.computeStyles = computeStyles$1; + exports.createPopper = createPopper2; + exports.createPopperLite = createPopper$1; + exports.defaultModifiers = defaultModifiers; + exports.detectOverflow = detectOverflow; + exports.eventListeners = eventListeners; + exports.flip = flip$1; + exports.hide = hide$1; + exports.offset = offset$1; + exports.popperGenerator = popperGenerator; + exports.popperOffsets = popperOffsets$1; + exports.preventOverflow = preventOverflow$1; + } + }); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/data.js + var elementMap = /* @__PURE__ */ new Map(); + var data_default = { + set(element, key, instance) { + if (!elementMap.has(element)) { + elementMap.set(element, /* @__PURE__ */ new Map()); + } + const instanceMap = elementMap.get(element); + if (!instanceMap.has(key) && instanceMap.size !== 0) { + console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`); + return; + } + instanceMap.set(key, instance); + }, + get(element, key) { + if (elementMap.has(element)) { + return elementMap.get(element).get(key) || null; + } + return null; + }, + remove(element, key) { + if (!elementMap.has(element)) { + return; + } + const instanceMap = elementMap.get(element); + instanceMap.delete(key); + if (instanceMap.size === 0) { + elementMap.delete(element); + } + } + }; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/index.js + var MAX_UID = 1e6; + var MILLISECONDS_MULTIPLIER = 1e3; + var TRANSITION_END = "transitionend"; + var parseSelector = (selector2) => { + if (selector2 && window.CSS && window.CSS.escape) { + selector2 = selector2.replace(/#([^\s"#']+)/g, (match, id) => `#${CSS.escape(id)}`); + } + return selector2; + }; + var toType = (object) => { + if (object === null || object === void 0) { + return `${object}`; + } + return Object.prototype.toString.call(object).match(/\s([a-z]+)/i)[1].toLowerCase(); + }; + var getUID = (prefix) => { + do { + prefix += Math.floor(Math.random() * MAX_UID); + } while (document.getElementById(prefix)); + return prefix; + }; + var getTransitionDurationFromElement = (element) => { + if (!element) { + return 0; + } + let { transitionDuration, transitionDelay } = window.getComputedStyle(element); + const floatTransitionDuration = Number.parseFloat(transitionDuration); + const floatTransitionDelay = Number.parseFloat(transitionDelay); + if (!floatTransitionDuration && !floatTransitionDelay) { + return 0; + } + transitionDuration = transitionDuration.split(",")[0]; + transitionDelay = transitionDelay.split(",")[0]; + return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; + }; + var triggerTransitionEnd = (element) => { + element.dispatchEvent(new Event(TRANSITION_END)); + }; + var isElement = (object) => { + if (!object || typeof object !== "object") { + return false; + } + if (typeof object.jquery !== "undefined") { + object = object[0]; + } + return typeof object.nodeType !== "undefined"; + }; + var getElement = (object) => { + if (isElement(object)) { + return object.jquery ? object[0] : object; + } + if (typeof object === "string" && object.length > 0) { + return document.querySelector(parseSelector(object)); + } + return null; + }; + var isVisible = (element) => { + if (!isElement(element) || element.getClientRects().length === 0) { + return false; + } + const elementIsVisible = getComputedStyle(element).getPropertyValue("visibility") === "visible"; + const closedDetails = element.closest("details:not([open])"); + if (!closedDetails) { + return elementIsVisible; + } + if (closedDetails !== element) { + const summary = element.closest("summary"); + if (summary && summary.parentNode !== closedDetails) { + return false; + } + if (summary === null) { + return false; + } + } + return elementIsVisible; + }; + var isDisabled = (element) => { + if (!element || element.nodeType !== Node.ELEMENT_NODE) { + return true; + } + if (element.classList.contains("disabled")) { + return true; + } + if (typeof element.disabled !== "undefined") { + return element.disabled; + } + return element.hasAttribute("disabled") && element.getAttribute("disabled") !== "false"; + }; + var findShadowRoot = (element) => { + if (!document.documentElement.attachShadow) { + return null; + } + if (typeof element.getRootNode === "function") { + const root = element.getRootNode(); + return root instanceof ShadowRoot ? root : null; + } + if (element instanceof ShadowRoot) { + return element; + } + if (!element.parentNode) { + return null; + } + return findShadowRoot(element.parentNode); + }; + var noop = () => { + }; + var reflow = (element) => { + element.offsetHeight; + }; + var getjQuery = () => { + if (window.jQuery && !document.body.hasAttribute("data-bs-no-jquery")) { + return window.jQuery; + } + return null; + }; + var DOMContentLoadedCallbacks = []; + var onDOMContentLoaded = (callback) => { + if (document.readyState === "loading") { + if (!DOMContentLoadedCallbacks.length) { + document.addEventListener("DOMContentLoaded", () => { + for (const callback2 of DOMContentLoadedCallbacks) { + callback2(); + } + }); + } + DOMContentLoadedCallbacks.push(callback); + } else { + callback(); + } + }; + var isRTL = () => document.documentElement.dir === "rtl"; + var defineJQueryPlugin = (plugin) => { + onDOMContentLoaded(() => { + const $ = getjQuery(); + if ($) { + const name = plugin.NAME; + const JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; + $.fn[name].noConflict = () => { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; + } + }); + }; + var execute = (possibleCallback, args = [], defaultValue = possibleCallback) => { + return typeof possibleCallback === "function" ? possibleCallback.call(...args) : defaultValue; + }; + var executeAfterTransition = (callback, transitionElement, waitForTransition = true) => { + if (!waitForTransition) { + execute(callback); + return; + } + const durationPadding = 5; + const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding; + let called = false; + const handler = ({ target }) => { + if (target !== transitionElement) { + return; + } + called = true; + transitionElement.removeEventListener(TRANSITION_END, handler); + execute(callback); + }; + transitionElement.addEventListener(TRANSITION_END, handler); + setTimeout(() => { + if (!called) { + triggerTransitionEnd(transitionElement); + } + }, emulatedDuration); + }; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/event-handler.js + var namespaceRegex = /[^.]*(?=\..*)\.|.*/; + var stripNameRegex = /\..*/; + var stripUidRegex = /::\d+$/; + var eventRegistry = {}; + var uidEvent = 1; + var customEvents = { + mouseenter: "mouseover", + mouseleave: "mouseout" + }; + var nativeEvents = /* @__PURE__ */ new Set([ + "click", + "dblclick", + "mouseup", + "mousedown", + "contextmenu", + "mousewheel", + "DOMMouseScroll", + "mouseover", + "mouseout", + "mousemove", + "selectstart", + "selectend", + "keydown", + "keypress", + "keyup", + "orientationchange", + "touchstart", + "touchmove", + "touchend", + "touchcancel", + "pointerdown", + "pointermove", + "pointerup", + "pointerleave", + "pointercancel", + "gesturestart", + "gesturechange", + "gestureend", + "focus", + "blur", + "change", + "reset", + "select", + "submit", + "focusin", + "focusout", + "load", + "unload", + "beforeunload", + "resize", + "move", + "DOMContentLoaded", + "readystatechange", + "error", + "abort", + "scroll" + ]); + function makeEventUid(element, uid) { + return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++; + } + function getElementEvents(element) { + const uid = makeEventUid(element); + element.uidEvent = uid; + eventRegistry[uid] = eventRegistry[uid] || {}; + return eventRegistry[uid]; + } + function bootstrapHandler(element, fn) { + return function handler(event) { + hydrateObj(event, { delegateTarget: element }); + if (handler.oneOff) { + EventHandler.off(element, event.type, fn); + } + return fn.apply(element, [event]); + }; + } + function bootstrapDelegationHandler(element, selector2, fn) { + return function handler(event) { + const domElements = element.querySelectorAll(selector2); + for (let { target } = event; target && target !== this; target = target.parentNode) { + for (const domElement of domElements) { + if (domElement !== target) { + continue; + } + hydrateObj(event, { delegateTarget: target }); + if (handler.oneOff) { + EventHandler.off(element, event.type, selector2, fn); + } + return fn.apply(target, [event]); + } + } + }; + } + function findHandler(events, callable, delegationSelector = null) { + return Object.values(events).find((event) => event.callable === callable && event.delegationSelector === delegationSelector); + } + function normalizeParameters(originalTypeEvent, handler, delegationFunction) { + const isDelegated = typeof handler === "string"; + const callable = isDelegated ? delegationFunction : handler || delegationFunction; + let typeEvent = getTypeEvent(originalTypeEvent); + if (!nativeEvents.has(typeEvent)) { + typeEvent = originalTypeEvent; + } + return [isDelegated, callable, typeEvent]; + } + function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) { + if (typeof originalTypeEvent !== "string" || !element) { + return; + } + let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); + if (originalTypeEvent in customEvents) { + const wrapFunction = (fn2) => { + return function(event) { + if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) { + return fn2.call(this, event); + } + }; + }; + callable = wrapFunction(callable); + } + const events = getElementEvents(element); + const handlers = events[typeEvent] || (events[typeEvent] = {}); + const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null); + if (previousFunction) { + previousFunction.oneOff = previousFunction.oneOff && oneOff; + return; + } + const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, "")); + const fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable); + fn.delegationSelector = isDelegated ? handler : null; + fn.callable = callable; + fn.oneOff = oneOff; + fn.uidEvent = uid; + handlers[uid] = fn; + element.addEventListener(typeEvent, fn, isDelegated); + } + function removeHandler(element, events, typeEvent, handler, delegationSelector) { + const fn = findHandler(events[typeEvent], handler, delegationSelector); + if (!fn) { + return; + } + element.removeEventListener(typeEvent, fn, Boolean(delegationSelector)); + delete events[typeEvent][fn.uidEvent]; + } + function removeNamespacedHandlers(element, events, typeEvent, namespace) { + const storeElementEvent = events[typeEvent] || {}; + for (const [handlerKey, event] of Object.entries(storeElementEvent)) { + if (handlerKey.includes(namespace)) { + removeHandler(element, events, typeEvent, event.callable, event.delegationSelector); + } + } + } + function getTypeEvent(event) { + event = event.replace(stripNameRegex, ""); + return customEvents[event] || event; + } + var EventHandler = { + on(element, event, handler, delegationFunction) { + addHandler(element, event, handler, delegationFunction, false); + }, + one(element, event, handler, delegationFunction) { + addHandler(element, event, handler, delegationFunction, true); + }, + off(element, originalTypeEvent, handler, delegationFunction) { + if (typeof originalTypeEvent !== "string" || !element) { + return; + } + const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); + const inNamespace = typeEvent !== originalTypeEvent; + const events = getElementEvents(element); + const storeElementEvent = events[typeEvent] || {}; + const isNamespace = originalTypeEvent.startsWith("."); + if (typeof callable !== "undefined") { + if (!Object.keys(storeElementEvent).length) { + return; + } + removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null); + return; + } + if (isNamespace) { + for (const elementEvent of Object.keys(events)) { + removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1)); + } + } + for (const [keyHandlers, event] of Object.entries(storeElementEvent)) { + const handlerKey = keyHandlers.replace(stripUidRegex, ""); + if (!inNamespace || originalTypeEvent.includes(handlerKey)) { + removeHandler(element, events, typeEvent, event.callable, event.delegationSelector); + } + } + }, + trigger(element, event, args) { + if (typeof event !== "string" || !element) { + return null; + } + const $ = getjQuery(); + const typeEvent = getTypeEvent(event); + const inNamespace = event !== typeEvent; + let jQueryEvent = null; + let bubbles = true; + let nativeDispatch = true; + let defaultPrevented = false; + if (inNamespace && $) { + jQueryEvent = $.Event(event, args); + $(element).trigger(jQueryEvent); + bubbles = !jQueryEvent.isPropagationStopped(); + nativeDispatch = !jQueryEvent.isImmediatePropagationStopped(); + defaultPrevented = jQueryEvent.isDefaultPrevented(); + } + const evt = hydrateObj(new Event(event, { bubbles, cancelable: true }), args); + if (defaultPrevented) { + evt.preventDefault(); + } + if (nativeDispatch) { + element.dispatchEvent(evt); + } + if (evt.defaultPrevented && jQueryEvent) { + jQueryEvent.preventDefault(); + } + return evt; + } + }; + function hydrateObj(obj, meta = {}) { + for (const [key, value] of Object.entries(meta)) { + try { + obj[key] = value; + } catch (e) { + Object.defineProperty(obj, key, { + configurable: true, + get() { + return value; + } + }); + } + } + return obj; + } + var event_handler_default = EventHandler; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/manipulator.js + function normalizeData(value) { + if (value === "true") { + return true; + } + if (value === "false") { + return false; + } + if (value === Number(value).toString()) { + return Number(value); + } + if (value === "" || value === "null") { + return null; + } + if (typeof value !== "string") { + return value; + } + try { + return JSON.parse(decodeURIComponent(value)); + } catch (e) { + return value; + } + } + function normalizeDataKey(key) { + return key.replace(/[A-Z]/g, (chr) => `-${chr.toLowerCase()}`); + } + var Manipulator = { + setDataAttribute(element, key, value) { + element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value); + }, + removeDataAttribute(element, key) { + element.removeAttribute(`data-bs-${normalizeDataKey(key)}`); + }, + getDataAttributes(element) { + if (!element) { + return {}; + } + const attributes = {}; + const bsKeys = Object.keys(element.dataset).filter((key) => key.startsWith("bs") && !key.startsWith("bsConfig")); + for (const key of bsKeys) { + let pureKey = key.replace(/^bs/, ""); + pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1); + attributes[pureKey] = normalizeData(element.dataset[key]); + } + return attributes; + }, + getDataAttribute(element, key) { + return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`)); + } + }; + var manipulator_default = Manipulator; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/config.js + var Config = class { + // Getters + static get Default() { + return {}; + } + static get DefaultType() { + return {}; + } + static get NAME() { + throw new Error('You have to implement the static method "NAME", for each component!'); + } + _getConfig(config) { + config = this._mergeConfigObj(config); + config = this._configAfterMerge(config); + this._typeCheckConfig(config); + return config; + } + _configAfterMerge(config) { + return config; + } + _mergeConfigObj(config, element) { + const jsonConfig = isElement(element) ? manipulator_default.getDataAttribute(element, "config") : {}; + return __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, this.constructor.Default), typeof jsonConfig === "object" ? jsonConfig : {}), isElement(element) ? manipulator_default.getDataAttributes(element) : {}), typeof config === "object" ? config : {}); + } + _typeCheckConfig(config, configTypes = this.constructor.DefaultType) { + for (const [property, expectedTypes] of Object.entries(configTypes)) { + const value = config[property]; + const valueType = isElement(value) ? "element" : toType(value); + if (!new RegExp(expectedTypes).test(valueType)) { + throw new TypeError( + `${this.constructor.NAME.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".` + ); + } + } + } + }; + var config_default = Config; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/base-component.js + var VERSION = "5.3.8"; + var BaseComponent = class extends config_default { + constructor(element, config) { + super(); + element = getElement(element); + if (!element) { + return; + } + this._element = element; + this._config = this._getConfig(config); + data_default.set(this._element, this.constructor.DATA_KEY, this); + } + // Public + dispose() { + data_default.remove(this._element, this.constructor.DATA_KEY); + event_handler_default.off(this._element, this.constructor.EVENT_KEY); + for (const propertyName of Object.getOwnPropertyNames(this)) { + this[propertyName] = null; + } + } + // Private + _queueCallback(callback, element, isAnimated = true) { + executeAfterTransition(callback, element, isAnimated); + } + _getConfig(config) { + config = this._mergeConfigObj(config, this._element); + config = this._configAfterMerge(config); + this._typeCheckConfig(config); + return config; + } + // Static + static getInstance(element) { + return data_default.get(getElement(element), this.DATA_KEY); + } + static getOrCreateInstance(element, config = {}) { + return this.getInstance(element) || new this(element, typeof config === "object" ? config : null); + } + static get VERSION() { + return VERSION; + } + static get DATA_KEY() { + return `bs.${this.NAME}`; + } + static get EVENT_KEY() { + return `.${this.DATA_KEY}`; + } + static eventName(name) { + return `${name}${this.EVENT_KEY}`; + } + }; + var base_component_default = BaseComponent; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/selector-engine.js + var getSelector = (element) => { + let selector2 = element.getAttribute("data-bs-target"); + if (!selector2 || selector2 === "#") { + let hrefAttribute = element.getAttribute("href"); + if (!hrefAttribute || !hrefAttribute.includes("#") && !hrefAttribute.startsWith(".")) { + return null; + } + if (hrefAttribute.includes("#") && !hrefAttribute.startsWith("#")) { + hrefAttribute = `#${hrefAttribute.split("#")[1]}`; + } + selector2 = hrefAttribute && hrefAttribute !== "#" ? hrefAttribute.trim() : null; + } + return selector2 ? selector2.split(",").map((sel) => parseSelector(sel)).join(",") : null; + }; + var SelectorEngine = { + find(selector2, element = document.documentElement) { + return [].concat(...Element.prototype.querySelectorAll.call(element, selector2)); + }, + findOne(selector2, element = document.documentElement) { + return Element.prototype.querySelector.call(element, selector2); + }, + children(element, selector2) { + return [].concat(...element.children).filter((child) => child.matches(selector2)); + }, + parents(element, selector2) { + const parents = []; + let ancestor = element.parentNode.closest(selector2); + while (ancestor) { + parents.push(ancestor); + ancestor = ancestor.parentNode.closest(selector2); + } + return parents; + }, + prev(element, selector2) { + let previous = element.previousElementSibling; + while (previous) { + if (previous.matches(selector2)) { + return [previous]; + } + previous = previous.previousElementSibling; + } + return []; + }, + // TODO: this is now unused; remove later along with prev() + next(element, selector2) { + let next = element.nextElementSibling; + while (next) { + if (next.matches(selector2)) { + return [next]; + } + next = next.nextElementSibling; + } + return []; + }, + focusableChildren(element) { + const focusables = [ + "a", + "button", + "input", + "textarea", + "select", + "details", + "[tabindex]", + '[contenteditable="true"]' + ].map((selector2) => `${selector2}:not([tabindex^="-"])`).join(","); + return this.find(focusables, element).filter((el) => !isDisabled(el) && isVisible(el)); + }, + getSelectorFromElement(element) { + const selector2 = getSelector(element); + if (selector2) { + return SelectorEngine.findOne(selector2) ? selector2 : null; + } + return null; + }, + getElementFromSelector(element) { + const selector2 = getSelector(element); + return selector2 ? SelectorEngine.findOne(selector2) : null; + }, + getMultipleElementsFromSelector(element) { + const selector2 = getSelector(element); + return selector2 ? SelectorEngine.find(selector2) : []; + } + }; + var selector_engine_default = SelectorEngine; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/collapse.js + var NAME = "collapse"; + var DATA_KEY = "bs.collapse"; + var EVENT_KEY = `.${DATA_KEY}`; + var DATA_API_KEY = ".data-api"; + var EVENT_SHOW = `show${EVENT_KEY}`; + var EVENT_SHOWN = `shown${EVENT_KEY}`; + var EVENT_HIDE = `hide${EVENT_KEY}`; + var EVENT_HIDDEN = `hidden${EVENT_KEY}`; + var EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`; + var CLASS_NAME_SHOW = "show"; + var CLASS_NAME_COLLAPSE = "collapse"; + var CLASS_NAME_COLLAPSING = "collapsing"; + var CLASS_NAME_COLLAPSED = "collapsed"; + var CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`; + var CLASS_NAME_HORIZONTAL = "collapse-horizontal"; + var WIDTH = "width"; + var HEIGHT = "height"; + var SELECTOR_ACTIVES = ".collapse.show, .collapse.collapsing"; + var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]'; + var Default = { + parent: null, + toggle: true + }; + var DefaultType = { + parent: "(null|element)", + toggle: "boolean" + }; + var Collapse = class _Collapse extends base_component_default { + constructor(element, config) { + super(element, config); + this._isTransitioning = false; + this._triggerArray = []; + const toggleList = selector_engine_default.find(SELECTOR_DATA_TOGGLE); + for (const elem of toggleList) { + const selector2 = selector_engine_default.getSelectorFromElement(elem); + const filterElement = selector_engine_default.find(selector2).filter((foundElement) => foundElement === this._element); + if (selector2 !== null && filterElement.length) { + this._triggerArray.push(elem); + } + } + this._initializeChildren(); + if (!this._config.parent) { + this._addAriaAndCollapsedClass(this._triggerArray, this._isShown()); + } + if (this._config.toggle) { + this.toggle(); + } + } + // Getters + static get Default() { + return Default; + } + static get DefaultType() { + return DefaultType; + } + static get NAME() { + return NAME; + } + // Public + toggle() { + if (this._isShown()) { + this.hide(); + } else { + this.show(); + } + } + show() { + if (this._isTransitioning || this._isShown()) { + return; + } + let activeChildren = []; + if (this._config.parent) { + activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter((element) => element !== this._element).map((element) => _Collapse.getOrCreateInstance(element, { toggle: false })); + } + if (activeChildren.length && activeChildren[0]._isTransitioning) { + return; + } + const startEvent = event_handler_default.trigger(this._element, EVENT_SHOW); + if (startEvent.defaultPrevented) { + return; + } + for (const activeInstance of activeChildren) { + activeInstance.hide(); + } + const dimension = this._getDimension(); + this._element.classList.remove(CLASS_NAME_COLLAPSE); + this._element.classList.add(CLASS_NAME_COLLAPSING); + this._element.style[dimension] = 0; + this._addAriaAndCollapsedClass(this._triggerArray, true); + this._isTransitioning = true; + const complete = () => { + this._isTransitioning = false; + this._element.classList.remove(CLASS_NAME_COLLAPSING); + this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW); + this._element.style[dimension] = ""; + event_handler_default.trigger(this._element, EVENT_SHOWN); + }; + const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); + const scrollSize = `scroll${capitalizedDimension}`; + this._queueCallback(complete, this._element, true); + this._element.style[dimension] = `${this._element[scrollSize]}px`; + } + hide() { + if (this._isTransitioning || !this._isShown()) { + return; + } + const startEvent = event_handler_default.trigger(this._element, EVENT_HIDE); + if (startEvent.defaultPrevented) { + return; + } + const dimension = this._getDimension(); + this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`; + reflow(this._element); + this._element.classList.add(CLASS_NAME_COLLAPSING); + this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW); + for (const trigger of this._triggerArray) { + const element = selector_engine_default.getElementFromSelector(trigger); + if (element && !this._isShown(element)) { + this._addAriaAndCollapsedClass([trigger], false); + } + } + this._isTransitioning = true; + const complete = () => { + this._isTransitioning = false; + this._element.classList.remove(CLASS_NAME_COLLAPSING); + this._element.classList.add(CLASS_NAME_COLLAPSE); + event_handler_default.trigger(this._element, EVENT_HIDDEN); + }; + this._element.style[dimension] = ""; + this._queueCallback(complete, this._element, true); + } + // Private + _isShown(element = this._element) { + return element.classList.contains(CLASS_NAME_SHOW); + } + _configAfterMerge(config) { + config.toggle = Boolean(config.toggle); + config.parent = getElement(config.parent); + return config; + } + _getDimension() { + return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT; + } + _initializeChildren() { + if (!this._config.parent) { + return; + } + const children2 = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE); + for (const element of children2) { + const selected = selector_engine_default.getElementFromSelector(element); + if (selected) { + this._addAriaAndCollapsedClass([element], this._isShown(selected)); + } + } + } + _getFirstLevelChildren(selector2) { + const children2 = selector_engine_default.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent); + return selector_engine_default.find(selector2, this._config.parent).filter((element) => !children2.includes(element)); + } + _addAriaAndCollapsedClass(triggerArray, isOpen) { + if (!triggerArray.length) { + return; + } + for (const element of triggerArray) { + element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen); + element.setAttribute("aria-expanded", isOpen); + } + } + // Static + static jQueryInterface(config) { + const _config = {}; + if (typeof config === "string" && /show|hide/.test(config)) { + _config.toggle = false; + } + return this.each(function() { + const data = _Collapse.getOrCreateInstance(this, _config); + if (typeof config === "string") { + if (typeof data[config] === "undefined") { + throw new TypeError(`No method named "${config}"`); + } + data[config](); + } + }); + } + }; + event_handler_default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function(event) { + if (event.target.tagName === "A" || event.delegateTarget && event.delegateTarget.tagName === "A") { + event.preventDefault(); + } + for (const element of selector_engine_default.getMultipleElementsFromSelector(this)) { + Collapse.getOrCreateInstance(element, { toggle: false }).toggle(); + } + }); + defineJQueryPlugin(Collapse); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/category-collapse.js + var children = document.getElementsByClassName("collapse"); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/tooltip.js + var Popper = __toESM(require_popper()); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/sanitizer.js + var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i; + var DefaultAllowlist = { + // Global attributes allowed on any supplied element below. + "*": ["class", "dir", "id", "lang", "role", ARIA_ATTRIBUTE_PATTERN], + a: ["target", "href", "title", "rel"], + area: [], + b: [], + br: [], + col: [], + code: [], + dd: [], + div: [], + dl: [], + dt: [], + em: [], + hr: [], + h1: [], + h2: [], + h3: [], + h4: [], + h5: [], + h6: [], + i: [], + img: ["src", "srcset", "alt", "title", "width", "height"], + li: [], + ol: [], + p: [], + pre: [], + s: [], + small: [], + span: [], + sub: [], + sup: [], + strong: [], + u: [], + ul: [] + }; + var uriAttributes = /* @__PURE__ */ new Set([ + "background", + "cite", + "href", + "itemtype", + "longdesc", + "poster", + "src", + "xlink:href" + ]); + var SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i; + var allowedAttribute = (attribute, allowedAttributeList) => { + const attributeName = attribute.nodeName.toLowerCase(); + if (allowedAttributeList.includes(attributeName)) { + if (uriAttributes.has(attributeName)) { + return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue)); + } + return true; + } + return allowedAttributeList.filter((attributeRegex) => attributeRegex instanceof RegExp).some((regex) => regex.test(attributeName)); + }; + function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) { + if (!unsafeHtml.length) { + return unsafeHtml; + } + if (sanitizeFunction && typeof sanitizeFunction === "function") { + return sanitizeFunction(unsafeHtml); + } + const domParser = new window.DOMParser(); + const createdDocument = domParser.parseFromString(unsafeHtml, "text/html"); + const elements = [].concat(...createdDocument.body.querySelectorAll("*")); + for (const element of elements) { + const elementName = element.nodeName.toLowerCase(); + if (!Object.keys(allowList).includes(elementName)) { + element.remove(); + continue; + } + const attributeList = [].concat(...element.attributes); + const allowedAttributes = [].concat(allowList["*"] || [], allowList[elementName] || []); + for (const attribute of attributeList) { + if (!allowedAttribute(attribute, allowedAttributes)) { + element.removeAttribute(attribute.nodeName); + } + } + } + return createdDocument.body.innerHTML; + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/template-factory.js + var NAME2 = "TemplateFactory"; + var Default2 = { + allowList: DefaultAllowlist, + content: {}, + // { selector : text , selector2 : text2 , } + extraClass: "", + html: false, + sanitize: true, + sanitizeFn: null, + template: "
" + }; + var DefaultType2 = { + allowList: "object", + content: "object", + extraClass: "(string|function)", + html: "boolean", + sanitize: "boolean", + sanitizeFn: "(null|function)", + template: "string" + }; + var DefaultContentType = { + entry: "(string|element|function|null)", + selector: "(string|element)" + }; + var TemplateFactory = class extends config_default { + constructor(config) { + super(); + this._config = this._getConfig(config); + } + // Getters + static get Default() { + return Default2; + } + static get DefaultType() { + return DefaultType2; + } + static get NAME() { + return NAME2; + } + // Public + getContent() { + return Object.values(this._config.content).map((config) => this._resolvePossibleFunction(config)).filter(Boolean); + } + hasContent() { + return this.getContent().length > 0; + } + changeContent(content2) { + this._checkContent(content2); + this._config.content = __spreadValues(__spreadValues({}, this._config.content), content2); + return this; + } + toHtml() { + const templateWrapper = document.createElement("div"); + templateWrapper.innerHTML = this._maybeSanitize(this._config.template); + for (const [selector2, text] of Object.entries(this._config.content)) { + this._setContent(templateWrapper, text, selector2); + } + const template = templateWrapper.children[0]; + const extraClass = this._resolvePossibleFunction(this._config.extraClass); + if (extraClass) { + template.classList.add(...extraClass.split(" ")); + } + return template; + } + // Private + _typeCheckConfig(config) { + super._typeCheckConfig(config); + this._checkContent(config.content); + } + _checkContent(arg) { + for (const [selector2, content2] of Object.entries(arg)) { + super._typeCheckConfig({ selector: selector2, entry: content2 }, DefaultContentType); + } + } + _setContent(template, content2, selector2) { + const templateElement = selector_engine_default.findOne(selector2, template); + if (!templateElement) { + return; + } + content2 = this._resolvePossibleFunction(content2); + if (!content2) { + templateElement.remove(); + return; + } + if (isElement(content2)) { + this._putElementInTemplate(getElement(content2), templateElement); + return; + } + if (this._config.html) { + templateElement.innerHTML = this._maybeSanitize(content2); + return; + } + templateElement.textContent = content2; + } + _maybeSanitize(arg) { + return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg; + } + _resolvePossibleFunction(arg) { + return execute(arg, [void 0, this]); + } + _putElementInTemplate(element, templateElement) { + if (this._config.html) { + templateElement.innerHTML = ""; + templateElement.append(element); + return; + } + templateElement.textContent = element.textContent; + } + }; + var template_factory_default = TemplateFactory; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/tooltip.js + var NAME3 = "tooltip"; + var DISALLOWED_ATTRIBUTES = /* @__PURE__ */ new Set(["sanitize", "allowList", "sanitizeFn"]); + var CLASS_NAME_FADE = "fade"; + var CLASS_NAME_MODAL = "modal"; + var CLASS_NAME_SHOW2 = "show"; + var SELECTOR_TOOLTIP_INNER = ".tooltip-inner"; + var SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`; + var EVENT_MODAL_HIDE = "hide.bs.modal"; + var TRIGGER_HOVER = "hover"; + var TRIGGER_FOCUS = "focus"; + var TRIGGER_CLICK = "click"; + var TRIGGER_MANUAL = "manual"; + var EVENT_HIDE2 = "hide"; + var EVENT_HIDDEN2 = "hidden"; + var EVENT_SHOW2 = "show"; + var EVENT_SHOWN2 = "shown"; + var EVENT_INSERTED = "inserted"; + var EVENT_CLICK = "click"; + var EVENT_FOCUSIN = "focusin"; + var EVENT_FOCUSOUT = "focusout"; + var EVENT_MOUSEENTER = "mouseenter"; + var EVENT_MOUSELEAVE = "mouseleave"; + var AttachmentMap = { + AUTO: "auto", + TOP: "top", + RIGHT: isRTL() ? "left" : "right", + BOTTOM: "bottom", + LEFT: isRTL() ? "right" : "left" + }; + var Default3 = { + allowList: DefaultAllowlist, + animation: true, + boundary: "clippingParents", + container: false, + customClass: "", + delay: 0, + fallbackPlacements: ["top", "right", "bottom", "left"], + html: false, + offset: [0, 6], + placement: "top", + popperConfig: null, + sanitize: true, + sanitizeFn: null, + selector: false, + template: '', + title: "", + trigger: "hover focus" + }; + var DefaultType3 = { + allowList: "object", + animation: "boolean", + boundary: "(string|element)", + container: "(string|element|boolean)", + customClass: "(string|function)", + delay: "(number|object)", + fallbackPlacements: "array", + html: "boolean", + offset: "(array|string|function)", + placement: "(string|function)", + popperConfig: "(null|object|function)", + sanitize: "boolean", + sanitizeFn: "(null|function)", + selector: "(string|boolean)", + template: "string", + title: "(string|element|function)", + trigger: "string" + }; + var Tooltip = class _Tooltip extends base_component_default { + constructor(element, config) { + if (typeof Popper === "undefined") { + throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)"); + } + super(element, config); + this._isEnabled = true; + this._timeout = 0; + this._isHovered = null; + this._activeTrigger = {}; + this._popper = null; + this._templateFactory = null; + this._newContent = null; + this.tip = null; + this._setListeners(); + if (!this._config.selector) { + this._fixTitle(); + } + } + // Getters + static get Default() { + return Default3; + } + static get DefaultType() { + return DefaultType3; + } + static get NAME() { + return NAME3; + } + // Public + enable() { + this._isEnabled = true; + } + disable() { + this._isEnabled = false; + } + toggleEnabled() { + this._isEnabled = !this._isEnabled; + } + toggle() { + if (!this._isEnabled) { + return; + } + if (this._isShown()) { + this._leave(); + return; + } + this._enter(); + } + dispose() { + clearTimeout(this._timeout); + event_handler_default.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler); + if (this._element.getAttribute("data-bs-original-title")) { + this._element.setAttribute("title", this._element.getAttribute("data-bs-original-title")); + } + this._disposePopper(); + super.dispose(); + } + show() { + if (this._element.style.display === "none") { + throw new Error("Please use show on visible elements"); + } + if (!(this._isWithContent() && this._isEnabled)) { + return; + } + const showEvent = event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_SHOW2)); + const shadowRoot = findShadowRoot(this._element); + const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element); + if (showEvent.defaultPrevented || !isInTheDom) { + return; + } + this._disposePopper(); + const tip = this._getTipElement(); + this._element.setAttribute("aria-describedby", tip.getAttribute("id")); + const { container } = this._config; + if (!this._element.ownerDocument.documentElement.contains(this.tip)) { + container.append(tip); + event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_INSERTED)); + } + this._popper = this._createPopper(tip); + tip.classList.add(CLASS_NAME_SHOW2); + if ("ontouchstart" in document.documentElement) { + for (const element of [].concat(...document.body.children)) { + event_handler_default.on(element, "mouseover", noop); + } + } + const complete = () => { + event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_SHOWN2)); + if (this._isHovered === false) { + this._leave(); + } + this._isHovered = false; + }; + this._queueCallback(complete, this.tip, this._isAnimated()); + } + hide() { + if (!this._isShown()) { + return; + } + const hideEvent = event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_HIDE2)); + if (hideEvent.defaultPrevented) { + return; + } + const tip = this._getTipElement(); + tip.classList.remove(CLASS_NAME_SHOW2); + if ("ontouchstart" in document.documentElement) { + for (const element of [].concat(...document.body.children)) { + event_handler_default.off(element, "mouseover", noop); + } + } + this._activeTrigger[TRIGGER_CLICK] = false; + this._activeTrigger[TRIGGER_FOCUS] = false; + this._activeTrigger[TRIGGER_HOVER] = false; + this._isHovered = null; + const complete = () => { + if (this._isWithActiveTrigger()) { + return; + } + if (!this._isHovered) { + this._disposePopper(); + } + this._element.removeAttribute("aria-describedby"); + event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN2)); + }; + this._queueCallback(complete, this.tip, this._isAnimated()); + } + update() { + if (this._popper) { + this._popper.update(); + } + } + // Protected + _isWithContent() { + return Boolean(this._getTitle()); + } + _getTipElement() { + if (!this.tip) { + this.tip = this._createTipElement(this._newContent || this._getContentForTemplate()); + } + return this.tip; + } + _createTipElement(content2) { + const tip = this._getTemplateFactory(content2).toHtml(); + if (!tip) { + return null; + } + tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW2); + tip.classList.add(`bs-${this.constructor.NAME}-auto`); + const tipId = getUID(this.constructor.NAME).toString(); + tip.setAttribute("id", tipId); + if (this._isAnimated()) { + tip.classList.add(CLASS_NAME_FADE); + } + return tip; + } + setContent(content2) { + this._newContent = content2; + if (this._isShown()) { + this._disposePopper(); + this.show(); + } + } + _getTemplateFactory(content2) { + if (this._templateFactory) { + this._templateFactory.changeContent(content2); + } else { + this._templateFactory = new template_factory_default(__spreadProps(__spreadValues({}, this._config), { + // the `content` var has to be after `this._config` + // to override config.content in case of popover + content: content2, + extraClass: this._resolvePossibleFunction(this._config.customClass) + })); + } + return this._templateFactory; + } + _getContentForTemplate() { + return { + [SELECTOR_TOOLTIP_INNER]: this._getTitle() + }; + } + _getTitle() { + return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute("data-bs-original-title"); + } + // Private + _initializeOnDelegatedTarget(event) { + return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig()); + } + _isAnimated() { + return this._config.animation || this.tip && this.tip.classList.contains(CLASS_NAME_FADE); + } + _isShown() { + return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW2); + } + _createPopper(tip) { + const placement = execute(this._config.placement, [this, tip, this._element]); + const attachment = AttachmentMap[placement.toUpperCase()]; + return Popper.createPopper(this._element, tip, this._getPopperConfig(attachment)); + } + _getOffset() { + const { offset } = this._config; + if (typeof offset === "string") { + return offset.split(",").map((value) => Number.parseInt(value, 10)); + } + if (typeof offset === "function") { + return (popperData) => offset(popperData, this._element); + } + return offset; + } + _resolvePossibleFunction(arg) { + return execute(arg, [this._element, this._element]); + } + _getPopperConfig(attachment) { + const defaultBsPopperConfig = { + placement: attachment, + modifiers: [ + { + name: "flip", + options: { + fallbackPlacements: this._config.fallbackPlacements + } + }, + { + name: "offset", + options: { + offset: this._getOffset() + } + }, + { + name: "preventOverflow", + options: { + boundary: this._config.boundary + } + }, + { + name: "arrow", + options: { + element: `.${this.constructor.NAME}-arrow` + } + }, + { + name: "preSetPlacement", + enabled: true, + phase: "beforeMain", + fn: (data) => { + this._getTipElement().setAttribute("data-popper-placement", data.state.placement); + } + } + ] + }; + return __spreadValues(__spreadValues({}, defaultBsPopperConfig), execute(this._config.popperConfig, [void 0, defaultBsPopperConfig])); + } + _setListeners() { + const triggers = this._config.trigger.split(" "); + for (const trigger of triggers) { + if (trigger === "click") { + event_handler_default.on(this._element, this.constructor.eventName(EVENT_CLICK), this._config.selector, (event) => { + const context = this._initializeOnDelegatedTarget(event); + context._activeTrigger[TRIGGER_CLICK] = !(context._isShown() && context._activeTrigger[TRIGGER_CLICK]); + context.toggle(); + }); + } else if (trigger !== TRIGGER_MANUAL) { + const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN); + const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT); + event_handler_default.on(this._element, eventIn, this._config.selector, (event) => { + const context = this._initializeOnDelegatedTarget(event); + context._activeTrigger[event.type === "focusin" ? TRIGGER_FOCUS : TRIGGER_HOVER] = true; + context._enter(); + }); + event_handler_default.on(this._element, eventOut, this._config.selector, (event) => { + const context = this._initializeOnDelegatedTarget(event); + context._activeTrigger[event.type === "focusout" ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget); + context._leave(); + }); + } + } + this._hideModalHandler = () => { + if (this._element) { + this.hide(); + } + }; + event_handler_default.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler); + } + _fixTitle() { + const title = this._element.getAttribute("title"); + if (!title) { + return; + } + if (!this._element.getAttribute("aria-label") && !this._element.textContent.trim()) { + this._element.setAttribute("aria-label", title); + } + this._element.setAttribute("data-bs-original-title", title); + this._element.removeAttribute("title"); + } + _enter() { + if (this._isShown() || this._isHovered) { + this._isHovered = true; + return; + } + this._isHovered = true; + this._setTimeout(() => { + if (this._isHovered) { + this.show(); + } + }, this._config.delay.show); + } + _leave() { + if (this._isWithActiveTrigger()) { + return; + } + this._isHovered = false; + this._setTimeout(() => { + if (!this._isHovered) { + this.hide(); + } + }, this._config.delay.hide); + } + _setTimeout(handler, timeout) { + clearTimeout(this._timeout); + this._timeout = setTimeout(handler, timeout); + } + _isWithActiveTrigger() { + return Object.values(this._activeTrigger).includes(true); + } + _getConfig(config) { + const dataAttributes = manipulator_default.getDataAttributes(this._element); + for (const dataAttribute of Object.keys(dataAttributes)) { + if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) { + delete dataAttributes[dataAttribute]; + } + } + config = __spreadValues(__spreadValues({}, dataAttributes), typeof config === "object" && config ? config : {}); + config = this._mergeConfigObj(config); + config = this._configAfterMerge(config); + this._typeCheckConfig(config); + return config; + } + _configAfterMerge(config) { + config.container = config.container === false ? document.body : getElement(config.container); + if (typeof config.delay === "number") { + config.delay = { + show: config.delay, + hide: config.delay + }; + } + if (typeof config.title === "number") { + config.title = config.title.toString(); + } + if (typeof config.content === "number") { + config.content = config.content.toString(); + } + return config; + } + _getDelegateConfig() { + const config = {}; + for (const [key, value] of Object.entries(this._config)) { + if (this.constructor.Default[key] !== value) { + config[key] = value; + } + } + config.selector = false; + config.trigger = "manual"; + return config; + } + _disposePopper() { + if (this._popper) { + this._popper.destroy(); + this._popper = null; + } + if (this.tip) { + this.tip.remove(); + this.tip = null; + } + } + // Static + static jQueryInterface(config) { + return this.each(function() { + const data = _Tooltip.getOrCreateInstance(this, config); + if (typeof config !== "string") { + return; + } + if (typeof data[config] === "undefined") { + throw new TypeError(`No method named "${config}"`); + } + data[config](); + }); + } + }; + defineJQueryPlugin(Tooltip); + var tooltip_default = Tooltip; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/clipboard.js + var clipboardSelector = ".code-header>button"; + var ICON_DEFAULT = "far fa-clipboard"; + var ICON_SUCCESS = "fas fa-check"; + var ATTR_TIMEOUT = "timeout"; + var ATTR_TITLE_SUCCEED = "data-title-succeed"; + var ATTR_TITLE_ORIGIN = "data-bs-original-title"; + var TIMEOUT = 2e3; + function isLocked(node) { + if (node.hasAttribute(ATTR_TIMEOUT)) { + let timeout = node.getAttribute(ATTR_TIMEOUT); + if (Number(timeout) > Date.now()) { + return true; + } + } + return false; + } + function lock(node) { + node.setAttribute(ATTR_TIMEOUT, Date.now() + TIMEOUT); + } + function unlock(node) { + node.removeAttribute(ATTR_TIMEOUT); + } + function showTooltip(btn) { + const succeedTitle = btn.getAttribute(ATTR_TITLE_SUCCEED); + btn.setAttribute(ATTR_TITLE_ORIGIN, succeedTitle); + tooltip_default.getInstance(btn).show(); + } + function hideTooltip(btn) { + tooltip_default.getInstance(btn).hide(); + btn.removeAttribute(ATTR_TITLE_ORIGIN); + } + function setSuccessIcon(btn) { + const icon = btn.children[0]; + icon.setAttribute("class", ICON_SUCCESS); + } + function resumeIcon(btn) { + const icon = btn.children[0]; + icon.setAttribute("class", ICON_DEFAULT); + } + function setCodeClipboard() { + const clipboardList = document.querySelectorAll(clipboardSelector); + if (clipboardList.length === 0) { + return; + } + const clipboard = new ClipboardJS(clipboardSelector, { + target: (trigger) => { + const codeBlock = trigger.parentNode.nextElementSibling; + return codeBlock.querySelectorAll("code")[1]; + } + }); + [...clipboardList].map( + (elem) => new tooltip_default(elem, { + placement: "left" + }) + ); + clipboard.on("success", (e) => { + const trigger = e.trigger; + e.clearSelection(); + if (isLocked(trigger)) { + return; + } + setSuccessIcon(trigger); + showTooltip(trigger); + lock(trigger); + setTimeout(() => { + hideTooltip(trigger); + resumeIcon(trigger); + unlock(trigger); + }, TIMEOUT); + }); + } + function setLinkClipboard() { + const btnCopyLink = document.getElementById("copy-link"); + if (btnCopyLink === null) { + return; + } + btnCopyLink.addEventListener("click", (e) => { + const target = e.target; + if (isLocked(target)) { + return; + } + navigator.clipboard.writeText(window.location.href).then(() => { + const defaultTitle = target.getAttribute(ATTR_TITLE_ORIGIN); + const succeedTitle = target.getAttribute(ATTR_TITLE_SUCCEED); + target.setAttribute(ATTR_TITLE_ORIGIN, succeedTitle); + tooltip_default.getInstance(target).show(); + lock(target); + setTimeout(() => { + target.setAttribute(ATTR_TITLE_ORIGIN, defaultTitle); + unlock(target); + }, TIMEOUT); + }); + }); + btnCopyLink.addEventListener("mouseleave", (e) => { + tooltip_default.getInstance(e.target).hide(); + }); + } + function initClipboard() { + setCodeClipboard(); + setLinkClipboard(); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/img-loading.js + var ATTR_DATA_SRC = "data-src"; + var ATTR_DATA_LQIP = "data-lqip"; + var cover = { + SHIMMER: "shimmer", + BLUR: "blur" + }; + function removeCover(clzss) { + this.parentElement.classList.remove(clzss); + } + function handleImage() { + if (!this.complete) { + return; + } + if (this.hasAttribute(ATTR_DATA_LQIP)) { + removeCover.call(this, cover.BLUR); + } else { + removeCover.call(this, cover.SHIMMER); + } + } + function switchLQIP() { + const src = this.getAttribute(ATTR_DATA_SRC); + this.setAttribute("src", encodeURI(src)); + this.removeAttribute(ATTR_DATA_SRC); + } + function loadImg() { + const images = document.querySelectorAll("article img"); + if (images.length === 0) { + return; + } + images.forEach((img) => { + img.addEventListener("load", handleImage); + }); + document.querySelectorAll('article img[loading="lazy"]').forEach((img) => { + if (img.complete) { + removeCover.call(img, cover.SHIMMER); + } + }); + const lqips = document.querySelectorAll( + `article img[${ATTR_DATA_LQIP}="true"]` + ); + if (lqips.length) { + lqips.forEach((lqip) => { + switchLQIP.call(lqip); + }); + } + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/img-popup.js + var lightImages = ".popup:not(.dark)"; + var darkImages = ".popup:not(.light)"; + var selector = lightImages; + function updateImages(current, reverse) { + if (selector === lightImages) { + selector = darkImages; + } else { + selector = lightImages; + } + if (reverse === null) { + reverse = GLightbox({ selector: `${selector}` }); + } + [current, reverse] = [reverse, current]; + } + function imgPopup() { + if (document.querySelector(".popup") === null) { + return; + } + const hasDualImages = !(document.querySelector(".popup.light") === null && document.querySelector(".popup.dark") === null); + if (Theme.visualState === Theme.DARK) { + selector = darkImages; + } + let current = GLightbox({ selector: `${selector}` }); + if (hasDualImages && Theme.switchable) { + let reverse = null; + window.addEventListener("message", (event) => { + if (event.source === window && event.data && event.data.id === Theme.ID) { + updateImages(current, reverse); + } + }); + } + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/toc/toc-mobile.js + var $tocBar = document.getElementById("toc-bar"); + var $soloTrigger = document.getElementById("toc-solo-trigger"); + var $triggers = document.getElementsByClassName("toc-trigger"); + var $popup = document.getElementById("toc-popup"); + var $btnClose = document.getElementById("toc-popup-close"); + var SCROLL_LOCK = "overflow-hidden"; + var CLOSING = "closing"; + var _invisible, _barHeight; + var _TocMobile = class _TocMobile { + static initBar() { + const observer = new IntersectionObserver( + (entries) => { + entries.forEach((entry) => { + $tocBar.classList.toggle("invisible", entry.isIntersecting); + }); + }, + { rootMargin: `-${__privateGet(this, _barHeight)}px 0px 0px 0px` } + ); + observer.observe($soloTrigger); + __privateSet(this, _invisible, false); + } + static listenAnchors() { + const $anchors = document.getElementsByClassName("toc-link"); + [...$anchors].forEach((anchor) => { + anchor.onclick = () => this.hidePopup(); + }); + } + static refresh() { + if (__privateGet(this, _invisible)) { + this.initComponents(); + } + tocbot.refresh(this.options); + this.listenAnchors(); + } + static get popupOpened() { + return $popup.open; + } + static showPopup() { + this.lockScroll(true); + $popup.showModal(); + const activeItem = $popup.querySelector("li.is-active-li"); + activeItem.scrollIntoView({ block: "center" }); + } + static hidePopup() { + $popup.toggleAttribute(CLOSING); + $popup.addEventListener( + "animationend", + () => { + $popup.toggleAttribute(CLOSING); + $popup.close(); + }, + { once: true } + ); + this.lockScroll(false); + } + static lockScroll(enable) { + document.documentElement.classList.toggle(SCROLL_LOCK, enable); + document.body.classList.toggle(SCROLL_LOCK, enable); + } + static clickBackdrop(event) { + if ($popup.hasAttribute(CLOSING)) { + return; + } + const rect = event.target.getBoundingClientRect(); + if (event.clientX < rect.left || event.clientX > rect.right || event.clientY < rect.top || event.clientY > rect.bottom) { + this.hidePopup(); + } + } + static initComponents() { + this.initBar(); + [...$triggers].forEach((trigger) => { + trigger.onclick = () => this.showPopup(); + }); + $popup.onclick = (e) => this.clickBackdrop(e); + $btnClose.onclick = () => this.hidePopup(); + $popup.oncancel = (e) => { + e.preventDefault(); + this.hidePopup(); + }; + } + static init() { + tocbot.init(this.options); + this.listenAnchors(); + this.initComponents(); + } + }; + _invisible = new WeakMap(); + _barHeight = new WeakMap(); + __privateAdd(_TocMobile, _invisible, true); + __privateAdd(_TocMobile, _barHeight, 16 * 3); + // 3rem + __publicField(_TocMobile, "options", { + tocSelector: "#toc-popup-content", + contentSelector: ".content", + ignoreSelector: "[data-toc-skip]", + headingSelector: "h2, h3, h4", + orderedList: false, + scrollSmooth: false, + collapseDepth: 4, + headingsOffset: __privateGet(_TocMobile, _barHeight) + }); + var TocMobile = _TocMobile; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/toc/toc-desktop.js + var TocDesktop = class { + static refresh() { + tocbot.refresh(this.options); + } + static init() { + tocbot.init(this.options); + } + }; + /* Tocbot options Ref: https://github.com/tscanlin/tocbot#usage */ + __publicField(TocDesktop, "options", { + tocSelector: "#toc", + contentSelector: ".content", + ignoreSelector: "[data-toc-skip]", + headingSelector: "h2, h3, h4", + orderedList: false, + scrollSmooth: false, + headingsOffset: 16 * 2 + // 2rem + }); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/toc.js + var desktopMode = matchMedia("(min-width: 1200px)"); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/mermaid.js + var MERMAID = "mermaid"; + var themeMapper = Theme.getThemeMapper("default", "dark"); + function refreshTheme(event) { + if (event.source === window && event.data && event.data.id === Theme.ID) { + const mermaidList = document.getElementsByClassName(MERMAID); + [...mermaidList].forEach((elem) => { + const svgCode = elem.previousSibling.children.item(0).textContent; + elem.textContent = svgCode; + elem.removeAttribute("data-processed"); + }); + const newTheme = themeMapper[Theme.visualState]; + mermaid.initialize({ theme: newTheme }); + mermaid.init(null, `.${MERMAID}`); + } + } + function setNode(elem) { + const svgCode = elem.textContent; + const backup = elem.parentElement; + backup.classList.add("d-none"); + const mermaid2 = document.createElement("pre"); + mermaid2.classList.add(MERMAID); + const text = document.createTextNode(svgCode); + mermaid2.appendChild(text); + backup.after(mermaid2); + } + function loadMermaid() { + if (typeof mermaid === "undefined" || typeof mermaid.initialize !== "function") { + return; + } + const initTheme = themeMapper[Theme.visualState]; + let mermaidConf = { + theme: initTheme + }; + const basicList = document.getElementsByClassName("language-mermaid"); + [...basicList].forEach(setNode); + mermaid.initialize(mermaidConf); + if (Theme.switchable) { + window.addEventListener("message", refreshTheme); + } + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/mode-toggle.js + var $toggle = document.getElementById("mode-toggle"); + function modeWatcher() { + if (!$toggle) { + return; + } + $toggle.addEventListener("click", () => { + Theme.flip(); + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/back-to-top.js + function back2top() { + const btn = document.getElementById("back-to-top"); + window.addEventListener("scroll", () => { + if (window.scrollY > 50) { + btn.classList.add("show"); + } else { + btn.classList.remove("show"); + } + }); + btn.addEventListener("click", () => { + window.scrollTo({ top: 0 }); + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/tooltip-loader.js + function loadTooptip() { + const tooltipTriggerList = document.querySelectorAll( + '[data-bs-toggle="tooltip"]' + ); + [...tooltipTriggerList].map( + (tooltipTriggerEl) => new tooltip_default(tooltipTriggerEl) + ); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/layouts/basic.js + function basic() { + modeWatcher(); + back2top(); + loadTooptip(); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/layouts/sidebar.js + var ATTR_DISPLAY = "sidebar-display"; + var $sidebar = document.getElementById("sidebar"); + var $trigger = document.getElementById("sidebar-trigger"); + var $mask = document.getElementById("mask"); + var _isExpanded; + var SidebarUtil = class { + static toggle() { + __privateSet(this, _isExpanded, !__privateGet(this, _isExpanded)); + document.body.toggleAttribute(ATTR_DISPLAY, __privateGet(this, _isExpanded)); + $sidebar.classList.toggle("z-2", __privateGet(this, _isExpanded)); + $mask.classList.toggle("d-none", !__privateGet(this, _isExpanded)); + } + }; + _isExpanded = new WeakMap(); + __privateAdd(SidebarUtil, _isExpanded, false); + function initSidebar() { + $trigger.onclick = $mask.onclick = () => SidebarUtil.toggle(); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/search-display.js + var btnSbTrigger = document.getElementById("sidebar-trigger"); + var btnSearchTrigger = document.getElementById("search-trigger"); + var btnCancel = document.getElementById("search-cancel"); + var content = document.querySelectorAll("#main-wrapper>.container>.row"); + var topbarTitle = document.getElementById("topbar-title"); + var search = document.getElementById("search"); + var resultWrapper = document.getElementById("search-result-wrapper"); + var results = document.getElementById("search-results"); + var input = document.getElementById("search-input"); + var hints = document.getElementById("search-hints"); + var LOADED = "d-block"; + var UNLOADED = "d-none"; + var FOCUS = "input-focus"; + var FLEX = "d-flex"; + var MobileSearchBar = class { + static on() { + btnSbTrigger.classList.add(UNLOADED); + topbarTitle.classList.add(UNLOADED); + btnSearchTrigger.classList.add(UNLOADED); + search.classList.add(FLEX); + btnCancel.classList.add(LOADED); + } + static off() { + btnCancel.classList.remove(LOADED); + search.classList.remove(FLEX); + btnSbTrigger.classList.remove(UNLOADED); + topbarTitle.classList.remove(UNLOADED); + btnSearchTrigger.classList.remove(UNLOADED); + } + }; + var ResultSwitch = class { + static on() { + if (!this.resultVisible) { + resultWrapper.classList.remove(UNLOADED); + content.forEach((el) => { + el.classList.add(UNLOADED); + }); + this.resultVisible = true; + } + } + static off() { + if (this.resultVisible) { + results.innerHTML = ""; + if (hints.classList.contains(UNLOADED)) { + hints.classList.remove(UNLOADED); + } + resultWrapper.classList.add(UNLOADED); + content.forEach((el) => { + el.classList.remove(UNLOADED); + }); + input.textContent = ""; + this.resultVisible = false; + } + } + }; + __publicField(ResultSwitch, "resultVisible", false); + function isMobileView() { + return btnCancel.classList.contains(LOADED); + } + function displaySearch() { + btnSearchTrigger.addEventListener("click", () => { + MobileSearchBar.on(); + ResultSwitch.on(); + input.focus(); + }); + btnCancel.addEventListener("click", () => { + MobileSearchBar.off(); + ResultSwitch.off(); + }); + input.addEventListener("focus", () => { + search.classList.add(FOCUS); + }); + input.addEventListener("focusout", () => { + search.classList.remove(FOCUS); + }); + input.addEventListener("input", () => { + if (input.value === "") { + if (isMobileView()) { + hints.classList.remove(UNLOADED); + } else { + ResultSwitch.off(); + } + } else { + ResultSwitch.on(); + if (isMobileView()) { + hints.classList.add(UNLOADED); + } + } + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/layouts/topbar.js + function initTopbar() { + displaySearch(); + } + + // + loadImg(); + imgPopup(); + initSidebar(); + initTopbar(); + initClipboard(); + loadMermaid(); + basic(); +})(); diff --git a/public/js/post.js b/public/js/post.js index 6bcfe6d..c15e0b9 100644 --- a/public/js/post.js +++ b/public/js/post.js @@ -1 +1,3643 @@ -(()=>{var Kn=Object.create;var ge=Object.defineProperty,Qn=Object.defineProperties,Xn=Object.getOwnPropertyDescriptor,Jn=Object.getOwnPropertyDescriptors,Zn=Object.getOwnPropertyNames,Sr=Object.getOwnPropertySymbols,to=Object.getPrototypeOf,xr=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable;var Cr=e=>{throw TypeError(e)};var me=(e,t,r)=>t in e?ge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N=(e,t)=>{for(var r in t||(t={}))xr.call(t,r)&&me(e,r,t[r]);if(Sr)for(var r of Sr(t))eo.call(t,r)&&me(e,r,t[r]);return e},Lr=(e,t)=>Qn(e,Jn(t));var ro=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var no=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Zn(t))!xr.call(e,o)&&o!==r&&ge(e,o,{get:()=>t[o],enumerable:!(n=Xn(t,o))||n.enumerable});return e};var oo=(e,t,r)=>(r=e!=null?Kn(to(e)):{},no(t||!e||!e.__esModule?ge(r,"default",{value:e,enumerable:!0}):r,e));var ut=(e,t,r)=>me(e,typeof t!="symbol"?t+"":t,r),Dr=(e,t,r)=>t.has(e)||Cr("Cannot "+r);var U=(e,t,r)=>(Dr(e,t,"read from private field"),r?r.call(e):t.get(e)),St=(e,t,r)=>t.has(e)?Cr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Wt=(e,t,r,n)=>(Dr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var vn=ro(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});function H(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function pt(e){var t=H(e).Element;return e instanceof t||e instanceof Element}function k(e){var t=H(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function en(e){if(typeof ShadowRoot=="undefined")return!1;var t=H(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var st=Math.max,te=Math.min,dt=Math.round;function ht(e,t){t===void 0&&(t=!1);var r=e.getBoundingClientRect(),n=1,o=1;if(k(e)&&t){var s=e.offsetHeight,i=e.offsetWidth;i>0&&(n=dt(r.width)/i||1),s>0&&(o=dt(r.height)/s||1)}return{width:r.width/n,height:r.height/o,top:r.top/o,right:r.right/n,bottom:r.bottom/o,left:r.left/n,x:r.left/n,y:r.top/o}}function Re(e){var t=H(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function Mo(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Ro(e){return e===H(e)||!k(e)?Re(e):Mo(e)}function q(e){return e?(e.nodeName||"").toLowerCase():null}function J(e){return((pt(e)?e.ownerDocument:e.document)||window.document).documentElement}function ke(e){return ht(J(e)).left+Re(e).scrollLeft}function W(e){return H(e).getComputedStyle(e)}function $e(e){var t=W(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function ko(e){var t=e.getBoundingClientRect(),r=dt(t.width)/e.offsetWidth||1,n=dt(t.height)/e.offsetHeight||1;return r!==1||n!==1}function $o(e,t,r){r===void 0&&(r=!1);var n=k(t),o=k(t)&&ko(t),s=J(t),i=ht(e,o),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((q(t)!=="body"||$e(s))&&(a=Ro(t)),k(t)?(c=ht(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=ke(s))),{x:i.left+a.scrollLeft-c.x,y:i.top+a.scrollTop-c.y,width:i.width,height:i.height}}function Be(e){var t=ht(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function ee(e){return q(e)==="html"?e:e.assignedSlot||e.parentNode||(en(e)?e.host:null)||J(e)}function rn(e){return["html","body","#document"].indexOf(q(e))>=0?e.ownerDocument.body:k(e)&&$e(e)?e:rn(ee(e))}function Dt(e,t){var r;t===void 0&&(t=[]);var n=rn(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),s=H(n),i=o?[s].concat(s.visualViewport||[],$e(n)?n:[]):n,a=t.concat(i);return o?a:a.concat(Dt(ee(i)))}function Bo(e){return["table","td","th"].indexOf(q(e))>=0}function Ur(e){return!k(e)||W(e).position==="fixed"?null:e.offsetParent}function jo(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,r=navigator.userAgent.indexOf("Trident")!==-1;if(r&&k(e)){var n=W(e);if(n.position==="fixed")return null}for(var o=ee(e);k(o)&&["html","body"].indexOf(q(o))<0;){var s=W(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function Pt(e){for(var t=H(e),r=Ur(e);r&&Bo(r)&&W(r).position==="static";)r=Ur(r);return r&&(q(r)==="html"||q(r)==="body"&&W(r).position==="static")?t:r||jo(e)||t}var I="top",$="bottom",B="right",P="left",je="auto",Mt=[I,$,B,P],mt="start",It="end",Fo="clippingParents",nn="viewport",Lt="popper",Ho="reference",Yr=Mt.reduce(function(e,t){return e.concat([t+"-"+mt,t+"-"+It])},[]),on=[].concat(Mt,[je]).reduce(function(e,t){return e.concat([t,t+"-"+mt,t+"-"+It])},[]),Vo="beforeRead",qo="read",Wo="afterRead",zo="beforeMain",Uo="main",Yo="afterMain",Go="beforeWrite",Ko="write",Qo="afterWrite",Xo=[Vo,qo,Wo,zo,Uo,Yo,Go,Ko,Qo];function Jo(e){var t=new Map,r=new Set,n=[];e.forEach(function(s){t.set(s.name,s)});function o(s){r.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(a){if(!r.has(a)){var c=t.get(a);c&&o(c)}}),n.push(s)}return e.forEach(function(s){r.has(s.name)||o(s)}),n}function Zo(e){var t=Jo(e);return Xo.reduce(function(r,n){return r.concat(t.filter(function(o){return o.phase===n}))},[])}function ti(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function V(e){return e.split("-")[0]}function ei(e){var t=e.reduce(function(r,n){var o=r[n.name];return r[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}function ri(e){var t=H(e),r=J(e),n=t.visualViewport,o=r.clientWidth,s=r.clientHeight,i=0,a=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(i=n.offsetLeft,a=n.offsetTop)),{width:o,height:s,x:i+ke(e),y:a}}function ni(e){var t,r=J(e),n=Re(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=st(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=st(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+ke(e),c=-n.scrollTop;return W(o||r).direction==="rtl"&&(a+=st(r.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:a,y:c}}function sn(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&en(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Me(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function oi(e){var t=ht(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function Gr(e,t){return t===nn?Me(ri(e)):pt(t)?oi(t):Me(ni(J(e)))}function ii(e){var t=Dt(ee(e)),r=["absolute","fixed"].indexOf(W(e).position)>=0,n=r&&k(e)?Pt(e):e;return pt(n)?t.filter(function(o){return pt(o)&&sn(o,n)&&q(o)!=="body"&&(r?W(o).position!=="static":!0)}):[]}function si(e,t,r){var n=t==="clippingParents"?ii(e):[].concat(t),o=[].concat(n,[r]),s=o[0],i=o.reduce(function(a,c){var u=Gr(e,c);return a.top=st(u.top,a.top),a.right=te(u.right,a.right),a.bottom=te(u.bottom,a.bottom),a.left=st(u.left,a.left),a},Gr(e,s));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}function gt(e){return e.split("-")[1]}function Fe(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function an(e){var t=e.reference,r=e.element,n=e.placement,o=n?V(n):null,s=n?gt(n):null,i=t.x+t.width/2-r.width/2,a=t.y+t.height/2-r.height/2,c;switch(o){case I:c={x:i,y:t.y-r.height};break;case $:c={x:i,y:t.y+t.height};break;case B:c={x:t.x+t.width,y:a};break;case P:c={x:t.x-r.width,y:a};break;default:c={x:t.x,y:t.y}}var u=o?Fe(o):null;if(u!=null){var l=u==="y"?"height":"width";switch(s){case mt:c[u]=c[u]-(t[l]/2-r[l]/2);break;case It:c[u]=c[u]+(t[l]/2-r[l]/2);break}}return c}function cn(){return{top:0,right:0,bottom:0,left:0}}function ln(e){return Object.assign({},cn(),e)}function un(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}function vt(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=n===void 0?e.placement:n,s=r.boundary,i=s===void 0?Fo:s,a=r.rootBoundary,c=a===void 0?nn:a,u=r.elementContext,l=u===void 0?Lt:u,f=r.altBoundary,g=f===void 0?!1:f,p=r.padding,h=p===void 0?0:p,m=ln(typeof h!="number"?h:un(h,Mt)),d=l===Lt?Ho:Lt,w=e.rects.popper,A=e.elements[g?d:l],T=si(pt(A)?A:A.contextElement||J(e.elements.popper),i,c),v=ht(e.elements.reference),E=an({reference:v,element:w,strategy:"absolute",placement:o}),b=Me(Object.assign({},w,E)),y=l===Lt?b:v,O={top:T.top-y.top+m.top,bottom:y.bottom-T.bottom+m.bottom,left:T.left-y.left+m.left,right:y.right-T.right+m.right},x=e.modifiersData.offset;if(l===Lt&&x){var C=x[o];Object.keys(O).forEach(function(_){var L=[B,$].indexOf(_)>=0?1:-1,rt=[I,$].indexOf(_)>=0?"y":"x";O[_]+=C[rt]*L})}return O}var Kr={placement:"bottom",modifiers:[],strategy:"absolute"};function Qr(){for(var e=arguments.length,t=new Array(e),r=0;r=0?-1:1,s=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,i=s[0],a=s[1];return i=i||0,a=(a||0)*o,[P,B].indexOf(n)>=0?{x:a,y:i}:{x:i,y:a}}function mi(e){var t=e.state,r=e.options,n=e.name,o=r.offset,s=o===void 0?[0,0]:o,i=on.reduce(function(l,f){return l[f]=hi(f,t.rects,s),l},{}),a=i[t.placement],c=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=i}var fn={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:mi},gi={left:"right",right:"left",bottom:"top",top:"bottom"};function Zt(e){return e.replace(/left|right|bottom|top/g,function(t){return gi[t]})}var vi={start:"end",end:"start"};function Jr(e){return e.replace(/start|end/g,function(t){return vi[t]})}function bi(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=r.boundary,s=r.rootBoundary,i=r.padding,a=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?on:c,l=gt(n),f=l?a?Yr:Yr.filter(function(h){return gt(h)===l}):Mt,g=f.filter(function(h){return u.indexOf(h)>=0});g.length===0&&(g=f);var p=g.reduce(function(h,m){return h[m]=vt(e,{placement:m,boundary:o,rootBoundary:s,padding:i})[V(m)],h},{});return Object.keys(p).sort(function(h,m){return p[h]-p[m]})}function yi(e){if(V(e)===je)return[];var t=Zt(e);return[Jr(e),t,Jr(t)]}function Ei(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,s=o===void 0?!0:o,i=r.altAxis,a=i===void 0?!0:i,c=r.fallbackPlacements,u=r.padding,l=r.boundary,f=r.rootBoundary,g=r.altBoundary,p=r.flipVariations,h=p===void 0?!0:p,m=r.allowedAutoPlacements,d=t.options.placement,w=V(d),A=w===d,T=c||(A||!h?[Zt(d)]:yi(d)),v=[d].concat(T).reduce(function(lt,G){return lt.concat(V(G)===je?bi(t,{placement:G,boundary:l,rootBoundary:f,padding:u,flipVariations:h,allowedAutoPlacements:m}):G)},[]),E=t.rects.reference,b=t.rects.popper,y=new Map,O=!0,x=v[0],C=0;C=0,At=wt?"width":"height",R=vt(t,{placement:_,boundary:l,rootBoundary:f,altBoundary:g,padding:u}),j=wt?rt?B:P:rt?$:I;E[At]>b[At]&&(j=Zt(j));var jt=Zt(j),nt=[];if(s&&nt.push(R[L]<=0),a&&nt.push(R[j]<=0,R[jt]<=0),nt.every(function(lt){return lt})){x=_,O=!1;break}y.set(_,nt)}if(O)for(var Ft=h?3:1,fe=function(G){var Ot=v.find(function(Vt){var ot=y.get(Vt);if(ot)return ot.slice(0,G).every(function(pe){return pe})});if(Ot)return x=Ot,"break"},Tt=Ft;Tt>0;Tt--){var Ht=fe(Tt);if(Ht==="break")break}t.placement!==x&&(t.modifiersData[n]._skip=!0,t.placement=x,t.reset=!0)}}var pn={name:"flip",enabled:!0,phase:"main",fn:Ei,requiresIfExists:["offset"],data:{_skip:!1}};function _i(e){return e==="x"?"y":"x"}function Nt(e,t,r){return st(e,te(t,r))}function wi(e,t,r){var n=Nt(e,t,r);return n>r?r:n}function Ai(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,s=o===void 0?!0:o,i=r.altAxis,a=i===void 0?!1:i,c=r.boundary,u=r.rootBoundary,l=r.altBoundary,f=r.padding,g=r.tether,p=g===void 0?!0:g,h=r.tetherOffset,m=h===void 0?0:h,d=vt(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:l}),w=V(t.placement),A=gt(t.placement),T=!A,v=Fe(w),E=_i(v),b=t.modifiersData.popperOffsets,y=t.rects.reference,O=t.rects.popper,x=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,C=typeof x=="number"?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(b){if(s){var rt,wt=v==="y"?I:P,At=v==="y"?$:B,R=v==="y"?"height":"width",j=b[v],jt=j+d[wt],nt=j-d[At],Ft=p?-O[R]/2:0,fe=A===mt?y[R]:O[R],Tt=A===mt?-O[R]:-y[R],Ht=t.elements.arrow,lt=p&&Ht?Be(Ht):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:cn(),Ot=G[wt],Vt=G[At],ot=Nt(0,y[R],lt[R]),pe=T?y[R]/2-Ft-ot-Ot-C.mainAxis:fe-ot-Ot-C.mainAxis,qn=T?-y[R]/2+Ft+ot+Vt+C.mainAxis:Tt+ot+Vt+C.mainAxis,de=t.elements.arrow&&Pt(t.elements.arrow),Wn=de?v==="y"?de.clientTop||0:de.clientLeft||0:0,vr=(rt=_==null?void 0:_[v])!=null?rt:0,zn=j+pe-vr-Wn,Un=j+qn-vr,br=Nt(p?te(jt,zn):jt,j,p?st(nt,Un):nt);b[v]=br,L[v]=br-j}if(a){var yr,Yn=v==="x"?I:P,Gn=v==="x"?$:B,it=b[E],qt=E==="y"?"height":"width",Er=it+d[Yn],_r=it-d[Gn],he=[I,P].indexOf(w)!==-1,wr=(yr=_==null?void 0:_[E])!=null?yr:0,Ar=he?Er:it-y[qt]-O[qt]-wr+C.altAxis,Tr=he?it+y[qt]+O[qt]-wr-C.altAxis:_r,Or=p&&he?wi(Ar,it,Tr):Nt(p?Ar:Er,it,p?Tr:_r);b[E]=Or,L[E]=Or-it}t.modifiersData[n]=L}}var dn={name:"preventOverflow",enabled:!0,phase:"main",fn:Ai,requiresIfExists:["offset"]},Ti=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,ln(typeof t!="number"?t:un(t,Mt))};function Oi(e){var t,r=e.state,n=e.name,o=e.options,s=r.elements.arrow,i=r.modifiersData.popperOffsets,a=V(r.placement),c=Fe(a),u=[P,B].indexOf(a)>=0,l=u?"height":"width";if(!(!s||!i)){var f=Ti(o.padding,r),g=Be(s),p=c==="y"?I:P,h=c==="y"?$:B,m=r.rects.reference[l]+r.rects.reference[c]-i[c]-r.rects.popper[l],d=i[c]-r.rects.reference[c],w=Pt(s),A=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,T=m/2-d/2,v=f[p],E=A-g[l]-f[h],b=A/2-g[l]/2+T,y=Nt(v,b,E),O=c;r.modifiersData[n]=(t={},t[O]=y,t.centerOffset=y-b,t)}}function Si(e){var t=e.state,r=e.options,n=r.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||sn(t.elements.popper,o)&&(t.elements.arrow=o))}var hn={name:"arrow",enabled:!0,phase:"main",fn:Oi,effect:Si,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Zr(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function tn(e){return[I,B,$,P].some(function(t){return e[t]>=0})}function xi(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,i=vt(t,{elementContext:"reference"}),a=vt(t,{altBoundary:!0}),c=Zr(i,n),u=Zr(a,o,s),l=tn(c),f=tn(u);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}var mn={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:xi},Ci=[Ve,qe,We,ze],Li=He({defaultModifiers:Ci}),gn=[Ve,qe,We,ze,fn,pn,dn,hn,mn],Di=He({defaultModifiers:gn});D.applyStyles=ze;D.arrow=hn;D.computeStyles=We;D.createPopper=Di;D.createPopperLite=Li;D.defaultModifiers=gn;D.detectOverflow=vt;D.eventListeners=Ve;D.flip=pn;D.hide=mn;D.offset=fn;D.popperGenerator=He;D.popperOffsets=qe;D.preventOverflow=dn});var K=new Map,zt={set(e,t,r){K.has(e)||K.set(e,new Map);let n=K.get(e);if(!n.has(t)&&n.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`);return}n.set(t,r)},get(e,t){return K.has(e)&&K.get(e).get(t)||null},remove(e,t){if(!K.has(e))return;let r=K.get(e);r.delete(t),r.size===0&&K.delete(e)}};var be="transitionend",ye=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(t,r)=>`#${CSS.escape(r)}`)),e),Nr=e=>e==null?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),Ir=e=>{do e+=Math.floor(Math.random()*1e6);while(document.getElementById(e));return e},io=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:r}=window.getComputedStyle(e),n=Number.parseFloat(t),o=Number.parseFloat(r);return!n&&!o?0:(t=t.split(",")[0],r=r.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(r))*1e3)},so=e=>{e.dispatchEvent(new Event(be))},X=e=>!e||typeof e!="object"?!1:(typeof e.jquery!="undefined"&&(e=e[0]),typeof e.nodeType!="undefined"),Y=e=>X(e)?e.jquery?e[0]:e:typeof e=="string"&&e.length>0?document.querySelector(ye(e)):null,Pr=e=>{if(!X(e)||e.getClientRects().length===0)return!1;let t=getComputedStyle(e).getPropertyValue("visibility")==="visible",r=e.closest("details:not([open])");if(!r)return t;if(r!==e){let n=e.closest("summary");if(n&&n.parentNode!==r||n===null)return!1}return t},Mr=e=>!e||e.nodeType!==Node.ELEMENT_NODE||e.classList.contains("disabled")?!0:typeof e.disabled!="undefined"?e.disabled:e.hasAttribute("disabled")&&e.getAttribute("disabled")!=="false",Ee=e=>{if(!document.documentElement.attachShadow)return null;if(typeof e.getRootNode=="function"){let t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?Ee(e.parentNode):null},_e=()=>{},Rr=e=>{e.offsetHeight},we=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,ve=[],ao=e=>{document.readyState==="loading"?(ve.length||document.addEventListener("DOMContentLoaded",()=>{for(let t of ve)t()}),ve.push(e)):e()},Ae=()=>document.documentElement.dir==="rtl",Ut=e=>{ao(()=>{let t=we();if(t){let r=e.NAME,n=t.fn[r];t.fn[r]=e.jQueryInterface,t.fn[r].Constructor=e,t.fn[r].noConflict=()=>(t.fn[r]=n,e.jQueryInterface)}})},Q=(e,t=[],r=e)=>typeof e=="function"?e.call(...t):r,kr=(e,t,r=!0)=>{if(!r){Q(e);return}let o=io(t)+5,s=!1,i=({target:a})=>{a===t&&(s=!0,t.removeEventListener(be,i),Q(e))};t.addEventListener(be,i),setTimeout(()=>{s||so(t)},o)};var co=/[^.]*(?=\..*)\.|.*/,lo=/\..*/,uo=/::\d+$/,Te={},$r=1,jr={mouseenter:"mouseover",mouseleave:"mouseout"},fo=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Fr(e,t){return t&&`${t}::${$r++}`||e.uidEvent||$r++}function Hr(e){let t=Fr(e);return e.uidEvent=t,Te[t]=Te[t]||{},Te[t]}function po(e,t){return function r(n){return xe(n,{delegateTarget:e}),r.oneOff&&Se.off(e,n.type,t),t.apply(e,[n])}}function ho(e,t,r){return function n(o){let s=e.querySelectorAll(t);for(let{target:i}=o;i&&i!==this;i=i.parentNode)for(let a of s)if(a===i)return xe(o,{delegateTarget:i}),n.oneOff&&Se.off(e,o.type,t,r),r.apply(i,[o])}}function Vr(e,t,r=null){return Object.values(e).find(n=>n.callable===t&&n.delegationSelector===r)}function qr(e,t,r){let n=typeof t=="string",o=n?r:t||r,s=Wr(e);return fo.has(s)||(s=e),[n,o,s]}function Br(e,t,r,n,o){if(typeof t!="string"||!e)return;let[s,i,a]=qr(t,r,n);t in jr&&(i=(h=>function(m){if(!m.relatedTarget||m.relatedTarget!==m.delegateTarget&&!m.delegateTarget.contains(m.relatedTarget))return h.call(this,m)})(i));let c=Hr(e),u=c[a]||(c[a]={}),l=Vr(u,i,s?r:null);if(l){l.oneOff=l.oneOff&&o;return}let f=Fr(i,t.replace(co,"")),g=s?ho(e,r,i):po(e,i);g.delegationSelector=s?r:null,g.callable=i,g.oneOff=o,g.uidEvent=f,u[f]=g,e.addEventListener(a,g,s)}function Oe(e,t,r,n,o){let s=Vr(t[r],n,o);s&&(e.removeEventListener(r,s,!!o),delete t[r][s.uidEvent])}function mo(e,t,r,n){let o=t[r]||{};for(let[s,i]of Object.entries(o))s.includes(n)&&Oe(e,t,r,i.callable,i.delegationSelector)}function Wr(e){return e=e.replace(lo,""),jr[e]||e}var Se={on(e,t,r,n){Br(e,t,r,n,!1)},one(e,t,r,n){Br(e,t,r,n,!0)},off(e,t,r,n){if(typeof t!="string"||!e)return;let[o,s,i]=qr(t,r,n),a=i!==t,c=Hr(e),u=c[i]||{},l=t.startsWith(".");if(typeof s!="undefined"){if(!Object.keys(u).length)return;Oe(e,c,i,s,o?r:null);return}if(l)for(let f of Object.keys(c))mo(e,c,f,t.slice(1));for(let[f,g]of Object.entries(u)){let p=f.replace(uo,"");(!a||t.includes(p))&&Oe(e,c,i,g.callable,g.delegationSelector)}},trigger(e,t,r){if(typeof t!="string"||!e)return null;let n=we(),o=Wr(t),s=t!==o,i=null,a=!0,c=!0,u=!1;s&&n&&(i=n.Event(t,r),n(e).trigger(i),a=!i.isPropagationStopped(),c=!i.isImmediatePropagationStopped(),u=i.isDefaultPrevented());let l=xe(new Event(t,{bubbles:a,cancelable:!0}),r);return u&&l.preventDefault(),c&&e.dispatchEvent(l),l.defaultPrevented&&i&&i.preventDefault(),l}};function xe(e,t={}){for(let[r,n]of Object.entries(t))try{e[r]=n}catch(o){Object.defineProperty(e,r,{configurable:!0,get(){return n}})}return e}var S=Se;function zr(e){if(e==="true")return!0;if(e==="false")return!1;if(e===Number(e).toString())return Number(e);if(e===""||e==="null")return null;if(typeof e!="string")return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function Ce(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}var go={setDataAttribute(e,t,r){e.setAttribute(`data-bs-${Ce(t)}`,r)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${Ce(t)}`)},getDataAttributes(e){if(!e)return{};let t={},r=Object.keys(e.dataset).filter(n=>n.startsWith("bs")&&!n.startsWith("bsConfig"));for(let n of r){let o=n.replace(/^bs/,"");o=o.charAt(0).toLowerCase()+o.slice(1),t[o]=zr(e.dataset[n])}return t},getDataAttribute(e,t){return zr(e.getAttribute(`data-bs-${Ce(t)}`))}},xt=go;var Le=class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,r){let n=X(r)?xt.getDataAttribute(r,"config"):{};return N(N(N(N({},this.constructor.Default),typeof n=="object"?n:{}),X(r)?xt.getDataAttributes(r):{}),typeof t=="object"?t:{})}_typeCheckConfig(t,r=this.constructor.DefaultType){for(let[n,o]of Object.entries(r)){let s=t[n],i=X(s)?"element":Nr(s);if(!new RegExp(o).test(i))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${i}" but expected type "${o}".`)}}},Yt=Le;var vo="5.3.8",De=class extends Yt{constructor(t,r){super(),t=Y(t),t&&(this._element=t,this._config=this._getConfig(r),zt.set(this._element,this.constructor.DATA_KEY,this))}dispose(){zt.remove(this._element,this.constructor.DATA_KEY),S.off(this._element,this.constructor.EVENT_KEY);for(let t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,r,n=!0){kr(t,r,n)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return zt.get(Y(t),this.DATA_KEY)}static getOrCreateInstance(t,r={}){return this.getInstance(t)||new this(t,typeof r=="object"?r:null)}static get VERSION(){return vo}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}},Gt=De;var Ne=e=>{let t=e.getAttribute("data-bs-target");if(!t||t==="#"){let r=e.getAttribute("href");if(!r||!r.includes("#")&&!r.startsWith("."))return null;r.includes("#")&&!r.startsWith("#")&&(r=`#${r.split("#")[1]}`),t=r&&r!=="#"?r.trim():null}return t?t.split(",").map(r=>ye(r)).join(","):null},Kt={find(e,t=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(t,e))},findOne(e,t=document.documentElement){return Element.prototype.querySelector.call(t,e)},children(e,t){return[].concat(...e.children).filter(r=>r.matches(t))},parents(e,t){let r=[],n=e.parentNode.closest(t);for(;n;)r.push(n),n=n.parentNode.closest(t);return r},prev(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return[r];r=r.previousElementSibling}return[]},next(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return[r];r=r.nextElementSibling}return[]},focusableChildren(e){let t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(r=>`${r}:not([tabindex^="-"])`).join(",");return this.find(t,e).filter(r=>!Mr(r)&&Pr(r))},getSelectorFromElement(e){let t=Ne(e);return t&&Kt.findOne(t)?t:null},getElementFromSelector(e){let t=Ne(e);return t?Kt.findOne(t):null},getMultipleElementsFromSelector(e){let t=Ne(e);return t?Kt.find(t):[]}},F=Kt;var bo="collapse",yo="bs.collapse",Ct=`.${yo}`,Eo=".data-api",_o=`show${Ct}`,wo=`shown${Ct}`,Ao=`hide${Ct}`,To=`hidden${Ct}`,Oo=`click${Ct}${Eo}`,Ie="show",ft="collapse",Qt="collapsing",So="collapsed",xo=`:scope .${ft} .${ft}`,Co="collapse-horizontal",Lo="width",Do="height",No=".collapse.show, .collapse.collapsing",Pe='[data-bs-toggle="collapse"]',Io={parent:null,toggle:!0},Po={parent:"(null|element)",toggle:"boolean"},Xt=class e extends Gt{constructor(t,r){super(t,r),this._isTransitioning=!1,this._triggerArray=[];let n=F.find(Pe);for(let o of n){let s=F.getSelectorFromElement(o),i=F.find(s).filter(a=>a===this._element);s!==null&&i.length&&this._triggerArray.push(o)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Io}static get DefaultType(){return Po}static get NAME(){return bo}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(No).filter(a=>a!==this._element).map(a=>e.getOrCreateInstance(a,{toggle:!1}))),t.length&&t[0]._isTransitioning||S.trigger(this._element,_o).defaultPrevented)return;for(let a of t)a.hide();let n=this._getDimension();this._element.classList.remove(ft),this._element.classList.add(Qt),this._element.style[n]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;let o=()=>{this._isTransitioning=!1,this._element.classList.remove(Qt),this._element.classList.add(ft,Ie),this._element.style[n]="",S.trigger(this._element,wo)},i=`scroll${n[0].toUpperCase()+n.slice(1)}`;this._queueCallback(o,this._element,!0),this._element.style[n]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown()||S.trigger(this._element,Ao).defaultPrevented)return;let r=this._getDimension();this._element.style[r]=`${this._element.getBoundingClientRect()[r]}px`,Rr(this._element),this._element.classList.add(Qt),this._element.classList.remove(ft,Ie);for(let o of this._triggerArray){let s=F.getElementFromSelector(o);s&&!this._isShown(s)&&this._addAriaAndCollapsedClass([o],!1)}this._isTransitioning=!0;let n=()=>{this._isTransitioning=!1,this._element.classList.remove(Qt),this._element.classList.add(ft),S.trigger(this._element,To)};this._element.style[r]="",this._queueCallback(n,this._element,!0)}_isShown(t=this._element){return t.classList.contains(Ie)}_configAfterMerge(t){return t.toggle=!!t.toggle,t.parent=Y(t.parent),t}_getDimension(){return this._element.classList.contains(Co)?Lo:Do}_initializeChildren(){if(!this._config.parent)return;let t=this._getFirstLevelChildren(Pe);for(let r of t){let n=F.getElementFromSelector(r);n&&this._addAriaAndCollapsedClass([r],this._isShown(n))}}_getFirstLevelChildren(t){let r=F.find(xo,this._config.parent);return F.find(t,this._config.parent).filter(n=>!r.includes(n))}_addAriaAndCollapsedClass(t,r){if(t.length)for(let n of t)n.classList.toggle(So,!r),n.setAttribute("aria-expanded",r)}static jQueryInterface(t){let r={};return typeof t=="string"&&/show|hide/.test(t)&&(r.toggle=!1),this.each(function(){let n=e.getOrCreateInstance(this,r);if(typeof t=="string"){if(typeof n[t]=="undefined")throw new TypeError(`No method named "${t}"`);n[t]()}})}};S.on(document,Oo,Pe,function(e){(e.target.tagName==="A"||e.delegateTarget&&e.delegateTarget.tagName==="A")&&e.preventDefault();for(let t of F.getMultipleElementsFromSelector(this))Xt.getOrCreateInstance(t,{toggle:!1}).toggle()});Ut(Xt);var Gs=document.getElementsByClassName("collapse");var Qe=oo(vn());var Ni=/^aria-[\w-]*$/i,re={"*":["class","dir","id","lang","role",Ni],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Ii=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Pi=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Mi=(e,t)=>{let r=e.nodeName.toLowerCase();return t.includes(r)?Ii.has(r)?!!Pi.test(e.nodeValue):!0:t.filter(n=>n instanceof RegExp).some(n=>n.test(r))};function bn(e,t,r){if(!e.length)return e;if(r&&typeof r=="function")return r(e);let o=new window.DOMParser().parseFromString(e,"text/html"),s=[].concat(...o.body.querySelectorAll("*"));for(let i of s){let a=i.nodeName.toLowerCase();if(!Object.keys(t).includes(a)){i.remove();continue}let c=[].concat(...i.attributes),u=[].concat(t["*"]||[],t[a]||[]);for(let l of c)Mi(l,u)||i.removeAttribute(l.nodeName)}return o.body.innerHTML}var Ri="TemplateFactory",ki={allowList:re,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},$i={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Bi={entry:"(string|element|function|null)",selector:"(string|element)"},Ue=class extends Yt{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return ki}static get DefaultType(){return $i}static get NAME(){return Ri}getContent(){return Object.values(this._config.content).map(t=>this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content=N(N({},this._config.content),t),this}toHtml(){let t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(let[o,s]of Object.entries(this._config.content))this._setContent(t,s,o);let r=t.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&r.classList.add(...n.split(" ")),r}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(let[r,n]of Object.entries(t))super._typeCheckConfig({selector:r,entry:n},Bi)}_setContent(t,r,n){let o=F.findOne(n,t);if(o){if(r=this._resolvePossibleFunction(r),!r){o.remove();return}if(X(r)){this._putElementInTemplate(Y(r),o);return}if(this._config.html){o.innerHTML=this._maybeSanitize(r);return}o.textContent=r}}_maybeSanitize(t){return this._config.sanitize?bn(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return Q(t,[void 0,this])}_putElementInTemplate(t,r){if(this._config.html){r.innerHTML="",r.append(t);return}r.textContent=t.textContent}},yn=Ue;var ji="tooltip",Fi=new Set(["sanitize","allowList","sanitizeFn"]),Ye="fade",Hi="modal",ne="show",Vi=".tooltip-inner",En=`.${Hi}`,_n="hide.bs.modal",Rt="hover",Ge="focus",Ke="click",qi="manual",Wi="hide",zi="hidden",Ui="show",Yi="shown",Gi="inserted",Ki="click",Qi="focusin",Xi="focusout",Ji="mouseenter",Zi="mouseleave",ts={AUTO:"auto",TOP:"top",RIGHT:Ae()?"left":"right",BOTTOM:"bottom",LEFT:Ae()?"right":"left"},es={allowList:re,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},rs={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"},oe=class e extends Gt{constructor(t,r){if(typeof Qe=="undefined")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(t,r),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return es}static get DefaultType(){return rs}static get NAME(){return ji}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),S.off(this._element.closest(En),_n,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;let t=S.trigger(this._element,this.constructor.eventName(Ui)),n=(Ee(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!n)return;this._disposePopper();let o=this._getTipElement();this._element.setAttribute("aria-describedby",o.getAttribute("id"));let{container:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(o),S.trigger(this._element,this.constructor.eventName(Gi))),this._popper=this._createPopper(o),o.classList.add(ne),"ontouchstart"in document.documentElement)for(let a of[].concat(...document.body.children))S.on(a,"mouseover",_e);let i=()=>{S.trigger(this._element,this.constructor.eventName(Yi)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(i,this.tip,this._isAnimated())}hide(){if(!this._isShown()||S.trigger(this._element,this.constructor.eventName(Wi)).defaultPrevented)return;if(this._getTipElement().classList.remove(ne),"ontouchstart"in document.documentElement)for(let o of[].concat(...document.body.children))S.off(o,"mouseover",_e);this._activeTrigger[Ke]=!1,this._activeTrigger[Ge]=!1,this._activeTrigger[Rt]=!1,this._isHovered=null;let n=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),S.trigger(this._element,this.constructor.eventName(zi)))};this._queueCallback(n,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){let r=this._getTemplateFactory(t).toHtml();if(!r)return null;r.classList.remove(Ye,ne),r.classList.add(`bs-${this.constructor.NAME}-auto`);let n=Ir(this.constructor.NAME).toString();return r.setAttribute("id",n),this._isAnimated()&&r.classList.add(Ye),r}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new yn(Lr(N({},this._config),{content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)})),this._templateFactory}_getContentForTemplate(){return{[Vi]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Ye)}_isShown(){return this.tip&&this.tip.classList.contains(ne)}_createPopper(t){let r=Q(this._config.placement,[this,t,this._element]),n=ts[r.toUpperCase()];return Qe.createPopper(this._element,t,this._getPopperConfig(n))}_getOffset(){let{offset:t}=this._config;return typeof t=="string"?t.split(",").map(r=>Number.parseInt(r,10)):typeof t=="function"?r=>t(r,this._element):t}_resolvePossibleFunction(t){return Q(t,[this._element,this._element])}_getPopperConfig(t){let r={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:n=>{this._getTipElement().setAttribute("data-popper-placement",n.state.placement)}}]};return N(N({},r),Q(this._config.popperConfig,[void 0,r]))}_setListeners(){let t=this._config.trigger.split(" ");for(let r of t)if(r==="click")S.on(this._element,this.constructor.eventName(Ki),this._config.selector,n=>{let o=this._initializeOnDelegatedTarget(n);o._activeTrigger[Ke]=!(o._isShown()&&o._activeTrigger[Ke]),o.toggle()});else if(r!==qi){let n=r===Rt?this.constructor.eventName(Ji):this.constructor.eventName(Qi),o=r===Rt?this.constructor.eventName(Zi):this.constructor.eventName(Xi);S.on(this._element,n,this._config.selector,s=>{let i=this._initializeOnDelegatedTarget(s);i._activeTrigger[s.type==="focusin"?Ge:Rt]=!0,i._enter()}),S.on(this._element,o,this._config.selector,s=>{let i=this._initializeOnDelegatedTarget(s);i._activeTrigger[s.type==="focusout"?Ge:Rt]=i._element.contains(s.relatedTarget),i._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},S.on(this._element.closest(En),_n,this._hideModalHandler)}_fixTitle(){let t=this._element.getAttribute("title");t&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,r){clearTimeout(this._timeout),this._timeout=setTimeout(t,r)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){let r=xt.getDataAttributes(this._element);for(let n of Object.keys(r))Fi.has(n)&&delete r[n];return t=N(N({},r),typeof t=="object"&&t?t:{}),t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=t.container===!1?document.body:Y(t.container),typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),typeof t.title=="number"&&(t.title=t.title.toString()),typeof t.content=="number"&&(t.content=t.content.toString()),t}_getDelegateConfig(){let t={};for(let[r,n]of Object.entries(this._config))this.constructor.Default[r]!==n&&(t[r]=n);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){let r=e.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof r[t]=="undefined")throw new TypeError(`No method named "${t}"`);r[t]()}})}};Ut(oe);var Z=oe;var wn=".code-header>button",ns="far fa-clipboard",os="fas fa-check",ie="timeout",An="data-title-succeed",kt="data-bs-original-title",Xe=2e3;function Tn(e){if(e.hasAttribute(ie)){let t=e.getAttribute(ie);if(Number(t)>Date.now())return!0}return!1}function On(e){e.setAttribute(ie,Date.now()+Xe)}function Sn(e){e.removeAttribute(ie)}function is(e){let t=e.getAttribute(An);e.setAttribute(kt,t),Z.getInstance(e).show()}function ss(e){Z.getInstance(e).hide(),e.removeAttribute(kt)}function as(e){e.children[0].setAttribute("class",os)}function cs(e){e.children[0].setAttribute("class",ns)}function ls(){let e=document.querySelectorAll(wn);if(e.length===0)return;let t=new ClipboardJS(wn,{target:r=>r.parentNode.nextElementSibling.querySelectorAll("code")[1]});[...e].map(r=>new Z(r,{placement:"left"})),t.on("success",r=>{let n=r.trigger;r.clearSelection(),!Tn(n)&&(as(n),is(n),On(n),setTimeout(()=>{ss(n),cs(n),Sn(n)},Xe))})}function us(){let e=document.getElementById("copy-link");e!==null&&(e.addEventListener("click",t=>{let r=t.target;Tn(r)||navigator.clipboard.writeText(window.location.href).then(()=>{let n=r.getAttribute(kt),o=r.getAttribute(An);r.setAttribute(kt,o),Z.getInstance(r).show(),On(r),setTimeout(()=>{r.setAttribute(kt,n),Sn(r)},Xe)})}),e.addEventListener("mouseleave",t=>{Z.getInstance(t.target).hide()}))}function Je(){ls(),us()}var xn="data-src",Cn="data-lqip",Ze={SHIMMER:"shimmer",BLUR:"blur"};function tr(e){this.parentElement.classList.remove(e)}function fs(){this.complete&&(this.hasAttribute(Cn)?tr.call(this,Ze.BLUR):tr.call(this,Ze.SHIMMER))}function ps(){let e=this.getAttribute(xn);this.setAttribute("src",encodeURI(e)),this.removeAttribute(xn)}function er(){let e=document.querySelectorAll("article img");if(e.length===0)return;e.forEach(r=>{r.addEventListener("load",fs)}),document.querySelectorAll('article img[loading="lazy"]').forEach(r=>{r.complete&&tr.call(r,Ze.SHIMMER)});let t=document.querySelectorAll(`article img[${Cn}="true"]`);t.length&&t.forEach(r=>{ps.call(r)})}var rr=".popup:not(.dark)",Ln=".popup:not(.light)",bt=rr;function ds(e,t){bt===rr?bt=Ln:bt=rr,t===null&&(t=GLightbox({selector:`${bt}`})),[e,t]=[t,e]}function nr(){if(document.querySelector(".popup")===null)return;let e=!(document.querySelector(".popup.light")===null&&document.querySelector(".popup.dark")===null);Theme.visualState===Theme.DARK&&(bt=Ln);let t=GLightbox({selector:`${bt}`});if(e&&Theme.switchable){let r=null;window.addEventListener("message",n=>{n.source===window&&n.data&&n.data.id===Theme.ID&&ds(t,r)})}}var tt=class{static get attrTimestamp(){return"data-ts"}static get attrDateFormat(){return"data-df"}static get locale(){return document.documentElement.getAttribute("lang").substring(0,2)}static getTimestamp(t){return Number(t.getAttribute(this.attrTimestamp))}static getDateFormat(t){return t.getAttribute(this.attrDateFormat)}};function or(){dayjs.locale(tt.locale),dayjs.extend(window.dayjs_plugin_localizedFormat),document.querySelectorAll(`[${tt.attrTimestamp}]`).forEach(e=>{let t=dayjs.unix(tt.getTimestamp(e)),r=t.format(tt.getDateFormat(e));if(e.textContent=r,e.removeAttribute(tt.attrTimestamp),e.removeAttribute(tt.attrDateFormat),e.hasAttribute("data-bs-toggle")&&e.getAttribute("data-bs-toggle")==="tooltip"){let n=t.format("llll");e.setAttribute("data-bs-title",n)}})}var hs=document.getElementById("toc-bar"),ms=document.getElementById("toc-solo-trigger"),gs=document.getElementsByClassName("toc-trigger"),z=document.getElementById("toc-popup"),vs=document.getElementById("toc-popup-close"),Dn="overflow-hidden",ir="closing",$t,Bt,yt=class yt{static initBar(){new IntersectionObserver(r=>{r.forEach(n=>{hs.classList.toggle("invisible",n.isIntersecting)})},{rootMargin:`-${U(this,Bt)}px 0px 0px 0px`}).observe(ms),Wt(this,$t,!1)}static listenAnchors(){[...document.getElementsByClassName("toc-link")].forEach(r=>{r.onclick=()=>this.hidePopup()})}static refresh(){U(this,$t)&&this.initComponents(),tocbot.refresh(this.options),this.listenAnchors()}static get popupOpened(){return z.open}static showPopup(){this.lockScroll(!0),z.showModal(),z.querySelector("li.is-active-li").scrollIntoView({block:"center"})}static hidePopup(){z.toggleAttribute(ir),z.addEventListener("animationend",()=>{z.toggleAttribute(ir),z.close()},{once:!0}),this.lockScroll(!1)}static lockScroll(t){document.documentElement.classList.toggle(Dn,t),document.body.classList.toggle(Dn,t)}static clickBackdrop(t){if(z.hasAttribute(ir))return;let r=t.target.getBoundingClientRect();(t.clientXr.right||t.clientYr.bottom)&&this.hidePopup()}static initComponents(){this.initBar(),[...gs].forEach(t=>{t.onclick=()=>this.showPopup()}),z.onclick=t=>this.clickBackdrop(t),vs.onclick=()=>this.hidePopup(),z.oncancel=t=>{t.preventDefault(),this.hidePopup()}}static init(){tocbot.init(this.options),this.listenAnchors(),this.initComponents()}};$t=new WeakMap,Bt=new WeakMap,St(yt,$t,!0),St(yt,Bt,48),ut(yt,"options",{tocSelector:"#toc-popup-content",contentSelector:".content",ignoreSelector:"[data-toc-skip]",headingSelector:"h2, h3, h4",orderedList:!1,scrollSmooth:!1,collapseDepth:4,headingsOffset:U(yt,Bt)});var at=yt;var Et=class{static refresh(){tocbot.refresh(this.options)}static init(){tocbot.init(this.options)}};ut(Et,"options",{tocSelector:"#toc",contentSelector:".content",ignoreSelector:"[data-toc-skip]",headingSelector:"h2, h3, h4",orderedList:!1,scrollSmooth:!1,headingsOffset:32});var Nn=matchMedia("(min-width: 1200px)");function bs(e){e.matches?(at.popupOpened&&at.hidePopup(),Et.refresh()):at.refresh()}function sr(){if(document.querySelector('main>article[data-toc="true"]')===null)return;Nn.matches?Et.init():at.init(),document.getElementById("toc-wrapper").classList.remove("invisible"),Nn.onchange=bs}var ar="mermaid",In=Theme.getThemeMapper("default","dark");function ys(e){if(e.source===window&&e.data&&e.data.id===Theme.ID){[...document.getElementsByClassName(ar)].forEach(n=>{let o=n.previousSibling.children.item(0).textContent;n.textContent=o,n.removeAttribute("data-processed")});let r=In[Theme.visualState];mermaid.initialize({theme:r}),mermaid.init(null,`.${ar}`)}}function Es(e){let t=e.textContent,r=e.parentElement;r.classList.add("d-none");let n=document.createElement("pre");n.classList.add(ar);let o=document.createTextNode(t);n.appendChild(o),r.after(n)}function cr(){if(typeof mermaid=="undefined"||typeof mermaid.initialize!="function")return;let t={theme:In[Theme.visualState]};[...document.getElementsByClassName("language-mermaid")].forEach(Es),mermaid.initialize(t),Theme.switchable&&window.addEventListener("message",ys)}var Pn=document.getElementById("mode-toggle");function lr(){Pn&&Pn.addEventListener("click",()=>{Theme.flip()})}function ur(){let e=document.getElementById("back-to-top");window.addEventListener("scroll",()=>{window.scrollY>50?e.classList.add("show"):e.classList.remove("show")}),e.addEventListener("click",()=>{window.scrollTo({top:0})})}function fr(){[...document.querySelectorAll('[data-bs-toggle="tooltip"]')].map(t=>new Z(t))}function pr(){lr(),ur(),fr()}var _s="sidebar-display",ws=document.getElementById("sidebar"),As=document.getElementById("sidebar-trigger"),Mn=document.getElementById("mask"),et,se=class{static toggle(){Wt(this,et,!U(this,et)),document.body.toggleAttribute(_s,U(this,et)),ws.classList.toggle("z-2",U(this,et)),Mn.classList.toggle("d-none",!U(this,et))}};et=new WeakMap,St(se,et,!1);function dr(){As.onclick=Mn.onclick=()=>se.toggle()}var Rn=document.getElementById("sidebar-trigger"),hr=document.getElementById("search-trigger"),ae=document.getElementById("search-cancel"),kn=document.querySelectorAll("#main-wrapper>.container>.row"),$n=document.getElementById("topbar-title"),ce=document.getElementById("search"),Bn=document.getElementById("search-result-wrapper"),Ts=document.getElementById("search-results"),_t=document.getElementById("search-input"),le=document.getElementById("search-hints"),mr="d-block",M="d-none",jn="input-focus",Fn="d-flex",ue=class{static on(){Rn.classList.add(M),$n.classList.add(M),hr.classList.add(M),ce.classList.add(Fn),ae.classList.add(mr)}static off(){ae.classList.remove(mr),ce.classList.remove(Fn),Rn.classList.remove(M),$n.classList.remove(M),hr.classList.remove(M)}},ct=class{static on(){this.resultVisible||(Bn.classList.remove(M),kn.forEach(t=>{t.classList.add(M)}),this.resultVisible=!0)}static off(){this.resultVisible&&(Ts.innerHTML="",le.classList.contains(M)&&le.classList.remove(M),Bn.classList.add(M),kn.forEach(t=>{t.classList.remove(M)}),_t.textContent="",this.resultVisible=!1)}};ut(ct,"resultVisible",!1);function Hn(){return ae.classList.contains(mr)}function Vn(){hr.addEventListener("click",()=>{ue.on(),ct.on(),_t.focus()}),ae.addEventListener("click",()=>{ue.off(),ct.off()}),_t.addEventListener("focus",()=>{ce.classList.add(jn)}),_t.addEventListener("focusout",()=>{ce.classList.remove(jn)}),_t.addEventListener("input",()=>{_t.value===""?Hn()?le.classList.remove(M):ct.off():(ct.on(),Hn()&&le.classList.add(M))})}function gr(){Vn()}er();sr();nr();dr();or();Je();gr();cr();pr();})(); +(() => { + var __create = Object.create; + var __defProp = Object.defineProperty; + var __defProps = Object.defineProperties; + var __getOwnPropDesc = Object.getOwnPropertyDescriptor; + var __getOwnPropDescs = Object.getOwnPropertyDescriptors; + var __getOwnPropNames = Object.getOwnPropertyNames; + var __getOwnPropSymbols = Object.getOwnPropertySymbols; + var __getProtoOf = Object.getPrototypeOf; + var __hasOwnProp = Object.prototype.hasOwnProperty; + var __propIsEnum = Object.prototype.propertyIsEnumerable; + var __typeError = (msg) => { + throw TypeError(msg); + }; + var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; + var __spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b)) { + if (__propIsEnum.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + } + return a; + }; + var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); + var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + }; + var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; + }; + var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); + var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg); + var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)); + var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value); + var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2@v2.21100.20000/package/dist/cjs/popper.js + var require_popper = __commonJS({ + "ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2@v2.21100.20000/package/dist/cjs/popper.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + function getWindow(node) { + if (node == null) { + return window; + } + if (node.toString() !== "[object Window]") { + var ownerDocument = node.ownerDocument; + return ownerDocument ? ownerDocument.defaultView || window : window; + } + return node; + } + function isElement2(node) { + var OwnElement = getWindow(node).Element; + return node instanceof OwnElement || node instanceof Element; + } + function isHTMLElement(node) { + var OwnElement = getWindow(node).HTMLElement; + return node instanceof OwnElement || node instanceof HTMLElement; + } + function isShadowRoot(node) { + if (typeof ShadowRoot === "undefined") { + return false; + } + var OwnElement = getWindow(node).ShadowRoot; + return node instanceof OwnElement || node instanceof ShadowRoot; + } + var max = Math.max; + var min = Math.min; + var round = Math.round; + function getBoundingClientRect(element, includeScale) { + if (includeScale === void 0) { + includeScale = false; + } + var rect = element.getBoundingClientRect(); + var scaleX = 1; + var scaleY = 1; + if (isHTMLElement(element) && includeScale) { + var offsetHeight = element.offsetHeight; + var offsetWidth = element.offsetWidth; + if (offsetWidth > 0) { + scaleX = round(rect.width) / offsetWidth || 1; + } + if (offsetHeight > 0) { + scaleY = round(rect.height) / offsetHeight || 1; + } + } + return { + width: rect.width / scaleX, + height: rect.height / scaleY, + top: rect.top / scaleY, + right: rect.right / scaleX, + bottom: rect.bottom / scaleY, + left: rect.left / scaleX, + x: rect.left / scaleX, + y: rect.top / scaleY + }; + } + function getWindowScroll(node) { + var win = getWindow(node); + var scrollLeft = win.pageXOffset; + var scrollTop = win.pageYOffset; + return { + scrollLeft, + scrollTop + }; + } + function getHTMLElementScroll(element) { + return { + scrollLeft: element.scrollLeft, + scrollTop: element.scrollTop + }; + } + function getNodeScroll(node) { + if (node === getWindow(node) || !isHTMLElement(node)) { + return getWindowScroll(node); + } else { + return getHTMLElementScroll(node); + } + } + function getNodeName(element) { + return element ? (element.nodeName || "").toLowerCase() : null; + } + function getDocumentElement(element) { + return ((isElement2(element) ? element.ownerDocument : ( + // $FlowFixMe[prop-missing] + element.document + )) || window.document).documentElement; + } + function getWindowScrollBarX(element) { + return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; + } + function getComputedStyle2(element) { + return getWindow(element).getComputedStyle(element); + } + function isScrollParent(element) { + var _getComputedStyle = getComputedStyle2(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY; + return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); + } + function isElementScaled(element) { + var rect = element.getBoundingClientRect(); + var scaleX = round(rect.width) / element.offsetWidth || 1; + var scaleY = round(rect.height) / element.offsetHeight || 1; + return scaleX !== 1 || scaleY !== 1; + } + function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { + if (isFixed === void 0) { + isFixed = false; + } + var isOffsetParentAnElement = isHTMLElement(offsetParent); + var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent); + var documentElement = getDocumentElement(offsetParent); + var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled); + var scroll = { + scrollLeft: 0, + scrollTop: 0 + }; + var offsets = { + x: 0, + y: 0 + }; + if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { + if (getNodeName(offsetParent) !== "body" || // https://github.com/popperjs/popper-core/issues/1078 + isScrollParent(documentElement)) { + scroll = getNodeScroll(offsetParent); + } + if (isHTMLElement(offsetParent)) { + offsets = getBoundingClientRect(offsetParent, true); + offsets.x += offsetParent.clientLeft; + offsets.y += offsetParent.clientTop; + } else if (documentElement) { + offsets.x = getWindowScrollBarX(documentElement); + } + } + return { + x: rect.left + scroll.scrollLeft - offsets.x, + y: rect.top + scroll.scrollTop - offsets.y, + width: rect.width, + height: rect.height + }; + } + function getLayoutRect(element) { + var clientRect = getBoundingClientRect(element); + var width = element.offsetWidth; + var height = element.offsetHeight; + if (Math.abs(clientRect.width - width) <= 1) { + width = clientRect.width; + } + if (Math.abs(clientRect.height - height) <= 1) { + height = clientRect.height; + } + return { + x: element.offsetLeft, + y: element.offsetTop, + width, + height + }; + } + function getParentNode(element) { + if (getNodeName(element) === "html") { + return element; + } + return ( + // this is a quicker (but less type safe) way to save quite some bytes from the bundle + // $FlowFixMe[incompatible-return] + // $FlowFixMe[prop-missing] + element.assignedSlot || // step into the shadow DOM of the parent of a slotted node + element.parentNode || // DOM Element detected + (isShadowRoot(element) ? element.host : null) || // ShadowRoot detected + // $FlowFixMe[incompatible-call]: HTMLElement is a Node + getDocumentElement(element) + ); + } + function getScrollParent(node) { + if (["html", "body", "#document"].indexOf(getNodeName(node)) >= 0) { + return node.ownerDocument.body; + } + if (isHTMLElement(node) && isScrollParent(node)) { + return node; + } + return getScrollParent(getParentNode(node)); + } + function listScrollParents(element, list) { + var _element$ownerDocumen; + if (list === void 0) { + list = []; + } + var scrollParent = getScrollParent(element); + var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body); + var win = getWindow(scrollParent); + var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; + var updatedList = list.concat(target); + return isBody ? updatedList : ( + // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here + updatedList.concat(listScrollParents(getParentNode(target))) + ); + } + function isTableElement(element) { + return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0; + } + function getTrueOffsetParent(element) { + if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837 + getComputedStyle2(element).position === "fixed") { + return null; + } + return element.offsetParent; + } + function getContainingBlock(element) { + var isFirefox = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1; + var isIE = navigator.userAgent.indexOf("Trident") !== -1; + if (isIE && isHTMLElement(element)) { + var elementCss = getComputedStyle2(element); + if (elementCss.position === "fixed") { + return null; + } + } + var currentNode = getParentNode(element); + while (isHTMLElement(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0) { + var css = getComputedStyle2(currentNode); + if (css.transform !== "none" || css.perspective !== "none" || css.contain === "paint" || ["transform", "perspective"].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === "filter" || isFirefox && css.filter && css.filter !== "none") { + return currentNode; + } else { + currentNode = currentNode.parentNode; + } + } + return null; + } + function getOffsetParent(element) { + var window2 = getWindow(element); + var offsetParent = getTrueOffsetParent(element); + while (offsetParent && isTableElement(offsetParent) && getComputedStyle2(offsetParent).position === "static") { + offsetParent = getTrueOffsetParent(offsetParent); + } + if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle2(offsetParent).position === "static")) { + return window2; + } + return offsetParent || getContainingBlock(element) || window2; + } + var top = "top"; + var bottom = "bottom"; + var right = "right"; + var left = "left"; + var auto = "auto"; + var basePlacements = [top, bottom, right, left]; + var start = "start"; + var end = "end"; + var clippingParents = "clippingParents"; + var viewport = "viewport"; + var popper = "popper"; + var reference = "reference"; + var variationPlacements = /* @__PURE__ */ basePlacements.reduce(function(acc, placement) { + return acc.concat([placement + "-" + start, placement + "-" + end]); + }, []); + var placements = /* @__PURE__ */ [].concat(basePlacements, [auto]).reduce(function(acc, placement) { + return acc.concat([placement, placement + "-" + start, placement + "-" + end]); + }, []); + var beforeRead = "beforeRead"; + var read = "read"; + var afterRead = "afterRead"; + var beforeMain = "beforeMain"; + var main = "main"; + var afterMain = "afterMain"; + var beforeWrite = "beforeWrite"; + var write = "write"; + var afterWrite = "afterWrite"; + var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite]; + function order(modifiers) { + var map = /* @__PURE__ */ new Map(); + var visited = /* @__PURE__ */ new Set(); + var result = []; + modifiers.forEach(function(modifier) { + map.set(modifier.name, modifier); + }); + function sort(modifier) { + visited.add(modifier.name); + var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); + requires.forEach(function(dep) { + if (!visited.has(dep)) { + var depModifier = map.get(dep); + if (depModifier) { + sort(depModifier); + } + } + }); + result.push(modifier); + } + modifiers.forEach(function(modifier) { + if (!visited.has(modifier.name)) { + sort(modifier); + } + }); + return result; + } + function orderModifiers(modifiers) { + var orderedModifiers = order(modifiers); + return modifierPhases.reduce(function(acc, phase) { + return acc.concat(orderedModifiers.filter(function(modifier) { + return modifier.phase === phase; + })); + }, []); + } + function debounce(fn) { + var pending; + return function() { + if (!pending) { + pending = new Promise(function(resolve) { + Promise.resolve().then(function() { + pending = void 0; + resolve(fn()); + }); + }); + } + return pending; + }; + } + function format(str) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + return [].concat(args).reduce(function(p, c) { + return p.replace(/%s/, c); + }, str); + } + var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s'; + var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available'; + var VALID_PROPERTIES = ["name", "enabled", "phase", "fn", "effect", "requires", "options"]; + function validateModifiers(modifiers) { + modifiers.forEach(function(modifier) { + [].concat(Object.keys(modifier), VALID_PROPERTIES).filter(function(value, index, self) { + return self.indexOf(value) === index; + }).forEach(function(key) { + switch (key) { + case "name": + if (typeof modifier.name !== "string") { + console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', '"' + String(modifier.name) + '"')); + } + break; + case "enabled": + if (typeof modifier.enabled !== "boolean") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', '"' + String(modifier.enabled) + '"')); + } + break; + case "phase": + if (modifierPhases.indexOf(modifier.phase) < 0) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(", "), '"' + String(modifier.phase) + '"')); + } + break; + case "fn": + if (typeof modifier.fn !== "function") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', '"' + String(modifier.fn) + '"')); + } + break; + case "effect": + if (modifier.effect != null && typeof modifier.effect !== "function") { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', '"' + String(modifier.fn) + '"')); + } + break; + case "requires": + if (modifier.requires != null && !Array.isArray(modifier.requires)) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', '"' + String(modifier.requires) + '"')); + } + break; + case "requiresIfExists": + if (!Array.isArray(modifier.requiresIfExists)) { + console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', '"' + String(modifier.requiresIfExists) + '"')); + } + break; + case "options": + case "data": + break; + default: + console.error('PopperJS: an invalid property has been provided to the "' + modifier.name + '" modifier, valid properties are ' + VALID_PROPERTIES.map(function(s) { + return '"' + s + '"'; + }).join(", ") + '; but "' + key + '" was provided.'); + } + modifier.requires && modifier.requires.forEach(function(requirement) { + if (modifiers.find(function(mod) { + return mod.name === requirement; + }) == null) { + console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement)); + } + }); + }); + }); + } + function uniqueBy(arr, fn) { + var identifiers = /* @__PURE__ */ new Set(); + return arr.filter(function(item) { + var identifier = fn(item); + if (!identifiers.has(identifier)) { + identifiers.add(identifier); + return true; + } + }); + } + function getBasePlacement(placement) { + return placement.split("-")[0]; + } + function mergeByName(modifiers) { + var merged = modifiers.reduce(function(merged2, current) { + var existing = merged2[current.name]; + merged2[current.name] = existing ? Object.assign({}, existing, current, { + options: Object.assign({}, existing.options, current.options), + data: Object.assign({}, existing.data, current.data) + }) : current; + return merged2; + }, {}); + return Object.keys(merged).map(function(key) { + return merged[key]; + }); + } + function getViewportRect(element) { + var win = getWindow(element); + var html = getDocumentElement(element); + var visualViewport = win.visualViewport; + var width = html.clientWidth; + var height = html.clientHeight; + var x = 0; + var y = 0; + if (visualViewport) { + width = visualViewport.width; + height = visualViewport.height; + if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { + x = visualViewport.offsetLeft; + y = visualViewport.offsetTop; + } + } + return { + width, + height, + x: x + getWindowScrollBarX(element), + y + }; + } + function getDocumentRect(element) { + var _element$ownerDocumen; + var html = getDocumentElement(element); + var winScroll = getWindowScroll(element); + var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; + var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); + var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); + var x = -winScroll.scrollLeft + getWindowScrollBarX(element); + var y = -winScroll.scrollTop; + if (getComputedStyle2(body || html).direction === "rtl") { + x += max(html.clientWidth, body ? body.clientWidth : 0) - width; + } + return { + width, + height, + x, + y + }; + } + function contains(parent, child) { + var rootNode = child.getRootNode && child.getRootNode(); + if (parent.contains(child)) { + return true; + } else if (rootNode && isShadowRoot(rootNode)) { + var next = child; + do { + if (next && parent.isSameNode(next)) { + return true; + } + next = next.parentNode || next.host; + } while (next); + } + return false; + } + function rectToClientRect(rect) { + return Object.assign({}, rect, { + left: rect.x, + top: rect.y, + right: rect.x + rect.width, + bottom: rect.y + rect.height + }); + } + function getInnerBoundingClientRect(element) { + var rect = getBoundingClientRect(element); + rect.top = rect.top + element.clientTop; + rect.left = rect.left + element.clientLeft; + rect.bottom = rect.top + element.clientHeight; + rect.right = rect.left + element.clientWidth; + rect.width = element.clientWidth; + rect.height = element.clientHeight; + rect.x = rect.left; + rect.y = rect.top; + return rect; + } + function getClientRectFromMixedType(element, clippingParent) { + return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement2(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); + } + function getClippingParents(element) { + var clippingParents2 = listScrollParents(getParentNode(element)); + var canEscapeClipping = ["absolute", "fixed"].indexOf(getComputedStyle2(element).position) >= 0; + var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element; + if (!isElement2(clipperElement)) { + return []; + } + return clippingParents2.filter(function(clippingParent) { + return isElement2(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body" && (canEscapeClipping ? getComputedStyle2(clippingParent).position !== "static" : true); + }); + } + function getClippingRect(element, boundary, rootBoundary) { + var mainClippingParents = boundary === "clippingParents" ? getClippingParents(element) : [].concat(boundary); + var clippingParents2 = [].concat(mainClippingParents, [rootBoundary]); + var firstClippingParent = clippingParents2[0]; + var clippingRect = clippingParents2.reduce(function(accRect, clippingParent) { + var rect = getClientRectFromMixedType(element, clippingParent); + accRect.top = max(rect.top, accRect.top); + accRect.right = min(rect.right, accRect.right); + accRect.bottom = min(rect.bottom, accRect.bottom); + accRect.left = max(rect.left, accRect.left); + return accRect; + }, getClientRectFromMixedType(element, firstClippingParent)); + clippingRect.width = clippingRect.right - clippingRect.left; + clippingRect.height = clippingRect.bottom - clippingRect.top; + clippingRect.x = clippingRect.left; + clippingRect.y = clippingRect.top; + return clippingRect; + } + function getVariation(placement) { + return placement.split("-")[1]; + } + function getMainAxisFromPlacement(placement) { + return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y"; + } + function computeOffsets(_ref) { + var reference2 = _ref.reference, element = _ref.element, placement = _ref.placement; + var basePlacement = placement ? getBasePlacement(placement) : null; + var variation = placement ? getVariation(placement) : null; + var commonX = reference2.x + reference2.width / 2 - element.width / 2; + var commonY = reference2.y + reference2.height / 2 - element.height / 2; + var offsets; + switch (basePlacement) { + case top: + offsets = { + x: commonX, + y: reference2.y - element.height + }; + break; + case bottom: + offsets = { + x: commonX, + y: reference2.y + reference2.height + }; + break; + case right: + offsets = { + x: reference2.x + reference2.width, + y: commonY + }; + break; + case left: + offsets = { + x: reference2.x - element.width, + y: commonY + }; + break; + default: + offsets = { + x: reference2.x, + y: reference2.y + }; + } + var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null; + if (mainAxis != null) { + var len = mainAxis === "y" ? "height" : "width"; + switch (variation) { + case start: + offsets[mainAxis] = offsets[mainAxis] - (reference2[len] / 2 - element[len] / 2); + break; + case end: + offsets[mainAxis] = offsets[mainAxis] + (reference2[len] / 2 - element[len] / 2); + break; + } + } + return offsets; + } + function getFreshSideObject() { + return { + top: 0, + right: 0, + bottom: 0, + left: 0 + }; + } + function mergePaddingObject(paddingObject) { + return Object.assign({}, getFreshSideObject(), paddingObject); + } + function expandToHashMap(value, keys) { + return keys.reduce(function(hashMap, key) { + hashMap[key] = value; + return hashMap; + }, {}); + } + function detectOverflow(state, options) { + if (options === void 0) { + options = {}; + } + var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding; + var paddingObject = mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements)); + var altContext = elementContext === popper ? reference : popper; + var popperRect = state.rects.popper; + var element = state.elements[altBoundary ? altContext : elementContext]; + var clippingClientRect = getClippingRect(isElement2(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary); + var referenceClientRect = getBoundingClientRect(state.elements.reference); + var popperOffsets2 = computeOffsets({ + reference: referenceClientRect, + element: popperRect, + strategy: "absolute", + placement + }); + var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets2)); + var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; + var overflowOffsets = { + top: clippingClientRect.top - elementClientRect.top + paddingObject.top, + bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, + left: clippingClientRect.left - elementClientRect.left + paddingObject.left, + right: elementClientRect.right - clippingClientRect.right + paddingObject.right + }; + var offsetData = state.modifiersData.offset; + if (elementContext === popper && offsetData) { + var offset2 = offsetData[placement]; + Object.keys(overflowOffsets).forEach(function(key) { + var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1; + var axis = [top, bottom].indexOf(key) >= 0 ? "y" : "x"; + overflowOffsets[key] += offset2[axis] * multiply; + }); + } + return overflowOffsets; + } + var INVALID_ELEMENT_ERROR = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element."; + var INFINITE_LOOP_ERROR = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash."; + var DEFAULT_OPTIONS = { + placement: "bottom", + modifiers: [], + strategy: "absolute" + }; + function areValidElements() { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + return !args.some(function(element) { + return !(element && typeof element.getBoundingClientRect === "function"); + }); + } + function popperGenerator(generatorOptions) { + if (generatorOptions === void 0) { + generatorOptions = {}; + } + var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers2 = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2; + return function createPopper3(reference2, popper2, options) { + if (options === void 0) { + options = defaultOptions; + } + var state = { + placement: "bottom", + orderedModifiers: [], + options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), + modifiersData: {}, + elements: { + reference: reference2, + popper: popper2 + }, + attributes: {}, + styles: {} + }; + var effectCleanupFns = []; + var isDestroyed = false; + var instance = { + state, + setOptions: function setOptions(setOptionsAction) { + var options2 = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction; + cleanupModifierEffects(); + state.options = Object.assign({}, defaultOptions, state.options, options2); + state.scrollParents = { + reference: isElement2(reference2) ? listScrollParents(reference2) : reference2.contextElement ? listScrollParents(reference2.contextElement) : [], + popper: listScrollParents(popper2) + }; + var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers2, state.options.modifiers))); + state.orderedModifiers = orderedModifiers.filter(function(m) { + return m.enabled; + }); + if (true) { + var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function(_ref) { + var name = _ref.name; + return name; + }); + validateModifiers(modifiers); + if (getBasePlacement(state.options.placement) === auto) { + var flipModifier = state.orderedModifiers.find(function(_ref2) { + var name = _ref2.name; + return name === "flip"; + }); + if (!flipModifier) { + console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" ")); + } + } + var _getComputedStyle = getComputedStyle2(popper2), marginTop = _getComputedStyle.marginTop, marginRight = _getComputedStyle.marginRight, marginBottom = _getComputedStyle.marginBottom, marginLeft = _getComputedStyle.marginLeft; + if ([marginTop, marginRight, marginBottom, marginLeft].some(function(margin) { + return parseFloat(margin); + })) { + console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" ")); + } + } + runModifierEffects(); + return instance.update(); + }, + // Sync update – it will always be executed, even if not necessary. This + // is useful for low frequency updates where sync behavior simplifies the + // logic. + // For high frequency updates (e.g. `resize` and `scroll` events), always + // prefer the async Popper#update method + forceUpdate: function forceUpdate() { + if (isDestroyed) { + return; + } + var _state$elements = state.elements, reference3 = _state$elements.reference, popper3 = _state$elements.popper; + if (!areValidElements(reference3, popper3)) { + if (true) { + console.error(INVALID_ELEMENT_ERROR); + } + return; + } + state.rects = { + reference: getCompositeRect(reference3, getOffsetParent(popper3), state.options.strategy === "fixed"), + popper: getLayoutRect(popper3) + }; + state.reset = false; + state.placement = state.options.placement; + state.orderedModifiers.forEach(function(modifier) { + return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); + }); + var __debug_loops__ = 0; + for (var index = 0; index < state.orderedModifiers.length; index++) { + if (true) { + __debug_loops__ += 1; + if (__debug_loops__ > 100) { + console.error(INFINITE_LOOP_ERROR); + break; + } + } + if (state.reset === true) { + state.reset = false; + index = -1; + continue; + } + var _state$orderedModifie = state.orderedModifiers[index], fn = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name; + if (typeof fn === "function") { + state = fn({ + state, + options: _options, + name, + instance + }) || state; + } + } + }, + // Async and optimistically optimized update – it will not be executed if + // not necessary (debounced to run at most once-per-tick) + update: debounce(function() { + return new Promise(function(resolve) { + instance.forceUpdate(); + resolve(state); + }); + }), + destroy: function destroy() { + cleanupModifierEffects(); + isDestroyed = true; + } + }; + if (!areValidElements(reference2, popper2)) { + if (true) { + console.error(INVALID_ELEMENT_ERROR); + } + return instance; + } + instance.setOptions(options).then(function(state2) { + if (!isDestroyed && options.onFirstUpdate) { + options.onFirstUpdate(state2); + } + }); + function runModifierEffects() { + state.orderedModifiers.forEach(function(_ref3) { + var name = _ref3.name, _ref3$options = _ref3.options, options2 = _ref3$options === void 0 ? {} : _ref3$options, effect2 = _ref3.effect; + if (typeof effect2 === "function") { + var cleanupFn = effect2({ + state, + name, + instance, + options: options2 + }); + var noopFn = function noopFn2() { + }; + effectCleanupFns.push(cleanupFn || noopFn); + } + }); + } + function cleanupModifierEffects() { + effectCleanupFns.forEach(function(fn) { + return fn(); + }); + effectCleanupFns = []; + } + return instance; + }; + } + var passive = { + passive: true + }; + function effect$2(_ref) { + var state = _ref.state, instance = _ref.instance, options = _ref.options; + var _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? true : _options$resize; + var window2 = getWindow(state.elements.popper); + var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper); + if (scroll) { + scrollParents.forEach(function(scrollParent) { + scrollParent.addEventListener("scroll", instance.update, passive); + }); + } + if (resize) { + window2.addEventListener("resize", instance.update, passive); + } + return function() { + if (scroll) { + scrollParents.forEach(function(scrollParent) { + scrollParent.removeEventListener("scroll", instance.update, passive); + }); + } + if (resize) { + window2.removeEventListener("resize", instance.update, passive); + } + }; + } + var eventListeners = { + name: "eventListeners", + enabled: true, + phase: "write", + fn: function fn() { + }, + effect: effect$2, + data: {} + }; + function popperOffsets(_ref) { + var state = _ref.state, name = _ref.name; + state.modifiersData[name] = computeOffsets({ + reference: state.rects.reference, + element: state.rects.popper, + strategy: "absolute", + placement: state.placement + }); + } + var popperOffsets$1 = { + name: "popperOffsets", + enabled: true, + phase: "read", + fn: popperOffsets, + data: {} + }; + var unsetSides = { + top: "auto", + right: "auto", + bottom: "auto", + left: "auto" + }; + function roundOffsetsByDPR(_ref) { + var x = _ref.x, y = _ref.y; + var win = window; + var dpr = win.devicePixelRatio || 1; + return { + x: round(x * dpr) / dpr || 0, + y: round(y * dpr) / dpr || 0 + }; + } + function mapToStyles(_ref2) { + var _Object$assign2; + var popper2 = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed; + var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === "function" ? roundOffsets(offsets) : offsets, _ref3$x = _ref3.x, x = _ref3$x === void 0 ? 0 : _ref3$x, _ref3$y = _ref3.y, y = _ref3$y === void 0 ? 0 : _ref3$y; + var hasX = offsets.hasOwnProperty("x"); + var hasY = offsets.hasOwnProperty("y"); + var sideX = left; + var sideY = top; + var win = window; + if (adaptive) { + var offsetParent = getOffsetParent(popper2); + var heightProp = "clientHeight"; + var widthProp = "clientWidth"; + if (offsetParent === getWindow(popper2)) { + offsetParent = getDocumentElement(popper2); + if (getComputedStyle2(offsetParent).position !== "static" && position === "absolute") { + heightProp = "scrollHeight"; + widthProp = "scrollWidth"; + } + } + offsetParent = offsetParent; + if (placement === top || (placement === left || placement === right) && variation === end) { + sideY = bottom; + var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : ( + // $FlowFixMe[prop-missing] + offsetParent[heightProp] + ); + y -= offsetY - popperRect.height; + y *= gpuAcceleration ? 1 : -1; + } + if (placement === left || (placement === top || placement === bottom) && variation === end) { + sideX = right; + var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : ( + // $FlowFixMe[prop-missing] + offsetParent[widthProp] + ); + x -= offsetX - popperRect.width; + x *= gpuAcceleration ? 1 : -1; + } + } + var commonStyles = Object.assign({ + position + }, adaptive && unsetSides); + if (gpuAcceleration) { + var _Object$assign; + return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); + } + return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2)); + } + function computeStyles(_ref4) { + var state = _ref4.state, options = _ref4.options; + var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; + if (true) { + var transitionProperty = getComputedStyle2(state.elements.popper).transitionProperty || ""; + if (adaptive && ["transform", "top", "right", "bottom", "left"].some(function(property) { + return transitionProperty.indexOf(property) >= 0; + })) { + console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', "\n\n", 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", "\n\n", "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" ")); + } + } + var commonStyles = { + placement: getBasePlacement(state.placement), + variation: getVariation(state.placement), + popper: state.elements.popper, + popperRect: state.rects.popper, + gpuAcceleration, + isFixed: state.options.strategy === "fixed" + }; + if (state.modifiersData.popperOffsets != null) { + state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.popperOffsets, + position: state.options.strategy, + adaptive, + roundOffsets + }))); + } + if (state.modifiersData.arrow != null) { + state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { + offsets: state.modifiersData.arrow, + position: "absolute", + adaptive: false, + roundOffsets + }))); + } + state.attributes.popper = Object.assign({}, state.attributes.popper, { + "data-popper-placement": state.placement + }); + } + var computeStyles$1 = { + name: "computeStyles", + enabled: true, + phase: "beforeWrite", + fn: computeStyles, + data: {} + }; + function applyStyles(_ref) { + var state = _ref.state; + Object.keys(state.elements).forEach(function(name) { + var style = state.styles[name] || {}; + var attributes = state.attributes[name] || {}; + var element = state.elements[name]; + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } + Object.assign(element.style, style); + Object.keys(attributes).forEach(function(name2) { + var value = attributes[name2]; + if (value === false) { + element.removeAttribute(name2); + } else { + element.setAttribute(name2, value === true ? "" : value); + } + }); + }); + } + function effect$1(_ref2) { + var state = _ref2.state; + var initialStyles = { + popper: { + position: state.options.strategy, + left: "0", + top: "0", + margin: "0" + }, + arrow: { + position: "absolute" + }, + reference: {} + }; + Object.assign(state.elements.popper.style, initialStyles.popper); + state.styles = initialStyles; + if (state.elements.arrow) { + Object.assign(state.elements.arrow.style, initialStyles.arrow); + } + return function() { + Object.keys(state.elements).forEach(function(name) { + var element = state.elements[name]; + var attributes = state.attributes[name] || {}; + var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); + var style = styleProperties.reduce(function(style2, property) { + style2[property] = ""; + return style2; + }, {}); + if (!isHTMLElement(element) || !getNodeName(element)) { + return; + } + Object.assign(element.style, style); + Object.keys(attributes).forEach(function(attribute) { + element.removeAttribute(attribute); + }); + }); + }; + } + var applyStyles$1 = { + name: "applyStyles", + enabled: true, + phase: "write", + fn: applyStyles, + effect: effect$1, + requires: ["computeStyles"] + }; + function distanceAndSkiddingToXY(placement, rects, offset2) { + var basePlacement = getBasePlacement(placement); + var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1; + var _ref = typeof offset2 === "function" ? offset2(Object.assign({}, rects, { + placement + })) : offset2, skidding = _ref[0], distance = _ref[1]; + skidding = skidding || 0; + distance = (distance || 0) * invertDistance; + return [left, right].indexOf(basePlacement) >= 0 ? { + x: distance, + y: skidding + } : { + x: skidding, + y: distance + }; + } + function offset(_ref2) { + var state = _ref2.state, options = _ref2.options, name = _ref2.name; + var _options$offset = options.offset, offset2 = _options$offset === void 0 ? [0, 0] : _options$offset; + var data = placements.reduce(function(acc, placement) { + acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset2); + return acc; + }, {}); + var _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y; + if (state.modifiersData.popperOffsets != null) { + state.modifiersData.popperOffsets.x += x; + state.modifiersData.popperOffsets.y += y; + } + state.modifiersData[name] = data; + } + var offset$1 = { + name: "offset", + enabled: true, + phase: "main", + requires: ["popperOffsets"], + fn: offset + }; + var hash$1 = { + left: "right", + right: "left", + bottom: "top", + top: "bottom" + }; + function getOppositePlacement(placement) { + return placement.replace(/left|right|bottom|top/g, function(matched) { + return hash$1[matched]; + }); + } + var hash = { + start: "end", + end: "start" + }; + function getOppositeVariationPlacement(placement) { + return placement.replace(/start|end/g, function(matched) { + return hash[matched]; + }); + } + function computeAutoPlacement(state, options) { + if (options === void 0) { + options = {}; + } + var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP; + var variation = getVariation(placement); + var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function(placement2) { + return getVariation(placement2) === variation; + }) : basePlacements; + var allowedPlacements = placements$1.filter(function(placement2) { + return allowedAutoPlacements.indexOf(placement2) >= 0; + }); + if (allowedPlacements.length === 0) { + allowedPlacements = placements$1; + if (true) { + console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" ")); + } + } + var overflows = allowedPlacements.reduce(function(acc, placement2) { + acc[placement2] = detectOverflow(state, { + placement: placement2, + boundary, + rootBoundary, + padding + })[getBasePlacement(placement2)]; + return acc; + }, {}); + return Object.keys(overflows).sort(function(a, b) { + return overflows[a] - overflows[b]; + }); + } + function getExpandedFallbackPlacements(placement) { + if (getBasePlacement(placement) === auto) { + return []; + } + var oppositePlacement = getOppositePlacement(placement); + return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; + } + function flip(_ref) { + var state = _ref.state, options = _ref.options, name = _ref.name; + if (state.modifiersData[name]._skip) { + return; + } + var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements; + var preferredPlacement = state.options.placement; + var basePlacement = getBasePlacement(preferredPlacement); + var isBasePlacement = basePlacement === preferredPlacement; + var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)); + var placements2 = [preferredPlacement].concat(fallbackPlacements).reduce(function(acc, placement2) { + return acc.concat(getBasePlacement(placement2) === auto ? computeAutoPlacement(state, { + placement: placement2, + boundary, + rootBoundary, + padding, + flipVariations, + allowedAutoPlacements + }) : placement2); + }, []); + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var checksMap = /* @__PURE__ */ new Map(); + var makeFallbackChecks = true; + var firstFittingPlacement = placements2[0]; + for (var i = 0; i < placements2.length; i++) { + var placement = placements2[i]; + var _basePlacement = getBasePlacement(placement); + var isStartVariation = getVariation(placement) === start; + var isVertical = [top, bottom].indexOf(_basePlacement) >= 0; + var len = isVertical ? "width" : "height"; + var overflow = detectOverflow(state, { + placement, + boundary, + rootBoundary, + altBoundary, + padding + }); + var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top; + if (referenceRect[len] > popperRect[len]) { + mainVariationSide = getOppositePlacement(mainVariationSide); + } + var altVariationSide = getOppositePlacement(mainVariationSide); + var checks = []; + if (checkMainAxis) { + checks.push(overflow[_basePlacement] <= 0); + } + if (checkAltAxis) { + checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0); + } + if (checks.every(function(check) { + return check; + })) { + firstFittingPlacement = placement; + makeFallbackChecks = false; + break; + } + checksMap.set(placement, checks); + } + if (makeFallbackChecks) { + var numberOfChecks = flipVariations ? 3 : 1; + var _loop = function _loop2(_i2) { + var fittingPlacement = placements2.find(function(placement2) { + var checks2 = checksMap.get(placement2); + if (checks2) { + return checks2.slice(0, _i2).every(function(check) { + return check; + }); + } + }); + if (fittingPlacement) { + firstFittingPlacement = fittingPlacement; + return "break"; + } + }; + for (var _i = numberOfChecks; _i > 0; _i--) { + var _ret = _loop(_i); + if (_ret === "break") break; + } + } + if (state.placement !== firstFittingPlacement) { + state.modifiersData[name]._skip = true; + state.placement = firstFittingPlacement; + state.reset = true; + } + } + var flip$1 = { + name: "flip", + enabled: true, + phase: "main", + fn: flip, + requiresIfExists: ["offset"], + data: { + _skip: false + } + }; + function getAltAxis(axis) { + return axis === "x" ? "y" : "x"; + } + function within(min$1, value, max$1) { + return max(min$1, min(value, max$1)); + } + function withinMaxClamp(min2, value, max2) { + var v = within(min2, value, max2); + return v > max2 ? max2 : v; + } + function preventOverflow(_ref) { + var state = _ref.state, options = _ref.options, name = _ref.name; + var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset; + var overflow = detectOverflow(state, { + boundary, + rootBoundary, + padding, + altBoundary + }); + var basePlacement = getBasePlacement(state.placement); + var variation = getVariation(state.placement); + var isBasePlacement = !variation; + var mainAxis = getMainAxisFromPlacement(basePlacement); + var altAxis = getAltAxis(mainAxis); + var popperOffsets2 = state.modifiersData.popperOffsets; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var tetherOffsetValue = typeof tetherOffset === "function" ? tetherOffset(Object.assign({}, state.rects, { + placement: state.placement + })) : tetherOffset; + var normalizedTetherOffsetValue = typeof tetherOffsetValue === "number" ? { + mainAxis: tetherOffsetValue, + altAxis: tetherOffsetValue + } : Object.assign({ + mainAxis: 0, + altAxis: 0 + }, tetherOffsetValue); + var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null; + var data = { + x: 0, + y: 0 + }; + if (!popperOffsets2) { + return; + } + if (checkMainAxis) { + var _offsetModifierState$; + var mainSide = mainAxis === "y" ? top : left; + var altSide = mainAxis === "y" ? bottom : right; + var len = mainAxis === "y" ? "height" : "width"; + var offset2 = popperOffsets2[mainAxis]; + var min$1 = offset2 + overflow[mainSide]; + var max$1 = offset2 - overflow[altSide]; + var additive = tether ? -popperRect[len] / 2 : 0; + var minLen = variation === start ? referenceRect[len] : popperRect[len]; + var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; + var arrowElement = state.elements.arrow; + var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { + width: 0, + height: 0 + }; + var arrowPaddingObject = state.modifiersData["arrow#persistent"] ? state.modifiersData["arrow#persistent"].padding : getFreshSideObject(); + var arrowPaddingMin = arrowPaddingObject[mainSide]; + var arrowPaddingMax = arrowPaddingObject[altSide]; + var arrowLen = within(0, referenceRect[len], arrowRect[len]); + var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis; + var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; + var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); + var clientOffset = arrowOffsetParent ? mainAxis === "y" ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; + var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0; + var tetherMin = offset2 + minOffset - offsetModifierValue - clientOffset; + var tetherMax = offset2 + maxOffset - offsetModifierValue; + var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset2, tether ? max(max$1, tetherMax) : max$1); + popperOffsets2[mainAxis] = preventedOffset; + data[mainAxis] = preventedOffset - offset2; + } + if (checkAltAxis) { + var _offsetModifierState$2; + var _mainSide = mainAxis === "x" ? top : left; + var _altSide = mainAxis === "x" ? bottom : right; + var _offset = popperOffsets2[altAxis]; + var _len = altAxis === "y" ? "height" : "width"; + var _min = _offset + overflow[_mainSide]; + var _max = _offset - overflow[_altSide]; + var isOriginSide = [top, left].indexOf(basePlacement) !== -1; + var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0; + var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis; + var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max; + var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max); + popperOffsets2[altAxis] = _preventedOffset; + data[altAxis] = _preventedOffset - _offset; + } + state.modifiersData[name] = data; + } + var preventOverflow$1 = { + name: "preventOverflow", + enabled: true, + phase: "main", + fn: preventOverflow, + requiresIfExists: ["offset"] + }; + var toPaddingObject = function toPaddingObject2(padding, state) { + padding = typeof padding === "function" ? padding(Object.assign({}, state.rects, { + placement: state.placement + })) : padding; + return mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements)); + }; + function arrow(_ref) { + var _state$modifiersData$; + var state = _ref.state, name = _ref.name, options = _ref.options; + var arrowElement = state.elements.arrow; + var popperOffsets2 = state.modifiersData.popperOffsets; + var basePlacement = getBasePlacement(state.placement); + var axis = getMainAxisFromPlacement(basePlacement); + var isVertical = [left, right].indexOf(basePlacement) >= 0; + var len = isVertical ? "height" : "width"; + if (!arrowElement || !popperOffsets2) { + return; + } + var paddingObject = toPaddingObject(options.padding, state); + var arrowRect = getLayoutRect(arrowElement); + var minProp = axis === "y" ? top : left; + var maxProp = axis === "y" ? bottom : right; + var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets2[axis] - state.rects.popper[len]; + var startDiff = popperOffsets2[axis] - state.rects.reference[axis]; + var arrowOffsetParent = getOffsetParent(arrowElement); + var clientSize = arrowOffsetParent ? axis === "y" ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0; + var centerToReference = endDiff / 2 - startDiff / 2; + var min2 = paddingObject[minProp]; + var max2 = clientSize - arrowRect[len] - paddingObject[maxProp]; + var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference; + var offset2 = within(min2, center, max2); + var axisProp = axis; + state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset2, _state$modifiersData$.centerOffset = offset2 - center, _state$modifiersData$); + } + function effect(_ref2) { + var state = _ref2.state, options = _ref2.options; + var _options$element = options.element, arrowElement = _options$element === void 0 ? "[data-popper-arrow]" : _options$element; + if (arrowElement == null) { + return; + } + if (typeof arrowElement === "string") { + arrowElement = state.elements.popper.querySelector(arrowElement); + if (!arrowElement) { + return; + } + } + if (true) { + if (!isHTMLElement(arrowElement)) { + console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', "To use an SVG arrow, wrap it in an HTMLElement that will be used as", "the arrow."].join(" ")); + } + } + if (!contains(state.elements.popper, arrowElement)) { + if (true) { + console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" ")); + } + return; + } + state.elements.arrow = arrowElement; + } + var arrow$1 = { + name: "arrow", + enabled: true, + phase: "main", + fn: arrow, + effect, + requires: ["popperOffsets"], + requiresIfExists: ["preventOverflow"] + }; + function getSideOffsets(overflow, rect, preventedOffsets) { + if (preventedOffsets === void 0) { + preventedOffsets = { + x: 0, + y: 0 + }; + } + return { + top: overflow.top - rect.height - preventedOffsets.y, + right: overflow.right - rect.width + preventedOffsets.x, + bottom: overflow.bottom - rect.height + preventedOffsets.y, + left: overflow.left - rect.width - preventedOffsets.x + }; + } + function isAnySideFullyClipped(overflow) { + return [top, right, bottom, left].some(function(side) { + return overflow[side] >= 0; + }); + } + function hide(_ref) { + var state = _ref.state, name = _ref.name; + var referenceRect = state.rects.reference; + var popperRect = state.rects.popper; + var preventedOffsets = state.modifiersData.preventOverflow; + var referenceOverflow = detectOverflow(state, { + elementContext: "reference" + }); + var popperAltOverflow = detectOverflow(state, { + altBoundary: true + }); + var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect); + var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets); + var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets); + var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); + state.modifiersData[name] = { + referenceClippingOffsets, + popperEscapeOffsets, + isReferenceHidden, + hasPopperEscaped + }; + state.attributes.popper = Object.assign({}, state.attributes.popper, { + "data-popper-reference-hidden": isReferenceHidden, + "data-popper-escaped": hasPopperEscaped + }); + } + var hide$1 = { + name: "hide", + enabled: true, + phase: "main", + requiresIfExists: ["preventOverflow"], + fn: hide + }; + var defaultModifiers$1 = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1]; + var createPopper$1 = /* @__PURE__ */ popperGenerator({ + defaultModifiers: defaultModifiers$1 + }); + var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1]; + var createPopper2 = /* @__PURE__ */ popperGenerator({ + defaultModifiers + }); + exports.applyStyles = applyStyles$1; + exports.arrow = arrow$1; + exports.computeStyles = computeStyles$1; + exports.createPopper = createPopper2; + exports.createPopperLite = createPopper$1; + exports.defaultModifiers = defaultModifiers; + exports.detectOverflow = detectOverflow; + exports.eventListeners = eventListeners; + exports.flip = flip$1; + exports.hide = hide$1; + exports.offset = offset$1; + exports.popperGenerator = popperGenerator; + exports.popperOffsets = popperOffsets$1; + exports.preventOverflow = preventOverflow$1; + } + }); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/data.js + var elementMap = /* @__PURE__ */ new Map(); + var data_default = { + set(element, key, instance) { + if (!elementMap.has(element)) { + elementMap.set(element, /* @__PURE__ */ new Map()); + } + const instanceMap = elementMap.get(element); + if (!instanceMap.has(key) && instanceMap.size !== 0) { + console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`); + return; + } + instanceMap.set(key, instance); + }, + get(element, key) { + if (elementMap.has(element)) { + return elementMap.get(element).get(key) || null; + } + return null; + }, + remove(element, key) { + if (!elementMap.has(element)) { + return; + } + const instanceMap = elementMap.get(element); + instanceMap.delete(key); + if (instanceMap.size === 0) { + elementMap.delete(element); + } + } + }; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/index.js + var MAX_UID = 1e6; + var MILLISECONDS_MULTIPLIER = 1e3; + var TRANSITION_END = "transitionend"; + var parseSelector = (selector2) => { + if (selector2 && window.CSS && window.CSS.escape) { + selector2 = selector2.replace(/#([^\s"#']+)/g, (match, id) => `#${CSS.escape(id)}`); + } + return selector2; + }; + var toType = (object) => { + if (object === null || object === void 0) { + return `${object}`; + } + return Object.prototype.toString.call(object).match(/\s([a-z]+)/i)[1].toLowerCase(); + }; + var getUID = (prefix) => { + do { + prefix += Math.floor(Math.random() * MAX_UID); + } while (document.getElementById(prefix)); + return prefix; + }; + var getTransitionDurationFromElement = (element) => { + if (!element) { + return 0; + } + let { transitionDuration, transitionDelay } = window.getComputedStyle(element); + const floatTransitionDuration = Number.parseFloat(transitionDuration); + const floatTransitionDelay = Number.parseFloat(transitionDelay); + if (!floatTransitionDuration && !floatTransitionDelay) { + return 0; + } + transitionDuration = transitionDuration.split(",")[0]; + transitionDelay = transitionDelay.split(",")[0]; + return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; + }; + var triggerTransitionEnd = (element) => { + element.dispatchEvent(new Event(TRANSITION_END)); + }; + var isElement = (object) => { + if (!object || typeof object !== "object") { + return false; + } + if (typeof object.jquery !== "undefined") { + object = object[0]; + } + return typeof object.nodeType !== "undefined"; + }; + var getElement = (object) => { + if (isElement(object)) { + return object.jquery ? object[0] : object; + } + if (typeof object === "string" && object.length > 0) { + return document.querySelector(parseSelector(object)); + } + return null; + }; + var isVisible = (element) => { + if (!isElement(element) || element.getClientRects().length === 0) { + return false; + } + const elementIsVisible = getComputedStyle(element).getPropertyValue("visibility") === "visible"; + const closedDetails = element.closest("details:not([open])"); + if (!closedDetails) { + return elementIsVisible; + } + if (closedDetails !== element) { + const summary = element.closest("summary"); + if (summary && summary.parentNode !== closedDetails) { + return false; + } + if (summary === null) { + return false; + } + } + return elementIsVisible; + }; + var isDisabled = (element) => { + if (!element || element.nodeType !== Node.ELEMENT_NODE) { + return true; + } + if (element.classList.contains("disabled")) { + return true; + } + if (typeof element.disabled !== "undefined") { + return element.disabled; + } + return element.hasAttribute("disabled") && element.getAttribute("disabled") !== "false"; + }; + var findShadowRoot = (element) => { + if (!document.documentElement.attachShadow) { + return null; + } + if (typeof element.getRootNode === "function") { + const root = element.getRootNode(); + return root instanceof ShadowRoot ? root : null; + } + if (element instanceof ShadowRoot) { + return element; + } + if (!element.parentNode) { + return null; + } + return findShadowRoot(element.parentNode); + }; + var noop = () => { + }; + var reflow = (element) => { + element.offsetHeight; + }; + var getjQuery = () => { + if (window.jQuery && !document.body.hasAttribute("data-bs-no-jquery")) { + return window.jQuery; + } + return null; + }; + var DOMContentLoadedCallbacks = []; + var onDOMContentLoaded = (callback) => { + if (document.readyState === "loading") { + if (!DOMContentLoadedCallbacks.length) { + document.addEventListener("DOMContentLoaded", () => { + for (const callback2 of DOMContentLoadedCallbacks) { + callback2(); + } + }); + } + DOMContentLoadedCallbacks.push(callback); + } else { + callback(); + } + }; + var isRTL = () => document.documentElement.dir === "rtl"; + var defineJQueryPlugin = (plugin) => { + onDOMContentLoaded(() => { + const $ = getjQuery(); + if ($) { + const name = plugin.NAME; + const JQUERY_NO_CONFLICT = $.fn[name]; + $.fn[name] = plugin.jQueryInterface; + $.fn[name].Constructor = plugin; + $.fn[name].noConflict = () => { + $.fn[name] = JQUERY_NO_CONFLICT; + return plugin.jQueryInterface; + }; + } + }); + }; + var execute = (possibleCallback, args = [], defaultValue = possibleCallback) => { + return typeof possibleCallback === "function" ? possibleCallback.call(...args) : defaultValue; + }; + var executeAfterTransition = (callback, transitionElement, waitForTransition = true) => { + if (!waitForTransition) { + execute(callback); + return; + } + const durationPadding = 5; + const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding; + let called = false; + const handler = ({ target }) => { + if (target !== transitionElement) { + return; + } + called = true; + transitionElement.removeEventListener(TRANSITION_END, handler); + execute(callback); + }; + transitionElement.addEventListener(TRANSITION_END, handler); + setTimeout(() => { + if (!called) { + triggerTransitionEnd(transitionElement); + } + }, emulatedDuration); + }; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/event-handler.js + var namespaceRegex = /[^.]*(?=\..*)\.|.*/; + var stripNameRegex = /\..*/; + var stripUidRegex = /::\d+$/; + var eventRegistry = {}; + var uidEvent = 1; + var customEvents = { + mouseenter: "mouseover", + mouseleave: "mouseout" + }; + var nativeEvents = /* @__PURE__ */ new Set([ + "click", + "dblclick", + "mouseup", + "mousedown", + "contextmenu", + "mousewheel", + "DOMMouseScroll", + "mouseover", + "mouseout", + "mousemove", + "selectstart", + "selectend", + "keydown", + "keypress", + "keyup", + "orientationchange", + "touchstart", + "touchmove", + "touchend", + "touchcancel", + "pointerdown", + "pointermove", + "pointerup", + "pointerleave", + "pointercancel", + "gesturestart", + "gesturechange", + "gestureend", + "focus", + "blur", + "change", + "reset", + "select", + "submit", + "focusin", + "focusout", + "load", + "unload", + "beforeunload", + "resize", + "move", + "DOMContentLoaded", + "readystatechange", + "error", + "abort", + "scroll" + ]); + function makeEventUid(element, uid) { + return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++; + } + function getElementEvents(element) { + const uid = makeEventUid(element); + element.uidEvent = uid; + eventRegistry[uid] = eventRegistry[uid] || {}; + return eventRegistry[uid]; + } + function bootstrapHandler(element, fn) { + return function handler(event) { + hydrateObj(event, { delegateTarget: element }); + if (handler.oneOff) { + EventHandler.off(element, event.type, fn); + } + return fn.apply(element, [event]); + }; + } + function bootstrapDelegationHandler(element, selector2, fn) { + return function handler(event) { + const domElements = element.querySelectorAll(selector2); + for (let { target } = event; target && target !== this; target = target.parentNode) { + for (const domElement of domElements) { + if (domElement !== target) { + continue; + } + hydrateObj(event, { delegateTarget: target }); + if (handler.oneOff) { + EventHandler.off(element, event.type, selector2, fn); + } + return fn.apply(target, [event]); + } + } + }; + } + function findHandler(events, callable, delegationSelector = null) { + return Object.values(events).find((event) => event.callable === callable && event.delegationSelector === delegationSelector); + } + function normalizeParameters(originalTypeEvent, handler, delegationFunction) { + const isDelegated = typeof handler === "string"; + const callable = isDelegated ? delegationFunction : handler || delegationFunction; + let typeEvent = getTypeEvent(originalTypeEvent); + if (!nativeEvents.has(typeEvent)) { + typeEvent = originalTypeEvent; + } + return [isDelegated, callable, typeEvent]; + } + function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) { + if (typeof originalTypeEvent !== "string" || !element) { + return; + } + let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); + if (originalTypeEvent in customEvents) { + const wrapFunction = (fn2) => { + return function(event) { + if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) { + return fn2.call(this, event); + } + }; + }; + callable = wrapFunction(callable); + } + const events = getElementEvents(element); + const handlers = events[typeEvent] || (events[typeEvent] = {}); + const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null); + if (previousFunction) { + previousFunction.oneOff = previousFunction.oneOff && oneOff; + return; + } + const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, "")); + const fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable); + fn.delegationSelector = isDelegated ? handler : null; + fn.callable = callable; + fn.oneOff = oneOff; + fn.uidEvent = uid; + handlers[uid] = fn; + element.addEventListener(typeEvent, fn, isDelegated); + } + function removeHandler(element, events, typeEvent, handler, delegationSelector) { + const fn = findHandler(events[typeEvent], handler, delegationSelector); + if (!fn) { + return; + } + element.removeEventListener(typeEvent, fn, Boolean(delegationSelector)); + delete events[typeEvent][fn.uidEvent]; + } + function removeNamespacedHandlers(element, events, typeEvent, namespace) { + const storeElementEvent = events[typeEvent] || {}; + for (const [handlerKey, event] of Object.entries(storeElementEvent)) { + if (handlerKey.includes(namespace)) { + removeHandler(element, events, typeEvent, event.callable, event.delegationSelector); + } + } + } + function getTypeEvent(event) { + event = event.replace(stripNameRegex, ""); + return customEvents[event] || event; + } + var EventHandler = { + on(element, event, handler, delegationFunction) { + addHandler(element, event, handler, delegationFunction, false); + }, + one(element, event, handler, delegationFunction) { + addHandler(element, event, handler, delegationFunction, true); + }, + off(element, originalTypeEvent, handler, delegationFunction) { + if (typeof originalTypeEvent !== "string" || !element) { + return; + } + const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); + const inNamespace = typeEvent !== originalTypeEvent; + const events = getElementEvents(element); + const storeElementEvent = events[typeEvent] || {}; + const isNamespace = originalTypeEvent.startsWith("."); + if (typeof callable !== "undefined") { + if (!Object.keys(storeElementEvent).length) { + return; + } + removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null); + return; + } + if (isNamespace) { + for (const elementEvent of Object.keys(events)) { + removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1)); + } + } + for (const [keyHandlers, event] of Object.entries(storeElementEvent)) { + const handlerKey = keyHandlers.replace(stripUidRegex, ""); + if (!inNamespace || originalTypeEvent.includes(handlerKey)) { + removeHandler(element, events, typeEvent, event.callable, event.delegationSelector); + } + } + }, + trigger(element, event, args) { + if (typeof event !== "string" || !element) { + return null; + } + const $ = getjQuery(); + const typeEvent = getTypeEvent(event); + const inNamespace = event !== typeEvent; + let jQueryEvent = null; + let bubbles = true; + let nativeDispatch = true; + let defaultPrevented = false; + if (inNamespace && $) { + jQueryEvent = $.Event(event, args); + $(element).trigger(jQueryEvent); + bubbles = !jQueryEvent.isPropagationStopped(); + nativeDispatch = !jQueryEvent.isImmediatePropagationStopped(); + defaultPrevented = jQueryEvent.isDefaultPrevented(); + } + const evt = hydrateObj(new Event(event, { bubbles, cancelable: true }), args); + if (defaultPrevented) { + evt.preventDefault(); + } + if (nativeDispatch) { + element.dispatchEvent(evt); + } + if (evt.defaultPrevented && jQueryEvent) { + jQueryEvent.preventDefault(); + } + return evt; + } + }; + function hydrateObj(obj, meta = {}) { + for (const [key, value] of Object.entries(meta)) { + try { + obj[key] = value; + } catch (e) { + Object.defineProperty(obj, key, { + configurable: true, + get() { + return value; + } + }); + } + } + return obj; + } + var event_handler_default = EventHandler; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/manipulator.js + function normalizeData(value) { + if (value === "true") { + return true; + } + if (value === "false") { + return false; + } + if (value === Number(value).toString()) { + return Number(value); + } + if (value === "" || value === "null") { + return null; + } + if (typeof value !== "string") { + return value; + } + try { + return JSON.parse(decodeURIComponent(value)); + } catch (e) { + return value; + } + } + function normalizeDataKey(key) { + return key.replace(/[A-Z]/g, (chr) => `-${chr.toLowerCase()}`); + } + var Manipulator = { + setDataAttribute(element, key, value) { + element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value); + }, + removeDataAttribute(element, key) { + element.removeAttribute(`data-bs-${normalizeDataKey(key)}`); + }, + getDataAttributes(element) { + if (!element) { + return {}; + } + const attributes = {}; + const bsKeys = Object.keys(element.dataset).filter((key) => key.startsWith("bs") && !key.startsWith("bsConfig")); + for (const key of bsKeys) { + let pureKey = key.replace(/^bs/, ""); + pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1); + attributes[pureKey] = normalizeData(element.dataset[key]); + } + return attributes; + }, + getDataAttribute(element, key) { + return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`)); + } + }; + var manipulator_default = Manipulator; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/config.js + var Config = class { + // Getters + static get Default() { + return {}; + } + static get DefaultType() { + return {}; + } + static get NAME() { + throw new Error('You have to implement the static method "NAME", for each component!'); + } + _getConfig(config) { + config = this._mergeConfigObj(config); + config = this._configAfterMerge(config); + this._typeCheckConfig(config); + return config; + } + _configAfterMerge(config) { + return config; + } + _mergeConfigObj(config, element) { + const jsonConfig = isElement(element) ? manipulator_default.getDataAttribute(element, "config") : {}; + return __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, this.constructor.Default), typeof jsonConfig === "object" ? jsonConfig : {}), isElement(element) ? manipulator_default.getDataAttributes(element) : {}), typeof config === "object" ? config : {}); + } + _typeCheckConfig(config, configTypes = this.constructor.DefaultType) { + for (const [property, expectedTypes] of Object.entries(configTypes)) { + const value = config[property]; + const valueType = isElement(value) ? "element" : toType(value); + if (!new RegExp(expectedTypes).test(valueType)) { + throw new TypeError( + `${this.constructor.NAME.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".` + ); + } + } + } + }; + var config_default = Config; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/base-component.js + var VERSION = "5.3.8"; + var BaseComponent = class extends config_default { + constructor(element, config) { + super(); + element = getElement(element); + if (!element) { + return; + } + this._element = element; + this._config = this._getConfig(config); + data_default.set(this._element, this.constructor.DATA_KEY, this); + } + // Public + dispose() { + data_default.remove(this._element, this.constructor.DATA_KEY); + event_handler_default.off(this._element, this.constructor.EVENT_KEY); + for (const propertyName of Object.getOwnPropertyNames(this)) { + this[propertyName] = null; + } + } + // Private + _queueCallback(callback, element, isAnimated = true) { + executeAfterTransition(callback, element, isAnimated); + } + _getConfig(config) { + config = this._mergeConfigObj(config, this._element); + config = this._configAfterMerge(config); + this._typeCheckConfig(config); + return config; + } + // Static + static getInstance(element) { + return data_default.get(getElement(element), this.DATA_KEY); + } + static getOrCreateInstance(element, config = {}) { + return this.getInstance(element) || new this(element, typeof config === "object" ? config : null); + } + static get VERSION() { + return VERSION; + } + static get DATA_KEY() { + return `bs.${this.NAME}`; + } + static get EVENT_KEY() { + return `.${this.DATA_KEY}`; + } + static eventName(name) { + return `${name}${this.EVENT_KEY}`; + } + }; + var base_component_default = BaseComponent; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/dom/selector-engine.js + var getSelector = (element) => { + let selector2 = element.getAttribute("data-bs-target"); + if (!selector2 || selector2 === "#") { + let hrefAttribute = element.getAttribute("href"); + if (!hrefAttribute || !hrefAttribute.includes("#") && !hrefAttribute.startsWith(".")) { + return null; + } + if (hrefAttribute.includes("#") && !hrefAttribute.startsWith("#")) { + hrefAttribute = `#${hrefAttribute.split("#")[1]}`; + } + selector2 = hrefAttribute && hrefAttribute !== "#" ? hrefAttribute.trim() : null; + } + return selector2 ? selector2.split(",").map((sel) => parseSelector(sel)).join(",") : null; + }; + var SelectorEngine = { + find(selector2, element = document.documentElement) { + return [].concat(...Element.prototype.querySelectorAll.call(element, selector2)); + }, + findOne(selector2, element = document.documentElement) { + return Element.prototype.querySelector.call(element, selector2); + }, + children(element, selector2) { + return [].concat(...element.children).filter((child) => child.matches(selector2)); + }, + parents(element, selector2) { + const parents = []; + let ancestor = element.parentNode.closest(selector2); + while (ancestor) { + parents.push(ancestor); + ancestor = ancestor.parentNode.closest(selector2); + } + return parents; + }, + prev(element, selector2) { + let previous = element.previousElementSibling; + while (previous) { + if (previous.matches(selector2)) { + return [previous]; + } + previous = previous.previousElementSibling; + } + return []; + }, + // TODO: this is now unused; remove later along with prev() + next(element, selector2) { + let next = element.nextElementSibling; + while (next) { + if (next.matches(selector2)) { + return [next]; + } + next = next.nextElementSibling; + } + return []; + }, + focusableChildren(element) { + const focusables = [ + "a", + "button", + "input", + "textarea", + "select", + "details", + "[tabindex]", + '[contenteditable="true"]' + ].map((selector2) => `${selector2}:not([tabindex^="-"])`).join(","); + return this.find(focusables, element).filter((el) => !isDisabled(el) && isVisible(el)); + }, + getSelectorFromElement(element) { + const selector2 = getSelector(element); + if (selector2) { + return SelectorEngine.findOne(selector2) ? selector2 : null; + } + return null; + }, + getElementFromSelector(element) { + const selector2 = getSelector(element); + return selector2 ? SelectorEngine.findOne(selector2) : null; + }, + getMultipleElementsFromSelector(element) { + const selector2 = getSelector(element); + return selector2 ? SelectorEngine.find(selector2) : []; + } + }; + var selector_engine_default = SelectorEngine; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/collapse.js + var NAME = "collapse"; + var DATA_KEY = "bs.collapse"; + var EVENT_KEY = `.${DATA_KEY}`; + var DATA_API_KEY = ".data-api"; + var EVENT_SHOW = `show${EVENT_KEY}`; + var EVENT_SHOWN = `shown${EVENT_KEY}`; + var EVENT_HIDE = `hide${EVENT_KEY}`; + var EVENT_HIDDEN = `hidden${EVENT_KEY}`; + var EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`; + var CLASS_NAME_SHOW = "show"; + var CLASS_NAME_COLLAPSE = "collapse"; + var CLASS_NAME_COLLAPSING = "collapsing"; + var CLASS_NAME_COLLAPSED = "collapsed"; + var CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`; + var CLASS_NAME_HORIZONTAL = "collapse-horizontal"; + var WIDTH = "width"; + var HEIGHT = "height"; + var SELECTOR_ACTIVES = ".collapse.show, .collapse.collapsing"; + var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]'; + var Default = { + parent: null, + toggle: true + }; + var DefaultType = { + parent: "(null|element)", + toggle: "boolean" + }; + var Collapse = class _Collapse extends base_component_default { + constructor(element, config) { + super(element, config); + this._isTransitioning = false; + this._triggerArray = []; + const toggleList = selector_engine_default.find(SELECTOR_DATA_TOGGLE); + for (const elem of toggleList) { + const selector2 = selector_engine_default.getSelectorFromElement(elem); + const filterElement = selector_engine_default.find(selector2).filter((foundElement) => foundElement === this._element); + if (selector2 !== null && filterElement.length) { + this._triggerArray.push(elem); + } + } + this._initializeChildren(); + if (!this._config.parent) { + this._addAriaAndCollapsedClass(this._triggerArray, this._isShown()); + } + if (this._config.toggle) { + this.toggle(); + } + } + // Getters + static get Default() { + return Default; + } + static get DefaultType() { + return DefaultType; + } + static get NAME() { + return NAME; + } + // Public + toggle() { + if (this._isShown()) { + this.hide(); + } else { + this.show(); + } + } + show() { + if (this._isTransitioning || this._isShown()) { + return; + } + let activeChildren = []; + if (this._config.parent) { + activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter((element) => element !== this._element).map((element) => _Collapse.getOrCreateInstance(element, { toggle: false })); + } + if (activeChildren.length && activeChildren[0]._isTransitioning) { + return; + } + const startEvent = event_handler_default.trigger(this._element, EVENT_SHOW); + if (startEvent.defaultPrevented) { + return; + } + for (const activeInstance of activeChildren) { + activeInstance.hide(); + } + const dimension = this._getDimension(); + this._element.classList.remove(CLASS_NAME_COLLAPSE); + this._element.classList.add(CLASS_NAME_COLLAPSING); + this._element.style[dimension] = 0; + this._addAriaAndCollapsedClass(this._triggerArray, true); + this._isTransitioning = true; + const complete = () => { + this._isTransitioning = false; + this._element.classList.remove(CLASS_NAME_COLLAPSING); + this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW); + this._element.style[dimension] = ""; + event_handler_default.trigger(this._element, EVENT_SHOWN); + }; + const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); + const scrollSize = `scroll${capitalizedDimension}`; + this._queueCallback(complete, this._element, true); + this._element.style[dimension] = `${this._element[scrollSize]}px`; + } + hide() { + if (this._isTransitioning || !this._isShown()) { + return; + } + const startEvent = event_handler_default.trigger(this._element, EVENT_HIDE); + if (startEvent.defaultPrevented) { + return; + } + const dimension = this._getDimension(); + this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`; + reflow(this._element); + this._element.classList.add(CLASS_NAME_COLLAPSING); + this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW); + for (const trigger of this._triggerArray) { + const element = selector_engine_default.getElementFromSelector(trigger); + if (element && !this._isShown(element)) { + this._addAriaAndCollapsedClass([trigger], false); + } + } + this._isTransitioning = true; + const complete = () => { + this._isTransitioning = false; + this._element.classList.remove(CLASS_NAME_COLLAPSING); + this._element.classList.add(CLASS_NAME_COLLAPSE); + event_handler_default.trigger(this._element, EVENT_HIDDEN); + }; + this._element.style[dimension] = ""; + this._queueCallback(complete, this._element, true); + } + // Private + _isShown(element = this._element) { + return element.classList.contains(CLASS_NAME_SHOW); + } + _configAfterMerge(config) { + config.toggle = Boolean(config.toggle); + config.parent = getElement(config.parent); + return config; + } + _getDimension() { + return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT; + } + _initializeChildren() { + if (!this._config.parent) { + return; + } + const children2 = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE); + for (const element of children2) { + const selected = selector_engine_default.getElementFromSelector(element); + if (selected) { + this._addAriaAndCollapsedClass([element], this._isShown(selected)); + } + } + } + _getFirstLevelChildren(selector2) { + const children2 = selector_engine_default.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent); + return selector_engine_default.find(selector2, this._config.parent).filter((element) => !children2.includes(element)); + } + _addAriaAndCollapsedClass(triggerArray, isOpen) { + if (!triggerArray.length) { + return; + } + for (const element of triggerArray) { + element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen); + element.setAttribute("aria-expanded", isOpen); + } + } + // Static + static jQueryInterface(config) { + const _config = {}; + if (typeof config === "string" && /show|hide/.test(config)) { + _config.toggle = false; + } + return this.each(function() { + const data = _Collapse.getOrCreateInstance(this, _config); + if (typeof config === "string") { + if (typeof data[config] === "undefined") { + throw new TypeError(`No method named "${config}"`); + } + data[config](); + } + }); + } + }; + event_handler_default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function(event) { + if (event.target.tagName === "A" || event.delegateTarget && event.delegateTarget.tagName === "A") { + event.preventDefault(); + } + for (const element of selector_engine_default.getMultipleElementsFromSelector(this)) { + Collapse.getOrCreateInstance(element, { toggle: false }).toggle(); + } + }); + defineJQueryPlugin(Collapse); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/category-collapse.js + var children = document.getElementsByClassName("collapse"); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/tooltip.js + var Popper = __toESM(require_popper()); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/sanitizer.js + var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i; + var DefaultAllowlist = { + // Global attributes allowed on any supplied element below. + "*": ["class", "dir", "id", "lang", "role", ARIA_ATTRIBUTE_PATTERN], + a: ["target", "href", "title", "rel"], + area: [], + b: [], + br: [], + col: [], + code: [], + dd: [], + div: [], + dl: [], + dt: [], + em: [], + hr: [], + h1: [], + h2: [], + h3: [], + h4: [], + h5: [], + h6: [], + i: [], + img: ["src", "srcset", "alt", "title", "width", "height"], + li: [], + ol: [], + p: [], + pre: [], + s: [], + small: [], + span: [], + sub: [], + sup: [], + strong: [], + u: [], + ul: [] + }; + var uriAttributes = /* @__PURE__ */ new Set([ + "background", + "cite", + "href", + "itemtype", + "longdesc", + "poster", + "src", + "xlink:href" + ]); + var SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i; + var allowedAttribute = (attribute, allowedAttributeList) => { + const attributeName = attribute.nodeName.toLowerCase(); + if (allowedAttributeList.includes(attributeName)) { + if (uriAttributes.has(attributeName)) { + return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue)); + } + return true; + } + return allowedAttributeList.filter((attributeRegex) => attributeRegex instanceof RegExp).some((regex) => regex.test(attributeName)); + }; + function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) { + if (!unsafeHtml.length) { + return unsafeHtml; + } + if (sanitizeFunction && typeof sanitizeFunction === "function") { + return sanitizeFunction(unsafeHtml); + } + const domParser = new window.DOMParser(); + const createdDocument = domParser.parseFromString(unsafeHtml, "text/html"); + const elements = [].concat(...createdDocument.body.querySelectorAll("*")); + for (const element of elements) { + const elementName = element.nodeName.toLowerCase(); + if (!Object.keys(allowList).includes(elementName)) { + element.remove(); + continue; + } + const attributeList = [].concat(...element.attributes); + const allowedAttributes = [].concat(allowList["*"] || [], allowList[elementName] || []); + for (const attribute of attributeList) { + if (!allowedAttribute(attribute, allowedAttributes)) { + element.removeAttribute(attribute.nodeName); + } + } + } + return createdDocument.body.innerHTML; + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/util/template-factory.js + var NAME2 = "TemplateFactory"; + var Default2 = { + allowList: DefaultAllowlist, + content: {}, + // { selector : text , selector2 : text2 , } + extraClass: "", + html: false, + sanitize: true, + sanitizeFn: null, + template: "
" + }; + var DefaultType2 = { + allowList: "object", + content: "object", + extraClass: "(string|function)", + html: "boolean", + sanitize: "boolean", + sanitizeFn: "(null|function)", + template: "string" + }; + var DefaultContentType = { + entry: "(string|element|function|null)", + selector: "(string|element)" + }; + var TemplateFactory = class extends config_default { + constructor(config) { + super(); + this._config = this._getConfig(config); + } + // Getters + static get Default() { + return Default2; + } + static get DefaultType() { + return DefaultType2; + } + static get NAME() { + return NAME2; + } + // Public + getContent() { + return Object.values(this._config.content).map((config) => this._resolvePossibleFunction(config)).filter(Boolean); + } + hasContent() { + return this.getContent().length > 0; + } + changeContent(content2) { + this._checkContent(content2); + this._config.content = __spreadValues(__spreadValues({}, this._config.content), content2); + return this; + } + toHtml() { + const templateWrapper = document.createElement("div"); + templateWrapper.innerHTML = this._maybeSanitize(this._config.template); + for (const [selector2, text] of Object.entries(this._config.content)) { + this._setContent(templateWrapper, text, selector2); + } + const template = templateWrapper.children[0]; + const extraClass = this._resolvePossibleFunction(this._config.extraClass); + if (extraClass) { + template.classList.add(...extraClass.split(" ")); + } + return template; + } + // Private + _typeCheckConfig(config) { + super._typeCheckConfig(config); + this._checkContent(config.content); + } + _checkContent(arg) { + for (const [selector2, content2] of Object.entries(arg)) { + super._typeCheckConfig({ selector: selector2, entry: content2 }, DefaultContentType); + } + } + _setContent(template, content2, selector2) { + const templateElement = selector_engine_default.findOne(selector2, template); + if (!templateElement) { + return; + } + content2 = this._resolvePossibleFunction(content2); + if (!content2) { + templateElement.remove(); + return; + } + if (isElement(content2)) { + this._putElementInTemplate(getElement(content2), templateElement); + return; + } + if (this._config.html) { + templateElement.innerHTML = this._maybeSanitize(content2); + return; + } + templateElement.textContent = content2; + } + _maybeSanitize(arg) { + return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg; + } + _resolvePossibleFunction(arg) { + return execute(arg, [void 0, this]); + } + _putElementInTemplate(element, templateElement) { + if (this._config.html) { + templateElement.innerHTML = ""; + templateElement.append(element); + return; + } + templateElement.textContent = element.textContent; + } + }; + var template_factory_default = TemplateFactory; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.8+incompatible/js/src/tooltip.js + var NAME3 = "tooltip"; + var DISALLOWED_ATTRIBUTES = /* @__PURE__ */ new Set(["sanitize", "allowList", "sanitizeFn"]); + var CLASS_NAME_FADE = "fade"; + var CLASS_NAME_MODAL = "modal"; + var CLASS_NAME_SHOW2 = "show"; + var SELECTOR_TOOLTIP_INNER = ".tooltip-inner"; + var SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`; + var EVENT_MODAL_HIDE = "hide.bs.modal"; + var TRIGGER_HOVER = "hover"; + var TRIGGER_FOCUS = "focus"; + var TRIGGER_CLICK = "click"; + var TRIGGER_MANUAL = "manual"; + var EVENT_HIDE2 = "hide"; + var EVENT_HIDDEN2 = "hidden"; + var EVENT_SHOW2 = "show"; + var EVENT_SHOWN2 = "shown"; + var EVENT_INSERTED = "inserted"; + var EVENT_CLICK = "click"; + var EVENT_FOCUSIN = "focusin"; + var EVENT_FOCUSOUT = "focusout"; + var EVENT_MOUSEENTER = "mouseenter"; + var EVENT_MOUSELEAVE = "mouseleave"; + var AttachmentMap = { + AUTO: "auto", + TOP: "top", + RIGHT: isRTL() ? "left" : "right", + BOTTOM: "bottom", + LEFT: isRTL() ? "right" : "left" + }; + var Default3 = { + allowList: DefaultAllowlist, + animation: true, + boundary: "clippingParents", + container: false, + customClass: "", + delay: 0, + fallbackPlacements: ["top", "right", "bottom", "left"], + html: false, + offset: [0, 6], + placement: "top", + popperConfig: null, + sanitize: true, + sanitizeFn: null, + selector: false, + template: '', + title: "", + trigger: "hover focus" + }; + var DefaultType3 = { + allowList: "object", + animation: "boolean", + boundary: "(string|element)", + container: "(string|element|boolean)", + customClass: "(string|function)", + delay: "(number|object)", + fallbackPlacements: "array", + html: "boolean", + offset: "(array|string|function)", + placement: "(string|function)", + popperConfig: "(null|object|function)", + sanitize: "boolean", + sanitizeFn: "(null|function)", + selector: "(string|boolean)", + template: "string", + title: "(string|element|function)", + trigger: "string" + }; + var Tooltip = class _Tooltip extends base_component_default { + constructor(element, config) { + if (typeof Popper === "undefined") { + throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)"); + } + super(element, config); + this._isEnabled = true; + this._timeout = 0; + this._isHovered = null; + this._activeTrigger = {}; + this._popper = null; + this._templateFactory = null; + this._newContent = null; + this.tip = null; + this._setListeners(); + if (!this._config.selector) { + this._fixTitle(); + } + } + // Getters + static get Default() { + return Default3; + } + static get DefaultType() { + return DefaultType3; + } + static get NAME() { + return NAME3; + } + // Public + enable() { + this._isEnabled = true; + } + disable() { + this._isEnabled = false; + } + toggleEnabled() { + this._isEnabled = !this._isEnabled; + } + toggle() { + if (!this._isEnabled) { + return; + } + if (this._isShown()) { + this._leave(); + return; + } + this._enter(); + } + dispose() { + clearTimeout(this._timeout); + event_handler_default.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler); + if (this._element.getAttribute("data-bs-original-title")) { + this._element.setAttribute("title", this._element.getAttribute("data-bs-original-title")); + } + this._disposePopper(); + super.dispose(); + } + show() { + if (this._element.style.display === "none") { + throw new Error("Please use show on visible elements"); + } + if (!(this._isWithContent() && this._isEnabled)) { + return; + } + const showEvent = event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_SHOW2)); + const shadowRoot = findShadowRoot(this._element); + const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element); + if (showEvent.defaultPrevented || !isInTheDom) { + return; + } + this._disposePopper(); + const tip = this._getTipElement(); + this._element.setAttribute("aria-describedby", tip.getAttribute("id")); + const { container } = this._config; + if (!this._element.ownerDocument.documentElement.contains(this.tip)) { + container.append(tip); + event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_INSERTED)); + } + this._popper = this._createPopper(tip); + tip.classList.add(CLASS_NAME_SHOW2); + if ("ontouchstart" in document.documentElement) { + for (const element of [].concat(...document.body.children)) { + event_handler_default.on(element, "mouseover", noop); + } + } + const complete = () => { + event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_SHOWN2)); + if (this._isHovered === false) { + this._leave(); + } + this._isHovered = false; + }; + this._queueCallback(complete, this.tip, this._isAnimated()); + } + hide() { + if (!this._isShown()) { + return; + } + const hideEvent = event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_HIDE2)); + if (hideEvent.defaultPrevented) { + return; + } + const tip = this._getTipElement(); + tip.classList.remove(CLASS_NAME_SHOW2); + if ("ontouchstart" in document.documentElement) { + for (const element of [].concat(...document.body.children)) { + event_handler_default.off(element, "mouseover", noop); + } + } + this._activeTrigger[TRIGGER_CLICK] = false; + this._activeTrigger[TRIGGER_FOCUS] = false; + this._activeTrigger[TRIGGER_HOVER] = false; + this._isHovered = null; + const complete = () => { + if (this._isWithActiveTrigger()) { + return; + } + if (!this._isHovered) { + this._disposePopper(); + } + this._element.removeAttribute("aria-describedby"); + event_handler_default.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN2)); + }; + this._queueCallback(complete, this.tip, this._isAnimated()); + } + update() { + if (this._popper) { + this._popper.update(); + } + } + // Protected + _isWithContent() { + return Boolean(this._getTitle()); + } + _getTipElement() { + if (!this.tip) { + this.tip = this._createTipElement(this._newContent || this._getContentForTemplate()); + } + return this.tip; + } + _createTipElement(content2) { + const tip = this._getTemplateFactory(content2).toHtml(); + if (!tip) { + return null; + } + tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW2); + tip.classList.add(`bs-${this.constructor.NAME}-auto`); + const tipId = getUID(this.constructor.NAME).toString(); + tip.setAttribute("id", tipId); + if (this._isAnimated()) { + tip.classList.add(CLASS_NAME_FADE); + } + return tip; + } + setContent(content2) { + this._newContent = content2; + if (this._isShown()) { + this._disposePopper(); + this.show(); + } + } + _getTemplateFactory(content2) { + if (this._templateFactory) { + this._templateFactory.changeContent(content2); + } else { + this._templateFactory = new template_factory_default(__spreadProps(__spreadValues({}, this._config), { + // the `content` var has to be after `this._config` + // to override config.content in case of popover + content: content2, + extraClass: this._resolvePossibleFunction(this._config.customClass) + })); + } + return this._templateFactory; + } + _getContentForTemplate() { + return { + [SELECTOR_TOOLTIP_INNER]: this._getTitle() + }; + } + _getTitle() { + return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute("data-bs-original-title"); + } + // Private + _initializeOnDelegatedTarget(event) { + return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig()); + } + _isAnimated() { + return this._config.animation || this.tip && this.tip.classList.contains(CLASS_NAME_FADE); + } + _isShown() { + return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW2); + } + _createPopper(tip) { + const placement = execute(this._config.placement, [this, tip, this._element]); + const attachment = AttachmentMap[placement.toUpperCase()]; + return Popper.createPopper(this._element, tip, this._getPopperConfig(attachment)); + } + _getOffset() { + const { offset } = this._config; + if (typeof offset === "string") { + return offset.split(",").map((value) => Number.parseInt(value, 10)); + } + if (typeof offset === "function") { + return (popperData) => offset(popperData, this._element); + } + return offset; + } + _resolvePossibleFunction(arg) { + return execute(arg, [this._element, this._element]); + } + _getPopperConfig(attachment) { + const defaultBsPopperConfig = { + placement: attachment, + modifiers: [ + { + name: "flip", + options: { + fallbackPlacements: this._config.fallbackPlacements + } + }, + { + name: "offset", + options: { + offset: this._getOffset() + } + }, + { + name: "preventOverflow", + options: { + boundary: this._config.boundary + } + }, + { + name: "arrow", + options: { + element: `.${this.constructor.NAME}-arrow` + } + }, + { + name: "preSetPlacement", + enabled: true, + phase: "beforeMain", + fn: (data) => { + this._getTipElement().setAttribute("data-popper-placement", data.state.placement); + } + } + ] + }; + return __spreadValues(__spreadValues({}, defaultBsPopperConfig), execute(this._config.popperConfig, [void 0, defaultBsPopperConfig])); + } + _setListeners() { + const triggers = this._config.trigger.split(" "); + for (const trigger of triggers) { + if (trigger === "click") { + event_handler_default.on(this._element, this.constructor.eventName(EVENT_CLICK), this._config.selector, (event) => { + const context = this._initializeOnDelegatedTarget(event); + context._activeTrigger[TRIGGER_CLICK] = !(context._isShown() && context._activeTrigger[TRIGGER_CLICK]); + context.toggle(); + }); + } else if (trigger !== TRIGGER_MANUAL) { + const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN); + const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT); + event_handler_default.on(this._element, eventIn, this._config.selector, (event) => { + const context = this._initializeOnDelegatedTarget(event); + context._activeTrigger[event.type === "focusin" ? TRIGGER_FOCUS : TRIGGER_HOVER] = true; + context._enter(); + }); + event_handler_default.on(this._element, eventOut, this._config.selector, (event) => { + const context = this._initializeOnDelegatedTarget(event); + context._activeTrigger[event.type === "focusout" ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget); + context._leave(); + }); + } + } + this._hideModalHandler = () => { + if (this._element) { + this.hide(); + } + }; + event_handler_default.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler); + } + _fixTitle() { + const title = this._element.getAttribute("title"); + if (!title) { + return; + } + if (!this._element.getAttribute("aria-label") && !this._element.textContent.trim()) { + this._element.setAttribute("aria-label", title); + } + this._element.setAttribute("data-bs-original-title", title); + this._element.removeAttribute("title"); + } + _enter() { + if (this._isShown() || this._isHovered) { + this._isHovered = true; + return; + } + this._isHovered = true; + this._setTimeout(() => { + if (this._isHovered) { + this.show(); + } + }, this._config.delay.show); + } + _leave() { + if (this._isWithActiveTrigger()) { + return; + } + this._isHovered = false; + this._setTimeout(() => { + if (!this._isHovered) { + this.hide(); + } + }, this._config.delay.hide); + } + _setTimeout(handler, timeout) { + clearTimeout(this._timeout); + this._timeout = setTimeout(handler, timeout); + } + _isWithActiveTrigger() { + return Object.values(this._activeTrigger).includes(true); + } + _getConfig(config) { + const dataAttributes = manipulator_default.getDataAttributes(this._element); + for (const dataAttribute of Object.keys(dataAttributes)) { + if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) { + delete dataAttributes[dataAttribute]; + } + } + config = __spreadValues(__spreadValues({}, dataAttributes), typeof config === "object" && config ? config : {}); + config = this._mergeConfigObj(config); + config = this._configAfterMerge(config); + this._typeCheckConfig(config); + return config; + } + _configAfterMerge(config) { + config.container = config.container === false ? document.body : getElement(config.container); + if (typeof config.delay === "number") { + config.delay = { + show: config.delay, + hide: config.delay + }; + } + if (typeof config.title === "number") { + config.title = config.title.toString(); + } + if (typeof config.content === "number") { + config.content = config.content.toString(); + } + return config; + } + _getDelegateConfig() { + const config = {}; + for (const [key, value] of Object.entries(this._config)) { + if (this.constructor.Default[key] !== value) { + config[key] = value; + } + } + config.selector = false; + config.trigger = "manual"; + return config; + } + _disposePopper() { + if (this._popper) { + this._popper.destroy(); + this._popper = null; + } + if (this.tip) { + this.tip.remove(); + this.tip = null; + } + } + // Static + static jQueryInterface(config) { + return this.each(function() { + const data = _Tooltip.getOrCreateInstance(this, config); + if (typeof config !== "string") { + return; + } + if (typeof data[config] === "undefined") { + throw new TypeError(`No method named "${config}"`); + } + data[config](); + }); + } + }; + defineJQueryPlugin(Tooltip); + var tooltip_default = Tooltip; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/clipboard.js + var clipboardSelector = ".code-header>button"; + var ICON_DEFAULT = "far fa-clipboard"; + var ICON_SUCCESS = "fas fa-check"; + var ATTR_TIMEOUT = "timeout"; + var ATTR_TITLE_SUCCEED = "data-title-succeed"; + var ATTR_TITLE_ORIGIN = "data-bs-original-title"; + var TIMEOUT = 2e3; + function isLocked(node) { + if (node.hasAttribute(ATTR_TIMEOUT)) { + let timeout = node.getAttribute(ATTR_TIMEOUT); + if (Number(timeout) > Date.now()) { + return true; + } + } + return false; + } + function lock(node) { + node.setAttribute(ATTR_TIMEOUT, Date.now() + TIMEOUT); + } + function unlock(node) { + node.removeAttribute(ATTR_TIMEOUT); + } + function showTooltip(btn) { + const succeedTitle = btn.getAttribute(ATTR_TITLE_SUCCEED); + btn.setAttribute(ATTR_TITLE_ORIGIN, succeedTitle); + tooltip_default.getInstance(btn).show(); + } + function hideTooltip(btn) { + tooltip_default.getInstance(btn).hide(); + btn.removeAttribute(ATTR_TITLE_ORIGIN); + } + function setSuccessIcon(btn) { + const icon = btn.children[0]; + icon.setAttribute("class", ICON_SUCCESS); + } + function resumeIcon(btn) { + const icon = btn.children[0]; + icon.setAttribute("class", ICON_DEFAULT); + } + function setCodeClipboard() { + const clipboardList = document.querySelectorAll(clipboardSelector); + if (clipboardList.length === 0) { + return; + } + const clipboard = new ClipboardJS(clipboardSelector, { + target: (trigger) => { + const codeBlock = trigger.parentNode.nextElementSibling; + return codeBlock.querySelectorAll("code")[1]; + } + }); + [...clipboardList].map( + (elem) => new tooltip_default(elem, { + placement: "left" + }) + ); + clipboard.on("success", (e) => { + const trigger = e.trigger; + e.clearSelection(); + if (isLocked(trigger)) { + return; + } + setSuccessIcon(trigger); + showTooltip(trigger); + lock(trigger); + setTimeout(() => { + hideTooltip(trigger); + resumeIcon(trigger); + unlock(trigger); + }, TIMEOUT); + }); + } + function setLinkClipboard() { + const btnCopyLink = document.getElementById("copy-link"); + if (btnCopyLink === null) { + return; + } + btnCopyLink.addEventListener("click", (e) => { + const target = e.target; + if (isLocked(target)) { + return; + } + navigator.clipboard.writeText(window.location.href).then(() => { + const defaultTitle = target.getAttribute(ATTR_TITLE_ORIGIN); + const succeedTitle = target.getAttribute(ATTR_TITLE_SUCCEED); + target.setAttribute(ATTR_TITLE_ORIGIN, succeedTitle); + tooltip_default.getInstance(target).show(); + lock(target); + setTimeout(() => { + target.setAttribute(ATTR_TITLE_ORIGIN, defaultTitle); + unlock(target); + }, TIMEOUT); + }); + }); + btnCopyLink.addEventListener("mouseleave", (e) => { + tooltip_default.getInstance(e.target).hide(); + }); + } + function initClipboard() { + setCodeClipboard(); + setLinkClipboard(); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/img-loading.js + var ATTR_DATA_SRC = "data-src"; + var ATTR_DATA_LQIP = "data-lqip"; + var cover = { + SHIMMER: "shimmer", + BLUR: "blur" + }; + function removeCover(clzss) { + this.parentElement.classList.remove(clzss); + } + function handleImage() { + if (!this.complete) { + return; + } + if (this.hasAttribute(ATTR_DATA_LQIP)) { + removeCover.call(this, cover.BLUR); + } else { + removeCover.call(this, cover.SHIMMER); + } + } + function switchLQIP() { + const src = this.getAttribute(ATTR_DATA_SRC); + this.setAttribute("src", encodeURI(src)); + this.removeAttribute(ATTR_DATA_SRC); + } + function loadImg() { + const images = document.querySelectorAll("article img"); + if (images.length === 0) { + return; + } + images.forEach((img) => { + img.addEventListener("load", handleImage); + }); + document.querySelectorAll('article img[loading="lazy"]').forEach((img) => { + if (img.complete) { + removeCover.call(img, cover.SHIMMER); + } + }); + const lqips = document.querySelectorAll( + `article img[${ATTR_DATA_LQIP}="true"]` + ); + if (lqips.length) { + lqips.forEach((lqip) => { + switchLQIP.call(lqip); + }); + } + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/img-popup.js + var lightImages = ".popup:not(.dark)"; + var darkImages = ".popup:not(.light)"; + var selector = lightImages; + function updateImages(current, reverse) { + if (selector === lightImages) { + selector = darkImages; + } else { + selector = lightImages; + } + if (reverse === null) { + reverse = GLightbox({ selector: `${selector}` }); + } + [current, reverse] = [reverse, current]; + } + function imgPopup() { + if (document.querySelector(".popup") === null) { + return; + } + const hasDualImages = !(document.querySelector(".popup.light") === null && document.querySelector(".popup.dark") === null); + if (Theme.visualState === Theme.DARK) { + selector = darkImages; + } + let current = GLightbox({ selector: `${selector}` }); + if (hasDualImages && Theme.switchable) { + let reverse = null; + window.addEventListener("message", (event) => { + if (event.source === window && event.data && event.data.id === Theme.ID) { + updateImages(current, reverse); + } + }); + } + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/locale-datetime.js + var LocaleHelper = class { + static get attrTimestamp() { + return "data-ts"; + } + static get attrDateFormat() { + return "data-df"; + } + static get locale() { + return document.documentElement.getAttribute("lang").substring(0, 2); + } + static getTimestamp(elem) { + return Number(elem.getAttribute(this.attrTimestamp)); + } + static getDateFormat(elem) { + return elem.getAttribute(this.attrDateFormat); + } + }; + function initLocaleDatetime() { + dayjs.locale(LocaleHelper.locale); + dayjs.extend(window.dayjs_plugin_localizedFormat); + document.querySelectorAll(`[${LocaleHelper.attrTimestamp}]`).forEach((elem) => { + const date = dayjs.unix(LocaleHelper.getTimestamp(elem)); + const text = date.format(LocaleHelper.getDateFormat(elem)); + elem.textContent = text; + elem.removeAttribute(LocaleHelper.attrTimestamp); + elem.removeAttribute(LocaleHelper.attrDateFormat); + if (elem.hasAttribute("data-bs-toggle") && elem.getAttribute("data-bs-toggle") === "tooltip") { + const tooltipText = date.format("llll"); + elem.setAttribute("data-bs-title", tooltipText); + } + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/toc/toc-mobile.js + var $tocBar = document.getElementById("toc-bar"); + var $soloTrigger = document.getElementById("toc-solo-trigger"); + var $triggers = document.getElementsByClassName("toc-trigger"); + var $popup = document.getElementById("toc-popup"); + var $btnClose = document.getElementById("toc-popup-close"); + var SCROLL_LOCK = "overflow-hidden"; + var CLOSING = "closing"; + var _invisible, _barHeight; + var _TocMobile = class _TocMobile { + static initBar() { + const observer = new IntersectionObserver( + (entries) => { + entries.forEach((entry) => { + $tocBar.classList.toggle("invisible", entry.isIntersecting); + }); + }, + { rootMargin: `-${__privateGet(this, _barHeight)}px 0px 0px 0px` } + ); + observer.observe($soloTrigger); + __privateSet(this, _invisible, false); + } + static listenAnchors() { + const $anchors = document.getElementsByClassName("toc-link"); + [...$anchors].forEach((anchor) => { + anchor.onclick = () => this.hidePopup(); + }); + } + static refresh() { + if (__privateGet(this, _invisible)) { + this.initComponents(); + } + tocbot.refresh(this.options); + this.listenAnchors(); + } + static get popupOpened() { + return $popup.open; + } + static showPopup() { + this.lockScroll(true); + $popup.showModal(); + const activeItem = $popup.querySelector("li.is-active-li"); + activeItem.scrollIntoView({ block: "center" }); + } + static hidePopup() { + $popup.toggleAttribute(CLOSING); + $popup.addEventListener( + "animationend", + () => { + $popup.toggleAttribute(CLOSING); + $popup.close(); + }, + { once: true } + ); + this.lockScroll(false); + } + static lockScroll(enable) { + document.documentElement.classList.toggle(SCROLL_LOCK, enable); + document.body.classList.toggle(SCROLL_LOCK, enable); + } + static clickBackdrop(event) { + if ($popup.hasAttribute(CLOSING)) { + return; + } + const rect = event.target.getBoundingClientRect(); + if (event.clientX < rect.left || event.clientX > rect.right || event.clientY < rect.top || event.clientY > rect.bottom) { + this.hidePopup(); + } + } + static initComponents() { + this.initBar(); + [...$triggers].forEach((trigger) => { + trigger.onclick = () => this.showPopup(); + }); + $popup.onclick = (e) => this.clickBackdrop(e); + $btnClose.onclick = () => this.hidePopup(); + $popup.oncancel = (e) => { + e.preventDefault(); + this.hidePopup(); + }; + } + static init() { + tocbot.init(this.options); + this.listenAnchors(); + this.initComponents(); + } + }; + _invisible = new WeakMap(); + _barHeight = new WeakMap(); + __privateAdd(_TocMobile, _invisible, true); + __privateAdd(_TocMobile, _barHeight, 16 * 3); + // 3rem + __publicField(_TocMobile, "options", { + tocSelector: "#toc-popup-content", + contentSelector: ".content", + ignoreSelector: "[data-toc-skip]", + headingSelector: "h2, h3, h4", + orderedList: false, + scrollSmooth: false, + collapseDepth: 4, + headingsOffset: __privateGet(_TocMobile, _barHeight) + }); + var TocMobile = _TocMobile; + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/toc/toc-desktop.js + var TocDesktop = class { + static refresh() { + tocbot.refresh(this.options); + } + static init() { + tocbot.init(this.options); + } + }; + /* Tocbot options Ref: https://github.com/tscanlin/tocbot#usage */ + __publicField(TocDesktop, "options", { + tocSelector: "#toc", + contentSelector: ".content", + ignoreSelector: "[data-toc-skip]", + headingSelector: "h2, h3, h4", + orderedList: false, + scrollSmooth: false, + headingsOffset: 16 * 2 + // 2rem + }); + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/toc.js + var desktopMode = matchMedia("(min-width: 1200px)"); + function refresh(e) { + if (e.matches) { + if (TocMobile.popupOpened) { + TocMobile.hidePopup(); + } + TocDesktop.refresh(); + } else { + TocMobile.refresh(); + } + } + function init() { + if (document.querySelector('main>article[data-toc="true"]') === null) { + return; + } + if (desktopMode.matches) { + TocDesktop.init(); + } else { + TocMobile.init(); + } + const $tocWrapper = document.getElementById("toc-wrapper"); + $tocWrapper.classList.remove("invisible"); + desktopMode.onchange = refresh; + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/mermaid.js + var MERMAID = "mermaid"; + var themeMapper = Theme.getThemeMapper("default", "dark"); + function refreshTheme(event) { + if (event.source === window && event.data && event.data.id === Theme.ID) { + const mermaidList = document.getElementsByClassName(MERMAID); + [...mermaidList].forEach((elem) => { + const svgCode = elem.previousSibling.children.item(0).textContent; + elem.textContent = svgCode; + elem.removeAttribute("data-processed"); + }); + const newTheme = themeMapper[Theme.visualState]; + mermaid.initialize({ theme: newTheme }); + mermaid.init(null, `.${MERMAID}`); + } + } + function setNode(elem) { + const svgCode = elem.textContent; + const backup = elem.parentElement; + backup.classList.add("d-none"); + const mermaid2 = document.createElement("pre"); + mermaid2.classList.add(MERMAID); + const text = document.createTextNode(svgCode); + mermaid2.appendChild(text); + backup.after(mermaid2); + } + function loadMermaid() { + if (typeof mermaid === "undefined" || typeof mermaid.initialize !== "function") { + return; + } + const initTheme = themeMapper[Theme.visualState]; + let mermaidConf = { + theme: initTheme + }; + const basicList = document.getElementsByClassName("language-mermaid"); + [...basicList].forEach(setNode); + mermaid.initialize(mermaidConf); + if (Theme.switchable) { + window.addEventListener("message", refreshTheme); + } + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/mode-toggle.js + var $toggle = document.getElementById("mode-toggle"); + function modeWatcher() { + if (!$toggle) { + return; + } + $toggle.addEventListener("click", () => { + Theme.flip(); + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/back-to-top.js + function back2top() { + const btn = document.getElementById("back-to-top"); + window.addEventListener("scroll", () => { + if (window.scrollY > 50) { + btn.classList.add("show"); + } else { + btn.classList.remove("show"); + } + }); + btn.addEventListener("click", () => { + window.scrollTo({ top: 0 }); + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/tooltip-loader.js + function loadTooptip() { + const tooltipTriggerList = document.querySelectorAll( + '[data-bs-toggle="tooltip"]' + ); + [...tooltipTriggerList].map( + (tooltipTriggerEl) => new tooltip_default(tooltipTriggerEl) + ); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/layouts/basic.js + function basic() { + modeWatcher(); + back2top(); + loadTooptip(); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/layouts/sidebar.js + var ATTR_DISPLAY = "sidebar-display"; + var $sidebar = document.getElementById("sidebar"); + var $trigger = document.getElementById("sidebar-trigger"); + var $mask = document.getElementById("mask"); + var _isExpanded; + var SidebarUtil = class { + static toggle() { + __privateSet(this, _isExpanded, !__privateGet(this, _isExpanded)); + document.body.toggleAttribute(ATTR_DISPLAY, __privateGet(this, _isExpanded)); + $sidebar.classList.toggle("z-2", __privateGet(this, _isExpanded)); + $mask.classList.toggle("d-none", !__privateGet(this, _isExpanded)); + } + }; + _isExpanded = new WeakMap(); + __privateAdd(SidebarUtil, _isExpanded, false); + function initSidebar() { + $trigger.onclick = $mask.onclick = () => SidebarUtil.toggle(); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/components/search-display.js + var btnSbTrigger = document.getElementById("sidebar-trigger"); + var btnSearchTrigger = document.getElementById("search-trigger"); + var btnCancel = document.getElementById("search-cancel"); + var content = document.querySelectorAll("#main-wrapper>.container>.row"); + var topbarTitle = document.getElementById("topbar-title"); + var search = document.getElementById("search"); + var resultWrapper = document.getElementById("search-result-wrapper"); + var results = document.getElementById("search-results"); + var input = document.getElementById("search-input"); + var hints = document.getElementById("search-hints"); + var LOADED = "d-block"; + var UNLOADED = "d-none"; + var FOCUS = "input-focus"; + var FLEX = "d-flex"; + var MobileSearchBar = class { + static on() { + btnSbTrigger.classList.add(UNLOADED); + topbarTitle.classList.add(UNLOADED); + btnSearchTrigger.classList.add(UNLOADED); + search.classList.add(FLEX); + btnCancel.classList.add(LOADED); + } + static off() { + btnCancel.classList.remove(LOADED); + search.classList.remove(FLEX); + btnSbTrigger.classList.remove(UNLOADED); + topbarTitle.classList.remove(UNLOADED); + btnSearchTrigger.classList.remove(UNLOADED); + } + }; + var ResultSwitch = class { + static on() { + if (!this.resultVisible) { + resultWrapper.classList.remove(UNLOADED); + content.forEach((el) => { + el.classList.add(UNLOADED); + }); + this.resultVisible = true; + } + } + static off() { + if (this.resultVisible) { + results.innerHTML = ""; + if (hints.classList.contains(UNLOADED)) { + hints.classList.remove(UNLOADED); + } + resultWrapper.classList.add(UNLOADED); + content.forEach((el) => { + el.classList.remove(UNLOADED); + }); + input.textContent = ""; + this.resultVisible = false; + } + } + }; + __publicField(ResultSwitch, "resultVisible", false); + function isMobileView() { + return btnCancel.classList.contains(LOADED); + } + function displaySearch() { + btnSearchTrigger.addEventListener("click", () => { + MobileSearchBar.on(); + ResultSwitch.on(); + input.focus(); + }); + btnCancel.addEventListener("click", () => { + MobileSearchBar.off(); + ResultSwitch.off(); + }); + input.addEventListener("focus", () => { + search.classList.add(FOCUS); + }); + input.addEventListener("focusout", () => { + search.classList.remove(FOCUS); + }); + input.addEventListener("input", () => { + if (input.value === "") { + if (isMobileView()) { + hints.classList.remove(UNLOADED); + } else { + ResultSwitch.off(); + } + } else { + ResultSwitch.on(); + if (isMobileView()) { + hints.classList.add(UNLOADED); + } + } + }); + } + + // ns-hugo-imp:/home/mmckinnon/.cache/hugo_cache/modules/filecache/modules/pkg/mod/git.comprofix.com/mmckinnon/hugo-theme-chirpy@v0.0.0-20250906020401-98acc1f743ac/assets/js/modules/layouts/topbar.js + function initTopbar() { + displaySearch(); + } + + // + loadImg(); + init(); + imgPopup(); + initSidebar(); + initLocaleDatetime(); + initClipboard(); + initTopbar(); + loadMermaid(); + basic(); +})(); diff --git a/public/page/1/index.html b/public/page/1/index.html index 43ed666..1cf6932 100644 --- a/public/page/1/index.html +++ b/public/page/1/index.html @@ -1 +1,10 @@ -https://comprofix.com/ \ No newline at end of file + + + + http://localhost:1313/ + + + + + + diff --git a/public/post/2024-09-05-resetrestart/index.html b/public/post/2024-09-05-resetrestart/index.html index e65294b..3f52887 100644 --- a/public/post/2024-09-05-resetrestart/index.html +++ b/public/post/2024-09-05-resetrestart/index.html @@ -1,61 +1,1255 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Reset and Restart | -Comprofix
Reset and Restart
- - -

Reset and Restart

It’s time to reset the website and start building my blog again. I have had this domain for a number of years and it has always been used for my E-Mail.

But the website has been more of a play ground for experimenting and testing.

I am now hoping to get into the habit of writing more blog posts as I document my journey as I experiment with my HomeLab.

This post is licensed under CC BY 4.0 by the author.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + +
+ Reset and Restart +
+ + + + + + + + +
+
+
+
+ + + + + +
+
+

Reset and Restart

+ + + +
+ + + +
+ + + + + +

It’s time to reset the website and start building my blog again. I have had this domain for a number of years and it has always been used for my E-Mail.

+

But the website has been more of a play ground for experimenting and testing.

+

I am now hoping to get into the habit of writing more blog posts as I document my journey as I experiment with my HomeLab.

+ +
+ +
+ + + + + + + + + + +
+
+ + + This post is licensed under CC BY 4.0 by the author. + +
+ +
+
+
+ +
+ + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ © + + + + + Comprofix. + + + + Some rights reserved. +

+ +

Using the Chirpy theme for Hugo. +

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Trending Tags

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
\ No newline at end of file + `; + }).join(''); + + this.resultsContainer.innerHTML = searchItems; + } + + + checkFieldsForMatch(item, term) { + const matches = { + inTitle: false, + inDesc: false, + inSection: false, + inContents: false + }; + + + if (DEFAULT_CONFIG.search.fields.title && this.containsTerm(item.searchableTitle, term)) { + matches.inTitle = true; + } + + if (DEFAULT_CONFIG.search.fields.description && this.containsTerm(item.searchableDesc, term)) { + matches.inDesc = true; + } + + if (DEFAULT_CONFIG.search.fields.section && this.containsTerm(item.searchableSection, term)) { + matches.inSection = true; + } + + if (DEFAULT_CONFIG.search.fields.contents && this.containsTerm(item.searchableContents, term)) { + matches.inContents = true; + } + + + if (matches.inTitle || matches.inDesc || matches.inSection || matches.inContents) { + return matches; + } + + + return false; + } + } + + const search = new FastSearch({ + searchInput: document.getElementById('search-input'), + resultsContainer: document.getElementById('search-results'), + json: `\/index.json` + }); + + +
+ + +
+ +
+ + \ No newline at end of file diff --git a/public/post/2024-09-21-websitedeployment/index.html b/public/post/2024-09-21-websitedeployment/index.html index 906044c..b6a12b8 100644 --- a/public/post/2024-09-21-websitedeployment/index.html +++ b/public/post/2024-09-21-websitedeployment/index.html @@ -1,199 +1,1564 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Continuous Integration & Continuous Deployment | -Comprofix
Continuous Integration & Continuous Deployment
- - -

Continuous Integration & Continuous Deployment

-
Continuous Integration & Continuous Deployment

Since the reset of the website, I have been working on getting it to auto build and deploy using Gitea Actions. Which is similar and compatible to GitHub Actions

Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.

Why use CI/CD? -

It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.

Setting up the Aciton -

To setup the action we first needed to create some “secrets” in the repo. Secrets are secure variables that are requied to interact with systems. Such as passwords, usernames, SSH Keys etc.

gitea secrets

After populating our secrets file we can then create our .gitea/workflows/build.yml file. This file contains all the steps to build, test and deploy the container.

{% raw %}

 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-
on: push
-jobs:
-  build-node:
-    runs-on: ubuntu-latest
-    container:
-      image: catthehacker/ubuntu:act-latest
-    steps:
-      - name: checkout repo
-        uses: actions/checkout@v4
-      
-      - name: Use Node.js
-        uses: actions/setup-node@v4
-      
-      - name: Install Node Dependencies
-        run: npm ci
-
-      - name: Build 11ty Site
-        run: npm run build --if-present
-      
-      - name: Set up Docker Buildx
-        uses: docker/setup-buildx-action@v3
-
-      - name: Login to DockerHub
-        uses: docker/login-action@v3
-        with:
-          registry: git.comprofix.com
-          username: ${{ secrets.REGISTRY_USERNAME }}
-          password: ${{ secrets.REGISTRY_TOKEN }}
-      
-      - name: Build and push
-        uses: docker/build-push-action@v6
-        with:
-          context: ./
-          file: ./Dockerfile
-          push: true
-          tags: git.comprofix.com/mmckinnon/comprofix.com:latest
-  
-  publish:
-    runs-on: ubuntu-latest
-    steps:
-      - name: checkout repo
-        uses: actions/checkout@v4
-
-      - name: Publish Website
-        run: |
-          mkdir ~/.ssh
-          echo "${{ secrets.SSH_KNOWN_HOSTS }}" >> ~/.ssh/known_hosts
-          chmod 644 ~/.ssh/known_hosts
-          eval $(ssh-agent -s)
-          ssh-add <(echo "${{ secrets.SSH_PRIVATE_KEY }}")
-          ssh administrator@comprofix.com "cd /opt/comprofix; docker compose down" || true
-          scp docker-compose.yml administrator@comprofix.com:/opt/comprofix
-          ssh administrator@comprofix.com "cd /opt/comprofix; docker compose pull; docker compose up -d"

{% endraw %}

build.yml explained -

  • 1
    -
    on: push
    This tells the action to run when code is pushed to the repo.
  • 1
    -2
    -3
    -
    runs-on: ubuntu-latest
    -container:
    -  image: catthehacker/ubuntu:act-latest
    This specified the “container” to use to run all the steps on. This was crucial as running without a “conatiner” would fail as not all required dependencies where available
  • 1
    -2
    -3
    -4
    -
    jobs:
    -  build-node:
    -  ...
    -  publish:
    These are the names of the separate jobs for the build action. The build node will build the site and create the new docker container and push to the registry. The publish will connect the host running the container and restart using the new container.
  • 1
    -
    steps:
    Each job has a list of steps it performs on the code. Most of these a pretty self explaining on what they do. Everything from check out the code. Setup Node environment and build. Run the docker commands to login to the registry, build the container and push. Then the last job steps connect the host and pull the new container and start.

Gitea Action Completes -

Once the new code was commited to the repo the Action was able to complete successfully.

This post is licensed under CC BY 4.0 by the author.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + +
+ Continuous Integration & Continuous Deployment +
+ + + + + + + + +
+
+
+
+ + + + + +
+
+

Continuous Integration & Continuous Deployment

+ + + +
+ + + + + + + +
+
Continuous Integration & Continuous Deployment
+ +
+ +
+ + +
+ + + + + +

Since the reset of the website, I have been working on getting it to auto build and deploy using Gitea Actions. Which is similar and compatible to GitHub Actions

+

Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.

+

+ + Why use CI/CD? + + +

It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.

+

+ + Setting up the Aciton + + +

To setup the action we first needed to create some “secrets” in the repo. Secrets are secure variables that are requied to interact with systems. Such as passwords, usernames, SSH Keys etc.

+ + gitea secrets +

After populating our secrets file we can then create our .gitea/workflows/build.yml file. This file contains all the steps to build, test and deploy the container.

+

{% raw %}

+
+
+ +
+ +
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+
+
on: push
+jobs:
+  build-node:
+    runs-on: ubuntu-latest
+    container:
+      image: catthehacker/ubuntu:act-latest
+    steps:
+      - name: checkout repo
+        uses: actions/checkout@v4
+      
+      - name: Use Node.js
+        uses: actions/setup-node@v4
+      
+      - name: Install Node Dependencies
+        run: npm ci
+
+      - name: Build 11ty Site
+        run: npm run build --if-present
+      
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v3
+
+      - name: Login to DockerHub
+        uses: docker/login-action@v3
+        with:
+          registry: git.comprofix.com
+          username: ${{ secrets.REGISTRY_USERNAME }}
+          password: ${{ secrets.REGISTRY_TOKEN }}
+      
+      - name: Build and push
+        uses: docker/build-push-action@v6
+        with:
+          context: ./
+          file: ./Dockerfile
+          push: true
+          tags: git.comprofix.com/mmckinnon/comprofix.com:latest
+  
+  publish:
+    runs-on: ubuntu-latest
+    steps:
+      - name: checkout repo
+        uses: actions/checkout@v4
+
+      - name: Publish Website
+        run: |
+          mkdir ~/.ssh
+          echo "${{ secrets.SSH_KNOWN_HOSTS }}" >> ~/.ssh/known_hosts
+          chmod 644 ~/.ssh/known_hosts
+          eval $(ssh-agent -s)
+          ssh-add <(echo "${{ secrets.SSH_PRIVATE_KEY }}")
+          ssh administrator@comprofix.com "cd /opt/comprofix; docker compose down" || true
+          scp docker-compose.yml administrator@comprofix.com:/opt/comprofix
+          ssh administrator@comprofix.com "cd /opt/comprofix; docker compose pull; docker compose up -d"
+
+
+
+

{% endraw %}

+

+ + build.yml explained + + +

    +
  • +
    +
    + +
    + +
    +
    1
    +
    +
    on: push
    +
    +
    +
    +This tells the action to run when code is pushed to the repo.
  • +
  • +
    +
    + +
    + +
    +
    1
    +2
    +3
    +
    +
    runs-on: ubuntu-latest
    +container:
    +  image: catthehacker/ubuntu:act-latest
    +
    +
    +
    +This specified the “container” to use to run all the steps on. This was crucial as running without a “conatiner” would fail as not all required dependencies where available
  • +
  • +
    +
    + +
    + +
    +
    1
    +2
    +3
    +4
    +
    +
    jobs:
    +  build-node:
    +  ...
    +  publish:
    +
    +
    +
    +These are the names of the separate jobs for the build action. The build node will build the site and create the new docker container and push to the registry. The publish will connect the host running the container and restart using the new container.
  • +
  • +
    +
    + +
    + +
    +
    1
    +
    +
    steps:
    +
    +
    +
    +Each job has a list of steps it performs on the code. Most of these a pretty self explaining on what they do. Everything from check out the code. Setup Node environment and build. Run the docker commands to login to the registry, build the container and push. Then the last job steps connect the host and pull the new container and start.
  • +
+

+ + Gitea Action Completes + + +

Once the new code was commited to the repo the Action was able to complete successfully.

+ + + +
+ +
+ + + + + + + + + + +
+
+ + + This post is licensed under CC BY 4.0 by the author. + +
+ +
+
+
+ +
+ + + +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ © + + + + + Comprofix. + + + + Some rights reserved. +

+ +

Using the Chirpy theme for Hugo. +

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Trending Tags

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
\ No newline at end of file + `; + }).join(''); + + this.resultsContainer.innerHTML = searchItems; + } + + + checkFieldsForMatch(item, term) { + const matches = { + inTitle: false, + inDesc: false, + inSection: false, + inContents: false + }; + + + if (DEFAULT_CONFIG.search.fields.title && this.containsTerm(item.searchableTitle, term)) { + matches.inTitle = true; + } + + if (DEFAULT_CONFIG.search.fields.description && this.containsTerm(item.searchableDesc, term)) { + matches.inDesc = true; + } + + if (DEFAULT_CONFIG.search.fields.section && this.containsTerm(item.searchableSection, term)) { + matches.inSection = true; + } + + if (DEFAULT_CONFIG.search.fields.contents && this.containsTerm(item.searchableContents, term)) { + matches.inContents = true; + } + + + if (matches.inTitle || matches.inDesc || matches.inSection || matches.inContents) { + return matches; + } + + + return false; + } + } + + const search = new FastSearch({ + searchInput: document.getElementById('search-input'), + resultsContainer: document.getElementById('search-results'), + json: `\/index.json` + }); + + +
+ + +
+ +
+ + \ No newline at end of file diff --git a/public/post/index.html b/public/post/index.html index c4454e9..7894b6b 100644 --- a/public/post/index.html +++ b/public/post/index.html @@ -1,49 +1,958 @@ -Posts | -Comprofix
- - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Posts | + + Comprofix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + +
+ +
+ + + + + + + + +
+
+
+
+ +
+
+

Posts

+ +
+ +
+ +
+ + +
+

Subsections & Pages

+ +
+ + + +
+ +
+ + + +
+ +
+ +
+ + +
+

+ © + + + + + Comprofix. + + + + Some rights reserved. +

+ +

Using the Chirpy theme for Hugo. +

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Trending Tags

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
\ No newline at end of file + `; + }).join(''); + + this.resultsContainer.innerHTML = searchItems; + } + + + checkFieldsForMatch(item, term) { + const matches = { + inTitle: false, + inDesc: false, + inSection: false, + inContents: false + }; + + + if (DEFAULT_CONFIG.search.fields.title && this.containsTerm(item.searchableTitle, term)) { + matches.inTitle = true; + } + + if (DEFAULT_CONFIG.search.fields.description && this.containsTerm(item.searchableDesc, term)) { + matches.inDesc = true; + } + + if (DEFAULT_CONFIG.search.fields.section && this.containsTerm(item.searchableSection, term)) { + matches.inSection = true; + } + + if (DEFAULT_CONFIG.search.fields.contents && this.containsTerm(item.searchableContents, term)) { + matches.inContents = true; + } + + + if (matches.inTitle || matches.inDesc || matches.inSection || matches.inContents) { + return matches; + } + + + return false; + } + } + + const search = new FastSearch({ + searchInput: document.getElementById('search-input'), + resultsContainer: document.getElementById('search-results'), + json: `\/index.json` + }); + + +
+ + +
+ +
+ + \ No newline at end of file diff --git a/public/post/index.xml b/public/post/index.xml index 73daa14..93b51b1 100644 --- a/public/post/index.xml +++ b/public/post/index.xml @@ -1,10 +1,26 @@ -Posts on Comprofixhttps://comprofix.com/post/Recent content in Posts on ComprofixHugoenSat, 06 Sep 2025 13:28:05 +1000Continuous Integration & Continuous Deploymenthttps://comprofix.com/post/2024-09-21-websitedeployment/Sat, 21 Sep 2024 00:00:00 +0000https://comprofix.com/post/2024-09-21-websitedeployment/<p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> -<p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> -<h3 id="why-use-cicd" id=why-use-cicd> - - <span class="me-2">Why use CI/CD?</span> - <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> - -</h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p>Reset and Restarthttps://comprofix.com/post/2024-09-05-resetrestart/Thu, 05 Sep 2024 00:00:00 +0000https://comprofix.com/post/2024-09-05-resetrestart/<p>It&rsquo;s time to reset the website and start building my blog again. I have had this domain for a number of years and it has always been used for my E-Mail.</p> -<p>But the website has been more of a play ground for experimenting and testing.</p> -<p>I am now hoping to get into the habit of writing more blog posts as I document my journey as I experiment with my HomeLab.</p> \ No newline at end of file + + + + Posts on Comprofix + http://localhost:1313/post/ + Recent content in Posts on Comprofix + Hugo + en + Sat, 21 Sep 2024 00:00:00 +0000 + + + Continuous Integration & Continuous Deployment + http://localhost:1313/post/2024-09-21-websitedeployment/ + Sat, 21 Sep 2024 00:00:00 +0000 + http://localhost:1313/post/2024-09-21-websitedeployment/ + <p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> <p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> <h3 id="why-use-cicd" id=why-use-cicd> <span class="me-2">Why use CI/CD?</span> <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> </h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p> + + + Reset and Restart + http://localhost:1313/post/2024-09-05-resetrestart/ + Thu, 05 Sep 2024 00:00:00 +0000 + http://localhost:1313/post/2024-09-05-resetrestart/ + <p>It&rsquo;s time to reset the website and start building my blog again. I have had this domain for a number of years and it has always been used for my E-Mail.</p> <p>But the website has been more of a play ground for experimenting and testing.</p> <p>I am now hoping to get into the habit of writing more blog posts as I document my journey as I experiment with my HomeLab.</p> + + + diff --git a/public/sitemap.xml b/public/sitemap.xml index 8c80f21..334bb97 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -1 +1,55 @@ -https://comprofix.com/tags/cd/2025-09-06T13:28:05+10:00https://comprofix.com/tags/ci/2025-09-06T13:28:05+10:00https://comprofix.com/tags/continuous-deployment/2025-09-06T13:28:05+10:00https://comprofix.com/tags/continuous-integration/2025-09-06T13:28:05+10:00https://comprofix.com/post/2024-09-21-websitedeployment/2025-09-06T13:28:05+10:00https://comprofix.com/tags/docker/2025-09-06T13:28:05+10:00https://comprofix.com/tags/git/2025-09-06T13:28:05+10:00https://comprofix.com/categories/gitea/2025-09-06T13:28:05+10:00https://comprofix.com/categories/homelab/2025-09-06T13:28:05+10:00https://comprofix.com/tags/homelab/2025-09-06T13:28:05+10:00https://comprofix.com/post/2025-09-06T13:28:05+10:00https://comprofix.com/post/2024-09-05-resetrestart/2025-09-06T13:28:05+10:00https://comprofix.com/about/2025-09-06T13:28:05+10:00https://comprofix.com/2025-09-06T13:28:05+10:00https://comprofix.com/archives/2025-09-06T13:28:05+10:00https://comprofix.com/categories/2025-09-06T13:28:05+10:00https://comprofix.com/tags/2025-09-06T13:28:05+10:00 \ No newline at end of file + + + + http://localhost:1313/ + 2024-09-21T00:00:00+00:00 + + http://localhost:1313/categories/ + 2024-09-21T00:00:00+00:00 + + http://localhost:1313/tags/cd/ + 2024-09-21T00:00:00+00:00 + + http://localhost:1313/tags/ci/ + 2024-09-21T00:00:00+00:00 + + http://localhost:1313/tags/continuous-deployment/ + 2024-09-21T00:00:00+00:00 + + http://localhost:1313/tags/continuous-integration/ + 2024-09-21T00:00:00+00:00 + + http://localhost:1313/post/2024-09-21-websitedeployment/ + 2024-09-21T00:00:00+00:00 + + http://localhost:1313/tags/docker/ + 2024-09-21T00:00:00+00:00 + + http://localhost:1313/tags/git/ + 2024-09-21T00:00:00+00:00 + + http://localhost:1313/categories/gitea/ + 2024-09-21T00:00:00+00:00 + + http://localhost:1313/categories/homelab/ + 2024-09-21T00:00:00+00:00 + + http://localhost:1313/tags/homelab/ + 2024-09-21T00:00:00+00:00 + + http://localhost:1313/post/ + 2024-09-21T00:00:00+00:00 + + http://localhost:1313/tags/ + 2024-09-21T00:00:00+00:00 + + http://localhost:1313/post/2024-09-05-resetrestart/ + 2024-09-05T00:00:00+00:00 + + http://localhost:1313/about/ + 2023-04-20T00:00:00+00:00 + + http://localhost:1313/archives/ + + diff --git a/public/tags/cd/index.html b/public/tags/cd/index.html index 4596679..eb2a479 100644 --- a/public/tags/cd/index.html +++ b/public/tags/cd/index.html @@ -1,54 +1,914 @@ -Cd | -Comprofix
- - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Cd | + + Comprofix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + +
+ +
+ + + + + + + + +
+
+
+
+ + + +
+

+ + cd + 1 +

+ +
+ +
+ + + +
+ +
+ +
+ + +
+

+ © + + + + + Comprofix. + + + + Some rights reserved. +

+ +

Using the Chirpy theme for Hugo. +

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Trending Tags

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
\ No newline at end of file + `; + }).join(''); + + this.resultsContainer.innerHTML = searchItems; + } + + + checkFieldsForMatch(item, term) { + const matches = { + inTitle: false, + inDesc: false, + inSection: false, + inContents: false + }; + + + if (DEFAULT_CONFIG.search.fields.title && this.containsTerm(item.searchableTitle, term)) { + matches.inTitle = true; + } + + if (DEFAULT_CONFIG.search.fields.description && this.containsTerm(item.searchableDesc, term)) { + matches.inDesc = true; + } + + if (DEFAULT_CONFIG.search.fields.section && this.containsTerm(item.searchableSection, term)) { + matches.inSection = true; + } + + if (DEFAULT_CONFIG.search.fields.contents && this.containsTerm(item.searchableContents, term)) { + matches.inContents = true; + } + + + if (matches.inTitle || matches.inDesc || matches.inSection || matches.inContents) { + return matches; + } + + + return false; + } + } + + const search = new FastSearch({ + searchInput: document.getElementById('search-input'), + resultsContainer: document.getElementById('search-results'), + json: `\/index.json` + }); + + +
+ + +
+ +
+ + \ No newline at end of file diff --git a/public/tags/cd/index.xml b/public/tags/cd/index.xml index 6f7a264..dcb52b4 100644 --- a/public/tags/cd/index.xml +++ b/public/tags/cd/index.xml @@ -1,8 +1,19 @@ -Cd on Comprofixhttps://comprofix.com/tags/cd/Recent content in Cd on ComprofixHugoenSat, 06 Sep 2025 13:28:05 +1000Continuous Integration & Continuous Deploymenthttps://comprofix.com/post/2024-09-21-websitedeployment/Sat, 21 Sep 2024 00:00:00 +0000https://comprofix.com/post/2024-09-21-websitedeployment/<p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> -<p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> -<h3 id="why-use-cicd" id=why-use-cicd> - - <span class="me-2">Why use CI/CD?</span> - <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> - -</h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p> \ No newline at end of file + + + + Cd on Comprofix + http://localhost:1313/tags/cd/ + Recent content in Cd on Comprofix + Hugo + en + Sat, 21 Sep 2024 00:00:00 +0000 + + + Continuous Integration & Continuous Deployment + http://localhost:1313/post/2024-09-21-websitedeployment/ + Sat, 21 Sep 2024 00:00:00 +0000 + http://localhost:1313/post/2024-09-21-websitedeployment/ + <p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> <p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> <h3 id="why-use-cicd" id=why-use-cicd> <span class="me-2">Why use CI/CD?</span> <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> </h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p> + + + diff --git a/public/tags/ci/index.html b/public/tags/ci/index.html index 86fc5b4..2ed37ab 100644 --- a/public/tags/ci/index.html +++ b/public/tags/ci/index.html @@ -1,54 +1,914 @@ -Ci | -Comprofix
- - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Ci | + + Comprofix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + +
+ +
+ + + + + + + + +
+
+
+
+ + + +
+

+ + ci + 1 +

+ +
+ +
+ + + +
+ +
+ +
+ + +
+

+ © + + + + + Comprofix. + + + + Some rights reserved. +

+ +

Using the Chirpy theme for Hugo. +

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Trending Tags

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
\ No newline at end of file + `; + }).join(''); + + this.resultsContainer.innerHTML = searchItems; + } + + + checkFieldsForMatch(item, term) { + const matches = { + inTitle: false, + inDesc: false, + inSection: false, + inContents: false + }; + + + if (DEFAULT_CONFIG.search.fields.title && this.containsTerm(item.searchableTitle, term)) { + matches.inTitle = true; + } + + if (DEFAULT_CONFIG.search.fields.description && this.containsTerm(item.searchableDesc, term)) { + matches.inDesc = true; + } + + if (DEFAULT_CONFIG.search.fields.section && this.containsTerm(item.searchableSection, term)) { + matches.inSection = true; + } + + if (DEFAULT_CONFIG.search.fields.contents && this.containsTerm(item.searchableContents, term)) { + matches.inContents = true; + } + + + if (matches.inTitle || matches.inDesc || matches.inSection || matches.inContents) { + return matches; + } + + + return false; + } + } + + const search = new FastSearch({ + searchInput: document.getElementById('search-input'), + resultsContainer: document.getElementById('search-results'), + json: `\/index.json` + }); + + +
+ + +
+ +
+ + \ No newline at end of file diff --git a/public/tags/ci/index.xml b/public/tags/ci/index.xml index 3980f63..ebfa124 100644 --- a/public/tags/ci/index.xml +++ b/public/tags/ci/index.xml @@ -1,8 +1,19 @@ -Ci on Comprofixhttps://comprofix.com/tags/ci/Recent content in Ci on ComprofixHugoenSat, 06 Sep 2025 13:28:05 +1000Continuous Integration & Continuous Deploymenthttps://comprofix.com/post/2024-09-21-websitedeployment/Sat, 21 Sep 2024 00:00:00 +0000https://comprofix.com/post/2024-09-21-websitedeployment/<p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> -<p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> -<h3 id="why-use-cicd" id=why-use-cicd> - - <span class="me-2">Why use CI/CD?</span> - <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> - -</h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p> \ No newline at end of file + + + + Ci on Comprofix + http://localhost:1313/tags/ci/ + Recent content in Ci on Comprofix + Hugo + en + Sat, 21 Sep 2024 00:00:00 +0000 + + + Continuous Integration & Continuous Deployment + http://localhost:1313/post/2024-09-21-websitedeployment/ + Sat, 21 Sep 2024 00:00:00 +0000 + http://localhost:1313/post/2024-09-21-websitedeployment/ + <p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> <p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> <h3 id="why-use-cicd" id=why-use-cicd> <span class="me-2">Why use CI/CD?</span> <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> </h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p> + + + diff --git a/public/tags/continuous-deployment/index.html b/public/tags/continuous-deployment/index.html index c048777..c0af677 100644 --- a/public/tags/continuous-deployment/index.html +++ b/public/tags/continuous-deployment/index.html @@ -1,54 +1,914 @@ -Continuous Deployment | -Comprofix
- - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Continuous Deployment | + + Comprofix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + +
+ +
+ + + + + + + + +
+
+
+
+ + + +
+

+ + continuous deployment + 1 +

+ +
+ +
+ + + +
+ +
+ +
+ + +
+

+ © + + + + + Comprofix. + + + + Some rights reserved. +

+ +

Using the Chirpy theme for Hugo. +

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Trending Tags

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
\ No newline at end of file + `; + }).join(''); + + this.resultsContainer.innerHTML = searchItems; + } + + + checkFieldsForMatch(item, term) { + const matches = { + inTitle: false, + inDesc: false, + inSection: false, + inContents: false + }; + + + if (DEFAULT_CONFIG.search.fields.title && this.containsTerm(item.searchableTitle, term)) { + matches.inTitle = true; + } + + if (DEFAULT_CONFIG.search.fields.description && this.containsTerm(item.searchableDesc, term)) { + matches.inDesc = true; + } + + if (DEFAULT_CONFIG.search.fields.section && this.containsTerm(item.searchableSection, term)) { + matches.inSection = true; + } + + if (DEFAULT_CONFIG.search.fields.contents && this.containsTerm(item.searchableContents, term)) { + matches.inContents = true; + } + + + if (matches.inTitle || matches.inDesc || matches.inSection || matches.inContents) { + return matches; + } + + + return false; + } + } + + const search = new FastSearch({ + searchInput: document.getElementById('search-input'), + resultsContainer: document.getElementById('search-results'), + json: `\/index.json` + }); + + +
+ + +
+ +
+ + \ No newline at end of file diff --git a/public/tags/continuous-deployment/index.xml b/public/tags/continuous-deployment/index.xml index bdce945..d73c8f5 100644 --- a/public/tags/continuous-deployment/index.xml +++ b/public/tags/continuous-deployment/index.xml @@ -1,8 +1,19 @@ -Continuous Deployment on Comprofixhttps://comprofix.com/tags/continuous-deployment/Recent content in Continuous Deployment on ComprofixHugoenSat, 06 Sep 2025 13:28:05 +1000Continuous Integration & Continuous Deploymenthttps://comprofix.com/post/2024-09-21-websitedeployment/Sat, 21 Sep 2024 00:00:00 +0000https://comprofix.com/post/2024-09-21-websitedeployment/<p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> -<p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> -<h3 id="why-use-cicd" id=why-use-cicd> - - <span class="me-2">Why use CI/CD?</span> - <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> - -</h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p> \ No newline at end of file + + + + Continuous Deployment on Comprofix + http://localhost:1313/tags/continuous-deployment/ + Recent content in Continuous Deployment on Comprofix + Hugo + en + Sat, 21 Sep 2024 00:00:00 +0000 + + + Continuous Integration & Continuous Deployment + http://localhost:1313/post/2024-09-21-websitedeployment/ + Sat, 21 Sep 2024 00:00:00 +0000 + http://localhost:1313/post/2024-09-21-websitedeployment/ + <p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> <p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> <h3 id="why-use-cicd" id=why-use-cicd> <span class="me-2">Why use CI/CD?</span> <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> </h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p> + + + diff --git a/public/tags/continuous-integration/index.html b/public/tags/continuous-integration/index.html index f6e6365..b83c95a 100644 --- a/public/tags/continuous-integration/index.html +++ b/public/tags/continuous-integration/index.html @@ -1,54 +1,914 @@ -Continuous Integration | -Comprofix
- - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Continuous Integration | + + Comprofix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + +
+ +
+ + + + + + + + +
+
+
+
+ + + +
+

+ + continuous integration + 1 +

+ +
+ +
+ + + +
+ +
+ +
+ + +
+

+ © + + + + + Comprofix. + + + + Some rights reserved. +

+ +

Using the Chirpy theme for Hugo. +

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Trending Tags

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
\ No newline at end of file + `; + }).join(''); + + this.resultsContainer.innerHTML = searchItems; + } + + + checkFieldsForMatch(item, term) { + const matches = { + inTitle: false, + inDesc: false, + inSection: false, + inContents: false + }; + + + if (DEFAULT_CONFIG.search.fields.title && this.containsTerm(item.searchableTitle, term)) { + matches.inTitle = true; + } + + if (DEFAULT_CONFIG.search.fields.description && this.containsTerm(item.searchableDesc, term)) { + matches.inDesc = true; + } + + if (DEFAULT_CONFIG.search.fields.section && this.containsTerm(item.searchableSection, term)) { + matches.inSection = true; + } + + if (DEFAULT_CONFIG.search.fields.contents && this.containsTerm(item.searchableContents, term)) { + matches.inContents = true; + } + + + if (matches.inTitle || matches.inDesc || matches.inSection || matches.inContents) { + return matches; + } + + + return false; + } + } + + const search = new FastSearch({ + searchInput: document.getElementById('search-input'), + resultsContainer: document.getElementById('search-results'), + json: `\/index.json` + }); + + +
+ + +
+ +
+ + \ No newline at end of file diff --git a/public/tags/continuous-integration/index.xml b/public/tags/continuous-integration/index.xml index fb55283..45e7b23 100644 --- a/public/tags/continuous-integration/index.xml +++ b/public/tags/continuous-integration/index.xml @@ -1,8 +1,19 @@ -Continuous Integration on Comprofixhttps://comprofix.com/tags/continuous-integration/Recent content in Continuous Integration on ComprofixHugoenSat, 06 Sep 2025 13:28:05 +1000Continuous Integration & Continuous Deploymenthttps://comprofix.com/post/2024-09-21-websitedeployment/Sat, 21 Sep 2024 00:00:00 +0000https://comprofix.com/post/2024-09-21-websitedeployment/<p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> -<p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> -<h3 id="why-use-cicd" id=why-use-cicd> - - <span class="me-2">Why use CI/CD?</span> - <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> - -</h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p> \ No newline at end of file + + + + Continuous Integration on Comprofix + http://localhost:1313/tags/continuous-integration/ + Recent content in Continuous Integration on Comprofix + Hugo + en + Sat, 21 Sep 2024 00:00:00 +0000 + + + Continuous Integration & Continuous Deployment + http://localhost:1313/post/2024-09-21-websitedeployment/ + Sat, 21 Sep 2024 00:00:00 +0000 + http://localhost:1313/post/2024-09-21-websitedeployment/ + <p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> <p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> <h3 id="why-use-cicd" id=why-use-cicd> <span class="me-2">Why use CI/CD?</span> <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> </h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p> + + + diff --git a/public/tags/docker/index.html b/public/tags/docker/index.html index 5860d4c..8bb290b 100644 --- a/public/tags/docker/index.html +++ b/public/tags/docker/index.html @@ -1,54 +1,914 @@ -Docker | -Comprofix
- - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Docker | + + Comprofix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + +
+ +
+ + + + + + + + +
+
+
+
+ + + +
+

+ + docker + 1 +

+ +
+ +
+ + + +
+ +
+ +
+ + +
+

+ © + + + + + Comprofix. + + + + Some rights reserved. +

+ +

Using the Chirpy theme for Hugo. +

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Trending Tags

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
\ No newline at end of file + `; + }).join(''); + + this.resultsContainer.innerHTML = searchItems; + } + + + checkFieldsForMatch(item, term) { + const matches = { + inTitle: false, + inDesc: false, + inSection: false, + inContents: false + }; + + + if (DEFAULT_CONFIG.search.fields.title && this.containsTerm(item.searchableTitle, term)) { + matches.inTitle = true; + } + + if (DEFAULT_CONFIG.search.fields.description && this.containsTerm(item.searchableDesc, term)) { + matches.inDesc = true; + } + + if (DEFAULT_CONFIG.search.fields.section && this.containsTerm(item.searchableSection, term)) { + matches.inSection = true; + } + + if (DEFAULT_CONFIG.search.fields.contents && this.containsTerm(item.searchableContents, term)) { + matches.inContents = true; + } + + + if (matches.inTitle || matches.inDesc || matches.inSection || matches.inContents) { + return matches; + } + + + return false; + } + } + + const search = new FastSearch({ + searchInput: document.getElementById('search-input'), + resultsContainer: document.getElementById('search-results'), + json: `\/index.json` + }); + + +
+ + +
+ +
+ + \ No newline at end of file diff --git a/public/tags/docker/index.xml b/public/tags/docker/index.xml index 5fb232f..c0b3eed 100644 --- a/public/tags/docker/index.xml +++ b/public/tags/docker/index.xml @@ -1,8 +1,19 @@ -Docker on Comprofixhttps://comprofix.com/tags/docker/Recent content in Docker on ComprofixHugoenSat, 06 Sep 2025 13:28:05 +1000Continuous Integration & Continuous Deploymenthttps://comprofix.com/post/2024-09-21-websitedeployment/Sat, 21 Sep 2024 00:00:00 +0000https://comprofix.com/post/2024-09-21-websitedeployment/<p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> -<p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> -<h3 id="why-use-cicd" id=why-use-cicd> - - <span class="me-2">Why use CI/CD?</span> - <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> - -</h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p> \ No newline at end of file + + + + Docker on Comprofix + http://localhost:1313/tags/docker/ + Recent content in Docker on Comprofix + Hugo + en + Sat, 21 Sep 2024 00:00:00 +0000 + + + Continuous Integration & Continuous Deployment + http://localhost:1313/post/2024-09-21-websitedeployment/ + Sat, 21 Sep 2024 00:00:00 +0000 + http://localhost:1313/post/2024-09-21-websitedeployment/ + <p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> <p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> <h3 id="why-use-cicd" id=why-use-cicd> <span class="me-2">Why use CI/CD?</span> <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> </h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p> + + + diff --git a/public/tags/git/index.html b/public/tags/git/index.html index c6219ed..f1fce3b 100644 --- a/public/tags/git/index.html +++ b/public/tags/git/index.html @@ -1,54 +1,914 @@ -Git | -Comprofix
- - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Git | + + Comprofix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + +
+ +
+ + + + + + + + +
+
+
+
+ + + +
+

+ + git + 1 +

+ +
+ +
+ + + +
+ +
+ +
+ + +
+

+ © + + + + + Comprofix. + + + + Some rights reserved. +

+ +

Using the Chirpy theme for Hugo. +

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Trending Tags

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
\ No newline at end of file + `; + }).join(''); + + this.resultsContainer.innerHTML = searchItems; + } + + + checkFieldsForMatch(item, term) { + const matches = { + inTitle: false, + inDesc: false, + inSection: false, + inContents: false + }; + + + if (DEFAULT_CONFIG.search.fields.title && this.containsTerm(item.searchableTitle, term)) { + matches.inTitle = true; + } + + if (DEFAULT_CONFIG.search.fields.description && this.containsTerm(item.searchableDesc, term)) { + matches.inDesc = true; + } + + if (DEFAULT_CONFIG.search.fields.section && this.containsTerm(item.searchableSection, term)) { + matches.inSection = true; + } + + if (DEFAULT_CONFIG.search.fields.contents && this.containsTerm(item.searchableContents, term)) { + matches.inContents = true; + } + + + if (matches.inTitle || matches.inDesc || matches.inSection || matches.inContents) { + return matches; + } + + + return false; + } + } + + const search = new FastSearch({ + searchInput: document.getElementById('search-input'), + resultsContainer: document.getElementById('search-results'), + json: `\/index.json` + }); + + +
+ + +
+ +
+ + \ No newline at end of file diff --git a/public/tags/git/index.xml b/public/tags/git/index.xml index dd35dd2..939f8c5 100644 --- a/public/tags/git/index.xml +++ b/public/tags/git/index.xml @@ -1,8 +1,19 @@ -Git on Comprofixhttps://comprofix.com/tags/git/Recent content in Git on ComprofixHugoenSat, 06 Sep 2025 13:28:05 +1000Continuous Integration & Continuous Deploymenthttps://comprofix.com/post/2024-09-21-websitedeployment/Sat, 21 Sep 2024 00:00:00 +0000https://comprofix.com/post/2024-09-21-websitedeployment/<p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> -<p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> -<h3 id="why-use-cicd" id=why-use-cicd> - - <span class="me-2">Why use CI/CD?</span> - <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> - -</h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p> \ No newline at end of file + + + + Git on Comprofix + http://localhost:1313/tags/git/ + Recent content in Git on Comprofix + Hugo + en + Sat, 21 Sep 2024 00:00:00 +0000 + + + Continuous Integration & Continuous Deployment + http://localhost:1313/post/2024-09-21-websitedeployment/ + Sat, 21 Sep 2024 00:00:00 +0000 + http://localhost:1313/post/2024-09-21-websitedeployment/ + <p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> <p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> <h3 id="why-use-cicd" id=why-use-cicd> <span class="me-2">Why use CI/CD?</span> <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> </h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p> + + + diff --git a/public/tags/homelab/index.html b/public/tags/homelab/index.html index b5e75e0..fdb5a5e 100644 --- a/public/tags/homelab/index.html +++ b/public/tags/homelab/index.html @@ -1,56 +1,931 @@ -Homelab | -Comprofix
- - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Homelab | + + Comprofix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + +
+ +
+ + + + + + + + +
+
+
+
+ + + +
+

+ + homelab + 2 +

+ +
+ +
+ + + +
+ +
+ +
+ + +
+

+ © + + + + + Comprofix. + + + + Some rights reserved. +

+ +

Using the Chirpy theme for Hugo. +

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Trending Tags

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
\ No newline at end of file + `; + }).join(''); + + this.resultsContainer.innerHTML = searchItems; + } + + + checkFieldsForMatch(item, term) { + const matches = { + inTitle: false, + inDesc: false, + inSection: false, + inContents: false + }; + + + if (DEFAULT_CONFIG.search.fields.title && this.containsTerm(item.searchableTitle, term)) { + matches.inTitle = true; + } + + if (DEFAULT_CONFIG.search.fields.description && this.containsTerm(item.searchableDesc, term)) { + matches.inDesc = true; + } + + if (DEFAULT_CONFIG.search.fields.section && this.containsTerm(item.searchableSection, term)) { + matches.inSection = true; + } + + if (DEFAULT_CONFIG.search.fields.contents && this.containsTerm(item.searchableContents, term)) { + matches.inContents = true; + } + + + if (matches.inTitle || matches.inDesc || matches.inSection || matches.inContents) { + return matches; + } + + + return false; + } + } + + const search = new FastSearch({ + searchInput: document.getElementById('search-input'), + resultsContainer: document.getElementById('search-results'), + json: `\/index.json` + }); + + +
+ + +
+ +
+ + \ No newline at end of file diff --git a/public/tags/homelab/index.xml b/public/tags/homelab/index.xml index 92c8dda..a7ceb6d 100644 --- a/public/tags/homelab/index.xml +++ b/public/tags/homelab/index.xml @@ -1,10 +1,26 @@ -Homelab on Comprofixhttps://comprofix.com/tags/homelab/Recent content in Homelab on ComprofixHugoenSat, 06 Sep 2025 13:28:05 +1000Continuous Integration & Continuous Deploymenthttps://comprofix.com/post/2024-09-21-websitedeployment/Sat, 21 Sep 2024 00:00:00 +0000https://comprofix.com/post/2024-09-21-websitedeployment/<p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> -<p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> -<h3 id="why-use-cicd" id=why-use-cicd> - - <span class="me-2">Why use CI/CD?</span> - <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> - -</h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p>Reset and Restarthttps://comprofix.com/post/2024-09-05-resetrestart/Thu, 05 Sep 2024 00:00:00 +0000https://comprofix.com/post/2024-09-05-resetrestart/<p>It&rsquo;s time to reset the website and start building my blog again. I have had this domain for a number of years and it has always been used for my E-Mail.</p> -<p>But the website has been more of a play ground for experimenting and testing.</p> -<p>I am now hoping to get into the habit of writing more blog posts as I document my journey as I experiment with my HomeLab.</p> \ No newline at end of file + + + + Homelab on Comprofix + http://localhost:1313/tags/homelab/ + Recent content in Homelab on Comprofix + Hugo + en + Sat, 21 Sep 2024 00:00:00 +0000 + + + Continuous Integration & Continuous Deployment + http://localhost:1313/post/2024-09-21-websitedeployment/ + Sat, 21 Sep 2024 00:00:00 +0000 + http://localhost:1313/post/2024-09-21-websitedeployment/ + <p>Since the reset of the website, I have been working on getting it to auto build and deploy using <a href="https://docs.gitea.com/usage/actions/overview">Gitea Actions</a>. Which is similar and compatible to <a href="https://github.com/features/actions">GitHub Actions</a></p> <p>Before implementing the action it was a manual process which required using docker commands to login, build and push the image to the container registry.</p> <h3 id="why-use-cicd" id=why-use-cicd> <span class="me-2">Why use CI/CD?</span> <a href="#why-use-cicd" class="anchor text-muted"><i class="fas fa-hashtag"></i></a> </h3><p>It takes the manual process steps away and does them for you, helping you to avoid missing any steps and avoiding errors. This also makes the interaction seamless and automated.</p> + + + Reset and Restart + http://localhost:1313/post/2024-09-05-resetrestart/ + Thu, 05 Sep 2024 00:00:00 +0000 + http://localhost:1313/post/2024-09-05-resetrestart/ + <p>It&rsquo;s time to reset the website and start building my blog again. I have had this domain for a number of years and it has always been used for my E-Mail.</p> <p>But the website has been more of a play ground for experimenting and testing.</p> <p>I am now hoping to get into the habit of writing more blog posts as I document my journey as I experiment with my HomeLab.</p> + + + diff --git a/public/tags/index.html b/public/tags/index.html index 967f886..709d9dc 100644 --- a/public/tags/index.html +++ b/public/tags/index.html @@ -1,49 +1,957 @@ -Tags | -Comprofix
- - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Tags | + + Comprofix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + +
+ +
+ + + + + + + + +
+
+
+
+ + + + +
+ + + +
+ +
+ +
+ + +
+

+ © + + + + + Comprofix. + + + + Some rights reserved. +

+ +

Using the Chirpy theme for Hugo. +

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Trending Tags

+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ +
\ No newline at end of file + `; + }).join(''); + + this.resultsContainer.innerHTML = searchItems; + } + + + checkFieldsForMatch(item, term) { + const matches = { + inTitle: false, + inDesc: false, + inSection: false, + inContents: false + }; + + + if (DEFAULT_CONFIG.search.fields.title && this.containsTerm(item.searchableTitle, term)) { + matches.inTitle = true; + } + + if (DEFAULT_CONFIG.search.fields.description && this.containsTerm(item.searchableDesc, term)) { + matches.inDesc = true; + } + + if (DEFAULT_CONFIG.search.fields.section && this.containsTerm(item.searchableSection, term)) { + matches.inSection = true; + } + + if (DEFAULT_CONFIG.search.fields.contents && this.containsTerm(item.searchableContents, term)) { + matches.inContents = true; + } + + + if (matches.inTitle || matches.inDesc || matches.inSection || matches.inContents) { + return matches; + } + + + return false; + } + } + + const search = new FastSearch({ + searchInput: document.getElementById('search-input'), + resultsContainer: document.getElementById('search-results'), + json: `\/index.json` + }); + + +
+ + +
+ +
+ + \ No newline at end of file diff --git a/public/tags/index.xml b/public/tags/index.xml index 25b8990..2f87b70 100644 --- a/public/tags/index.xml +++ b/public/tags/index.xml @@ -1 +1,61 @@ -Tags on Comprofixhttps://comprofix.com/tags/Recent content in Tags on ComprofixHugoenCdhttps://comprofix.com/tags/cd/Sat, 21 Sep 2024 00:00:00 +0000https://comprofix.com/tags/cd/Cihttps://comprofix.com/tags/ci/Sat, 21 Sep 2024 00:00:00 +0000https://comprofix.com/tags/ci/Continuous Deploymenthttps://comprofix.com/tags/continuous-deployment/Sat, 21 Sep 2024 00:00:00 +0000https://comprofix.com/tags/continuous-deployment/Continuous Integrationhttps://comprofix.com/tags/continuous-integration/Sat, 21 Sep 2024 00:00:00 +0000https://comprofix.com/tags/continuous-integration/Dockerhttps://comprofix.com/tags/docker/Sat, 21 Sep 2024 00:00:00 +0000https://comprofix.com/tags/docker/Githttps://comprofix.com/tags/git/Sat, 21 Sep 2024 00:00:00 +0000https://comprofix.com/tags/git/Homelabhttps://comprofix.com/tags/homelab/Sat, 21 Sep 2024 00:00:00 +0000https://comprofix.com/tags/homelab/ \ No newline at end of file + + + + Tags on Comprofix + http://localhost:1313/tags/ + Recent content in Tags on Comprofix + Hugo + en + Sat, 21 Sep 2024 00:00:00 +0000 + + + Cd + http://localhost:1313/tags/cd/ + Sat, 21 Sep 2024 00:00:00 +0000 + http://localhost:1313/tags/cd/ + + + + Ci + http://localhost:1313/tags/ci/ + Sat, 21 Sep 2024 00:00:00 +0000 + http://localhost:1313/tags/ci/ + + + + Continuous Deployment + http://localhost:1313/tags/continuous-deployment/ + Sat, 21 Sep 2024 00:00:00 +0000 + http://localhost:1313/tags/continuous-deployment/ + + + + Continuous Integration + http://localhost:1313/tags/continuous-integration/ + Sat, 21 Sep 2024 00:00:00 +0000 + http://localhost:1313/tags/continuous-integration/ + + + + Docker + http://localhost:1313/tags/docker/ + Sat, 21 Sep 2024 00:00:00 +0000 + http://localhost:1313/tags/docker/ + + + + Git + http://localhost:1313/tags/git/ + Sat, 21 Sep 2024 00:00:00 +0000 + http://localhost:1313/tags/git/ + + + + Homelab + http://localhost:1313/tags/homelab/ + Sat, 21 Sep 2024 00:00:00 +0000 + http://localhost:1313/tags/homelab/ + + + +