From cd513bd796ad3d583d5f599eb8ca08a674bfda91 Mon Sep 17 00:00:00 2001
From: Oleg Belyaev
Date: Sat, 29 Mar 2025 23:57:33 +0300
Subject: [PATCH 1/9] transition to htmx, made truly infinite scroll
---
README.md | 3 +
static/abaev-global.js | 133 ------------
static/abaev-html.css | 87 +++-----
static/abaev-index.js | 73 -------
static/abaev.js | 186 -----------------
static/htmx.min.js | 1 +
static/infinite-scroll.pkgd.min.js | 14 --
static/jquery-3.7.1.min.js | 2 -
static/pico.classless.min.css | 4 +
xq/abv-mod.xqm | 18 ++
xq/site/components/dictionary.xq | 96 ---------
xq/site/components/entries.xqm | 182 +++++++++++++++++
xq/site/components/{home.xq => home.xqm} | 0
xq/site/components/index.xq | 49 -----
xq/site/components/index.xqm | 149 ++++++++++++++
xq/site/components/map.xqm | 61 ++++++
xq/site/components/search.xq | 31 ---
xq/site/components/search.xqm | 133 ++++++++++++
xq/site/restx_api.xq | 210 -------------------
xq/site/restx_dict.xq | 123 -----------
xq/site/restx_entrypoints.xq | 31 ---
xq/site/restx_main.xq | 250 +++++++++++++++++++++++
xq/site/restx_search.xq | 75 -------
xq/site/shared/shared.xq | 165 ---------------
xq/test.xq | 11 +-
xsl/abaev2html.xsl | 15 ++
26 files changed, 849 insertions(+), 1253 deletions(-)
delete mode 100644 static/abaev-global.js
delete mode 100644 static/abaev-index.js
delete mode 100644 static/abaev.js
create mode 100644 static/htmx.min.js
delete mode 100644 static/infinite-scroll.pkgd.min.js
delete mode 100644 static/jquery-3.7.1.min.js
create mode 100644 static/pico.classless.min.css
delete mode 100644 xq/site/components/dictionary.xq
create mode 100644 xq/site/components/entries.xqm
rename xq/site/components/{home.xq => home.xqm} (100%)
delete mode 100644 xq/site/components/index.xq
create mode 100644 xq/site/components/index.xqm
create mode 100644 xq/site/components/map.xqm
delete mode 100644 xq/site/components/search.xq
create mode 100644 xq/site/components/search.xqm
delete mode 100644 xq/site/restx_api.xq
delete mode 100644 xq/site/restx_dict.xq
delete mode 100644 xq/site/restx_entrypoints.xq
create mode 100644 xq/site/restx_main.xq
delete mode 100644 xq/site/restx_search.xq
delete mode 100644 xq/site/shared/shared.xq
diff --git a/README.md b/README.md
index 7ad4146..49fe22e 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,9 @@
This repository contains the webapp files to be used with [BaseX](https://basex.org/) running as a webapp, plus some scripts to convert between different XML representations.
+This is a rewrite that dispenses with most JS code, apart from some basic logic that is directly encoded in attributes.
+This is achieved by using HTMX.
+
Original code written by Oleg Belyaev in 2024–2025.
A public version of this database is currently available [here](https://abaev.belyaev.io/dict).
diff --git a/static/abaev-global.js b/static/abaev-global.js
deleted file mode 100644
index 6398f17..0000000
--- a/static/abaev-global.js
+++ /dev/null
@@ -1,133 +0,0 @@
-var md5 = (function() {
- var MD5 = function (d) {
- return M(V(Y(X(d), 8 * d.length)))
- }
- function M (d) {
- for (var _, m = '0123456789abcdef', f = '', r = 0; r < d.length; r++) {
- _ = d.charCodeAt(r)
- f += m.charAt(_ >>> 4 & 15) + m.charAt(15 & _)
- }
- return f
- }
- function X (d) {
- for (var _ = Array(d.length >> 2), m = 0; m < _.length; m++) {
- _[m] = 0
- }
- for (m = 0; m < 8 * d.length; m += 8) {
- _[m >> 5] |= (255 & d.charCodeAt(m / 8)) << m % 32
- }
- return _
- }
- function V (d) {
- for (var _ = '', m = 0; m < 32 * d.length; m += 8) _ += String.fromCharCode(d[m >> 5] >>> m % 32 & 255)
- return _
- }
- function Y (d, _) {
- d[_ >> 5] |= 128 << _ % 32
- d[14 + (_ + 64 >>> 9 << 4)] = _
- for (var m = 1732584193, f = -271733879, r = -1732584194, i = 271733878, n = 0; n < d.length; n += 16) {
- var h = m
- var t = f
- var g = r
- var e = i
- f = md5ii(f = md5ii(f = md5ii(f = md5ii(f = md5hh(f = md5hh(f = md5hh(f = md5hh(f = md5gg(f = md5gg(f = md5gg(f = md5gg(f = md5ff(f = md5ff(f = md5ff(f = md5ff(f, r = md5ff(r, i = md5ff(i, m = md5ff(m, f, r, i, d[n + 0], 7, -680876936), f, r, d[n + 1], 12, -389564586), m, f, d[n + 2], 17, 606105819), i, m, d[n + 3], 22, -1044525330), r = md5ff(r, i = md5ff(i, m = md5ff(m, f, r, i, d[n + 4], 7, -176418897), f, r, d[n + 5], 12, 1200080426), m, f, d[n + 6], 17, -1473231341), i, m, d[n + 7], 22, -45705983), r = md5ff(r, i = md5ff(i, m = md5ff(m, f, r, i, d[n + 8], 7, 1770035416), f, r, d[n + 9], 12, -1958414417), m, f, d[n + 10], 17, -42063), i, m, d[n + 11], 22, -1990404162), r = md5ff(r, i = md5ff(i, m = md5ff(m, f, r, i, d[n + 12], 7, 1804603682), f, r, d[n + 13], 12, -40341101), m, f, d[n + 14], 17, -1502002290), i, m, d[n + 15], 22, 1236535329), r = md5gg(r, i = md5gg(i, m = md5gg(m, f, r, i, d[n + 1], 5, -165796510), f, r, d[n + 6], 9, -1069501632), m, f, d[n + 11], 14, 643717713), i, m, d[n + 0], 20, -373897302), r = md5gg(r, i = md5gg(i, m = md5gg(m, f, r, i, d[n + 5], 5, -701558691), f, r, d[n + 10], 9, 38016083), m, f, d[n + 15], 14, -660478335), i, m, d[n + 4], 20, -405537848), r = md5gg(r, i = md5gg(i, m = md5gg(m, f, r, i, d[n + 9], 5, 568446438), f, r, d[n + 14], 9, -1019803690), m, f, d[n + 3], 14, -187363961), i, m, d[n + 8], 20, 1163531501), r = md5gg(r, i = md5gg(i, m = md5gg(m, f, r, i, d[n + 13], 5, -1444681467), f, r, d[n + 2], 9, -51403784), m, f, d[n + 7], 14, 1735328473), i, m, d[n + 12], 20, -1926607734), r = md5hh(r, i = md5hh(i, m = md5hh(m, f, r, i, d[n + 5], 4, -378558), f, r, d[n + 8], 11, -2022574463), m, f, d[n + 11], 16, 1839030562), i, m, d[n + 14], 23, -35309556), r = md5hh(r, i = md5hh(i, m = md5hh(m, f, r, i, d[n + 1], 4, -1530992060), f, r, d[n + 4], 11, 1272893353), m, f, d[n + 7], 16, -155497632), i, m, d[n + 10], 23, -1094730640), r = md5hh(r, i = md5hh(i, m = md5hh(m, f, r, i, d[n + 13], 4, 681279174), f, r, d[n + 0], 11, -358537222), m, f, d[n + 3], 16, -722521979), i, m, d[n + 6], 23, 76029189), r = md5hh(r, i = md5hh(i, m = md5hh(m, f, r, i, d[n + 9], 4, -640364487), f, r, d[n + 12], 11, -421815835), m, f, d[n + 15], 16, 530742520), i, m, d[n + 2], 23, -995338651), r = md5ii(r, i = md5ii(i, m = md5ii(m, f, r, i, d[n + 0], 6, -198630844), f, r, d[n + 7], 10, 1126891415), m, f, d[n + 14], 15, -1416354905), i, m, d[n + 5], 21, -57434055), r = md5ii(r, i = md5ii(i, m = md5ii(m, f, r, i, d[n + 12], 6, 1700485571), f, r, d[n + 3], 10, -1894986606), m, f, d[n + 10], 15, -1051523), i, m, d[n + 1], 21, -2054922799), r = md5ii(r, i = md5ii(i, m = md5ii(m, f, r, i, d[n + 8], 6, 1873313359), f, r, d[n + 15], 10, -30611744), m, f, d[n + 6], 15, -1560198380), i, m, d[n + 13], 21, 1309151649), r = md5ii(r, i = md5ii(i, m = md5ii(m, f, r, i, d[n + 4], 6, -145523070), f, r, d[n + 11], 10, -1120210379), m, f, d[n + 2], 15, 718787259), i, m, d[n + 9], 21, -343485551)
- m = safeadd(m, h)
- f = safeadd(f, t)
- r = safeadd(r, g)
- i = safeadd(i, e)
- }
- return [m, f, r, i]
- }
- function md5cmn (d, _, m, f, r, i) {
- return safeadd(bitrol(safeadd(safeadd(_, d), safeadd(f, i)), r), m)
- }
- function md5ff (d, _, m, f, r, i, n) {
- return md5cmn(_ & m | ~_ & f, d, _, r, i, n)
- }
- function md5gg (d, _, m, f, r, i, n) {
- return md5cmn(_ & f | m & ~f, d, _, r, i, n)
- }
- function md5hh (d, _, m, f, r, i, n) {
- return md5cmn(_ ^ m ^ f, d, _, r, i, n)
- }
- function md5ii (d, _, m, f, r, i, n) {
- return md5cmn(m ^ (_ | ~f), d, _, r, i, n)
- }
- function safeadd (d, _) {
- var m = (65535 & d) + (65535 & _)
- return (d >> 16) + (_ >> 16) + (m >> 16) << 16 | 65535 & m
- }
- function bitrol (d, _) {
- return d << _ | d >>> 32 - _
- }
- function MD5Unicode(buffer){
- if (!(buffer instanceof Uint8Array)) {
- buffer = new TextEncoder().encode(typeof buffer==='string' ? buffer : JSON.stringify(buffer));
- }
- var binary = [];
- var bytes = new Uint8Array(buffer);
- for (var i = 0, il = bytes.byteLength; i < il; i++) {
- binary.push(String.fromCharCode(bytes[i]));
- }
- return MD5(binary.join(''));
- }
-
- return MD5Unicode;
-})();
-
-$( document ).ready(function() {
- // GLOBALS;
-
- // Link elements that do not have href out of the box
- $('.link').on("click", function () {
- window.location=$(this)[0].dataset.href+window.location.search+window.location.hash;
- });
-
- $('#abv-search').on("submit", function () {
- $('#abv-search-icon').replaceWith('
');
- });
-
- // SEARCH RESULTS MODAL
- $('#abv-btn-searchResults').on("click", function () {
- $('#modal_searchResults')[0].showModal();
- });
-
- // Close search modal
- $('.abv-close-search').on("click", function () {
- $('#modal_searchResults')[0].close();
- });
-
- $('#modal_searchResults').on("toggle", async function () {
- // let html = "";
- async function getResults() {
- let url = "./api/search/current";
- const response = await fetch(url);
- const result = await response.json();
- return result;
- }
- async function getEntryForm(id) {
- let url = `./api/entries/${md5(id).toUpperCase()}`;
- const response = await fetch(url);
- const result = await response.json();
- return result.form;
- }
- searchResults = await getResults();
- for (result of searchResults) {
- let pos = searchResults.indexOf(result);
- // let form = await getEntryForm(result.entry);
- let html = `
-
- ${pos+1}
-
- ${result.entryForm}
-
-
- ${result.fragment}
-
-
- `
- $(this).find('tbody').append($(html));
- }
- // $(this).find('tbody').append($(html));
- });
-});
diff --git a/static/abaev-html.css b/static/abaev-html.css
index 305ad68..cf94188 100644
--- a/static/abaev-html.css
+++ b/static/abaev-html.css
@@ -14,7 +14,7 @@ Root
:root {}
html {}
-body {}
+body {height: 100vh;}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -30,8 +30,7 @@ h5 {}
h6 {}
body > header {
- position: sticky;
- top: 0;
+ max-height: 10vh;
background-color: #FCF9F5;
margin-left: 0;
margin-right: 0;
@@ -39,8 +38,8 @@ body > header {
max-width: 100vw;
/* border-bottom-width: thin;
border-bottom-style: solid;*/
+ margin-bottom: 10px !important;
padding-bottom: 0px !important;
- margin-bottom: 0px !important;
padding-top: 0px !important;
/* padding-right: 1em !important;
padding-left: 1em !important;*/
@@ -87,7 +86,9 @@ body > header {
body>header>nav,
body>footer>nav {
- margin: auto;
+ margin-right: auto;
+ margin-left: auto;
+ max-height: 10vh;
--pico-primary: #8D0B02 !important;
--pico-primary-background: #8D0B02 !important;
--pico-primary-border: #8D0B02 !important;
@@ -124,12 +125,15 @@ nav li.abv-menu-re {
filter: gray;
}
-main {}
+main {
+ height: 85vh;
+ overflow-y: scroll;
+ padding-top: 0 !important;
+}
article.abv-entry {
display: grid;
grid-template-columns: minmax(0px,15%) 5% minmax(50%,80%);
- align-items: baseline;
}
section {}
@@ -292,6 +296,13 @@ table {}
caption {}
col:first-child {}
thead {}
+
+table#abv-search-results thead {
+ padding-top: 0;
+ position: sticky;
+ top: 0;
+}
+
tbody {}
tfoot {}
tr {}
@@ -309,19 +320,17 @@ legend {}
form {}
-header form {
- margin-bottom: 0 !important;
+/*table#abv-search-results {
+ height: 100%;
}
-header form button {
- padding-left: 1em !important;
- padding-right: 1em !important;
- padding-top: 0 !important;
- padding-bottom: 0 !important;
-}
+table#abv-search-results tbody {
+ height:100%;
+ overflow-y: scroll;
+}*/
-header form select {
- max-width:35%;
+form#abv-search select {
+ max-width:15%;
}
label {}
@@ -466,28 +475,6 @@ dialog > article {
max-height: 85vh !important;
}
-dialog#modal_searchResults > article {
- padding-top: 0;
- padding-bottom: 0;
-}
-
-dialog#modal_searchResults > article > table > thead {
- position: sticky;
- top: 0;
- z-index: 1055;
-}
-
-dialog#modal_searchResults > article > header {
- position: sticky;
- top: 0;
- z-index: 1055;
-}
-dialog#modal_searchResults > article > footer {
- position: sticky;
- bottom: 0;
- z-index: 1055;
-}
-
/*dialog#modal_searchResults > article > p > table > tbody {
height:100%;
overflow-y: scroll;
@@ -539,25 +526,3 @@ span.abv-text-sc {
This file evolved from Natural Selection:
https://github.com/frontaid/natural-selection
*/
-
-.icons{
- text-align: center;
- width: 1.5em;
- float: left;
- padding-right: 0.5vw;
-}
-
-.loader {
- border: 2px solid #f3f3f3;
- border-radius: 50%;
- border-top: 2px solid #3498db;
- width: 2ex;
- height: 2ex;
- -webkit-animation: spin 2s linear infinite; /* Safari */
- animation: spin 2s linear infinite;
-}
-
-@keyframes spin {
- 0% { transform: rotate(0deg); }
- 100% { transform: rotate(360deg); }
-}
diff --git a/static/abaev-index.js b/static/abaev-index.js
deleted file mode 100644
index 229d3e4..0000000
--- a/static/abaev-index.js
+++ /dev/null
@@ -1,73 +0,0 @@
-$( document ).ready(function() {
- $('#abv-select-lang').on('input', function() {
- let $selected = $(this).children('option:selected');
- let url = `./api/languages/${$selected.attr('value')}`;
-
- fetch(url)
- .then(res => res.json())
- .then(out => {
- let $select_word = $('#abv-select-word');
- let $select_entry = $('#abv-select-entry');
- $select_word.empty();
- $select_entry.empty();
- $('#btn-index-submit').prop('hidden',true);
- for (w of out.words) {
- $select_word.append(new Option(w.text,w.id))
- }
- })
- .catch(err => console.log(err));
- });
-
- $('#abv-select-word').on('input', function() {
- let $selected = $(this).children('option:selected');
- let wordid = $selected.attr('value');
- let lang = $('#abv-select-lang').children('option:selected').attr('value');
- let url = `./api/languages/${lang}/words/${wordid}`;
-
- fetch(url)
- .then(res => res.json())
- .then(out => {
- let $select_entry = $('#abv-select-entry');
- $select_entry.empty();
- $('#btn-index-submit').prop('hidden',true);
- for (e of out.entries) {
- url_entry = `./api/entries/${e.id}`;
- fetch(url_entry)
- .then(res => res.json())
- .then(out => {
- let entrystring = '';
- let glosses = [];
- for (r of e.refs) {
- if (r.glosses) {
- for(g of r.glosses){
- glosses.push(`‘${g}’`);
- }
- }
- }
- if(glosses.length > 0) {
- entrystring = `${glosses.join('; ')}: `
- }
- opt = $(`${entrystring}${out.form}
- ${out.glosses.map(g => `‘${g}’`).join(', ')} `);
- $select_entry.append(opt)
- })
- .catch(err => console.log(err));
- }
- })
- .catch(err => console.log(err));
- });
-
- $('#abv-select-entry').on("input", function () {
- $('#btn-index-submit').removeAttr('hidden');
- })
-
- function goToEntry() {
- let $selected = $('#abv-select-entry').children('option:selected');
- let entry = $selected.attr('value');
- let path = $selected.attr('data-abv-xpath');
- window.location.replace('./dict/' + entry + `?entry=${entry}&xpath=${path}`);
- }
-
- $('#abv-select-entry').on("dblclick", goToEntry);
- $('#btn-index-submit').on("click", goToEntry);
-});
diff --git a/static/abaev.js b/static/abaev.js
deleted file mode 100644
index c720252..0000000
--- a/static/abaev.js
+++ /dev/null
@@ -1,186 +0,0 @@
-$( document ).ready(function() {
- // GLOBALS;
-
- // Link elements that do not have href out of the box
- $('.link').on("click", function () {
- window.location=$(this)[0].dataset.href+window.location.search+window.location.hash;
- });
-
- $('#abv-search').on("submit", function () {
- $('#abv-search-icon').replaceWith('
');
- });
-
- // INFINITE SCROLL
-
- // init Infinite Scroll
- $('main').infiniteScroll({
- path: '.pagination__next',
- append: 'div.abv-lex',
- //status: '.scroller-status',
- //hideNav: '.pagination',
- });
-
- // MAP MODAL
- // This event binding is done on page load and also whenever new entries are loaded.
- bindMapOpen = function () {
- let url = `./dict/map-info/${$(this).data('abv-entry')}`;
-
- fetch(url)
- .then(res => res.json())
- .then(out => {
- $('#modal_map').data('map',out);
- $('#modal_map')[0].showModal();
- })
- .catch(err => console.log(err));
- };
-
- // Event to open map modal.
- $('.abv-map').on("click", bindMapOpen);
-
- $('main').on( 'append.infiniteScroll', function( event, body, path, response ) {
- $('.abv-map').on("click", bindMapOpen);
- });
-
- // Close map modal
- $('.abv-close-map').on("click", function () {
- $('#modal_map')[0].close();
- });
-
- // Load map data when dialog opens
- $('#modal_map').on("toggle", function () {
- map = document.getElementById('map_display');
- var layout = {
- // title: {
- // text: 'Canadian cities',
- // font: {
- // family: 'Droid Serif, serif',
- // size: 16
- // }
- // },
- geo: {
- scope: 'world',
- resolution: 50,
- fitbounds: 'locations',
- showrivers: true,
- rivercolor: '#fff',
- showlakes: true,
- lakecolor: '#fff',
- showland: true,
- landcolor: '#EAEAAE',
- showcountries: false,
- subunitcolor: '#d3d3d3'
- }
- };
- Plotly.newPlot(map, [$(this).data('map')], layout);
- });
-
- // HASH NAVIGATION
- // If the hash is on the page, scroll a little bit above to account for top nav height
- if ( $(decodeURI(document.location.hash)).length > 0) {
- window.scrollBy(0,-$('header').height());
- }
-
- // If the hash is not on the page, go to the right page by using the ID interface
- $( window ).on('hashchange', function() {
- const hash = decodeURI(document.location.hash);
-
- if ( hash.startsWith('#entry_') ) {
- if ( $(hash).length == 0) {
- window.location.replace(document.location.pathname + '/' + document.location.hash.substring(1));
- }
- else {
- window.scrollBy(0,-$('header').height());
- }
- }
- });
-
- // ENTRY LIST SIDE PANEL
-
- // Function to produce HTML for the entry list
- function filterEntryList(list, filter, showSubentries) {
- let listHtml = "";
- for (entry of list) {
- let entryID = entry.xmlid;
- let entryForm = entry.form;
- if (entryForm.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").startsWith(filter)
- && (!entry.subentry || showSubentries)
- ) {
- listHtml += ``
- }
- }
- listHtml = $(``);
- $("#entrylist").append(listHtml);
- }
-
- // Fetch entries from the server when page loads
- var entries = [];
-
- fetch('./api/entries')
- .then(res => res.json())
- .then(out => {
- entries = out;
- filterEntryList(entries, '', false);
- })
- .then(err => console.log(err));
-
- // Function to scroll the entry list to the selected entry OR to the first entry displayed on the current page if there is no hash in the URL
- function scrollView() {
- var $container = $('#entrylist')
- if (document.location.hash.length > 0) {
- var $scrollTo = $(`#link_${$(decodeURI(document.location.hash)).attr('id')}`);
- }
- else {
- var $scrollTo = $(`#link_${$('article:first').attr('id')}`);
- }
- $container.scrollTop(
- $scrollTo.offset().top - $container.offset().top + $container.scrollTop())
- }
-
- // Click to open the offcanvas entry list
- $( '#open-leftbar' ).on('click', function() {
- $("#leftbar").show();
- $("main")[0].style.marginLeft = "250px";
- $("header nav")[0].style.marginLeft = "250px";
- $("footer nav")[0].style.marginLeft = "250px";
- $("#open-leftbar").hide();
- $("#close-leftbar").show();
-
- scrollView();
- });
-
- // Click to close the offcanvas entry list
- $( '#close-leftbar' ).on('click', function() {
- $("#leftbar").hide();
- // $("#leftbar")[0].style.paddingLeft = null;
- $("main")[0].style.marginLeft = null;
- $("header nav")[0].style.marginLeft = null;
- $("footer nav")[0].style.marginLeft = null;
- $("#open-leftbar").show();
- $("#close-leftbar").hide();
- })
-
- // Quick filter functionality
- $('#filter-entries').on("keyup", function () {
- $("#entrylist > ul").remove();
- var value = $(this).val().toLowerCase();
- filterEntryList(entries, value, $('#show-re').prop('checked'))
- // var value = $(this).val().toLowerCase();
- // if (value.length > 0) {
- // $("#entrylist > ul > li:not([hidden])").filter(function () {
- // return $(this).toggle($(this).children('a').text().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").startsWith(value))
- // });
- // }
- // else {
- // $("#entrylist > ul > li").show();
- // }
- //
- // return false;
- });
-
- // Event handler to show subentries
- $('#show-re').on("change", function () {
- $("#entrylist > ul").remove();
- filterEntryList(entries, $("#filter-entries").val().toLowerCase(), $(this).prop('checked'));
- scrollView();
- });
-});
diff --git a/static/htmx.min.js b/static/htmx.min.js
new file mode 100644
index 0000000..de5f0f1
--- /dev/null
+++ b/static/htmx.min.js
@@ -0,0 +1 @@
+(function(e,t){if(typeof define==="function"&&define.amd){define([],t)}else if(typeof module==="object"&&module.exports){module.exports=t()}else{e.htmx=e.htmx||t()}})(typeof self!=="undefined"?self:this,function(){return function(){"use strict";var Q={onLoad:F,process:zt,on:de,off:ge,trigger:ce,ajax:Nr,find:C,findAll:f,closest:v,values:function(e,t){var r=dr(e,t||"post");return r.values},remove:_,addClass:z,removeClass:n,toggleClass:$,takeClass:W,defineExtension:Ur,removeExtension:Br,logAll:V,logNone:j,logger:null,config:{historyEnabled:true,historyCacheSize:10,refreshOnHistoryMiss:false,defaultSwapStyle:"innerHTML",defaultSwapDelay:0,defaultSettleDelay:20,includeIndicatorStyles:true,indicatorClass:"htmx-indicator",requestClass:"htmx-request",addedClass:"htmx-added",settlingClass:"htmx-settling",swappingClass:"htmx-swapping",allowEval:true,allowScriptTags:true,inlineScriptNonce:"",attributesToSettle:["class","style","width","height"],withCredentials:false,timeout:0,wsReconnectDelay:"full-jitter",wsBinaryType:"blob",disableSelector:"[hx-disable], [data-hx-disable]",useTemplateFragments:false,scrollBehavior:"smooth",defaultFocusScroll:false,getCacheBusterParam:false,globalViewTransitions:false,methodsThatUseUrlParams:["get"],selfRequestsOnly:false,ignoreTitle:false,scrollIntoViewOnBoost:true,triggerSpecsCache:null},parseInterval:d,_:t,createEventSource:function(e){return new EventSource(e,{withCredentials:true})},createWebSocket:function(e){var t=new WebSocket(e,[]);t.binaryType=Q.config.wsBinaryType;return t},version:"1.9.12"};var r={addTriggerHandler:Lt,bodyContains:se,canAccessLocalStorage:U,findThisElement:xe,filterValues:yr,hasAttribute:o,getAttributeValue:te,getClosestAttributeValue:ne,getClosestMatch:c,getExpressionVars:Hr,getHeaders:xr,getInputValues:dr,getInternalData:ae,getSwapSpecification:wr,getTriggerSpecs:it,getTarget:ye,makeFragment:l,mergeObjects:le,makeSettleInfo:T,oobSwap:Ee,querySelectorExt:ue,selectAndSwap:je,settleImmediately:nr,shouldCancel:ut,triggerEvent:ce,triggerErrorEvent:fe,withExtensions:R};var w=["get","post","put","delete","patch"];var i=w.map(function(e){return"[hx-"+e+"], [data-hx-"+e+"]"}).join(", ");var S=e("head"),q=e("title"),H=e("svg",true);function e(e,t){return new RegExp("<"+e+"(\\s[^>]*>|>)([\\s\\S]*?)<\\/"+e+">",!!t?"gim":"im")}function d(e){if(e==undefined){return undefined}let t=NaN;if(e.slice(-2)=="ms"){t=parseFloat(e.slice(0,-2))}else if(e.slice(-1)=="s"){t=parseFloat(e.slice(0,-1))*1e3}else if(e.slice(-1)=="m"){t=parseFloat(e.slice(0,-1))*1e3*60}else{t=parseFloat(e)}return isNaN(t)?undefined:t}function ee(e,t){return e.getAttribute&&e.getAttribute(t)}function o(e,t){return e.hasAttribute&&(e.hasAttribute(t)||e.hasAttribute("data-"+t))}function te(e,t){return ee(e,t)||ee(e,"data-"+t)}function u(e){return e.parentElement}function re(){return document}function c(e,t){while(e&&!t(e)){e=u(e)}return e?e:null}function L(e,t,r){var n=te(t,r);var i=te(t,"hx-disinherit");if(e!==t&&i&&(i==="*"||i.split(" ").indexOf(r)>=0)){return"unset"}else{return n}}function ne(t,r){var n=null;c(t,function(e){return n=L(t,e,r)});if(n!=="unset"){return n}}function h(e,t){var r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;return r&&r.call(e,t)}function A(e){var t=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i;var r=t.exec(e);if(r){return r[1].toLowerCase()}else{return""}}function s(e,t){var r=new DOMParser;var n=r.parseFromString(e,"text/html");var i=n.body;while(t>0){t--;i=i.firstChild}if(i==null){i=re().createDocumentFragment()}return i}function N(e){return/"+n+" ",0);var a=i.querySelector("template").content;if(Q.config.allowScriptTags){oe(a.querySelectorAll("script"),function(e){if(Q.config.inlineScriptNonce){e.nonce=Q.config.inlineScriptNonce}e.htmxExecuted=navigator.userAgent.indexOf("Firefox")===-1})}else{oe(a.querySelectorAll("script"),function(e){_(e)})}return a}switch(r){case"thead":case"tbody":case"tfoot":case"colgroup":case"caption":return s("",1);case"col":return s("",2);case"tr":return s("",2);case"td":case"th":return s("",3);case"script":case"style":return s(""+n+"
",1);default:return s(n,0)}}function ie(e){if(e){e()}}function I(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function k(e){return I(e,"Function")}function P(e){return I(e,"Object")}function ae(e){var t="htmx-internal-data";var r=e[t];if(!r){r=e[t]={}}return r}function M(e){var t=[];if(e){for(var r=0;r=0}function se(e){if(e.getRootNode&&e.getRootNode()instanceof window.ShadowRoot){return re().body.contains(e.getRootNode().host)}else{return re().body.contains(e)}}function D(e){return e.trim().split(/\s+/)}function le(e,t){for(var r in t){if(t.hasOwnProperty(r)){e[r]=t[r]}}return e}function E(e){try{return JSON.parse(e)}catch(e){b(e);return null}}function U(){var e="htmx:localStorageTest";try{localStorage.setItem(e,e);localStorage.removeItem(e);return true}catch(e){return false}}function B(t){try{var e=new URL(t);if(e){t=e.pathname+e.search}if(!/^\/$/.test(t)){t=t.replace(/\/+$/,"")}return t}catch(e){return t}}function t(e){return Tr(re().body,function(){return eval(e)})}function F(t){var e=Q.on("htmx:load",function(e){t(e.detail.elt)});return e}function V(){Q.logger=function(e,t,r){if(console){console.log(t,e,r)}}}function j(){Q.logger=null}function C(e,t){if(t){return e.querySelector(t)}else{return C(re(),e)}}function f(e,t){if(t){return e.querySelectorAll(t)}else{return f(re(),e)}}function _(e,t){e=p(e);if(t){setTimeout(function(){_(e);e=null},t)}else{e.parentElement.removeChild(e)}}function z(e,t,r){e=p(e);if(r){setTimeout(function(){z(e,t);e=null},r)}else{e.classList&&e.classList.add(t)}}function n(e,t,r){e=p(e);if(r){setTimeout(function(){n(e,t);e=null},r)}else{if(e.classList){e.classList.remove(t);if(e.classList.length===0){e.removeAttribute("class")}}}}function $(e,t){e=p(e);e.classList.toggle(t)}function W(e,t){e=p(e);oe(e.parentElement.children,function(e){n(e,t)});z(e,t)}function v(e,t){e=p(e);if(e.closest){return e.closest(t)}else{do{if(e==null||h(e,t)){return e}}while(e=e&&u(e));return null}}function g(e,t){return e.substring(0,t.length)===t}function G(e,t){return e.substring(e.length-t.length)===t}function J(e){var t=e.trim();if(g(t,"<")&&G(t,"/>")){return t.substring(1,t.length-2)}else{return t}}function Z(e,t){if(t.indexOf("closest ")===0){return[v(e,J(t.substr(8)))]}else if(t.indexOf("find ")===0){return[C(e,J(t.substr(5)))]}else if(t==="next"){return[e.nextElementSibling]}else if(t.indexOf("next ")===0){return[K(e,J(t.substr(5)))]}else if(t==="previous"){return[e.previousElementSibling]}else if(t.indexOf("previous ")===0){return[Y(e,J(t.substr(9)))]}else if(t==="document"){return[document]}else if(t==="window"){return[window]}else if(t==="body"){return[document.body]}else{return re().querySelectorAll(J(t))}}var K=function(e,t){var r=re().querySelectorAll(t);for(var n=0;n=0;n--){var i=r[n];if(i.compareDocumentPosition(e)===Node.DOCUMENT_POSITION_FOLLOWING){return i}}};function ue(e,t){if(t){return Z(e,t)[0]}else{return Z(re().body,e)[0]}}function p(e){if(I(e,"String")){return C(e)}else{return e}}function ve(e,t,r){if(k(t)){return{target:re().body,event:e,listener:t}}else{return{target:p(e),event:t,listener:r}}}function de(t,r,n){jr(function(){var e=ve(t,r,n);e.target.addEventListener(e.event,e.listener)});var e=k(r);return e?r:n}function ge(t,r,n){jr(function(){var e=ve(t,r,n);e.target.removeEventListener(e.event,e.listener)});return k(r)?r:n}var pe=re().createElement("output");function me(e,t){var r=ne(e,t);if(r){if(r==="this"){return[xe(e,t)]}else{var n=Z(e,r);if(n.length===0){b('The selector "'+r+'" on '+t+" returned no matches!");return[pe]}else{return n}}}}function xe(e,t){return c(e,function(e){return te(e,t)!=null})}function ye(e){var t=ne(e,"hx-target");if(t){if(t==="this"){return xe(e,"hx-target")}else{return ue(e,t)}}else{var r=ae(e);if(r.boosted){return re().body}else{return e}}}function be(e){var t=Q.config.attributesToSettle;for(var r=0;r0){o=e.substr(0,e.indexOf(":"));t=e.substr(e.indexOf(":")+1,e.length)}else{o=e}var r=re().querySelectorAll(t);if(r){oe(r,function(e){var t;var r=i.cloneNode(true);t=re().createDocumentFragment();t.appendChild(r);if(!Se(o,e)){t=r}var n={shouldSwap:true,target:e,fragment:t};if(!ce(e,"htmx:oobBeforeSwap",n))return;e=n.target;if(n["shouldSwap"]){Fe(o,e,e,t,a)}oe(a.elts,function(e){ce(e,"htmx:oobAfterSwap",n)})});i.parentNode.removeChild(i)}else{i.parentNode.removeChild(i);fe(re().body,"htmx:oobErrorNoTarget",{content:i})}return e}function Ce(e,t,r){var n=ne(e,"hx-select-oob");if(n){var i=n.split(",");for(var a=0;a0){var r=t.replace("'","\\'");var n=e.tagName.replace(":","\\:");var i=o.querySelector(n+"[id='"+r+"']");if(i&&i!==o){var a=e.cloneNode();we(e,i);s.tasks.push(function(){we(e,a)})}}})}function Oe(e){return function(){n(e,Q.config.addedClass);zt(e);Nt(e);qe(e);ce(e,"htmx:load")}}function qe(e){var t="[autofocus]";var r=h(e,t)?e:e.querySelector(t);if(r!=null){r.focus()}}function a(e,t,r,n){Te(e,r,n);while(r.childNodes.length>0){var i=r.firstChild;z(i,Q.config.addedClass);e.insertBefore(i,t);if(i.nodeType!==Node.TEXT_NODE&&i.nodeType!==Node.COMMENT_NODE){n.tasks.push(Oe(i))}}}function He(e,t){var r=0;while(r-1){var t=e.replace(H,"");var r=t.match(q);if(r){return r[2]}}}function je(e,t,r,n,i,a){i.title=Ve(n);var o=l(n);if(o){Ce(r,o,i);o=Be(r,o,a);Re(o);return Fe(e,r,t,o,i)}}function _e(e,t,r){var n=e.getResponseHeader(t);if(n.indexOf("{")===0){var i=E(n);for(var a in i){if(i.hasOwnProperty(a)){var o=i[a];if(!P(o)){o={value:o}}ce(r,a,o)}}}else{var s=n.split(",");for(var l=0;l0){var o=t[0];if(o==="]"){n--;if(n===0){if(a===null){i=i+"true"}t.shift();i+=")})";try{var s=Tr(e,function(){return Function(i)()},function(){return true});s.source=i;return s}catch(e){fe(re().body,"htmx:syntax:error",{error:e,source:i});return null}}}else if(o==="["){n++}if(Qe(o,a,r)){i+="(("+r+"."+o+") ? ("+r+"."+o+") : (window."+o+"))"}else{i=i+o}a=t.shift()}}}function y(e,t){var r="";while(e.length>0&&!t.test(e[0])){r+=e.shift()}return r}function tt(e){var t;if(e.length>0&&Ze.test(e[0])){e.shift();t=y(e,Ke).trim();e.shift()}else{t=y(e,x)}return t}var rt="input, textarea, select";function nt(e,t,r){var n=[];var i=Ye(t);do{y(i,Je);var a=i.length;var o=y(i,/[,\[\s]/);if(o!==""){if(o==="every"){var s={trigger:"every"};y(i,Je);s.pollInterval=d(y(i,/[,\[\s]/));y(i,Je);var l=et(e,i,"event");if(l){s.eventFilter=l}n.push(s)}else if(o.indexOf("sse:")===0){n.push({trigger:"sse",sseEvent:o.substr(4)})}else{var u={trigger:o};var l=et(e,i,"event");if(l){u.eventFilter=l}while(i.length>0&&i[0]!==","){y(i,Je);var f=i.shift();if(f==="changed"){u.changed=true}else if(f==="once"){u.once=true}else if(f==="consume"){u.consume=true}else if(f==="delay"&&i[0]===":"){i.shift();u.delay=d(y(i,x))}else if(f==="from"&&i[0]===":"){i.shift();if(Ze.test(i[0])){var c=tt(i)}else{var c=y(i,x);if(c==="closest"||c==="find"||c==="next"||c==="previous"){i.shift();var h=tt(i);if(h.length>0){c+=" "+h}}}u.from=c}else if(f==="target"&&i[0]===":"){i.shift();u.target=tt(i)}else if(f==="throttle"&&i[0]===":"){i.shift();u.throttle=d(y(i,x))}else if(f==="queue"&&i[0]===":"){i.shift();u.queue=y(i,x)}else if(f==="root"&&i[0]===":"){i.shift();u[f]=tt(i)}else if(f==="threshold"&&i[0]===":"){i.shift();u[f]=y(i,x)}else{fe(e,"htmx:syntax:error",{token:i.shift()})}}n.push(u)}}if(i.length===a){fe(e,"htmx:syntax:error",{token:i.shift()})}y(i,Je)}while(i[0]===","&&i.shift());if(r){r[t]=n}return n}function it(e){var t=te(e,"hx-trigger");var r=[];if(t){var n=Q.config.triggerSpecsCache;r=n&&n[t]||nt(e,t,n)}if(r.length>0){return r}else if(h(e,"form")){return[{trigger:"submit"}]}else if(h(e,'input[type="button"], input[type="submit"]')){return[{trigger:"click"}]}else if(h(e,rt)){return[{trigger:"change"}]}else{return[{trigger:"click"}]}}function at(e){ae(e).cancelled=true}function ot(e,t,r){var n=ae(e);n.timeout=setTimeout(function(){if(se(e)&&n.cancelled!==true){if(!ct(r,e,Wt("hx:poll:trigger",{triggerSpec:r,target:e}))){t(e)}ot(e,t,r)}},r.pollInterval)}function st(e){return location.hostname===e.hostname&&ee(e,"href")&&ee(e,"href").indexOf("#")!==0}function lt(t,r,e){if(t.tagName==="A"&&st(t)&&(t.target===""||t.target==="_self")||t.tagName==="FORM"){r.boosted=true;var n,i;if(t.tagName==="A"){n="get";i=ee(t,"href")}else{var a=ee(t,"method");n=a?a.toLowerCase():"get";if(n==="get"){}i=ee(t,"action")}e.forEach(function(e){ht(t,function(e,t){if(v(e,Q.config.disableSelector)){m(e);return}he(n,i,e,t)},r,e,true)})}}function ut(e,t){if(e.type==="submit"||e.type==="click"){if(t.tagName==="FORM"){return true}if(h(t,'input[type="submit"], button')&&v(t,"form")!==null){return true}if(t.tagName==="A"&&t.href&&(t.getAttribute("href")==="#"||t.getAttribute("href").indexOf("#")!==0)){return true}}return false}function ft(e,t){return ae(e).boosted&&e.tagName==="A"&&t.type==="click"&&(t.ctrlKey||t.metaKey)}function ct(e,t,r){var n=e.eventFilter;if(n){try{return n.call(t,r)!==true}catch(e){fe(re().body,"htmx:eventFilter:error",{error:e,source:n.source});return true}}return false}function ht(a,o,e,s,l){var u=ae(a);var t;if(s.from){t=Z(a,s.from)}else{t=[a]}if(s.changed){t.forEach(function(e){var t=ae(e);t.lastValue=e.value})}oe(t,function(n){var i=function(e){if(!se(a)){n.removeEventListener(s.trigger,i);return}if(ft(a,e)){return}if(l||ut(e,a)){e.preventDefault()}if(ct(s,a,e)){return}var t=ae(e);t.triggerSpec=s;if(t.handledFor==null){t.handledFor=[]}if(t.handledFor.indexOf(a)<0){t.handledFor.push(a);if(s.consume){e.stopPropagation()}if(s.target&&e.target){if(!h(e.target,s.target)){return}}if(s.once){if(u.triggeredOnce){return}else{u.triggeredOnce=true}}if(s.changed){var r=ae(n);if(r.lastValue===n.value){return}r.lastValue=n.value}if(u.delayed){clearTimeout(u.delayed)}if(u.throttle){return}if(s.throttle>0){if(!u.throttle){o(a,e);u.throttle=setTimeout(function(){u.throttle=null},s.throttle)}}else if(s.delay>0){u.delayed=setTimeout(function(){o(a,e)},s.delay)}else{ce(a,"htmx:trigger");o(a,e)}}};if(e.listenerInfos==null){e.listenerInfos=[]}e.listenerInfos.push({trigger:s.trigger,listener:i,on:n});n.addEventListener(s.trigger,i)})}var vt=false;var dt=null;function gt(){if(!dt){dt=function(){vt=true};window.addEventListener("scroll",dt);setInterval(function(){if(vt){vt=false;oe(re().querySelectorAll("[hx-trigger='revealed'],[data-hx-trigger='revealed']"),function(e){pt(e)})}},200)}}function pt(t){if(!o(t,"data-hx-revealed")&&X(t)){t.setAttribute("data-hx-revealed","true");var e=ae(t);if(e.initHash){ce(t,"revealed")}else{t.addEventListener("htmx:afterProcessNode",function(e){ce(t,"revealed")},{once:true})}}}function mt(e,t,r){var n=D(r);for(var i=0;i=0){var t=wt(n);setTimeout(function(){xt(s,r,n+1)},t)}};t.onopen=function(e){n=0};ae(s).webSocket=t;t.addEventListener("message",function(e){if(yt(s)){return}var t=e.data;R(s,function(e){t=e.transformResponse(t,null,s)});var r=T(s);var n=l(t);var i=M(n.children);for(var a=0;a0){ce(u,"htmx:validation:halted",i);return}t.send(JSON.stringify(l));if(ut(e,u)){e.preventDefault()}})}else{fe(u,"htmx:noWebSocketSourceError")}}function wt(e){var t=Q.config.wsReconnectDelay;if(typeof t==="function"){return t(e)}if(t==="full-jitter"){var r=Math.min(e,6);var n=1e3*Math.pow(2,r);return n*Math.random()}b('htmx.config.wsReconnectDelay must either be a function or the string "full-jitter"')}function St(e,t,r){var n=D(r);for(var i=0;i0){setTimeout(i,n)}else{i()}}function Ht(t,i,e){var a=false;oe(w,function(r){if(o(t,"hx-"+r)){var n=te(t,"hx-"+r);a=true;i.path=n;i.verb=r;e.forEach(function(e){Lt(t,e,i,function(e,t){if(v(e,Q.config.disableSelector)){m(e);return}he(r,n,e,t)})})}});return a}function Lt(n,e,t,r){if(e.sseEvent){Rt(n,r,e.sseEvent)}else if(e.trigger==="revealed"){gt();ht(n,r,t,e);pt(n)}else if(e.trigger==="intersect"){var i={};if(e.root){i.root=ue(n,e.root)}if(e.threshold){i.threshold=parseFloat(e.threshold)}var a=new IntersectionObserver(function(e){for(var t=0;t0){t.polling=true;ot(n,r,e)}else{ht(n,r,t,e)}}function At(e){if(!e.htmxExecuted&&Q.config.allowScriptTags&&(e.type==="text/javascript"||e.type==="module"||e.type==="")){var t=re().createElement("script");oe(e.attributes,function(e){t.setAttribute(e.name,e.value)});t.textContent=e.textContent;t.async=false;if(Q.config.inlineScriptNonce){t.nonce=Q.config.inlineScriptNonce}var r=e.parentElement;try{r.insertBefore(t,e)}catch(e){b(e)}finally{if(e.parentElement){e.parentElement.removeChild(e)}}}}function Nt(e){if(h(e,"script")){At(e)}oe(f(e,"script"),function(e){At(e)})}function It(e){var t=e.attributes;if(!t){return false}for(var r=0;r0){var o=n.shift();var s=o.match(/^\s*([a-zA-Z:\-\.]+:)(.*)/);if(a===0&&s){o.split(":");i=s[1].slice(0,-1);r[i]=s[2]}else{r[i]+=o}a+=Bt(o)}for(var l in r){Ft(e,l,r[l])}}}function jt(e){Ae(e);for(var t=0;tQ.config.historyCacheSize){i.shift()}while(i.length>0){try{localStorage.setItem("htmx-history-cache",JSON.stringify(i));break}catch(e){fe(re().body,"htmx:historyCacheError",{cause:e,cache:i});i.shift()}}}function Yt(e){if(!U()){return null}e=B(e);var t=E(localStorage.getItem("htmx-history-cache"))||[];for(var r=0;r=200&&this.status<400){ce(re().body,"htmx:historyCacheMissLoad",o);var e=l(this.response);e=e.querySelector("[hx-history-elt],[data-hx-history-elt]")||e;var t=Zt();var r=T(t);var n=Ve(this.response);if(n){var i=C("title");if(i){i.innerHTML=n}else{window.document.title=n}}Ue(t,e,r);nr(r.tasks);Jt=a;ce(re().body,"htmx:historyRestore",{path:a,cacheMiss:true,serverResponse:this.response})}else{fe(re().body,"htmx:historyCacheMissLoadError",o)}};e.send()}function ar(e){er();e=e||location.pathname+location.search;var t=Yt(e);if(t){var r=l(t.content);var n=Zt();var i=T(n);Ue(n,r,i);nr(i.tasks);document.title=t.title;setTimeout(function(){window.scrollTo(0,t.scroll)},0);Jt=e;ce(re().body,"htmx:historyRestore",{path:e,item:t})}else{if(Q.config.refreshOnHistoryMiss){window.location.reload(true)}else{ir(e)}}}function or(e){var t=me(e,"hx-indicator");if(t==null){t=[e]}oe(t,function(e){var t=ae(e);t.requestCount=(t.requestCount||0)+1;e.classList["add"].call(e.classList,Q.config.requestClass)});return t}function sr(e){var t=me(e,"hx-disabled-elt");if(t==null){t=[]}oe(t,function(e){var t=ae(e);t.requestCount=(t.requestCount||0)+1;e.setAttribute("disabled","")});return t}function lr(e,t){oe(e,function(e){var t=ae(e);t.requestCount=(t.requestCount||0)-1;if(t.requestCount===0){e.classList["remove"].call(e.classList,Q.config.requestClass)}});oe(t,function(e){var t=ae(e);t.requestCount=(t.requestCount||0)-1;if(t.requestCount===0){e.removeAttribute("disabled")}})}function ur(e,t){for(var r=0;r=0}function wr(e,t){var r=t?t:ne(e,"hx-swap");var n={swapStyle:ae(e).boosted?"innerHTML":Q.config.defaultSwapStyle,swapDelay:Q.config.defaultSwapDelay,settleDelay:Q.config.defaultSettleDelay};if(Q.config.scrollIntoViewOnBoost&&ae(e).boosted&&!br(e)){n["show"]="top"}if(r){var i=D(r);if(i.length>0){for(var a=0;a0?l.join(":"):null;n["scroll"]=u;n["scrollTarget"]=f}else if(o.indexOf("show:")===0){var c=o.substr(5);var l=c.split(":");var h=l.pop();var f=l.length>0?l.join(":"):null;n["show"]=h;n["showTarget"]=f}else if(o.indexOf("focus-scroll:")===0){var v=o.substr("focus-scroll:".length);n["focusScroll"]=v=="true"}else if(a==0){n["swapStyle"]=o}else{b("Unknown modifier in hx-swap: "+o)}}}}return n}function Sr(e){return ne(e,"hx-encoding")==="multipart/form-data"||h(e,"form")&&ee(e,"enctype")==="multipart/form-data"}function Er(t,r,n){var i=null;R(r,function(e){if(i==null){i=e.encodeParameters(t,n,r)}});if(i!=null){return i}else{if(Sr(r)){return mr(n)}else{return pr(n)}}}function T(e){return{tasks:[],elts:[e]}}function Cr(e,t){var r=e[0];var n=e[e.length-1];if(t.scroll){var i=null;if(t.scrollTarget){i=ue(r,t.scrollTarget)}if(t.scroll==="top"&&(r||i)){i=i||r;i.scrollTop=0}if(t.scroll==="bottom"&&(n||i)){i=i||n;i.scrollTop=i.scrollHeight}}if(t.show){var i=null;if(t.showTarget){var a=t.showTarget;if(t.showTarget==="window"){a="body"}i=ue(r,a)}if(t.show==="top"&&(r||i)){i=i||r;i.scrollIntoView({block:"start",behavior:Q.config.scrollBehavior})}if(t.show==="bottom"&&(n||i)){i=i||n;i.scrollIntoView({block:"end",behavior:Q.config.scrollBehavior})}}}function Rr(e,t,r,n){if(n==null){n={}}if(e==null){return n}var i=te(e,t);if(i){var a=i.trim();var o=r;if(a==="unset"){return null}if(a.indexOf("javascript:")===0){a=a.substr(11);o=true}else if(a.indexOf("js:")===0){a=a.substr(3);o=true}if(a.indexOf("{")!==0){a="{"+a+"}"}var s;if(o){s=Tr(e,function(){return Function("return ("+a+")")()},{})}else{s=E(a)}for(var l in s){if(s.hasOwnProperty(l)){if(n[l]==null){n[l]=s[l]}}}}return Rr(u(e),t,r,n)}function Tr(e,t,r){if(Q.config.allowEval){return t()}else{fe(e,"htmx:evalDisallowedError");return r}}function Or(e,t){return Rr(e,"hx-vars",true,t)}function qr(e,t){return Rr(e,"hx-vals",false,t)}function Hr(e){return le(Or(e),qr(e))}function Lr(t,r,n){if(n!==null){try{t.setRequestHeader(r,n)}catch(e){t.setRequestHeader(r,encodeURIComponent(n));t.setRequestHeader(r+"-URI-AutoEncoded","true")}}}function Ar(t){if(t.responseURL&&typeof URL!=="undefined"){try{var e=new URL(t.responseURL);return e.pathname+e.search}catch(e){fe(re().body,"htmx:badResponseUrl",{url:t.responseURL})}}}function O(e,t){return t.test(e.getAllResponseHeaders())}function Nr(e,t,r){e=e.toLowerCase();if(r){if(r instanceof Element||I(r,"String")){return he(e,t,null,null,{targetOverride:p(r),returnPromise:true})}else{return he(e,t,p(r.source),r.event,{handler:r.handler,headers:r.headers,values:r.values,targetOverride:p(r.target),swapOverride:r.swap,select:r.select,returnPromise:true})}}else{return he(e,t,null,null,{returnPromise:true})}}function Ir(e){var t=[];while(e){t.push(e);e=e.parentElement}return t}function kr(e,t,r){var n;var i;if(typeof URL==="function"){i=new URL(t,document.location.href);var a=document.location.origin;n=a===i.origin}else{i=t;n=g(t,document.location.origin)}if(Q.config.selfRequestsOnly){if(!n){return false}}return ce(e,"htmx:validateUrl",le({url:i,sameHost:n},r))}function he(t,r,n,i,a,e){var o=null;var s=null;a=a!=null?a:{};if(a.returnPromise&&typeof Promise!=="undefined"){var l=new Promise(function(e,t){o=e;s=t})}if(n==null){n=re().body}var M=a.handler||Mr;var X=a.select||null;if(!se(n)){ie(o);return l}var u=a.targetOverride||ye(n);if(u==null||u==pe){fe(n,"htmx:targetError",{target:te(n,"hx-target")});ie(s);return l}var f=ae(n);var c=f.lastButtonClicked;if(c){var h=ee(c,"formaction");if(h!=null){r=h}var v=ee(c,"formmethod");if(v!=null){if(v.toLowerCase()!=="dialog"){t=v}}}var d=ne(n,"hx-confirm");if(e===undefined){var D=function(e){return he(t,r,n,i,a,!!e)};var U={target:u,elt:n,path:r,verb:t,triggeringEvent:i,etc:a,issueRequest:D,question:d};if(ce(n,"htmx:confirm",U)===false){ie(o);return l}}var g=n;var p=ne(n,"hx-sync");var m=null;var x=false;if(p){var B=p.split(":");var F=B[0].trim();if(F==="this"){g=xe(n,"hx-sync")}else{g=ue(n,F)}p=(B[1]||"drop").trim();f=ae(g);if(p==="drop"&&f.xhr&&f.abortable!==true){ie(o);return l}else if(p==="abort"){if(f.xhr){ie(o);return l}else{x=true}}else if(p==="replace"){ce(g,"htmx:abort")}else if(p.indexOf("queue")===0){var V=p.split(" ");m=(V[1]||"last").trim()}}if(f.xhr){if(f.abortable){ce(g,"htmx:abort")}else{if(m==null){if(i){var y=ae(i);if(y&&y.triggerSpec&&y.triggerSpec.queue){m=y.triggerSpec.queue}}if(m==null){m="last"}}if(f.queuedRequests==null){f.queuedRequests=[]}if(m==="first"&&f.queuedRequests.length===0){f.queuedRequests.push(function(){he(t,r,n,i,a)})}else if(m==="all"){f.queuedRequests.push(function(){he(t,r,n,i,a)})}else if(m==="last"){f.queuedRequests=[];f.queuedRequests.push(function(){he(t,r,n,i,a)})}ie(o);return l}}var b=new XMLHttpRequest;f.xhr=b;f.abortable=x;var w=function(){f.xhr=null;f.abortable=false;if(f.queuedRequests!=null&&f.queuedRequests.length>0){var e=f.queuedRequests.shift();e()}};var j=ne(n,"hx-prompt");if(j){var S=prompt(j);if(S===null||!ce(n,"htmx:prompt",{prompt:S,target:u})){ie(o);w();return l}}if(d&&!e){if(!confirm(d)){ie(o);w();return l}}var E=xr(n,u,S);if(t!=="get"&&!Sr(n)){E["Content-Type"]="application/x-www-form-urlencoded"}if(a.headers){E=le(E,a.headers)}var _=dr(n,t);var C=_.errors;var R=_.values;if(a.values){R=le(R,a.values)}var z=Hr(n);var $=le(R,z);var T=yr($,n);if(Q.config.getCacheBusterParam&&t==="get"){T["org.htmx.cache-buster"]=ee(u,"id")||"true"}if(r==null||r===""){r=re().location.href}var O=Rr(n,"hx-request");var W=ae(n).boosted;var q=Q.config.methodsThatUseUrlParams.indexOf(t)>=0;var H={boosted:W,useUrlParams:q,parameters:T,unfilteredParameters:$,headers:E,target:u,verb:t,errors:C,withCredentials:a.credentials||O.credentials||Q.config.withCredentials,timeout:a.timeout||O.timeout||Q.config.timeout,path:r,triggeringEvent:i};if(!ce(n,"htmx:configRequest",H)){ie(o);w();return l}r=H.path;t=H.verb;E=H.headers;T=H.parameters;C=H.errors;q=H.useUrlParams;if(C&&C.length>0){ce(n,"htmx:validation:halted",H);ie(o);w();return l}var G=r.split("#");var J=G[0];var L=G[1];var A=r;if(q){A=J;var Z=Object.keys(T).length!==0;if(Z){if(A.indexOf("?")<0){A+="?"}else{A+="&"}A+=pr(T);if(L){A+="#"+L}}}if(!kr(n,A,H)){fe(n,"htmx:invalidPath",H);ie(s);return l}b.open(t.toUpperCase(),A,true);b.overrideMimeType("text/html");b.withCredentials=H.withCredentials;b.timeout=H.timeout;if(O.noHeaders){}else{for(var N in E){if(E.hasOwnProperty(N)){var K=E[N];Lr(b,N,K)}}}var I={xhr:b,target:u,requestConfig:H,etc:a,boosted:W,select:X,pathInfo:{requestPath:r,finalRequestPath:A,anchor:L}};b.onload=function(){try{var e=Ir(n);I.pathInfo.responsePath=Ar(b);M(n,I);lr(k,P);ce(n,"htmx:afterRequest",I);ce(n,"htmx:afterOnLoad",I);if(!se(n)){var t=null;while(e.length>0&&t==null){var r=e.shift();if(se(r)){t=r}}if(t){ce(t,"htmx:afterRequest",I);ce(t,"htmx:afterOnLoad",I)}}ie(o);w()}catch(e){fe(n,"htmx:onLoadError",le({error:e},I));throw e}};b.onerror=function(){lr(k,P);fe(n,"htmx:afterRequest",I);fe(n,"htmx:sendError",I);ie(s);w()};b.onabort=function(){lr(k,P);fe(n,"htmx:afterRequest",I);fe(n,"htmx:sendAbort",I);ie(s);w()};b.ontimeout=function(){lr(k,P);fe(n,"htmx:afterRequest",I);fe(n,"htmx:timeout",I);ie(s);w()};if(!ce(n,"htmx:beforeRequest",I)){ie(o);w();return l}var k=or(n);var P=sr(n);oe(["loadstart","loadend","progress","abort"],function(t){oe([b,b.upload],function(e){e.addEventListener(t,function(e){ce(n,"htmx:xhr:"+t,{lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total})})})});ce(n,"htmx:beforeSend",I);var Y=q?null:Er(b,n,T);b.send(Y);return l}function Pr(e,t){var r=t.xhr;var n=null;var i=null;if(O(r,/HX-Push:/i)){n=r.getResponseHeader("HX-Push");i="push"}else if(O(r,/HX-Push-Url:/i)){n=r.getResponseHeader("HX-Push-Url");i="push"}else if(O(r,/HX-Replace-Url:/i)){n=r.getResponseHeader("HX-Replace-Url");i="replace"}if(n){if(n==="false"){return{}}else{return{type:i,path:n}}}var a=t.pathInfo.finalRequestPath;var o=t.pathInfo.responsePath;var s=ne(e,"hx-push-url");var l=ne(e,"hx-replace-url");var u=ae(e).boosted;var f=null;var c=null;if(s){f="push";c=s}else if(l){f="replace";c=l}else if(u){f="push";c=o||a}if(c){if(c==="false"){return{}}if(c==="true"){c=o||a}if(t.pathInfo.anchor&&c.indexOf("#")===-1){c=c+"#"+t.pathInfo.anchor}return{type:f,path:c}}else{return{}}}function Mr(l,u){var f=u.xhr;var c=u.target;var e=u.etc;var t=u.requestConfig;var h=u.select;if(!ce(l,"htmx:beforeOnLoad",u))return;if(O(f,/HX-Trigger:/i)){_e(f,"HX-Trigger",l)}if(O(f,/HX-Location:/i)){er();var r=f.getResponseHeader("HX-Location");var v;if(r.indexOf("{")===0){v=E(r);r=v["path"];delete v["path"]}Nr("GET",r,v).then(function(){tr(r)});return}var n=O(f,/HX-Refresh:/i)&&"true"===f.getResponseHeader("HX-Refresh");if(O(f,/HX-Redirect:/i)){location.href=f.getResponseHeader("HX-Redirect");n&&location.reload();return}if(n){location.reload();return}if(O(f,/HX-Retarget:/i)){if(f.getResponseHeader("HX-Retarget")==="this"){u.target=l}else{u.target=ue(l,f.getResponseHeader("HX-Retarget"))}}var d=Pr(l,u);var i=f.status>=200&&f.status<400&&f.status!==204;var g=f.response;var a=f.status>=400;var p=Q.config.ignoreTitle;var o=le({shouldSwap:i,serverResponse:g,isError:a,ignoreTitle:p},u);if(!ce(c,"htmx:beforeSwap",o))return;c=o.target;g=o.serverResponse;a=o.isError;p=o.ignoreTitle;u.target=c;u.failed=a;u.successful=!a;if(o.shouldSwap){if(f.status===286){at(l)}R(l,function(e){g=e.transformResponse(g,f,l)});if(d.type){er()}var s=e.swapOverride;if(O(f,/HX-Reswap:/i)){s=f.getResponseHeader("HX-Reswap")}var v=wr(l,s);if(v.hasOwnProperty("ignoreTitle")){p=v.ignoreTitle}c.classList.add(Q.config.swappingClass);var m=null;var x=null;var y=function(){try{var e=document.activeElement;var t={};try{t={elt:e,start:e?e.selectionStart:null,end:e?e.selectionEnd:null}}catch(e){}var r;if(h){r=h}if(O(f,/HX-Reselect:/i)){r=f.getResponseHeader("HX-Reselect")}if(d.type){ce(re().body,"htmx:beforeHistoryUpdate",le({history:d},u));if(d.type==="push"){tr(d.path);ce(re().body,"htmx:pushedIntoHistory",{path:d.path})}else{rr(d.path);ce(re().body,"htmx:replacedInHistory",{path:d.path})}}var n=T(c);je(v.swapStyle,c,l,g,n,r);if(t.elt&&!se(t.elt)&&ee(t.elt,"id")){var i=document.getElementById(ee(t.elt,"id"));var a={preventScroll:v.focusScroll!==undefined?!v.focusScroll:!Q.config.defaultFocusScroll};if(i){if(t.start&&i.setSelectionRange){try{i.setSelectionRange(t.start,t.end)}catch(e){}}i.focus(a)}}c.classList.remove(Q.config.swappingClass);oe(n.elts,function(e){if(e.classList){e.classList.add(Q.config.settlingClass)}ce(e,"htmx:afterSwap",u)});if(O(f,/HX-Trigger-After-Swap:/i)){var o=l;if(!se(l)){o=re().body}_e(f,"HX-Trigger-After-Swap",o)}var s=function(){oe(n.tasks,function(e){e.call()});oe(n.elts,function(e){if(e.classList){e.classList.remove(Q.config.settlingClass)}ce(e,"htmx:afterSettle",u)});if(u.pathInfo.anchor){var e=re().getElementById(u.pathInfo.anchor);if(e){e.scrollIntoView({block:"start",behavior:"auto"})}}if(n.title&&!p){var t=C("title");if(t){t.innerHTML=n.title}else{window.document.title=n.title}}Cr(n.elts,v);if(O(f,/HX-Trigger-After-Settle:/i)){var r=l;if(!se(l)){r=re().body}_e(f,"HX-Trigger-After-Settle",r)}ie(m)};if(v.settleDelay>0){setTimeout(s,v.settleDelay)}else{s()}}catch(e){fe(l,"htmx:swapError",u);ie(x);throw e}};var b=Q.config.globalViewTransitions;if(v.hasOwnProperty("transition")){b=v.transition}if(b&&ce(l,"htmx:beforeTransition",u)&&typeof Promise!=="undefined"&&document.startViewTransition){var w=new Promise(function(e,t){m=e;x=t});var S=y;y=function(){document.startViewTransition(function(){S();return w})}}if(v.swapDelay>0){setTimeout(y,v.swapDelay)}else{y()}}if(a){fe(l,"htmx:responseError",le({error:"Response Status Error Code "+f.status+" from "+u.pathInfo.requestPath},u))}}var Xr={};function Dr(){return{init:function(e){return null},onEvent:function(e,t){return true},transformResponse:function(e,t,r){return e},isInlineSwap:function(e){return false},handleSwap:function(e,t,r,n){return false},encodeParameters:function(e,t,r){return null}}}function Ur(e,t){if(t.init){t.init(r)}Xr[e]=le(Dr(),t)}function Br(e){delete Xr[e]}function Fr(e,r,n){if(e==undefined){return r}if(r==undefined){r=[]}if(n==undefined){n=[]}var t=te(e,"hx-ext");if(t){oe(t.split(","),function(e){e=e.replace(/ /g,"");if(e.slice(0,7)=="ignore:"){n.push(e.slice(7));return}if(n.indexOf(e)<0){var t=Xr[e];if(t&&r.indexOf(t)<0){r.push(t)}}})}return Fr(u(e),r,n)}var Vr=false;re().addEventListener("DOMContentLoaded",function(){Vr=true});function jr(e){if(Vr||re().readyState==="complete"){e()}else{re().addEventListener("DOMContentLoaded",e)}}function _r(){if(Q.config.includeIndicatorStyles!==false){re().head.insertAdjacentHTML("beforeend","")}}function zr(){var e=re().querySelector('meta[name="htmx-config"]');if(e){return E(e.content)}else{return null}}function $r(){var e=zr();if(e){Q.config=le(Q.config,e)}}jr(function(){$r();_r();var e=re().body;zt(e);var t=re().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");e.addEventListener("htmx:abort",function(e){var t=e.target;var r=ae(t);if(r&&r.xhr){r.xhr.abort()}});const r=window.onpopstate?window.onpopstate.bind(window):null;window.onpopstate=function(e){if(e.state&&e.state.htmx){ar();oe(t,function(e){ce(e,"htmx:restored",{document:re(),triggerEvent:ce})})}else{if(r){r(e)}}};setTimeout(function(){ce(e,"htmx:load",{});e=null},0)});return Q}()});
\ No newline at end of file
diff --git a/static/infinite-scroll.pkgd.min.js b/static/infinite-scroll.pkgd.min.js
deleted file mode 100644
index b630ce0..0000000
--- a/static/infinite-scroll.pkgd.min.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/*!
- * Infinite Scroll PACKAGED v5.0.0
- * Automatically add next page
- * MIT License
- * https://infinite-scroll.com
- * Copyright 2018-2025 Metafizzy
- */
-!function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,(function(t,e){let i=t.console,n=void 0===i?function(){}:function(t){i.error(t)};return function(i,o,s){(s=s||e||t.jQuery)&&(o.prototype.option||(o.prototype.option=function(t){t&&(this.options=Object.assign(this.options||{},t))}),s.fn[i]=function(t,...e){return"string"==typeof t?function(t,e,o){let r,l=`$().${i}("${e}")`;return t.each((function(t,h){let a=s.data(h,i);if(!a)return void n(`${i} not initialized. Cannot call method ${l}`);let c=a[e];if(!c||"_"==e.charAt(0))return void n(`${l} is not a valid method`);let u=c.apply(a,o);r=void 0===r?u:r})),void 0!==r?r:t}(this,t,e):(r=t,this.each((function(t,e){let n=s.data(e,i);n?(n.option(r),n._init()):(n=new o(e,r),s.data(e,i,n))})),this);var r})}})),function(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},n=i[t]=i[t]||[];return n.includes(e)||n.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let n=i.indexOf(e);return-1!=n&&i.splice(n,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let n=this._onceEvents&&this._onceEvents[t];for(let o of i){n&&n[o]&&(this.off(t,o),delete n[o]),o.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})),function(t,e){"object"==typeof module&&module.exports?module.exports=e(t):t.fizzyUIUtils=e(t)}(this,(function(t){let e={extend:function(t,e){return Object.assign(t,e)},modulo:function(t,e){return(t%e+e)%e},makeArray:function(t){if(Array.isArray(t))return t;if(null==t)return[];return"object"==typeof t&&"number"==typeof t.length?[...t]:[t]},removeFrom:function(t,e){let i=t.indexOf(e);-1!=i&&t.splice(i,1)},getParent:function(t,e){for(;t.parentNode&&t!=document.body;)if((t=t.parentNode).matches(e))return t},getQueryElement:function(t){return"string"==typeof t?document.querySelector(t):t},handleEvent:function(t){let e="on"+t.type;this[e]&&this[e](t)},filterFindElements:function(t,i){return(t=e.makeArray(t)).filter((t=>t instanceof HTMLElement)).reduce(((t,e)=>{if(!i)return t.push(e),t;e.matches(i)&&t.push(e);let n=e.querySelectorAll(i);return t=t.concat(...n)}),[])},debounceMethod:function(t,e,i){i=i||100;let n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){clearTimeout(this[o]);let t=arguments;this[o]=setTimeout((()=>{n.apply(this,t),delete this[o]}),i)}},docReady:function(t){let e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},toDashed:function(t){return t.replace(/(.)([A-Z])/g,(function(t,e,i){return e+"-"+i})).toLowerCase()}},i=t.console;return e.htmlInit=function(n,o){e.docReady((function(){let s="data-"+e.toDashed(o),r=document.querySelectorAll(`[${s}]`),l=t.jQuery;[...r].forEach((t=>{let e,r=t.getAttribute(s);try{e=r&&JSON.parse(r)}catch(e){return void(i&&i.error(`Error parsing ${s} on ${t.className}: ${e}`))}let h=new n(t,e);l&&l.data(t,o,h)}))}))},e})),function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("fizzy-ui-utils")):t.InfiniteScroll=e(t,t.EvEmitter,t.fizzyUIUtils)}(window,(function(t,e,i){let n=t.jQuery,o={};function s(t,e){let r=i.getQueryElement(t);if(r){if((t=r).infiniteScrollGUID){let i=o[t.infiniteScrollGUID];return i.option(e),i}this.element=t,this.options={...s.defaults},this.option(e),n&&(this.$element=n(this.element)),this.create()}else console.error("Bad element for InfiniteScroll: "+(r||t))}s.defaults={},s.create={},s.destroy={};let r=s.prototype;Object.assign(r,e.prototype);let l=0;r.create=function(){let t=this.guid=++l;if(this.element.infiniteScrollGUID=t,o[t]=this,this.pageIndex=1,this.loadCount=0,this.updateGetPath(),this.getPath&&this.getPath()){this.updateGetAbsolutePath(),this.log("initialized",[this.element.className]),this.callOnInit();for(let t in s.create)s.create[t].call(this)}else console.error("Disabling InfiniteScroll")},r.option=function(t){Object.assign(this.options,t)},r.callOnInit=function(){let t=this.options.onInit;t&&t.call(this,this)},r.dispatchEvent=function(t,e,i){this.log(t,i);let o=e?[e].concat(i):i;if(this.emitEvent(t,o),!n||!this.$element)return;let s=t+=".infiniteScroll";if(e){let i=n.Event(e);i.type=t,s=i}this.$element.trigger(s,i)};let h={initialized:t=>`on ${t}`,request:t=>`URL: ${t}`,load:(t,e)=>`${t.title||""}. URL: ${e}`,error:(t,e)=>`${t}. URL: ${e}`,append:(t,e,i)=>`${i.length} items. URL: ${e}`,last:(t,e)=>`URL: ${e}`,history:(t,e)=>`URL: ${e}`,pageIndex:function(t,e){return`current page determined to be: ${t} from ${e}`}};r.log=function(t,e){if(!this.options.debug)return;let i=`[InfiniteScroll] ${t}`,n=h[t];n&&(i+=". "+n.apply(this,e)),console.log(i)},r.updateMeasurements=function(){this.windowHeight=t.innerHeight;let e=this.element.getBoundingClientRect();this.top=e.top+t.scrollY},r.updateScroller=function(){let e=this.options.elementScroll;if(e){if(this.scroller=!0===e?this.element:i.getQueryElement(e),!this.scroller)throw new Error(`Unable to find elementScroll: ${e}`)}else this.scroller=t},r.updateGetPath=function(){let t=this.options.path;if(!t)return void console.error(`InfiniteScroll path option required. Set as: ${t}`);let e=typeof t;"function"!=e?"string"==e&&t.match("{{#}}")?this.updateGetPathTemplate(t):this.updateGetPathSelector(t):this.getPath=t},r.updateGetPathTemplate=function(t){this.getPath=()=>{let e=this.pageIndex+1;return t.replace("{{#}}",e)};let e=t.replace(/(\\\?|\?)/,"\\?").replace("{{#}}","(\\d\\d?\\d?)"),i=new RegExp(e),n=location.href.match(i);n&&(this.pageIndex=parseInt(n[1],10),this.log("pageIndex",[this.pageIndex,"template string"]))};let a=[/^(.*?\/?page\/?)(\d\d?\d?)(.*?$)/,/^(.*?\/?\?page=)(\d\d?\d?)(.*?$)/,/(.*?)(\d\d?\d?)(?!.*\d)(.*?$)/],c=s.getPathParts=function(t){if(t)for(let e of a){let i=t.match(e);if(i){let[,t,e,n]=i;return{begin:t,index:e,end:n}}}};r.updateGetPathSelector=function(t){let e=document.querySelector(t);if(!e)return void console.error(`Bad InfiniteScroll path option. Next link not found: ${t}`);let i=e.getAttribute("href"),n=c(i);if(!n)return void console.error(`InfiniteScroll unable to parse next link href: ${i}`);let{begin:o,index:s,end:r}=n;this.isPathSelector=!0,this.getPath=()=>o+(this.pageIndex+1)+r,this.pageIndex=parseInt(s,10)-1,this.log("pageIndex",[this.pageIndex,"next link"])},r.updateGetAbsolutePath=function(){let t=this.getPath();if(t.match(/^http/)||t.match(/^\//))return void(this.getAbsolutePath=this.getPath);let{pathname:e}=location,i=t.match(/^\?/),n=e.substring(0,e.lastIndexOf("/")),o=i?e:n+"/";this.getAbsolutePath=()=>o+this.getPath()},s.create.hideNav=function(){let t=i.getQueryElement(this.options.hideNav);t&&(t.style.display="none",this.nav=t)},s.destroy.hideNav=function(){this.nav&&(this.nav.style.display="")},r.destroy=function(){this.allOff();for(let t in s.destroy)s.destroy[t].call(this);delete this.element.infiniteScrollGUID,delete o[this.guid],n&&this.$element&&n.removeData(this.element,"infiniteScroll")},s.throttle=function(t,e){let i,n;return e=e||200,function(){let o=+new Date,s=arguments,r=()=>{i=o,t.apply(this,s)};i&&o{if(!i.ok){let t=new Error(i.statusText);return this.onPageError(t,o,i),{response:i}}return i[t]().then((s=>("text"==t&&e&&(s=n.parseFromString(s,"text/html")),204==i.status?(this.lastPageReached(s,o),{body:s,response:i}):this.onPageLoad(s,o,i))))})).catch((t=>{this.onPageError(t,o)}));return this.dispatchEvent("request",null,[o,s]),s},i.onPageLoad=function(t,e,i){return this.options.append||(this.isLoading=!1),this.pageIndex++,this.loadCount++,this.dispatchEvent("load",null,[t,e,i]),this.appendNextPage(t,e,i)},i.appendNextPage=function(t,e,i){let{append:n,responseBody:s,domParseResponse:r}=this.options;if(!("text"==s&&r)||!n)return{body:t,response:i};let l=t.querySelectorAll(n),h={body:t,response:i,items:l};if(!l||!l.length)return this.lastPageReached(t,e),h;let a=o(l),c=()=>(this.appendItems(l,a),this.isLoading=!1,this.dispatchEvent("append",null,[t,e,l,i]),h);return this.options.outlayer?this.appendOutlayerItems(a,c):c()},i.appendItems=function(t,e){t&&t.length&&(function(t){let e=t.querySelectorAll("script");for(let t of e){let e=document.createElement("script"),i=t.attributes;for(let t of i)e.setAttribute(t.name,t.value);e.innerHTML=t.innerHTML,t.parentNode.replaceChild(e,t)}}(e=e||o(t)),this.element.appendChild(e))},i.appendOutlayerItems=function(i,n){let o=e.imagesLoaded||t.imagesLoaded;return o?new Promise((function(t){o(i,(function(){let e=n();t(e)}))})):(console.error("[InfiniteScroll] imagesLoaded required for outlayer option"),void(this.isLoading=!1))},i.onAppendOutlayer=function(t,e,i){this.options.outlayer.appended(i)},i.checkLastPage=function(t,e){let i,{checkLastPage:n,path:o}=this.options;if(n){if("function"==typeof o){if(!this.getPath())return void this.lastPageReached(t,e)}"string"==typeof n?i=n:this.isPathSelector&&(i=o),i&&t.querySelector&&(t.querySelector(i)||this.lastPageReached(t,e))}},i.lastPageReached=function(t,e){this.canLoad=!1,this.dispatchEvent("last",null,[t,e])},i.onPageError=function(t,e,i){return this.isLoading=!1,this.canLoad=!1,this.dispatchEvent("error",null,[t,e,i]),t},e.create.prefill=function(){if(!this.options.prefill)return;let t=this.options.append;t?(this.updateMeasurements(),this.updateScroller(),this.isPrefilling=!0,this.on("append",this.prefill),this.once("error",this.stopPrefill),this.once("last",this.stopPrefill),this.prefill()):console.error(`append option required for prefill. Set as :${t}`)},i.prefill=function(){let t=this.getPrefillDistance();this.isPrefilling=t>=0,this.isPrefilling?(this.log("prefill"),this.loadNextPage()):this.stopPrefill()},i.getPrefillDistance=function(){return this.options.elementScroll?this.scroller.clientHeight-this.scroller.scrollHeight:this.windowHeight-this.element.clientHeight},i.stopPrefill=function(){this.log("stopPrefill"),this.off("append",this.prefill)},e})),function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,(function(t,e,i){let n=e.prototype;return Object.assign(e.defaults,{scrollThreshold:400}),e.create.scrollWatch=function(){this.pageScrollHandler=this.onPageScroll.bind(this),this.resizeHandler=this.onResize.bind(this);let t=this.options.scrollThreshold;(t||0===t)&&this.enableScrollWatch()},e.destroy.scrollWatch=function(){this.disableScrollWatch()},n.enableScrollWatch=function(){this.isScrollWatching||(this.isScrollWatching=!0,this.updateMeasurements(),this.updateScroller(),this.on("last",this.disableScrollWatch),this.bindScrollWatchEvents(!0))},n.disableScrollWatch=function(){this.isScrollWatching&&(this.bindScrollWatchEvents(!1),delete this.isScrollWatching)},n.bindScrollWatchEvents=function(e){let i=e?"addEventListener":"removeEventListener";this.scroller[i]("scroll",this.pageScrollHandler),t[i]("resize",this.resizeHandler)},n.onPageScroll=e.throttle((function(){this.getBottomDistance()<=this.options.scrollThreshold&&this.dispatchEvent("scrollThreshold")})),n.getBottomDistance=function(){let e,i;return this.options.elementScroll?(e=this.scroller.scrollHeight,i=this.scroller.scrollTop+this.scroller.clientHeight):(e=this.top+this.element.clientHeight,i=t.scrollY+this.windowHeight),e-i},n.onResize=function(){this.updateMeasurements()},i.debounceMethod(e,"onResize",150),e})),function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,(function(t,e,i){let n=e.prototype;Object.assign(e.defaults,{history:"replace"});let o=document.createElement("a");return e.create.history=function(){if(!this.options.history)return;o.href=this.getAbsolutePath(),(o.origin||o.protocol+"//"+o.host)==location.origin?this.options.append?this.createHistoryAppend():this.createHistoryPageLoad():console.error(`[InfiniteScroll] cannot set history with different origin: ${o.origin} on ${location.origin} . History behavior disabled.`)},n.createHistoryAppend=function(){this.updateMeasurements(),this.updateScroller(),this.scrollPages=[{top:0,path:location.href,title:document.title}],this.scrollPage=this.scrollPages[0],this.scrollHistoryHandler=this.onScrollHistory.bind(this),this.unloadHandler=this.onUnload.bind(this),this.scroller.addEventListener("scroll",this.scrollHistoryHandler),this.on("append",this.onAppendHistory),this.bindHistoryAppendEvents(!0)},n.bindHistoryAppendEvents=function(e){let i=e?"addEventListener":"removeEventListener";this.scroller[i]("scroll",this.scrollHistoryHandler),t[i]("unload",this.unloadHandler)},n.createHistoryPageLoad=function(){this.on("load",this.onPageLoadHistory)},e.destroy.history=n.destroyHistory=function(){this.options.history&&this.options.append&&this.bindHistoryAppendEvents(!1)},n.onAppendHistory=function(t,e,i){if(!i||!i.length)return;let n=i[0],s=this.getElementScrollY(n);o.href=e,this.scrollPages.push({top:s,path:o.href,title:t.title})},n.getElementScrollY=function(e){if(this.options.elementScroll)return e.offsetTop-this.top;return e.getBoundingClientRect().top+t.scrollY},n.onScrollHistory=function(){let t=this.getClosestScrollPage();t!=this.scrollPage&&(this.scrollPage=t,this.setHistory(t.title,t.path))},i.debounceMethod(e,"onScrollHistory",150),n.getClosestScrollPage=function(){let e,i;e=this.options.elementScroll?this.scroller.scrollTop+this.scroller.clientHeight/2:t.scrollY+this.windowHeight/2;for(let t of this.scrollPages){if(t.top>=e)break;i=t}return i},n.setHistory=function(t,e){let i=this.options.history;i&&history[i+"State"]&&(history[i+"State"](null,t,e),this.options.historyTitle&&(document.title=t),this.dispatchEvent("history",null,[t,e]))},n.onUnload=function(){if(0===this.scrollPage.top)return;let e=t.scrollY-this.scrollPage.top+this.top;this.destroyHistory(),scrollTo(0,e)},n.onPageLoadHistory=function(t,e){this.setHistory(t.title,e)},e})),function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,(function(t,e,i){class n{constructor(t,e){this.element=t,this.infScroll=e,this.clickHandler=this.onClick.bind(this),this.element.addEventListener("click",this.clickHandler),e.on("request",this.disable.bind(this)),e.on("load",this.enable.bind(this)),e.on("error",this.hide.bind(this)),e.on("last",this.hide.bind(this))}onClick(t){t.preventDefault(),this.infScroll.loadNextPage()}enable(){this.element.removeAttribute("disabled")}disable(){this.element.disabled="disabled"}hide(){this.element.style.display="none"}destroy(){this.element.removeEventListener("click",this.clickHandler)}}return e.create.button=function(){let t=i.getQueryElement(this.options.button);t&&(this.button=new n(t,this))},e.destroy.button=function(){this.button&&this.button.destroy()},e.Button=n,e})),function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,(function(t,e,i){let n=e.prototype;function o(t){r(t,"none")}function s(t){r(t,"block")}function r(t,e){t&&(t.style.display=e)}return e.create.status=function(){let t=i.getQueryElement(this.options.status);t&&(this.statusElement=t,this.statusEventElements={request:t.querySelector(".infinite-scroll-request"),error:t.querySelector(".infinite-scroll-error"),last:t.querySelector(".infinite-scroll-last")},this.on("request",this.showRequestStatus),this.on("error",this.showErrorStatus),this.on("last",this.showLastStatus),this.bindHideStatus("on"))},n.bindHideStatus=function(t){let e=this.options.append?"append":"load";this[t](e,this.hideAllStatus)},n.showRequestStatus=function(){this.showStatus("request")},n.showErrorStatus=function(){this.showStatus("error")},n.showLastStatus=function(){this.showStatus("last"),this.bindHideStatus("off")},n.showStatus=function(t){s(this.statusElement),this.hideStatusEventElements(),s(this.statusEventElements[t])},n.hideAllStatus=function(){o(this.statusElement),this.hideStatusEventElements()},n.hideStatusEventElements=function(){for(let t in this.statusEventElements){o(this.statusEventElements[t])}},e})),
-/*!
- * imagesLoaded v4.1.4
- * JavaScript is all like "You images are done yet or what?"
- * MIT License
- */
-function(t,e){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],(function(i){return e(t,i)})):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){"use strict";var i=t.jQuery,n=t.console;function o(t,e){for(var i in e)t[i]=e[i];return t}var s=Array.prototype.slice;function r(t,e,l){if(!(this instanceof r))return new r(t,e,l);var h,a=t;("string"==typeof t&&(a=document.querySelectorAll(t)),a)?(this.elements=(h=a,Array.isArray(h)?h:"object"==typeof h&&"number"==typeof h.length?s.call(h):[h]),this.options=o({},this.options),"function"==typeof e?l=e:o(this.options,e),l&&this.on("always",l),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):n.error("Bad element for imagesLoaded "+(a||t))}r.prototype=Object.create(e.prototype),r.prototype.options={},r.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},r.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&l[e]){for(var i=t.querySelectorAll("img"),n=0;n+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML=" ",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML=" ",le.option=!!xe.lastChild;var ke={thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n",""]);var je=/<|?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0";--pico-icon-checkbox:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");--pico-icon-minus:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");--pico-icon-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");--pico-icon-date:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");--pico-icon-time:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");--pico-icon-search:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");--pico-icon-close:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");--pico-icon-loading:url("data:image/svg+xml,%3Csvg fill='none' height='24' width='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E g %7B animation: rotate 2s linear infinite; transform-origin: center center; %7D circle %7B stroke-dasharray: 75,100; stroke-dashoffset: -5; animation: dash 1.5s ease-in-out infinite; stroke-linecap: round; %7D @keyframes rotate %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D @keyframes dash %7B 0%25 %7B stroke-dasharray: 1,100; stroke-dashoffset: 0; %7D 50%25 %7B stroke-dasharray: 44.5,100; stroke-dashoffset: -17.5; %7D 100%25 %7B stroke-dasharray: 44.5,100; stroke-dashoffset: -62; %7D %7D %3C/style%3E%3Cg%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='rgb(136, 145, 164)' stroke-width='4' /%3E%3C/g%3E%3C/svg%3E")}@media (min-width:576px){:host,:root{--pico-font-size:106.25%}}@media (min-width:768px){:host,:root{--pico-font-size:112.5%}}@media (min-width:1024px){:host,:root{--pico-font-size:118.75%}}@media (min-width:1280px){:host,:root{--pico-font-size:125%}}@media (min-width:1536px){:host,:root{--pico-font-size:131.25%}}a{--pico-text-decoration:underline}small{--pico-font-size:0.875em}h1,h2,h3,h4,h5,h6{--pico-font-weight:700}h1{--pico-font-size:2rem;--pico-line-height:1.125;--pico-typography-spacing-top:3rem}h2{--pico-font-size:1.75rem;--pico-line-height:1.15;--pico-typography-spacing-top:2.625rem}h3{--pico-font-size:1.5rem;--pico-line-height:1.175;--pico-typography-spacing-top:2.25rem}h4{--pico-font-size:1.25rem;--pico-line-height:1.2;--pico-typography-spacing-top:1.874rem}h5{--pico-font-size:1.125rem;--pico-line-height:1.225;--pico-typography-spacing-top:1.6875rem}h6{--pico-font-size:1rem;--pico-line-height:1.25;--pico-typography-spacing-top:1.5rem}tfoot td,tfoot th,thead td,thead th{--pico-font-weight:600;--pico-border-width:0.1875rem}code,kbd,pre,samp{--pico-font-family:var(--pico-font-family-monospace)}kbd{--pico-font-weight:bolder}:where(select,textarea),input:not([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[type=file]){--pico-outline-width:0.0625rem}[type=search]{--pico-border-radius:5rem}[type=checkbox],[type=radio]{--pico-border-width:0.125rem}[type=checkbox][role=switch]{--pico-border-width:0.1875rem}[role=search]{--pico-border-radius:5rem}[role=group] [role=button],[role=group] [type=button],[role=group] [type=submit],[role=group] button,[role=search] [role=button],[role=search] [type=button],[role=search] [type=submit],[role=search] button{--pico-form-element-spacing-horizontal:2rem}details summary[role=button]::after{filter:brightness(0) invert(1)}[aria-busy=true]:not(input,select,textarea):is(button,[type=submit],[type=button],[type=reset],[role=button])::before{filter:brightness(0) invert(1)}:host(:not([data-theme=dark])),:root:not([data-theme=dark]),[data-theme=light]{color-scheme:light;--pico-background-color:#fff;--pico-color:#373c44;--pico-text-selection-color:rgba(2, 154, 232, 0.25);--pico-muted-color:#646b79;--pico-muted-border-color:rgb(231, 234, 239.5);--pico-primary:#0172ad;--pico-primary-background:#0172ad;--pico-primary-border:var(--pico-primary-background);--pico-primary-underline:rgba(1, 114, 173, 0.5);--pico-primary-hover:#015887;--pico-primary-hover-background:#02659a;--pico-primary-hover-border:var(--pico-primary-hover-background);--pico-primary-hover-underline:var(--pico-primary-hover);--pico-primary-focus:rgba(2, 154, 232, 0.5);--pico-primary-inverse:#fff;--pico-secondary:#5d6b89;--pico-secondary-background:#525f7a;--pico-secondary-border:var(--pico-secondary-background);--pico-secondary-underline:rgba(93, 107, 137, 0.5);--pico-secondary-hover:#48536b;--pico-secondary-hover-background:#48536b;--pico-secondary-hover-border:var(--pico-secondary-hover-background);--pico-secondary-hover-underline:var(--pico-secondary-hover);--pico-secondary-focus:rgba(93, 107, 137, 0.25);--pico-secondary-inverse:#fff;--pico-contrast:#181c25;--pico-contrast-background:#181c25;--pico-contrast-border:var(--pico-contrast-background);--pico-contrast-underline:rgba(24, 28, 37, 0.5);--pico-contrast-hover:#000;--pico-contrast-hover-background:#000;--pico-contrast-hover-border:var(--pico-contrast-hover-background);--pico-contrast-hover-underline:var(--pico-secondary-hover);--pico-contrast-focus:rgba(93, 107, 137, 0.25);--pico-contrast-inverse:#fff;--pico-box-shadow:0.0145rem 0.029rem 0.174rem rgba(129, 145, 181, 0.01698),0.0335rem 0.067rem 0.402rem rgba(129, 145, 181, 0.024),0.0625rem 0.125rem 0.75rem rgba(129, 145, 181, 0.03),0.1125rem 0.225rem 1.35rem rgba(129, 145, 181, 0.036),0.2085rem 0.417rem 2.502rem rgba(129, 145, 181, 0.04302),0.5rem 1rem 6rem rgba(129, 145, 181, 0.06),0 0 0 0.0625rem rgba(129, 145, 181, 0.015);--pico-h1-color:#2d3138;--pico-h2-color:#373c44;--pico-h3-color:#424751;--pico-h4-color:#4d535e;--pico-h5-color:#5c6370;--pico-h6-color:#646b79;--pico-mark-background-color:rgb(252.5, 230.5, 191.5);--pico-mark-color:#0f1114;--pico-ins-color:rgb(28.5, 105.5, 84);--pico-del-color:rgb(136, 56.5, 53);--pico-blockquote-border-color:var(--pico-muted-border-color);--pico-blockquote-footer-color:var(--pico-muted-color);--pico-button-box-shadow:0 0 0 rgba(0, 0, 0, 0);--pico-button-hover-box-shadow:0 0 0 rgba(0, 0, 0, 0);--pico-table-border-color:var(--pico-muted-border-color);--pico-table-row-stripped-background-color:rgba(111, 120, 135, 0.0375);--pico-code-background-color:rgb(243, 244.5, 246.75);--pico-code-color:#646b79;--pico-code-kbd-background-color:var(--pico-color);--pico-code-kbd-color:var(--pico-background-color);--pico-form-element-background-color:rgb(251, 251.5, 252.25);--pico-form-element-selected-background-color:#dfe3eb;--pico-form-element-border-color:#cfd5e2;--pico-form-element-color:#23262c;--pico-form-element-placeholder-color:var(--pico-muted-color);--pico-form-element-active-background-color:#fff;--pico-form-element-active-border-color:var(--pico-primary-border);--pico-form-element-focus-color:var(--pico-primary-border);--pico-form-element-disabled-opacity:0.5;--pico-form-element-invalid-border-color:rgb(183.5, 105.5, 106.5);--pico-form-element-invalid-active-border-color:rgb(200.25, 79.25, 72.25);--pico-form-element-invalid-focus-color:var(--pico-form-element-invalid-active-border-color);--pico-form-element-valid-border-color:rgb(76, 154.5, 137.5);--pico-form-element-valid-active-border-color:rgb(39, 152.75, 118.75);--pico-form-element-valid-focus-color:var(--pico-form-element-valid-active-border-color);--pico-switch-background-color:#bfc7d9;--pico-switch-checked-background-color:var(--pico-primary-background);--pico-switch-color:#fff;--pico-switch-thumb-box-shadow:0 0 0 rgba(0, 0, 0, 0);--pico-range-border-color:#dfe3eb;--pico-range-active-border-color:#bfc7d9;--pico-range-thumb-border-color:var(--pico-background-color);--pico-range-thumb-color:var(--pico-secondary-background);--pico-range-thumb-active-color:var(--pico-primary-background);--pico-accordion-border-color:var(--pico-muted-border-color);--pico-accordion-active-summary-color:var(--pico-primary-hover);--pico-accordion-close-summary-color:var(--pico-color);--pico-accordion-open-summary-color:var(--pico-muted-color);--pico-card-background-color:var(--pico-background-color);--pico-card-border-color:var(--pico-muted-border-color);--pico-card-box-shadow:var(--pico-box-shadow);--pico-card-sectioning-background-color:rgb(251, 251.5, 252.25);--pico-loading-spinner-opacity:0.5;--pico-modal-overlay-background-color:rgba(232, 234, 237, 0.75);--pico-progress-background-color:#dfe3eb;--pico-progress-color:var(--pico-primary-background);--pico-tooltip-background-color:var(--pico-contrast-background);--pico-tooltip-color:var(--pico-contrast-inverse);--pico-icon-valid:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(76, 154.5, 137.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");--pico-icon-invalid:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(200.25, 79.25, 72.25)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E")}:host(:not([data-theme=dark])) input:is([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[type=file]),:root:not([data-theme=dark]) input:is([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[type=file]),[data-theme=light] input:is([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[type=file]){--pico-form-element-focus-color:var(--pico-primary-focus)}@media only screen and (prefers-color-scheme:dark){:host(:not([data-theme])),:root:not([data-theme]){color-scheme:dark;--pico-background-color:rgb(19, 22.5, 30.5);--pico-color:#c2c7d0;--pico-text-selection-color:rgba(1, 170, 255, 0.1875);--pico-muted-color:#7b8495;--pico-muted-border-color:#202632;--pico-primary:#01aaff;--pico-primary-background:#0172ad;--pico-primary-border:var(--pico-primary-background);--pico-primary-underline:rgba(1, 170, 255, 0.5);--pico-primary-hover:#79c0ff;--pico-primary-hover-background:#017fc0;--pico-primary-hover-border:var(--pico-primary-hover-background);--pico-primary-hover-underline:var(--pico-primary-hover);--pico-primary-focus:rgba(1, 170, 255, 0.375);--pico-primary-inverse:#fff;--pico-secondary:#969eaf;--pico-secondary-background:#525f7a;--pico-secondary-border:var(--pico-secondary-background);--pico-secondary-underline:rgba(150, 158, 175, 0.5);--pico-secondary-hover:#b3b9c5;--pico-secondary-hover-background:#5d6b89;--pico-secondary-hover-border:var(--pico-secondary-hover-background);--pico-secondary-hover-underline:var(--pico-secondary-hover);--pico-secondary-focus:rgba(144, 158, 190, 0.25);--pico-secondary-inverse:#fff;--pico-contrast:#dfe3eb;--pico-contrast-background:#eff1f4;--pico-contrast-border:var(--pico-contrast-background);--pico-contrast-underline:rgba(223, 227, 235, 0.5);--pico-contrast-hover:#fff;--pico-contrast-hover-background:#fff;--pico-contrast-hover-border:var(--pico-contrast-hover-background);--pico-contrast-hover-underline:var(--pico-contrast-hover);--pico-contrast-focus:rgba(207, 213, 226, 0.25);--pico-contrast-inverse:#000;--pico-box-shadow:0.0145rem 0.029rem 0.174rem rgba(7, 8.5, 12, 0.01698),0.0335rem 0.067rem 0.402rem rgba(7, 8.5, 12, 0.024),0.0625rem 0.125rem 0.75rem rgba(7, 8.5, 12, 0.03),0.1125rem 0.225rem 1.35rem rgba(7, 8.5, 12, 0.036),0.2085rem 0.417rem 2.502rem rgba(7, 8.5, 12, 0.04302),0.5rem 1rem 6rem rgba(7, 8.5, 12, 0.06),0 0 0 0.0625rem rgba(7, 8.5, 12, 0.015);--pico-h1-color:#f0f1f3;--pico-h2-color:#e0e3e7;--pico-h3-color:#c2c7d0;--pico-h4-color:#b3b9c5;--pico-h5-color:#a4acba;--pico-h6-color:#8891a4;--pico-mark-background-color:#014063;--pico-mark-color:#fff;--pico-ins-color:#62af9a;--pico-del-color:rgb(205.5, 126, 123);--pico-blockquote-border-color:var(--pico-muted-border-color);--pico-blockquote-footer-color:var(--pico-muted-color);--pico-button-box-shadow:0 0 0 rgba(0, 0, 0, 0);--pico-button-hover-box-shadow:0 0 0 rgba(0, 0, 0, 0);--pico-table-border-color:var(--pico-muted-border-color);--pico-table-row-stripped-background-color:rgba(111, 120, 135, 0.0375);--pico-code-background-color:rgb(26, 30.5, 40.25);--pico-code-color:#8891a4;--pico-code-kbd-background-color:var(--pico-color);--pico-code-kbd-color:var(--pico-background-color);--pico-form-element-background-color:rgb(28, 33, 43.5);--pico-form-element-selected-background-color:#2a3140;--pico-form-element-border-color:#2a3140;--pico-form-element-color:#e0e3e7;--pico-form-element-placeholder-color:#8891a4;--pico-form-element-active-background-color:rgb(26, 30.5, 40.25);--pico-form-element-active-border-color:var(--pico-primary-border);--pico-form-element-focus-color:var(--pico-primary-border);--pico-form-element-disabled-opacity:0.5;--pico-form-element-invalid-border-color:rgb(149.5, 74, 80);--pico-form-element-invalid-active-border-color:rgb(183.25, 63.5, 59);--pico-form-element-invalid-focus-color:var(--pico-form-element-invalid-active-border-color);--pico-form-element-valid-border-color:#2a7b6f;--pico-form-element-valid-active-border-color:rgb(22, 137, 105.5);--pico-form-element-valid-focus-color:var(--pico-form-element-valid-active-border-color);--pico-switch-background-color:#333c4e;--pico-switch-checked-background-color:var(--pico-primary-background);--pico-switch-color:#fff;--pico-switch-thumb-box-shadow:0 0 0 rgba(0, 0, 0, 0);--pico-range-border-color:#202632;--pico-range-active-border-color:#2a3140;--pico-range-thumb-border-color:var(--pico-background-color);--pico-range-thumb-color:var(--pico-secondary-background);--pico-range-thumb-active-color:var(--pico-primary-background);--pico-accordion-border-color:var(--pico-muted-border-color);--pico-accordion-active-summary-color:var(--pico-primary-hover);--pico-accordion-close-summary-color:var(--pico-color);--pico-accordion-open-summary-color:var(--pico-muted-color);--pico-card-background-color:#181c25;--pico-card-border-color:var(--pico-card-background-color);--pico-card-box-shadow:var(--pico-box-shadow);--pico-card-sectioning-background-color:rgb(26, 30.5, 40.25);--pico-loading-spinner-opacity:0.5;--pico-modal-overlay-background-color:rgba(7.5, 8.5, 10, 0.75);--pico-progress-background-color:#202632;--pico-progress-color:var(--pico-primary-background);--pico-tooltip-background-color:var(--pico-contrast-background);--pico-tooltip-color:var(--pico-contrast-inverse);--pico-icon-valid:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(42, 123, 111)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");--pico-icon-invalid:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(149.5, 74, 80)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E")}:host(:not([data-theme])) input:is([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[type=file]),:root:not([data-theme]) input:is([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[type=file]){--pico-form-element-focus-color:var(--pico-primary-focus)}}[data-theme=dark]{color-scheme:dark;--pico-background-color:rgb(19, 22.5, 30.5);--pico-color:#c2c7d0;--pico-text-selection-color:rgba(1, 170, 255, 0.1875);--pico-muted-color:#7b8495;--pico-muted-border-color:#202632;--pico-primary:#01aaff;--pico-primary-background:#0172ad;--pico-primary-border:var(--pico-primary-background);--pico-primary-underline:rgba(1, 170, 255, 0.5);--pico-primary-hover:#79c0ff;--pico-primary-hover-background:#017fc0;--pico-primary-hover-border:var(--pico-primary-hover-background);--pico-primary-hover-underline:var(--pico-primary-hover);--pico-primary-focus:rgba(1, 170, 255, 0.375);--pico-primary-inverse:#fff;--pico-secondary:#969eaf;--pico-secondary-background:#525f7a;--pico-secondary-border:var(--pico-secondary-background);--pico-secondary-underline:rgba(150, 158, 175, 0.5);--pico-secondary-hover:#b3b9c5;--pico-secondary-hover-background:#5d6b89;--pico-secondary-hover-border:var(--pico-secondary-hover-background);--pico-secondary-hover-underline:var(--pico-secondary-hover);--pico-secondary-focus:rgba(144, 158, 190, 0.25);--pico-secondary-inverse:#fff;--pico-contrast:#dfe3eb;--pico-contrast-background:#eff1f4;--pico-contrast-border:var(--pico-contrast-background);--pico-contrast-underline:rgba(223, 227, 235, 0.5);--pico-contrast-hover:#fff;--pico-contrast-hover-background:#fff;--pico-contrast-hover-border:var(--pico-contrast-hover-background);--pico-contrast-hover-underline:var(--pico-contrast-hover);--pico-contrast-focus:rgba(207, 213, 226, 0.25);--pico-contrast-inverse:#000;--pico-box-shadow:0.0145rem 0.029rem 0.174rem rgba(7, 8.5, 12, 0.01698),0.0335rem 0.067rem 0.402rem rgba(7, 8.5, 12, 0.024),0.0625rem 0.125rem 0.75rem rgba(7, 8.5, 12, 0.03),0.1125rem 0.225rem 1.35rem rgba(7, 8.5, 12, 0.036),0.2085rem 0.417rem 2.502rem rgba(7, 8.5, 12, 0.04302),0.5rem 1rem 6rem rgba(7, 8.5, 12, 0.06),0 0 0 0.0625rem rgba(7, 8.5, 12, 0.015);--pico-h1-color:#f0f1f3;--pico-h2-color:#e0e3e7;--pico-h3-color:#c2c7d0;--pico-h4-color:#b3b9c5;--pico-h5-color:#a4acba;--pico-h6-color:#8891a4;--pico-mark-background-color:#014063;--pico-mark-color:#fff;--pico-ins-color:#62af9a;--pico-del-color:rgb(205.5, 126, 123);--pico-blockquote-border-color:var(--pico-muted-border-color);--pico-blockquote-footer-color:var(--pico-muted-color);--pico-button-box-shadow:0 0 0 rgba(0, 0, 0, 0);--pico-button-hover-box-shadow:0 0 0 rgba(0, 0, 0, 0);--pico-table-border-color:var(--pico-muted-border-color);--pico-table-row-stripped-background-color:rgba(111, 120, 135, 0.0375);--pico-code-background-color:rgb(26, 30.5, 40.25);--pico-code-color:#8891a4;--pico-code-kbd-background-color:var(--pico-color);--pico-code-kbd-color:var(--pico-background-color);--pico-form-element-background-color:rgb(28, 33, 43.5);--pico-form-element-selected-background-color:#2a3140;--pico-form-element-border-color:#2a3140;--pico-form-element-color:#e0e3e7;--pico-form-element-placeholder-color:#8891a4;--pico-form-element-active-background-color:rgb(26, 30.5, 40.25);--pico-form-element-active-border-color:var(--pico-primary-border);--pico-form-element-focus-color:var(--pico-primary-border);--pico-form-element-disabled-opacity:0.5;--pico-form-element-invalid-border-color:rgb(149.5, 74, 80);--pico-form-element-invalid-active-border-color:rgb(183.25, 63.5, 59);--pico-form-element-invalid-focus-color:var(--pico-form-element-invalid-active-border-color);--pico-form-element-valid-border-color:#2a7b6f;--pico-form-element-valid-active-border-color:rgb(22, 137, 105.5);--pico-form-element-valid-focus-color:var(--pico-form-element-valid-active-border-color);--pico-switch-background-color:#333c4e;--pico-switch-checked-background-color:var(--pico-primary-background);--pico-switch-color:#fff;--pico-switch-thumb-box-shadow:0 0 0 rgba(0, 0, 0, 0);--pico-range-border-color:#202632;--pico-range-active-border-color:#2a3140;--pico-range-thumb-border-color:var(--pico-background-color);--pico-range-thumb-color:var(--pico-secondary-background);--pico-range-thumb-active-color:var(--pico-primary-background);--pico-accordion-border-color:var(--pico-muted-border-color);--pico-accordion-active-summary-color:var(--pico-primary-hover);--pico-accordion-close-summary-color:var(--pico-color);--pico-accordion-open-summary-color:var(--pico-muted-color);--pico-card-background-color:#181c25;--pico-card-border-color:var(--pico-card-background-color);--pico-card-box-shadow:var(--pico-box-shadow);--pico-card-sectioning-background-color:rgb(26, 30.5, 40.25);--pico-loading-spinner-opacity:0.5;--pico-modal-overlay-background-color:rgba(7.5, 8.5, 10, 0.75);--pico-progress-background-color:#202632;--pico-progress-color:var(--pico-primary-background);--pico-tooltip-background-color:var(--pico-contrast-background);--pico-tooltip-color:var(--pico-contrast-inverse);--pico-icon-valid:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(42, 123, 111)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");--pico-icon-invalid:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(149.5, 74, 80)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E")}[data-theme=dark] input:is([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[type=file]){--pico-form-element-focus-color:var(--pico-primary-focus)}[type=checkbox],[type=radio],[type=range],progress{accent-color:var(--pico-primary)}*,::after,::before{box-sizing:border-box;background-repeat:no-repeat}::after,::before{text-decoration:inherit;vertical-align:inherit}:where(:host),:where(:root){-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;background-color:var(--pico-background-color);color:var(--pico-color);font-weight:var(--pico-font-weight);font-size:var(--pico-font-size);line-height:var(--pico-line-height);font-family:var(--pico-font-family);text-underline-offset:var(--pico-text-underline-offset);text-rendering:optimizeLegibility;overflow-wrap:break-word;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{width:100%;margin:0}main{display:block}body>footer,body>header,body>main{width:100%;margin-right:auto;margin-left:auto;padding:var(--pico-block-spacing-vertical) var(--pico-block-spacing-horizontal)}@media (min-width:576px){body>footer,body>header,body>main{max-width:510px;padding-right:0;padding-left:0}}@media (min-width:768px){body>footer,body>header,body>main{max-width:700px}}@media (min-width:1024px){body>footer,body>header,body>main{max-width:950px}}@media (min-width:1280px){body>footer,body>header,body>main{max-width:1200px}}@media (min-width:1536px){body>footer,body>header,body>main{max-width:1450px}}section{margin-bottom:var(--pico-block-spacing-vertical)}b,strong{font-weight:bolder}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}address,blockquote,dl,ol,p,pre,table,ul{margin-top:0;margin-bottom:var(--pico-typography-spacing-vertical);color:var(--pico-color);font-style:normal;font-weight:var(--pico-font-weight)}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:var(--pico-typography-spacing-vertical);color:var(--pico-color);font-weight:var(--pico-font-weight);font-size:var(--pico-font-size);line-height:var(--pico-line-height);font-family:var(--pico-font-family)}h1{--pico-color:var(--pico-h1-color)}h2{--pico-color:var(--pico-h2-color)}h3{--pico-color:var(--pico-h3-color)}h4{--pico-color:var(--pico-h4-color)}h5{--pico-color:var(--pico-h5-color)}h6{--pico-color:var(--pico-h6-color)}:where(article,address,blockquote,dl,figure,form,ol,p,pre,table,ul)~:is(h1,h2,h3,h4,h5,h6){margin-top:var(--pico-typography-spacing-top)}p{margin-bottom:var(--pico-typography-spacing-vertical)}hgroup{margin-bottom:var(--pico-typography-spacing-vertical)}hgroup>*{margin-top:0;margin-bottom:0}hgroup>:not(:first-child):last-child{--pico-color:var(--pico-muted-color);--pico-font-weight:unset;font-size:1rem}:where(ol,ul) li{margin-bottom:calc(var(--pico-typography-spacing-vertical) * .25)}:where(dl,ol,ul) :where(dl,ol,ul){margin:0;margin-top:calc(var(--pico-typography-spacing-vertical) * .25)}ul li{list-style:square}mark{padding:.125rem .25rem;background-color:var(--pico-mark-background-color);color:var(--pico-mark-color);vertical-align:baseline}blockquote{display:block;margin:var(--pico-typography-spacing-vertical) 0;padding:var(--pico-spacing);border-right:none;border-left:.25rem solid var(--pico-blockquote-border-color);border-inline-start:0.25rem solid var(--pico-blockquote-border-color);border-inline-end:none}blockquote footer{margin-top:calc(var(--pico-typography-spacing-vertical) * .5);color:var(--pico-blockquote-footer-color)}abbr[title]{border-bottom:1px dotted;text-decoration:none;cursor:help}ins{color:var(--pico-ins-color);text-decoration:none}del{color:var(--pico-del-color)}::-moz-selection{background-color:var(--pico-text-selection-color)}::selection{background-color:var(--pico-text-selection-color)}:where(a:not([role=button])),[role=link]{--pico-color:var(--pico-primary);--pico-background-color:transparent;--pico-underline:var(--pico-primary-underline);outline:0;background-color:var(--pico-background-color);color:var(--pico-color);-webkit-text-decoration:var(--pico-text-decoration);text-decoration:var(--pico-text-decoration);text-decoration-color:var(--pico-underline);text-underline-offset:0.125em;transition:background-color var(--pico-transition),color var(--pico-transition),box-shadow var(--pico-transition),-webkit-text-decoration var(--pico-transition);transition:background-color var(--pico-transition),color var(--pico-transition),text-decoration var(--pico-transition),box-shadow var(--pico-transition);transition:background-color var(--pico-transition),color var(--pico-transition),text-decoration var(--pico-transition),box-shadow var(--pico-transition),-webkit-text-decoration var(--pico-transition)}:where(a:not([role=button])):is([aria-current]:not([aria-current=false]),:hover,:active,:focus),[role=link]:is([aria-current]:not([aria-current=false]),:hover,:active,:focus){--pico-color:var(--pico-primary-hover);--pico-underline:var(--pico-primary-hover-underline);--pico-text-decoration:underline}:where(a:not([role=button])):focus-visible,[role=link]:focus-visible{box-shadow:0 0 0 var(--pico-outline-width) var(--pico-primary-focus)}a[role=button]{display:inline-block}button{margin:0;overflow:visible;font-family:inherit;text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[role=button],[type=button],[type=file]::file-selector-button,[type=reset],[type=submit],button{--pico-background-color:var(--pico-primary-background);--pico-border-color:var(--pico-primary-border);--pico-color:var(--pico-primary-inverse);--pico-box-shadow:var(--pico-button-box-shadow, 0 0 0 rgba(0, 0, 0, 0));padding:var(--pico-form-element-spacing-vertical) var(--pico-form-element-spacing-horizontal);border:var(--pico-border-width) solid var(--pico-border-color);border-radius:var(--pico-border-radius);outline:0;background-color:var(--pico-background-color);box-shadow:var(--pico-box-shadow);color:var(--pico-color);font-weight:var(--pico-font-weight);font-size:1rem;line-height:var(--pico-line-height);text-align:center;text-decoration:none;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:background-color var(--pico-transition),border-color var(--pico-transition),color var(--pico-transition),box-shadow var(--pico-transition)}[role=button]:is(:hover,:active,:focus),[role=button]:is([aria-current]:not([aria-current=false])),[type=button]:is(:hover,:active,:focus),[type=button]:is([aria-current]:not([aria-current=false])),[type=file]::file-selector-button:is(:hover,:active,:focus),[type=file]::file-selector-button:is([aria-current]:not([aria-current=false])),[type=reset]:is(:hover,:active,:focus),[type=reset]:is([aria-current]:not([aria-current=false])),[type=submit]:is(:hover,:active,:focus),[type=submit]:is([aria-current]:not([aria-current=false])),button:is(:hover,:active,:focus),button:is([aria-current]:not([aria-current=false])){--pico-background-color:var(--pico-primary-hover-background);--pico-border-color:var(--pico-primary-hover-border);--pico-box-shadow:var(--pico-button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0));--pico-color:var(--pico-primary-inverse)}[role=button]:focus,[role=button]:is([aria-current]:not([aria-current=false])):focus,[type=button]:focus,[type=button]:is([aria-current]:not([aria-current=false])):focus,[type=file]::file-selector-button:focus,[type=file]::file-selector-button:is([aria-current]:not([aria-current=false])):focus,[type=reset]:focus,[type=reset]:is([aria-current]:not([aria-current=false])):focus,[type=submit]:focus,[type=submit]:is([aria-current]:not([aria-current=false])):focus,button:focus,button:is([aria-current]:not([aria-current=false])):focus{--pico-box-shadow:var(--pico-button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),0 0 0 var(--pico-outline-width) var(--pico-primary-focus)}[type=button],[type=reset],[type=submit]{margin-bottom:var(--pico-spacing)}[type=file]::file-selector-button,[type=reset]{--pico-background-color:var(--pico-secondary-background);--pico-border-color:var(--pico-secondary-border);--pico-color:var(--pico-secondary-inverse);cursor:pointer}[type=file]::file-selector-button:is([aria-current]:not([aria-current=false]),:hover,:active,:focus),[type=reset]:is([aria-current]:not([aria-current=false]),:hover,:active,:focus){--pico-background-color:var(--pico-secondary-hover-background);--pico-border-color:var(--pico-secondary-hover-border);--pico-color:var(--pico-secondary-inverse)}[type=file]::file-selector-button:focus,[type=reset]:focus{--pico-box-shadow:var(--pico-button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),0 0 0 var(--pico-outline-width) var(--pico-secondary-focus)}:where(button,[type=submit],[type=reset],[type=button],[role=button])[disabled],:where(fieldset[disabled]) :is(button,[type=submit],[type=button],[type=reset],[role=button]){opacity:.5;pointer-events:none}:where(table){width:100%;border-collapse:collapse;border-spacing:0;text-indent:0}td,th{padding:calc(var(--pico-spacing)/ 2) var(--pico-spacing);border-bottom:var(--pico-border-width) solid var(--pico-table-border-color);background-color:var(--pico-background-color);color:var(--pico-color);font-weight:var(--pico-font-weight);text-align:left;text-align:start}tfoot td,tfoot th{border-top:var(--pico-border-width) solid var(--pico-table-border-color);border-bottom:0}table.striped tbody tr:nth-child(odd) td,table.striped tbody tr:nth-child(odd) th{background-color:var(--pico-table-row-stripped-background-color)}:where(audio,canvas,iframe,img,svg,video){vertical-align:middle}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}:where(iframe){border-style:none}img{max-width:100%;height:auto;border-style:none}:where(svg:not([fill])){fill:currentColor}svg:not(:host),svg:not(:root){overflow:hidden}code,kbd,pre,samp{font-size:.875em;font-family:var(--pico-font-family)}pre code,pre samp{font-size:inherit;font-family:inherit}pre{-ms-overflow-style:scrollbar;overflow:auto}code,kbd,pre,samp{border-radius:var(--pico-border-radius);background:var(--pico-code-background-color);color:var(--pico-code-color);font-weight:var(--pico-font-weight);line-height:initial}code,kbd,samp{display:inline-block;padding:.375rem}pre{display:block;margin-bottom:var(--pico-spacing);overflow-x:auto}pre>code,pre>samp{display:block;padding:var(--pico-spacing);background:0 0;line-height:var(--pico-line-height)}kbd{background-color:var(--pico-code-kbd-background-color);color:var(--pico-code-kbd-color);vertical-align:baseline}figure{display:block;margin:0;padding:0}figure figcaption{padding:calc(var(--pico-spacing) * .5) 0;color:var(--pico-muted-color)}hr{height:0;margin:var(--pico-typography-spacing-vertical) 0;border:0;border-top:1px solid var(--pico-muted-border-color);color:inherit}[hidden],template{display:none!important}canvas{display:inline-block}input,optgroup,select,textarea{margin:0;font-size:1rem;line-height:var(--pico-line-height);font-family:inherit;letter-spacing:inherit}input{overflow:visible}select{text-transform:none}legend{max-width:100%;padding:0;color:inherit;white-space:normal}textarea{overflow:auto}[type=checkbox],[type=radio]{padding:0}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}::-moz-focus-inner{padding:0;border-style:none}:-moz-focusring{outline:0}:-moz-ui-invalid{box-shadow:none}::-ms-expand{display:none}[type=file],[type=range]{padding:0;border-width:0}input:not([type=checkbox],[type=radio],[type=range]){height:calc(1rem * var(--pico-line-height) + var(--pico-form-element-spacing-vertical) * 2 + var(--pico-border-width) * 2)}fieldset{width:100%;margin:0;margin-bottom:var(--pico-spacing);padding:0;border:0}fieldset legend,label{display:block;margin-bottom:calc(var(--pico-spacing) * .375);color:var(--pico-color);font-weight:var(--pico-form-label-font-weight,var(--pico-font-weight))}fieldset legend{margin-bottom:calc(var(--pico-spacing) * .5)}button[type=submit],input:not([type=checkbox],[type=radio]),select,textarea{width:100%}input:not([type=checkbox],[type=radio],[type=range],[type=file]),select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:var(--pico-form-element-spacing-vertical) var(--pico-form-element-spacing-horizontal)}input,select,textarea{--pico-background-color:var(--pico-form-element-background-color);--pico-border-color:var(--pico-form-element-border-color);--pico-color:var(--pico-form-element-color);--pico-box-shadow:none;border:var(--pico-border-width) solid var(--pico-border-color);border-radius:var(--pico-border-radius);outline:0;background-color:var(--pico-background-color);box-shadow:var(--pico-box-shadow);color:var(--pico-color);font-weight:var(--pico-font-weight);transition:background-color var(--pico-transition),border-color var(--pico-transition),color var(--pico-transition),box-shadow var(--pico-transition)}:where(select,textarea):not([readonly]):is(:active,:focus),input:not([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[readonly]):is(:active,:focus){--pico-background-color:var(--pico-form-element-active-background-color)}:where(select,textarea):not([readonly]):is(:active,:focus),input:not([type=submit],[type=button],[type=reset],[role=switch],[readonly]):is(:active,:focus){--pico-border-color:var(--pico-form-element-active-border-color)}:where(select,textarea):not([readonly]):focus,input:not([type=submit],[type=button],[type=reset],[type=range],[type=file],[readonly]):focus{--pico-box-shadow:0 0 0 var(--pico-outline-width) var(--pico-form-element-focus-color)}:where(fieldset[disabled]) :is(input:not([type=submit],[type=button],[type=reset]),select,textarea),input:not([type=submit],[type=button],[type=reset])[disabled],label[aria-disabled=true],select[disabled],textarea[disabled]{opacity:var(--pico-form-element-disabled-opacity);pointer-events:none}label[aria-disabled=true] input[disabled]{opacity:1}:where(input,select,textarea):not([type=checkbox],[type=radio],[type=date],[type=datetime-local],[type=month],[type=time],[type=week],[type=range])[aria-invalid]{padding-right:calc(var(--pico-form-element-spacing-horizontal) + 1.5rem)!important;padding-left:var(--pico-form-element-spacing-horizontal);padding-inline-start:var(--pico-form-element-spacing-horizontal)!important;padding-inline-end:calc(var(--pico-form-element-spacing-horizontal) + 1.5rem)!important;background-position:center right .75rem;background-size:1rem auto;background-repeat:no-repeat}:where(input,select,textarea):not([type=checkbox],[type=radio],[type=date],[type=datetime-local],[type=month],[type=time],[type=week],[type=range])[aria-invalid=false]:not(select){background-image:var(--pico-icon-valid)}:where(input,select,textarea):not([type=checkbox],[type=radio],[type=date],[type=datetime-local],[type=month],[type=time],[type=week],[type=range])[aria-invalid=true]:not(select){background-image:var(--pico-icon-invalid)}:where(input,select,textarea)[aria-invalid=false]{--pico-border-color:var(--pico-form-element-valid-border-color)}:where(input,select,textarea)[aria-invalid=false]:is(:active,:focus){--pico-border-color:var(--pico-form-element-valid-active-border-color)!important}:where(input,select,textarea)[aria-invalid=false]:is(:active,:focus):not([type=checkbox],[type=radio]){--pico-box-shadow:0 0 0 var(--pico-outline-width) var(--pico-form-element-valid-focus-color)!important}:where(input,select,textarea)[aria-invalid=true]{--pico-border-color:var(--pico-form-element-invalid-border-color)}:where(input,select,textarea)[aria-invalid=true]:is(:active,:focus){--pico-border-color:var(--pico-form-element-invalid-active-border-color)!important}:where(input,select,textarea)[aria-invalid=true]:is(:active,:focus):not([type=checkbox],[type=radio]){--pico-box-shadow:0 0 0 var(--pico-outline-width) var(--pico-form-element-invalid-focus-color)!important}[dir=rtl] :where(input,select,textarea):not([type=checkbox],[type=radio]):is([aria-invalid],[aria-invalid=true],[aria-invalid=false]){background-position:center left .75rem}input::-webkit-input-placeholder,input::placeholder,select:invalid,textarea::-webkit-input-placeholder,textarea::placeholder{color:var(--pico-form-element-placeholder-color);opacity:1}input:not([type=checkbox],[type=radio]),select,textarea{margin-bottom:var(--pico-spacing)}select::-ms-expand{border:0;background-color:transparent}select:not([multiple],[size]){padding-right:calc(var(--pico-form-element-spacing-horizontal) + 1.5rem);padding-left:var(--pico-form-element-spacing-horizontal);padding-inline-start:var(--pico-form-element-spacing-horizontal);padding-inline-end:calc(var(--pico-form-element-spacing-horizontal) + 1.5rem);background-image:var(--pico-icon-chevron);background-position:center right .75rem;background-size:1rem auto;background-repeat:no-repeat}select[multiple] option:checked{background:var(--pico-form-element-selected-background-color);color:var(--pico-form-element-color)}[dir=rtl] select:not([multiple],[size]){background-position:center left .75rem}textarea{display:block;resize:vertical}textarea[aria-invalid]{--pico-icon-height:calc(1rem * var(--pico-line-height) + var(--pico-form-element-spacing-vertical) * 2 + var(--pico-border-width) * 2);background-position:top right .75rem!important;background-size:1rem var(--pico-icon-height)!important}:where(input,select,textarea,fieldset)+small{display:block;width:100%;margin-top:calc(var(--pico-spacing) * -.75);margin-bottom:var(--pico-spacing);color:var(--pico-muted-color)}:where(input,select,textarea,fieldset)[aria-invalid=false]+small{color:var(--pico-ins-color)}:where(input,select,textarea,fieldset)[aria-invalid=true]+small{color:var(--pico-del-color)}label>:where(input,select,textarea){margin-top:calc(var(--pico-spacing) * .25)}label:has([type=checkbox],[type=radio]){width:-moz-fit-content;width:fit-content;cursor:pointer}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:1.25em;height:1.25em;margin-top:-.125em;margin-inline-end:.5em;border-width:var(--pico-border-width);vertical-align:middle;cursor:pointer}[type=checkbox]::-ms-check,[type=radio]::-ms-check{display:none}[type=checkbox]:checked,[type=checkbox]:checked:active,[type=checkbox]:checked:focus,[type=radio]:checked,[type=radio]:checked:active,[type=radio]:checked:focus{--pico-background-color:var(--pico-primary-background);--pico-border-color:var(--pico-primary-border);background-image:var(--pico-icon-checkbox);background-position:center;background-size:.75em auto;background-repeat:no-repeat}[type=checkbox]~label,[type=radio]~label{display:inline-block;margin-bottom:0;cursor:pointer}[type=checkbox]~label:not(:last-of-type),[type=radio]~label:not(:last-of-type){margin-inline-end:1em}[type=checkbox]:indeterminate{--pico-background-color:var(--pico-primary-background);--pico-border-color:var(--pico-primary-border);background-image:var(--pico-icon-minus);background-position:center;background-size:.75em auto;background-repeat:no-repeat}[type=radio]{border-radius:50%}[type=radio]:checked,[type=radio]:checked:active,[type=radio]:checked:focus{--pico-background-color:var(--pico-primary-inverse);border-width:.35em;background-image:none}[type=checkbox][role=switch]{--pico-background-color:var(--pico-switch-background-color);--pico-color:var(--pico-switch-color);width:2.25em;height:1.25em;border:var(--pico-border-width) solid var(--pico-border-color);border-radius:1.25em;background-color:var(--pico-background-color);line-height:1.25em}[type=checkbox][role=switch]:not([aria-invalid]){--pico-border-color:var(--pico-switch-background-color)}[type=checkbox][role=switch]:before{display:block;aspect-ratio:1;height:100%;border-radius:50%;background-color:var(--pico-color);box-shadow:var(--pico-switch-thumb-box-shadow);content:"";transition:margin .1s ease-in-out}[type=checkbox][role=switch]:focus{--pico-background-color:var(--pico-switch-background-color);--pico-border-color:var(--pico-switch-background-color)}[type=checkbox][role=switch]:checked{--pico-background-color:var(--pico-switch-checked-background-color);--pico-border-color:var(--pico-switch-checked-background-color);background-image:none}[type=checkbox][role=switch]:checked::before{margin-inline-start:calc(2.25em - 1.25em)}[type=checkbox][role=switch][disabled]{--pico-background-color:var(--pico-border-color)}[type=checkbox][aria-invalid=false]:checked,[type=checkbox][aria-invalid=false]:checked:active,[type=checkbox][aria-invalid=false]:checked:focus,[type=checkbox][role=switch][aria-invalid=false]:checked,[type=checkbox][role=switch][aria-invalid=false]:checked:active,[type=checkbox][role=switch][aria-invalid=false]:checked:focus{--pico-background-color:var(--pico-form-element-valid-border-color)}[type=checkbox]:checked:active[aria-invalid=true],[type=checkbox]:checked:focus[aria-invalid=true],[type=checkbox]:checked[aria-invalid=true],[type=checkbox][role=switch]:checked:active[aria-invalid=true],[type=checkbox][role=switch]:checked:focus[aria-invalid=true],[type=checkbox][role=switch]:checked[aria-invalid=true]{--pico-background-color:var(--pico-form-element-invalid-border-color)}[type=checkbox][aria-invalid=false]:checked,[type=checkbox][aria-invalid=false]:checked:active,[type=checkbox][aria-invalid=false]:checked:focus,[type=checkbox][role=switch][aria-invalid=false]:checked,[type=checkbox][role=switch][aria-invalid=false]:checked:active,[type=checkbox][role=switch][aria-invalid=false]:checked:focus,[type=radio][aria-invalid=false]:checked,[type=radio][aria-invalid=false]:checked:active,[type=radio][aria-invalid=false]:checked:focus{--pico-border-color:var(--pico-form-element-valid-border-color)}[type=checkbox]:checked:active[aria-invalid=true],[type=checkbox]:checked:focus[aria-invalid=true],[type=checkbox]:checked[aria-invalid=true],[type=checkbox][role=switch]:checked:active[aria-invalid=true],[type=checkbox][role=switch]:checked:focus[aria-invalid=true],[type=checkbox][role=switch]:checked[aria-invalid=true],[type=radio]:checked:active[aria-invalid=true],[type=radio]:checked:focus[aria-invalid=true],[type=radio]:checked[aria-invalid=true]{--pico-border-color:var(--pico-form-element-invalid-border-color)}[type=color]::-webkit-color-swatch-wrapper{padding:0}[type=color]::-moz-focus-inner{padding:0}[type=color]::-webkit-color-swatch{border:0;border-radius:calc(var(--pico-border-radius) * .5)}[type=color]::-moz-color-swatch{border:0;border-radius:calc(var(--pico-border-radius) * .5)}input:not([type=checkbox],[type=radio],[type=range],[type=file]):is([type=date],[type=datetime-local],[type=month],[type=time],[type=week]){--pico-icon-position:0.75rem;--pico-icon-width:1rem;padding-right:calc(var(--pico-icon-width) + var(--pico-icon-position));background-image:var(--pico-icon-date);background-position:center right var(--pico-icon-position);background-size:var(--pico-icon-width) auto;background-repeat:no-repeat}input:not([type=checkbox],[type=radio],[type=range],[type=file])[type=time]{background-image:var(--pico-icon-time)}[type=date]::-webkit-calendar-picker-indicator,[type=datetime-local]::-webkit-calendar-picker-indicator,[type=month]::-webkit-calendar-picker-indicator,[type=time]::-webkit-calendar-picker-indicator,[type=week]::-webkit-calendar-picker-indicator{width:var(--pico-icon-width);margin-right:calc(var(--pico-icon-width) * -1);margin-left:var(--pico-icon-position);opacity:0}@-moz-document url-prefix(){[type=date],[type=datetime-local],[type=month],[type=time],[type=week]{padding-right:var(--pico-form-element-spacing-horizontal)!important;background-image:none!important}}[dir=rtl] :is([type=date],[type=datetime-local],[type=month],[type=time],[type=week]){text-align:right}[type=file]{--pico-color:var(--pico-muted-color);margin-left:calc(var(--pico-outline-width) * -1);padding:calc(var(--pico-form-element-spacing-vertical) * .5) 0;padding-left:var(--pico-outline-width);border:0;border-radius:0;background:0 0}[type=file]::file-selector-button{margin-right:calc(var(--pico-spacing)/ 2);padding:calc(var(--pico-form-element-spacing-vertical) * .5) var(--pico-form-element-spacing-horizontal)}[type=file]:is(:hover,:active,:focus)::file-selector-button{--pico-background-color:var(--pico-secondary-hover-background);--pico-border-color:var(--pico-secondary-hover-border)}[type=file]:focus::file-selector-button{--pico-box-shadow:var(--pico-button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),0 0 0 var(--pico-outline-width) var(--pico-secondary-focus)}[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:1.25rem;background:0 0}[type=range]::-webkit-slider-runnable-track{width:100%;height:.375rem;border-radius:var(--pico-border-radius);background-color:var(--pico-range-border-color);-webkit-transition:background-color var(--pico-transition),box-shadow var(--pico-transition);transition:background-color var(--pico-transition),box-shadow var(--pico-transition)}[type=range]::-moz-range-track{width:100%;height:.375rem;border-radius:var(--pico-border-radius);background-color:var(--pico-range-border-color);-moz-transition:background-color var(--pico-transition),box-shadow var(--pico-transition);transition:background-color var(--pico-transition),box-shadow var(--pico-transition)}[type=range]::-ms-track{width:100%;height:.375rem;border-radius:var(--pico-border-radius);background-color:var(--pico-range-border-color);-ms-transition:background-color var(--pico-transition),box-shadow var(--pico-transition);transition:background-color var(--pico-transition),box-shadow var(--pico-transition)}[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:1.25rem;height:1.25rem;margin-top:-.4375rem;border:2px solid var(--pico-range-thumb-border-color);border-radius:50%;background-color:var(--pico-range-thumb-color);cursor:pointer;-webkit-transition:background-color var(--pico-transition),transform var(--pico-transition);transition:background-color var(--pico-transition),transform var(--pico-transition)}[type=range]::-moz-range-thumb{-webkit-appearance:none;width:1.25rem;height:1.25rem;margin-top:-.4375rem;border:2px solid var(--pico-range-thumb-border-color);border-radius:50%;background-color:var(--pico-range-thumb-color);cursor:pointer;-moz-transition:background-color var(--pico-transition),transform var(--pico-transition);transition:background-color var(--pico-transition),transform var(--pico-transition)}[type=range]::-ms-thumb{-webkit-appearance:none;width:1.25rem;height:1.25rem;margin-top:-.4375rem;border:2px solid var(--pico-range-thumb-border-color);border-radius:50%;background-color:var(--pico-range-thumb-color);cursor:pointer;-ms-transition:background-color var(--pico-transition),transform var(--pico-transition);transition:background-color var(--pico-transition),transform var(--pico-transition)}[type=range]:active,[type=range]:focus-within{--pico-range-border-color:var(--pico-range-active-border-color);--pico-range-thumb-color:var(--pico-range-thumb-active-color)}[type=range]:active::-webkit-slider-thumb{transform:scale(1.25)}[type=range]:active::-moz-range-thumb{transform:scale(1.25)}[type=range]:active::-ms-thumb{transform:scale(1.25)}input:not([type=checkbox],[type=radio],[type=range],[type=file])[type=search]{padding-inline-start:calc(var(--pico-form-element-spacing-horizontal) + 1.75rem);background-image:var(--pico-icon-search);background-position:center left calc(var(--pico-form-element-spacing-horizontal) + .125rem);background-size:1rem auto;background-repeat:no-repeat}input:not([type=checkbox],[type=radio],[type=range],[type=file])[type=search][aria-invalid]{padding-inline-start:calc(var(--pico-form-element-spacing-horizontal) + 1.75rem)!important;background-position:center left 1.125rem,center right .75rem}input:not([type=checkbox],[type=radio],[type=range],[type=file])[type=search][aria-invalid=false]{background-image:var(--pico-icon-search),var(--pico-icon-valid)}input:not([type=checkbox],[type=radio],[type=range],[type=file])[type=search][aria-invalid=true]{background-image:var(--pico-icon-search),var(--pico-icon-invalid)}[dir=rtl] :where(input):not([type=checkbox],[type=radio],[type=range],[type=file])[type=search]{background-position:center right 1.125rem}[dir=rtl] :where(input):not([type=checkbox],[type=radio],[type=range],[type=file])[type=search][aria-invalid]{background-position:center right 1.125rem,center left .75rem}details{display:block;margin-bottom:var(--pico-spacing)}details summary{line-height:1rem;list-style-type:none;cursor:pointer;transition:color var(--pico-transition)}details summary:not([role]){color:var(--pico-accordion-close-summary-color)}details summary::-webkit-details-marker{display:none}details summary::marker{display:none}details summary::-moz-list-bullet{list-style-type:none}details summary::after{display:block;width:1rem;height:1rem;margin-inline-start:calc(var(--pico-spacing,1rem) * .5);float:right;transform:rotate(-90deg);background-image:var(--pico-icon-chevron);background-position:right center;background-size:1rem auto;background-repeat:no-repeat;content:"";transition:transform var(--pico-transition)}details summary:focus{outline:0}details summary:focus:not([role]){color:var(--pico-accordion-active-summary-color)}details summary:focus-visible:not([role]){outline:var(--pico-outline-width) solid var(--pico-primary-focus);outline-offset:calc(var(--pico-spacing,1rem) * 0.5);color:var(--pico-primary)}details summary[role=button]{width:100%;text-align:left}details summary[role=button]::after{height:calc(1rem * var(--pico-line-height,1.5))}details[open]>summary{margin-bottom:var(--pico-spacing)}details[open]>summary:not([role]):not(:focus){color:var(--pico-accordion-open-summary-color)}details[open]>summary::after{transform:rotate(0)}[dir=rtl] details summary{text-align:right}[dir=rtl] details summary::after{float:left;background-position:left center}article{margin-bottom:var(--pico-block-spacing-vertical);padding:var(--pico-block-spacing-vertical) var(--pico-block-spacing-horizontal);border-radius:var(--pico-border-radius);background:var(--pico-card-background-color);box-shadow:var(--pico-card-box-shadow)}article>footer,article>header{margin-right:calc(var(--pico-block-spacing-horizontal) * -1);margin-left:calc(var(--pico-block-spacing-horizontal) * -1);padding:calc(var(--pico-block-spacing-vertical) * .66) var(--pico-block-spacing-horizontal);background-color:var(--pico-card-sectioning-background-color)}article>header{margin-top:calc(var(--pico-block-spacing-vertical) * -1);margin-bottom:var(--pico-block-spacing-vertical);border-bottom:var(--pico-border-width) solid var(--pico-card-border-color);border-top-right-radius:var(--pico-border-radius);border-top-left-radius:var(--pico-border-radius)}article>footer{margin-top:var(--pico-block-spacing-vertical);margin-bottom:calc(var(--pico-block-spacing-vertical) * -1);border-top:var(--pico-border-width) solid var(--pico-card-border-color);border-bottom-right-radius:var(--pico-border-radius);border-bottom-left-radius:var(--pico-border-radius)}[role=group],[role=search]{display:inline-flex;position:relative;width:100%;margin-bottom:var(--pico-spacing);border-radius:var(--pico-border-radius);box-shadow:var(--pico-group-box-shadow,0 0 0 transparent);vertical-align:middle;transition:box-shadow var(--pico-transition)}[role=group] input:not([type=checkbox],[type=radio]),[role=group] select,[role=group]>*,[role=search] input:not([type=checkbox],[type=radio]),[role=search] select,[role=search]>*{position:relative;flex:1 1 auto;margin-bottom:0}[role=group] input:not([type=checkbox],[type=radio]):not(:first-child),[role=group] select:not(:first-child),[role=group]>:not(:first-child),[role=search] input:not([type=checkbox],[type=radio]):not(:first-child),[role=search] select:not(:first-child),[role=search]>:not(:first-child){margin-left:0;border-top-left-radius:0;border-bottom-left-radius:0}[role=group] input:not([type=checkbox],[type=radio]):not(:last-child),[role=group] select:not(:last-child),[role=group]>:not(:last-child),[role=search] input:not([type=checkbox],[type=radio]):not(:last-child),[role=search] select:not(:last-child),[role=search]>:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}[role=group] input:not([type=checkbox],[type=radio]):focus,[role=group] select:focus,[role=group]>:focus,[role=search] input:not([type=checkbox],[type=radio]):focus,[role=search] select:focus,[role=search]>:focus{z-index:2}[role=group] [role=button]:not(:first-child),[role=group] [type=button]:not(:first-child),[role=group] [type=reset]:not(:first-child),[role=group] [type=submit]:not(:first-child),[role=group] button:not(:first-child),[role=group] input:not([type=checkbox],[type=radio]):not(:first-child),[role=group] select:not(:first-child),[role=search] [role=button]:not(:first-child),[role=search] [type=button]:not(:first-child),[role=search] [type=reset]:not(:first-child),[role=search] [type=submit]:not(:first-child),[role=search] button:not(:first-child),[role=search] input:not([type=checkbox],[type=radio]):not(:first-child),[role=search] select:not(:first-child){margin-left:calc(var(--pico-border-width) * -1)}[role=group] [role=button],[role=group] [type=button],[role=group] [type=reset],[role=group] [type=submit],[role=group] button,[role=search] [role=button],[role=search] [type=button],[role=search] [type=reset],[role=search] [type=submit],[role=search] button{width:auto}@supports selector(:has(*)){[role=group]:has(button:focus,[type=submit]:focus,[type=button]:focus,[role=button]:focus),[role=search]:has(button:focus,[type=submit]:focus,[type=button]:focus,[role=button]:focus){--pico-group-box-shadow:var(--pico-group-box-shadow-focus-with-button)}[role=group]:has(button:focus,[type=submit]:focus,[type=button]:focus,[role=button]:focus) input:not([type=checkbox],[type=radio]),[role=group]:has(button:focus,[type=submit]:focus,[type=button]:focus,[role=button]:focus) select,[role=search]:has(button:focus,[type=submit]:focus,[type=button]:focus,[role=button]:focus) input:not([type=checkbox],[type=radio]),[role=search]:has(button:focus,[type=submit]:focus,[type=button]:focus,[role=button]:focus) select{border-color:transparent}[role=group]:has(input:not([type=submit],[type=button]):focus,select:focus),[role=search]:has(input:not([type=submit],[type=button]):focus,select:focus){--pico-group-box-shadow:var(--pico-group-box-shadow-focus-with-input)}[role=group]:has(input:not([type=submit],[type=button]):focus,select:focus) [role=button],[role=group]:has(input:not([type=submit],[type=button]):focus,select:focus) [type=button],[role=group]:has(input:not([type=submit],[type=button]):focus,select:focus) [type=submit],[role=group]:has(input:not([type=submit],[type=button]):focus,select:focus) button,[role=search]:has(input:not([type=submit],[type=button]):focus,select:focus) [role=button],[role=search]:has(input:not([type=submit],[type=button]):focus,select:focus) [type=button],[role=search]:has(input:not([type=submit],[type=button]):focus,select:focus) [type=submit],[role=search]:has(input:not([type=submit],[type=button]):focus,select:focus) button{--pico-button-box-shadow:0 0 0 var(--pico-border-width) var(--pico-primary-border);--pico-button-hover-box-shadow:0 0 0 var(--pico-border-width) var(--pico-primary-hover-border)}[role=group] [role=button]:focus,[role=group] [type=button]:focus,[role=group] [type=reset]:focus,[role=group] [type=submit]:focus,[role=group] button:focus,[role=search] [role=button]:focus,[role=search] [type=button]:focus,[role=search] [type=reset]:focus,[role=search] [type=submit]:focus,[role=search] button:focus{box-shadow:none}}[role=search]>:first-child{border-top-left-radius:5rem;border-bottom-left-radius:5rem}[role=search]>:last-child{border-top-right-radius:5rem;border-bottom-right-radius:5rem}[aria-busy=true]:not(input,select,textarea,html,form){white-space:nowrap}[aria-busy=true]:not(input,select,textarea,html,form)::before{display:inline-block;width:1em;height:1em;background-image:var(--pico-icon-loading);background-size:1em auto;background-repeat:no-repeat;content:"";vertical-align:-.125em}[aria-busy=true]:not(input,select,textarea,html,form):not(:empty)::before{margin-inline-end:calc(var(--pico-spacing) * .5)}[aria-busy=true]:not(input,select,textarea,html,form):empty{text-align:center}[role=button][aria-busy=true],[type=button][aria-busy=true],[type=reset][aria-busy=true],[type=submit][aria-busy=true],a[aria-busy=true],button[aria-busy=true]{pointer-events:none}:host,:root{--pico-scrollbar-width:0px}dialog{display:flex;z-index:999;position:fixed;top:0;right:0;bottom:0;left:0;align-items:center;justify-content:center;width:inherit;min-width:100%;height:inherit;min-height:100%;padding:0;border:0;-webkit-backdrop-filter:var(--pico-modal-overlay-backdrop-filter);backdrop-filter:var(--pico-modal-overlay-backdrop-filter);background-color:var(--pico-modal-overlay-background-color);color:var(--pico-color)}dialog>article{width:100%;max-height:calc(100vh - var(--pico-spacing) * 2);margin:var(--pico-spacing);overflow:auto}@media (min-width:576px){dialog>article{max-width:510px}}@media (min-width:768px){dialog>article{max-width:700px}}dialog>article>header>*{margin-bottom:0}dialog>article>header :is(a,button)[rel=prev]{margin:0;margin-left:var(--pico-spacing);padding:0;float:right}dialog>article>footer{text-align:right}dialog>article>footer [role=button],dialog>article>footer button{margin-bottom:0}dialog>article>footer [role=button]:not(:first-of-type),dialog>article>footer button:not(:first-of-type){margin-left:calc(var(--pico-spacing) * .5)}dialog>article :is(a,button)[rel=prev]{display:block;width:1rem;height:1rem;margin-top:calc(var(--pico-spacing) * -1);margin-bottom:var(--pico-spacing);margin-left:auto;border:none;background-image:var(--pico-icon-close);background-position:center;background-size:auto 1rem;background-repeat:no-repeat;background-color:transparent;opacity:.5;transition:opacity var(--pico-transition)}dialog>article :is(a,button)[rel=prev]:is([aria-current]:not([aria-current=false]),:hover,:active,:focus){opacity:1}dialog:not([open]),dialog[open=false]{display:none}:where(nav li)::before{float:left;content:""}nav,nav ul{display:flex}nav{justify-content:space-between;overflow:visible}nav ol,nav ul{align-items:center;margin-bottom:0;padding:0;list-style:none}nav ol:first-of-type,nav ul:first-of-type{margin-left:calc(var(--pico-nav-element-spacing-horizontal) * -1)}nav ol:last-of-type,nav ul:last-of-type{margin-right:calc(var(--pico-nav-element-spacing-horizontal) * -1)}nav li{display:inline-block;margin:0;padding:var(--pico-nav-element-spacing-vertical) var(--pico-nav-element-spacing-horizontal)}nav li :where(a,[role=link]){display:inline-block;margin:calc(var(--pico-nav-link-spacing-vertical) * -1) calc(var(--pico-nav-link-spacing-horizontal) * -1);padding:var(--pico-nav-link-spacing-vertical) var(--pico-nav-link-spacing-horizontal);border-radius:var(--pico-border-radius)}nav li :where(a,[role=link]):not(:hover){text-decoration:none}nav li [role=button],nav li [type=button],nav li button,nav li input:not([type=checkbox],[type=radio],[type=range],[type=file]),nav li select{height:auto;margin-right:inherit;margin-bottom:0;margin-left:inherit;padding:calc(var(--pico-nav-link-spacing-vertical) - var(--pico-border-width) * 2) var(--pico-nav-link-spacing-horizontal)}nav[aria-label=breadcrumb]{align-items:center;justify-content:start}nav[aria-label=breadcrumb] ul li:not(:first-child){margin-inline-start:var(--pico-nav-link-spacing-horizontal)}nav[aria-label=breadcrumb] ul li a{margin:calc(var(--pico-nav-link-spacing-vertical) * -1) 0;margin-inline-start:calc(var(--pico-nav-link-spacing-horizontal) * -1)}nav[aria-label=breadcrumb] ul li:not(:last-child)::after{display:inline-block;position:absolute;width:calc(var(--pico-nav-link-spacing-horizontal) * 4);margin:0 calc(var(--pico-nav-link-spacing-horizontal) * -1);content:var(--pico-nav-breadcrumb-divider);color:var(--pico-muted-color);text-align:center;text-decoration:none;white-space:nowrap}nav[aria-label=breadcrumb] a[aria-current]:not([aria-current=false]){background-color:transparent;color:inherit;text-decoration:none;pointer-events:none}aside li,aside nav,aside ol,aside ul{display:block}aside li{padding:calc(var(--pico-nav-element-spacing-vertical) * .5) var(--pico-nav-element-spacing-horizontal)}aside li a{display:block}aside li [role=button]{margin:inherit}[dir=rtl] nav[aria-label=breadcrumb] ul li:not(:last-child) ::after{content:"\\"}progress{display:inline-block;vertical-align:baseline}progress{-webkit-appearance:none;-moz-appearance:none;display:inline-block;appearance:none;width:100%;height:.5rem;margin-bottom:calc(var(--pico-spacing) * .5);overflow:hidden;border:0;border-radius:var(--pico-border-radius);background-color:var(--pico-progress-background-color);color:var(--pico-progress-color)}progress::-webkit-progress-bar{border-radius:var(--pico-border-radius);background:0 0}progress[value]::-webkit-progress-value{background-color:var(--pico-progress-color);-webkit-transition:inline-size var(--pico-transition);transition:inline-size var(--pico-transition)}progress::-moz-progress-bar{background-color:var(--pico-progress-color)}@media (prefers-reduced-motion:no-preference){progress:indeterminate{background:var(--pico-progress-background-color) linear-gradient(to right,var(--pico-progress-color) 30%,var(--pico-progress-background-color) 30%) top left/150% 150% no-repeat;animation:progress-indeterminate 1s linear infinite}progress:indeterminate[value]::-webkit-progress-value{background-color:transparent}progress:indeterminate::-moz-progress-bar{background-color:transparent}}@media (prefers-reduced-motion:no-preference){[dir=rtl] progress:indeterminate{animation-direction:reverse}}@keyframes progress-indeterminate{0%{background-position:200% 0}100%{background-position:-200% 0}}[data-tooltip]{position:relative}[data-tooltip]:not(a,button,input,[role=button]){border-bottom:1px dotted;text-decoration:none;cursor:help}[data-tooltip]::after,[data-tooltip]::before,[data-tooltip][data-placement=top]::after,[data-tooltip][data-placement=top]::before{display:block;z-index:99;position:absolute;bottom:100%;left:50%;padding:.25rem .5rem;overflow:hidden;transform:translate(-50%,-.25rem);border-radius:var(--pico-border-radius);background:var(--pico-tooltip-background-color);content:attr(data-tooltip);color:var(--pico-tooltip-color);font-style:normal;font-weight:var(--pico-font-weight);font-size:.875rem;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;opacity:0;pointer-events:none}[data-tooltip]::after,[data-tooltip][data-placement=top]::after{padding:0;transform:translate(-50%,0);border-top:.3rem solid;border-right:.3rem solid transparent;border-left:.3rem solid transparent;border-radius:0;background-color:transparent;content:"";color:var(--pico-tooltip-background-color)}[data-tooltip][data-placement=bottom]::after,[data-tooltip][data-placement=bottom]::before{top:100%;bottom:auto;transform:translate(-50%,.25rem)}[data-tooltip][data-placement=bottom]:after{transform:translate(-50%,-.3rem);border:.3rem solid transparent;border-bottom:.3rem solid}[data-tooltip][data-placement=left]::after,[data-tooltip][data-placement=left]::before{top:50%;right:100%;bottom:auto;left:auto;transform:translate(-.25rem,-50%)}[data-tooltip][data-placement=left]:after{transform:translate(.3rem,-50%);border:.3rem solid transparent;border-left:.3rem solid}[data-tooltip][data-placement=right]::after,[data-tooltip][data-placement=right]::before{top:50%;right:auto;bottom:auto;left:100%;transform:translate(.25rem,-50%)}[data-tooltip][data-placement=right]:after{transform:translate(-.3rem,-50%);border:.3rem solid transparent;border-right:.3rem solid}[data-tooltip]:focus::after,[data-tooltip]:focus::before,[data-tooltip]:hover::after,[data-tooltip]:hover::before{opacity:1}@media (hover:hover) and (pointer:fine){[data-tooltip]:focus::after,[data-tooltip]:focus::before,[data-tooltip]:hover::after,[data-tooltip]:hover::before{--pico-tooltip-slide-to:translate(-50%, -0.25rem);transform:translate(-50%,.75rem);animation-duration:.2s;animation-fill-mode:forwards;animation-name:tooltip-slide;opacity:0}[data-tooltip]:focus::after,[data-tooltip]:hover::after{--pico-tooltip-caret-slide-to:translate(-50%, 0rem);transform:translate(-50%,-.25rem);animation-name:tooltip-caret-slide}[data-tooltip][data-placement=bottom]:focus::after,[data-tooltip][data-placement=bottom]:focus::before,[data-tooltip][data-placement=bottom]:hover::after,[data-tooltip][data-placement=bottom]:hover::before{--pico-tooltip-slide-to:translate(-50%, 0.25rem);transform:translate(-50%,-.75rem);animation-name:tooltip-slide}[data-tooltip][data-placement=bottom]:focus::after,[data-tooltip][data-placement=bottom]:hover::after{--pico-tooltip-caret-slide-to:translate(-50%, -0.3rem);transform:translate(-50%,-.5rem);animation-name:tooltip-caret-slide}[data-tooltip][data-placement=left]:focus::after,[data-tooltip][data-placement=left]:focus::before,[data-tooltip][data-placement=left]:hover::after,[data-tooltip][data-placement=left]:hover::before{--pico-tooltip-slide-to:translate(-0.25rem, -50%);transform:translate(.75rem,-50%);animation-name:tooltip-slide}[data-tooltip][data-placement=left]:focus::after,[data-tooltip][data-placement=left]:hover::after{--pico-tooltip-caret-slide-to:translate(0.3rem, -50%);transform:translate(.05rem,-50%);animation-name:tooltip-caret-slide}[data-tooltip][data-placement=right]:focus::after,[data-tooltip][data-placement=right]:focus::before,[data-tooltip][data-placement=right]:hover::after,[data-tooltip][data-placement=right]:hover::before{--pico-tooltip-slide-to:translate(0.25rem, -50%);transform:translate(-.75rem,-50%);animation-name:tooltip-slide}[data-tooltip][data-placement=right]:focus::after,[data-tooltip][data-placement=right]:hover::after{--pico-tooltip-caret-slide-to:translate(-0.3rem, -50%);transform:translate(-.05rem,-50%);animation-name:tooltip-caret-slide}}@keyframes tooltip-slide{to{transform:var(--pico-tooltip-slide-to);opacity:1}}@keyframes tooltip-caret-slide{50%{opacity:0}to{transform:var(--pico-tooltip-caret-slide-to);opacity:1}}[aria-controls]{cursor:pointer}[aria-disabled=true],[disabled]{cursor:not-allowed}[aria-hidden=false][hidden]{display:initial}[aria-hidden=false][hidden]:not(:focus){clip:rect(0,0,0,0);position:absolute}[tabindex],a,area,button,input,label,select,summary,textarea{-ms-touch-action:manipulation}[dir=rtl]{direction:rtl}@media (prefers-reduced-motion:reduce){:not([aria-busy=true]),:not([aria-busy=true])::after,:not([aria-busy=true])::before{background-attachment:initial!important;animation-duration:1ms!important;animation-delay:-1ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-delay:0s!important;transition-duration:0s!important}}
\ No newline at end of file
diff --git a/xq/abv-mod.xqm b/xq/abv-mod.xqm
index bbe2a38..02f7068 100644
--- a/xq/abv-mod.xqm
+++ b/xq/abv-mod.xqm
@@ -3,6 +3,24 @@ module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod';
declare namespace tei = "http://www.tei-c.org/ns/1.0";
declare namespace abv = "http://ossetic-studies.org/ns/abaevdict";
+(: HELPER FUNCTIONS :)
+
+declare function abv-m:lookups($include-subentries as xs:boolean := false()) {
+ if (not($include-subentries)) then
+ doc('abaevdict_index/lookup.xml')/tei:table/tei:entry
+ else
+ doc('abaevdict_index/lookup.xml')/tei:table/*
+};
+
+declare function abv-m:collection($lang as xs:string,
+ $method as xs:string) {
+ collection(`abaevdict_{$lang}/{$method}`)
+};
+
+declare function abv-m:invert-lang($lang as xs:string) as xs:string {
+ if($lang = 'en') then 'ru' else 'en'
+};
+
declare function abv-m:normalize-str($str as xs:string?)
as xs:string? {
$str => translate('
','') => normalize-space()
diff --git a/xq/site/components/dictionary.xq b/xq/site/components/dictionary.xq
deleted file mode 100644
index 68af40e..0000000
--- a/xq/site/components/dictionary.xq
+++ /dev/null
@@ -1,96 +0,0 @@
-module namespace dict = 'http://ossetic-studies.org/ns/abaevdict-site/dictionary';
-
-import module namespace shared = 'http://ossetic-studies.org/ns/abaevdict-site/shared' at '../shared/shared.xq';
-import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at '../../abv-mod.xqm';
-
-(: Sidebar with entry list. Requires abaev.js to be loaded. :)
-
-declare function dict:sidebar($lang as xs:string) {
- (
-
- {html:doc('../../../static/chevron-right.svg')}
- ,
-
- {html:doc('../../../static/chevron-left.svg')}
- ,
-
- )
-};
-
-declare function dict:main-view($lang as xs:string,
- $p as xs:integer,
- $xpath as xs:string,
- $entry as xs:string) {
- (dict:sidebar($lang),
-
- {for $doc at $i in $shared:sorted
- where $i > ($p - 1) * $shared:items-per-page and $i <= $p * $shared:items-per-page
- let $html := if ($xpath != '' and $entry = $doc/@xml:id)
- then abv-m:mark-element(
- doc(`abaevdict_{$lang}/xml/{$doc/@xml:id}.xml`),
- $xpath) => abv-m:make-html($lang)
- else
- let $sd := session:get('searchData')
- let $sn := session:get('searchN')
- return if (exists($sd) and $sd($sn)('entry') = $doc/@xml:id)
- then abv-m:make-html($sd($sn)('tei'), $lang)
- else doc(`abaevdict_{$lang}/html/{$doc/@xml:id}.html`)
- return {(
- (: Block with icons to the left of entry (floating) :)
-
- {
-
-
-
-
-
- ,
- if (doc('abaevdict_index/mentioned_en.xml')/lang-index
- /lang[@id != 'os' and
- not(starts-with(@id,'os-'))]/word/entry[@id=string($doc/@xml:id)])
- then
-
- }
,
- $html)}
- }
- ,
- ,
-
-
-
-
-
-
- {if ($lang = 'ru') then 'Закрыть' else 'Close'}
-
- )
-};
\ No newline at end of file
diff --git a/xq/site/components/entries.xqm b/xq/site/components/entries.xqm
new file mode 100644
index 0000000..fa83b74
--- /dev/null
+++ b/xq/site/components/entries.xqm
@@ -0,0 +1,182 @@
+module namespace entries = 'http://ossetic-studies.org/ns/abaevdict-site/entries';
+
+declare namespace tei = "http://www.tei-c.org/ns/1.0";
+
+import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at '../../abv-mod.xqm';
+
+(: MAIN DICTIONARY VIEW COMPONENT :)
+
+(: GET INDIVIDUAL ENTRY :)
+
+declare %rest:path("{$lang}/entries/{$id}")
+ %rest:query-param("query", "{$query}")
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function entries:entry($lang as xs:string, $id as xs:string, $query as xs:string?) {
+ if (count($query) = 0) then
+ doc(`abaevdict_{$lang}/html/{$id}.html`)
+ else
+ let $xml := doc(`abaevdict_{$lang}/xml/{$id}.xml`)
+ let $marked := ft:mark(
+ xquery:eval(
+ `declare namespace tei = "http://www.tei-c.org/ns/1.0";
+ declare namespace abv = "http://ossetic-studies.org/ns/abaevdict";
+ .[{$query}]`, {'': $xml})
+ )
+ return abv-m:make-html($marked,$lang)
+ };
+
+declare %rest:path("/entries/{$id}")
+ %rest:query-param("query", "{$query}")
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function entries:entry($id as xs:string, $query as xs:string?) {
+ entries:entry('en', $id, $query)
+ };
+
+(: GET ENTRIES CATALOG :)
+
+declare %rest:path("{$lang}/entries")
+ %rest:query-param("per-chunk", "{$per-chunk}", 5)
+ %rest:query-param("query", "{$query}")
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function entries:entries($lang as xs:string,
+ $per-chunk as xs:integer,
+ $query as xs:string?) {
+ let $docs := abv-m:collection($lang,'xml')/tei:entry
+ let $chosen := if($query) then
+ xquery:eval(`declare namespace tei = "http://www.tei-c.org/ns/1.0";
+ declare namespace abv = "http://ossetic-studies.org/ns/abaevdict";
+ .[{$query}]`,
+ {'': $docs})/string(@xml:id)
+ for tumbling window $w in abv-m:lookups()
+ start at $s when true()
+ only end at $e when $e - $s eq ($per-chunk - 1)
+ return
+
+ {
+ for $entry in $w
+ let $id := $entry/@xml:id
+ return
+
+ {if ($id = $chosen) then
+ attribute hx-vals {
+ `{'{'}"query": "{$query}"{'}'}`
+ }}
+ {
+
+
+ }
+
+ }
+
+ };
+
+declare %rest:path("/entries")
+ %rest:query-param("per-chunk", "{$per-chunk}", 5)
+ %rest:query-param("query", "{$query}")
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function entries:entries($per-chunk as xs:integer,
+ $query as xs:string?) {
+ entries:entries('en', $per-chunk, $query)
+ };
+
+(: LIST OF ENTRIES FOR MENU :)
+
+declare %rest:path("{$lang}/entrylist")
+ %rest:query-param("filter", "{$filter}")
+ %rest:query-param("subentries", "{$subentries}", false())
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function entries:entrylist($lang as xs:string,
+ $filter as xs:string?,
+ $subentries as xs:boolean?) {
+
+
+ {for $e in abv-m:lookups($subentries)
+ let $txt := $e/text()
+ return
+ if ($txt contains text {`{$filter}.*`} using wildcards at start) then
+
+ {
+ if (name($e) = 're') then
+ attribute class {'abv-menu-re'} else (),
+
+ {$e/text()}
+
+ }
+
+ }
+
+
+ };
+
+declare %rest:path("entrylist")
+ %rest:query-param("filter", "{$filter}")
+ %rest:query-param("subentries", "{$subentries}", false())
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function entries:entrylist($filter as xs:string?,
+ $subentries as xs:boolean?) {
+ entries:entrylist('en',$filter,$subentries)
+ };
+
+(: QUICK ENTRY LIST SIDEBAR :)
+
+declare function entries:sidebar($lang as xs:string) {
+ (
+ {html:doc('../../../static/chevron-left.svg')}
+ ,
+
+ {html:doc('../../../static/chevron-right.svg')}
+ ,
+ )
+};
\ No newline at end of file
diff --git a/xq/site/components/home.xq b/xq/site/components/home.xqm
similarity index 100%
rename from xq/site/components/home.xq
rename to xq/site/components/home.xqm
diff --git a/xq/site/components/index.xq b/xq/site/components/index.xq
deleted file mode 100644
index 4e7c1ad..0000000
--- a/xq/site/components/index.xq
+++ /dev/null
@@ -1,49 +0,0 @@
-module namespace index = 'http://ossetic-studies.org/ns/abaevdict-site/index';
-
-import module namespace shared = 'http://ossetic-studies.org/ns/abaevdict-site/shared' at '../shared/shared.xq';
-
-declare function index:content($lang as xs:string) {
-let $mlangs := doc(`abaevdict_index/langnames.xml`)/csv[1]/record
-return
-
-{shared:head('HEDO – Index', )}
-
-{shared:header($lang, `../{shared:invert-lang($lang)}/index`)}
-
-
-
- {if ($lang = 'ru') then 'Языки' else 'Languages'}
-
- {
- for $mlang in $mlangs
- let $mlang-id := $mlang/code/text()
- let $mlang-name := if ($lang = 'ru') then $mlang/ru/text() else $mlang/en/text()
- where $mlang-name != ''
- order by $mlang-name
- return
-
- {
- $mlang-name
- }
-
- }
-
-
-
- {if ($lang = 'ru') then 'Формы' else 'Forms'}
-
-
-
-
- {if ($lang = 'ru') then 'Лексемы' else 'Lexemes'}
-
-
-
-
-
- {if ($lang = 'ru') then 'К форме' else 'Go to form'}
-
-
-
-
-};
\ No newline at end of file
diff --git a/xq/site/components/index.xqm b/xq/site/components/index.xqm
new file mode 100644
index 0000000..e11ddc1
--- /dev/null
+++ b/xq/site/components/index.xqm
@@ -0,0 +1,149 @@
+module namespace index = 'http://ossetic-studies.org/ns/abaevdict-site/index';
+
+declare namespace tei = "http://www.tei-c.org/ns/1.0";
+
+import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at '../../abv-mod.xqm';
+
+(: GET LANGUAGE LIST :)
+
+declare %rest:path("{$lang}/index/languages")
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function index:languages($lang as xs:string) {
+ let $mlangs := doc(`abaevdict_index/langnames.xml`)/csv[1]/record
+ for $mlang in $mlangs
+ let $mlang-id := $mlang/code/text()
+ let $mlang-name := if ($lang = 'ru') then $mlang/ru/text() else $mlang/en/text()
+ where $mlang-name != ''
+ order by $mlang-name
+ return
+
+ {
+ $mlang-name
+ }
+
+ };
+
+declare %rest:path("/index/languages")
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function index:languages() {
+ index:languages('en')
+ };
+
+(: FORM LIST :)
+
+declare %rest:path("{$lang}/index/forms")
+ %rest:query-param("flang", "{$flang}")
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function index:forms($lang as xs:string, $flang as xs:string) {
+ let $ments := doc(`abaevdict_index/mentioned_{$lang}.xml`)
+ /lang-index[1]/lang[@id=$flang]/word
+ for $w in $ments
+ let $txt := string($w/@text)
+ return {$txt}
+ };
+
+declare %rest:path("index/forms")
+ %rest:query-param("flang", "{$flang}")
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function index:forms($flang as xs:string) {
+ index:forms('en',$flang)
+ };
+(: RELATED ENTRY LIST :)
+
+declare %rest:path("{$lang}/index/entries")
+ %rest:query-param("flang", "{$flang}")
+ %rest:query-param("word", "{$word}")
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function index:entries($lang as xs:string,
+ $flang as xs:string,
+ $word as xs:string) {
+ let $entries := doc(`abaevdict_index/mentioned_{$lang}.xml`)
+ /lang-index[1]/lang[@id=$flang]/word[@text=$word]/entry
+ for $e in $entries
+ let $id := $e/@id
+ let $txt := abv-m:entry-form-by-id($id)
+ let $query := `./@xml:id = '{$id}' and .//text() contains
+ text '{$word}' using diacritics sensitive`
+ return
+ {string-join(
+ distinct-values($e/ref/gloss/string(@text)),', ')}
+
+ {$txt}
+
+
+ {
+ string-join(data(doc(`abaevdict_{$lang}/xml/{$id}.xml`)
+ /tei:entry[1]/tei:sense/(tei:sense|tei:sense/tei:sense|.)
+ /tei:cit/tei:quote),', ')
+ }
+
+
+ };
+
+declare %rest:path("index/entries")
+ %rest:query-param("flang", "{$flang}")
+ %rest:query-param("word", "{$word}")
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function index:entries($flang as xs:string,
+ $word as xs:string) {
+ index:entries('en',$flang,$word)
+ };
+
+(: THE MAIN INDEX VIEW :)
+
+declare function index:content($lang as xs:string) {
+
+
+
+
+
+ {if ($lang = 'ru') then 'Языки' else 'Languages'}
+
+ {index:languages($lang)}
+
+
+
+ {if ($lang = 'ru') then 'Формы' else 'Forms'}
+
+
+
+
+
{if ($lang = 'ru') then 'Лексемы' else 'Lexemes'}
+
+
+
+ {if ($lang = 'ru') then 'Глоссы' else 'Gloss'}
+ {if ($lang = 'ru') then 'Лексема' else 'Lemma'}
+ {if ($lang = 'ru') then 'Перевод' else 'Translation'}
+
+
+
+
+
+
+
+
+
+
+};
\ No newline at end of file
diff --git a/xq/site/components/map.xqm b/xq/site/components/map.xqm
new file mode 100644
index 0000000..9e7e693
--- /dev/null
+++ b/xq/site/components/map.xqm
@@ -0,0 +1,61 @@
+module namespace map = 'http://ossetic-studies.org/ns/abaevdict-site/map';
+
+import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at '../../abv-mod.xqm';
+
+declare %rest:path("{$lang}/map")
+ %rest:query-param("entry", "{$entry}")
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function map:map($lang as xs:string, $entry as xs:string) {
+ let $mapdata := abv-m:make-geomap(
+ doc(`abaevdict_{$lang}/xml/{$entry}.xml`),
+ $lang)
+ return
+ (
+
+
+
+
+
+
+ {if ($lang = 'ru') then 'Закрыть' else 'Close'}
+
+
+ ,
+ )
+ };
\ No newline at end of file
diff --git a/xq/site/components/search.xq b/xq/site/components/search.xq
deleted file mode 100644
index 12efccf..0000000
--- a/xq/site/components/search.xq
+++ /dev/null
@@ -1,31 +0,0 @@
-module namespace search = 'http://ossetic-studies.org/ns/abaevdict-site/search-modal';
-
-import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at '../../abv-mod.xqm';
-
-(: Modal that appears on all pages, with search results :)
-declare function search:content($lang as xs:string) {
- if (exists(session:get('searchData'))) then
-
-
-
-
-
-
- {if ($lang = 'ru') then '№' else 'No.'}
- {if ($lang = 'ru') then 'Лемма' else 'Lemma'}
- {if ($lang = 'ru') then 'Фрагмент' else 'Fragment'}
-
-
-
-
-
-
- {if ($lang = 'ru') then 'Закрыть' else 'Close'}
-
-
-
-};
\ No newline at end of file
diff --git a/xq/site/components/search.xqm b/xq/site/components/search.xqm
new file mode 100644
index 0000000..3561302
--- /dev/null
+++ b/xq/site/components/search.xqm
@@ -0,0 +1,133 @@
+module namespace search = 'http://ossetic-studies.org/ns/abaevdict-site/search';
+
+declare namespace tei = "http://www.tei-c.org/ns/1.0";
+
+import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at '../../abv-mod.xqm';
+
+declare variable $search:types :=
+(
+ {
+ 'query': ".//text() contains text {'$'}",
+ 'ru': 'Везде',
+ 'en': 'All'
+ },
+ {
+ 'query': ".//tei:form/tei:orth//text() contains text {'$'}",
+ 'ru': 'Формы',
+ 'en': 'Forms'
+ },
+ {
+ 'query': ".//tei:cit[@type='translationEquivalent']//text() contains text {'$'}",
+ 'ru': 'Значения',
+ 'en': 'Meanings'
+ },
+ {
+ 'query': ".//tei:cit[@type='example']/tei:quote//text() contains text {'$'}",
+ 'ru': 'Примеры',
+ 'en': 'Examples'
+ },
+ {
+ 'query': ".//tei:cit[@type='translation']//text() contains text {'$'}",
+ 'ru': 'Переводы',
+ 'en': 'Translations'
+ },
+ {
+ 'query': ".//tei:mentioned/(tei:m|tei:w|tei:phr|tei:s)/text() contains text {'$'}",
+ 'ru': 'Цит. формы',
+ 'en': 'Mentioned'
+ },
+ {
+ 'query': ".//tei:gloss//text() contains text {'$'}",
+ 'ru': 'Глоссы',
+ 'en': 'Glosses'
+ },
+ {
+ 'query': "./tei:etym[1]//text() contains text {'$'}",
+ 'ru': 'Этимологии',
+ 'en': 'Etymology'
+ },
+ {
+ 'query': "$",
+ 'ru': 'XQuery',
+ 'en': 'XQuery'
+ }
+);
+
+(: GET SEARCH RESULTS :)
+
+declare function search:content($lang as xs:string,
+ $pattern as xs:string? := (),
+ $text as xs:string? := ()) {
+ ,
+
+
+
+ {if ($lang = 'ru') then 'Лексема' else 'Lemma'}
+ {if ($lang = 'ru') then 'Перевод' else 'Translation'}
+ {if ($lang = 'ru') then 'Контекст' else 'Context'}
+
+
+
+ {if (exists($pattern) and exists($text)) then
+ let $entries := abv-m:collection($lang,'xml')/tei:entry
+ let $query := replace($pattern, "\$", $text)
+ let $hits :=
+ ft:mark(xquery:eval(`declare namespace tei = "http://www.tei-c.org/ns/1.0";
+ declare namespace abv = "http://ossetic-studies.org/ns/abaevdict";
+ .[{$query}]`, {'': $entries}))
+ for $hit in $hits
+ return
+
+
+
+ {$hit/tei:form[1]/tei:orth[1]}
+
+
+
+ {
+ string-join(
+ data($hit/tei:sense
+ /(tei:sense|tei:sense/tei:sense|.)/tei:cit/tei:quote),
+ ', '
+ )
+ }
+
+
+ {
+ if (count($hit//*[tei:mark]) > 0) then
+ util:strip-namespaces(($hit//*[tei:mark])[1])/child::node()
+ }
+
+
+ }
+
+
+ };
\ No newline at end of file
diff --git a/xq/site/restx_api.xq b/xq/site/restx_api.xq
deleted file mode 100644
index 9ea4cb5..0000000
--- a/xq/site/restx_api.xq
+++ /dev/null
@@ -1,210 +0,0 @@
-declare namespace api = 'http://ossetic-studies.org/ns/abaevdict-api';
-
-declare namespace tei = "http://www.tei-c.org/ns/1.0";
-
-import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at '../abv-mod.xqm';
-
-(: ======================================================= :)
-(: ==================== API STUFF ======================== :)
-(: ======================================================= :)
-
-declare option output:method 'json';
-declare option output:json "format=xquery";
-
-declare variable $langs-index := doc('abaevdict_index/langnames.xml');
-declare variable $lookup := doc('abaevdict_index/lookup.xml');
-
-(: Get the mentioned index for the right metalanguage :)
-declare function api:ment-index($db-lang as xs:string) {
- doc(`abaevdict_index/mentioned_{$db-lang}.xml`)
-};
-
-(: Short entry info (only forms for now). Hash is used because URLs don't handle
-some Unicode characters very well in this system :)
-declare function api:entry-info-short($n as node())
-as map(xs:string, item()) {
- let $id := if (name($n) = 're') then string($n/@corresp) else string($n/@xml:id)
- return map{'id': hash($id),
- 'xmlid': $id,
- 'form': $n/text(),
- 'subentry': if (name($n) = 're') then true() else false()
- }
-};
-
-declare function api:entry-info-long($n as node(), $db-lang as xs:string)
-as map(xs:string, item()) {
- map:merge(
- (
- api:entry-info-short($n),
- map{'glosses': array:build(data(doc(`abaevdict_{$db-lang}/xml/{$n/@xml:id}.xml`)
- /tei:entry[1]/tei:sense/(tei:sense|tei:sense/tei:sense|.)/tei:cit/tei:quote))}
- )
-)
-};
-
-(: Short language info -- for the language list :)
-declare function api:lang-info-short($n as node(), $db-lang as xs:string) {
- map{
- 'id': $n/code/text(),
- 'glottolog': $n/glottolog/text(),
- 'name': map{'full': if ($db-lang = 'ru') then $n/ru/text() else $n/en/text(),
- 'abbr': if ($db-lang = 'ru') then $n/ru/text() else $n/en_abbr/text()}
- }
-};
-
-(: Longer info -- for individual languages :)
-declare function api:lang-info-full($n as node(), $db-lang as xs:string) {
- map:merge(
- (api:lang-info-short($n, $db-lang),
- map{'words':
- array:build(api:ment-index($db-lang)/lang-index[1]/lang[@id=$n/code]/word,
- api:word-info-short#1)
- }
- )
- )
-};
-
-declare function api:word-info-short($n as node()) {
- let $text := xs:string($n/@text)
- return map{
- (: I am using a hash function as ID, because the words are uniquely
- identified within a language by their text. And the mentioned index is not
- persistent enough (at least yet) to use persistent ids :)
- 'id': string(hash($text)),
- 'text': $text
- }
-};
-
-declare function api:word-info-long($n as node()) {
- map:merge(
- (
- api:word-info-short($n),
- map{
- 'entries': array:build($n/entry,
- fn {
- map{'id': string(hash(./@id)),
- 'xmlid': string(./@id),
- 'refs': array:build(./ref,
- fn {
- map:merge((
- map:entry('path', string(./@path)),
- if(./gloss) then
- {'glosses': array:build(distinct-values(./gloss/@text), string#1)}
- else ()
- )
- )
- })
- }
- }
- )
- (: 'nodes': array:build(string($n/ref/@node-id)),
- 'glosses': array:build(string($n/gloss/@text)) :)
- }
- )
- )
-};
-
-(: RETURN JSON FOR PLOTLY MAP :)
-(: English as default language :)
-declare %rest:path("dict/map-info/{$entry}")
- %rest:GET
- function api:map-info($entry) {
- (: In this case we do not redirect, but simply give the JSON via
- another function :)
- api:map-info('en', $entry)
- };
-
-(: This has to be remade to use the /api path. But keep it like this for now :)
-declare %rest:path("{$lang}/dict/map-info/{$entry}")
- %rest:GET
- function api:map-info($lang, $entry) {
- let $ments := abv-m:make-geomap(doc(`abaevdict_{$lang}/xml/{$entry}.xml`),
- $lang)
- return $ments
- };
-
-(: API FOR THE MENTIONED INDEX :)
-(: Default to English :)
-declare %rest:path("/api/{$path=.+}")
- %rest:GET
- function api:default($path as xs:string) {
- web:forward(`/en/api/{$path}`)
- };
-
-(: Get languages :)
-declare %rest:path("{$db-lang}/api/languages")
- %rest:GET
- function api:langs($db-lang as xs:string := 'en') {
- array:build(
- $langs-index/csv[1]/record,
- api:lang-info-short(?,$db-lang)
- )
- };
-
-(: Get one language :)
-declare %rest:path("{$db-lang}/api/languages/{$lang}")
- %rest:GET
- function api:langs-lang($db-lang as xs:string, $lang as xs:string) {
- api:lang-info-full(
- $langs-index/csv[1]/record[code=$lang], $db-lang
- )
- };
-
-(: Get words for a language :)
-declare %rest:path("{$db-lang}/api/languages/{$lang}/words")
- %rest:GET
- function api:langs-lang-words($db-lang as xs:string, $lang as xs:string) {
- array:build(api:ment-index($db-lang)/lang-index[1]/lang[@id=$lang]/word,
- api:word-info-short#1)
- };
-
-(: Get info on a particular word.
-Db-lang is a placeholder, it does nothing here, used only for consistency :)
-declare %rest:path("{$db-lang}/api/languages/{$lang}/words/{$word-id}")
- %rest:GET
- function api:langs-lang-words-word($db-lang as xs:string,
- $lang as xs:string,
- $word-id as xs:string) {
- api:word-info-long(
- api:ment-index($db-lang)/lang-index[1]/lang[@id=$lang]/word[string(hash(@text))=$word-id]
- )
- };
-
-(: Entry info :)
-declare %rest:path("{$db-lang}/api/entries")
- %rest:GET
- function api:entries($db-lang as xs:string) {
- array:build(
- $lookup/tei:table[1]/*,
- api:entry-info-short#1
- )
- };
-
-declare %rest:path("{$db-lang}/api/entries/{$entry-id}")
- %rest:GET
- function api:entries($db-lang as xs:string,
- $entry-id as xs:string) {
- api:entry-info-long(
- $lookup/tei:table[1]/*[string(hash(@xml:id))=$entry-id],
- $db-lang)
- };
-
-(: Search API :)
-declare %rest:path("{$db-lang}/api/search")
- %rest:query-param("type","{$type}",'full')
- %rest:query-param("query","{$query}")
- %rest:GET
- function api:search($db-lang as xs:string,
- $type as xs:string,
- $query as xs:string) {
- abv-m:search($db-lang,$type,$query)
- };
-
-(: Get current search results :)
-declare %rest:path("{$db-lang}/api/search/current")
- %rest:GET
- function api:search-current($db-lang as xs:string) {
- session:get('searchData')
- };
-
-0
\ No newline at end of file
diff --git a/xq/site/restx_dict.xq b/xq/site/restx_dict.xq
deleted file mode 100644
index 823e706..0000000
--- a/xq/site/restx_dict.xq
+++ /dev/null
@@ -1,123 +0,0 @@
-module namespace page = 'http://ossetic-studies.org/ns/abaevdict-site';
-
-declare namespace tei = "http://www.tei-c.org/ns/1.0";
-
-import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at '../abv-mod.xqm';
-import module namespace shared = 'http://ossetic-studies.org/ns/abaevdict-site/shared' at './shared/shared.xq';
-
-(: COMPONENTS :)
-(: To make the codebase more manageable, components are split into separate
-files included as modules. :)
-import module namespace home = 'http://ossetic-studies.org/ns/abaevdict-site/home' at './components/home.xq';
-import module namespace dict = 'http://ossetic-studies.org/ns/abaevdict-site/dictionary' at './components/dictionary.xq';
-import module namespace index = 'http://ossetic-studies.org/ns/abaevdict-site/index' at './components/index.xq';
-
-(: =============================================================== :)
-(: ============================ FAVICON ========================== :)
-(: =============================================================== :)
-
-declare %rest:path("/favicon.ico")
- %rest:GET
- function page:favicon() {
- fetch:binary('../../static/favicon.ico')
- };
-
-(: =============================================================== :)
-(: ======================= HOMEPAGE ============================== :)
-(: =============================================================== :)
-
-declare %rest:path("{$lang}")
- %output:method("html")
- %output:html-version('5')
- function page:zero($lang) {
- page:home($lang)
- };
-
-declare %rest:path("/")
- %output:method("html")
- %output:html-version('5')
- function page:zero() {
- page:zero('en')
- };
-
-declare %rest:path("{$lang}/home")
- %output:method("html")
- %output:html-version('5')
- function page:home($lang) {
-
- {shared:head(if ($lang='ru') then 'ИЭСОЯ — Главная' else 'Abaevdict — Home',())}
-
-
- {shared:header($lang,`../{shared:invert-lang($lang)}/home`)}
-
-
- {
- home:content($lang)
- }
-
-
-
- };
-
-declare %rest:path("home")
- %output:method("html")
- %output:html-version('5')
- function page:home() {
- page:home('en')
- };
-
-(: =============================================================== :)
-(: ======================= THE DICTIONARY ======================== :)
-(: =============================================================== :)
-
-(: If no language defined, default to English :)
-declare %rest:path("dict")
- %output:method("html")
- %output:html-version('5')
- function page:dict() {
- web:forward('/en/dict')
- };
-
-(: The main dictionary view :)
-declare %rest:path("{$lang}/dict")
- %rest:query-param("page","{$p}", 1)
- %rest:query-param("xpath","{$xpath}", '')
- %rest:query-param("entry","{$entry}", '')
- %output:method("html")
- %output:html-version('5')
- function page:dict($lang, $p, $xpath, $entry) {
-
- {shared:head('HEDO – Dictionary',
- (,
- ,
- ))}
-
-
- {(
- shared:header($lang,`../{shared:invert-lang($lang)}/dict`),
- dict:main-view($lang, $p, $xpath, $entry)
- )}
-
-
-};
-
-(: =============================================================== :)
-(: ======================= THE INDEX ============================= :)
-(: =============================================================== :)
-
-(: Mentioned index :)
-declare %rest:path("{$lang}/index")
- %output:method("html")
- %output:html-version('5')
- function page:index($lang) {
- index:content($lang)
- };
-
-(: Default to English :)
-declare %rest:path("index")
- %output:method("html")
- %output:html-version('5')
- function page:index() {
- page:index('en')
- };
\ No newline at end of file
diff --git a/xq/site/restx_entrypoints.xq b/xq/site/restx_entrypoints.xq
deleted file mode 100644
index 3d3b176..0000000
--- a/xq/site/restx_entrypoints.xq
+++ /dev/null
@@ -1,31 +0,0 @@
-module namespace entry = 'http://ossetic-studies.org/ns/abaevdict-site/entrypoints';
-
-import module namespace shared = 'http://ossetic-studies.org/ns/abaevdict-site/shared' at './shared/shared.xq';
-
-(: This module includes various ways of accessing dictionary resources by
-their identifiers. Right now, this only applies to entries, but may apply to
-other things as well :)
-
-(: == ENTRY BY ID == :)
-(: English as default language :)
-declare %rest:path("dict/{$id}")
- %rest:query-param("xpath", "{$xpath}", '')
- %output:method("html")
- %output:html-version('5')
- function entry:by-id($id, $xpath) {
- entry:by-id('en', $id, $xpath)
- };
-
-declare %rest:path("{$lang}/dict/{$id}")
- %rest:query-param("xpath", "{$xpath}", '')
- %output:method("html")
- %output:html-version('5')
- function entry:by-id($lang, $id, $xpath) {
- let $doc-index := index-where($shared:sorted, fn { ./@xml:id=$id })
- let $pagenum := ceiling($doc-index div $shared:items-per-page)
- return web:redirect('../dict',
- map:merge(({'page': $pagenum,
- 'entry': web:decode-url($id)},
- if ($xpath != '') then {'xpath': $xpath})),
- web:decode-url($id))
- };
\ No newline at end of file
diff --git a/xq/site/restx_main.xq b/xq/site/restx_main.xq
new file mode 100644
index 0000000..8298da1
--- /dev/null
+++ b/xq/site/restx_main.xq
@@ -0,0 +1,250 @@
+declare namespace site = 'http://ossetic-studies.org/ns/abaevdict-site';
+
+declare namespace tei = "http://www.tei-c.org/ns/1.0";
+
+import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at '../abv-mod.xqm';
+import module namespace home = 'http://ossetic-studies.org/ns/abaevdict-site/home' at './components/home.xqm';
+import module namespace entries = 'http://ossetic-studies.org/ns/abaevdict-site/entries' at './components/entries.xqm';
+import module namespace index = 'http://ossetic-studies.org/ns/abaevdict-site/index' at './components/index.xqm';
+import module namespace search = 'http://ossetic-studies.org/ns/abaevdict-site/search' at './components/search.xqm';
+
+(: =============================================================== :)
+(: ============================ FAVICON ========================== :)
+(: =============================================================== :)
+
+declare %rest:path("/favicon.ico")
+ %rest:GET
+ function site:favicon() {
+ fetch:binary('../../static/favicon.ico')
+ };
+
+(: HTML HEAD :)
+
+declare function site:head($title as xs:string) {
+
+ {$title}
+
+
+
+
+
+
+
+};
+
+(: HEADER :)
+
+declare function site:header($lang as xs:string, $href-other as xs:string) {
+
+};
+
+(: PATHS :)
+
+(: ZERO PATH :)
+
+declare %rest:path("{$lang}")
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function site:null($lang as xs:string) {
+ site:home($lang)
+ };
+
+declare %rest:path("/")
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function site:null() {
+ site:null('en')
+ };
+
+(: HOME PAGE :)
+
+declare %rest:path("{$lang}/home")
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function site:home($lang as xs:string) {
+
+ {
+ site:head(if ($lang = 'ru') then 'ИЭСОЯ В.И. Абаева — Главная'
+ else 'Abaevdict — Main'),
+
+ {site:header($lang,`/{abv-m:invert-lang($lang)}/home`)}
+
+ {home:content($lang)}
+
+
+ }
+
+ };
+
+declare %rest:path("/home")
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function site:home() {
+ site:home('en')
+ };
+
+(: DICTIONARY INTERFACE :)
+
+declare %rest:path("{$lang}/dictionary")
+ %rest:query-param("query", "{$query}")
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function site:dictionary($lang as xs:string, $query as xs:string?) {
+
+ {
+ site:head(if($lang = 'ru') then 'ИЭСОЯ В.И. Абаева — Просмотр'
+ else 'Abaevdict — Browse'),
+
+ {site:header($lang,`/{abv-m:invert-lang($lang)}/dictionary`)}
+ {entries:sidebar($lang)}
+
+
+ {entries:entries($lang,20,$query)}
+
+
+ }
+
+ };
+
+declare %rest:path("dictionary")
+ %rest:query-param("query", "{$query}")
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function site:dictionary($query as xs:string?) {
+ site:dictionary('en', $query)
+ };
+
+(: INDEX INTERFACE :)
+
+declare %rest:path("{$lang}/index")
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function site:index($lang as xs:string) {
+
+ {
+ site:head(if ($lang = 'ru') then 'ИЭСОЯ В.И. Абаева — Указатель'
+ else 'Abaevdict — Index'),
+
+ {site:header($lang,`/{abv-m:invert-lang($lang)}/index`)}
+
+ {index:content($lang)}
+
+
+ }
+
+ };
+
+declare %rest:path("index")
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function site:index() {
+ site:index('en')
+ };
+
+(: SEARCH INTERFACE :)
+
+declare %rest:path("{$lang}/search")
+ %rest:form-param("pattern", "{$pattern}")
+ %rest:form-param("text", "{$text}")
+ %rest:GET
+ %rest:POST
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function site:search($lang as xs:string,
+ $pattern as xs:string?,
+ $text as xs:string?) {
+
+ {
+ site:head(if ($lang = 'ru') then 'ИЭСОЯ В.И. Абаева — Поиск'
+ else 'Abaevdict — Search'),
+
+ {site:header($lang,`/{abv-m:invert-lang($lang)}/search`)}
+
+ {search:content($lang,$pattern,$text)}
+
+
+ }
+
+ };
+
+declare %rest:path("search")
+ %rest:form-param("pattern", "{$pattern}")
+ %rest:form-param("text", "{$text}")
+ %rest:GET
+ %rest:POST
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function site:search($pattern as xs:string?,
+ $text as xs:string?) {
+ site:index('en')
+ };
+
+0
\ No newline at end of file
diff --git a/xq/site/restx_search.xq b/xq/site/restx_search.xq
deleted file mode 100644
index e27f8e5..0000000
--- a/xq/site/restx_search.xq
+++ /dev/null
@@ -1,75 +0,0 @@
-module namespace search = 'http://ossetic-studies.org/ns/abaevdict-site/search';
-
-import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at '../abv-mod.xqm';
-import module namespace entry = 'http://ossetic-studies.org/ns/abaevdict-site/entrypoints' at './restx_entrypoints.xq';
-
-(: =============================================================== :)
-(: ======================= SEARCH ENTRYPOINT ===================== :)
-(: =============================================================== :)
-
-declare %rest:path("/search/{$path=.+}")
- %rest:GET
- function search:search-default($path as xs:string) {
- web:forward(`/en/search/{$path}`)
- };
-
-declare %rest:path("{$lang}/search/new")
- %rest:query-param("searchType", "{$searchType}", 'full')
- %rest:query-param("searchQuery", "{$searchQuery}")
- %output:method("html")
- %output:html-version('5')
- function search:search($lang, $searchType, $searchQuery) {
- let $sd := abv-m:search($lang,$searchType,$searchQuery)
- let $r1 := session:set('searchType', $searchType)
- let $r2 := session:set('searchQuery', $searchQuery)
- let $r3 := session:set('searchN', 1)
- let $r4 := session:set('searchData', $sd)
- return
- if(array:size($sd) > 0) then
- entry:by-id($lang,
- $sd(1)('entry'),
- '')
- else
- web:redirect('../search/clear')
- };
-
-declare %rest:path("{$lang}/search/next")
- %output:method("html")
- %output:html-version('5')
- function search:search-next($lang) {
- let $n as xs:integer := session:get('searchN')+1
- let $r1 := session:set('searchN', $n)
- let $sd := session:get('searchData')
- return entry:by-id($lang, $sd($n)('entry'), ())
- };
-
-declare %rest:path("{$lang}/search/prev")
- %output:method("html")
- %output:html-version('5')
- function search:search-prev($lang) {
- let $n as xs:integer := session:get('searchN')-1
- let $r1 := session:set('searchN', $n)
- let $sd := session:get('searchData')
- return entry:by-id($lang, $sd($n)('entry'), ())
- };
-
-declare %rest:path("{$lang}/search/position")
- %rest:query-param("p", "{$p}")
- %output:method("html")
- %output:html-version('5')
- function search:search-position($lang, $p as xs:integer) {
- let $r1 := session:set('searchN', $p)
- let $sd := session:get('searchData')
- return entry:by-id($lang, $sd($p)('entry'), ())
- };
-
-declare %rest:path("{$lang}/search/clear")
- %output:method("html")
- %output:html-version('5')
- function search:clearSearch($lang) {
- let $r1 := session:delete('searchType')
- let $r2 := session:delete('searchQuery')
- let $r3 := session:delete('searchN')
- let $r4 := session:delete('searchData')
- return web:redirect('../dict')
- };
\ No newline at end of file
diff --git a/xq/site/shared/shared.xq b/xq/site/shared/shared.xq
deleted file mode 100644
index 05efd96..0000000
--- a/xq/site/shared/shared.xq
+++ /dev/null
@@ -1,165 +0,0 @@
-module namespace shared = 'http://ossetic-studies.org/ns/abaevdict-site/shared';
-
-declare namespace tei = "http://www.tei-c.org/ns/1.0";
-import module namespace search = 'http://ossetic-studies.org/ns/abaevdict-site/search-modal' at '../components/search.xq';
-
-(: =========================================================== :)
-(: ================== GLOBAL VARIABLES ======================= :)
-(: =========================================================== :)
-
-(: Number of items per page :)
-declare variable $shared:items-per-page as xs:integer := 20;
-
-(: These variables are declared in module scope because they are needed in
-different places, but they are still dynamically evaluated :)
-declare variable $shared:lookup := doc('abaevdict_index/lookup.xml')/tei:table/tei:entry;
-declare variable $shared:lookup-all := doc('abaevdict_index/lookup.xml')/tei:table/*;
-
-declare variable $shared:total := ceiling(count($shared:lookup) div $shared:items-per-page);
-(: This is still called sorted, because I haven't changed the code.
-But it's now equal to lookup, because the lookup itself is now sorted. :)
-declare variable $shared:sorted := $shared:lookup;
-
-(: =============================================================== :)
-(: ======================= COMMON STUFF ========================== :)
-(: =============================================================== :)
-
-declare function shared:head($title as xs:string, $script as node()* := ()) {
-
-
-
-
-
-
-
-
- {$script}
-
- {$title}
-
-};
-
-(: Navigation header and search dialog :)
-declare function shared:header($lang as xs:string, $href-other as xs:string) {
- (
-
-
-
-
- {
- switch($lang)
- case 'ru' return 'ИЭСОЯ'
- default return `Abaevdict`
- } β
- {
- (element {if ($lang = 'ru') then 'mark' else 'a'}{
- if ($lang != 'ru') then
- (attribute class {'link'},
- attribute data-href {`{$href-other}`}) else (),
- 'ru'
- }, ' / ',
- element {if ($lang = 'ru') then 'a' else 'mark'}{
- if ($lang = 'ru') then
- (attribute class {'link'},
- attribute data-href {`{$href-other}`}) else (),
- 'en'
- })
- }
-
-
-
-
- ,
- search:content($lang)
- )
-};
-
-declare function shared:invert-lang($lang as xs:string) as xs:string {
- if($lang = 'en') then 'ru' else 'en'
-};
\ No newline at end of file
diff --git a/xq/test.xq b/xq/test.xq
index 292c5d3..5c42caa 100644
--- a/xq/test.xq
+++ b/xq/test.xq
@@ -3,10 +3,13 @@ declare namespace abv = "http://ossetic-studies.org/ns/abaevdict";
import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at './abv-mod.xqm';
-let $search := abv-m:search('en','full','friend')
-let $frag := $search(1)('fragment')
-return $frag
-(: return abv-m:mark-element(db:get('abaevdict_en',`xml/{$search(1)('entry')}.xml`), $search(1)('nodes')(1), 'friend') => abv-m:make-html('en') :)
+let $mapdata := abv-m:make-geomap(
+ doc(`abaevdict_en/xml/entry_mad.xml`),
+ 'en')
+return json:serialize($mapdata)
+
+(: collection(`abaevdict_en/html`)/article[@id='entry_az'] :)
+(: html:doc('abaevdict_en/html/entry_az.html') :)
(: let $doc-tr := $doc transform with {
replace node xquery:eval("/Q{http://www.tei-c.org/ns/1.0}entry[1]/Q{http://www.tei-c.org/ns/1.0}etym[1]/Q{http://www.tei-c.org/ns/1.0}mentioned[2]/Q{http://www.tei-c.org/ns/1.0}mentioned[18]", {'': .})
diff --git a/xsl/abaev2html.xsl b/xsl/abaev2html.xsl
index 1649627..e4011b9 100644
--- a/xsl/abaev2html.xsl
+++ b/xsl/abaev2html.xsl
@@ -46,6 +46,21 @@
From 117dead94a6616fa9a39df70823dd9a64938bf63 Mon Sep 17 00:00:00 2001
From: Oleg Belyaev
Date: Sun, 30 Mar 2025 00:03:45 +0300
Subject: [PATCH 2/9] fixed new html gen
---
xq/site/components/entries.xqm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xq/site/components/entries.xqm b/xq/site/components/entries.xqm
index fa83b74..7b33a3f 100644
--- a/xq/site/components/entries.xqm
+++ b/xq/site/components/entries.xqm
@@ -18,7 +18,7 @@ declare %rest:path("{$lang}/entries/{$id}")
if (count($query) = 0) then
doc(`abaevdict_{$lang}/html/{$id}.html`)
else
- let $xml := doc(`abaevdict_{$lang}/xml/{$id}.xml`)
+ let $xml := doc(`abaevdict_{$lang}/xml/{$id}.xml`)/tei:entry[1]
let $marked := ft:mark(
xquery:eval(
`declare namespace tei = "http://www.tei-c.org/ns/1.0";
From e6355812287d6d6ff4c835056c21900fd1f13297 Mon Sep 17 00:00:00 2001
From: Oleg Belyaev
Date: Sun, 30 Mar 2025 00:21:27 +0300
Subject: [PATCH 3/9] fixed online html generation
---
xq/site/restx_main.xq | 2 +-
xsl/abaev2html.xsl | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/xq/site/restx_main.xq b/xq/site/restx_main.xq
index 8298da1..8053f68 100644
--- a/xq/site/restx_main.xq
+++ b/xq/site/restx_main.xq
@@ -244,7 +244,7 @@ declare %rest:path("search")
%output:html-version('5')
function site:search($pattern as xs:string?,
$text as xs:string?) {
- site:index('en')
+ site:search('en',$pattern,$text)
};
0
\ No newline at end of file
diff --git a/xsl/abaev2html.xsl b/xsl/abaev2html.xsl
index e4011b9..dcdaa2e 100644
--- a/xsl/abaev2html.xsl
+++ b/xsl/abaev2html.xsl
@@ -52,6 +52,7 @@
+
-
+
+
From 9109c93e6a3637948a04043d37705265b4bd7b4e Mon Sep 17 00:00:00 2001
From: Oleg Belyaev
Date: Sun, 30 Mar 2025 00:25:25 +0300
Subject: [PATCH 4/9] fixed subentry display
---
xq/site/components/entries.xqm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xq/site/components/entries.xqm b/xq/site/components/entries.xqm
index 7b33a3f..6eb35cf 100644
--- a/xq/site/components/entries.xqm
+++ b/xq/site/components/entries.xqm
@@ -112,13 +112,14 @@ declare %rest:path("{$lang}/entrylist")
{for $e in abv-m:lookups($subentries)
let $txt := $e/text()
+ let $id := if (name($e) = 'entry') then $e/@xml:id else $e/@corresp
return
if ($txt contains text {`{$filter}.*`} using wildcards at start) then
{
if (name($e) = 're') then
attribute class {'abv-menu-re'} else (),
-
+
{$e/text()}
}
From abf143eeab34f8ce0510d00a032f54463bf2f0e3 Mon Sep 17 00:00:00 2001
From: Oleg Belyaev
Date: Sun, 30 Mar 2025 01:25:51 +0300
Subject: [PATCH 5/9] fixed map
---
xq/site/components/map.xqm | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/xq/site/components/map.xqm b/xq/site/components/map.xqm
index 9e7e693..a214f91 100644
--- a/xq/site/components/map.xqm
+++ b/xq/site/components/map.xqm
@@ -58,4 +58,14 @@ declare %rest:path("{$lang}/map")
Plotly.newPlot(map, [mapdata], layout);
")}
)
- };
\ No newline at end of file
+ };
+
+declare %rest:path("map")
+ %rest:query-param("entry", "{$entry}")
+ %rest:GET
+ %rest:produces("text/html")
+ %output:method("html")
+ %output:html-version('5')
+ function map:map($entry as xs:string) {
+ map:map('en', $entry)
+};
\ No newline at end of file
From 377c9d5b8bda2895fca91d22fe62f785fbb020e7 Mon Sep 17 00:00:00 2001
From: Oleg Belyaev
Date: Sun, 30 Mar 2025 13:12:26 +0300
Subject: [PATCH 6/9] sort search resutls
---
xq/site/components/search.xqm | 1 +
1 file changed, 1 insertion(+)
diff --git a/xq/site/components/search.xqm b/xq/site/components/search.xqm
index 3561302..4113210 100644
--- a/xq/site/components/search.xqm
+++ b/xq/site/components/search.xqm
@@ -104,6 +104,7 @@ declare function search:content($lang as xs:string,
declare namespace abv = "http://ossetic-studies.org/ns/abaevdict";
.[{$query}]`, {'': $entries}))
for $hit in $hits
+ order by abv-m:sortKey($hit/tei:form[1]/tei:orth[1]/text())
return
From ac9d112c13ecdc0ac975c05efe5559ca5321bd27 Mon Sep 17 00:00:00 2001
From: Oleg Belyaev
Date: Sun, 30 Mar 2025 16:39:50 +0300
Subject: [PATCH 7/9] hash synchronization when changing lang
---
xq/site/restx_main.xq | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/xq/site/restx_main.xq b/xq/site/restx_main.xq
index 8053f68..39c13e5 100644
--- a/xq/site/restx_main.xq
+++ b/xq/site/restx_main.xq
@@ -46,11 +46,15 @@ declare function site:header($lang as xs:string, $href-other as xs:string) {
} β
{
(element {if ($lang = 'ru') then 'mark' else 'a'}{
+ attribute hx-on-click {"this.href = this.href + window.location.hash;"},
+ attribute class {'abv-lang-link'},
if ($lang != 'ru') then
(attribute href {`{$href-other}`}) else (),
'ru'
}, ' / ',
element {if ($lang = 'ru') then 'a' else 'mark'}{
+ attribute hx-on-click {"this.href = this.href + window.location.hash;"},
+ attribute class {'abv-lang-link'},
if ($lang = 'ru') then
(attribute href {`{$href-other}`}) else (),
'en'
From 0e7fb74acf1cc24669ec05b6cbc4562f539b5732 Mon Sep 17 00:00:00 2001
From: Oleg Belyaev
Date: Sun, 30 Mar 2025 17:42:03 +0300
Subject: [PATCH 8/9] interpret tei:lb as new paragraph
---
xq/site/components/entries.xqm | 3 ++-
xq/test.xq | 5 +----
xsl/abaev2html.xsl | 22 ++++++++++++++--------
3 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/xq/site/components/entries.xqm b/xq/site/components/entries.xqm
index 6eb35cf..548a8b1 100644
--- a/xq/site/components/entries.xqm
+++ b/xq/site/components/entries.xqm
@@ -16,7 +16,8 @@ declare %rest:path("{$lang}/entries/{$id}")
%output:html-version('5')
function entries:entry($lang as xs:string, $id as xs:string, $query as xs:string?) {
if (count($query) = 0) then
- doc(`abaevdict_{$lang}/html/{$id}.html`)
+ (: doc(`abaevdict_{$lang}/html/{$id}.html`) :)
+ abv-m:make-html(doc(`abaevdict_{$lang}/xml/{$id}.xml`),$lang)
else
let $xml := doc(`abaevdict_{$lang}/xml/{$id}.xml`)/tei:entry[1]
let $marked := ft:mark(
diff --git a/xq/test.xq b/xq/test.xq
index 5c42caa..b693648 100644
--- a/xq/test.xq
+++ b/xq/test.xq
@@ -3,10 +3,7 @@ declare namespace abv = "http://ossetic-studies.org/ns/abaevdict";
import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at './abv-mod.xqm';
-let $mapdata := abv-m:make-geomap(
- doc(`abaevdict_en/xml/entry_mad.xml`),
- 'en')
-return json:serialize($mapdata)
+abv-m:make-html(doc('abaevdict_en/xml/entry_a.xml'),'en')
(: collection(`abaevdict_en/html`)/article[@id='entry_az'] :)
(: html:doc('abaevdict_en/html/entry_az.html') :)
diff --git a/xsl/abaev2html.xsl b/xsl/abaev2html.xsl
index dcdaa2e..7600140 100644
--- a/xsl/abaev2html.xsl
+++ b/xsl/abaev2html.xsl
@@ -87,12 +87,21 @@
group-adjacent="not(self::tei:etym)">
-
-
-
+
-
+
@@ -260,9 +269,7 @@
-
-
-
+
@@ -284,7 +291,6 @@
-
From 9151b9eb32565872200dc689aa171ceb44b80ce9 Mon Sep 17 00:00:00 2001
From: Oleg Belyaev
Date: Sun, 30 Mar 2025 20:01:15 +0300
Subject: [PATCH 9/9] handle footnotes correctly, hide internal notes
---
static/abaev-html.css | 34 ++++++++++++++++++++++++++++------
xq/site/components/entries.xqm | 4 ++--
xq/test.xq | 5 ++++-
xsl/abaev2html.xsl | 28 +++++++++++++++++++++++++---
4 files changed, 59 insertions(+), 12 deletions(-)
diff --git a/static/abaev-html.css b/static/abaev-html.css
index cf94188..66915f0 100644
--- a/static/abaev-html.css
+++ b/static/abaev-html.css
@@ -68,6 +68,10 @@ body > header {
body>main {
max-width:950px
}
+ article.abv-entry {
+ display: grid;
+ grid-template-columns: minmax(10%,15%) minmax(0,5%) minmax(75%,90%);
+ }
}
@media (min-width:1280px) {
body>footer>nav,
@@ -131,11 +135,6 @@ main {
padding-top: 0 !important;
}
-article.abv-entry {
- display: grid;
- grid-template-columns: minmax(0px,15%) 5% minmax(50%,80%);
-}
-
section {}
aside#leftbar {
@@ -404,6 +403,10 @@ div.index-submit {
float: right;
}
+div.notes {
+ font-size: smaller;
+}
+
optgroup {}
option {}
option:checked {}
@@ -422,7 +425,6 @@ button#open-leftbar{
left: 0;
/*height: 1ex;*/
/*line-height: 1ex;*/
- /*width: 1em;*/
}
button#close-leftbar{
@@ -432,6 +434,23 @@ button#close-leftbar{
display: none;
}
+@media (max-width: 1024px) {
+ button#open-leftbar {
+ width: 1em;
+ height: 10ex;
+ margin: 0 auto;
+ padding-left: 0;
+ padding-right: 0;
+ }
+ button#close-leftbar {
+ width: 1em;
+ height: 10ex;
+ margin: 0 auto;
+ padding-left: 0;
+ padding-right: 0;
+ }
+}
+
/* This matches forms or form elements that are invalid *and* have been
interacted with. Note that:
1) You may need to add the `interacted` class to forms yourself
@@ -521,6 +540,9 @@ span.abv-text-ul {
span.abv-text-sc {
font-variant-caps: small-caps;
}
+span.abv-name {
+ font-variant-caps: small-caps;
+}
/*
This file evolved from Natural Selection:
diff --git a/xq/site/components/entries.xqm b/xq/site/components/entries.xqm
index 548a8b1..4bb1c0f 100644
--- a/xq/site/components/entries.xqm
+++ b/xq/site/components/entries.xqm
@@ -16,8 +16,8 @@ declare %rest:path("{$lang}/entries/{$id}")
%output:html-version('5')
function entries:entry($lang as xs:string, $id as xs:string, $query as xs:string?) {
if (count($query) = 0) then
- (: doc(`abaevdict_{$lang}/html/{$id}.html`) :)
- abv-m:make-html(doc(`abaevdict_{$lang}/xml/{$id}.xml`),$lang)
+ doc(`abaevdict_{$lang}/html/{$id}.html`)
+ (: abv-m:make-html(doc(`abaevdict_{$lang}/xml/{$id}.xml`),$lang) :)
else
let $xml := doc(`abaevdict_{$lang}/xml/{$id}.xml`)/tei:entry[1]
let $marked := ft:mark(
diff --git a/xq/test.xq b/xq/test.xq
index b693648..d3ae13b 100644
--- a/xq/test.xq
+++ b/xq/test.xq
@@ -3,7 +3,10 @@ declare namespace abv = "http://ossetic-studies.org/ns/abaevdict";
import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at './abv-mod.xqm';
-abv-m:make-html(doc('abaevdict_en/xml/entry_a.xml'),'en')
+abv-m:make-html(doc('abaevdict_en/xml/entry_abūzyn.xml'),'en')
+
+(: for $node in collection('abaevdict')//tei:ref/@target[.='#ref_Walde—Pok.']
+return replace value of node $node with '#ref_Walde-Pok.' :)
(: collection(`abaevdict_en/html`)/article[@id='entry_az'] :)
(: html:doc('abaevdict_en/html/entry_az.html') :)
diff --git a/xsl/abaev2html.xsl b/xsl/abaev2html.xsl
index 7600140..37d244a 100644
--- a/xsl/abaev2html.xsl
+++ b/xsl/abaev2html.xsl
@@ -102,6 +102,9 @@
+
+
+
@@ -131,7 +134,7 @@
- i
+ i
b
@@ -335,8 +338,27 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file