From a8646d51062a45c2ca15b1c7c91814df3f0c6c66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-David=20Collin?= Date: Mon, 21 Jul 2025 16:29:00 +0200 Subject: [PATCH 01/13] made the link on the news page to the actual publication item --- _quarto.yml | 1 + custom.scss | 32 ++++++++++++++++++++++++++++++++ index.qmd | 12 ++++-------- site/news.ejs | 20 ++++++++++++++++++++ site/publications.ejs | 27 +++++++++++++++++++++++++-- 5 files changed, 82 insertions(+), 10 deletions(-) create mode 100644 site/news.ejs diff --git a/_quarto.yml b/_quarto.yml index 76296f3..ad61948 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -48,6 +48,7 @@ website: href: site/various/privacy.qmd - text: Terms of Use href: site/various/terms.qmd + center: "" format: html: theme: diff --git a/custom.scss b/custom.scss index 61b877f..8bc0214 100644 --- a/custom.scss +++ b/custom.scss @@ -118,3 +118,35 @@ div.quarto-post { p { text-align: justify; } + +// Ensure anchor scrolling works inside grid/flex containers +.publication-anchor, a[id] { + scroll-margin-top: 80px; // Adjust to your header height +} + +@media (max-width: 600px) { + a[id], .publication-anchor { + scroll-margin-top: 120px; // or more, adjust to your mobile header height + } +} + +.nav-footer-center { + height: 0px; + max-height: 0px; + overflow: hidden; + display: flex; + justify-content: center; +} + +.nav-footer-left { + display: inline-block; + margin: 0 10px; + font-size: 0.9em; +} + +@media screen and (max-width: 768px) { + .nav-footer-center { + display: none; // Hide left footer on small screens + } + +} \ No newline at end of file diff --git a/index.qmd b/index.qmd index c1bc175..db56f8d 100644 --- a/index.qmd +++ b/index.qmd @@ -3,14 +3,10 @@ description:

COMPUTO

A journal of the F Statistical Society SFdS - ISSN 2824-7795 listing: - contents: news.yml - sort: date desc - page-size: 5 - fields: - - date - - description - feed: - items: 5 + - id: published + template: site/news.ejs + contents: site/published.yml + sort: date desc --- :::: {layout="[30,70]" style="display: flex; margin-bottom: 3em;"} diff --git a/site/news.ejs b/site/news.ejs new file mode 100644 index 0000000..8322b1c --- /dev/null +++ b/site/news.ejs @@ -0,0 +1,20 @@ +```{=html} +<% +// Only show articles from this year (2025) and not drafts +const currentYear = new Date().getFullYear(); +for (const item of items) { + if (!item.draft && item.year == currentYear) { %> + + <%= item.date %> — + <%= item.title %> + <% if (item.authors) { %> + by <%= item.authors %> + <% } %> + + +<% } +} %> +``` + diff --git a/site/publications.ejs b/site/publications.ejs index 8e167f4..a5b2851 100644 --- a/site/publications.ejs +++ b/site/publications.ejs @@ -15,13 +15,14 @@ for (const item of items) {
<% currentYear = item.year; } %> +
-
+
@@ -137,5 +138,27 @@ for (const item of items) { // Show a temporary alert alert('BibTeX citation copied to clipboard!'); } + + document.addEventListener("DOMContentLoaded", function() { + if (window.location.hash) { + var el = document.getElementById(window.location.hash.substring(1)); + if (el) { + el.scrollIntoView({ behavior: "auto", block: "center" }); + } + } + }); +document.addEventListener("DOMContentLoaded", function() { + function scrollToAnchor() { + if (window.location.hash) { + var el = document.getElementById(window.location.hash.substring(1)); + if (el) { + el.scrollIntoView({ behavior: "auto", block: "center" }); + } + } + } + // Try immediately, then again after a short delay (for mobile/layout shifts) + scrollToAnchor(); + setTimeout(scrollToAnchor, 400); +}); ``` \ No newline at end of file From 6bd276510643e5587ec78cc788917723d84659ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-David=20Collin?= Date: Tue, 22 Jul 2025 11:32:27 +0200 Subject: [PATCH 02/13] cosmetics + force doi in getcomputo-pub.fsx, fix badge alignment in publications.ejs --- getcomputo-pub.fsx | 1 + site/mock-papers.yml | 2 ++ site/publications.ejs | 39 ++++++++++++++++++++------------------- site/published.yml | 17 +++++++++++++++++ 4 files changed, 40 insertions(+), 19 deletions(-) diff --git a/getcomputo-pub.fsx b/getcomputo-pub.fsx index 4e9fb93..dce48c1 100644 --- a/getcomputo-pub.fsx +++ b/getcomputo-pub.fsx @@ -153,6 +153,7 @@ let extractCitation (d: Dictionary) = {| title = d |> getSomeString "title" authors = d |> getAuthors journal = d |> getAnotherThing "citation" |> getSomeString "container-title" + doi = d |> getAnotherThing "citation" |> getSomeString "doi" year = dateTime.Year date = dateTime.ToString("yyyy-MM-dd") description = d |> getSomeString "description" diff --git a/site/mock-papers.yml b/site/mock-papers.yml index ccd4b2a..c2c2964 100644 --- a/site/mock-papers.yml +++ b/site/mock-papers.yml @@ -23,6 +23,7 @@ date: 2008-08-11 description: > This page is a reworking of the original t-SNE article using the Computo template. It aims to help authors submitting to the journal by using some advanced formatting features. We warmly thank the authors of t-SNE and the editor of JMLR for allowing us to use their work to illustrate the Computo spirit. + doi: '' draft: false journal: Computo pdf: '' @@ -55,6 +56,7 @@ date: 2008-08-11 description: > This page is a reworking of the original t-SNE article using the Computo template. It aims to help authors submitting to the journal by using some advanced formatting features. We warmly thank the authors of t-SNE and the editor of JMLR for allowing us to use their work to illustrate the Computo spirit. + doi: '' draft: false journal: Computo pdf: '' diff --git a/site/publications.ejs b/site/publications.ejs index a5b2851..861d356 100644 --- a/site/publications.ejs +++ b/site/publications.ejs @@ -7,6 +7,7 @@ // Group items by year let currentYear = null; for (const item of items) { + let doiurl = item.url === "" ? "https://doi.org/" + item.doi : item.url; if (item.year !== currentYear) { if (currentYear !== null) { %>
@@ -16,33 +17,33 @@ for (const item of items) { <% currentYear = item.year; } %> -
-
-
-
-
- - Build Status +
+
+
+
+ -
-
- <%= item.title %> +
+
+ <%= item.title %>
<% if (item.authors) { %> -

<%= item.authors %>

+

<%= item.authors %>

<% } %> -

Computo, <%= item.year %>.

-
- <% if (item["abstract'"] && item["abstract'"].trim()) { %> - +

Computo, <%= item.year %>.

+
+ <% if (item["abstract'" ] && item["abstract'"].trim()) { %> + <% } %> - HTML + HTML <% if (item.pdf && item.pdf.trim()) { %> - PDF + PDF <% } %> - GIT REPO - + GIT REPO +
diff --git a/site/published.yml b/site/published.yml index 69796c9..a7b108f 100644 --- a/site/published.yml +++ b/site/published.yml @@ -10,6 +10,7 @@ authors: Julien Jacques and Thomas Brendan Murphy date: 2025-07-01 description: '' + doi: 10.57750/6v7b-8483 draft: false journal: Computo pdf: '' @@ -41,6 +42,7 @@ authors: Thomas Ferté, Kalidou Ba, Dan Dutartre, Pierrick Legrand, Vianney Jouhet, Rodolphe Thiébaut, Xavier Hinaut and Boris P Hejblum date: 2025-06-27 description: '' + doi: 10.57750/arxn-6z34 draft: false journal: Computo pdf: '' @@ -68,6 +70,7 @@ date: 2025-01-27 description: > This document provides a full description of the Stochastic Individual-Based Models (IBMs) that can be implemented in the IBMPopSim package. A unified mathematical and simulation framework is given, with a detailed description of the simulation algorithm. Examples of applications for the package are also provided, showing the performance and flexibility of IBMPopSim. + doi: 10.57750/sfxn-1t05 draft: false journal: Computo pdf: '' @@ -96,6 +99,7 @@ authors: Félix Laplante and Christophe Ambroise date: 2024-12-13 description: Scalable Spectral Clustering Based on Vector Quantization + doi: 10.57750/1gr8-bk61 draft: false journal: Computo pdf: '' @@ -124,6 +128,7 @@ authors: Herbert Susmann, Antoine Chambaz and Julie Josse date: 2024-07-18 description: '' + doi: 10.57750/edan-5f53 draft: false journal: Computo pdf: '' @@ -164,6 +169,7 @@ authors: Juliette Legrand, François Pimont, Jean-Luc Dupuy and Thomas Opitz date: 2024-07-12 description: '' + doi: 10.57750/4y84-4t68 draft: false journal: Computo pdf: '' @@ -195,6 +201,7 @@ authors: Liudmila Pishchagina, Guillem Rigaill and Vincent Runge date: 2024-07-12 description: '' + doi: 10.57750/9vvx-eq57 draft: false journal: Computo pdf: '' @@ -223,6 +230,7 @@ Sources of error can arise from the workers' skills, but also from the intrinsic difficulty of the task. We introduce `peerannot`, a Python library for managing and learning from crowdsourced labels of image classification tasks. + doi: 10.57750/qmaz-gr91 draft: false journal: Computo pdf: '' @@ -250,6 +258,7 @@ date: 2024-03-11 description: > This document provides a dimension-reduction strategy in order to improve the performance of importance sampling in high dimensions. + doi: 10.57750/jjza-6j82 draft: false journal: Computo pdf: https://computo.sfds.asso.fr/published-202402-elmasri-optimal/published-202312-elmasri-optimal.pdf @@ -268,6 +277,7 @@ authors: Hamza Adrat and Laurent Decreusefond date: 2024-01-25 description: '' + doi: 10.57750/3r07-aw28 draft: false journal: Computo pdf: '' @@ -321,6 +331,7 @@ authors: Armand Favrot and David Makowski date: 2024-01-09 description: '' + doi: 10.57750/6cgk-g727 draft: false journal: Computo pdf: '' @@ -355,6 +366,7 @@ authors: Alice Cleynen, Louis Raynal and Jean-Michel Marin date: 2023-12-14 description: '' + doi: 10.57750/3j8m-8d57 draft: false journal: Computo pdf: '' @@ -386,6 +398,7 @@ authors: Maud Delattre and Estelle Kuhn date: 2023-11-21 description: '' + doi: 10.57750/r5gx-jk62 draft: false journal: Computo pdf: https://computo.sfds.asso.fr/published-202311-delattre-fim/published-202311-delattre-fim.pdf @@ -419,6 +432,7 @@ authors: Edmond Sanou, Christophe Ambroise and Geneviève Robin date: 2023-06-28 description: '' + doi: 10.57750/1f4p-7955 draft: false journal: Computo pdf: https://computo.sfds.asso.fr/published-202306-sanou-multiscale_glasso/published-202306-sanou-multiscale_glasso.pdf @@ -449,6 +463,7 @@ authors: Mathis Chagneux, Sylvain Le Corff, Pierre Gloaguen, Charles Ollion, Océane Lepâtre and Antoine Bruge date: 2023-02-16 description: '' + doi: 10.57750/845m-f805 draft: false journal: Computo pdf: https://computo.sfds.asso.fr/published-202301-chagneux-macrolitter/published-202301-chagneux-macrolitter.pdf @@ -473,6 +488,7 @@ date: 2023-01-12 description: > The package $\textsf{clayton}$ is designed to be intuitive, user-friendly, and efficient. It offers a wide range of copula models, including Archimedean, Elliptical, and Extreme. The package is implemented in pure $\textsf{Python}$, making it easy to install and use. + doi: 10.57750/4szh-t752 draft: false journal: Computo pdf: https://computo.sfds.asso.fr/published-202301-boulin-clayton/published-202301-boulin-clayton.pdf @@ -509,6 +525,7 @@ authors: Olivier Gimenez, Maëlis Kervellec, Jean-Baptiste Fanjul, Anna Chaine, Lucile Marescot, Yoann Bollet and Christophe Duchamp date: 2022-04-22 description: '' + doi: 10.57750/yfm2-5f45 draft: false journal: Computo pdf: '' From 49c226749a32f1e1f30a79edeb836358f3665eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-David=20Collin?= Date: Tue, 22 Jul 2025 12:01:25 +0200 Subject: [PATCH 03/13] updated publications metadata to include DOI --- site/published.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/site/published.yml b/site/published.yml index a7b108f..fae667b 100644 --- a/site/published.yml +++ b/site/published.yml @@ -105,7 +105,7 @@ pdf: '' repo: published-202412-ambroise-spectral title: Spectral Bridges - url: https://computo.sfds.asso.fr/published-202412-ambroise-spectral/ + url: '' year: 2024 - abstract': >- Conformal Inference (CI) is a popular approach for @@ -261,10 +261,10 @@ doi: 10.57750/jjza-6j82 draft: false journal: Computo - pdf: https://computo.sfds.asso.fr/published-202402-elmasri-optimal/published-202312-elmasri-optimal.pdf + pdf: '' repo: published-202402-elmasri-optimal title: Optimal projection for parametric importance sampling in high dimensions - url: https://computo.sfds.asso.fr/published-202402-elmasri-optimal/ + url: '' year: 2024 - abstract': >- In numerous applications, cloud of points do seem to @@ -283,7 +283,7 @@ pdf: '' repo: published-202401-adrat-repulsion title: Point Process Discrimination According to Repulsion - url: https://computo.sfds.asso.fr/published_202401_adrat_repulsion/ + url: '' year: 2024 - abstract': >- In plant epidemiology, pest abundance is measured in field @@ -401,10 +401,10 @@ doi: 10.57750/r5gx-jk62 draft: false journal: Computo - pdf: https://computo.sfds.asso.fr/published-202311-delattre-fim/published-202311-delattre-fim.pdf + pdf: '' repo: published-202311-delattre-fim title: Computing an empirical Fisher information matrix estimate in latent variable models through stochastic approximation - url: https://computo.sfds.asso.fr/published-202311-delattre-fim/ + url: '' year: 2023 - abstract': >- Gaussian Graphical Models (GGMs) are widely used in @@ -435,10 +435,10 @@ doi: 10.57750/1f4p-7955 draft: false journal: Computo - pdf: https://computo.sfds.asso.fr/published-202306-sanou-multiscale_glasso/published-202306-sanou-multiscale_glasso.pdf + pdf: '' repo: published-202306-sanou-multiscale_glasso title: Inference of Multiscale Gaussian Graphical Models - url: https://computo.sfds.asso.fr/published-202306-sanou-multiscale_glasso/ + url: '' year: 2023 - abstract': >- Litter is a known cause of degradation in marine @@ -466,10 +466,10 @@ doi: 10.57750/845m-f805 draft: false journal: Computo - pdf: https://computo.sfds.asso.fr/published-202301-chagneux-macrolitter/published-202301-chagneux-macrolitter.pdf + pdf: '' repo: published-202301-chagneux-macrolitter title: 'Macrolitter video counting on riverbanks using state space models and moving cameras ' - url: https://computo.sfds.asso.fr/published-202301-chagneux-macrolitter/ + url: '' year: 2023 - abstract': >- The package \$\textbackslash textsf\{clayton\}\$ is @@ -491,10 +491,10 @@ doi: 10.57750/4szh-t752 draft: false journal: Computo - pdf: https://computo.sfds.asso.fr/published-202301-boulin-clayton/published-202301-boulin-clayton.pdf + pdf: '' repo: published-202301-boulin-clayton title: 'A Python Package for Sampling from Copulae: clayton' - url: https://computo.sfds.asso.fr/published-202301-boulin-clayton/ + url: '' year: 2023 - abstract': >- Deep learning is used in computer vision problems with From 6f0782575ec14f8f557bdd5ec017869382ac6eb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-David=20Collin?= Date: Wed, 23 Jul 2025 11:12:03 +0200 Subject: [PATCH 04/13] Enhance publication display: update DOI handling, improve layout, and add source links --- site/publications.ejs | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/site/publications.ejs b/site/publications.ejs index 861d356..fa6f221 100644 --- a/site/publications.ejs +++ b/site/publications.ejs @@ -8,6 +8,8 @@ let currentYear = null; for (const item of items) { let doiurl = item.url === "" ? "https://doi.org/" + item.doi : item.url; + let bibtitle = item.title.replace(/'/g, "\\'"); + let bibauthors = item.authors.replace(/'/g, "\\'"); if (item.year !== currentYear) { if (currentYear !== null) { %>
@@ -23,27 +25,34 @@ for (const item of items) {
-
+ +
+ <%= item.title %>
<% if (item.authors) { %>

<%= item.authors %>

<% } %> -

Computo, <%= item.year %>.

+
+ Computo, <%= item.year %>. + <%= doiurl %> +
- <% if (item["abstract'" ] && item["abstract'"].trim()) { %> + Preview + + + + Sources (Git) +
From 64510bb72817820d0aa7d752ceb792a24e6e0cac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-David=20Collin?= Date: Thu, 24 Jul 2025 10:54:08 +0200 Subject: [PATCH 05/13] Refactor BibTeX handling and update mock papers - Renamed `getAbstract` to `getBibTeX` for clarity and updated its implementation to return the BibTeX entry. - Introduced a new function `getAbstract` to extract the abstract from a BibTeX entry. - Added `getBibTeXFromDict` to retrieve BibTeX from a dictionary containing repository objects. - Updated `getAbstractFromDict` to utilize the new BibTeX handling functions. - Enhanced the `publications.ejs` template to generate BibTeX entries directly from the item data. --- getcomputo-pub.fsx | 22 +- site/mock-papers.yml | 70 +++++- site/publications.ejs | 17 +- site/published.yml | 545 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 634 insertions(+), 20 deletions(-) diff --git a/getcomputo-pub.fsx b/getcomputo-pub.fsx index dce48c1..237fd21 100644 --- a/getcomputo-pub.fsx +++ b/getcomputo-pub.fsx @@ -76,7 +76,7 @@ type RepoError = let redirectStringRe = Regex(@"URL='(.*)'") -let getAbstract (page: string) = +let getBibTeX (page: string) = let htmlFirst = HtmlDocument.Load(page) @@ -100,16 +100,29 @@ let getAbstract (page: string) = try html.CssSelect(".bibtex").Head.InnerText() |> DirtyParser.bibTeXFromString - |> _.Head.Properties["abstract"] + |> _.Head |> Result.Ok with e -> - printfn "Error getting abstract from %s: %s" page e.Message + printfn "Error getting BibTeX from %s: %s" page e.Message Result.Error e.Message +let getAbstract (entry: BibTeXEntry) = entry.Properties["abstract"] + +let getBibTeXFromDict (d: Dictionary) = + d["repoObj"] :?> Repository + |> _.Homepage + |> getBibTeX + |> function + | Ok a -> DrBiber.DirtyParser.bibTeXToString [ a ] + | Error e -> + printfn "Error getting BibTeX from %s: %s" (d["repoObj"] :?> Repository).Name e + "" + let getAbstractFromDict (d: Dictionary) = d["repoObj"] :?> Repository |> _.Homepage - |> getAbstract + |> getBibTeX + |> Result.map (fun bibTeX -> getAbstract bibTeX) |> function | Ok a -> a | Error e -> @@ -159,6 +172,7 @@ let extractCitation (d: Dictionary) = description = d |> getSomeString "description" abstract' = d |> getAbstractFromDict repo = d |> getSomeString "repo" + bibtex = d |> getBibTeXFromDict pdf = d |> getAnotherThing "citation" |> getSomeString "pdf-url" url = d |> getAnotherThing "citation" |> getSomeString "url" draft = d |> getSomeString "draft" |} diff --git a/site/mock-papers.yml b/site/mock-papers.yml index c2c2964..c9915cd 100644 --- a/site/mock-papers.yml +++ b/site/mock-papers.yml @@ -20,6 +20,39 @@ t-SNE are significantly better than those produced by other techniques on almost all of the data sets. authors: Laurens van der Maaten and Geoffrey Hinton + bibtex: >+ + @article{van_der_maaten2008, + author = {van der Maaten, Laurens and Hinton, Geoffrey}, + publisher = {Société Française de Statistique}, + title = {Visualizing {Data} Using {t-SNE:} A Practical Computo Example + (Mock)}, + journal = {Computo}, + date = {2008-08-11}, + url = {https://computo.sfds.asso.fr/published-paper-tsne}, + issn = {2824-7795}, + langid = {en}, + abstract = {We present a new technique called “t-SNE” that visualizes + high-dimensional data by giving each datapoint a location in a two + or three-dimensional map. The technique is a variation of Stochastic + Neighbor Embedding {[}@hinton:stochastic{]} that is much easier to + optimize, and produces significantly better visualizations by + reducing the tendency to crowd points together in the center of the + map. t-SNE is better than existing techniques at creating a single + map that reveals structure at many different scales. This is + particularly important for high-dimensional data that lie on several + different, but related, low-dimensional manifolds, such as images of + objects from multiple classes seen from multiple viewpoints. For + visualizing the structure of very large data sets, we show how t-SNE + can use random walks on neighborhood graphs to allow the implicit + structure of all the data to influence the way in which a subset of + the data is displayed. We illustrate the performance of t-SNE on a + wide variety of data sets and compare it with many other + non-parametric visualization techniques, including Sammon mapping, + Isomap, and Locally Linear Embedding. The visualization produced by + t-SNE are significantly better than those produced by other + techniques on almost all of the data sets.} + } + date: 2008-08-11 description: > This page is a reworking of the original t-SNE article using the Computo template. It aims to help authors submitting to the journal by using some advanced formatting features. We warmly thank the authors of t-SNE and the editor of JMLR for allowing us to use their work to illustrate the Computo spirit. @@ -29,7 +62,7 @@ pdf: '' repo: published-paper-tsne title: Visualizing Data using t-SNE (mock contributon) - url: https://computo.sfds.asso.fr/published-paper-tsne + url: https://computo-journal.org/published-paper-tsne year: 2008 - abstract': >- We present a new technique called “t-SNE” that visualizes @@ -53,6 +86,39 @@ t-SNE are significantly better than those produced by other techniques on almost all of the data sets. authors: Laurens van der Maaten and Geoffrey Hinton + bibtex: >+ + @article{van_der_maaten2008, + author = {van der Maaten, Laurens and Hinton, Geoffrey}, + publisher = {French Statistical Society}, + title = {Visualizing {Data} Using {t-SNE:} A Practical {Computo} + Example (Mock)}, + journal = {Computo}, + date = {2008-08-11}, + url = {https://computo-journal.org/published-paper-tsne-R}, + issn = {2824-7795}, + langid = {en}, + abstract = {We present a new technique called “t-SNE” that visualizes + high-dimensional data by giving each datapoint a location in a two + or three-dimensional map. The technique is a variation of Stochastic + Neighbor Embeddi{[}@hinton:stochastic{]} that is much easier to + optimize, and produces significantly better visualizations by + reducing the tendency to crowd points together in the center of the + map. t-SNE is better than existing techniques at creating a single + map that reveals structure at many different scales. This is + particularly important for high-dimensional data that lie on several + different, but related, low-dimensional manifolds, such as images of + objects from multiple classes seen from multiple viewpoints. For + visualizing the structure of very large data sets, we show how t-SNE + can use random walks on neighborhood graphs to allow the implicit + structure of all the data to influence the way in which a subset of + the data is displayed. We illustrate the performance of t-SNE on a + wide variety of data sets and compare it with many other + non-parametric visualization techniques, including Sammon mapping, + Isomap, and Locally Linear Embedding. The visualization produced by + t-SNE are significantly better than those produced by other + techniques on almost all of the data sets.} + } + date: 2008-08-11 description: > This page is a reworking of the original t-SNE article using the Computo template. It aims to help authors submitting to the journal by using some advanced formatting features. We warmly thank the authors of t-SNE and the editor of JMLR for allowing us to use their work to illustrate the Computo spirit. @@ -62,5 +128,5 @@ pdf: '' repo: published-paper-tsne-R title: Visualizing Data using t-SNE (mock contributon) - url: https://computo.sfds.asso.fr/published-paper-tsne-R + url: https://computo-journal.org/published-paper-tsne-R year: 2008 diff --git a/site/publications.ejs b/site/publications.ejs index b08574a..a884dba 100644 --- a/site/publications.ejs +++ b/site/publications.ejs @@ -10,6 +10,7 @@ for (const item of items) { let doiurl = item.url === "" ? "https://doi.org/" + item.doi : item.url; let bibtitle = item.title.replace(/'/g, "\\'"); let bibauthors = item.authors.replace(/'/g, "\\'"); + let bibtex = item.bibtex.replace(/'/g, "\\'").replace(/\"/g, '"').replace(/\r?\n/g, "\\n"); if (item.year !== currentYear) { if (currentYear !== null) { %>
@@ -52,7 +53,7 @@ for (const item of items) { PDF <% } %> --> Sources (Git) - +
@@ -124,19 +125,7 @@ for (const item of items) { $('#abstractContent').text(abstract); }); - function generateBibTex(title, authors, year, url) { - // Generate a simple BibTeX key from the first author's last name and year - var firstAuthor = authors.split(' and ')[0].split(' ').pop().toLowerCase(); - var bibKey = firstAuthor + year; - - var bibTeX = '@article{' + bibKey + ',\n' + - ' title={' + title + '},\n' + - ' author={' + authors + '},\n' + - ' journal={Computo},\n' + - ' year={' + year + '},\n' + - ' url={' + url + '}\n' + - '}'; - + function generateBibTex(bibTeX) { // Create a temporary textarea to copy the BibTeX to clipboard var textArea = document.createElement('textarea'); textArea.value = bibTeX; diff --git a/site/published.yml b/site/published.yml index fae667b..c2d8746 100644 --- a/site/published.yml +++ b/site/published.yml @@ -8,6 +8,27 @@ data and data from an ultra running race, where the method yields excellent clustering and variable selection performance. authors: Julien Jacques and Thomas Brendan Murphy + bibtex: >+ + @article{jacques2025, + author = {Jacques, Julien and Brendan Murphy, Thomas}, + publisher = {French Statistical Society}, + title = {Model-Based {Clustering} and {Variable} {Selection} for + {Multivariate} {Count} {Data}}, + journal = {Computo}, + date = {2025-07-01}, + doi = {10.57750/6v7b-8483}, + issn = {2824-7795}, + langid = {en}, + abstract = {Model-based clustering provides a principled way of + developing clustering methods. We develop a new model-based + clustering methods for count data. The method combines clustering + and variable selection for improved clustering. The method is based + on conditionally independent Poisson mixture models and Poisson + generalized linear models. The method is demonstrated on simulated + data and data from an ultra running race, where the method yields + excellent clustering and variable selection performance.} + } + date: 2025-07-01 description: '' doi: 10.57750/6v7b-8483 @@ -40,6 +61,41 @@ hospitalizations at Bordeaux University Hospital using public data and electronic health records. authors: Thomas Ferté, Kalidou Ba, Dan Dutartre, Pierrick Legrand, Vianney Jouhet, Rodolphe Thiébaut, Xavier Hinaut and Boris P Hejblum + bibtex: >+ + @article{ferté2025, + author = {Ferté, Thomas and Ba, Kalidou and Dutartre, Dan and Legrand, + Pierrick and Jouhet, Vianney and Thiébaut, Rodolphe and Hinaut, + Xavier and P Hejblum, Boris}, + publisher = {French Statistical Society}, + title = {Reservoir {Computing} in {R:} A {Tutorial} for {Using} + Reservoirnet to {Predict} {Complex} {Time-Series}}, + journal = {Computo}, + date = {2025-06-27}, + doi = {10.57750/arxn-6z34}, + issn = {2824-7795}, + langid = {en}, + abstract = {Reservoir Computing (RC) is a machine learning method + based on neural networks that efficiently process information + generated by dynamical systems. It has been successful in solving + various tasks including time series forecasting, language processing + or voice processing. RC is implemented in `Python` and `Julia` but + not in `R`. This article introduces `reservoirnet`, an `R` package + providing access to the `Python` API `ReservoirPy`, allowing `R` + users to harness the power of reservoir computing. This article + provides an introduction to the fundamentals of RC and showcases its + real-world applicability through three distinct sections. First, we + cover the foundational concepts of RC, setting the stage for + understanding its capabilities. Next, we delve into the practical + usage of `reservoirnet` through two illustrative examples. These + examples demonstrate how it can be applied to real-world problems, + specifically, regression of COVID-19 hospitalizations and + classification of Japanese vowels. Finally, we present a + comprehensive analysis of a real-world application of + `reservoirnet`, where it was used to forecast COVID-19 + hospitalizations at Bordeaux University Hospital using public data + and electronic health records.} + } + date: 2025-06-27 description: '' doi: 10.57750/arxn-6z34 @@ -67,6 +123,33 @@ efficient algorithms based on thinning methods, which are compiled using the `Rcpp` package while providing a user-friendly interface. authors: Daphné Giorgi, Sarah Kaakai and Vincent Lemaire + bibtex: >+ + @article{giorgi2025, + author = {Giorgi, Daphné and Kaakai, Sarah and Lemaire, Vincent}, + publisher = {French Statistical Society}, + title = {Efficient Simulation of Individual-Based Population Models}, + journal = {Computo}, + date = {2025-01-27}, + doi = {10.57750/sfxn-1t05}, + issn = {2824-7795}, + langid = {en}, + abstract = {The `R` Package `IBMPopSim` facilitates the simulation of + the random evolution of heterogeneous populations using stochastic + Individual-Based Models (IBMs). The package enables users to + simulate population evolution, in which individuals are + characterized by their age and some characteristics, and the + population is modified by different types of events, including + births/arrivals, death/exit events, or changes of characteristics. + The frequency at which an event can occur to an individual can + depend on their age and characteristics, but also on the + characteristics of other individuals (interactions). Such models + have a wide range of applications in fields including actuarial + science, biology, ecology or epidemiology. `IBMPopSim` overcomes the + limitations of time-consuming IBMs simulations by implementing new + efficient algorithms based on thinning methods, which are compiled + using the `Rcpp` package while providing a user-friendly interface.} + } + date: 2025-01-27 description: > This document provides a full description of the Stochastic Individual-Based Models (IBMs) that can be implemented in the IBMPopSim package. A unified mathematical and simulation framework is given, with a detailed description of the simulation algorithm. Examples of applications for the package are also provided, showing the performance and flexibility of IBMPopSim. @@ -97,6 +180,35 @@ \textless https://github.com/cambroise/spectral-bridges-Rpackage\textgreater). authors: Félix Laplante and Christophe Ambroise + bibtex: >+ + @article{laplante2024, + author = {Laplante, Félix and Ambroise, Christophe}, + publisher = {French Statistical Society}, + title = {Spectral {Bridges}}, + journal = {Computo}, + date = {2024-12-13}, + doi = {10.57750/1gr8-bk61}, + issn = {2824-7795}, + langid = {en}, + abstract = {In this paper, Spectral Bridges, a novel clustering + algorithm, is introduced. This algorithm builds upon the traditional + k-means and spectral clustering frameworks by subdividing data into + small Voronoï regions, which are subsequently merged according to a + connectivity measure. Drawing inspiration from Support Vector + Machine’s margin concept, a non-parametric clustering approach is + proposed, building an affinity margin between each pair of Voronoï + regions. This approach delineates intricate, non-convex cluster + structures and is robust to hyperparameter choice. The numerical + experiments underscore Spectral Bridges as a fast, robust, and + versatile tool for clustering tasks spanning diverse domains. Its + efficacy extends to large-scale scenarios encompassing both + real-world and synthetic datasets. The Spectral Bridge algorithm is + implemented both in Python (\textless + https://pypi.org/project/spectral-bridges\textgreater) and R + \textless + https://github.com/cambroise/spectral-bridges-Rpackage\textgreater).} + } + date: 2024-12-13 description: Scalable Spectral Clustering Based on Vector Quantization doi: 10.57750/1gr8-bk61 @@ -126,6 +238,36 @@ tools for visualizing and summarizing conformal prediction intervals. authors: Herbert Susmann, Antoine Chambaz and Julie Josse + bibtex: >+ + @article{susmann2024, + author = {Susmann, Herbert and Chambaz, Antoine and Josse, Julie}, + publisher = {French Statistical Society}, + title = {AdaptiveConformal: {An} {`R`} {Package} for {Adaptive} + {Conformal} {Inference}}, + journal = {Computo}, + date = {2024-07-18}, + doi = {10.57750/edan-5f53}, + issn = {2824-7795}, + langid = {en}, + abstract = {Conformal Inference (CI) is a popular approach for + generating finite sample prediction intervals based on the output of + any point prediction method when data are exchangeable. Adaptive + Conformal Inference (ACI) algorithms extend CI to the case of + sequentially observed data, such as time series, and exhibit strong + theoretical guarantees without having to assume exchangeability of + the observed data. The common thread that unites algorithms in the + ACI family is that they adaptively adjust the width of the generated + prediction intervals in response to the observed data. We provide a + detailed description of five ACI algorithms and their theoretical + guarantees, and test their performance in simulation studies. We + then present a case study of producing prediction intervals for + influenza incidence in the United States based on black-box point + forecasts. Implementations of all the algorithms are released as an + open-source `R` package, `AdaptiveConformal`, which also includes + tools for visualizing and summarizing conformal prediction + intervals.} + } + date: 2024-07-18 description: '' doi: 10.57750/edan-5f53 @@ -167,6 +309,49 @@ implementing the Bayesian estimation of marked log-Gaussian Cox processes using the R-INLA package of the R statistical software. authors: Juliette Legrand, François Pimont, Jean-Luc Dupuy and Thomas Opitz + bibtex: >+ + @article{legrand2024, + author = {Legrand, Juliette and Pimont, François and Dupuy, Jean-Luc + and Opitz, Thomas}, + publisher = {French Statistical Society}, + title = {Bayesian Spatiotemporal Modelling of Wildfire Occurrences and + Sizes for Projections Under Climate Change}, + journal = {Computo}, + date = {2024-07-12}, + doi = {10.57750/4y84-4t68}, + issn = {2824-7795}, + langid = {en}, + abstract = {Appropriate spatiotemporal modelling of wildfire activity + is crucial for its prediction and risk management. Here, we focus on + wildfire risk in the Aquitaine region in the Southwest of France and + its projection under climate change. We study whether wildfire risk + could further increase under climate change in this specific region, + which does not lie in the historical core area of wildfires in + Southeastern France, corresponding to the Southwest. For this + purpose, we consider a marked spatiotemporal point process, a + flexible model for occurrences and magnitudes of such environmental + risks, where the magnitudes are defined as the burnt areas. The + model is first calibrated using 14 years of past observation data of + wildfire occurrences and weather variables, and then applied for + projection of climate-change impacts using simulations of numerical + climate models until 2100 as new inputs. We work within the + framework of a spatiotemporal Bayesian hierarchical model, and we + present the workflow of its implementation for a large dataset at + daily resolution for 8km-pixels using the INLA-SPDE approach. The + assessment of the posterior distributions shows a satisfactory fit + of the model for the observation period. We stochastically simulate + projections of future wildfire activity by combining climate model + output with posterior simulations of model parameters. Depending on + climate models, spline-smoothed projections indicate low to moderate + increase of wildfire activity under climate change. The increase is + weaker than in the historical core area, which we attribute to + different weather conditions (oceanic versus Mediterranean). Besides + providing a relevant case study of environmental risk modelling, + this paper is also intended to provide a full workflow for + implementing the Bayesian estimation of marked log-Gaussian Cox + processes using the R-INLA package of the R statistical software.} + } + date: 2024-07-12 description: '' doi: 10.57750/4y84-4t68 @@ -199,6 +384,40 @@ inequality-based approaches in particular when the underlying number of changes is small compared to the data length. authors: Liudmila Pishchagina, Guillem Rigaill and Vincent Runge + bibtex: >+ + @article{pishchagina2024, + author = {Pishchagina, Liudmila and Rigaill, Guillem and Runge, + Vincent}, + publisher = {French Statistical Society}, + title = {Geometric-Based {Pruning} {Rules} for {Change} {Point} + {Detection} in {Multiple} {Independent} {Time} {Series}}, + journal = {Computo}, + date = {2024-07-12}, + doi = {10.57750/9vvx-eq57}, + issn = {2824-7795}, + langid = {en}, + abstract = {We address the challenge of identifying multiple change + points in a group of independent time series, assuming these change + points occur simultaneously in all series and their number is + unknown. The search for the best segmentation can be expressed as a + minimization problem over a given cost function. We focus on dynamic + programming algorithms that solve this problem exactly. When the + number of changes is proportional to data length, an + inequality-based pruning rule encoded in the PELT algorithm leads to + a linear time complexity. Another type of pruning, called functional + pruning, gives a close-to-linear time complexity whatever the number + of changes, but only for the analysis of univariate time series. We + propose a few extensions of functional pruning for multiple + independent time series based on the use of simple geometric shapes + (balls and hyperrectangles). We focus on the Gaussian case, but some + of our rules can be easily extended to the exponential family. In a + simulation study we compare the computational efficiency of + different geometric-based pruning rules. We show that for a small + number of time series some of them ran significantly faster than + inequality-based approaches in particular when the underlying number + of changes is small compared to the data length.} + } + date: 2024-07-12 description: '' doi: 10.57750/9vvx-eq57 @@ -221,6 +440,30 @@ addition, we provide an identification module to easily explore the task difficulty of datasets and worker capabilities. authors: Tanguy Lefort, Benjamin Charlier, Alexis Joly and Joseph Salmon + bibtex: >+ + @article{lefort2024, + author = {Lefort, Tanguy and Charlier, Benjamin and Joly, Alexis and + Salmon, Joseph}, + publisher = {French Statistical Society}, + title = {Peerannot: Classification for Crowdsourced Image Datasets + with {Python}}, + journal = {Computo}, + date = {2024-05-07}, + doi = {10.57750/qmaz-gr91}, + issn = {2824-7795}, + langid = {en}, + abstract = {Crowdsourcing is a quick and easy way to collect labels + for large datasets, involving many workers. However, workers often + disagree with each other. Sources of error can arise from the + workers’ skills, but also from the intrinsic difficulty of the task. + We present `peerannot`: a `Python` library for managing and learning + from crowdsourced labels for classification. Our library allows + users to aggregate labels from common noise models or train a deep + learning-based classifier directly from crowdsourced labels. In + addition, we provide an identification module to easily explore the + task difficulty of datasets and worker capabilities.} + } + date: 2024-05-07 description: > Crowdsourcing is a quick and easy way to collect labels for large datasets, involving many workers. @@ -255,6 +498,34 @@ generalizations, in particular the incorporation of such ideas in adaptive importance sampling schemes. authors: Maxime El Masri, Jérôme Morio and Florian Simatos + bibtex: >+ + @article{el_masri2024, + author = {El Masri, Maxime and Morio, Jérôme and Simatos, Florian}, + publisher = {French Statistical Society}, + title = {Optimal Projection for Parametric Importance Sampling in High + Dimensions}, + journal = {Computo}, + date = {2024-03-11}, + doi = {10.57750/jjza-6j82}, + issn = {2824-7795}, + langid = {en}, + abstract = {We propose a dimension reduction strategy in order to + improve the performance of importance sampling in high dimensions. + The idea is to estimate variance terms in a small number of suitably + chosen directions. We first prove that the optimal directions, i.e., + the ones that minimize the Kullback-\/-Leibler divergence with the + optimal auxiliary density, are the eigenvectors associated with + extreme (small or large) eigenvalues of the optimal covariance + matrix. We then perform extensive numerical experiments showing that + as dimension increases, these directions give estimations which are + very close to optimal. Moreover, we demonstrate that the estimation + remains accurate even when a simple empirical estimator of the + covariance matrix is used to compute these directions. The + theoretical and numerical results open the way for different + generalizations, in particular the incorporation of such ideas in + adaptive importance sampling schemes.} + } + date: 2024-03-11 description: > This document provides a dimension-reduction strategy in order to improve the performance of importance sampling in high dimensions. @@ -275,6 +546,25 @@ data we are given, we can retrieve some repulsiveness between antennas, which was expected for engineering reasons. authors: Hamza Adrat and Laurent Decreusefond + bibtex: >+ + @article{adrat2024, + author = {Adrat, Hamza and Decreusefond, Laurent}, + publisher = {French Statistical Society}, + title = {Point {Process} {Discrimination} {According} to {Repulsion}}, + journal = {Computo}, + date = {2024-01-25}, + doi = {10.57750/3r07-aw28}, + issn = {2824-7795}, + langid = {en}, + abstract = {In numerous applications, cloud of points do seem to + exhibit *repulsion* in the intuitive sense that there is no local + cluster as in a Poisson process. Motivated by data coming from + cellular networks, we devise a classification algorithm based on the + form of the Voronoi cells. We show that, in the particular set of + data we are given, we can retrieve some repulsiveness between + antennas, which was expected for engineering reasons.} + } + date: 2024-01-25 description: '' doi: 10.57750/3r07-aw28 @@ -329,6 +619,61 @@ analyze pest surveys and field experiments conducted to assess the efficacy of pest treatments. authors: Armand Favrot and David Makowski + bibtex: >+ + @article{favrot2024, + author = {Favrot, Armand and Makowski, David}, + publisher = {French Statistical Society}, + title = {A Hierarchical Model to Evaluate Pest Treatments from + Prevalence and Intensity Data}, + journal = {Computo}, + date = {2024-01-09}, + doi = {10.57750/6cgk-g727}, + issn = {2824-7795}, + langid = {en}, + abstract = {In plant epidemiology, pest abundance is measured in field + trials using metrics assessing either pest prevalence (fraction of + the plant population infected) or pest intensity (average number of + pest individuals present in infected plants). Some of these trials + rely on prevalence, while others rely on intensity, depending on the + protocols. In this paper, we present a hierarchical Bayesian model + able to handle both types of data. In this model, the intensity and + prevalence variables are derived from a latent variable representing + the number of pest individuals on each host individual, assumed to + follow a Poisson distribution. Effects of pest treaments, time + trend, and between-trial variability are described using fixed and + random effects. We apply the model to a real data set in the context + of aphid control in sugar beet fields. In this data set, prevalence + and intensity were derived from aphid counts observed on either + factorial trials testing different types of pesticides treatments or + field surveys monitoring aphid abundance. Next, we perform + simulations to assess the impacts of using either prevalence or + intensity data, or both types of data simultaneously, on the + accuracy of the model parameter estimates and on the ranking of + pesticide treatment efficacy. Our results show that, when pest + prevalence and pest intensity data are collected separately in + different trials, the model parameters are more accurately estimated + using both types of trials than using one type of trials only. When + prevalence data are collected in all trials and intensity data are + collected in a subset of trials, estimations and pest treatment + ranking are more accurate using both types of data than using + prevalence data only. When only one type of observation can be + collected in a pest survey or in an experimental trial, our analysis + indicates that it is better to collect intensity data than + prevalence data when all or most of the plants are expected to be + infested, but that both types of data lead to similar results when + the level of infestation is low to moderate. Finally, our + simulations show that it is unlikely to obtain accurate results with + fewer than 40 trials when assessing the efficacy of pest control + treatments based on prevalence and intensity data. Because of its + flexibility, our model can be used to evaluate and rank the efficacy + of pest treatments using either prevalence or intensity data, or + both types of data simultaneously. As it can be easily implemented + using standard Bayesian packages, we hope that it will be useful to + agronomists, plant pathologists, and applied statisticians to + analyze pest surveys and field experiments conducted to assess the + efficacy of pest treatments.} + } + date: 2024-01-09 description: '' doi: 10.57750/6cgk-g727 @@ -364,6 +709,42 @@ second, more local, RF. Unfortunately, these approaches, although interesting, do not provide conclusive results. authors: Alice Cleynen, Louis Raynal and Jean-Michel Marin + bibtex: >+ + @article{cleynen2023, + author = {Cleynen, Alice and Raynal, Louis and Marin, Jean-Michel}, + publisher = {French Statistical Society}, + title = {Local Tree Methods for Classification: A Review and Some Dead + Ends}, + journal = {Computo}, + date = {2023-12-14}, + doi = {10.57750/3j8m-8d57}, + issn = {2824-7795}, + langid = {en}, + abstract = {Random Forests (RF) {[}@breiman:2001{]} are very popular + machine learning methods. They perform well even with little or no + tuning, and have some theoretical guarantees, especially for sparse + problems {[}@biau:2012;@scornet:etal:2015{]}. These learning + strategies have been used in several contexts, also outside the + field of classification and regression. To perform Bayesian model + selection in the case of intractable likelihoods, the ABC Random + Forests (ABC-RF) strategy of @pudlo:etal:2016 consists in applying + Random Forests on training sets composed of simulations coming from + the Bayesian generative models. The ABC-RF technique is based on an + underlying RF for which the training and prediction phases are + separated. The training phase does not take into account the data to + be predicted. This seems to be suboptimal as in the ABC framework + only one observation is of interest for the prediction. In this + paper, we study tree-based methods that are built to predict a + specific instance in a classification setting. This type of methods + falls within the scope of local (lazy/instance-based/case specific) + classification learning. We review some existing strategies and + propose two new ones. The first consists in modifying the tree + splitting rule by using kernels, the second in using a first RF to + compute some local variable importance that is used to train a + second, more local, RF. Unfortunately, these approaches, although + interesting, do not provide conclusive results.} + } + date: 2023-12-14 description: '' doi: 10.57750/3j8m-8d57 @@ -396,6 +777,39 @@ convergence properties of the estimation algorithm through simulation studies. authors: Maud Delattre and Estelle Kuhn + bibtex: >+ + @article{delattre2023, + author = {Delattre, Maud and Kuhn, Estelle}, + publisher = {French Statistical Society}, + title = {Computing an Empirical {Fisher} Information Matrix Estimate + in Latent Variable Models Through Stochastic Approximation}, + journal = {Computo}, + date = {2023-11-21}, + doi = {10.57750/r5gx-jk62}, + issn = {2824-7795}, + langid = {en}, + abstract = {The Fisher information matrix (FIM) is a key quantity in + statistics. However its exact computation is often not trivial. In + particular in many latent variable models, it is intricated due to + the presence of unobserved variables. Several methods have been + proposed to approximate the FIM when it can not be evaluated + analytically. Different estimates have been considered, in + particular moment estimates. However some of them require to compute + second derivatives of the complete data log-likelihood which leads + to some disadvantages. In this paper, we focus on the empirical + Fisher information matrix defined as an empirical estimate of the + covariance matrix of the score, which only requires to compute the + first derivatives of the log-likelihood. Our contribution consists + in presenting a new numerical method to evaluate this empirical + Fisher information matrix in latent variable model when the proposed + estimate can not be directly analytically evaluated. We propose a + stochastic approximation estimation algorithm to compute this + estimate as a by-product of the parameter estimate. We evaluate the + finite sample size properties of the proposed estimate and the + convergence properties of the estimation algorithm through + simulation studies.} + } + date: 2023-11-21 description: '' doi: 10.57750/r5gx-jk62 @@ -430,6 +844,40 @@ network inference models. Applications to gut microbiome data and poplar’s methylation mixed with transcriptomic data are presented. authors: Edmond Sanou, Christophe Ambroise and Geneviève Robin + bibtex: >+ + @article{sanou2023, + author = {Sanou, Edmond and Ambroise, Christophe and Robin, Geneviève}, + publisher = {French Statistical Society}, + title = {Inference of {Multiscale} {Gaussian} {Graphical} {Models}}, + journal = {Computo}, + date = {2023-06-28}, + doi = {10.57750/1f4p-7955}, + issn = {2824-7795}, + langid = {en}, + abstract = {Gaussian Graphical Models (GGMs) are widely used in + high-dimensional data analysis to synthesize the interaction between + variables. In many applications, such as genomics or image analysis, + graphical models rely on sparsity and clustering to reduce + dimensionality and improve performances. This paper explores a + slightly different paradigm where clustering is not knowledge-driven + but performed simultaneously with the graph inference task. We + introduce a novel Multiscale Graphical Lasso (MGLasso) to improve + networks interpretability by proposing graphs at different + granularity levels. The method estimates clusters through a convex + clustering approach -\/-\/- a relaxation of \$k\$-means, and + hierarchical clustering. The conditional independence graph is + simultaneously inferred through a neighborhood selection scheme for + undirected graphical models. MGLasso extends and generalizes the + sparse group fused lasso problem to undirected graphical models. We + use continuation with Nesterov smoothing in a shrinkage-thresholding + algorithm (CONESTA) to propose a regularization path of solutions + along the group fused Lasso penalty, while the Lasso penalty is kept + constant. Extensive experiments on synthetic data compare the + performances of our model to state-of-the-art clustering methods and + network inference models. Applications to gut microbiome data and + poplar’s methylation mixed with transcriptomic data are presented.} + } + date: 2023-06-28 description: '' doi: 10.57750/1f4p-7955 @@ -461,6 +909,39 @@ detection capabilities. A precise error decomposition allows clear analysis and highlights the remaining challenges. authors: Mathis Chagneux, Sylvain Le Corff, Pierre Gloaguen, Charles Ollion, Océane Lepâtre and Antoine Bruge + bibtex: >+ + @article{chagneux2023, + author = {Chagneux, Mathis and Le Corff, Sylvain and Gloaguen, Pierre + and Ollion, Charles and Lepâtre, Océane and Bruge, Antoine}, + publisher = {French Statistical Society}, + title = {Macrolitter Video Counting on Riverbanks Using State Space + Models and Moving Cameras}, + journal = {Computo}, + date = {2023-02-16}, + doi = {10.57750/845m-f805}, + issn = {2824-7795}, + langid = {en}, + abstract = {Litter is a known cause of degradation in marine + environments and most of it travels in rivers before reaching the + oceans. In this paper, we present a novel algorithm to assist waste + monitoring along watercourses. While several attempts have been made + to quantify litter using neural object detection in photographs of + floating items, we tackle the more challenging task of counting + directly in videos using boat-embedded cameras. We rely on + multi-object tracking (MOT) but focus on the key pitfalls of false + and redundant counts which arise in typical scenarios of poor + detection performance. Our system only requires supervision at the + image level and performs Bayesian filtering via a state space model + based on optical flow. We present a new open image dataset gathered + through a crowdsourced campaign and used to train a center-based + anchor-free object detector. Realistic video footage assembled by + water monitoring experts is annotated and provided for evaluation. + Improvements in count quality are demonstrated against systems built + from state-of-the-art multi-object trackers sharing the same + detection capabilities. A precise error decomposition allows clear + analysis and highlights the remaining challenges.} + } + date: 2023-02-16 description: '' doi: 10.57750/845m-f805 @@ -485,6 +966,30 @@ practitioners working with copulae in \$\textbackslash textsf\{Python\}\$. authors: Alexis Boulin + bibtex: >+ + @article{boulin2023, + author = {Boulin, Alexis}, + publisher = {French Statistical Society}, + title = {A {Python} {Package} for {Sampling} from {Copulae:} Clayton}, + journal = {Computo}, + date = {2023-01-12}, + doi = {10.57750/4szh-t752}, + issn = {2824-7795}, + langid = {en}, + abstract = {The package \$\textbackslash textsf\{clayton\}\$ is + designed to be intuitive, user-friendly, and efficient. It offers a + wide range of copula models, including Archimedean, Elliptical, and + Extreme. The package is implemented in pure \$\textbackslash + textsf\{Python\}\$, making it easy to install and use. In addition, + we provide detailed documentation and examples to help users get + started quickly. We also conduct a performance comparison with + existing \$\textbackslash textsf\{R\}\$ packages, demonstrating the + efficiency of our implementation. The \$\textbackslash + textsf\{clayton\}\$ package is a valuable tool for researchers and + practitioners working with copulae in \$\textbackslash + textsf\{Python\}\$.} + } + date: 2023-01-12 description: > The package $\textsf{clayton}$ is designed to be intuitive, user-friendly, and efficient. It offers a wide range of copula models, including Archimedean, Elliptical, and Extreme. The package is implemented in pure $\textsf{Python}$, making it easy to install and use. @@ -523,6 +1028,46 @@ reproducible workflow will be useful to ecologists and applied statisticians. authors: Olivier Gimenez, Maëlis Kervellec, Jean-Baptiste Fanjul, Anna Chaine, Lucile Marescot, Yoann Bollet and Christophe Duchamp + bibtex: >+ + @article{gimenez2022, + author = {Gimenez, Olivier and Kervellec, Maëlis and Fanjul, + Jean-Baptiste and Chaine, Anna and Marescot, Lucile and Bollet, + Yoann and Duchamp, Christophe}, + publisher = {French Statistical Society}, + title = {Trade-Off Between Deep Learning for Species Identification + and Inference about Predator-Prey Co-Occurrence}, + journal = {Computo}, + date = {2022-04-22}, + doi = {10.57750/yfm2-5f45}, + issn = {2824-7795}, + langid = {en}, + abstract = {Deep learning is used in computer vision problems with + important applications in several scientific fields. In ecology for + example, there is a growing interest in deep learning for + automatizing repetitive analyses on large amounts of images, such as + animal species identification. However, there are challenging issues + toward the wide adoption of deep learning by the community of + ecologists. First, there is a programming barrier as most algorithms + are written in `Python` while most ecologists are versed in `R`. + Second, recent applications of deep learning in ecology have focused + on computational aspects and simple tasks without addressing the + underlying ecological questions or carrying out the statistical data + analysis to answer these questions. Here, we showcase a reproducible + `R` workflow integrating both deep learning and statistical models + using predator-prey relationships as a case study. We illustrate + deep learning for the identification of animal species on images + collected with camera traps, and quantify spatial co-occurrence + using multispecies occupancy models. Despite average model + classification performances, ecological inference was similar + whether we analysed the ground truth dataset or the classified + dataset. This result calls for further work on the trade-offs + between time and resources allocated to train models with deep + learning and our ability to properly address key ecological + questions with biodiversity monitoring. We hope that our + reproducible workflow will be useful to ecologists and applied + statisticians.} + } + date: 2022-04-22 description: '' doi: 10.57750/yfm2-5f45 From a65165fe84db8100c70e0971f8ce4d808525d282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-David=20Collin?= Date: Thu, 24 Jul 2025 11:13:05 +0200 Subject: [PATCH 06/13] Add lightbox filter to author guidelines for enhanced image display --- .../quarto-ext/lightbox/_extension.yml | 7 + _extensions/quarto-ext/lightbox/lightbox.css | 9 + _extensions/quarto-ext/lightbox/lightbox.lua | 251 ++++++++++++++++++ .../lightbox/resources/css/glightbox.min.css | 1 + .../lightbox/resources/js/glightbox.min.js | 1 + site/guidelines-authors.qmd | 3 + 6 files changed, 272 insertions(+) create mode 100644 _extensions/quarto-ext/lightbox/_extension.yml create mode 100644 _extensions/quarto-ext/lightbox/lightbox.css create mode 100644 _extensions/quarto-ext/lightbox/lightbox.lua create mode 100644 _extensions/quarto-ext/lightbox/resources/css/glightbox.min.css create mode 100644 _extensions/quarto-ext/lightbox/resources/js/glightbox.min.js diff --git a/_extensions/quarto-ext/lightbox/_extension.yml b/_extensions/quarto-ext/lightbox/_extension.yml new file mode 100644 index 0000000..0a5db9a --- /dev/null +++ b/_extensions/quarto-ext/lightbox/_extension.yml @@ -0,0 +1,7 @@ +title: Lightbox +author: Posit Software, PBC +version: 0.1.9 +quarto-required: ">=1.2.198" +contributes: + filters: + - lightbox.lua diff --git a/_extensions/quarto-ext/lightbox/lightbox.css b/_extensions/quarto-ext/lightbox/lightbox.css new file mode 100644 index 0000000..d94d9e5 --- /dev/null +++ b/_extensions/quarto-ext/lightbox/lightbox.css @@ -0,0 +1,9 @@ + + + +body:not(.glightbox-mobile) div.gslide div.gslide-description, +body:not(.glightbox-mobile) div.gslide-description .gslide-title, +body:not(.glightbox-mobile) div.gslide-description .gslide-desc { + color: var(--quarto-body-color); + background-color: var(--quarto-body-bg); +} \ No newline at end of file diff --git a/_extensions/quarto-ext/lightbox/lightbox.lua b/_extensions/quarto-ext/lightbox/lightbox.lua new file mode 100644 index 0000000..ca8b805 --- /dev/null +++ b/_extensions/quarto-ext/lightbox/lightbox.lua @@ -0,0 +1,251 @@ +-- whether we're automatically lightboxing +local auto = false + +-- whether we need lightbox dependencies added +local needsLightbox = false + +-- a counter used to ensure each image is in its own gallery +local imgCount = 0 + +-- attributes to forward from the image to the newly created link +local kDescription = "description" +local kForwardedAttr = { + "title", kDescription, "desc-position", + "type", "effect", "zoomable", "draggable" +} + +local kLightboxClass = "lightbox" +local kNoLightboxClass = "nolightbox" +local kGalleryPrefix = "quarto-lightbox-gallery-" + +-- A list of images already within links that we can use to filter +local imagesWithinLinks = pandoc.List({}) + +local function readAttrValue(el, attrName) + if attrName == kDescription then + local doc = pandoc.read(el.attr.attributes[attrName]) + local attrInlines = doc.blocks[1].content + return pandoc.write(pandoc.Pandoc(attrInlines), "html") + else + return el[attrName] + end + +end + +return { + { + Meta = function(meta) + + -- If the mode is auto, we need go ahead and + -- run if there are any images (ideally we would) + -- filter to images in the body, but that can be + -- left for future me to deal with + -- supports: + -- lightbox: auto + -- or + -- lightbox: + -- match: auto + local lbMeta = meta.lightbox + if lbMeta ~= nil and type(lbMeta) == 'table' then + if lbMeta[1] ~= nil then + if lbMeta[1]['text'] == "auto" then + auto = true + end + elseif lbMeta.match ~= nil and pandoc.utils.stringify(lbMeta.match) == 'auto' then + auto = true + elseif lbMeta == true then + auto = true + end + end + end, + -- Find images that are already within links + -- we'll use this to filter out these images if + -- the most is auto + Link = function(linkEl) + pandoc.walk_inline(linkEl, { + Image = function(imageEl) + imagesWithinLinks[#imagesWithinLinks + 1] = imageEl + end + }) + end + },{ + Div = function(div) + if div.classes:includes("cell") and div.attributes["lightbox"] ~= nil then + meta = quarto.json.decode(div.attributes["lightbox"]) + local imgCount=0 + div = div:walk({ + Image = function(imgEl) + imgCount = imgCount + 1 + if (type(meta) == "table" and meta[kNoLightboxClass] == true) or meta == false then + imgEl.classes:insert(kNoLightboxClass) + else + if not auto and ((type(meta) == "table" and not meta[kNoLightboxClass]) or meta == true) then + imgEl.classes:insert(kLightboxClass) + end + if (type(meta) == "table") then + if meta.group then + imgEl.attr.attributes.group = meta.group or imgEl.attr.attributes.group + end + for _, v in next, kForwardedAttr do + if type(meta[v]) == "table" and #meta[v] > 1 then + -- if list attributes it should be one per plot + if imgCount > #meta[v] then + quarto.log.warning("More plots than '" .. v .. "' passed in YAML chunk options.") + else + attrLb = meta[v][imgCount] + end + else + -- Otherwise reuse the single attributes + attrLb = meta[v] + end + imgEl.attr.attributes[v] = attrLb or imgEl.attr.attributes[v] + end + end + end + return imgEl + end + }) + div.attributes["lightbox"] = nil + end + return div + end + }, + { + Image = function(imgEl) + if quarto.doc.is_format("html:js") then + local isAlreadyLinked = imagesWithinLinks:includes(imgEl) + if (not isAlreadyLinked and auto and not imgEl.classes:includes(kNoLightboxClass)) + or imgEl.classes:includes('lightbox') then + -- note that we need to include the dependency for lightbox + needsLightbox = true + imgCount = imgCount + 1 + + -- remove the class from the image + imgEl.attr.classes = imgEl.attr.classes:filter(function(clz) + return clz ~= kLightboxClass + end) + + -- attributes for the link + local linkAttributes = {} + + -- mark this image as a lightbox target + linkAttributes.class = kLightboxClass + + -- get the alt text from image and use that as title + local title = nil + if imgEl.caption ~= nil and #imgEl.caption > 0 then + linkAttributes.title = pandoc.utils.stringify(imgEl.caption) + elseif imgEl.attributes['fig-alt'] ~= nil and #imgEl.attributes['fig-alt'] > 0 then + linkAttributes.title = pandoc.utils.stringify(imgEl.attributes['fig-alt']) + end + + -- move a group attribute to the link, if present + if imgEl.attr.attributes.group ~= nil then + linkAttributes.gallery = imgEl.attr.attributes.group + imgEl.attr.attributes.group = nil + else + linkAttributes.gallery = kGalleryPrefix .. imgCount + end + + -- forward any other known attributes + for i, v in ipairs(kForwardedAttr) do + if imgEl.attr.attributes[v] ~= nil then + -- forward the attribute + linkAttributes[v] = readAttrValue(imgEl, v) + + -- clear the attribute + imgEl.attr.attributes[v] = nil + end + + -- clear the title + if (imgEl.title == 'fig:') then + imgEl.title = "" + end + + end + + -- wrap decorated images in a link with appropriate attrs + local link = pandoc.Link({imgEl}, imgEl.src, nil, linkAttributes) + return link + end + end + end, + Meta = function(meta) + -- If we discovered lightbox-able images + -- we need to include the dependencies + if needsLightbox then + -- add the dependency + quarto.doc.add_html_dependency({ + name = 'glightbox', + scripts = {'resources/js/glightbox.min.js'}, + stylesheets = {'resources/css/glightbox.min.css', 'lightbox.css'} + }) + + -- read lightbox options + local lbMeta = meta.lightbox + local lbOptions = {} + local readEffect = function(el) + local val = pandoc.utils.stringify(el) + if val == "fade" or val == "zoom" or val == "none" then + return val + else + error("Invalid effect " + val) + end + end + + -- permitted options include: + -- lightbox: + -- effect: zoom | fade | none + -- desc-position: top | bottom | left |right + -- loop: true | false + -- class: + local effect = "zoom" + local descPosition = "bottom" + local loop = true + local skin = nil + + -- The selector controls which elements are targeted. + -- currently, it always targets .lightbox elements + -- and there is no way for the user to change this + local selector = "." .. kLightboxClass + + if lbMeta ~= nil and type(lbMeta) == 'table' then + if lbMeta.effect ~= nil then + effect = readEffect(lbMeta.effect) + end + + if lbMeta['desc-position'] ~= nil then + descPosition = pandoc.utils.stringify(lbMeta['desc-position']) + end + + if lbMeta['css-class'] ~= nil then + skin = pandoc.utils.stringify(lbMeta['css-class']) + end + + if lbMeta.loop ~= nil then + loop = lbMeta.loop + end + end + + -- Generate the options to configure lightbox + local options = { + selector = selector, + closeEffect = effect, + openEffect = effect, + descPosition = descPosition, + loop = loop, + } + if skin ~= nil then + options.skin = skin + end + local optionsJson = quarto.json.encode(options) + + -- generate the initialization script with the correct options + local scriptTag = "" + + -- inject the rendering code + quarto.doc.include_text("after-body", scriptTag) + + end + end +}} diff --git a/_extensions/quarto-ext/lightbox/resources/css/glightbox.min.css b/_extensions/quarto-ext/lightbox/resources/css/glightbox.min.css new file mode 100644 index 0000000..3c9ff87 --- /dev/null +++ b/_extensions/quarto-ext/lightbox/resources/css/glightbox.min.css @@ -0,0 +1 @@ +.glightbox-container{width:100%;height:100%;position:fixed;top:0;left:0;z-index:999999!important;overflow:hidden;-ms-touch-action:none;touch-action:none;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;outline:0}.glightbox-container.inactive{display:none}.glightbox-container .gcontainer{position:relative;width:100%;height:100%;z-index:9999;overflow:hidden}.glightbox-container .gslider{-webkit-transition:-webkit-transform .4s ease;transition:-webkit-transform .4s ease;transition:transform .4s ease;transition:transform .4s ease,-webkit-transform .4s ease;height:100%;left:0;top:0;width:100%;position:relative;overflow:hidden;display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.glightbox-container .gslide{width:100%;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;opacity:0}.glightbox-container .gslide.current{opacity:1;z-index:99999;position:relative}.glightbox-container .gslide.prev{opacity:1;z-index:9999}.glightbox-container .gslide-inner-content{width:100%}.glightbox-container .ginner-container{position:relative;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:100%;margin:auto;height:100vh}.glightbox-container .ginner-container.gvideo-container{width:100%}.glightbox-container .ginner-container.desc-bottom,.glightbox-container .ginner-container.desc-top{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.glightbox-container .ginner-container.desc-left,.glightbox-container .ginner-container.desc-right{max-width:100%!important}.gslide iframe,.gslide video{outline:0!important;border:none;min-height:165px;-webkit-overflow-scrolling:touch;-ms-touch-action:auto;touch-action:auto}.gslide:not(.current){pointer-events:none}.gslide-image{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.gslide-image img{max-height:100vh;display:block;padding:0;float:none;outline:0;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;max-width:100vw;width:auto;height:auto;-o-object-fit:cover;object-fit:cover;-ms-touch-action:none;touch-action:none;margin:auto;min-width:200px}.desc-bottom .gslide-image img,.desc-top .gslide-image img{width:auto}.desc-left .gslide-image img,.desc-right .gslide-image img{width:auto;max-width:100%}.gslide-image img.zoomable{position:relative}.gslide-image img.dragging{cursor:-webkit-grabbing!important;cursor:grabbing!important;-webkit-transition:none;transition:none}.gslide-video{position:relative;max-width:100vh;width:100%!important}.gslide-video .plyr__poster-enabled.plyr--loading .plyr__poster{display:none}.gslide-video .gvideo-wrapper{width:100%;margin:auto}.gslide-video::before{content:'';position:absolute;width:100%;height:100%;background:rgba(255,0,0,.34);display:none}.gslide-video.playing::before{display:none}.gslide-video.fullscreen{max-width:100%!important;min-width:100%;height:75vh}.gslide-video.fullscreen video{max-width:100%!important;width:100%!important}.gslide-inline{background:#fff;text-align:left;max-height:calc(100vh - 40px);overflow:auto;max-width:100%;margin:auto}.gslide-inline .ginlined-content{padding:20px;width:100%}.gslide-inline .dragging{cursor:-webkit-grabbing!important;cursor:grabbing!important;-webkit-transition:none;transition:none}.ginlined-content{overflow:auto;display:block!important;opacity:1}.gslide-external{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;min-width:100%;background:#fff;padding:0;overflow:auto;max-height:75vh;height:100%}.gslide-media{display:-webkit-box;display:-ms-flexbox;display:flex;width:auto}.zoomed .gslide-media{-webkit-box-shadow:none!important;box-shadow:none!important}.desc-bottom .gslide-media,.desc-top .gslide-media{margin:0 auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.gslide-description{position:relative;-webkit-box-flex:1;-ms-flex:1 0 100%;flex:1 0 100%}.gslide-description.description-left,.gslide-description.description-right{max-width:100%}.gslide-description.description-bottom,.gslide-description.description-top{margin:0 auto;width:100%}.gslide-description p{margin-bottom:12px}.gslide-description p:last-child{margin-bottom:0}.zoomed .gslide-description{display:none}.glightbox-button-hidden{display:none}.glightbox-mobile .glightbox-container .gslide-description{height:auto!important;width:100%;position:absolute;bottom:0;padding:19px 11px;max-width:100vw!important;-webkit-box-ordinal-group:3!important;-ms-flex-order:2!important;order:2!important;max-height:78vh;overflow:auto!important;background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(rgba(0,0,0,.75)));background:linear-gradient(to bottom,rgba(0,0,0,0) 0,rgba(0,0,0,.75) 100%);-webkit-transition:opacity .3s linear;transition:opacity .3s linear;padding-bottom:50px}.glightbox-mobile .glightbox-container .gslide-title{color:#fff;font-size:1em}.glightbox-mobile .glightbox-container .gslide-desc{color:#a1a1a1}.glightbox-mobile .glightbox-container .gslide-desc a{color:#fff;font-weight:700}.glightbox-mobile .glightbox-container .gslide-desc *{color:inherit}.glightbox-mobile .glightbox-container .gslide-desc .desc-more{color:#fff;opacity:.4}.gdesc-open .gslide-media{-webkit-transition:opacity .5s ease;transition:opacity .5s ease;opacity:.4}.gdesc-open .gdesc-inner{padding-bottom:30px}.gdesc-closed .gslide-media{-webkit-transition:opacity .5s ease;transition:opacity .5s ease;opacity:1}.greset{-webkit-transition:all .3s ease;transition:all .3s ease}.gabsolute{position:absolute}.grelative{position:relative}.glightbox-desc{display:none!important}.glightbox-open{overflow:hidden}.gloader{height:25px;width:25px;-webkit-animation:lightboxLoader .8s infinite linear;animation:lightboxLoader .8s infinite linear;border:2px solid #fff;border-right-color:transparent;border-radius:50%;position:absolute;display:block;z-index:9999;left:0;right:0;margin:0 auto;top:47%}.goverlay{width:100%;height:calc(100vh + 1px);position:fixed;top:-1px;left:0;background:#000;will-change:opacity}.glightbox-mobile .goverlay{background:#000}.gclose,.gnext,.gprev{z-index:99999;cursor:pointer;width:26px;height:44px;border:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.gclose svg,.gnext svg,.gprev svg{display:block;width:25px;height:auto;margin:0;padding:0}.gclose.disabled,.gnext.disabled,.gprev.disabled{opacity:.1}.gclose .garrow,.gnext .garrow,.gprev .garrow{stroke:#fff}.gbtn.focused{outline:2px solid #0f3d81}iframe.wait-autoplay{opacity:0}.glightbox-closing .gclose,.glightbox-closing .gnext,.glightbox-closing .gprev{opacity:0!important}.glightbox-clean .gslide-description{background:#fff}.glightbox-clean .gdesc-inner{padding:22px 20px}.glightbox-clean .gslide-title{font-size:1em;font-weight:400;font-family:arial;color:#000;margin-bottom:19px;line-height:1.4em}.glightbox-clean .gslide-desc{font-size:.86em;margin-bottom:0;font-family:arial;line-height:1.4em}.glightbox-clean .gslide-video{background:#000}.glightbox-clean .gclose,.glightbox-clean .gnext,.glightbox-clean .gprev{background-color:rgba(0,0,0,.75);border-radius:4px}.glightbox-clean .gclose path,.glightbox-clean .gnext path,.glightbox-clean .gprev path{fill:#fff}.glightbox-clean .gprev{position:absolute;top:-100%;left:30px;width:40px;height:50px}.glightbox-clean .gnext{position:absolute;top:-100%;right:30px;width:40px;height:50px}.glightbox-clean .gclose{width:35px;height:35px;top:15px;right:10px;position:absolute}.glightbox-clean .gclose svg{width:18px;height:auto}.glightbox-clean .gclose:hover{opacity:1}.gfadeIn{-webkit-animation:gfadeIn .5s ease;animation:gfadeIn .5s ease}.gfadeOut{-webkit-animation:gfadeOut .5s ease;animation:gfadeOut .5s ease}.gslideOutLeft{-webkit-animation:gslideOutLeft .3s ease;animation:gslideOutLeft .3s ease}.gslideInLeft{-webkit-animation:gslideInLeft .3s ease;animation:gslideInLeft .3s ease}.gslideOutRight{-webkit-animation:gslideOutRight .3s ease;animation:gslideOutRight .3s ease}.gslideInRight{-webkit-animation:gslideInRight .3s ease;animation:gslideInRight .3s ease}.gzoomIn{-webkit-animation:gzoomIn .5s ease;animation:gzoomIn .5s ease}.gzoomOut{-webkit-animation:gzoomOut .5s ease;animation:gzoomOut .5s ease}@-webkit-keyframes lightboxLoader{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes lightboxLoader{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes gfadeIn{from{opacity:0}to{opacity:1}}@keyframes gfadeIn{from{opacity:0}to{opacity:1}}@-webkit-keyframes gfadeOut{from{opacity:1}to{opacity:0}}@keyframes gfadeOut{from{opacity:1}to{opacity:0}}@-webkit-keyframes gslideInLeft{from{opacity:0;-webkit-transform:translate3d(-60%,0,0);transform:translate3d(-60%,0,0)}to{visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}}@keyframes gslideInLeft{from{opacity:0;-webkit-transform:translate3d(-60%,0,0);transform:translate3d(-60%,0,0)}to{visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}}@-webkit-keyframes gslideOutLeft{from{opacity:1;visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-60%,0,0);transform:translate3d(-60%,0,0);opacity:0;visibility:hidden}}@keyframes gslideOutLeft{from{opacity:1;visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-60%,0,0);transform:translate3d(-60%,0,0);opacity:0;visibility:hidden}}@-webkit-keyframes gslideInRight{from{opacity:0;visibility:visible;-webkit-transform:translate3d(60%,0,0);transform:translate3d(60%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}}@keyframes gslideInRight{from{opacity:0;visibility:visible;-webkit-transform:translate3d(60%,0,0);transform:translate3d(60%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}}@-webkit-keyframes gslideOutRight{from{opacity:1;visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(60%,0,0);transform:translate3d(60%,0,0);opacity:0}}@keyframes gslideOutRight{from{opacity:1;visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(60%,0,0);transform:translate3d(60%,0,0);opacity:0}}@-webkit-keyframes gzoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:1}}@keyframes gzoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:1}}@-webkit-keyframes gzoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes gzoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@media (min-width:769px){.glightbox-container .ginner-container{width:auto;height:auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.glightbox-container .ginner-container.desc-top .gslide-description{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.glightbox-container .ginner-container.desc-top .gslide-image,.glightbox-container .ginner-container.desc-top .gslide-image img{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.glightbox-container .ginner-container.desc-left .gslide-description{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.glightbox-container .ginner-container.desc-left .gslide-image{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.gslide-image img{max-height:97vh;max-width:100%}.gslide-image img.zoomable{cursor:-webkit-zoom-in;cursor:zoom-in}.zoomed .gslide-image img.zoomable{cursor:-webkit-grab;cursor:grab}.gslide-inline{max-height:95vh}.gslide-external{max-height:100vh}.gslide-description.description-left,.gslide-description.description-right{max-width:275px}.glightbox-open{height:auto}.goverlay{background:rgba(0,0,0,.92)}.glightbox-clean .gslide-media{-webkit-box-shadow:1px 2px 9px 0 rgba(0,0,0,.65);box-shadow:1px 2px 9px 0 rgba(0,0,0,.65)}.glightbox-clean .description-left .gdesc-inner,.glightbox-clean .description-right .gdesc-inner{position:absolute;height:100%;overflow-y:auto}.glightbox-clean .gclose,.glightbox-clean .gnext,.glightbox-clean .gprev{background-color:rgba(0,0,0,.32)}.glightbox-clean .gclose:hover,.glightbox-clean .gnext:hover,.glightbox-clean .gprev:hover{background-color:rgba(0,0,0,.7)}.glightbox-clean .gprev{top:45%}.glightbox-clean .gnext{top:45%}}@media (min-width:992px){.glightbox-clean .gclose{opacity:.7;right:20px}}@media screen and (max-height:420px){.goverlay{background:#000}} \ No newline at end of file diff --git a/_extensions/quarto-ext/lightbox/resources/js/glightbox.min.js b/_extensions/quarto-ext/lightbox/resources/js/glightbox.min.js new file mode 100644 index 0000000..997908b --- /dev/null +++ b/_extensions/quarto-ext/lightbox/resources/js/glightbox.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).GLightbox=t()}(this,(function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=e[s]=e[s]||[],l={all:n,evt:null,found:null};return t&&i&&P(n)>0&&o(n,(function(e,n){if(e.eventName==t&&e.fn.toString()==i.toString())return l.found=!0,l.evt=n,!1})),l}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.onElement,n=t.withCallback,s=t.avoidDuplicate,l=void 0===s||s,a=t.once,h=void 0!==a&&a,d=t.useCapture,c=void 0!==d&&d,u=arguments.length>2?arguments[2]:void 0,g=i||[];function v(e){T(n)&&n.call(u,e,this),h&&v.destroy()}return C(g)&&(g=document.querySelectorAll(g)),v.destroy=function(){o(g,(function(t){var i=r(t,e,v);i.found&&i.all.splice(i.evt,1),t.removeEventListener&&t.removeEventListener(e,v,c)}))},o(g,(function(t){var i=r(t,e,v);(t.addEventListener&&l&&!i.found||!l)&&(t.addEventListener(e,v,c),i.all.push({eventName:e,fn:v}))})),v}function h(e,t){o(t.split(" "),(function(t){return e.classList.add(t)}))}function d(e,t){o(t.split(" "),(function(t){return e.classList.remove(t)}))}function c(e,t){return e.classList.contains(t)}function u(e,t){for(;e!==document.body;){if(!(e=e.parentElement))return!1;if("function"==typeof e.matches?e.matches(t):e.msMatchesSelector(t))return e}}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||""===t)return!1;if("none"===t)return T(i)&&i(),!1;var n=x(),s=t.split(" ");o(s,(function(t){h(e,"g"+t)})),a(n,{onElement:e,avoidDuplicate:!1,once:!0,withCallback:function(e,t){o(s,(function(e){d(t,"g"+e)})),T(i)&&i()}})}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(""===t)return e.style.webkitTransform="",e.style.MozTransform="",e.style.msTransform="",e.style.OTransform="",e.style.transform="",!1;e.style.webkitTransform=t,e.style.MozTransform=t,e.style.msTransform=t,e.style.OTransform=t,e.style.transform=t}function f(e){e.style.display="block"}function p(e){e.style.display="none"}function m(e){var t=document.createDocumentFragment(),i=document.createElement("div");for(i.innerHTML=e;i.firstChild;)t.appendChild(i.firstChild);return t}function y(){return{width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}}function x(){var e,t=document.createElement("fakeelement"),i={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(e in i)if(void 0!==t.style[e])return i[e]}function b(e,t,i,n){if(e())t();else{var s;i||(i=100);var l=setInterval((function(){e()&&(clearInterval(l),s&&clearTimeout(s),t())}),i);n&&(s=setTimeout((function(){clearInterval(l)}),n))}}function S(e,t,i){if(I(e))console.error("Inject assets error");else if(T(t)&&(i=t,t=!1),C(t)&&t in window)T(i)&&i();else{var n;if(-1!==e.indexOf(".css")){if((n=document.querySelectorAll('link[href="'+e+'"]'))&&n.length>0)return void(T(i)&&i());var s=document.getElementsByTagName("head")[0],l=s.querySelectorAll('link[rel="stylesheet"]'),o=document.createElement("link");return o.rel="stylesheet",o.type="text/css",o.href=e,o.media="all",l?s.insertBefore(o,l[0]):s.appendChild(o),void(T(i)&&i())}if((n=document.querySelectorAll('script[src="'+e+'"]'))&&n.length>0){if(T(i)){if(C(t))return b((function(){return void 0!==window[t]}),(function(){i()})),!1;i()}}else{var r=document.createElement("script");r.type="text/javascript",r.src=e,r.onload=function(){if(T(i)){if(C(t))return b((function(){return void 0!==window[t]}),(function(){i()})),!1;i()}},document.body.appendChild(r)}}}function w(){return"navigator"in window&&window.navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i)}function T(e){return"function"==typeof e}function C(e){return"string"==typeof e}function k(e){return!(!e||!e.nodeType||1!=e.nodeType)}function E(e){return Array.isArray(e)}function A(e){return e&&e.length&&isFinite(e.length)}function L(t){return"object"===e(t)&&null!=t&&!T(t)&&!E(t)}function I(e){return null==e}function O(e,t){return null!==e&&hasOwnProperty.call(e,t)}function P(e){if(L(e)){if(e.keys)return e.keys().length;var t=0;for(var i in e)O(e,i)&&t++;return t}return e.length}function M(e){return!isNaN(parseFloat(e))&&isFinite(e)}function z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=document.querySelectorAll(".gbtn[data-taborder]:not(.disabled)");if(!t.length)return!1;if(1==t.length)return t[0];"string"==typeof e&&(e=parseInt(e));var i=[];o(t,(function(e){i.push(e.getAttribute("data-taborder"))}));var n=Math.max.apply(Math,i.map((function(e){return parseInt(e)}))),s=e<0?1:e+1;s>n&&(s="1");var l=i.filter((function(e){return e>=parseInt(s)})),r=l.sort()[0];return document.querySelector('.gbtn[data-taborder="'.concat(r,'"]'))}function X(e){if(e.events.hasOwnProperty("keyboard"))return!1;e.events.keyboard=a("keydown",{onElement:window,withCallback:function(t,i){var n=(t=t||window.event).keyCode;if(9==n){var s=document.querySelector(".gbtn.focused");if(!s){var l=!(!document.activeElement||!document.activeElement.nodeName)&&document.activeElement.nodeName.toLocaleLowerCase();if("input"==l||"textarea"==l||"button"==l)return}t.preventDefault();var o=document.querySelectorAll(".gbtn[data-taborder]");if(!o||o.length<=0)return;if(!s){var r=z();return void(r&&(r.focus(),h(r,"focused")))}var a=z(s.getAttribute("data-taborder"));d(s,"focused"),a&&(a.focus(),h(a,"focused"))}39==n&&e.nextSlide(),37==n&&e.prevSlide(),27==n&&e.close()}})}function Y(e){return Math.sqrt(e.x*e.x+e.y*e.y)}function q(e,t){var i=function(e,t){var i=Y(e)*Y(t);if(0===i)return 0;var n=function(e,t){return e.x*t.x+e.y*t.y}(e,t)/i;return n>1&&(n=1),Math.acos(n)}(e,t);return function(e,t){return e.x*t.y-t.x*e.y}(e,t)>0&&(i*=-1),180*i/Math.PI}var N=function(){function e(i){t(this,e),this.handlers=[],this.el=i}return n(e,[{key:"add",value:function(e){this.handlers.push(e)}},{key:"del",value:function(e){e||(this.handlers=[]);for(var t=this.handlers.length;t>=0;t--)this.handlers[t]===e&&this.handlers.splice(t,1)}},{key:"dispatch",value:function(){for(var e=0,t=this.handlers.length;e=0)console.log("ignore drag for this touched element",e.target.nodeName.toLowerCase());else{this.now=Date.now(),this.x1=e.touches[0].pageX,this.y1=e.touches[0].pageY,this.delta=this.now-(this.last||this.now),this.touchStart.dispatch(e,this.element),null!==this.preTapPosition.x&&(this.isDoubleTap=this.delta>0&&this.delta<=250&&Math.abs(this.preTapPosition.x-this.x1)<30&&Math.abs(this.preTapPosition.y-this.y1)<30,this.isDoubleTap&&clearTimeout(this.singleTapTimeout)),this.preTapPosition.x=this.x1,this.preTapPosition.y=this.y1,this.last=this.now;var t=this.preV;if(e.touches.length>1){this._cancelLongTap(),this._cancelSingleTap();var i={x:e.touches[1].pageX-this.x1,y:e.touches[1].pageY-this.y1};t.x=i.x,t.y=i.y,this.pinchStartLen=Y(t),this.multipointStart.dispatch(e,this.element)}this._preventTap=!1,this.longTapTimeout=setTimeout(function(){this.longTap.dispatch(e,this.element),this._preventTap=!0}.bind(this),750)}}}},{key:"move",value:function(e){if(e.touches){var t=this.preV,i=e.touches.length,n=e.touches[0].pageX,s=e.touches[0].pageY;if(this.isDoubleTap=!1,i>1){var l=e.touches[1].pageX,o=e.touches[1].pageY,r={x:e.touches[1].pageX-n,y:e.touches[1].pageY-s};null!==t.x&&(this.pinchStartLen>0&&(e.zoom=Y(r)/this.pinchStartLen,this.pinch.dispatch(e,this.element)),e.angle=q(r,t),this.rotate.dispatch(e,this.element)),t.x=r.x,t.y=r.y,null!==this.x2&&null!==this.sx2?(e.deltaX=(n-this.x2+l-this.sx2)/2,e.deltaY=(s-this.y2+o-this.sy2)/2):(e.deltaX=0,e.deltaY=0),this.twoFingerPressMove.dispatch(e,this.element),this.sx2=l,this.sy2=o}else{if(null!==this.x2){e.deltaX=n-this.x2,e.deltaY=s-this.y2;var a=Math.abs(this.x1-this.x2),h=Math.abs(this.y1-this.y2);(a>10||h>10)&&(this._preventTap=!0)}else e.deltaX=0,e.deltaY=0;this.pressMove.dispatch(e,this.element)}this.touchMove.dispatch(e,this.element),this._cancelLongTap(),this.x2=n,this.y2=s,i>1&&e.preventDefault()}}},{key:"end",value:function(e){if(e.changedTouches){this._cancelLongTap();var t=this;e.touches.length<2&&(this.multipointEnd.dispatch(e,this.element),this.sx2=this.sy2=null),this.x2&&Math.abs(this.x1-this.x2)>30||this.y2&&Math.abs(this.y1-this.y2)>30?(e.direction=this._swipeDirection(this.x1,this.x2,this.y1,this.y2),this.swipeTimeout=setTimeout((function(){t.swipe.dispatch(e,t.element)}),0)):(this.tapTimeout=setTimeout((function(){t._preventTap||t.tap.dispatch(e,t.element),t.isDoubleTap&&(t.doubleTap.dispatch(e,t.element),t.isDoubleTap=!1)}),0),t.isDoubleTap||(t.singleTapTimeout=setTimeout((function(){t.singleTap.dispatch(e,t.element)}),250))),this.touchEnd.dispatch(e,this.element),this.preV.x=0,this.preV.y=0,this.zoom=1,this.pinchStartLen=null,this.x1=this.x2=this.y1=this.y2=null}}},{key:"cancelAll",value:function(){this._preventTap=!0,clearTimeout(this.singleTapTimeout),clearTimeout(this.tapTimeout),clearTimeout(this.longTapTimeout),clearTimeout(this.swipeTimeout)}},{key:"cancel",value:function(e){this.cancelAll(),this.touchCancel.dispatch(e,this.element)}},{key:"_cancelLongTap",value:function(){clearTimeout(this.longTapTimeout)}},{key:"_cancelSingleTap",value:function(){clearTimeout(this.singleTapTimeout)}},{key:"_swipeDirection",value:function(e,t,i,n){return Math.abs(e-t)>=Math.abs(i-n)?e-t>0?"Left":"Right":i-n>0?"Up":"Down"}},{key:"on",value:function(e,t){this[e]&&this[e].add(t)}},{key:"off",value:function(e,t){this[e]&&this[e].del(t)}},{key:"destroy",value:function(){return this.singleTapTimeout&&clearTimeout(this.singleTapTimeout),this.tapTimeout&&clearTimeout(this.tapTimeout),this.longTapTimeout&&clearTimeout(this.longTapTimeout),this.swipeTimeout&&clearTimeout(this.swipeTimeout),this.element.removeEventListener("touchstart",this.start),this.element.removeEventListener("touchmove",this.move),this.element.removeEventListener("touchend",this.end),this.element.removeEventListener("touchcancel",this.cancel),this.rotate.del(),this.touchStart.del(),this.multipointStart.del(),this.multipointEnd.del(),this.pinch.del(),this.swipe.del(),this.tap.del(),this.doubleTap.del(),this.longTap.del(),this.singleTap.del(),this.pressMove.del(),this.twoFingerPressMove.del(),this.touchMove.del(),this.touchEnd.del(),this.touchCancel.del(),this.preV=this.pinchStartLen=this.zoom=this.isDoubleTap=this.delta=this.last=this.now=this.tapTimeout=this.singleTapTimeout=this.longTapTimeout=this.swipeTimeout=this.x1=this.x2=this.y1=this.y2=this.preTapPosition=this.rotate=this.touchStart=this.multipointStart=this.multipointEnd=this.pinch=this.swipe=this.tap=this.doubleTap=this.longTap=this.singleTap=this.pressMove=this.touchMove=this.touchEnd=this.touchCancel=this.twoFingerPressMove=null,window.removeEventListener("scroll",this._cancelAllHandler),null}}]),e}();function W(e){var t=function(){var e,t=document.createElement("fakeelement"),i={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in i)if(void 0!==t.style[e])return i[e]}(),i=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,n=c(e,"gslide-media")?e:e.querySelector(".gslide-media"),s=u(n,".ginner-container"),l=e.querySelector(".gslide-description");i>769&&(n=s),h(n,"greset"),v(n,"translate3d(0, 0, 0)"),a(t,{onElement:n,once:!0,withCallback:function(e,t){d(n,"greset")}}),n.style.opacity="",l&&(l.style.opacity="")}function B(e){if(e.events.hasOwnProperty("touch"))return!1;var t,i,n,s=y(),l=s.width,o=s.height,r=!1,a=null,g=null,f=null,p=!1,m=1,x=1,b=!1,S=!1,w=null,T=null,C=null,k=null,E=0,A=0,L=!1,I=!1,O={},P={},M=0,z=0,X=document.getElementById("glightbox-slider"),Y=document.querySelector(".goverlay"),q=new _(X,{touchStart:function(t){if(r=!0,(c(t.targetTouches[0].target,"ginner-container")||u(t.targetTouches[0].target,".gslide-desc")||"a"==t.targetTouches[0].target.nodeName.toLowerCase())&&(r=!1),u(t.targetTouches[0].target,".gslide-inline")&&!c(t.targetTouches[0].target.parentNode,"gslide-inline")&&(r=!1),r){if(P=t.targetTouches[0],O.pageX=t.targetTouches[0].pageX,O.pageY=t.targetTouches[0].pageY,M=t.targetTouches[0].clientX,z=t.targetTouches[0].clientY,a=e.activeSlide,g=a.querySelector(".gslide-media"),n=a.querySelector(".gslide-inline"),f=null,c(g,"gslide-image")&&(f=g.querySelector("img")),(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)>769&&(g=a.querySelector(".ginner-container")),d(Y,"greset"),t.pageX>20&&t.pageXo){var a=O.pageX-P.pageX;if(Math.abs(a)<=13)return!1}p=!0;var h,d=s.targetTouches[0].clientX,c=s.targetTouches[0].clientY,u=M-d,m=z-c;if(Math.abs(u)>Math.abs(m)?(L=!1,I=!0):(I=!1,L=!0),t=P.pageX-O.pageX,E=100*t/l,i=P.pageY-O.pageY,A=100*i/o,L&&f&&(h=1-Math.abs(i)/o,Y.style.opacity=h,e.settings.touchFollowAxis&&(E=0)),I&&(h=1-Math.abs(t)/l,g.style.opacity=h,e.settings.touchFollowAxis&&(A=0)),!f)return v(g,"translate3d(".concat(E,"%, 0, 0)"));v(g,"translate3d(".concat(E,"%, ").concat(A,"%, 0)"))}},touchEnd:function(){if(r){if(p=!1,S||b)return C=w,void(k=T);var t=Math.abs(parseInt(A)),i=Math.abs(parseInt(E));if(!(t>29&&f))return t<29&&i<25?(h(Y,"greset"),Y.style.opacity=1,W(g)):void 0;e.close()}},multipointEnd:function(){setTimeout((function(){b=!1}),50)},multipointStart:function(){b=!0,m=x||1},pinch:function(e){if(!f||p)return!1;b=!0,f.scaleX=f.scaleY=m*e.zoom;var t=m*e.zoom;if(S=!0,t<=1)return S=!1,t=1,k=null,C=null,w=null,T=null,void f.setAttribute("style","");t>4.5&&(t=4.5),f.style.transform="scale3d(".concat(t,", ").concat(t,", 1)"),x=t},pressMove:function(e){if(S&&!b){var t=P.pageX-O.pageX,i=P.pageY-O.pageY;C&&(t+=C),k&&(i+=k),w=t,T=i;var n="translate3d(".concat(t,"px, ").concat(i,"px, 0)");x&&(n+=" scale3d(".concat(x,", ").concat(x,", 1)")),v(f,n)}},swipe:function(t){if(!S)if(b)b=!1;else{if("Left"==t.direction){if(e.index==e.elements.length-1)return W(g);e.nextSlide()}if("Right"==t.direction){if(0==e.index)return W(g);e.prevSlide()}}}});e.events.touch=q}var H=function(){function e(i,n){var s=this,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t(this,e),this.img=i,this.slide=n,this.onclose=l,this.img.setZoomEvents)return!1;this.active=!1,this.zoomedIn=!1,this.dragging=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.img.addEventListener("mousedown",(function(e){return s.dragStart(e)}),!1),this.img.addEventListener("mouseup",(function(e){return s.dragEnd(e)}),!1),this.img.addEventListener("mousemove",(function(e){return s.drag(e)}),!1),this.img.addEventListener("click",(function(e){return s.slide.classList.contains("dragging-nav")?(s.zoomOut(),!1):s.zoomedIn?void(s.zoomedIn&&!s.dragging&&s.zoomOut()):s.zoomIn()}),!1),this.img.setZoomEvents=!0}return n(e,[{key:"zoomIn",value:function(){var e=this.widowWidth();if(!(this.zoomedIn||e<=768)){var t=this.img;if(t.setAttribute("data-style",t.getAttribute("style")),t.style.maxWidth=t.naturalWidth+"px",t.style.maxHeight=t.naturalHeight+"px",t.naturalWidth>e){var i=e/2-t.naturalWidth/2;this.setTranslate(this.img.parentNode,i,0)}this.slide.classList.add("zoomed"),this.zoomedIn=!0}}},{key:"zoomOut",value:function(){this.img.parentNode.setAttribute("style",""),this.img.setAttribute("style",this.img.getAttribute("data-style")),this.slide.classList.remove("zoomed"),this.zoomedIn=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.onclose&&"function"==typeof this.onclose&&this.onclose()}},{key:"dragStart",value:function(e){e.preventDefault(),this.zoomedIn?("touchstart"===e.type?(this.initialX=e.touches[0].clientX-this.xOffset,this.initialY=e.touches[0].clientY-this.yOffset):(this.initialX=e.clientX-this.xOffset,this.initialY=e.clientY-this.yOffset),e.target===this.img&&(this.active=!0,this.img.classList.add("dragging"))):this.active=!1}},{key:"dragEnd",value:function(e){var t=this;e.preventDefault(),this.initialX=this.currentX,this.initialY=this.currentY,this.active=!1,setTimeout((function(){t.dragging=!1,t.img.isDragging=!1,t.img.classList.remove("dragging")}),100)}},{key:"drag",value:function(e){this.active&&(e.preventDefault(),"touchmove"===e.type?(this.currentX=e.touches[0].clientX-this.initialX,this.currentY=e.touches[0].clientY-this.initialY):(this.currentX=e.clientX-this.initialX,this.currentY=e.clientY-this.initialY),this.xOffset=this.currentX,this.yOffset=this.currentY,this.img.isDragging=!0,this.dragging=!0,this.setTranslate(this.img,this.currentX,this.currentY))}},{key:"onMove",value:function(e){if(this.zoomedIn){var t=e.clientX-this.img.naturalWidth/2,i=e.clientY-this.img.naturalHeight/2;this.setTranslate(this.img,t,i)}}},{key:"setTranslate",value:function(e,t,i){e.style.transform="translate3d("+t+"px, "+i+"px, 0)"}},{key:"widowWidth",value:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}}]),e}(),V=function(){function e(){var i=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e);var s=n.dragEl,l=n.toleranceX,o=void 0===l?40:l,r=n.toleranceY,a=void 0===r?65:r,h=n.slide,d=void 0===h?null:h,c=n.instance,u=void 0===c?null:c;this.el=s,this.active=!1,this.dragging=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.direction=null,this.lastDirection=null,this.toleranceX=o,this.toleranceY=a,this.toleranceReached=!1,this.dragContainer=this.el,this.slide=d,this.instance=u,this.el.addEventListener("mousedown",(function(e){return i.dragStart(e)}),!1),this.el.addEventListener("mouseup",(function(e){return i.dragEnd(e)}),!1),this.el.addEventListener("mousemove",(function(e){return i.drag(e)}),!1)}return n(e,[{key:"dragStart",value:function(e){if(this.slide.classList.contains("zoomed"))this.active=!1;else{"touchstart"===e.type?(this.initialX=e.touches[0].clientX-this.xOffset,this.initialY=e.touches[0].clientY-this.yOffset):(this.initialX=e.clientX-this.xOffset,this.initialY=e.clientY-this.yOffset);var t=e.target.nodeName.toLowerCase();e.target.classList.contains("nodrag")||u(e.target,".nodrag")||-1!==["input","select","textarea","button","a"].indexOf(t)?this.active=!1:(e.preventDefault(),(e.target===this.el||"img"!==t&&u(e.target,".gslide-inline"))&&(this.active=!0,this.el.classList.add("dragging"),this.dragContainer=u(e.target,".ginner-container")))}}},{key:"dragEnd",value:function(e){var t=this;e&&e.preventDefault(),this.initialX=0,this.initialY=0,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.active=!1,this.doSlideChange&&(this.instance.preventOutsideClick=!0,"right"==this.doSlideChange&&this.instance.prevSlide(),"left"==this.doSlideChange&&this.instance.nextSlide()),this.doSlideClose&&this.instance.close(),this.toleranceReached||this.setTranslate(this.dragContainer,0,0,!0),setTimeout((function(){t.instance.preventOutsideClick=!1,t.toleranceReached=!1,t.lastDirection=null,t.dragging=!1,t.el.isDragging=!1,t.el.classList.remove("dragging"),t.slide.classList.remove("dragging-nav"),t.dragContainer.style.transform="",t.dragContainer.style.transition=""}),100)}},{key:"drag",value:function(e){if(this.active){e.preventDefault(),this.slide.classList.add("dragging-nav"),"touchmove"===e.type?(this.currentX=e.touches[0].clientX-this.initialX,this.currentY=e.touches[0].clientY-this.initialY):(this.currentX=e.clientX-this.initialX,this.currentY=e.clientY-this.initialY),this.xOffset=this.currentX,this.yOffset=this.currentY,this.el.isDragging=!0,this.dragging=!0,this.doSlideChange=!1,this.doSlideClose=!1;var t=Math.abs(this.currentX),i=Math.abs(this.currentY);if(t>0&&t>=Math.abs(this.currentY)&&(!this.lastDirection||"x"==this.lastDirection)){this.yOffset=0,this.lastDirection="x",this.setTranslate(this.dragContainer,this.currentX,0);var n=this.shouldChange();if(!this.instance.settings.dragAutoSnap&&n&&(this.doSlideChange=n),this.instance.settings.dragAutoSnap&&n)return this.instance.preventOutsideClick=!0,this.toleranceReached=!0,this.active=!1,this.instance.preventOutsideClick=!0,this.dragEnd(null),"right"==n&&this.instance.prevSlide(),void("left"==n&&this.instance.nextSlide())}if(this.toleranceY>0&&i>0&&i>=t&&(!this.lastDirection||"y"==this.lastDirection)){this.xOffset=0,this.lastDirection="y",this.setTranslate(this.dragContainer,0,this.currentY);var s=this.shouldClose();return!this.instance.settings.dragAutoSnap&&s&&(this.doSlideClose=!0),void(this.instance.settings.dragAutoSnap&&s&&this.instance.close())}}}},{key:"shouldChange",value:function(){var e=!1;if(Math.abs(this.currentX)>=this.toleranceX){var t=this.currentX>0?"right":"left";("left"==t&&this.slide!==this.slide.parentNode.lastChild||"right"==t&&this.slide!==this.slide.parentNode.firstChild)&&(e=t)}return e}},{key:"shouldClose",value:function(){var e=!1;return Math.abs(this.currentY)>=this.toleranceY&&(e=!0),e}},{key:"setTranslate",value:function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.style.transition=n?"all .2s ease":"",e.style.transform="translate3d(".concat(t,"px, ").concat(i,"px, 0)")}}]),e}();function j(e,t,i,n){var s=e.querySelector(".gslide-media"),l=new Image,o="gSlideTitle_"+i,r="gSlideDesc_"+i;l.addEventListener("load",(function(){T(n)&&n()}),!1),l.src=t.href,""!=t.sizes&&""!=t.srcset&&(l.sizes=t.sizes,l.srcset=t.srcset),l.alt="",I(t.alt)||""===t.alt||(l.alt=t.alt),""!==t.title&&l.setAttribute("aria-labelledby",o),""!==t.description&&l.setAttribute("aria-describedby",r),t.hasOwnProperty("_hasCustomWidth")&&t._hasCustomWidth&&(l.style.width=t.width),t.hasOwnProperty("_hasCustomHeight")&&t._hasCustomHeight&&(l.style.height=t.height),s.insertBefore(l,s.firstChild)}function F(e,t,i,n){var s=this,l=e.querySelector(".ginner-container"),o="gvideo"+i,r=e.querySelector(".gslide-media"),a=this.getAllPlayers();h(l,"gvideo-container"),r.insertBefore(m('
'),r.firstChild);var d=e.querySelector(".gvideo-wrapper");S(this.settings.plyr.css,"Plyr");var c=t.href,u=null==t?void 0:t.videoProvider,g=!1;r.style.maxWidth=t.width,S(this.settings.plyr.js,"Plyr",(function(){if(!u&&c.match(/vimeo\.com\/([0-9]*)/)&&(u="vimeo"),!u&&(c.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||c.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/)||c.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/))&&(u="youtube"),"local"===u||!u){u="local";var l='")}var r=g||m('
'));h(d,"".concat(u,"-video gvideo")),d.appendChild(r),d.setAttribute("data-id",o),d.setAttribute("data-index",i);var v=O(s.settings.plyr,"config")?s.settings.plyr.config:{},f=new Plyr("#"+o,v);f.on("ready",(function(e){a[o]=e.detail.plyr,T(n)&&n()})),b((function(){return e.querySelector("iframe")&&"true"==e.querySelector("iframe").dataset.ready}),(function(){s.resize(e)})),f.on("enterfullscreen",R),f.on("exitfullscreen",R)}))}function R(e){var t=u(e.target,".gslide-media");"enterfullscreen"===e.type&&h(t,"fullscreen"),"exitfullscreen"===e.type&&d(t,"fullscreen")}function G(e,t,i,n){var s,l=this,o=e.querySelector(".gslide-media"),r=!(!O(t,"href")||!t.href)&&t.href.split("#").pop().trim(),d=!(!O(t,"content")||!t.content)&&t.content;if(d&&(C(d)&&(s=m('
'.concat(d,"
"))),k(d))){"none"==d.style.display&&(d.style.display="block");var c=document.createElement("div");c.className="ginlined-content",c.appendChild(d),s=c}if(r){var u=document.getElementById(r);if(!u)return!1;var g=u.cloneNode(!0);g.style.height=t.height,g.style.maxWidth=t.width,h(g,"ginlined-content"),s=g}if(!s)return console.error("Unable to append inline slide content",t),!1;o.style.height=t.height,o.style.width=t.width,o.appendChild(s),this.events["inlineclose"+r]=a("click",{onElement:o.querySelectorAll(".gtrigger-close"),withCallback:function(e){e.preventDefault(),l.close()}}),T(n)&&n()}function Z(e,t,i,n){var s=e.querySelector(".gslide-media"),l=function(e){var t=e.url,i=e.allow,n=e.callback,s=e.appendTo,l=document.createElement("iframe");return l.className="vimeo-video gvideo",l.src=t,l.style.width="100%",l.style.height="100%",i&&l.setAttribute("allow",i),l.onload=function(){l.onload=null,h(l,"node-ready"),T(n)&&n()},s&&s.appendChild(l),l}({url:t.href,callback:n});s.parentNode.style.maxWidth=t.width,s.parentNode.style.height=t.height,s.appendChild(l)}var U=function(){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e),this.defaults={href:"",sizes:"",srcset:"",title:"",type:"",videoProvider:"",description:"",alt:"",descPosition:"bottom",effect:"",width:"",height:"",content:!1,zoomable:!0,draggable:!0},L(i)&&(this.defaults=l(this.defaults,i))}return n(e,[{key:"sourceType",value:function(e){var t=e;if(null!==(e=e.toLowerCase()).match(/\.(jpeg|jpg|jpe|gif|png|apn|webp|avif|svg)/))return"image";if(e.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||e.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/)||e.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/))return"video";if(e.match(/vimeo\.com\/([0-9]*)/))return"video";if(null!==e.match(/\.(mp4|ogg|webm|mov)/))return"video";if(null!==e.match(/\.(mp3|wav|wma|aac|ogg)/))return"audio";if(e.indexOf("#")>-1&&""!==t.split("#").pop().trim())return"inline";return e.indexOf("goajax=true")>-1?"ajax":"external"}},{key:"parseConfig",value:function(e,t){var i=this,n=l({descPosition:t.descPosition},this.defaults);if(L(e)&&!k(e)){O(e,"type")||(O(e,"content")&&e.content?e.type="inline":O(e,"href")&&(e.type=this.sourceType(e.href)));var s=l(n,e);return this.setSize(s,t),s}var r="",a=e.getAttribute("data-glightbox"),h=e.nodeName.toLowerCase();if("a"===h&&(r=e.href),"img"===h&&(r=e.src,n.alt=e.alt),n.href=r,o(n,(function(s,l){O(t,l)&&"width"!==l&&(n[l]=t[l]);var o=e.dataset[l];I(o)||(n[l]=i.sanitizeValue(o))})),n.content&&(n.type="inline"),!n.type&&r&&(n.type=this.sourceType(r)),I(a)){if(!n.title&&"a"==h){var d=e.title;I(d)||""===d||(n.title=d)}if(!n.title&&"img"==h){var c=e.alt;I(c)||""===c||(n.title=c)}}else{var u=[];o(n,(function(e,t){u.push(";\\s?"+t)})),u=u.join("\\s?:|"),""!==a.trim()&&o(n,(function(e,t){var s=a,l=new RegExp("s?"+t+"s?:s?(.*?)("+u+"s?:|$)"),o=s.match(l);if(o&&o.length&&o[1]){var r=o[1].trim().replace(/;\s*$/,"");n[t]=i.sanitizeValue(r)}}))}if(n.description&&"."===n.description.substring(0,1)){var g;try{g=document.querySelector(n.description).innerHTML}catch(e){if(!(e instanceof DOMException))throw e}g&&(n.description=g)}if(!n.description){var v=e.querySelector(".glightbox-desc");v&&(n.description=v.innerHTML)}return this.setSize(n,t,e),this.slideConfig=n,n}},{key:"setSize",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n="video"==e.type?this.checkSize(t.videosWidth):this.checkSize(t.width),s=this.checkSize(t.height);return e.width=O(e,"width")&&""!==e.width?this.checkSize(e.width):n,e.height=O(e,"height")&&""!==e.height?this.checkSize(e.height):s,i&&"image"==e.type&&(e._hasCustomWidth=!!i.dataset.width,e._hasCustomHeight=!!i.dataset.height),e}},{key:"checkSize",value:function(e){return M(e)?"".concat(e,"px"):e}},{key:"sanitizeValue",value:function(e){return"true"!==e&&"false"!==e?e:"true"===e}}]),e}(),$=function(){function e(i,n,s){t(this,e),this.element=i,this.instance=n,this.index=s}return n(e,[{key:"setContent",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(c(t,"loaded"))return!1;var n=this.instance.settings,s=this.slideConfig,l=w();T(n.beforeSlideLoad)&&n.beforeSlideLoad({index:this.index,slide:t,player:!1});var o=s.type,r=s.descPosition,a=t.querySelector(".gslide-media"),d=t.querySelector(".gslide-title"),u=t.querySelector(".gslide-desc"),g=t.querySelector(".gdesc-inner"),v=i,f="gSlideTitle_"+this.index,p="gSlideDesc_"+this.index;if(T(n.afterSlideLoad)&&(v=function(){T(i)&&i(),n.afterSlideLoad({index:e.index,slide:t,player:e.instance.getSlidePlayerInstance(e.index)})}),""==s.title&&""==s.description?g&&g.parentNode.parentNode.removeChild(g.parentNode):(d&&""!==s.title?(d.id=f,d.innerHTML=s.title):d.parentNode.removeChild(d),u&&""!==s.description?(u.id=p,l&&n.moreLength>0?(s.smallDescription=this.slideShortDesc(s.description,n.moreLength,n.moreText),u.innerHTML=s.smallDescription,this.descriptionEvents(u,s)):u.innerHTML=s.description):u.parentNode.removeChild(u),h(a.parentNode,"desc-".concat(r)),h(g.parentNode,"description-".concat(r))),h(a,"gslide-".concat(o)),h(t,"loaded"),"video"!==o){if("external"!==o)return"inline"===o?(G.apply(this.instance,[t,s,this.index,v]),void(s.draggable&&new V({dragEl:t.querySelector(".gslide-inline"),toleranceX:n.dragToleranceX,toleranceY:n.dragToleranceY,slide:t,instance:this.instance}))):void("image"!==o?T(v)&&v():j(t,s,this.index,(function(){var i=t.querySelector("img");s.draggable&&new V({dragEl:i,toleranceX:n.dragToleranceX,toleranceY:n.dragToleranceY,slide:t,instance:e.instance}),s.zoomable&&i.naturalWidth>i.offsetWidth&&(h(i,"zoomable"),new H(i,t,(function(){e.instance.resize()}))),T(v)&&v()})));Z.apply(this,[t,s,this.index,v])}else F.apply(this.instance,[t,s,this.index,v])}},{key:"slideShortDesc",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=document.createElement("div");n.innerHTML=e;var s=n.innerText,l=i;if((e=s.trim()).length<=t)return e;var o=e.substr(0,t-1);return l?(n=null,o+'... '+i+""):o}},{key:"descriptionEvents",value:function(e,t){var i=this,n=e.querySelector(".desc-more");if(!n)return!1;a("click",{onElement:n,withCallback:function(e,n){e.preventDefault();var s=document.body,l=u(n,".gslide-desc");if(!l)return!1;l.innerHTML=t.description,h(s,"gdesc-open");var o=a("click",{onElement:[s,u(l,".gslide-description")],withCallback:function(e,n){"a"!==e.target.nodeName.toLowerCase()&&(d(s,"gdesc-open"),h(s,"gdesc-closed"),l.innerHTML=t.smallDescription,i.descriptionEvents(l,t),setTimeout((function(){d(s,"gdesc-closed")}),400),o.destroy())}})}})}},{key:"create",value:function(){return m(this.instance.settings.slideHTML)}},{key:"getConfig",value:function(){k(this.element)||this.element.hasOwnProperty("draggable")||(this.element.draggable=this.instance.settings.draggable);var e=new U(this.instance.settings.slideExtraAttributes);return this.slideConfig=e.parseConfig(this.element,this.instance.settings),this.slideConfig}}]),e}(),J=w(),K=null!==w()||void 0!==document.createTouch||"ontouchstart"in window||"onmsgesturechange"in window||navigator.msMaxTouchPoints,Q=document.getElementsByTagName("html")[0],ee={selector:".glightbox",elements:null,skin:"clean",theme:"clean",closeButton:!0,startAt:null,autoplayVideos:!0,autofocusVideos:!0,descPosition:"bottom",width:"900px",height:"506px",videosWidth:"960px",beforeSlideChange:null,afterSlideChange:null,beforeSlideLoad:null,afterSlideLoad:null,slideInserted:null,slideRemoved:null,slideExtraAttributes:null,onOpen:null,onClose:null,loop:!1,zoomable:!0,draggable:!0,dragAutoSnap:!1,dragToleranceX:40,dragToleranceY:65,preload:!0,oneSlidePerOpen:!1,touchNavigation:!0,touchFollowAxis:!0,keyboardNavigation:!0,closeOnOutsideClick:!0,plugins:!1,plyr:{css:"https://cdn.plyr.io/3.6.12/plyr.css",js:"https://cdn.plyr.io/3.6.12/plyr.js",config:{ratio:"16:9",fullscreen:{enabled:!0,iosNative:!0},youtube:{noCookie:!0,rel:0,showinfo:0,iv_load_policy:3},vimeo:{byline:!1,portrait:!1,title:!1,transparent:!1}}},openEffect:"zoom",closeEffect:"zoom",slideEffect:"slide",moreText:"See more",moreLength:60,cssEfects:{fade:{in:"fadeIn",out:"fadeOut"},zoom:{in:"zoomIn",out:"zoomOut"},slide:{in:"slideInRight",out:"slideOutLeft"},slideBack:{in:"slideInLeft",out:"slideOutRight"},none:{in:"none",out:"none"}},svg:{close:'',next:' ',prev:''},slideHTML:'
\n
\n
\n
\n
\n
\n
\n

\n
\n
\n
\n
\n
\n
',lightboxHTML:''},te=function(){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e),this.customOptions=i,this.settings=l(ee,i),this.effectsClasses=this.getAnimationClasses(),this.videoPlayers={},this.apiEvents=[],this.fullElementsList=!1}return n(e,[{key:"init",value:function(){var e=this,t=this.getSelector();t&&(this.baseEvents=a("click",{onElement:t,withCallback:function(t,i){t.preventDefault(),e.open(i)}})),this.elements=this.getElements()}},{key:"open",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(0===this.elements.length)return!1;this.activeSlide=null,this.prevActiveSlideIndex=null,this.prevActiveSlide=null;var i=M(t)?t:this.settings.startAt;if(k(e)){var n=e.getAttribute("data-gallery");n&&(this.fullElementsList=this.elements,this.elements=this.getGalleryElements(this.elements,n)),I(i)&&(i=this.getElementIndex(e))<0&&(i=0)}M(i)||(i=0),this.build(),g(this.overlay,"none"===this.settings.openEffect?"none":this.settings.cssEfects.fade.in);var s=document.body,l=window.innerWidth-document.documentElement.clientWidth;if(l>0){var o=document.createElement("style");o.type="text/css",o.className="gcss-styles",o.innerText=".gscrollbar-fixer {margin-right: ".concat(l,"px}"),document.head.appendChild(o),h(s,"gscrollbar-fixer")}h(s,"glightbox-open"),h(Q,"glightbox-open"),J&&(h(document.body,"glightbox-mobile"),this.settings.slideEffect="slide"),this.showSlide(i,!0),1===this.elements.length?(h(this.prevButton,"glightbox-button-hidden"),h(this.nextButton,"glightbox-button-hidden")):(d(this.prevButton,"glightbox-button-hidden"),d(this.nextButton,"glightbox-button-hidden")),this.lightboxOpen=!0,this.trigger("open"),T(this.settings.onOpen)&&this.settings.onOpen(),K&&this.settings.touchNavigation&&B(this),this.settings.keyboardNavigation&&X(this)}},{key:"openAt",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.open(null,e)}},{key:"showSlide",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];f(this.loader),this.index=parseInt(t);var n=this.slidesContainer.querySelector(".current");n&&d(n,"current"),this.slideAnimateOut();var s=this.slidesContainer.querySelectorAll(".gslide")[t];if(c(s,"loaded"))this.slideAnimateIn(s,i),p(this.loader);else{f(this.loader);var l=this.elements[t],o={index:this.index,slide:s,slideNode:s,slideConfig:l.slideConfig,slideIndex:this.index,trigger:l.node,player:null};this.trigger("slide_before_load",o),l.instance.setContent(s,(function(){p(e.loader),e.resize(),e.slideAnimateIn(s,i),e.trigger("slide_after_load",o)}))}this.slideDescription=s.querySelector(".gslide-description"),this.slideDescriptionContained=this.slideDescription&&c(this.slideDescription.parentNode,"gslide-media"),this.settings.preload&&(this.preloadSlide(t+1),this.preloadSlide(t-1)),this.updateNavigationClasses(),this.activeSlide=s}},{key:"preloadSlide",value:function(e){var t=this;if(e<0||e>this.elements.length-1)return!1;if(I(this.elements[e]))return!1;var i=this.slidesContainer.querySelectorAll(".gslide")[e];if(c(i,"loaded"))return!1;var n=this.elements[e],s=n.type,l={index:e,slide:i,slideNode:i,slideConfig:n.slideConfig,slideIndex:e,trigger:n.node,player:null};this.trigger("slide_before_load",l),"video"===s||"external"===s?setTimeout((function(){n.instance.setContent(i,(function(){t.trigger("slide_after_load",l)}))}),200):n.instance.setContent(i,(function(){t.trigger("slide_after_load",l)}))}},{key:"prevSlide",value:function(){this.goToSlide(this.index-1)}},{key:"nextSlide",value:function(){this.goToSlide(this.index+1)}},{key:"goToSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.prevActiveSlide=this.activeSlide,this.prevActiveSlideIndex=this.index,!this.loop()&&(e<0||e>this.elements.length-1))return!1;e<0?e=this.elements.length-1:e>=this.elements.length&&(e=0),this.showSlide(e)}},{key:"insertSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;t<0&&(t=this.elements.length);var i=new $(e,this,t),n=i.getConfig(),s=l({},n),o=i.create(),r=this.elements.length-1;s.index=t,s.node=!1,s.instance=i,s.slideConfig=n,this.elements.splice(t,0,s);var a=null,h=null;if(this.slidesContainer){if(t>r)this.slidesContainer.appendChild(o);else{var d=this.slidesContainer.querySelectorAll(".gslide")[t];this.slidesContainer.insertBefore(o,d)}(this.settings.preload&&0==this.index&&0==t||this.index-1==t||this.index+1==t)&&this.preloadSlide(t),0===this.index&&0===t&&(this.index=1),this.updateNavigationClasses(),a=this.slidesContainer.querySelectorAll(".gslide")[t],h=this.getSlidePlayerInstance(t),s.slideNode=a}this.trigger("slide_inserted",{index:t,slide:a,slideNode:a,slideConfig:n,slideIndex:t,trigger:null,player:h}),T(this.settings.slideInserted)&&this.settings.slideInserted({index:t,slide:a,player:h})}},{key:"removeSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(e<0||e>this.elements.length-1)return!1;var t=this.slidesContainer&&this.slidesContainer.querySelectorAll(".gslide")[e];t&&(this.getActiveSlideIndex()==e&&(e==this.elements.length-1?this.prevSlide():this.nextSlide()),t.parentNode.removeChild(t)),this.elements.splice(e,1),this.trigger("slide_removed",e),T(this.settings.slideRemoved)&&this.settings.slideRemoved(e)}},{key:"slideAnimateIn",value:function(e,t){var i=this,n=e.querySelector(".gslide-media"),s=e.querySelector(".gslide-description"),l={index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,slideNode:this.prevActiveSlide,slideIndex:this.prevActiveSlide,slideConfig:I(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].slideConfig,trigger:I(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].node,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},o={index:this.index,slide:this.activeSlide,slideNode:this.activeSlide,slideConfig:this.elements[this.index].slideConfig,slideIndex:this.index,trigger:this.elements[this.index].node,player:this.getSlidePlayerInstance(this.index)};if(n.offsetWidth>0&&s&&(p(s),s.style.display=""),d(e,this.effectsClasses),t)g(e,this.settings.cssEfects[this.settings.openEffect].in,(function(){i.settings.autoplayVideos&&i.slidePlayerPlay(e),i.trigger("slide_changed",{prev:l,current:o}),T(i.settings.afterSlideChange)&&i.settings.afterSlideChange.apply(i,[l,o])}));else{var r=this.settings.slideEffect,a="none"!==r?this.settings.cssEfects[r].in:r;this.prevActiveSlideIndex>this.index&&"slide"==this.settings.slideEffect&&(a=this.settings.cssEfects.slideBack.in),g(e,a,(function(){i.settings.autoplayVideos&&i.slidePlayerPlay(e),i.trigger("slide_changed",{prev:l,current:o}),T(i.settings.afterSlideChange)&&i.settings.afterSlideChange.apply(i,[l,o])}))}setTimeout((function(){i.resize(e)}),100),h(e,"current")}},{key:"slideAnimateOut",value:function(){if(!this.prevActiveSlide)return!1;var e=this.prevActiveSlide;d(e,this.effectsClasses),h(e,"prev");var t=this.settings.slideEffect,i="none"!==t?this.settings.cssEfects[t].out:t;this.slidePlayerPause(e),this.trigger("slide_before_change",{prev:{index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,slideNode:this.prevActiveSlide,slideIndex:this.prevActiveSlideIndex,slideConfig:I(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].slideConfig,trigger:I(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].node,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},current:{index:this.index,slide:this.activeSlide,slideNode:this.activeSlide,slideIndex:this.index,slideConfig:this.elements[this.index].slideConfig,trigger:this.elements[this.index].node,player:this.getSlidePlayerInstance(this.index)}}),T(this.settings.beforeSlideChange)&&this.settings.beforeSlideChange.apply(this,[{index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},{index:this.index,slide:this.activeSlide,player:this.getSlidePlayerInstance(this.index)}]),this.prevActiveSlideIndex>this.index&&"slide"==this.settings.slideEffect&&(i=this.settings.cssEfects.slideBack.out),g(e,i,(function(){var t=e.querySelector(".ginner-container"),i=e.querySelector(".gslide-media"),n=e.querySelector(".gslide-description");t.style.transform="",i.style.transform="",d(i,"greset"),i.style.opacity="",n&&(n.style.opacity=""),d(e,"prev")}))}},{key:"getAllPlayers",value:function(){return this.videoPlayers}},{key:"getSlidePlayerInstance",value:function(e){var t="gvideo"+e,i=this.getAllPlayers();return!(!O(i,t)||!i[t])&&i[t]}},{key:"stopSlideVideo",value:function(e){if(k(e)){var t=e.querySelector(".gvideo-wrapper");t&&(e=t.getAttribute("data-index"))}console.log("stopSlideVideo is deprecated, use slidePlayerPause");var i=this.getSlidePlayerInstance(e);i&&i.playing&&i.pause()}},{key:"slidePlayerPause",value:function(e){if(k(e)){var t=e.querySelector(".gvideo-wrapper");t&&(e=t.getAttribute("data-index"))}var i=this.getSlidePlayerInstance(e);i&&i.playing&&i.pause()}},{key:"playSlideVideo",value:function(e){if(k(e)){var t=e.querySelector(".gvideo-wrapper");t&&(e=t.getAttribute("data-index"))}console.log("playSlideVideo is deprecated, use slidePlayerPlay");var i=this.getSlidePlayerInstance(e);i&&!i.playing&&i.play()}},{key:"slidePlayerPlay",value:function(e){var t;if(!J||null!==(t=this.settings.plyr.config)&&void 0!==t&&t.muted){if(k(e)){var i=e.querySelector(".gvideo-wrapper");i&&(e=i.getAttribute("data-index"))}var n=this.getSlidePlayerInstance(e);n&&!n.playing&&(n.play(),this.settings.autofocusVideos&&n.elements.container.focus())}}},{key:"setElements",value:function(e){var t=this;this.settings.elements=!1;var i=[];e&&e.length&&o(e,(function(e,n){var s=new $(e,t,n),o=s.getConfig(),r=l({},o);r.slideConfig=o,r.instance=s,r.index=n,i.push(r)})),this.elements=i,this.lightboxOpen&&(this.slidesContainer.innerHTML="",this.elements.length&&(o(this.elements,(function(){var e=m(t.settings.slideHTML);t.slidesContainer.appendChild(e)})),this.showSlide(0,!0)))}},{key:"getElementIndex",value:function(e){var t=!1;return o(this.elements,(function(i,n){if(O(i,"node")&&i.node==e)return t=n,!0})),t}},{key:"getElements",value:function(){var e=this,t=[];this.elements=this.elements?this.elements:[],!I(this.settings.elements)&&E(this.settings.elements)&&this.settings.elements.length&&o(this.settings.elements,(function(i,n){var s=new $(i,e,n),o=s.getConfig(),r=l({},o);r.node=!1,r.index=n,r.instance=s,r.slideConfig=o,t.push(r)}));var i=!1;return this.getSelector()&&(i=document.querySelectorAll(this.getSelector())),i?(o(i,(function(i,n){var s=new $(i,e,n),o=s.getConfig(),r=l({},o);r.node=i,r.index=n,r.instance=s,r.slideConfig=o,r.gallery=i.getAttribute("data-gallery"),t.push(r)})),t):t}},{key:"getGalleryElements",value:function(e,t){return e.filter((function(e){return e.gallery==t}))}},{key:"getSelector",value:function(){return!this.settings.elements&&(this.settings.selector&&"data-"==this.settings.selector.substring(0,5)?"*[".concat(this.settings.selector,"]"):this.settings.selector)}},{key:"getActiveSlide",value:function(){return this.slidesContainer.querySelectorAll(".gslide")[this.index]}},{key:"getActiveSlideIndex",value:function(){return this.index}},{key:"getAnimationClasses",value:function(){var e=[];for(var t in this.settings.cssEfects)if(this.settings.cssEfects.hasOwnProperty(t)){var i=this.settings.cssEfects[t];e.push("g".concat(i.in)),e.push("g".concat(i.out))}return e.join(" ")}},{key:"build",value:function(){var e=this;if(this.built)return!1;var t=document.body.childNodes,i=[];o(t,(function(e){e.parentNode==document.body&&"#"!==e.nodeName.charAt(0)&&e.hasAttribute&&!e.hasAttribute("aria-hidden")&&(i.push(e),e.setAttribute("aria-hidden","true"))}));var n=O(this.settings.svg,"next")?this.settings.svg.next:"",s=O(this.settings.svg,"prev")?this.settings.svg.prev:"",l=O(this.settings.svg,"close")?this.settings.svg.close:"",r=this.settings.lightboxHTML;r=m(r=(r=(r=r.replace(/{nextSVG}/g,n)).replace(/{prevSVG}/g,s)).replace(/{closeSVG}/g,l)),document.body.appendChild(r);var d=document.getElementById("glightbox-body");this.modal=d;var g=d.querySelector(".gclose");this.prevButton=d.querySelector(".gprev"),this.nextButton=d.querySelector(".gnext"),this.overlay=d.querySelector(".goverlay"),this.loader=d.querySelector(".gloader"),this.slidesContainer=document.getElementById("glightbox-slider"),this.bodyHiddenChildElms=i,this.events={},h(this.modal,"glightbox-"+this.settings.skin),this.settings.closeButton&&g&&(this.events.close=a("click",{onElement:g,withCallback:function(t,i){t.preventDefault(),e.close()}})),g&&!this.settings.closeButton&&g.parentNode.removeChild(g),this.nextButton&&(this.events.next=a("click",{onElement:this.nextButton,withCallback:function(t,i){t.preventDefault(),e.nextSlide()}})),this.prevButton&&(this.events.prev=a("click",{onElement:this.prevButton,withCallback:function(t,i){t.preventDefault(),e.prevSlide()}})),this.settings.closeOnOutsideClick&&(this.events.outClose=a("click",{onElement:d,withCallback:function(t,i){e.preventOutsideClick||c(document.body,"glightbox-mobile")||u(t.target,".ginner-container")||u(t.target,".gbtn")||c(t.target,"gnext")||c(t.target,"gprev")||e.close()}})),o(this.elements,(function(t,i){e.slidesContainer.appendChild(t.instance.create()),t.slideNode=e.slidesContainer.querySelectorAll(".gslide")[i]})),K&&h(document.body,"glightbox-touch"),this.events.resize=a("resize",{onElement:window,withCallback:function(){e.resize()}}),this.built=!0}},{key:"resize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if((e=e||this.activeSlide)&&!c(e,"zoomed")){var t=y(),i=e.querySelector(".gvideo-wrapper"),n=e.querySelector(".gslide-image"),s=this.slideDescription,l=t.width,o=t.height;if(l<=768?h(document.body,"glightbox-mobile"):d(document.body,"glightbox-mobile"),i||n){var r=!1;if(s&&(c(s,"description-bottom")||c(s,"description-top"))&&!c(s,"gabsolute")&&(r=!0),n)if(l<=768)n.querySelector("img");else if(r){var a=s.offsetHeight,u=n.querySelector("img");u.setAttribute("style","max-height: calc(100vh - ".concat(a,"px)")),s.setAttribute("style","max-width: ".concat(u.offsetWidth,"px;"))}if(i){var g=O(this.settings.plyr.config,"ratio")?this.settings.plyr.config.ratio:"";if(!g){var v=i.clientWidth,f=i.clientHeight,p=v/f;g="".concat(v/p,":").concat(f/p)}var m=g.split(":"),x=this.settings.videosWidth,b=this.settings.videosWidth,S=(b=M(x)||-1!==x.indexOf("px")?parseInt(x):-1!==x.indexOf("vw")?l*parseInt(x)/100:-1!==x.indexOf("vh")?o*parseInt(x)/100:-1!==x.indexOf("%")?l*parseInt(x)/100:parseInt(i.clientWidth))/(parseInt(m[0])/parseInt(m[1]));if(S=Math.floor(S),r&&(o-=s.offsetHeight),b>l||S>o||ob){var w=i.offsetWidth,T=i.offsetHeight,C=o/T,k={width:w*C,height:T*C};i.parentNode.setAttribute("style","max-width: ".concat(k.width,"px")),r&&s.setAttribute("style","max-width: ".concat(k.width,"px;"))}else i.parentNode.style.maxWidth="".concat(x),r&&s.setAttribute("style","max-width: ".concat(x,";"))}}}}},{key:"reload",value:function(){this.init()}},{key:"updateNavigationClasses",value:function(){var e=this.loop();d(this.nextButton,"disabled"),d(this.prevButton,"disabled"),0==this.index&&this.elements.length-1==0?(h(this.prevButton,"disabled"),h(this.nextButton,"disabled")):0!==this.index||e?this.index!==this.elements.length-1||e||h(this.nextButton,"disabled"):h(this.prevButton,"disabled")}},{key:"loop",value:function(){var e=O(this.settings,"loopAtEnd")?this.settings.loopAtEnd:null;return e=O(this.settings,"loop")?this.settings.loop:e,e}},{key:"close",value:function(){var e=this;if(!this.lightboxOpen){if(this.events){for(var t in this.events)this.events.hasOwnProperty(t)&&this.events[t].destroy();this.events=null}return!1}if(this.closing)return!1;this.closing=!0,this.slidePlayerPause(this.activeSlide),this.fullElementsList&&(this.elements=this.fullElementsList),this.bodyHiddenChildElms.length&&o(this.bodyHiddenChildElms,(function(e){e.removeAttribute("aria-hidden")})),h(this.modal,"glightbox-closing"),g(this.overlay,"none"==this.settings.openEffect?"none":this.settings.cssEfects.fade.out),g(this.activeSlide,this.settings.cssEfects[this.settings.closeEffect].out,(function(){if(e.activeSlide=null,e.prevActiveSlideIndex=null,e.prevActiveSlide=null,e.built=!1,e.events){for(var t in e.events)e.events.hasOwnProperty(t)&&e.events[t].destroy();e.events=null}var i=document.body;d(Q,"glightbox-open"),d(i,"glightbox-open touching gdesc-open glightbox-touch glightbox-mobile gscrollbar-fixer"),e.modal.parentNode.removeChild(e.modal),e.trigger("close"),T(e.settings.onClose)&&e.settings.onClose();var n=document.querySelector(".gcss-styles");n&&n.parentNode.removeChild(n),e.lightboxOpen=!1,e.closing=null}))}},{key:"destroy",value:function(){this.close(),this.clearAllEvents(),this.baseEvents&&this.baseEvents.destroy()}},{key:"on",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||!T(t))throw new TypeError("Event name and callback must be defined");this.apiEvents.push({evt:e,once:i,callback:t})}},{key:"once",value:function(e,t){this.on(e,t,!0)}},{key:"trigger",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=[];o(this.apiEvents,(function(t,s){var l=t.evt,o=t.once,r=t.callback;l==e&&(r(i),o&&n.push(s))})),n.length&&o(n,(function(e){return t.apiEvents.splice(e,1)}))}},{key:"clearAllEvents",value:function(){this.apiEvents.splice(0,this.apiEvents.length)}},{key:"version",value:function(){return"3.1.0"}}]),e}();return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new te(e);return t.init(),t}})); \ No newline at end of file diff --git a/site/guidelines-authors.qmd b/site/guidelines-authors.qmd index 9a2739a..189377c 100644 --- a/site/guidelines-authors.qmd +++ b/site/guidelines-authors.qmd @@ -9,6 +9,9 @@ format: fig-align: "center" page-layout: article bibliography: ../publications/published.bib +filters: + - lightbox +lightbox: auto --- ## A step-by-step guide to submitting a paper to Computo {#sec-guide} From ab28e97181ac07e88a604de73b3219b0d557c692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-David=20Collin?= Date: Fri, 12 Sep 2025 13:55:31 +0200 Subject: [PATCH 07/13] Enhance GitHub Actions workflow with forced run option and update publication handling --- .github/workflows/build.yml | 29 +++++++++++++++++++++++++++++ _quarto.yml | 1 - 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f312232..a716be5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,15 +8,44 @@ on: branches: - master workflow_dispatch: + inputs: + force: + description: 'Set to "true" to mark this run as forced when manually triggered' + required: false + default: 'false' jobs: build: + # Skip this job on push events when the head commit message contains [skip ci] + if: ${{ github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]') }} + permissions: + contents: write runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 + with: + fetch-depth: 0 + persist-credentials: true - name: Setup Quarto uses: quarto-dev/quarto-actions/setup@v2 + - name: refresh publications and commit changes + if: ${{ github.event_name == 'workflow_dispatch' || github.event.inputs.force == 'true' }} + run: | + dotnet fsi getcomputo-pub.fsx + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + # Stage the generated files (ignore errors if files missing) + git add site/published.yml site/pipeline.yml site/mock-papers.yml || true + # Only commit if there are staged changes + if git diff --staged --quiet; then + echo "No publication changes to commit" + else + git commit -m "Update publications from getcomputo-pub.fsx [skip ci]" + # push to the branch that triggered the workflow + git push origin HEAD:${{ github.ref_name }} + fi + - name: Build site uses: quarto-dev/quarto-actions/render@v2 - name: Upload artifact diff --git a/_quarto.yml b/_quarto.yml index 7724844..f61cab8 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -1,7 +1,6 @@ project: type: website output-dir: _site -# pre-render: dotnet fsi getcomputo-pub.fsx website: title: COMPUTO site-url: https://computo.sfds.asso.fr/ From 48e7e923e1a4c96a485e275745eb7b24545afc4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-David=20Collin?= Date: Fri, 12 Sep 2025 14:03:13 +0200 Subject: [PATCH 08/13] Remove unnecessary callout formatting from README.md [skip ci] --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index d7c9a90..d15feab 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,9 @@ This repository stores the source of Computorg. Our website has been built with [Quarto](https://quarto.org), an open-source scientific and technical publishing system. The first thing you need to compile the website is therefore to install Quarto, which can be done by downloading the corresponing installer here: . -::: {.callout-note} ## Positron If you are using the new [Positron IDE](https://positron.posit.co), quarto is already bundled with it. You can simply type `which quarto` within the built-in terminal in Positron and add the returned path to your `PATH`. -::: ### Microsoft DotNet SDK From cf51c93f72c10af9731e58c7f7fa700c5eaef05b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-David=20Collin?= Date: Fri, 12 Sep 2025 14:08:24 +0200 Subject: [PATCH 09/13] Comment out QUARTO_PROJECT_RENDER_ALL exit check in getcomputo-pub.fsx --- getcomputo-pub.fsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/getcomputo-pub.fsx b/getcomputo-pub.fsx index 237fd21..aeddb8a 100644 --- a/getcomputo-pub.fsx +++ b/getcomputo-pub.fsx @@ -15,9 +15,9 @@ open DrBiber open System.Threading.Tasks // exit if QUARTO_PROJECT_RENDER_ALL is set in the environment -if System.Environment.GetEnvironmentVariable("QUARTO_PROJECT_RENDER_ALL") = null then - printfn "QUARTO_PROJECT_RENDER_ALL is not set, exiting." - exit 0 +// if System.Environment.GetEnvironmentVariable("QUARTO_PROJECT_RENDER_ALL") = null then +// printfn "QUARTO_PROJECT_RENDER_ALL is not set, exiting." +// exit 0 // Load environment variables from .env file Env.Load(".env-secret") From 0e1429e13f5ce3400e995ce7bee25728cc9e94ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-David=20Collin?= Date: Fri, 12 Sep 2025 14:15:23 +0200 Subject: [PATCH 10/13] Update environment variable for GitHub token to API_GITHUB_TOKEN because GITHUB_* is forbidden for repo secrets [skip ci] --- getcomputo-pub.fsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/getcomputo-pub.fsx b/getcomputo-pub.fsx index aeddb8a..f58321d 100644 --- a/getcomputo-pub.fsx +++ b/getcomputo-pub.fsx @@ -24,7 +24,7 @@ Env.Load(".env-secret") let client = let client = new GitHubClient(new ProductHeaderValue("computo")) // Using environment variable for token is a good security practice - match System.Environment.GetEnvironmentVariable("GITHUB_TOKEN") with + match System.Environment.GetEnvironmentVariable("API_GITHUB_TOKEN") with | null | "" -> client // No authentication | token -> From ddda1c1e81ad1791089a39fc619f72b5bcb52046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-David=20Collin?= Date: Fri, 12 Sep 2025 14:51:06 +0200 Subject: [PATCH 11/13] Add API_GITHUB_TOKEN environment variable for publication refresh step --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a716be5..21ae22e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,6 +31,8 @@ jobs: uses: quarto-dev/quarto-actions/setup@v2 - name: refresh publications and commit changes if: ${{ github.event_name == 'workflow_dispatch' || github.event.inputs.force == 'true' }} + env: + API_GITHUB_TOKEN: ${{ secrets.API_GITHUB_TOKEN }} run: | dotnet fsi getcomputo-pub.fsx git config user.name "github-actions[bot]" From 6d861b1634490795a60c29446e6d3b3a2535ff0c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 12 Sep 2025 12:52:33 +0000 Subject: [PATCH 12/13] Update publications from getcomputo-pub.fsx [skip ci] --- site/mock-papers.yml | 154 +++++- site/published.yml | 1250 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 1350 insertions(+), 54 deletions(-) diff --git a/site/mock-papers.yml b/site/mock-papers.yml index c9915cd..d4e923d 100644 --- a/site/mock-papers.yml +++ b/site/mock-papers.yml @@ -1,4 +1,69 @@ -- abstract': >- +- abstract'@: >- + We present a new technique called “t-SNE” that visualizes + high-dimensional data by giving each datapoint a location in a two + or three-dimensional map. The technique is a variation of Stochastic + Neighbor Embedding {[}@hinton:stochastic{]} that is much easier to + optimize, and produces significantly better visualizations by + reducing the tendency to crowd points together in the center of the + map. t-SNE is better than existing techniques at creating a single + map that reveals structure at many different scales. This is + particularly important for high-dimensional data that lie on several + different, but related, low-dimensional manifolds, such as images of + objects from multiple classes seen from multiple viewpoints. For + visualizing the structure of very large data sets, we show how t-SNE + can use random walks on neighborhood graphs to allow the implicit + structure of all the data to influence the way in which a subset of + the data is displayed. We illustrate the performance of t-SNE on a + wide variety of data sets and compare it with many other + non-parametric visualization techniques, including Sammon mapping, + Isomap, and Locally Linear Embedding. The visualization produced by + t-SNE are significantly better than those produced by other + techniques on almost all of the data sets. + authors@: Laurens van der Maaten and Geoffrey Hinton + bibtex@: >+ + @article{van_der_maaten2008, + author = {van der Maaten, Laurens and Hinton, Geoffrey}, + publisher = {French Statistical Society}, + title = {Visualizing {Data} Using {t-SNE} (Mock Contributon)}, + journal = {Computo}, + date = {2008-08-11}, + doi = {10.57750/xxxxxx}, + issn = {2824-7795}, + langid = {en}, + abstract = {We present a new technique called “t-SNE” that visualizes + high-dimensional data by giving each datapoint a location in a two + or three-dimensional map. The technique is a variation of Stochastic + Neighbor Embedding {[}@hinton:stochastic{]} that is much easier to + optimize, and produces significantly better visualizations by + reducing the tendency to crowd points together in the center of the + map. t-SNE is better than existing techniques at creating a single + map that reveals structure at many different scales. This is + particularly important for high-dimensional data that lie on several + different, but related, low-dimensional manifolds, such as images of + objects from multiple classes seen from multiple viewpoints. For + visualizing the structure of very large data sets, we show how t-SNE + can use random walks on neighborhood graphs to allow the implicit + structure of all the data to influence the way in which a subset of + the data is displayed. We illustrate the performance of t-SNE on a + wide variety of data sets and compare it with many other + non-parametric visualization techniques, including Sammon mapping, + Isomap, and Locally Linear Embedding. The visualization produced by + t-SNE are significantly better than those produced by other + techniques on almost all of the data sets.} + } + + date@: 2008-08-11 + description@: > + This page is a reworking of the original t-SNE article using the Computo template. It aims to help authors submitting to the journal by using some advanced formatting features. We warmly thank the authors of t-SNE and the editor of JMLR for allowing us to use their work to illustrate the Computo spirit. + doi@: 10.57750/xxxxxx + draft@: false + journal@: Computo + pdf@: '' + repo@: published-paper-tsne + title@: Visualizing Data using t-SNE (mock contributon) + url@: '' + year@: 2008 + abstract': >- We present a new technique called “t-SNE” that visualizes high-dimensional data by giving each datapoint a location in a two or three-dimensional map. The technique is a variation of Stochastic @@ -23,12 +88,11 @@ bibtex: >+ @article{van_der_maaten2008, author = {van der Maaten, Laurens and Hinton, Geoffrey}, - publisher = {Société Française de Statistique}, - title = {Visualizing {Data} Using {t-SNE:} A Practical Computo Example - (Mock)}, + publisher = {French Statistical Society}, + title = {Visualizing {Data} Using {t-SNE} (Mock Contributon)}, journal = {Computo}, date = {2008-08-11}, - url = {https://computo.sfds.asso.fr/published-paper-tsne}, + doi = {10.57750/xxxxxx}, issn = {2824-7795}, langid = {en}, abstract = {We present a new technique called “t-SNE” that visualizes @@ -56,15 +120,80 @@ date: 2008-08-11 description: > This page is a reworking of the original t-SNE article using the Computo template. It aims to help authors submitting to the journal by using some advanced formatting features. We warmly thank the authors of t-SNE and the editor of JMLR for allowing us to use their work to illustrate the Computo spirit. - doi: '' + doi: 10.57750/xxxxxx draft: false journal: Computo pdf: '' repo: published-paper-tsne title: Visualizing Data using t-SNE (mock contributon) - url: https://computo-journal.org/published-paper-tsne + url: '' year: 2008 -- abstract': >- +- abstract'@: >- + We present a new technique called “t-SNE” that visualizes + high-dimensional data by giving each datapoint a location in a two + or three-dimensional map. The technique is a variation of Stochastic + Neighbor Embeddi{[}@hinton:stochastic{]} that is much easier to + optimize, and produces significantly better visualizations by + reducing the tendency to crowd points together in the center of the + map. t-SNE is better than existing techniques at creating a single + map that reveals structure at many different scales. This is + particularly important for high-dimensional data that lie on several + different, but related, low-dimensional manifolds, such as images of + objects from multiple classes seen from multiple viewpoints. For + visualizing the structure of very large data sets, we show how t-SNE + can use random walks on neighborhood graphs to allow the implicit + structure of all the data to influence the way in which a subset of + the data is displayed. We illustrate the performance of t-SNE on a + wide variety of data sets and compare it with many other + non-parametric visualization techniques, including Sammon mapping, + Isomap, and Locally Linear Embedding. The visualization produced by + t-SNE are significantly better than those produced by other + techniques on almost all of the data sets. + authors@: Laurens van der Maaten and Geoffrey Hinton + bibtex@: >+ + @article{van_der_maaten2008, + author = {van der Maaten, Laurens and Hinton, Geoffrey}, + publisher = {French Statistical Society}, + title = {Visualizing {Data} Using {t-SNE} (Mock Contributon)}, + journal = {Computo}, + date = {2008-08-11}, + doi = {10.57750/xxxxxx}, + issn = {2824-7795}, + langid = {en}, + abstract = {We present a new technique called “t-SNE” that visualizes + high-dimensional data by giving each datapoint a location in a two + or three-dimensional map. The technique is a variation of Stochastic + Neighbor Embeddi{[}@hinton:stochastic{]} that is much easier to + optimize, and produces significantly better visualizations by + reducing the tendency to crowd points together in the center of the + map. t-SNE is better than existing techniques at creating a single + map that reveals structure at many different scales. This is + particularly important for high-dimensional data that lie on several + different, but related, low-dimensional manifolds, such as images of + objects from multiple classes seen from multiple viewpoints. For + visualizing the structure of very large data sets, we show how t-SNE + can use random walks on neighborhood graphs to allow the implicit + structure of all the data to influence the way in which a subset of + the data is displayed. We illustrate the performance of t-SNE on a + wide variety of data sets and compare it with many other + non-parametric visualization techniques, including Sammon mapping, + Isomap, and Locally Linear Embedding. The visualization produced by + t-SNE are significantly better than those produced by other + techniques on almost all of the data sets.} + } + + date@: 2008-08-11 + description@: > + This page is a reworking of the original t-SNE article using the Computo template. It aims to help authors submitting to the journal by using some advanced formatting features. We warmly thank the authors of t-SNE and the editor of JMLR for allowing us to use their work to illustrate the Computo spirit. + doi@: 10.57750/xxxxxx + draft@: false + journal@: Computo + pdf@: '' + repo@: published-paper-tsne-R + title@: Visualizing Data using t-SNE (mock contributon) + url@: '' + year@: 2008 + abstract': >- We present a new technique called “t-SNE” that visualizes high-dimensional data by giving each datapoint a location in a two or three-dimensional map. The technique is a variation of Stochastic @@ -90,11 +219,10 @@ @article{van_der_maaten2008, author = {van der Maaten, Laurens and Hinton, Geoffrey}, publisher = {French Statistical Society}, - title = {Visualizing {Data} Using {t-SNE:} A Practical {Computo} - Example (Mock)}, + title = {Visualizing {Data} Using {t-SNE} (Mock Contributon)}, journal = {Computo}, date = {2008-08-11}, - url = {https://computo-journal.org/published-paper-tsne-R}, + doi = {10.57750/xxxxxx}, issn = {2824-7795}, langid = {en}, abstract = {We present a new technique called “t-SNE” that visualizes @@ -122,11 +250,11 @@ date: 2008-08-11 description: > This page is a reworking of the original t-SNE article using the Computo template. It aims to help authors submitting to the journal by using some advanced formatting features. We warmly thank the authors of t-SNE and the editor of JMLR for allowing us to use their work to illustrate the Computo spirit. - doi: '' + doi: 10.57750/xxxxxx draft: false journal: Computo pdf: '' repo: published-paper-tsne-R title: Visualizing Data using t-SNE (mock contributon) - url: https://computo-journal.org/published-paper-tsne-R + url: '' year: 2008 diff --git a/site/published.yml b/site/published.yml index c2d8746..264ec1c 100644 --- a/site/published.yml +++ b/site/published.yml @@ -1,4 +1,133 @@ -- abstract': >- +- abstract'@: >- + This study investigates the use of Variational + Auto-Encoders to build a simulator that approximates the law of + genuine observations. Using both simulated and real data in + scenarios involving counterfactuality, we discuss the general task + of evaluating a simulator’s quality, with a focus on comparisons of + statistical properties and predictive performance. While the + simulator built from simulated data shows minor discrepancies, the + results with real data reveal more substantial challenges. Beyond + the technical analysis, we reflect on the broader implications of + simulator design, and consider its role in modeling reality. + authors@: Sandrine Boulet and Antoine Chambaz + bibtex@: >+ + @article{boulet2025, + author = {Boulet, Sandrine and Chambaz, Antoine}, + publisher = {French Statistical Society}, + title = {Draw {Me} a {Simulator}}, + journal = {Computo}, + date = {2025-09-08}, + doi = {10.57750/w1hj-dw22}, + issn = {2824-7795}, + langid = {en}, + abstract = {This study investigates the use of Variational + Auto-Encoders to build a simulator that approximates the law of + genuine observations. Using both simulated and real data in + scenarios involving counterfactuality, we discuss the general task + of evaluating a simulator’s quality, with a focus on comparisons of + statistical properties and predictive performance. While the + simulator built from simulated data shows minor discrepancies, the + results with real data reveal more substantial challenges. Beyond + the technical analysis, we reflect on the broader implications of + simulator design, and consider its role in modeling reality.} + } + + date@: 2025-09-08 + description@: '' + doi@: 10.57750/w1hj-dw22 + draft@: false + journal@: Computo + pdf@: '' + repo@: published-202509-boulet-simulator + title@: Draw Me a Simulator + url@: '' + year@: 2025 + abstract': >- + This study investigates the use of Variational + Auto-Encoders to build a simulator that approximates the law of + genuine observations. Using both simulated and real data in + scenarios involving counterfactuality, we discuss the general task + of evaluating a simulator’s quality, with a focus on comparisons of + statistical properties and predictive performance. While the + simulator built from simulated data shows minor discrepancies, the + results with real data reveal more substantial challenges. Beyond + the technical analysis, we reflect on the broader implications of + simulator design, and consider its role in modeling reality. + authors: Sandrine Boulet and Antoine Chambaz + bibtex: >+ + @article{boulet2025, + author = {Boulet, Sandrine and Chambaz, Antoine}, + publisher = {French Statistical Society}, + title = {Draw {Me} a {Simulator}}, + journal = {Computo}, + date = {2025-09-08}, + doi = {10.57750/w1hj-dw22}, + issn = {2824-7795}, + langid = {en}, + abstract = {This study investigates the use of Variational + Auto-Encoders to build a simulator that approximates the law of + genuine observations. Using both simulated and real data in + scenarios involving counterfactuality, we discuss the general task + of evaluating a simulator’s quality, with a focus on comparisons of + statistical properties and predictive performance. While the + simulator built from simulated data shows minor discrepancies, the + results with real data reveal more substantial challenges. Beyond + the technical analysis, we reflect on the broader implications of + simulator design, and consider its role in modeling reality.} + } + + date: 2025-09-08 + description: '' + doi: 10.57750/w1hj-dw22 + draft: false + journal: Computo + pdf: '' + repo: published-202509-boulet-simulator + title: Draw Me a Simulator + url: '' + year: 2025 +- abstract'@: >- + Model-based clustering provides a principled way of + developing clustering methods. We develop a new model-based + clustering methods for count data. The method combines clustering + and variable selection for improved clustering. The method is based + on conditionally independent Poisson mixture models and Poisson + generalized linear models. The method is demonstrated on simulated + data and data from an ultra running race, where the method yields + excellent clustering and variable selection performance. + authors@: Julien Jacques and Thomas Brendan Murphy + bibtex@: >+ + @article{jacques2025, + author = {Jacques, Julien and Brendan Murphy, Thomas}, + publisher = {French Statistical Society}, + title = {Model-Based {Clustering} and {Variable} {Selection} for + {Multivariate} {Count} {Data}}, + journal = {Computo}, + date = {2025-07-01}, + doi = {10.57750/6v7b-8483}, + issn = {2824-7795}, + langid = {en}, + abstract = {Model-based clustering provides a principled way of + developing clustering methods. We develop a new model-based + clustering methods for count data. The method combines clustering + and variable selection for improved clustering. The method is based + on conditionally independent Poisson mixture models and Poisson + generalized linear models. The method is demonstrated on simulated + data and data from an ultra running race, where the method yields + excellent clustering and variable selection performance.} + } + + date@: 2025-07-01 + description@: '' + doi@: 10.57750/6v7b-8483 + draft@: false + journal@: Computo + pdf@: '' + repo@: published-202507-jacques-count-data + title@: Model-Based Clustering and Variable Selection for Multivariate Count Data + url@: '' + year@: 2025 + abstract': >- Model-based clustering provides a principled way of developing clustering methods. We develop a new model-based clustering methods for count data. The method combines clustering @@ -39,7 +168,74 @@ title: Model-Based Clustering and Variable Selection for Multivariate Count Data url: '' year: 2025 -- abstract': >- +- abstract'@: >- + Reservoir Computing (RC) is a machine learning method + based on neural networks that efficiently process information + generated by dynamical systems. It has been successful in solving + various tasks including time series forecasting, language processing + or voice processing. RC is implemented in `Python` and `Julia` but + not in `R`. This article introduces `reservoirnet`, an `R` package + providing access to the `Python` API `ReservoirPy`, allowing `R` + users to harness the power of reservoir computing. This article + provides an introduction to the fundamentals of RC and showcases its + real-world applicability through three distinct sections. First, we + cover the foundational concepts of RC, setting the stage for + understanding its capabilities. Next, we delve into the practical + usage of `reservoirnet` through two illustrative examples. These + examples demonstrate how it can be applied to real-world problems, + specifically, regression of COVID-19 hospitalizations and + classification of Japanese vowels. Finally, we present a + comprehensive analysis of a real-world application of + `reservoirnet`, where it was used to forecast COVID-19 + hospitalizations at Bordeaux University Hospital using public data + and electronic health records. + authors@: Thomas Ferté, Kalidou Ba, Dan Dutartre, Pierrick Legrand, Vianney Jouhet, Rodolphe Thiébaut, Xavier Hinaut and Boris P Hejblum + bibtex@: >+ + @article{ferté2025, + author = {Ferté, Thomas and Ba, Kalidou and Dutartre, Dan and Legrand, + Pierrick and Jouhet, Vianney and Thiébaut, Rodolphe and Hinaut, + Xavier and P Hejblum, Boris}, + publisher = {French Statistical Society}, + title = {Reservoir {Computing} in {R:} A {Tutorial} for {Using} + Reservoirnet to {Predict} {Complex} {Time-Series}}, + journal = {Computo}, + date = {2025-06-27}, + doi = {10.57750/arxn-6z34}, + issn = {2824-7795}, + langid = {en}, + abstract = {Reservoir Computing (RC) is a machine learning method + based on neural networks that efficiently process information + generated by dynamical systems. It has been successful in solving + various tasks including time series forecasting, language processing + or voice processing. RC is implemented in `Python` and `Julia` but + not in `R`. This article introduces `reservoirnet`, an `R` package + providing access to the `Python` API `ReservoirPy`, allowing `R` + users to harness the power of reservoir computing. This article + provides an introduction to the fundamentals of RC and showcases its + real-world applicability through three distinct sections. First, we + cover the foundational concepts of RC, setting the stage for + understanding its capabilities. Next, we delve into the practical + usage of `reservoirnet` through two illustrative examples. These + examples demonstrate how it can be applied to real-world problems, + specifically, regression of COVID-19 hospitalizations and + classification of Japanese vowels. Finally, we present a + comprehensive analysis of a real-world application of + `reservoirnet`, where it was used to forecast COVID-19 + hospitalizations at Bordeaux University Hospital using public data + and electronic health records.} + } + + date@: 2025-06-27 + description@: '' + doi@: 10.57750/arxn-6z34 + draft@: false + journal@: Computo + pdf@: '' + repo@: published-202505-ferte-reservoirnet + title@: 'Reservoir Computing in R: a Tutorial for Using reservoirnet to Predict Complex Time-Series' + url@: '' + year@: 2025 + abstract': >- Reservoir Computing (RC) is a machine learning method based on neural networks that efficiently process information generated by dynamical systems. It has been successful in solving @@ -106,7 +302,62 @@ title: 'Reservoir Computing in R: a Tutorial for Using reservoirnet to Predict Complex Time-Series' url: '' year: 2025 -- abstract': >- +- abstract'@: >- + The `R` Package `IBMPopSim` facilitates the simulation of + the random evolution of heterogeneous populations using stochastic + Individual-Based Models (IBMs). The package enables users to + simulate population evolution, in which individuals are + characterized by their age and some characteristics, and the + population is modified by different types of events, including + births/arrivals, death/exit events, or changes of characteristics. + The frequency at which an event can occur to an individual can + depend on their age and characteristics, but also on the + characteristics of other individuals (interactions). Such models + have a wide range of applications in fields including actuarial + science, biology, ecology or epidemiology. `IBMPopSim` overcomes the + limitations of time-consuming IBMs simulations by implementing new + efficient algorithms based on thinning methods, which are compiled + using the `Rcpp` package while providing a user-friendly interface. + authors@: Daphné Giorgi, Sarah Kaakai and Vincent Lemaire + bibtex@: >+ + @article{giorgi2025, + author = {Giorgi, Daphné and Kaakai, Sarah and Lemaire, Vincent}, + publisher = {French Statistical Society}, + title = {Efficient Simulation of Individual-Based Population Models}, + journal = {Computo}, + date = {2025-01-27}, + doi = {10.57750/sfxn-1t05}, + issn = {2824-7795}, + langid = {en}, + abstract = {The `R` Package `IBMPopSim` facilitates the simulation of + the random evolution of heterogeneous populations using stochastic + Individual-Based Models (IBMs). The package enables users to + simulate population evolution, in which individuals are + characterized by their age and some characteristics, and the + population is modified by different types of events, including + births/arrivals, death/exit events, or changes of characteristics. + The frequency at which an event can occur to an individual can + depend on their age and characteristics, but also on the + characteristics of other individuals (interactions). Such models + have a wide range of applications in fields including actuarial + science, biology, ecology or epidemiology. `IBMPopSim` overcomes the + limitations of time-consuming IBMs simulations by implementing new + efficient algorithms based on thinning methods, which are compiled + using the `Rcpp` package while providing a user-friendly interface.} + } + + date@: 2025-01-27 + description@: > + This document provides a full description of the Stochastic Individual-Based Models (IBMs) that can be implemented in the IBMPopSim package. A unified mathematical and simulation framework is given, with a detailed description of the simulation algorithm. Examples of applications for the package are also provided, showing the performance and flexibility of IBMPopSim. + doi@: 10.57750/sfxn-1t05 + draft@: false + journal@: Computo + pdf@: '' + repo@: published-202412-giorgi-efficient + title@: Efficient simulation of individual-based population models + url@: '' + year@: 2025 + abstract': >- The `R` Package `IBMPopSim` facilitates the simulation of the random evolution of heterogeneous populations using stochastic Individual-Based Models (IBMs). The package enables users to @@ -161,7 +412,65 @@ title: Efficient simulation of individual-based population models url: '' year: 2025 -- abstract': >- +- abstract'@: >- + In this paper, Spectral Bridges, a novel clustering + algorithm, is introduced. This algorithm builds upon the traditional + k-means and spectral clustering frameworks by subdividing data into + small Voronoï regions, which are subsequently merged according to a + connectivity measure. Drawing inspiration from Support Vector + Machine’s margin concept, a non-parametric clustering approach is + proposed, building an affinity margin between each pair of Voronoï + regions. This approach delineates intricate, non-convex cluster + structures and is robust to hyperparameter choice. The numerical + experiments underscore Spectral Bridges as a fast, robust, and + versatile tool for clustering tasks spanning diverse domains. Its + efficacy extends to large-scale scenarios encompassing both + real-world and synthetic datasets. The Spectral Bridge algorithm is + implemented both in Python (\textless + https://pypi.org/project/spectral-bridges\textgreater) and R + \textless + https://github.com/cambroise/spectral-bridges-Rpackage\textgreater). + authors@: Félix Laplante and Christophe Ambroise + bibtex@: >+ + @article{laplante2024, + author = {Laplante, Félix and Ambroise, Christophe}, + publisher = {French Statistical Society}, + title = {Spectral {Bridges}}, + journal = {Computo}, + date = {2024-12-13}, + doi = {10.57750/1gr8-bk61}, + issn = {2824-7795}, + langid = {en}, + abstract = {In this paper, Spectral Bridges, a novel clustering + algorithm, is introduced. This algorithm builds upon the traditional + k-means and spectral clustering frameworks by subdividing data into + small Voronoï regions, which are subsequently merged according to a + connectivity measure. Drawing inspiration from Support Vector + Machine’s margin concept, a non-parametric clustering approach is + proposed, building an affinity margin between each pair of Voronoï + regions. This approach delineates intricate, non-convex cluster + structures and is robust to hyperparameter choice. The numerical + experiments underscore Spectral Bridges as a fast, robust, and + versatile tool for clustering tasks spanning diverse domains. Its + efficacy extends to large-scale scenarios encompassing both + real-world and synthetic datasets. The Spectral Bridge algorithm is + implemented both in Python (\textless + https://pypi.org/project/spectral-bridges\textgreater) and R + \textless + https://github.com/cambroise/spectral-bridges-Rpackage\textgreater).} + } + + date@: 2024-12-13 + description@: Scalable Spectral Clustering Based on Vector Quantization + doi@: 10.57750/1gr8-bk61 + draft@: false + journal@: Computo + pdf@: '' + repo@: published-202412-ambroise-spectral + title@: Spectral Bridges + url@: '' + year@: 2024 + abstract': >- In this paper, Spectral Bridges, a novel clustering algorithm, is introduced. This algorithm builds upon the traditional k-means and spectral clustering frameworks by subdividing data into @@ -219,7 +528,66 @@ title: Spectral Bridges url: '' year: 2024 -- abstract': >- +- abstract'@: >- + Conformal Inference (CI) is a popular approach for + generating finite sample prediction intervals based on the output of + any point prediction method when data are exchangeable. Adaptive + Conformal Inference (ACI) algorithms extend CI to the case of + sequentially observed data, such as time series, and exhibit strong + theoretical guarantees without having to assume exchangeability of + the observed data. The common thread that unites algorithms in the + ACI family is that they adaptively adjust the width of the generated + prediction intervals in response to the observed data. We provide a + detailed description of five ACI algorithms and their theoretical + guarantees, and test their performance in simulation studies. We + then present a case study of producing prediction intervals for + influenza incidence in the United States based on black-box point + forecasts. Implementations of all the algorithms are released as an + open-source `R` package, `AdaptiveConformal`, which also includes + tools for visualizing and summarizing conformal prediction + intervals. + authors@: Herbert Susmann, Antoine Chambaz and Julie Josse + bibtex@: >+ + @article{susmann2024, + author = {Susmann, Herbert and Chambaz, Antoine and Josse, Julie}, + publisher = {French Statistical Society}, + title = {AdaptiveConformal: {An} {`R`} {Package} for {Adaptive} + {Conformal} {Inference}}, + journal = {Computo}, + date = {2024-07-18}, + doi = {10.57750/edan-5f53}, + issn = {2824-7795}, + langid = {en}, + abstract = {Conformal Inference (CI) is a popular approach for + generating finite sample prediction intervals based on the output of + any point prediction method when data are exchangeable. Adaptive + Conformal Inference (ACI) algorithms extend CI to the case of + sequentially observed data, such as time series, and exhibit strong + theoretical guarantees without having to assume exchangeability of + the observed data. The common thread that unites algorithms in the + ACI family is that they adaptively adjust the width of the generated + prediction intervals in response to the observed data. We provide a + detailed description of five ACI algorithms and their theoretical + guarantees, and test their performance in simulation studies. We + then present a case study of producing prediction intervals for + influenza incidence in the United States based on black-box point + forecasts. Implementations of all the algorithms are released as an + open-source `R` package, `AdaptiveConformal`, which also includes + tools for visualizing and summarizing conformal prediction + intervals.} + } + + date@: 2024-07-18 + description@: '' + doi@: 10.57750/edan-5f53 + draft@: false + journal@: Computo + pdf@: '' + repo@: published-202407-susmann-adaptive-conformal + title@: 'AdaptiveConformal: An `R` Package for Adaptive Conformal Inference' + url@: '' + year@: 2024 + abstract': >- Conformal Inference (CI) is a popular approach for generating finite sample prediction intervals based on the output of any point prediction method when data are exchangeable. Adaptive @@ -278,7 +646,7 @@ title: 'AdaptiveConformal: An `R` Package for Adaptive Conformal Inference' url: '' year: 2024 -- abstract': >- +- abstract'@: >- Appropriate spatiotemporal modelling of wildfire activity is crucial for its prediction and risk management. Here, we focus on wildfire risk in the Aquitaine region in the Southwest of France and @@ -308,8 +676,8 @@ this paper is also intended to provide a full workflow for implementing the Bayesian estimation of marked log-Gaussian Cox processes using the R-INLA package of the R statistical software. - authors: Juliette Legrand, François Pimont, Jean-Luc Dupuy and Thomas Opitz - bibtex: >+ + authors@: Juliette Legrand, François Pimont, Jean-Luc Dupuy and Thomas Opitz + bibtex@: >+ @article{legrand2024, author = {Legrand, Juliette and Pimont, François and Dupuy, Jean-Luc and Opitz, Thomas}, @@ -352,27 +720,177 @@ processes using the R-INLA package of the R statistical software.} } - date: 2024-07-12 - description: '' - doi: 10.57750/4y84-4t68 - draft: false - journal: Computo - pdf: '' - repo: published-202407-legrand-wildfires - title: Bayesian spatiotemporal modelling of wildfire occurrences and sizes for projections under climate change - url: '' - year: 2024 -- abstract': >- - We address the challenge of identifying multiple change - points in a group of independent time series, assuming these change - points occur simultaneously in all series and their number is - unknown. The search for the best segmentation can be expressed as a - minimization problem over a given cost function. We focus on dynamic - programming algorithms that solve this problem exactly. When the - number of changes is proportional to data length, an - inequality-based pruning rule encoded in the PELT algorithm leads to - a linear time complexity. Another type of pruning, called functional - pruning, gives a close-to-linear time complexity whatever the number + date@: 2024-07-12 + description@: '' + doi@: 10.57750/4y84-4t68 + draft@: false + journal@: Computo + pdf@: '' + repo@: published-202407-legrand-wildfires + title@: Bayesian spatiotemporal modelling of wildfire occurrences and sizes for projections under climate change + url@: '' + year@: 2024 + abstract': >- + Appropriate spatiotemporal modelling of wildfire activity + is crucial for its prediction and risk management. Here, we focus on + wildfire risk in the Aquitaine region in the Southwest of France and + its projection under climate change. We study whether wildfire risk + could further increase under climate change in this specific region, + which does not lie in the historical core area of wildfires in + Southeastern France, corresponding to the Southwest. For this + purpose, we consider a marked spatiotemporal point process, a + flexible model for occurrences and magnitudes of such environmental + risks, where the magnitudes are defined as the burnt areas. The + model is first calibrated using 14 years of past observation data of + wildfire occurrences and weather variables, and then applied for + projection of climate-change impacts using simulations of numerical + climate models until 2100 as new inputs. We work within the + framework of a spatiotemporal Bayesian hierarchical model, and we + present the workflow of its implementation for a large dataset at + daily resolution for 8km-pixels using the INLA-SPDE approach. The + assessment of the posterior distributions shows a satisfactory fit + of the model for the observation period. We stochastically simulate + projections of future wildfire activity by combining climate model + output with posterior simulations of model parameters. Depending on + climate models, spline-smoothed projections indicate low to moderate + increase of wildfire activity under climate change. The increase is + weaker than in the historical core area, which we attribute to + different weather conditions (oceanic versus Mediterranean). Besides + providing a relevant case study of environmental risk modelling, + this paper is also intended to provide a full workflow for + implementing the Bayesian estimation of marked log-Gaussian Cox + processes using the R-INLA package of the R statistical software. + authors: Juliette Legrand, François Pimont, Jean-Luc Dupuy and Thomas Opitz + bibtex: >+ + @article{legrand2024, + author = {Legrand, Juliette and Pimont, François and Dupuy, Jean-Luc + and Opitz, Thomas}, + publisher = {French Statistical Society}, + title = {Bayesian Spatiotemporal Modelling of Wildfire Occurrences and + Sizes for Projections Under Climate Change}, + journal = {Computo}, + date = {2024-07-12}, + doi = {10.57750/4y84-4t68}, + issn = {2824-7795}, + langid = {en}, + abstract = {Appropriate spatiotemporal modelling of wildfire activity + is crucial for its prediction and risk management. Here, we focus on + wildfire risk in the Aquitaine region in the Southwest of France and + its projection under climate change. We study whether wildfire risk + could further increase under climate change in this specific region, + which does not lie in the historical core area of wildfires in + Southeastern France, corresponding to the Southwest. For this + purpose, we consider a marked spatiotemporal point process, a + flexible model for occurrences and magnitudes of such environmental + risks, where the magnitudes are defined as the burnt areas. The + model is first calibrated using 14 years of past observation data of + wildfire occurrences and weather variables, and then applied for + projection of climate-change impacts using simulations of numerical + climate models until 2100 as new inputs. We work within the + framework of a spatiotemporal Bayesian hierarchical model, and we + present the workflow of its implementation for a large dataset at + daily resolution for 8km-pixels using the INLA-SPDE approach. The + assessment of the posterior distributions shows a satisfactory fit + of the model for the observation period. We stochastically simulate + projections of future wildfire activity by combining climate model + output with posterior simulations of model parameters. Depending on + climate models, spline-smoothed projections indicate low to moderate + increase of wildfire activity under climate change. The increase is + weaker than in the historical core area, which we attribute to + different weather conditions (oceanic versus Mediterranean). Besides + providing a relevant case study of environmental risk modelling, + this paper is also intended to provide a full workflow for + implementing the Bayesian estimation of marked log-Gaussian Cox + processes using the R-INLA package of the R statistical software.} + } + + date: 2024-07-12 + description: '' + doi: 10.57750/4y84-4t68 + draft: false + journal: Computo + pdf: '' + repo: published-202407-legrand-wildfires + title: Bayesian spatiotemporal modelling of wildfire occurrences and sizes for projections under climate change + url: '' + year: 2024 +- abstract'@: >- + We address the challenge of identifying multiple change + points in a group of independent time series, assuming these change + points occur simultaneously in all series and their number is + unknown. The search for the best segmentation can be expressed as a + minimization problem over a given cost function. We focus on dynamic + programming algorithms that solve this problem exactly. When the + number of changes is proportional to data length, an + inequality-based pruning rule encoded in the PELT algorithm leads to + a linear time complexity. Another type of pruning, called functional + pruning, gives a close-to-linear time complexity whatever the number + of changes, but only for the analysis of univariate time series. We + propose a few extensions of functional pruning for multiple + independent time series based on the use of simple geometric shapes + (balls and hyperrectangles). We focus on the Gaussian case, but some + of our rules can be easily extended to the exponential family. In a + simulation study we compare the computational efficiency of + different geometric-based pruning rules. We show that for a small + number of time series some of them ran significantly faster than + inequality-based approaches in particular when the underlying number + of changes is small compared to the data length. + authors@: Liudmila Pishchagina, Guillem Rigaill and Vincent Runge + bibtex@: >+ + @article{pishchagina2024, + author = {Pishchagina, Liudmila and Rigaill, Guillem and Runge, + Vincent}, + publisher = {French Statistical Society}, + title = {Geometric-Based {Pruning} {Rules} for {Change} {Point} + {Detection} in {Multiple} {Independent} {Time} {Series}}, + journal = {Computo}, + date = {2024-07-12}, + doi = {10.57750/9vvx-eq57}, + issn = {2824-7795}, + langid = {en}, + abstract = {We address the challenge of identifying multiple change + points in a group of independent time series, assuming these change + points occur simultaneously in all series and their number is + unknown. The search for the best segmentation can be expressed as a + minimization problem over a given cost function. We focus on dynamic + programming algorithms that solve this problem exactly. When the + number of changes is proportional to data length, an + inequality-based pruning rule encoded in the PELT algorithm leads to + a linear time complexity. Another type of pruning, called functional + pruning, gives a close-to-linear time complexity whatever the number + of changes, but only for the analysis of univariate time series. We + propose a few extensions of functional pruning for multiple + independent time series based on the use of simple geometric shapes + (balls and hyperrectangles). We focus on the Gaussian case, but some + of our rules can be easily extended to the exponential family. In a + simulation study we compare the computational efficiency of + different geometric-based pruning rules. We show that for a small + number of time series some of them ran significantly faster than + inequality-based approaches in particular when the underlying number + of changes is small compared to the data length.} + } + + date@: 2024-07-12 + description@: '' + doi@: 10.57750/9vvx-eq57 + draft@: false + journal@: Computo + pdf@: '' + repo@: published-202406-pishchagina-change-point + title@: Geometric-Based Pruning Rules for Change Point Detection in Multiple Independent Time Series + url@: '' + year@: 2024 + abstract': >- + We address the challenge of identifying multiple change + points in a group of independent time series, assuming these change + points occur simultaneously in all series and their number is + unknown. The search for the best segmentation can be expressed as a + minimization problem over a given cost function. We focus on dynamic + programming algorithms that solve this problem exactly. When the + number of changes is proportional to data length, an + inequality-based pruning rule encoded in the PELT algorithm leads to + a linear time complexity. Another type of pruning, called functional + pruning, gives a close-to-linear time complexity whatever the number of changes, but only for the analysis of univariate time series. We propose a few extensions of functional pruning for multiple independent time series based on the use of simple geometric shapes @@ -428,7 +946,60 @@ title: Geometric-Based Pruning Rules for Change Point Detection in Multiple Independent Time Series url: '' year: 2024 -- abstract': >- +- abstract'@: >- + Crowdsourcing is a quick and easy way to collect labels + for large datasets, involving many workers. However, workers often + disagree with each other. Sources of error can arise from the + workers’ skills, but also from the intrinsic difficulty of the task. + We present `peerannot`: a `Python` library for managing and learning + from crowdsourced labels for classification. Our library allows + users to aggregate labels from common noise models or train a deep + learning-based classifier directly from crowdsourced labels. In + addition, we provide an identification module to easily explore the + task difficulty of datasets and worker capabilities. + authors@: Tanguy Lefort, Benjamin Charlier, Alexis Joly and Joseph Salmon + bibtex@: >+ + @article{lefort2024, + author = {Lefort, Tanguy and Charlier, Benjamin and Joly, Alexis and + Salmon, Joseph}, + publisher = {French Statistical Society}, + title = {Peerannot: Classification for Crowdsourced Image Datasets + with {Python}}, + journal = {Computo}, + date = {2024-05-07}, + doi = {10.57750/qmaz-gr91}, + issn = {2824-7795}, + langid = {en}, + abstract = {Crowdsourcing is a quick and easy way to collect labels + for large datasets, involving many workers. However, workers often + disagree with each other. Sources of error can arise from the + workers’ skills, but also from the intrinsic difficulty of the task. + We present `peerannot`: a `Python` library for managing and learning + from crowdsourced labels for classification. Our library allows + users to aggregate labels from common noise models or train a deep + learning-based classifier directly from crowdsourced labels. In + addition, we provide an identification module to easily explore the + task difficulty of datasets and worker capabilities.} + } + + date@: 2024-05-07 + description@: > + Crowdsourcing is a quick and easy way to collect labels for large datasets, involving many workers. + + However, it is common for workers to disagree with each other. + + Sources of error can arise from the workers' skills, but also from the intrinsic difficulty of the task. + + We introduce `peerannot`, a Python library for managing and learning from crowdsourced labels of image classification tasks. + doi@: 10.57750/qmaz-gr91 + draft@: false + journal@: Computo + pdf@: '' + repo@: published-202402-lefort-peerannot + title@: 'Peerannot: classification for crowdsourced image datasets with Python' + url@: '' + year@: 2024 + abstract': >- Crowdsourcing is a quick and easy way to collect labels for large datasets, involving many workers. However, workers often disagree with each other. Sources of error can arise from the @@ -481,7 +1052,63 @@ title: 'Peerannot: classification for crowdsourced image datasets with Python' url: '' year: 2024 -- abstract': >- +- abstract'@: >- + We propose a dimension reduction strategy in order to + improve the performance of importance sampling in high dimensions. + The idea is to estimate variance terms in a small number of suitably + chosen directions. We first prove that the optimal directions, i.e., + the ones that minimize the Kullback-\/-Leibler divergence with the + optimal auxiliary density, are the eigenvectors associated with + extreme (small or large) eigenvalues of the optimal covariance + matrix. We then perform extensive numerical experiments showing that + as dimension increases, these directions give estimations which are + very close to optimal. Moreover, we demonstrate that the estimation + remains accurate even when a simple empirical estimator of the + covariance matrix is used to compute these directions. The + theoretical and numerical results open the way for different + generalizations, in particular the incorporation of such ideas in + adaptive importance sampling schemes. + authors@: Maxime El Masri, Jérôme Morio and Florian Simatos + bibtex@: >+ + @article{el_masri2024, + author = {El Masri, Maxime and Morio, Jérôme and Simatos, Florian}, + publisher = {French Statistical Society}, + title = {Optimal Projection for Parametric Importance Sampling in High + Dimensions}, + journal = {Computo}, + date = {2024-03-11}, + doi = {10.57750/jjza-6j82}, + issn = {2824-7795}, + langid = {en}, + abstract = {We propose a dimension reduction strategy in order to + improve the performance of importance sampling in high dimensions. + The idea is to estimate variance terms in a small number of suitably + chosen directions. We first prove that the optimal directions, i.e., + the ones that minimize the Kullback-\/-Leibler divergence with the + optimal auxiliary density, are the eigenvectors associated with + extreme (small or large) eigenvalues of the optimal covariance + matrix. We then perform extensive numerical experiments showing that + as dimension increases, these directions give estimations which are + very close to optimal. Moreover, we demonstrate that the estimation + remains accurate even when a simple empirical estimator of the + covariance matrix is used to compute these directions. The + theoretical and numerical results open the way for different + generalizations, in particular the incorporation of such ideas in + adaptive importance sampling schemes.} + } + + date@: 2024-03-11 + description@: > + This document provides a dimension-reduction strategy in order to improve the performance of importance sampling in high dimensions. + doi@: 10.57750/jjza-6j82 + draft@: false + journal@: Computo + pdf@: '' + repo@: published-202402-elmasri-optimal + title@: Optimal projection for parametric importance sampling in high dimensions + url@: '' + year@: 2024 + abstract': >- We propose a dimension reduction strategy in order to improve the performance of importance sampling in high dimensions. The idea is to estimate variance terms in a small number of suitably @@ -537,7 +1164,45 @@ title: Optimal projection for parametric importance sampling in high dimensions url: '' year: 2024 -- abstract': >- +- abstract'@: >- + In numerous applications, cloud of points do seem to + exhibit *repulsion* in the intuitive sense that there is no local + cluster as in a Poisson process. Motivated by data coming from + cellular networks, we devise a classification algorithm based on the + form of the Voronoi cells. We show that, in the particular set of + data we are given, we can retrieve some repulsiveness between + antennas, which was expected for engineering reasons. + authors@: Hamza Adrat and Laurent Decreusefond + bibtex@: >+ + @article{adrat2024, + author = {Adrat, Hamza and Decreusefond, Laurent}, + publisher = {French Statistical Society}, + title = {Point {Process} {Discrimination} {According} to {Repulsion}}, + journal = {Computo}, + date = {2024-01-25}, + doi = {10.57750/3r07-aw28}, + issn = {2824-7795}, + langid = {en}, + abstract = {In numerous applications, cloud of points do seem to + exhibit *repulsion* in the intuitive sense that there is no local + cluster as in a Poisson process. Motivated by data coming from + cellular networks, we devise a classification algorithm based on the + form of the Voronoi cells. We show that, in the particular set of + data we are given, we can retrieve some repulsiveness between + antennas, which was expected for engineering reasons.} + } + + date@: 2024-01-25 + description@: '' + doi@: 10.57750/3r07-aw28 + draft@: false + journal@: Computo + pdf@: '' + repo@: published-202401-adrat-repulsion + title@: Point Process Discrimination According to Repulsion + url@: '' + year@: 2024 + abstract': >- In numerous applications, cloud of points do seem to exhibit *repulsion* in the intuitive sense that there is no local cluster as in a Poisson process. Motivated by data coming from @@ -575,7 +1240,7 @@ title: Point Process Discrimination According to Repulsion url: '' year: 2024 -- abstract': >- +- abstract'@: >- In plant epidemiology, pest abundance is measured in field trials using metrics assessing either pest prevalence (fraction of the plant population infected) or pest intensity (average number of @@ -618,8 +1283,117 @@ agronomists, plant pathologists, and applied statisticians to analyze pest surveys and field experiments conducted to assess the efficacy of pest treatments. - authors: Armand Favrot and David Makowski - bibtex: >+ + authors@: Armand Favrot and David Makowski + bibtex@: >+ + @article{favrot2024, + author = {Favrot, Armand and Makowski, David}, + publisher = {French Statistical Society}, + title = {A Hierarchical Model to Evaluate Pest Treatments from + Prevalence and Intensity Data}, + journal = {Computo}, + date = {2024-01-09}, + doi = {10.57750/6cgk-g727}, + issn = {2824-7795}, + langid = {en}, + abstract = {In plant epidemiology, pest abundance is measured in field + trials using metrics assessing either pest prevalence (fraction of + the plant population infected) or pest intensity (average number of + pest individuals present in infected plants). Some of these trials + rely on prevalence, while others rely on intensity, depending on the + protocols. In this paper, we present a hierarchical Bayesian model + able to handle both types of data. In this model, the intensity and + prevalence variables are derived from a latent variable representing + the number of pest individuals on each host individual, assumed to + follow a Poisson distribution. Effects of pest treaments, time + trend, and between-trial variability are described using fixed and + random effects. We apply the model to a real data set in the context + of aphid control in sugar beet fields. In this data set, prevalence + and intensity were derived from aphid counts observed on either + factorial trials testing different types of pesticides treatments or + field surveys monitoring aphid abundance. Next, we perform + simulations to assess the impacts of using either prevalence or + intensity data, or both types of data simultaneously, on the + accuracy of the model parameter estimates and on the ranking of + pesticide treatment efficacy. Our results show that, when pest + prevalence and pest intensity data are collected separately in + different trials, the model parameters are more accurately estimated + using both types of trials than using one type of trials only. When + prevalence data are collected in all trials and intensity data are + collected in a subset of trials, estimations and pest treatment + ranking are more accurate using both types of data than using + prevalence data only. When only one type of observation can be + collected in a pest survey or in an experimental trial, our analysis + indicates that it is better to collect intensity data than + prevalence data when all or most of the plants are expected to be + infested, but that both types of data lead to similar results when + the level of infestation is low to moderate. Finally, our + simulations show that it is unlikely to obtain accurate results with + fewer than 40 trials when assessing the efficacy of pest control + treatments based on prevalence and intensity data. Because of its + flexibility, our model can be used to evaluate and rank the efficacy + of pest treatments using either prevalence or intensity data, or + both types of data simultaneously. As it can be easily implemented + using standard Bayesian packages, we hope that it will be useful to + agronomists, plant pathologists, and applied statisticians to + analyze pest surveys and field experiments conducted to assess the + efficacy of pest treatments.} + } + + date@: 2024-01-09 + description@: '' + doi@: 10.57750/6cgk-g727 + draft@: false + journal@: Computo + pdf@: '' + repo@: published-202312-favrot-hierarchical + title@: A hierarchical model to evaluate pest treatments from prevalence and intensity data + url@: '' + year@: 2024 + abstract': >- + In plant epidemiology, pest abundance is measured in field + trials using metrics assessing either pest prevalence (fraction of + the plant population infected) or pest intensity (average number of + pest individuals present in infected plants). Some of these trials + rely on prevalence, while others rely on intensity, depending on the + protocols. In this paper, we present a hierarchical Bayesian model + able to handle both types of data. In this model, the intensity and + prevalence variables are derived from a latent variable representing + the number of pest individuals on each host individual, assumed to + follow a Poisson distribution. Effects of pest treaments, time + trend, and between-trial variability are described using fixed and + random effects. We apply the model to a real data set in the context + of aphid control in sugar beet fields. In this data set, prevalence + and intensity were derived from aphid counts observed on either + factorial trials testing different types of pesticides treatments or + field surveys monitoring aphid abundance. Next, we perform + simulations to assess the impacts of using either prevalence or + intensity data, or both types of data simultaneously, on the + accuracy of the model parameter estimates and on the ranking of + pesticide treatment efficacy. Our results show that, when pest + prevalence and pest intensity data are collected separately in + different trials, the model parameters are more accurately estimated + using both types of trials than using one type of trials only. When + prevalence data are collected in all trials and intensity data are + collected in a subset of trials, estimations and pest treatment + ranking are more accurate using both types of data than using + prevalence data only. When only one type of observation can be + collected in a pest survey or in an experimental trial, our analysis + indicates that it is better to collect intensity data than + prevalence data when all or most of the plants are expected to be + infested, but that both types of data lead to similar results when + the level of infestation is low to moderate. Finally, our + simulations show that it is unlikely to obtain accurate results with + fewer than 40 trials when assessing the efficacy of pest control + treatments based on prevalence and intensity data. Because of its + flexibility, our model can be used to evaluate and rank the efficacy + of pest treatments using either prevalence or intensity data, or + both types of data simultaneously. As it can be easily implemented + using standard Bayesian packages, we hope that it will be useful to + agronomists, plant pathologists, and applied statisticians to + analyze pest surveys and field experiments conducted to assess the + efficacy of pest treatments. + authors: Armand Favrot and David Makowski + bibtex: >+ @article{favrot2024, author = {Favrot, Armand and Makowski, David}, publisher = {French Statistical Society}, @@ -684,7 +1458,78 @@ title: A hierarchical model to evaluate pest treatments from prevalence and intensity data url: '' year: 2024 -- abstract': >- +- abstract'@: >- + Random Forests (RF) {[}@breiman:2001{]} are very popular + machine learning methods. They perform well even with little or no + tuning, and have some theoretical guarantees, especially for sparse + problems {[}@biau:2012;@scornet:etal:2015{]}. These learning + strategies have been used in several contexts, also outside the + field of classification and regression. To perform Bayesian model + selection in the case of intractable likelihoods, the ABC Random + Forests (ABC-RF) strategy of @pudlo:etal:2016 consists in applying + Random Forests on training sets composed of simulations coming from + the Bayesian generative models. The ABC-RF technique is based on an + underlying RF for which the training and prediction phases are + separated. The training phase does not take into account the data to + be predicted. This seems to be suboptimal as in the ABC framework + only one observation is of interest for the prediction. In this + paper, we study tree-based methods that are built to predict a + specific instance in a classification setting. This type of methods + falls within the scope of local (lazy/instance-based/case specific) + classification learning. We review some existing strategies and + propose two new ones. The first consists in modifying the tree + splitting rule by using kernels, the second in using a first RF to + compute some local variable importance that is used to train a + second, more local, RF. Unfortunately, these approaches, although + interesting, do not provide conclusive results. + authors@: Alice Cleynen, Louis Raynal and Jean-Michel Marin + bibtex@: >+ + @article{cleynen2023, + author = {Cleynen, Alice and Raynal, Louis and Marin, Jean-Michel}, + publisher = {French Statistical Society}, + title = {Local Tree Methods for Classification: A Review and Some Dead + Ends}, + journal = {Computo}, + date = {2023-12-14}, + doi = {10.57750/3j8m-8d57}, + issn = {2824-7795}, + langid = {en}, + abstract = {Random Forests (RF) {[}@breiman:2001{]} are very popular + machine learning methods. They perform well even with little or no + tuning, and have some theoretical guarantees, especially for sparse + problems {[}@biau:2012;@scornet:etal:2015{]}. These learning + strategies have been used in several contexts, also outside the + field of classification and regression. To perform Bayesian model + selection in the case of intractable likelihoods, the ABC Random + Forests (ABC-RF) strategy of @pudlo:etal:2016 consists in applying + Random Forests on training sets composed of simulations coming from + the Bayesian generative models. The ABC-RF technique is based on an + underlying RF for which the training and prediction phases are + separated. The training phase does not take into account the data to + be predicted. This seems to be suboptimal as in the ABC framework + only one observation is of interest for the prediction. In this + paper, we study tree-based methods that are built to predict a + specific instance in a classification setting. This type of methods + falls within the scope of local (lazy/instance-based/case specific) + classification learning. We review some existing strategies and + propose two new ones. The first consists in modifying the tree + splitting rule by using kernels, the second in using a first RF to + compute some local variable importance that is used to train a + second, more local, RF. Unfortunately, these approaches, although + interesting, do not provide conclusive results.} + } + + date@: 2023-12-14 + description@: '' + doi@: 10.57750/3j8m-8d57 + draft@: false + journal@: Computo + pdf@: '' + repo@: published-202312-cleynen-local + title@: 'Local tree methods for classification: a review and some dead ends' + url@: '' + year@: 2023 + abstract': >- Random Forests (RF) {[}@breiman:2001{]} are very popular machine learning methods. They perform well even with little or no tuning, and have some theoretical guarantees, especially for sparse @@ -755,7 +1600,72 @@ title: 'Local tree methods for classification: a review and some dead ends' url: '' year: 2023 -- abstract': >- +- abstract'@: >- + The Fisher information matrix (FIM) is a key quantity in + statistics. However its exact computation is often not trivial. In + particular in many latent variable models, it is intricated due to + the presence of unobserved variables. Several methods have been + proposed to approximate the FIM when it can not be evaluated + analytically. Different estimates have been considered, in + particular moment estimates. However some of them require to compute + second derivatives of the complete data log-likelihood which leads + to some disadvantages. In this paper, we focus on the empirical + Fisher information matrix defined as an empirical estimate of the + covariance matrix of the score, which only requires to compute the + first derivatives of the log-likelihood. Our contribution consists + in presenting a new numerical method to evaluate this empirical + Fisher information matrix in latent variable model when the proposed + estimate can not be directly analytically evaluated. We propose a + stochastic approximation estimation algorithm to compute this + estimate as a by-product of the parameter estimate. We evaluate the + finite sample size properties of the proposed estimate and the + convergence properties of the estimation algorithm through + simulation studies. + authors@: Maud Delattre and Estelle Kuhn + bibtex@: >+ + @article{delattre2023, + author = {Delattre, Maud and Kuhn, Estelle}, + publisher = {French Statistical Society}, + title = {Computing an Empirical {Fisher} Information Matrix Estimate + in Latent Variable Models Through Stochastic Approximation}, + journal = {Computo}, + date = {2023-11-21}, + doi = {10.57750/r5gx-jk62}, + issn = {2824-7795}, + langid = {en}, + abstract = {The Fisher information matrix (FIM) is a key quantity in + statistics. However its exact computation is often not trivial. In + particular in many latent variable models, it is intricated due to + the presence of unobserved variables. Several methods have been + proposed to approximate the FIM when it can not be evaluated + analytically. Different estimates have been considered, in + particular moment estimates. However some of them require to compute + second derivatives of the complete data log-likelihood which leads + to some disadvantages. In this paper, we focus on the empirical + Fisher information matrix defined as an empirical estimate of the + covariance matrix of the score, which only requires to compute the + first derivatives of the log-likelihood. Our contribution consists + in presenting a new numerical method to evaluate this empirical + Fisher information matrix in latent variable model when the proposed + estimate can not be directly analytically evaluated. We propose a + stochastic approximation estimation algorithm to compute this + estimate as a by-product of the parameter estimate. We evaluate the + finite sample size properties of the proposed estimate and the + convergence properties of the estimation algorithm through + simulation studies.} + } + + date@: 2023-11-21 + description@: '' + doi@: 10.57750/r5gx-jk62 + draft@: false + journal@: Computo + pdf@: '' + repo@: published-202311-delattre-fim + title@: Computing an empirical Fisher information matrix estimate in latent variable models through stochastic approximation + url@: '' + year@: 2023 + abstract': >- The Fisher information matrix (FIM) is a key quantity in statistics. However its exact computation is often not trivial. In particular in many latent variable models, it is intricated due to @@ -820,7 +1730,75 @@ title: Computing an empirical Fisher information matrix estimate in latent variable models through stochastic approximation url: '' year: 2023 -- abstract': >- +- abstract'@: >- + Gaussian Graphical Models (GGMs) are widely used in + high-dimensional data analysis to synthesize the interaction between + variables. In many applications, such as genomics or image analysis, + graphical models rely on sparsity and clustering to reduce + dimensionality and improve performances. This paper explores a + slightly different paradigm where clustering is not knowledge-driven + but performed simultaneously with the graph inference task. We + introduce a novel Multiscale Graphical Lasso (MGLasso) to improve + networks interpretability by proposing graphs at different + granularity levels. The method estimates clusters through a convex + clustering approach -\/-\/- a relaxation of \$k\$-means, and + hierarchical clustering. The conditional independence graph is + simultaneously inferred through a neighborhood selection scheme for + undirected graphical models. MGLasso extends and generalizes the + sparse group fused lasso problem to undirected graphical models. We + use continuation with Nesterov smoothing in a shrinkage-thresholding + algorithm (CONESTA) to propose a regularization path of solutions + along the group fused Lasso penalty, while the Lasso penalty is kept + constant. Extensive experiments on synthetic data compare the + performances of our model to state-of-the-art clustering methods and + network inference models. Applications to gut microbiome data and + poplar’s methylation mixed with transcriptomic data are presented. + authors@: Edmond Sanou, Christophe Ambroise and Geneviève Robin + bibtex@: >+ + @article{sanou2023, + author = {Sanou, Edmond and Ambroise, Christophe and Robin, Geneviève}, + publisher = {French Statistical Society}, + title = {Inference of {Multiscale} {Gaussian} {Graphical} {Models}}, + journal = {Computo}, + date = {2023-06-28}, + doi = {10.57750/1f4p-7955}, + issn = {2824-7795}, + langid = {en}, + abstract = {Gaussian Graphical Models (GGMs) are widely used in + high-dimensional data analysis to synthesize the interaction between + variables. In many applications, such as genomics or image analysis, + graphical models rely on sparsity and clustering to reduce + dimensionality and improve performances. This paper explores a + slightly different paradigm where clustering is not knowledge-driven + but performed simultaneously with the graph inference task. We + introduce a novel Multiscale Graphical Lasso (MGLasso) to improve + networks interpretability by proposing graphs at different + granularity levels. The method estimates clusters through a convex + clustering approach -\/-\/- a relaxation of \$k\$-means, and + hierarchical clustering. The conditional independence graph is + simultaneously inferred through a neighborhood selection scheme for + undirected graphical models. MGLasso extends and generalizes the + sparse group fused lasso problem to undirected graphical models. We + use continuation with Nesterov smoothing in a shrinkage-thresholding + algorithm (CONESTA) to propose a regularization path of solutions + along the group fused Lasso penalty, while the Lasso penalty is kept + constant. Extensive experiments on synthetic data compare the + performances of our model to state-of-the-art clustering methods and + network inference models. Applications to gut microbiome data and + poplar’s methylation mixed with transcriptomic data are presented.} + } + + date@: 2023-06-28 + description@: '' + doi@: 10.57750/1f4p-7955 + draft@: false + journal@: Computo + pdf@: '' + repo@: published-202306-sanou-multiscale_glasso + title@: Inference of Multiscale Gaussian Graphical Models + url@: '' + year@: 2023 + abstract': >- Gaussian Graphical Models (GGMs) are widely used in high-dimensional data analysis to synthesize the interaction between variables. In many applications, such as genomics or image analysis, @@ -888,7 +1866,71 @@ title: Inference of Multiscale Gaussian Graphical Models url: '' year: 2023 -- abstract': >- +- abstract'@: >- + Litter is a known cause of degradation in marine + environments and most of it travels in rivers before reaching the + oceans. In this paper, we present a novel algorithm to assist waste + monitoring along watercourses. While several attempts have been made + to quantify litter using neural object detection in photographs of + floating items, we tackle the more challenging task of counting + directly in videos using boat-embedded cameras. We rely on + multi-object tracking (MOT) but focus on the key pitfalls of false + and redundant counts which arise in typical scenarios of poor + detection performance. Our system only requires supervision at the + image level and performs Bayesian filtering via a state space model + based on optical flow. We present a new open image dataset gathered + through a crowdsourced campaign and used to train a center-based + anchor-free object detector. Realistic video footage assembled by + water monitoring experts is annotated and provided for evaluation. + Improvements in count quality are demonstrated against systems built + from state-of-the-art multi-object trackers sharing the same + detection capabilities. A precise error decomposition allows clear + analysis and highlights the remaining challenges. + authors@: Mathis Chagneux, Sylvain Le Corff, Pierre Gloaguen, Charles Ollion, Océane Lepâtre and Antoine Bruge + bibtex@: >+ + @article{chagneux2023, + author = {Chagneux, Mathis and Le Corff, Sylvain and Gloaguen, Pierre + and Ollion, Charles and Lepâtre, Océane and Bruge, Antoine}, + publisher = {French Statistical Society}, + title = {Macrolitter Video Counting on Riverbanks Using State Space + Models and Moving Cameras}, + journal = {Computo}, + date = {2023-02-16}, + doi = {10.57750/845m-f805}, + issn = {2824-7795}, + langid = {en}, + abstract = {Litter is a known cause of degradation in marine + environments and most of it travels in rivers before reaching the + oceans. In this paper, we present a novel algorithm to assist waste + monitoring along watercourses. While several attempts have been made + to quantify litter using neural object detection in photographs of + floating items, we tackle the more challenging task of counting + directly in videos using boat-embedded cameras. We rely on + multi-object tracking (MOT) but focus on the key pitfalls of false + and redundant counts which arise in typical scenarios of poor + detection performance. Our system only requires supervision at the + image level and performs Bayesian filtering via a state space model + based on optical flow. We present a new open image dataset gathered + through a crowdsourced campaign and used to train a center-based + anchor-free object detector. Realistic video footage assembled by + water monitoring experts is annotated and provided for evaluation. + Improvements in count quality are demonstrated against systems built + from state-of-the-art multi-object trackers sharing the same + detection capabilities. A precise error decomposition allows clear + analysis and highlights the remaining challenges.} + } + + date@: 2023-02-16 + description@: '' + doi@: 10.57750/845m-f805 + draft@: false + journal@: Computo + pdf@: '' + repo@: published-202301-chagneux-macrolitter + title@: 'Macrolitter video counting on riverbanks using state space models and moving cameras ' + url@: '' + year@: 2023 + abstract': >- Litter is a known cause of degradation in marine environments and most of it travels in rivers before reaching the oceans. In this paper, we present a novel algorithm to assist waste @@ -952,7 +1994,56 @@ title: 'Macrolitter video counting on riverbanks using state space models and moving cameras ' url: '' year: 2023 -- abstract': >- +- abstract'@: >- + The package \$\textbackslash textsf\{clayton\}\$ is + designed to be intuitive, user-friendly, and efficient. It offers a + wide range of copula models, including Archimedean, Elliptical, and + Extreme. The package is implemented in pure \$\textbackslash + textsf\{Python\}\$, making it easy to install and use. In addition, + we provide detailed documentation and examples to help users get + started quickly. We also conduct a performance comparison with + existing \$\textbackslash textsf\{R\}\$ packages, demonstrating the + efficiency of our implementation. The \$\textbackslash + textsf\{clayton\}\$ package is a valuable tool for researchers and + practitioners working with copulae in \$\textbackslash + textsf\{Python\}\$. + authors@: Alexis Boulin + bibtex@: >+ + @article{boulin2023, + author = {Boulin, Alexis}, + publisher = {French Statistical Society}, + title = {A {Python} {Package} for {Sampling} from {Copulae:} Clayton}, + journal = {Computo}, + date = {2023-01-12}, + doi = {10.57750/4szh-t752}, + issn = {2824-7795}, + langid = {en}, + abstract = {The package \$\textbackslash textsf\{clayton\}\$ is + designed to be intuitive, user-friendly, and efficient. It offers a + wide range of copula models, including Archimedean, Elliptical, and + Extreme. The package is implemented in pure \$\textbackslash + textsf\{Python\}\$, making it easy to install and use. In addition, + we provide detailed documentation and examples to help users get + started quickly. We also conduct a performance comparison with + existing \$\textbackslash textsf\{R\}\$ packages, demonstrating the + efficiency of our implementation. The \$\textbackslash + textsf\{clayton\}\$ package is a valuable tool for researchers and + practitioners working with copulae in \$\textbackslash + textsf\{Python\}\$.} + } + + date@: 2023-01-12 + description@: > + The package $\textsf{clayton}$ is designed to be intuitive, user-friendly, and efficient. It offers a wide range of copula models, including Archimedean, Elliptical, and Extreme. The package is implemented in pure $\textsf{Python}$, making it easy to install and use. + doi@: 10.57750/4szh-t752 + draft@: false + journal@: Computo + pdf@: '' + repo@: published-202301-boulin-clayton + title@: 'A Python Package for Sampling from Copulae: clayton' + url@: '' + year@: 2023 + abstract': >- The package \$\textbackslash textsf\{clayton\}\$ is designed to be intuitive, user-friendly, and efficient. It offers a wide range of copula models, including Archimedean, Elliptical, and @@ -1001,7 +2092,84 @@ title: 'A Python Package for Sampling from Copulae: clayton' url: '' year: 2023 -- abstract': >- +- abstract'@: >- + Deep learning is used in computer vision problems with + important applications in several scientific fields. In ecology for + example, there is a growing interest in deep learning for + automatizing repetitive analyses on large amounts of images, such as + animal species identification. However, there are challenging issues + toward the wide adoption of deep learning by the community of + ecologists. First, there is a programming barrier as most algorithms + are written in `Python` while most ecologists are versed in `R`. + Second, recent applications of deep learning in ecology have focused + on computational aspects and simple tasks without addressing the + underlying ecological questions or carrying out the statistical data + analysis to answer these questions. Here, we showcase a reproducible + `R` workflow integrating both deep learning and statistical models + using predator-prey relationships as a case study. We illustrate + deep learning for the identification of animal species on images + collected with camera traps, and quantify spatial co-occurrence + using multispecies occupancy models. Despite average model + classification performances, ecological inference was similar + whether we analysed the ground truth dataset or the classified + dataset. This result calls for further work on the trade-offs + between time and resources allocated to train models with deep + learning and our ability to properly address key ecological + questions with biodiversity monitoring. We hope that our + reproducible workflow will be useful to ecologists and applied + statisticians. + authors@: Olivier Gimenez, Maëlis Kervellec, Jean-Baptiste Fanjul, Anna Chaine, Lucile Marescot, Yoann Bollet and Christophe Duchamp + bibtex@: >+ + @article{gimenez2022, + author = {Gimenez, Olivier and Kervellec, Maëlis and Fanjul, + Jean-Baptiste and Chaine, Anna and Marescot, Lucile and Bollet, + Yoann and Duchamp, Christophe}, + publisher = {French Statistical Society}, + title = {Trade-Off Between Deep Learning for Species Identification + and Inference about Predator-Prey Co-Occurrence}, + journal = {Computo}, + date = {2022-04-22}, + doi = {10.57750/yfm2-5f45}, + issn = {2824-7795}, + langid = {en}, + abstract = {Deep learning is used in computer vision problems with + important applications in several scientific fields. In ecology for + example, there is a growing interest in deep learning for + automatizing repetitive analyses on large amounts of images, such as + animal species identification. However, there are challenging issues + toward the wide adoption of deep learning by the community of + ecologists. First, there is a programming barrier as most algorithms + are written in `Python` while most ecologists are versed in `R`. + Second, recent applications of deep learning in ecology have focused + on computational aspects and simple tasks without addressing the + underlying ecological questions or carrying out the statistical data + analysis to answer these questions. Here, we showcase a reproducible + `R` workflow integrating both deep learning and statistical models + using predator-prey relationships as a case study. We illustrate + deep learning for the identification of animal species on images + collected with camera traps, and quantify spatial co-occurrence + using multispecies occupancy models. Despite average model + classification performances, ecological inference was similar + whether we analysed the ground truth dataset or the classified + dataset. This result calls for further work on the trade-offs + between time and resources allocated to train models with deep + learning and our ability to properly address key ecological + questions with biodiversity monitoring. We hope that our + reproducible workflow will be useful to ecologists and applied + statisticians.} + } + + date@: 2022-04-22 + description@: '' + doi@: 10.57750/yfm2-5f45 + draft@: false + journal@: Computo + pdf@: '' + repo@: published-202204-deeplearning-occupancy-lynx + title@: Trade-off between deep learning for species identification and inference about predator-prey co-occurrence + url@: '' + year@: 2022 + abstract': >- Deep learning is used in computer vision problems with important applications in several scientific fields. In ecology for example, there is a growing interest in deep learning for From 164dc5aabc3b34f1a06c2680554880f78dade22b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-David=20Collin?= Date: Fri, 12 Sep 2025 15:01:36 +0200 Subject: [PATCH 13/13] remove lightbox extension as it is included in quarto 1.7 --- .../quarto-ext/lightbox/_extension.yml | 7 - _extensions/quarto-ext/lightbox/lightbox.css | 9 - _extensions/quarto-ext/lightbox/lightbox.lua | 251 ------------------ .../lightbox/resources/css/glightbox.min.css | 1 - .../lightbox/resources/js/glightbox.min.js | 1 - 5 files changed, 269 deletions(-) delete mode 100644 _extensions/quarto-ext/lightbox/_extension.yml delete mode 100644 _extensions/quarto-ext/lightbox/lightbox.css delete mode 100644 _extensions/quarto-ext/lightbox/lightbox.lua delete mode 100644 _extensions/quarto-ext/lightbox/resources/css/glightbox.min.css delete mode 100644 _extensions/quarto-ext/lightbox/resources/js/glightbox.min.js diff --git a/_extensions/quarto-ext/lightbox/_extension.yml b/_extensions/quarto-ext/lightbox/_extension.yml deleted file mode 100644 index 0a5db9a..0000000 --- a/_extensions/quarto-ext/lightbox/_extension.yml +++ /dev/null @@ -1,7 +0,0 @@ -title: Lightbox -author: Posit Software, PBC -version: 0.1.9 -quarto-required: ">=1.2.198" -contributes: - filters: - - lightbox.lua diff --git a/_extensions/quarto-ext/lightbox/lightbox.css b/_extensions/quarto-ext/lightbox/lightbox.css deleted file mode 100644 index d94d9e5..0000000 --- a/_extensions/quarto-ext/lightbox/lightbox.css +++ /dev/null @@ -1,9 +0,0 @@ - - - -body:not(.glightbox-mobile) div.gslide div.gslide-description, -body:not(.glightbox-mobile) div.gslide-description .gslide-title, -body:not(.glightbox-mobile) div.gslide-description .gslide-desc { - color: var(--quarto-body-color); - background-color: var(--quarto-body-bg); -} \ No newline at end of file diff --git a/_extensions/quarto-ext/lightbox/lightbox.lua b/_extensions/quarto-ext/lightbox/lightbox.lua deleted file mode 100644 index ca8b805..0000000 --- a/_extensions/quarto-ext/lightbox/lightbox.lua +++ /dev/null @@ -1,251 +0,0 @@ --- whether we're automatically lightboxing -local auto = false - --- whether we need lightbox dependencies added -local needsLightbox = false - --- a counter used to ensure each image is in its own gallery -local imgCount = 0 - --- attributes to forward from the image to the newly created link -local kDescription = "description" -local kForwardedAttr = { - "title", kDescription, "desc-position", - "type", "effect", "zoomable", "draggable" -} - -local kLightboxClass = "lightbox" -local kNoLightboxClass = "nolightbox" -local kGalleryPrefix = "quarto-lightbox-gallery-" - --- A list of images already within links that we can use to filter -local imagesWithinLinks = pandoc.List({}) - -local function readAttrValue(el, attrName) - if attrName == kDescription then - local doc = pandoc.read(el.attr.attributes[attrName]) - local attrInlines = doc.blocks[1].content - return pandoc.write(pandoc.Pandoc(attrInlines), "html") - else - return el[attrName] - end - -end - -return { - { - Meta = function(meta) - - -- If the mode is auto, we need go ahead and - -- run if there are any images (ideally we would) - -- filter to images in the body, but that can be - -- left for future me to deal with - -- supports: - -- lightbox: auto - -- or - -- lightbox: - -- match: auto - local lbMeta = meta.lightbox - if lbMeta ~= nil and type(lbMeta) == 'table' then - if lbMeta[1] ~= nil then - if lbMeta[1]['text'] == "auto" then - auto = true - end - elseif lbMeta.match ~= nil and pandoc.utils.stringify(lbMeta.match) == 'auto' then - auto = true - elseif lbMeta == true then - auto = true - end - end - end, - -- Find images that are already within links - -- we'll use this to filter out these images if - -- the most is auto - Link = function(linkEl) - pandoc.walk_inline(linkEl, { - Image = function(imageEl) - imagesWithinLinks[#imagesWithinLinks + 1] = imageEl - end - }) - end - },{ - Div = function(div) - if div.classes:includes("cell") and div.attributes["lightbox"] ~= nil then - meta = quarto.json.decode(div.attributes["lightbox"]) - local imgCount=0 - div = div:walk({ - Image = function(imgEl) - imgCount = imgCount + 1 - if (type(meta) == "table" and meta[kNoLightboxClass] == true) or meta == false then - imgEl.classes:insert(kNoLightboxClass) - else - if not auto and ((type(meta) == "table" and not meta[kNoLightboxClass]) or meta == true) then - imgEl.classes:insert(kLightboxClass) - end - if (type(meta) == "table") then - if meta.group then - imgEl.attr.attributes.group = meta.group or imgEl.attr.attributes.group - end - for _, v in next, kForwardedAttr do - if type(meta[v]) == "table" and #meta[v] > 1 then - -- if list attributes it should be one per plot - if imgCount > #meta[v] then - quarto.log.warning("More plots than '" .. v .. "' passed in YAML chunk options.") - else - attrLb = meta[v][imgCount] - end - else - -- Otherwise reuse the single attributes - attrLb = meta[v] - end - imgEl.attr.attributes[v] = attrLb or imgEl.attr.attributes[v] - end - end - end - return imgEl - end - }) - div.attributes["lightbox"] = nil - end - return div - end - }, - { - Image = function(imgEl) - if quarto.doc.is_format("html:js") then - local isAlreadyLinked = imagesWithinLinks:includes(imgEl) - if (not isAlreadyLinked and auto and not imgEl.classes:includes(kNoLightboxClass)) - or imgEl.classes:includes('lightbox') then - -- note that we need to include the dependency for lightbox - needsLightbox = true - imgCount = imgCount + 1 - - -- remove the class from the image - imgEl.attr.classes = imgEl.attr.classes:filter(function(clz) - return clz ~= kLightboxClass - end) - - -- attributes for the link - local linkAttributes = {} - - -- mark this image as a lightbox target - linkAttributes.class = kLightboxClass - - -- get the alt text from image and use that as title - local title = nil - if imgEl.caption ~= nil and #imgEl.caption > 0 then - linkAttributes.title = pandoc.utils.stringify(imgEl.caption) - elseif imgEl.attributes['fig-alt'] ~= nil and #imgEl.attributes['fig-alt'] > 0 then - linkAttributes.title = pandoc.utils.stringify(imgEl.attributes['fig-alt']) - end - - -- move a group attribute to the link, if present - if imgEl.attr.attributes.group ~= nil then - linkAttributes.gallery = imgEl.attr.attributes.group - imgEl.attr.attributes.group = nil - else - linkAttributes.gallery = kGalleryPrefix .. imgCount - end - - -- forward any other known attributes - for i, v in ipairs(kForwardedAttr) do - if imgEl.attr.attributes[v] ~= nil then - -- forward the attribute - linkAttributes[v] = readAttrValue(imgEl, v) - - -- clear the attribute - imgEl.attr.attributes[v] = nil - end - - -- clear the title - if (imgEl.title == 'fig:') then - imgEl.title = "" - end - - end - - -- wrap decorated images in a link with appropriate attrs - local link = pandoc.Link({imgEl}, imgEl.src, nil, linkAttributes) - return link - end - end - end, - Meta = function(meta) - -- If we discovered lightbox-able images - -- we need to include the dependencies - if needsLightbox then - -- add the dependency - quarto.doc.add_html_dependency({ - name = 'glightbox', - scripts = {'resources/js/glightbox.min.js'}, - stylesheets = {'resources/css/glightbox.min.css', 'lightbox.css'} - }) - - -- read lightbox options - local lbMeta = meta.lightbox - local lbOptions = {} - local readEffect = function(el) - local val = pandoc.utils.stringify(el) - if val == "fade" or val == "zoom" or val == "none" then - return val - else - error("Invalid effect " + val) - end - end - - -- permitted options include: - -- lightbox: - -- effect: zoom | fade | none - -- desc-position: top | bottom | left |right - -- loop: true | false - -- class: - local effect = "zoom" - local descPosition = "bottom" - local loop = true - local skin = nil - - -- The selector controls which elements are targeted. - -- currently, it always targets .lightbox elements - -- and there is no way for the user to change this - local selector = "." .. kLightboxClass - - if lbMeta ~= nil and type(lbMeta) == 'table' then - if lbMeta.effect ~= nil then - effect = readEffect(lbMeta.effect) - end - - if lbMeta['desc-position'] ~= nil then - descPosition = pandoc.utils.stringify(lbMeta['desc-position']) - end - - if lbMeta['css-class'] ~= nil then - skin = pandoc.utils.stringify(lbMeta['css-class']) - end - - if lbMeta.loop ~= nil then - loop = lbMeta.loop - end - end - - -- Generate the options to configure lightbox - local options = { - selector = selector, - closeEffect = effect, - openEffect = effect, - descPosition = descPosition, - loop = loop, - } - if skin ~= nil then - options.skin = skin - end - local optionsJson = quarto.json.encode(options) - - -- generate the initialization script with the correct options - local scriptTag = "" - - -- inject the rendering code - quarto.doc.include_text("after-body", scriptTag) - - end - end -}} diff --git a/_extensions/quarto-ext/lightbox/resources/css/glightbox.min.css b/_extensions/quarto-ext/lightbox/resources/css/glightbox.min.css deleted file mode 100644 index 3c9ff87..0000000 --- a/_extensions/quarto-ext/lightbox/resources/css/glightbox.min.css +++ /dev/null @@ -1 +0,0 @@ -.glightbox-container{width:100%;height:100%;position:fixed;top:0;left:0;z-index:999999!important;overflow:hidden;-ms-touch-action:none;touch-action:none;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;outline:0}.glightbox-container.inactive{display:none}.glightbox-container .gcontainer{position:relative;width:100%;height:100%;z-index:9999;overflow:hidden}.glightbox-container .gslider{-webkit-transition:-webkit-transform .4s ease;transition:-webkit-transform .4s ease;transition:transform .4s ease;transition:transform .4s ease,-webkit-transform .4s ease;height:100%;left:0;top:0;width:100%;position:relative;overflow:hidden;display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.glightbox-container .gslide{width:100%;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;opacity:0}.glightbox-container .gslide.current{opacity:1;z-index:99999;position:relative}.glightbox-container .gslide.prev{opacity:1;z-index:9999}.glightbox-container .gslide-inner-content{width:100%}.glightbox-container .ginner-container{position:relative;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:100%;margin:auto;height:100vh}.glightbox-container .ginner-container.gvideo-container{width:100%}.glightbox-container .ginner-container.desc-bottom,.glightbox-container .ginner-container.desc-top{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.glightbox-container .ginner-container.desc-left,.glightbox-container .ginner-container.desc-right{max-width:100%!important}.gslide iframe,.gslide video{outline:0!important;border:none;min-height:165px;-webkit-overflow-scrolling:touch;-ms-touch-action:auto;touch-action:auto}.gslide:not(.current){pointer-events:none}.gslide-image{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.gslide-image img{max-height:100vh;display:block;padding:0;float:none;outline:0;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;max-width:100vw;width:auto;height:auto;-o-object-fit:cover;object-fit:cover;-ms-touch-action:none;touch-action:none;margin:auto;min-width:200px}.desc-bottom .gslide-image img,.desc-top .gslide-image img{width:auto}.desc-left .gslide-image img,.desc-right .gslide-image img{width:auto;max-width:100%}.gslide-image img.zoomable{position:relative}.gslide-image img.dragging{cursor:-webkit-grabbing!important;cursor:grabbing!important;-webkit-transition:none;transition:none}.gslide-video{position:relative;max-width:100vh;width:100%!important}.gslide-video .plyr__poster-enabled.plyr--loading .plyr__poster{display:none}.gslide-video .gvideo-wrapper{width:100%;margin:auto}.gslide-video::before{content:'';position:absolute;width:100%;height:100%;background:rgba(255,0,0,.34);display:none}.gslide-video.playing::before{display:none}.gslide-video.fullscreen{max-width:100%!important;min-width:100%;height:75vh}.gslide-video.fullscreen video{max-width:100%!important;width:100%!important}.gslide-inline{background:#fff;text-align:left;max-height:calc(100vh - 40px);overflow:auto;max-width:100%;margin:auto}.gslide-inline .ginlined-content{padding:20px;width:100%}.gslide-inline .dragging{cursor:-webkit-grabbing!important;cursor:grabbing!important;-webkit-transition:none;transition:none}.ginlined-content{overflow:auto;display:block!important;opacity:1}.gslide-external{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;min-width:100%;background:#fff;padding:0;overflow:auto;max-height:75vh;height:100%}.gslide-media{display:-webkit-box;display:-ms-flexbox;display:flex;width:auto}.zoomed .gslide-media{-webkit-box-shadow:none!important;box-shadow:none!important}.desc-bottom .gslide-media,.desc-top .gslide-media{margin:0 auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.gslide-description{position:relative;-webkit-box-flex:1;-ms-flex:1 0 100%;flex:1 0 100%}.gslide-description.description-left,.gslide-description.description-right{max-width:100%}.gslide-description.description-bottom,.gslide-description.description-top{margin:0 auto;width:100%}.gslide-description p{margin-bottom:12px}.gslide-description p:last-child{margin-bottom:0}.zoomed .gslide-description{display:none}.glightbox-button-hidden{display:none}.glightbox-mobile .glightbox-container .gslide-description{height:auto!important;width:100%;position:absolute;bottom:0;padding:19px 11px;max-width:100vw!important;-webkit-box-ordinal-group:3!important;-ms-flex-order:2!important;order:2!important;max-height:78vh;overflow:auto!important;background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(rgba(0,0,0,.75)));background:linear-gradient(to bottom,rgba(0,0,0,0) 0,rgba(0,0,0,.75) 100%);-webkit-transition:opacity .3s linear;transition:opacity .3s linear;padding-bottom:50px}.glightbox-mobile .glightbox-container .gslide-title{color:#fff;font-size:1em}.glightbox-mobile .glightbox-container .gslide-desc{color:#a1a1a1}.glightbox-mobile .glightbox-container .gslide-desc a{color:#fff;font-weight:700}.glightbox-mobile .glightbox-container .gslide-desc *{color:inherit}.glightbox-mobile .glightbox-container .gslide-desc .desc-more{color:#fff;opacity:.4}.gdesc-open .gslide-media{-webkit-transition:opacity .5s ease;transition:opacity .5s ease;opacity:.4}.gdesc-open .gdesc-inner{padding-bottom:30px}.gdesc-closed .gslide-media{-webkit-transition:opacity .5s ease;transition:opacity .5s ease;opacity:1}.greset{-webkit-transition:all .3s ease;transition:all .3s ease}.gabsolute{position:absolute}.grelative{position:relative}.glightbox-desc{display:none!important}.glightbox-open{overflow:hidden}.gloader{height:25px;width:25px;-webkit-animation:lightboxLoader .8s infinite linear;animation:lightboxLoader .8s infinite linear;border:2px solid #fff;border-right-color:transparent;border-radius:50%;position:absolute;display:block;z-index:9999;left:0;right:0;margin:0 auto;top:47%}.goverlay{width:100%;height:calc(100vh + 1px);position:fixed;top:-1px;left:0;background:#000;will-change:opacity}.glightbox-mobile .goverlay{background:#000}.gclose,.gnext,.gprev{z-index:99999;cursor:pointer;width:26px;height:44px;border:none;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.gclose svg,.gnext svg,.gprev svg{display:block;width:25px;height:auto;margin:0;padding:0}.gclose.disabled,.gnext.disabled,.gprev.disabled{opacity:.1}.gclose .garrow,.gnext .garrow,.gprev .garrow{stroke:#fff}.gbtn.focused{outline:2px solid #0f3d81}iframe.wait-autoplay{opacity:0}.glightbox-closing .gclose,.glightbox-closing .gnext,.glightbox-closing .gprev{opacity:0!important}.glightbox-clean .gslide-description{background:#fff}.glightbox-clean .gdesc-inner{padding:22px 20px}.glightbox-clean .gslide-title{font-size:1em;font-weight:400;font-family:arial;color:#000;margin-bottom:19px;line-height:1.4em}.glightbox-clean .gslide-desc{font-size:.86em;margin-bottom:0;font-family:arial;line-height:1.4em}.glightbox-clean .gslide-video{background:#000}.glightbox-clean .gclose,.glightbox-clean .gnext,.glightbox-clean .gprev{background-color:rgba(0,0,0,.75);border-radius:4px}.glightbox-clean .gclose path,.glightbox-clean .gnext path,.glightbox-clean .gprev path{fill:#fff}.glightbox-clean .gprev{position:absolute;top:-100%;left:30px;width:40px;height:50px}.glightbox-clean .gnext{position:absolute;top:-100%;right:30px;width:40px;height:50px}.glightbox-clean .gclose{width:35px;height:35px;top:15px;right:10px;position:absolute}.glightbox-clean .gclose svg{width:18px;height:auto}.glightbox-clean .gclose:hover{opacity:1}.gfadeIn{-webkit-animation:gfadeIn .5s ease;animation:gfadeIn .5s ease}.gfadeOut{-webkit-animation:gfadeOut .5s ease;animation:gfadeOut .5s ease}.gslideOutLeft{-webkit-animation:gslideOutLeft .3s ease;animation:gslideOutLeft .3s ease}.gslideInLeft{-webkit-animation:gslideInLeft .3s ease;animation:gslideInLeft .3s ease}.gslideOutRight{-webkit-animation:gslideOutRight .3s ease;animation:gslideOutRight .3s ease}.gslideInRight{-webkit-animation:gslideInRight .3s ease;animation:gslideInRight .3s ease}.gzoomIn{-webkit-animation:gzoomIn .5s ease;animation:gzoomIn .5s ease}.gzoomOut{-webkit-animation:gzoomOut .5s ease;animation:gzoomOut .5s ease}@-webkit-keyframes lightboxLoader{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes lightboxLoader{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes gfadeIn{from{opacity:0}to{opacity:1}}@keyframes gfadeIn{from{opacity:0}to{opacity:1}}@-webkit-keyframes gfadeOut{from{opacity:1}to{opacity:0}}@keyframes gfadeOut{from{opacity:1}to{opacity:0}}@-webkit-keyframes gslideInLeft{from{opacity:0;-webkit-transform:translate3d(-60%,0,0);transform:translate3d(-60%,0,0)}to{visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}}@keyframes gslideInLeft{from{opacity:0;-webkit-transform:translate3d(-60%,0,0);transform:translate3d(-60%,0,0)}to{visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}}@-webkit-keyframes gslideOutLeft{from{opacity:1;visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-60%,0,0);transform:translate3d(-60%,0,0);opacity:0;visibility:hidden}}@keyframes gslideOutLeft{from{opacity:1;visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-60%,0,0);transform:translate3d(-60%,0,0);opacity:0;visibility:hidden}}@-webkit-keyframes gslideInRight{from{opacity:0;visibility:visible;-webkit-transform:translate3d(60%,0,0);transform:translate3d(60%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}}@keyframes gslideInRight{from{opacity:0;visibility:visible;-webkit-transform:translate3d(60%,0,0);transform:translate3d(60%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}}@-webkit-keyframes gslideOutRight{from{opacity:1;visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(60%,0,0);transform:translate3d(60%,0,0);opacity:0}}@keyframes gslideOutRight{from{opacity:1;visibility:visible;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(60%,0,0);transform:translate3d(60%,0,0);opacity:0}}@-webkit-keyframes gzoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:1}}@keyframes gzoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:1}}@-webkit-keyframes gzoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes gzoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@media (min-width:769px){.glightbox-container .ginner-container{width:auto;height:auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.glightbox-container .ginner-container.desc-top .gslide-description{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.glightbox-container .ginner-container.desc-top .gslide-image,.glightbox-container .ginner-container.desc-top .gslide-image img{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.glightbox-container .ginner-container.desc-left .gslide-description{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.glightbox-container .ginner-container.desc-left .gslide-image{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.gslide-image img{max-height:97vh;max-width:100%}.gslide-image img.zoomable{cursor:-webkit-zoom-in;cursor:zoom-in}.zoomed .gslide-image img.zoomable{cursor:-webkit-grab;cursor:grab}.gslide-inline{max-height:95vh}.gslide-external{max-height:100vh}.gslide-description.description-left,.gslide-description.description-right{max-width:275px}.glightbox-open{height:auto}.goverlay{background:rgba(0,0,0,.92)}.glightbox-clean .gslide-media{-webkit-box-shadow:1px 2px 9px 0 rgba(0,0,0,.65);box-shadow:1px 2px 9px 0 rgba(0,0,0,.65)}.glightbox-clean .description-left .gdesc-inner,.glightbox-clean .description-right .gdesc-inner{position:absolute;height:100%;overflow-y:auto}.glightbox-clean .gclose,.glightbox-clean .gnext,.glightbox-clean .gprev{background-color:rgba(0,0,0,.32)}.glightbox-clean .gclose:hover,.glightbox-clean .gnext:hover,.glightbox-clean .gprev:hover{background-color:rgba(0,0,0,.7)}.glightbox-clean .gprev{top:45%}.glightbox-clean .gnext{top:45%}}@media (min-width:992px){.glightbox-clean .gclose{opacity:.7;right:20px}}@media screen and (max-height:420px){.goverlay{background:#000}} \ No newline at end of file diff --git a/_extensions/quarto-ext/lightbox/resources/js/glightbox.min.js b/_extensions/quarto-ext/lightbox/resources/js/glightbox.min.js deleted file mode 100644 index 997908b..0000000 --- a/_extensions/quarto-ext/lightbox/resources/js/glightbox.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).GLightbox=t()}(this,(function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=e[s]=e[s]||[],l={all:n,evt:null,found:null};return t&&i&&P(n)>0&&o(n,(function(e,n){if(e.eventName==t&&e.fn.toString()==i.toString())return l.found=!0,l.evt=n,!1})),l}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.onElement,n=t.withCallback,s=t.avoidDuplicate,l=void 0===s||s,a=t.once,h=void 0!==a&&a,d=t.useCapture,c=void 0!==d&&d,u=arguments.length>2?arguments[2]:void 0,g=i||[];function v(e){T(n)&&n.call(u,e,this),h&&v.destroy()}return C(g)&&(g=document.querySelectorAll(g)),v.destroy=function(){o(g,(function(t){var i=r(t,e,v);i.found&&i.all.splice(i.evt,1),t.removeEventListener&&t.removeEventListener(e,v,c)}))},o(g,(function(t){var i=r(t,e,v);(t.addEventListener&&l&&!i.found||!l)&&(t.addEventListener(e,v,c),i.all.push({eventName:e,fn:v}))})),v}function h(e,t){o(t.split(" "),(function(t){return e.classList.add(t)}))}function d(e,t){o(t.split(" "),(function(t){return e.classList.remove(t)}))}function c(e,t){return e.classList.contains(t)}function u(e,t){for(;e!==document.body;){if(!(e=e.parentElement))return!1;if("function"==typeof e.matches?e.matches(t):e.msMatchesSelector(t))return e}}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||""===t)return!1;if("none"===t)return T(i)&&i(),!1;var n=x(),s=t.split(" ");o(s,(function(t){h(e,"g"+t)})),a(n,{onElement:e,avoidDuplicate:!1,once:!0,withCallback:function(e,t){o(s,(function(e){d(t,"g"+e)})),T(i)&&i()}})}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(""===t)return e.style.webkitTransform="",e.style.MozTransform="",e.style.msTransform="",e.style.OTransform="",e.style.transform="",!1;e.style.webkitTransform=t,e.style.MozTransform=t,e.style.msTransform=t,e.style.OTransform=t,e.style.transform=t}function f(e){e.style.display="block"}function p(e){e.style.display="none"}function m(e){var t=document.createDocumentFragment(),i=document.createElement("div");for(i.innerHTML=e;i.firstChild;)t.appendChild(i.firstChild);return t}function y(){return{width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}}function x(){var e,t=document.createElement("fakeelement"),i={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(e in i)if(void 0!==t.style[e])return i[e]}function b(e,t,i,n){if(e())t();else{var s;i||(i=100);var l=setInterval((function(){e()&&(clearInterval(l),s&&clearTimeout(s),t())}),i);n&&(s=setTimeout((function(){clearInterval(l)}),n))}}function S(e,t,i){if(I(e))console.error("Inject assets error");else if(T(t)&&(i=t,t=!1),C(t)&&t in window)T(i)&&i();else{var n;if(-1!==e.indexOf(".css")){if((n=document.querySelectorAll('link[href="'+e+'"]'))&&n.length>0)return void(T(i)&&i());var s=document.getElementsByTagName("head")[0],l=s.querySelectorAll('link[rel="stylesheet"]'),o=document.createElement("link");return o.rel="stylesheet",o.type="text/css",o.href=e,o.media="all",l?s.insertBefore(o,l[0]):s.appendChild(o),void(T(i)&&i())}if((n=document.querySelectorAll('script[src="'+e+'"]'))&&n.length>0){if(T(i)){if(C(t))return b((function(){return void 0!==window[t]}),(function(){i()})),!1;i()}}else{var r=document.createElement("script");r.type="text/javascript",r.src=e,r.onload=function(){if(T(i)){if(C(t))return b((function(){return void 0!==window[t]}),(function(){i()})),!1;i()}},document.body.appendChild(r)}}}function w(){return"navigator"in window&&window.navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i)}function T(e){return"function"==typeof e}function C(e){return"string"==typeof e}function k(e){return!(!e||!e.nodeType||1!=e.nodeType)}function E(e){return Array.isArray(e)}function A(e){return e&&e.length&&isFinite(e.length)}function L(t){return"object"===e(t)&&null!=t&&!T(t)&&!E(t)}function I(e){return null==e}function O(e,t){return null!==e&&hasOwnProperty.call(e,t)}function P(e){if(L(e)){if(e.keys)return e.keys().length;var t=0;for(var i in e)O(e,i)&&t++;return t}return e.length}function M(e){return!isNaN(parseFloat(e))&&isFinite(e)}function z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=document.querySelectorAll(".gbtn[data-taborder]:not(.disabled)");if(!t.length)return!1;if(1==t.length)return t[0];"string"==typeof e&&(e=parseInt(e));var i=[];o(t,(function(e){i.push(e.getAttribute("data-taborder"))}));var n=Math.max.apply(Math,i.map((function(e){return parseInt(e)}))),s=e<0?1:e+1;s>n&&(s="1");var l=i.filter((function(e){return e>=parseInt(s)})),r=l.sort()[0];return document.querySelector('.gbtn[data-taborder="'.concat(r,'"]'))}function X(e){if(e.events.hasOwnProperty("keyboard"))return!1;e.events.keyboard=a("keydown",{onElement:window,withCallback:function(t,i){var n=(t=t||window.event).keyCode;if(9==n){var s=document.querySelector(".gbtn.focused");if(!s){var l=!(!document.activeElement||!document.activeElement.nodeName)&&document.activeElement.nodeName.toLocaleLowerCase();if("input"==l||"textarea"==l||"button"==l)return}t.preventDefault();var o=document.querySelectorAll(".gbtn[data-taborder]");if(!o||o.length<=0)return;if(!s){var r=z();return void(r&&(r.focus(),h(r,"focused")))}var a=z(s.getAttribute("data-taborder"));d(s,"focused"),a&&(a.focus(),h(a,"focused"))}39==n&&e.nextSlide(),37==n&&e.prevSlide(),27==n&&e.close()}})}function Y(e){return Math.sqrt(e.x*e.x+e.y*e.y)}function q(e,t){var i=function(e,t){var i=Y(e)*Y(t);if(0===i)return 0;var n=function(e,t){return e.x*t.x+e.y*t.y}(e,t)/i;return n>1&&(n=1),Math.acos(n)}(e,t);return function(e,t){return e.x*t.y-t.x*e.y}(e,t)>0&&(i*=-1),180*i/Math.PI}var N=function(){function e(i){t(this,e),this.handlers=[],this.el=i}return n(e,[{key:"add",value:function(e){this.handlers.push(e)}},{key:"del",value:function(e){e||(this.handlers=[]);for(var t=this.handlers.length;t>=0;t--)this.handlers[t]===e&&this.handlers.splice(t,1)}},{key:"dispatch",value:function(){for(var e=0,t=this.handlers.length;e=0)console.log("ignore drag for this touched element",e.target.nodeName.toLowerCase());else{this.now=Date.now(),this.x1=e.touches[0].pageX,this.y1=e.touches[0].pageY,this.delta=this.now-(this.last||this.now),this.touchStart.dispatch(e,this.element),null!==this.preTapPosition.x&&(this.isDoubleTap=this.delta>0&&this.delta<=250&&Math.abs(this.preTapPosition.x-this.x1)<30&&Math.abs(this.preTapPosition.y-this.y1)<30,this.isDoubleTap&&clearTimeout(this.singleTapTimeout)),this.preTapPosition.x=this.x1,this.preTapPosition.y=this.y1,this.last=this.now;var t=this.preV;if(e.touches.length>1){this._cancelLongTap(),this._cancelSingleTap();var i={x:e.touches[1].pageX-this.x1,y:e.touches[1].pageY-this.y1};t.x=i.x,t.y=i.y,this.pinchStartLen=Y(t),this.multipointStart.dispatch(e,this.element)}this._preventTap=!1,this.longTapTimeout=setTimeout(function(){this.longTap.dispatch(e,this.element),this._preventTap=!0}.bind(this),750)}}}},{key:"move",value:function(e){if(e.touches){var t=this.preV,i=e.touches.length,n=e.touches[0].pageX,s=e.touches[0].pageY;if(this.isDoubleTap=!1,i>1){var l=e.touches[1].pageX,o=e.touches[1].pageY,r={x:e.touches[1].pageX-n,y:e.touches[1].pageY-s};null!==t.x&&(this.pinchStartLen>0&&(e.zoom=Y(r)/this.pinchStartLen,this.pinch.dispatch(e,this.element)),e.angle=q(r,t),this.rotate.dispatch(e,this.element)),t.x=r.x,t.y=r.y,null!==this.x2&&null!==this.sx2?(e.deltaX=(n-this.x2+l-this.sx2)/2,e.deltaY=(s-this.y2+o-this.sy2)/2):(e.deltaX=0,e.deltaY=0),this.twoFingerPressMove.dispatch(e,this.element),this.sx2=l,this.sy2=o}else{if(null!==this.x2){e.deltaX=n-this.x2,e.deltaY=s-this.y2;var a=Math.abs(this.x1-this.x2),h=Math.abs(this.y1-this.y2);(a>10||h>10)&&(this._preventTap=!0)}else e.deltaX=0,e.deltaY=0;this.pressMove.dispatch(e,this.element)}this.touchMove.dispatch(e,this.element),this._cancelLongTap(),this.x2=n,this.y2=s,i>1&&e.preventDefault()}}},{key:"end",value:function(e){if(e.changedTouches){this._cancelLongTap();var t=this;e.touches.length<2&&(this.multipointEnd.dispatch(e,this.element),this.sx2=this.sy2=null),this.x2&&Math.abs(this.x1-this.x2)>30||this.y2&&Math.abs(this.y1-this.y2)>30?(e.direction=this._swipeDirection(this.x1,this.x2,this.y1,this.y2),this.swipeTimeout=setTimeout((function(){t.swipe.dispatch(e,t.element)}),0)):(this.tapTimeout=setTimeout((function(){t._preventTap||t.tap.dispatch(e,t.element),t.isDoubleTap&&(t.doubleTap.dispatch(e,t.element),t.isDoubleTap=!1)}),0),t.isDoubleTap||(t.singleTapTimeout=setTimeout((function(){t.singleTap.dispatch(e,t.element)}),250))),this.touchEnd.dispatch(e,this.element),this.preV.x=0,this.preV.y=0,this.zoom=1,this.pinchStartLen=null,this.x1=this.x2=this.y1=this.y2=null}}},{key:"cancelAll",value:function(){this._preventTap=!0,clearTimeout(this.singleTapTimeout),clearTimeout(this.tapTimeout),clearTimeout(this.longTapTimeout),clearTimeout(this.swipeTimeout)}},{key:"cancel",value:function(e){this.cancelAll(),this.touchCancel.dispatch(e,this.element)}},{key:"_cancelLongTap",value:function(){clearTimeout(this.longTapTimeout)}},{key:"_cancelSingleTap",value:function(){clearTimeout(this.singleTapTimeout)}},{key:"_swipeDirection",value:function(e,t,i,n){return Math.abs(e-t)>=Math.abs(i-n)?e-t>0?"Left":"Right":i-n>0?"Up":"Down"}},{key:"on",value:function(e,t){this[e]&&this[e].add(t)}},{key:"off",value:function(e,t){this[e]&&this[e].del(t)}},{key:"destroy",value:function(){return this.singleTapTimeout&&clearTimeout(this.singleTapTimeout),this.tapTimeout&&clearTimeout(this.tapTimeout),this.longTapTimeout&&clearTimeout(this.longTapTimeout),this.swipeTimeout&&clearTimeout(this.swipeTimeout),this.element.removeEventListener("touchstart",this.start),this.element.removeEventListener("touchmove",this.move),this.element.removeEventListener("touchend",this.end),this.element.removeEventListener("touchcancel",this.cancel),this.rotate.del(),this.touchStart.del(),this.multipointStart.del(),this.multipointEnd.del(),this.pinch.del(),this.swipe.del(),this.tap.del(),this.doubleTap.del(),this.longTap.del(),this.singleTap.del(),this.pressMove.del(),this.twoFingerPressMove.del(),this.touchMove.del(),this.touchEnd.del(),this.touchCancel.del(),this.preV=this.pinchStartLen=this.zoom=this.isDoubleTap=this.delta=this.last=this.now=this.tapTimeout=this.singleTapTimeout=this.longTapTimeout=this.swipeTimeout=this.x1=this.x2=this.y1=this.y2=this.preTapPosition=this.rotate=this.touchStart=this.multipointStart=this.multipointEnd=this.pinch=this.swipe=this.tap=this.doubleTap=this.longTap=this.singleTap=this.pressMove=this.touchMove=this.touchEnd=this.touchCancel=this.twoFingerPressMove=null,window.removeEventListener("scroll",this._cancelAllHandler),null}}]),e}();function W(e){var t=function(){var e,t=document.createElement("fakeelement"),i={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in i)if(void 0!==t.style[e])return i[e]}(),i=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,n=c(e,"gslide-media")?e:e.querySelector(".gslide-media"),s=u(n,".ginner-container"),l=e.querySelector(".gslide-description");i>769&&(n=s),h(n,"greset"),v(n,"translate3d(0, 0, 0)"),a(t,{onElement:n,once:!0,withCallback:function(e,t){d(n,"greset")}}),n.style.opacity="",l&&(l.style.opacity="")}function B(e){if(e.events.hasOwnProperty("touch"))return!1;var t,i,n,s=y(),l=s.width,o=s.height,r=!1,a=null,g=null,f=null,p=!1,m=1,x=1,b=!1,S=!1,w=null,T=null,C=null,k=null,E=0,A=0,L=!1,I=!1,O={},P={},M=0,z=0,X=document.getElementById("glightbox-slider"),Y=document.querySelector(".goverlay"),q=new _(X,{touchStart:function(t){if(r=!0,(c(t.targetTouches[0].target,"ginner-container")||u(t.targetTouches[0].target,".gslide-desc")||"a"==t.targetTouches[0].target.nodeName.toLowerCase())&&(r=!1),u(t.targetTouches[0].target,".gslide-inline")&&!c(t.targetTouches[0].target.parentNode,"gslide-inline")&&(r=!1),r){if(P=t.targetTouches[0],O.pageX=t.targetTouches[0].pageX,O.pageY=t.targetTouches[0].pageY,M=t.targetTouches[0].clientX,z=t.targetTouches[0].clientY,a=e.activeSlide,g=a.querySelector(".gslide-media"),n=a.querySelector(".gslide-inline"),f=null,c(g,"gslide-image")&&(f=g.querySelector("img")),(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)>769&&(g=a.querySelector(".ginner-container")),d(Y,"greset"),t.pageX>20&&t.pageXo){var a=O.pageX-P.pageX;if(Math.abs(a)<=13)return!1}p=!0;var h,d=s.targetTouches[0].clientX,c=s.targetTouches[0].clientY,u=M-d,m=z-c;if(Math.abs(u)>Math.abs(m)?(L=!1,I=!0):(I=!1,L=!0),t=P.pageX-O.pageX,E=100*t/l,i=P.pageY-O.pageY,A=100*i/o,L&&f&&(h=1-Math.abs(i)/o,Y.style.opacity=h,e.settings.touchFollowAxis&&(E=0)),I&&(h=1-Math.abs(t)/l,g.style.opacity=h,e.settings.touchFollowAxis&&(A=0)),!f)return v(g,"translate3d(".concat(E,"%, 0, 0)"));v(g,"translate3d(".concat(E,"%, ").concat(A,"%, 0)"))}},touchEnd:function(){if(r){if(p=!1,S||b)return C=w,void(k=T);var t=Math.abs(parseInt(A)),i=Math.abs(parseInt(E));if(!(t>29&&f))return t<29&&i<25?(h(Y,"greset"),Y.style.opacity=1,W(g)):void 0;e.close()}},multipointEnd:function(){setTimeout((function(){b=!1}),50)},multipointStart:function(){b=!0,m=x||1},pinch:function(e){if(!f||p)return!1;b=!0,f.scaleX=f.scaleY=m*e.zoom;var t=m*e.zoom;if(S=!0,t<=1)return S=!1,t=1,k=null,C=null,w=null,T=null,void f.setAttribute("style","");t>4.5&&(t=4.5),f.style.transform="scale3d(".concat(t,", ").concat(t,", 1)"),x=t},pressMove:function(e){if(S&&!b){var t=P.pageX-O.pageX,i=P.pageY-O.pageY;C&&(t+=C),k&&(i+=k),w=t,T=i;var n="translate3d(".concat(t,"px, ").concat(i,"px, 0)");x&&(n+=" scale3d(".concat(x,", ").concat(x,", 1)")),v(f,n)}},swipe:function(t){if(!S)if(b)b=!1;else{if("Left"==t.direction){if(e.index==e.elements.length-1)return W(g);e.nextSlide()}if("Right"==t.direction){if(0==e.index)return W(g);e.prevSlide()}}}});e.events.touch=q}var H=function(){function e(i,n){var s=this,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t(this,e),this.img=i,this.slide=n,this.onclose=l,this.img.setZoomEvents)return!1;this.active=!1,this.zoomedIn=!1,this.dragging=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.img.addEventListener("mousedown",(function(e){return s.dragStart(e)}),!1),this.img.addEventListener("mouseup",(function(e){return s.dragEnd(e)}),!1),this.img.addEventListener("mousemove",(function(e){return s.drag(e)}),!1),this.img.addEventListener("click",(function(e){return s.slide.classList.contains("dragging-nav")?(s.zoomOut(),!1):s.zoomedIn?void(s.zoomedIn&&!s.dragging&&s.zoomOut()):s.zoomIn()}),!1),this.img.setZoomEvents=!0}return n(e,[{key:"zoomIn",value:function(){var e=this.widowWidth();if(!(this.zoomedIn||e<=768)){var t=this.img;if(t.setAttribute("data-style",t.getAttribute("style")),t.style.maxWidth=t.naturalWidth+"px",t.style.maxHeight=t.naturalHeight+"px",t.naturalWidth>e){var i=e/2-t.naturalWidth/2;this.setTranslate(this.img.parentNode,i,0)}this.slide.classList.add("zoomed"),this.zoomedIn=!0}}},{key:"zoomOut",value:function(){this.img.parentNode.setAttribute("style",""),this.img.setAttribute("style",this.img.getAttribute("data-style")),this.slide.classList.remove("zoomed"),this.zoomedIn=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.onclose&&"function"==typeof this.onclose&&this.onclose()}},{key:"dragStart",value:function(e){e.preventDefault(),this.zoomedIn?("touchstart"===e.type?(this.initialX=e.touches[0].clientX-this.xOffset,this.initialY=e.touches[0].clientY-this.yOffset):(this.initialX=e.clientX-this.xOffset,this.initialY=e.clientY-this.yOffset),e.target===this.img&&(this.active=!0,this.img.classList.add("dragging"))):this.active=!1}},{key:"dragEnd",value:function(e){var t=this;e.preventDefault(),this.initialX=this.currentX,this.initialY=this.currentY,this.active=!1,setTimeout((function(){t.dragging=!1,t.img.isDragging=!1,t.img.classList.remove("dragging")}),100)}},{key:"drag",value:function(e){this.active&&(e.preventDefault(),"touchmove"===e.type?(this.currentX=e.touches[0].clientX-this.initialX,this.currentY=e.touches[0].clientY-this.initialY):(this.currentX=e.clientX-this.initialX,this.currentY=e.clientY-this.initialY),this.xOffset=this.currentX,this.yOffset=this.currentY,this.img.isDragging=!0,this.dragging=!0,this.setTranslate(this.img,this.currentX,this.currentY))}},{key:"onMove",value:function(e){if(this.zoomedIn){var t=e.clientX-this.img.naturalWidth/2,i=e.clientY-this.img.naturalHeight/2;this.setTranslate(this.img,t,i)}}},{key:"setTranslate",value:function(e,t,i){e.style.transform="translate3d("+t+"px, "+i+"px, 0)"}},{key:"widowWidth",value:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}}]),e}(),V=function(){function e(){var i=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e);var s=n.dragEl,l=n.toleranceX,o=void 0===l?40:l,r=n.toleranceY,a=void 0===r?65:r,h=n.slide,d=void 0===h?null:h,c=n.instance,u=void 0===c?null:c;this.el=s,this.active=!1,this.dragging=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.direction=null,this.lastDirection=null,this.toleranceX=o,this.toleranceY=a,this.toleranceReached=!1,this.dragContainer=this.el,this.slide=d,this.instance=u,this.el.addEventListener("mousedown",(function(e){return i.dragStart(e)}),!1),this.el.addEventListener("mouseup",(function(e){return i.dragEnd(e)}),!1),this.el.addEventListener("mousemove",(function(e){return i.drag(e)}),!1)}return n(e,[{key:"dragStart",value:function(e){if(this.slide.classList.contains("zoomed"))this.active=!1;else{"touchstart"===e.type?(this.initialX=e.touches[0].clientX-this.xOffset,this.initialY=e.touches[0].clientY-this.yOffset):(this.initialX=e.clientX-this.xOffset,this.initialY=e.clientY-this.yOffset);var t=e.target.nodeName.toLowerCase();e.target.classList.contains("nodrag")||u(e.target,".nodrag")||-1!==["input","select","textarea","button","a"].indexOf(t)?this.active=!1:(e.preventDefault(),(e.target===this.el||"img"!==t&&u(e.target,".gslide-inline"))&&(this.active=!0,this.el.classList.add("dragging"),this.dragContainer=u(e.target,".ginner-container")))}}},{key:"dragEnd",value:function(e){var t=this;e&&e.preventDefault(),this.initialX=0,this.initialY=0,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.active=!1,this.doSlideChange&&(this.instance.preventOutsideClick=!0,"right"==this.doSlideChange&&this.instance.prevSlide(),"left"==this.doSlideChange&&this.instance.nextSlide()),this.doSlideClose&&this.instance.close(),this.toleranceReached||this.setTranslate(this.dragContainer,0,0,!0),setTimeout((function(){t.instance.preventOutsideClick=!1,t.toleranceReached=!1,t.lastDirection=null,t.dragging=!1,t.el.isDragging=!1,t.el.classList.remove("dragging"),t.slide.classList.remove("dragging-nav"),t.dragContainer.style.transform="",t.dragContainer.style.transition=""}),100)}},{key:"drag",value:function(e){if(this.active){e.preventDefault(),this.slide.classList.add("dragging-nav"),"touchmove"===e.type?(this.currentX=e.touches[0].clientX-this.initialX,this.currentY=e.touches[0].clientY-this.initialY):(this.currentX=e.clientX-this.initialX,this.currentY=e.clientY-this.initialY),this.xOffset=this.currentX,this.yOffset=this.currentY,this.el.isDragging=!0,this.dragging=!0,this.doSlideChange=!1,this.doSlideClose=!1;var t=Math.abs(this.currentX),i=Math.abs(this.currentY);if(t>0&&t>=Math.abs(this.currentY)&&(!this.lastDirection||"x"==this.lastDirection)){this.yOffset=0,this.lastDirection="x",this.setTranslate(this.dragContainer,this.currentX,0);var n=this.shouldChange();if(!this.instance.settings.dragAutoSnap&&n&&(this.doSlideChange=n),this.instance.settings.dragAutoSnap&&n)return this.instance.preventOutsideClick=!0,this.toleranceReached=!0,this.active=!1,this.instance.preventOutsideClick=!0,this.dragEnd(null),"right"==n&&this.instance.prevSlide(),void("left"==n&&this.instance.nextSlide())}if(this.toleranceY>0&&i>0&&i>=t&&(!this.lastDirection||"y"==this.lastDirection)){this.xOffset=0,this.lastDirection="y",this.setTranslate(this.dragContainer,0,this.currentY);var s=this.shouldClose();return!this.instance.settings.dragAutoSnap&&s&&(this.doSlideClose=!0),void(this.instance.settings.dragAutoSnap&&s&&this.instance.close())}}}},{key:"shouldChange",value:function(){var e=!1;if(Math.abs(this.currentX)>=this.toleranceX){var t=this.currentX>0?"right":"left";("left"==t&&this.slide!==this.slide.parentNode.lastChild||"right"==t&&this.slide!==this.slide.parentNode.firstChild)&&(e=t)}return e}},{key:"shouldClose",value:function(){var e=!1;return Math.abs(this.currentY)>=this.toleranceY&&(e=!0),e}},{key:"setTranslate",value:function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.style.transition=n?"all .2s ease":"",e.style.transform="translate3d(".concat(t,"px, ").concat(i,"px, 0)")}}]),e}();function j(e,t,i,n){var s=e.querySelector(".gslide-media"),l=new Image,o="gSlideTitle_"+i,r="gSlideDesc_"+i;l.addEventListener("load",(function(){T(n)&&n()}),!1),l.src=t.href,""!=t.sizes&&""!=t.srcset&&(l.sizes=t.sizes,l.srcset=t.srcset),l.alt="",I(t.alt)||""===t.alt||(l.alt=t.alt),""!==t.title&&l.setAttribute("aria-labelledby",o),""!==t.description&&l.setAttribute("aria-describedby",r),t.hasOwnProperty("_hasCustomWidth")&&t._hasCustomWidth&&(l.style.width=t.width),t.hasOwnProperty("_hasCustomHeight")&&t._hasCustomHeight&&(l.style.height=t.height),s.insertBefore(l,s.firstChild)}function F(e,t,i,n){var s=this,l=e.querySelector(".ginner-container"),o="gvideo"+i,r=e.querySelector(".gslide-media"),a=this.getAllPlayers();h(l,"gvideo-container"),r.insertBefore(m('
'),r.firstChild);var d=e.querySelector(".gvideo-wrapper");S(this.settings.plyr.css,"Plyr");var c=t.href,u=null==t?void 0:t.videoProvider,g=!1;r.style.maxWidth=t.width,S(this.settings.plyr.js,"Plyr",(function(){if(!u&&c.match(/vimeo\.com\/([0-9]*)/)&&(u="vimeo"),!u&&(c.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||c.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/)||c.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/))&&(u="youtube"),"local"===u||!u){u="local";var l='")}var r=g||m('
'));h(d,"".concat(u,"-video gvideo")),d.appendChild(r),d.setAttribute("data-id",o),d.setAttribute("data-index",i);var v=O(s.settings.plyr,"config")?s.settings.plyr.config:{},f=new Plyr("#"+o,v);f.on("ready",(function(e){a[o]=e.detail.plyr,T(n)&&n()})),b((function(){return e.querySelector("iframe")&&"true"==e.querySelector("iframe").dataset.ready}),(function(){s.resize(e)})),f.on("enterfullscreen",R),f.on("exitfullscreen",R)}))}function R(e){var t=u(e.target,".gslide-media");"enterfullscreen"===e.type&&h(t,"fullscreen"),"exitfullscreen"===e.type&&d(t,"fullscreen")}function G(e,t,i,n){var s,l=this,o=e.querySelector(".gslide-media"),r=!(!O(t,"href")||!t.href)&&t.href.split("#").pop().trim(),d=!(!O(t,"content")||!t.content)&&t.content;if(d&&(C(d)&&(s=m('
'.concat(d,"
"))),k(d))){"none"==d.style.display&&(d.style.display="block");var c=document.createElement("div");c.className="ginlined-content",c.appendChild(d),s=c}if(r){var u=document.getElementById(r);if(!u)return!1;var g=u.cloneNode(!0);g.style.height=t.height,g.style.maxWidth=t.width,h(g,"ginlined-content"),s=g}if(!s)return console.error("Unable to append inline slide content",t),!1;o.style.height=t.height,o.style.width=t.width,o.appendChild(s),this.events["inlineclose"+r]=a("click",{onElement:o.querySelectorAll(".gtrigger-close"),withCallback:function(e){e.preventDefault(),l.close()}}),T(n)&&n()}function Z(e,t,i,n){var s=e.querySelector(".gslide-media"),l=function(e){var t=e.url,i=e.allow,n=e.callback,s=e.appendTo,l=document.createElement("iframe");return l.className="vimeo-video gvideo",l.src=t,l.style.width="100%",l.style.height="100%",i&&l.setAttribute("allow",i),l.onload=function(){l.onload=null,h(l,"node-ready"),T(n)&&n()},s&&s.appendChild(l),l}({url:t.href,callback:n});s.parentNode.style.maxWidth=t.width,s.parentNode.style.height=t.height,s.appendChild(l)}var U=function(){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e),this.defaults={href:"",sizes:"",srcset:"",title:"",type:"",videoProvider:"",description:"",alt:"",descPosition:"bottom",effect:"",width:"",height:"",content:!1,zoomable:!0,draggable:!0},L(i)&&(this.defaults=l(this.defaults,i))}return n(e,[{key:"sourceType",value:function(e){var t=e;if(null!==(e=e.toLowerCase()).match(/\.(jpeg|jpg|jpe|gif|png|apn|webp|avif|svg)/))return"image";if(e.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||e.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/)||e.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/))return"video";if(e.match(/vimeo\.com\/([0-9]*)/))return"video";if(null!==e.match(/\.(mp4|ogg|webm|mov)/))return"video";if(null!==e.match(/\.(mp3|wav|wma|aac|ogg)/))return"audio";if(e.indexOf("#")>-1&&""!==t.split("#").pop().trim())return"inline";return e.indexOf("goajax=true")>-1?"ajax":"external"}},{key:"parseConfig",value:function(e,t){var i=this,n=l({descPosition:t.descPosition},this.defaults);if(L(e)&&!k(e)){O(e,"type")||(O(e,"content")&&e.content?e.type="inline":O(e,"href")&&(e.type=this.sourceType(e.href)));var s=l(n,e);return this.setSize(s,t),s}var r="",a=e.getAttribute("data-glightbox"),h=e.nodeName.toLowerCase();if("a"===h&&(r=e.href),"img"===h&&(r=e.src,n.alt=e.alt),n.href=r,o(n,(function(s,l){O(t,l)&&"width"!==l&&(n[l]=t[l]);var o=e.dataset[l];I(o)||(n[l]=i.sanitizeValue(o))})),n.content&&(n.type="inline"),!n.type&&r&&(n.type=this.sourceType(r)),I(a)){if(!n.title&&"a"==h){var d=e.title;I(d)||""===d||(n.title=d)}if(!n.title&&"img"==h){var c=e.alt;I(c)||""===c||(n.title=c)}}else{var u=[];o(n,(function(e,t){u.push(";\\s?"+t)})),u=u.join("\\s?:|"),""!==a.trim()&&o(n,(function(e,t){var s=a,l=new RegExp("s?"+t+"s?:s?(.*?)("+u+"s?:|$)"),o=s.match(l);if(o&&o.length&&o[1]){var r=o[1].trim().replace(/;\s*$/,"");n[t]=i.sanitizeValue(r)}}))}if(n.description&&"."===n.description.substring(0,1)){var g;try{g=document.querySelector(n.description).innerHTML}catch(e){if(!(e instanceof DOMException))throw e}g&&(n.description=g)}if(!n.description){var v=e.querySelector(".glightbox-desc");v&&(n.description=v.innerHTML)}return this.setSize(n,t,e),this.slideConfig=n,n}},{key:"setSize",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n="video"==e.type?this.checkSize(t.videosWidth):this.checkSize(t.width),s=this.checkSize(t.height);return e.width=O(e,"width")&&""!==e.width?this.checkSize(e.width):n,e.height=O(e,"height")&&""!==e.height?this.checkSize(e.height):s,i&&"image"==e.type&&(e._hasCustomWidth=!!i.dataset.width,e._hasCustomHeight=!!i.dataset.height),e}},{key:"checkSize",value:function(e){return M(e)?"".concat(e,"px"):e}},{key:"sanitizeValue",value:function(e){return"true"!==e&&"false"!==e?e:"true"===e}}]),e}(),$=function(){function e(i,n,s){t(this,e),this.element=i,this.instance=n,this.index=s}return n(e,[{key:"setContent",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(c(t,"loaded"))return!1;var n=this.instance.settings,s=this.slideConfig,l=w();T(n.beforeSlideLoad)&&n.beforeSlideLoad({index:this.index,slide:t,player:!1});var o=s.type,r=s.descPosition,a=t.querySelector(".gslide-media"),d=t.querySelector(".gslide-title"),u=t.querySelector(".gslide-desc"),g=t.querySelector(".gdesc-inner"),v=i,f="gSlideTitle_"+this.index,p="gSlideDesc_"+this.index;if(T(n.afterSlideLoad)&&(v=function(){T(i)&&i(),n.afterSlideLoad({index:e.index,slide:t,player:e.instance.getSlidePlayerInstance(e.index)})}),""==s.title&&""==s.description?g&&g.parentNode.parentNode.removeChild(g.parentNode):(d&&""!==s.title?(d.id=f,d.innerHTML=s.title):d.parentNode.removeChild(d),u&&""!==s.description?(u.id=p,l&&n.moreLength>0?(s.smallDescription=this.slideShortDesc(s.description,n.moreLength,n.moreText),u.innerHTML=s.smallDescription,this.descriptionEvents(u,s)):u.innerHTML=s.description):u.parentNode.removeChild(u),h(a.parentNode,"desc-".concat(r)),h(g.parentNode,"description-".concat(r))),h(a,"gslide-".concat(o)),h(t,"loaded"),"video"!==o){if("external"!==o)return"inline"===o?(G.apply(this.instance,[t,s,this.index,v]),void(s.draggable&&new V({dragEl:t.querySelector(".gslide-inline"),toleranceX:n.dragToleranceX,toleranceY:n.dragToleranceY,slide:t,instance:this.instance}))):void("image"!==o?T(v)&&v():j(t,s,this.index,(function(){var i=t.querySelector("img");s.draggable&&new V({dragEl:i,toleranceX:n.dragToleranceX,toleranceY:n.dragToleranceY,slide:t,instance:e.instance}),s.zoomable&&i.naturalWidth>i.offsetWidth&&(h(i,"zoomable"),new H(i,t,(function(){e.instance.resize()}))),T(v)&&v()})));Z.apply(this,[t,s,this.index,v])}else F.apply(this.instance,[t,s,this.index,v])}},{key:"slideShortDesc",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=document.createElement("div");n.innerHTML=e;var s=n.innerText,l=i;if((e=s.trim()).length<=t)return e;var o=e.substr(0,t-1);return l?(n=null,o+'... '+i+""):o}},{key:"descriptionEvents",value:function(e,t){var i=this,n=e.querySelector(".desc-more");if(!n)return!1;a("click",{onElement:n,withCallback:function(e,n){e.preventDefault();var s=document.body,l=u(n,".gslide-desc");if(!l)return!1;l.innerHTML=t.description,h(s,"gdesc-open");var o=a("click",{onElement:[s,u(l,".gslide-description")],withCallback:function(e,n){"a"!==e.target.nodeName.toLowerCase()&&(d(s,"gdesc-open"),h(s,"gdesc-closed"),l.innerHTML=t.smallDescription,i.descriptionEvents(l,t),setTimeout((function(){d(s,"gdesc-closed")}),400),o.destroy())}})}})}},{key:"create",value:function(){return m(this.instance.settings.slideHTML)}},{key:"getConfig",value:function(){k(this.element)||this.element.hasOwnProperty("draggable")||(this.element.draggable=this.instance.settings.draggable);var e=new U(this.instance.settings.slideExtraAttributes);return this.slideConfig=e.parseConfig(this.element,this.instance.settings),this.slideConfig}}]),e}(),J=w(),K=null!==w()||void 0!==document.createTouch||"ontouchstart"in window||"onmsgesturechange"in window||navigator.msMaxTouchPoints,Q=document.getElementsByTagName("html")[0],ee={selector:".glightbox",elements:null,skin:"clean",theme:"clean",closeButton:!0,startAt:null,autoplayVideos:!0,autofocusVideos:!0,descPosition:"bottom",width:"900px",height:"506px",videosWidth:"960px",beforeSlideChange:null,afterSlideChange:null,beforeSlideLoad:null,afterSlideLoad:null,slideInserted:null,slideRemoved:null,slideExtraAttributes:null,onOpen:null,onClose:null,loop:!1,zoomable:!0,draggable:!0,dragAutoSnap:!1,dragToleranceX:40,dragToleranceY:65,preload:!0,oneSlidePerOpen:!1,touchNavigation:!0,touchFollowAxis:!0,keyboardNavigation:!0,closeOnOutsideClick:!0,plugins:!1,plyr:{css:"https://cdn.plyr.io/3.6.12/plyr.css",js:"https://cdn.plyr.io/3.6.12/plyr.js",config:{ratio:"16:9",fullscreen:{enabled:!0,iosNative:!0},youtube:{noCookie:!0,rel:0,showinfo:0,iv_load_policy:3},vimeo:{byline:!1,portrait:!1,title:!1,transparent:!1}}},openEffect:"zoom",closeEffect:"zoom",slideEffect:"slide",moreText:"See more",moreLength:60,cssEfects:{fade:{in:"fadeIn",out:"fadeOut"},zoom:{in:"zoomIn",out:"zoomOut"},slide:{in:"slideInRight",out:"slideOutLeft"},slideBack:{in:"slideInLeft",out:"slideOutRight"},none:{in:"none",out:"none"}},svg:{close:'',next:' ',prev:''},slideHTML:'
\n
\n
\n
\n
\n
\n
\n

\n
\n
\n
\n
\n
\n
',lightboxHTML:''},te=function(){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e),this.customOptions=i,this.settings=l(ee,i),this.effectsClasses=this.getAnimationClasses(),this.videoPlayers={},this.apiEvents=[],this.fullElementsList=!1}return n(e,[{key:"init",value:function(){var e=this,t=this.getSelector();t&&(this.baseEvents=a("click",{onElement:t,withCallback:function(t,i){t.preventDefault(),e.open(i)}})),this.elements=this.getElements()}},{key:"open",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(0===this.elements.length)return!1;this.activeSlide=null,this.prevActiveSlideIndex=null,this.prevActiveSlide=null;var i=M(t)?t:this.settings.startAt;if(k(e)){var n=e.getAttribute("data-gallery");n&&(this.fullElementsList=this.elements,this.elements=this.getGalleryElements(this.elements,n)),I(i)&&(i=this.getElementIndex(e))<0&&(i=0)}M(i)||(i=0),this.build(),g(this.overlay,"none"===this.settings.openEffect?"none":this.settings.cssEfects.fade.in);var s=document.body,l=window.innerWidth-document.documentElement.clientWidth;if(l>0){var o=document.createElement("style");o.type="text/css",o.className="gcss-styles",o.innerText=".gscrollbar-fixer {margin-right: ".concat(l,"px}"),document.head.appendChild(o),h(s,"gscrollbar-fixer")}h(s,"glightbox-open"),h(Q,"glightbox-open"),J&&(h(document.body,"glightbox-mobile"),this.settings.slideEffect="slide"),this.showSlide(i,!0),1===this.elements.length?(h(this.prevButton,"glightbox-button-hidden"),h(this.nextButton,"glightbox-button-hidden")):(d(this.prevButton,"glightbox-button-hidden"),d(this.nextButton,"glightbox-button-hidden")),this.lightboxOpen=!0,this.trigger("open"),T(this.settings.onOpen)&&this.settings.onOpen(),K&&this.settings.touchNavigation&&B(this),this.settings.keyboardNavigation&&X(this)}},{key:"openAt",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.open(null,e)}},{key:"showSlide",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];f(this.loader),this.index=parseInt(t);var n=this.slidesContainer.querySelector(".current");n&&d(n,"current"),this.slideAnimateOut();var s=this.slidesContainer.querySelectorAll(".gslide")[t];if(c(s,"loaded"))this.slideAnimateIn(s,i),p(this.loader);else{f(this.loader);var l=this.elements[t],o={index:this.index,slide:s,slideNode:s,slideConfig:l.slideConfig,slideIndex:this.index,trigger:l.node,player:null};this.trigger("slide_before_load",o),l.instance.setContent(s,(function(){p(e.loader),e.resize(),e.slideAnimateIn(s,i),e.trigger("slide_after_load",o)}))}this.slideDescription=s.querySelector(".gslide-description"),this.slideDescriptionContained=this.slideDescription&&c(this.slideDescription.parentNode,"gslide-media"),this.settings.preload&&(this.preloadSlide(t+1),this.preloadSlide(t-1)),this.updateNavigationClasses(),this.activeSlide=s}},{key:"preloadSlide",value:function(e){var t=this;if(e<0||e>this.elements.length-1)return!1;if(I(this.elements[e]))return!1;var i=this.slidesContainer.querySelectorAll(".gslide")[e];if(c(i,"loaded"))return!1;var n=this.elements[e],s=n.type,l={index:e,slide:i,slideNode:i,slideConfig:n.slideConfig,slideIndex:e,trigger:n.node,player:null};this.trigger("slide_before_load",l),"video"===s||"external"===s?setTimeout((function(){n.instance.setContent(i,(function(){t.trigger("slide_after_load",l)}))}),200):n.instance.setContent(i,(function(){t.trigger("slide_after_load",l)}))}},{key:"prevSlide",value:function(){this.goToSlide(this.index-1)}},{key:"nextSlide",value:function(){this.goToSlide(this.index+1)}},{key:"goToSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.prevActiveSlide=this.activeSlide,this.prevActiveSlideIndex=this.index,!this.loop()&&(e<0||e>this.elements.length-1))return!1;e<0?e=this.elements.length-1:e>=this.elements.length&&(e=0),this.showSlide(e)}},{key:"insertSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;t<0&&(t=this.elements.length);var i=new $(e,this,t),n=i.getConfig(),s=l({},n),o=i.create(),r=this.elements.length-1;s.index=t,s.node=!1,s.instance=i,s.slideConfig=n,this.elements.splice(t,0,s);var a=null,h=null;if(this.slidesContainer){if(t>r)this.slidesContainer.appendChild(o);else{var d=this.slidesContainer.querySelectorAll(".gslide")[t];this.slidesContainer.insertBefore(o,d)}(this.settings.preload&&0==this.index&&0==t||this.index-1==t||this.index+1==t)&&this.preloadSlide(t),0===this.index&&0===t&&(this.index=1),this.updateNavigationClasses(),a=this.slidesContainer.querySelectorAll(".gslide")[t],h=this.getSlidePlayerInstance(t),s.slideNode=a}this.trigger("slide_inserted",{index:t,slide:a,slideNode:a,slideConfig:n,slideIndex:t,trigger:null,player:h}),T(this.settings.slideInserted)&&this.settings.slideInserted({index:t,slide:a,player:h})}},{key:"removeSlide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(e<0||e>this.elements.length-1)return!1;var t=this.slidesContainer&&this.slidesContainer.querySelectorAll(".gslide")[e];t&&(this.getActiveSlideIndex()==e&&(e==this.elements.length-1?this.prevSlide():this.nextSlide()),t.parentNode.removeChild(t)),this.elements.splice(e,1),this.trigger("slide_removed",e),T(this.settings.slideRemoved)&&this.settings.slideRemoved(e)}},{key:"slideAnimateIn",value:function(e,t){var i=this,n=e.querySelector(".gslide-media"),s=e.querySelector(".gslide-description"),l={index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,slideNode:this.prevActiveSlide,slideIndex:this.prevActiveSlide,slideConfig:I(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].slideConfig,trigger:I(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].node,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},o={index:this.index,slide:this.activeSlide,slideNode:this.activeSlide,slideConfig:this.elements[this.index].slideConfig,slideIndex:this.index,trigger:this.elements[this.index].node,player:this.getSlidePlayerInstance(this.index)};if(n.offsetWidth>0&&s&&(p(s),s.style.display=""),d(e,this.effectsClasses),t)g(e,this.settings.cssEfects[this.settings.openEffect].in,(function(){i.settings.autoplayVideos&&i.slidePlayerPlay(e),i.trigger("slide_changed",{prev:l,current:o}),T(i.settings.afterSlideChange)&&i.settings.afterSlideChange.apply(i,[l,o])}));else{var r=this.settings.slideEffect,a="none"!==r?this.settings.cssEfects[r].in:r;this.prevActiveSlideIndex>this.index&&"slide"==this.settings.slideEffect&&(a=this.settings.cssEfects.slideBack.in),g(e,a,(function(){i.settings.autoplayVideos&&i.slidePlayerPlay(e),i.trigger("slide_changed",{prev:l,current:o}),T(i.settings.afterSlideChange)&&i.settings.afterSlideChange.apply(i,[l,o])}))}setTimeout((function(){i.resize(e)}),100),h(e,"current")}},{key:"slideAnimateOut",value:function(){if(!this.prevActiveSlide)return!1;var e=this.prevActiveSlide;d(e,this.effectsClasses),h(e,"prev");var t=this.settings.slideEffect,i="none"!==t?this.settings.cssEfects[t].out:t;this.slidePlayerPause(e),this.trigger("slide_before_change",{prev:{index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,slideNode:this.prevActiveSlide,slideIndex:this.prevActiveSlideIndex,slideConfig:I(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].slideConfig,trigger:I(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].node,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},current:{index:this.index,slide:this.activeSlide,slideNode:this.activeSlide,slideIndex:this.index,slideConfig:this.elements[this.index].slideConfig,trigger:this.elements[this.index].node,player:this.getSlidePlayerInstance(this.index)}}),T(this.settings.beforeSlideChange)&&this.settings.beforeSlideChange.apply(this,[{index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},{index:this.index,slide:this.activeSlide,player:this.getSlidePlayerInstance(this.index)}]),this.prevActiveSlideIndex>this.index&&"slide"==this.settings.slideEffect&&(i=this.settings.cssEfects.slideBack.out),g(e,i,(function(){var t=e.querySelector(".ginner-container"),i=e.querySelector(".gslide-media"),n=e.querySelector(".gslide-description");t.style.transform="",i.style.transform="",d(i,"greset"),i.style.opacity="",n&&(n.style.opacity=""),d(e,"prev")}))}},{key:"getAllPlayers",value:function(){return this.videoPlayers}},{key:"getSlidePlayerInstance",value:function(e){var t="gvideo"+e,i=this.getAllPlayers();return!(!O(i,t)||!i[t])&&i[t]}},{key:"stopSlideVideo",value:function(e){if(k(e)){var t=e.querySelector(".gvideo-wrapper");t&&(e=t.getAttribute("data-index"))}console.log("stopSlideVideo is deprecated, use slidePlayerPause");var i=this.getSlidePlayerInstance(e);i&&i.playing&&i.pause()}},{key:"slidePlayerPause",value:function(e){if(k(e)){var t=e.querySelector(".gvideo-wrapper");t&&(e=t.getAttribute("data-index"))}var i=this.getSlidePlayerInstance(e);i&&i.playing&&i.pause()}},{key:"playSlideVideo",value:function(e){if(k(e)){var t=e.querySelector(".gvideo-wrapper");t&&(e=t.getAttribute("data-index"))}console.log("playSlideVideo is deprecated, use slidePlayerPlay");var i=this.getSlidePlayerInstance(e);i&&!i.playing&&i.play()}},{key:"slidePlayerPlay",value:function(e){var t;if(!J||null!==(t=this.settings.plyr.config)&&void 0!==t&&t.muted){if(k(e)){var i=e.querySelector(".gvideo-wrapper");i&&(e=i.getAttribute("data-index"))}var n=this.getSlidePlayerInstance(e);n&&!n.playing&&(n.play(),this.settings.autofocusVideos&&n.elements.container.focus())}}},{key:"setElements",value:function(e){var t=this;this.settings.elements=!1;var i=[];e&&e.length&&o(e,(function(e,n){var s=new $(e,t,n),o=s.getConfig(),r=l({},o);r.slideConfig=o,r.instance=s,r.index=n,i.push(r)})),this.elements=i,this.lightboxOpen&&(this.slidesContainer.innerHTML="",this.elements.length&&(o(this.elements,(function(){var e=m(t.settings.slideHTML);t.slidesContainer.appendChild(e)})),this.showSlide(0,!0)))}},{key:"getElementIndex",value:function(e){var t=!1;return o(this.elements,(function(i,n){if(O(i,"node")&&i.node==e)return t=n,!0})),t}},{key:"getElements",value:function(){var e=this,t=[];this.elements=this.elements?this.elements:[],!I(this.settings.elements)&&E(this.settings.elements)&&this.settings.elements.length&&o(this.settings.elements,(function(i,n){var s=new $(i,e,n),o=s.getConfig(),r=l({},o);r.node=!1,r.index=n,r.instance=s,r.slideConfig=o,t.push(r)}));var i=!1;return this.getSelector()&&(i=document.querySelectorAll(this.getSelector())),i?(o(i,(function(i,n){var s=new $(i,e,n),o=s.getConfig(),r=l({},o);r.node=i,r.index=n,r.instance=s,r.slideConfig=o,r.gallery=i.getAttribute("data-gallery"),t.push(r)})),t):t}},{key:"getGalleryElements",value:function(e,t){return e.filter((function(e){return e.gallery==t}))}},{key:"getSelector",value:function(){return!this.settings.elements&&(this.settings.selector&&"data-"==this.settings.selector.substring(0,5)?"*[".concat(this.settings.selector,"]"):this.settings.selector)}},{key:"getActiveSlide",value:function(){return this.slidesContainer.querySelectorAll(".gslide")[this.index]}},{key:"getActiveSlideIndex",value:function(){return this.index}},{key:"getAnimationClasses",value:function(){var e=[];for(var t in this.settings.cssEfects)if(this.settings.cssEfects.hasOwnProperty(t)){var i=this.settings.cssEfects[t];e.push("g".concat(i.in)),e.push("g".concat(i.out))}return e.join(" ")}},{key:"build",value:function(){var e=this;if(this.built)return!1;var t=document.body.childNodes,i=[];o(t,(function(e){e.parentNode==document.body&&"#"!==e.nodeName.charAt(0)&&e.hasAttribute&&!e.hasAttribute("aria-hidden")&&(i.push(e),e.setAttribute("aria-hidden","true"))}));var n=O(this.settings.svg,"next")?this.settings.svg.next:"",s=O(this.settings.svg,"prev")?this.settings.svg.prev:"",l=O(this.settings.svg,"close")?this.settings.svg.close:"",r=this.settings.lightboxHTML;r=m(r=(r=(r=r.replace(/{nextSVG}/g,n)).replace(/{prevSVG}/g,s)).replace(/{closeSVG}/g,l)),document.body.appendChild(r);var d=document.getElementById("glightbox-body");this.modal=d;var g=d.querySelector(".gclose");this.prevButton=d.querySelector(".gprev"),this.nextButton=d.querySelector(".gnext"),this.overlay=d.querySelector(".goverlay"),this.loader=d.querySelector(".gloader"),this.slidesContainer=document.getElementById("glightbox-slider"),this.bodyHiddenChildElms=i,this.events={},h(this.modal,"glightbox-"+this.settings.skin),this.settings.closeButton&&g&&(this.events.close=a("click",{onElement:g,withCallback:function(t,i){t.preventDefault(),e.close()}})),g&&!this.settings.closeButton&&g.parentNode.removeChild(g),this.nextButton&&(this.events.next=a("click",{onElement:this.nextButton,withCallback:function(t,i){t.preventDefault(),e.nextSlide()}})),this.prevButton&&(this.events.prev=a("click",{onElement:this.prevButton,withCallback:function(t,i){t.preventDefault(),e.prevSlide()}})),this.settings.closeOnOutsideClick&&(this.events.outClose=a("click",{onElement:d,withCallback:function(t,i){e.preventOutsideClick||c(document.body,"glightbox-mobile")||u(t.target,".ginner-container")||u(t.target,".gbtn")||c(t.target,"gnext")||c(t.target,"gprev")||e.close()}})),o(this.elements,(function(t,i){e.slidesContainer.appendChild(t.instance.create()),t.slideNode=e.slidesContainer.querySelectorAll(".gslide")[i]})),K&&h(document.body,"glightbox-touch"),this.events.resize=a("resize",{onElement:window,withCallback:function(){e.resize()}}),this.built=!0}},{key:"resize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if((e=e||this.activeSlide)&&!c(e,"zoomed")){var t=y(),i=e.querySelector(".gvideo-wrapper"),n=e.querySelector(".gslide-image"),s=this.slideDescription,l=t.width,o=t.height;if(l<=768?h(document.body,"glightbox-mobile"):d(document.body,"glightbox-mobile"),i||n){var r=!1;if(s&&(c(s,"description-bottom")||c(s,"description-top"))&&!c(s,"gabsolute")&&(r=!0),n)if(l<=768)n.querySelector("img");else if(r){var a=s.offsetHeight,u=n.querySelector("img");u.setAttribute("style","max-height: calc(100vh - ".concat(a,"px)")),s.setAttribute("style","max-width: ".concat(u.offsetWidth,"px;"))}if(i){var g=O(this.settings.plyr.config,"ratio")?this.settings.plyr.config.ratio:"";if(!g){var v=i.clientWidth,f=i.clientHeight,p=v/f;g="".concat(v/p,":").concat(f/p)}var m=g.split(":"),x=this.settings.videosWidth,b=this.settings.videosWidth,S=(b=M(x)||-1!==x.indexOf("px")?parseInt(x):-1!==x.indexOf("vw")?l*parseInt(x)/100:-1!==x.indexOf("vh")?o*parseInt(x)/100:-1!==x.indexOf("%")?l*parseInt(x)/100:parseInt(i.clientWidth))/(parseInt(m[0])/parseInt(m[1]));if(S=Math.floor(S),r&&(o-=s.offsetHeight),b>l||S>o||ob){var w=i.offsetWidth,T=i.offsetHeight,C=o/T,k={width:w*C,height:T*C};i.parentNode.setAttribute("style","max-width: ".concat(k.width,"px")),r&&s.setAttribute("style","max-width: ".concat(k.width,"px;"))}else i.parentNode.style.maxWidth="".concat(x),r&&s.setAttribute("style","max-width: ".concat(x,";"))}}}}},{key:"reload",value:function(){this.init()}},{key:"updateNavigationClasses",value:function(){var e=this.loop();d(this.nextButton,"disabled"),d(this.prevButton,"disabled"),0==this.index&&this.elements.length-1==0?(h(this.prevButton,"disabled"),h(this.nextButton,"disabled")):0!==this.index||e?this.index!==this.elements.length-1||e||h(this.nextButton,"disabled"):h(this.prevButton,"disabled")}},{key:"loop",value:function(){var e=O(this.settings,"loopAtEnd")?this.settings.loopAtEnd:null;return e=O(this.settings,"loop")?this.settings.loop:e,e}},{key:"close",value:function(){var e=this;if(!this.lightboxOpen){if(this.events){for(var t in this.events)this.events.hasOwnProperty(t)&&this.events[t].destroy();this.events=null}return!1}if(this.closing)return!1;this.closing=!0,this.slidePlayerPause(this.activeSlide),this.fullElementsList&&(this.elements=this.fullElementsList),this.bodyHiddenChildElms.length&&o(this.bodyHiddenChildElms,(function(e){e.removeAttribute("aria-hidden")})),h(this.modal,"glightbox-closing"),g(this.overlay,"none"==this.settings.openEffect?"none":this.settings.cssEfects.fade.out),g(this.activeSlide,this.settings.cssEfects[this.settings.closeEffect].out,(function(){if(e.activeSlide=null,e.prevActiveSlideIndex=null,e.prevActiveSlide=null,e.built=!1,e.events){for(var t in e.events)e.events.hasOwnProperty(t)&&e.events[t].destroy();e.events=null}var i=document.body;d(Q,"glightbox-open"),d(i,"glightbox-open touching gdesc-open glightbox-touch glightbox-mobile gscrollbar-fixer"),e.modal.parentNode.removeChild(e.modal),e.trigger("close"),T(e.settings.onClose)&&e.settings.onClose();var n=document.querySelector(".gcss-styles");n&&n.parentNode.removeChild(n),e.lightboxOpen=!1,e.closing=null}))}},{key:"destroy",value:function(){this.close(),this.clearAllEvents(),this.baseEvents&&this.baseEvents.destroy()}},{key:"on",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||!T(t))throw new TypeError("Event name and callback must be defined");this.apiEvents.push({evt:e,once:i,callback:t})}},{key:"once",value:function(e,t){this.on(e,t,!0)}},{key:"trigger",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=[];o(this.apiEvents,(function(t,s){var l=t.evt,o=t.once,r=t.callback;l==e&&(r(i),o&&n.push(s))})),n.length&&o(n,(function(e){return t.apiEvents.splice(e,1)}))}},{key:"clearAllEvents",value:function(){this.apiEvents.splice(0,this.apiEvents.length)}},{key:"version",value:function(){return"3.1.0"}}]),e}();return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new te(e);return t.init(),t}})); \ No newline at end of file