add free and sustainable
This commit is contained in:
1 parent
25ba180b7b
commit
b043869059
91 files changed
+1392
-63
No files matched your search
@@ -543,6 +543,11 @@ pre[class*="language-diff-"] {
|
||||
<details><summary>2026</summary>
|
||||
<ol reversed="" class="archivelist">
|
||||
|
||||
<li class="archivelist-item">
|
||||
<a href="/free-sustainable/" class="archivelist-link">Free and Sustainable</a><br>
|
||||
<time class="archivelist-date" datetime="2026-11-18">18 November 2026</time>
|
||||
</li>
|
||||
|
||||
<li class="archivelist-item">
|
||||
<a href="/in-the-wake/" class="archivelist-link">In the Wake</a><br>
|
||||
<time class="archivelist-date" datetime="2026-10-09">09 October 2026</time>
|
||||
|
||||
+17
-34
@@ -5,11 +5,27 @@
|
||||
<subtitle>The long-running and erratically updated blog of Kathleen Fitzpatrick.</subtitle>
|
||||
<link href="https://kfitz.info/feed/feed.xml" rel="self" />
|
||||
<link href="https://kfitz.info/" />
|
||||
<updated>2026-10-09T18:45:24Z</updated>
|
||||
<updated>2026-11-18T20:56:25Z</updated>
|
||||
<id>https://kfitz.info/</id>
|
||||
<author>
|
||||
<name>Kathleen Fitzpatrick</name>
|
||||
</author>
|
||||
<entry>
|
||||
<title>Free and Sustainable</title>
|
||||
<link href="https://kfitz.info/free-sustainable/" />
|
||||
<updated>2026-11-18T20:56:25Z</updated>
|
||||
<id>https://kfitz.info/free-sustainable/</id>
|
||||
<content type="html"><p><em>Crossposted from the <a href="https://about.hcommons.org/2026/11/18/free-and-sustainable/">Knowledge Commons team blog</a>.</em></p>
|
||||
<p>My colleague Martin Eve was <a href="https://bsky.app/profile/did:plc:hnpt7ns2lecdujegbi6qkqqm/post/3n2dpljhmae2b">speculating on Bluesky</a> the other day that while he has enjoyed Tailscale's robust free plan, he should probably think about signing up a for a paid offering to ensure that this ridiculously useful service is able to stay sustainable. Someone responded with a link to Tailscale's own post, from 2022, exploring <a href="https://tailscale.com/blog/free-plan">how the free plan is able to remain free</a>. It's a fantastic look behind the curtain at their financial modeling and business design. The long and the short of it is that they can remain free to end users for their individual use because many of those happy end users are then able to persuade their companies to subscribe to paid accounts. This mode of &quot;bottom-up marketing&quot; allows them to keep their customer acquisition costs very low and focus their investments on product development and service scaling.</p>
|
||||
<p>I read this post with great interest not just because I too have a free Tailscale account and have been a little worried about how long I'd be able to get away with that, but also because the model of free-to-individuals, supported-by-organizations is exactly what we're building for Knowledge Commons. We are committed to keeping that free tier free -- we are, after all, an open-source, open-access, values-first nonprofit organization -- but like Tailscale, we need a paid tier to make the platform sustainable.</p>
|
||||
<p>Martin pointed out to me in discussion that one key difference is that Tailscale has by default a somewhat affluent user base -- users with multiple devices and the desire to connect them into a secure network. And those interests tend to indicate that the average Tailscale user is likely to be working in a technical capacity, and if they're happy with the service they're likely to recommend it to their co-workers, and at some point suggest to their bosses that their work environment might benefit from it, and somewhere in that chain it's not at all unlikely that they'll have the ear of someone with the company buying power to sign up for a paid tier of service.</p>
|
||||
<p>Knowledge Commons is different in nearly all of these respects. While many of our users have extensive technical knowledge, the tech community isn’t our target audience. Scholars and practitioners work in a far broader range of organizational contexts, and we want all of them to feel a sense of belonging within an open, collective community, where independent scholars are just as welcome as tenured professors, and where users need not be working in a specifically technical position in order to make active use of our services.</p>
|
||||
<p>However, we still need to find ways to make connections between our individual users and the folks who have the capacity to support us. At the individual level, of course, we have the <a href="https://about.hcommons.org/kc-champions/">KC Champions program</a>, which encourages users who might benefit from some extra services to join us and, in so doing, help keep the platform’s free tier thriving. But we also need institutional and organizational memberships in order to enable the platform to achieve real sustainability, and figuring out how to connect to the right people at those institutions can be hard – especially when a cold email from our team can feel like yet another message from yet another vendor trying to sell yet another commercial product to institutions with already stressed budgets.</p>
|
||||
<p>This is where we need your help. The most important thing that our individual users can do for us is talk to others about Knowledge Commons. We’ve got some <a href="https://about.hcommons.org/become-a-commons-ambassador/">resources available</a> that might help you get started. Tell your colleagues why and how you use the platform and encourage them to use it as well. Tell your instructional technology or library services contacts about us and why you think it would be great for your institution to think about adopting nonprofit, community-governed alternatives to the kinds of corporate platforms that so many are currently using. And then let us know you’ve done so! If you can share your contact’s information with us (by emailing <a href="mailto:network@hcommons.org">network@hcommons.org</a>), we can follow up to offer a demo or a campus visit as well as any other information that’s helpful to your institution’s deciders.</p>
|
||||
<p>The point is this: the Knowledge Commons team is ready to support your institution, but we need your help with starting the conversation. Together, we can help keep our free tier robust while still reaching sustainability.</p>
|
||||
<p>So how can we help you help us with that process? If you have thoughts to share about how we can collectively get the word out about Knowledge Commons, please share them in the comments!</p>
|
||||
</content>
|
||||
</entry>
|
||||
<entry>
|
||||
<title>In the Wake</title>
|
||||
<link href="https://kfitz.info/in-the-wake/" />
|
||||
@@ -243,39 +259,6 @@
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
</content>
|
||||
</entry>
|
||||
<entry>
|
||||
<title>Networking Continued</title>
|
||||
<link href="https://kfitz.info/networking-continued/" />
|
||||
<updated>2025-08-09T20:38:09Z</updated>
|
||||
<id>https://kfitz.info/networking-continued/</id>
|
||||
<content type="html"><p>As you may recall, I've been experimenting with setting up a home server, and several months ago had gotten stuck on an issue related to <a href="https://kfitz.info/networking/">the structure of my network</a>. <a href="https://kfitz.info/networking/?ht-comment-id=26755687">Taylor hopped in</a> and really helped me understand how everything <em>ought</em> to work.</p>
|
||||
<p>But it's not working. And I'm again flummoxed.</p>
|
||||
<p>Here's the setup:</p>
|
||||
<ol>
|
||||
<li>I have my ISP's modem/router/gateway monstrosity (the BGW320) running in IP Passthrough mode, with the WAN IP address being passed to my gateway Eero.</li>
|
||||
<li>I have my Eeros set to Automatic DHCP mode; the gateway Eero is successfully getting the WAN IP address and is handing out private IP addresses in the 192.168.4.X range.</li>
|
||||
<li>I have a registered domain name (let's say <code>example.net</code>), and I have an A record at my DNS service pointing to my WAN IP address. I have also created a subdomain A record (<code>service</code>) pointing to the same IP address. DNS Checker gives me all green checks for both.</li>
|
||||
<li>I have a mini server, running Proxmox.</li>
|
||||
<li>I have installed Nginx Proxy Manager in a container on the Proxmox (an LXC), which is running and reachable at the static address 192.168.4.11.</li>
|
||||
<li>I have installed the service I'm trying to expose in another LXC, which is running and reachable at the static address 192.168.4.12.</li>
|
||||
<li>I have set up port forwarding on my Eero network for ports 80 and 443 to <s>198</s>192.168.4.11.</li>
|
||||
<li>I have created a proxy host in NPM, for which all the dots are green:
|
||||
<ul>
|
||||
<li>Domain Name: <a href="http://service.example.net">service.example.net</a></li>
|
||||
<li>Scheme: http</li>
|
||||
<li>Forward Hostname/IP: 192.168.4.12</li>
|
||||
<li>Forward Port: <code>port</code></li>
|
||||
<li>Block Common Exploits and Websockets Support on</li>
|
||||
<li>Access List: Publicly Accessible</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
<p>But <code>http://service.example.net:port</code> refuses to connect, as does <code>http://example.net</code>, either from my local network or through my VPN. And <code>traceroute</code> to either <code>example.net</code> or <code>service.example.net</code> stalls out.</p>
|
||||
<p>I've checked the Proxmox firewall and inbound 80 and 443 are both set to accept. I've checked to see whether my ISP's montrosity's firewall could be blocking those ports but... who's to say. The NAT/Gaming (sigh) panel of the admin interface isn't showing the gateway Eero as a device that could need anything in particular sent its way, so my assumption is that IP Passthrough passes inbound requests through for the Eero to sort out, too.</p>
|
||||
<p>I've searched around, and the nearest thing I've found to what I'm trying to do and how I'm trying to do it is in <a href="https://www.reddit.com/r/Proxmox/comments/u857x5/nginx_proxy_manager_setup_troubles/">this Reddit thread</a>, but the problem in that case is back at the beginning with the A record, which is definitely not my issue, unless I spelled my domain name wrong at the DNS. (I didn't.) And that person was able to get to the NPM congratulations page; my connections get refused entirely.</p>
|
||||
<p>If anybody sees anything that I should adjust, or take a look at adjusting, I'd be grateful to hear. I'm already <em>this</em> close to dumping my ISP anyhow due to some ongoing service issues, and getting rid of their annoying modem/router/gateway would be a bonus, but I'm not entirely certain that it's the problem, and I'd love to find a way through without taking that step.</p>
|
||||
</content>
|
||||
</entry>
|
||||
</feed>
|
||||
+10
-1
@@ -540,13 +540,22 @@ pre[class*="language-diff-"] {
|
||||
<subtitle>The long-running and erratically updated blog of Kathleen Fitzpatrick.</subtitle>
|
||||
<link href="https://kfitz.info/feed/masto.xml" rel="self"/>
|
||||
<link href="https://kfitz.info/"/>
|
||||
<updated>2026-10-09T18:45:24Z</updated>
|
||||
<updated>2026-11-18T20:56:25Z</updated>
|
||||
<id>https://kfitz.info/</id>
|
||||
<author>
|
||||
<name>Kathleen Fitzpatrick</name>
|
||||
<email>kfitz@kfitz.info</email>
|
||||
</author>
|
||||
|
||||
<entry>
|
||||
<title>Free and Sustainable</title>
|
||||
<link href="https://kfitz.info/free-sustainable/"/>
|
||||
<updated>2026-11-18T20:56:25Z</updated>
|
||||
<id>https://kfitz.info/free-sustainable/</id>
|
||||
<content type="html">Crossposted from the Knowledge Commons team blog.<br />
|
||||
My colleague Martin Eve was</content>
|
||||
</entry>
|
||||
|
||||
<entry>
|
||||
<title>In the Wake</title>
|
||||
<link href="https://kfitz.info/in-the-wake/"/>
|
||||
|
||||
@@ -0,0 +1,709 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Free and Sustainable</title>
|
||||
<meta name="description" content="The long-running and erratically updated blog of Kathleen Fitzpatrick.">
|
||||
<link rel="alternate" href="feed/feed.xml" type="application/atom+xml" title="kfitz">
|
||||
<script async="" src="https://talk.hyvor.com/embed/embed.js" type="module"></script>
|
||||
<link rel="webmention" href="https://webmention.io/kfitz.info/webmention">
|
||||
<link rel="pingback" href="https://webmention.io/kfitz.info/xmlrpc">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<style>/**
|
||||
* okaidia theme for JavaScript, CSS and HTML
|
||||
* Loosely based on Monokai textmate theme by http://www.monokai.nl/
|
||||
* @author ocodia
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #f8f8f2;
|
||||
background: none;
|
||||
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
font-size: 1em;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #272822;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #8292a2;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
.token.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #f92672;
|
||||
}
|
||||
|
||||
.token.boolean,
|
||||
.token.number {
|
||||
color: #ae81ff;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #a6e22e;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string,
|
||||
.token.variable {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.function,
|
||||
.token.class-name {
|
||||
color: #e6db74;
|
||||
}
|
||||
|
||||
.token.keyword {
|
||||
color: #66d9ef;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important {
|
||||
color: #fd971f;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
/*
|
||||
* New diff- syntax
|
||||
*/
|
||||
|
||||
pre[class*="language-diff-"] {
|
||||
--eleventy-code-padding: 1.25em;
|
||||
padding-left: var(--eleventy-code-padding);
|
||||
padding-right: var(--eleventy-code-padding);
|
||||
}
|
||||
.token.deleted {
|
||||
background-color: hsl(0, 51%, 37%);
|
||||
color: inherit;
|
||||
}
|
||||
.token.inserted {
|
||||
background-color: hsl(126, 31%, 39%);
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* Make the + and - characters unselectable for copy/paste */
|
||||
.token.prefix.unchanged,
|
||||
.token.prefix.inserted,
|
||||
.token.prefix.deleted {
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
.token.prefix.inserted,
|
||||
.token.prefix.deleted {
|
||||
width: var(--eleventy-code-padding);
|
||||
background-color: rgba(0,0,0,.2);
|
||||
}
|
||||
|
||||
/* Optional: full-width background color */
|
||||
.token.inserted:not(.prefix),
|
||||
.token.deleted:not(.prefix) {
|
||||
display: block;
|
||||
margin-left: calc(-1 * var(--eleventy-code-padding));
|
||||
margin-right: calc(-1 * var(--eleventy-code-padding));
|
||||
text-decoration: none; /* override del, ins, mark defaults */
|
||||
color: inherit; /* override del, ins, mark defaults */
|
||||
}
|
||||
/* This is an arbitrary CSS string added to the bundle */
|
||||
/* Defaults */
|
||||
@font-face {
|
||||
font-family: "Atkinson Hyperlegible";
|
||||
src: url('/css/files/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2');
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Atkinson Hyperlegible";
|
||||
font-weight: bold;
|
||||
src: url('/css/files/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2');
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Atkinson Hyperlegible";
|
||||
font-style: italic
|
||||
src: url('/css/files/atkinson-hyperlegible-latin-400-italic.woff2') format('woff2');
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
:root {
|
||||
--font-family: "Atkinson Hyperlegible", -apple-system, system-ui, sans-serif;
|
||||
--font-family-monospace: Consolas, Menlo, Monaco, Andale Mono WT, Andale Mono, Lucida Console, Lucida Sans Typewriter, DejaVu Sans Mono, Bitstream Vera Sans Mono, Liberation Mono, Nimbus Mono L, Courier New, Courier, monospace;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
/* Theme colors */
|
||||
:root {
|
||||
--color-gray-20: #e0e0e0;
|
||||
--color-gray-50: #C0C0C0;
|
||||
--color-gray-90: #333;
|
||||
|
||||
--background-color: #fff;
|
||||
|
||||
--text-color: var(--color-gray-90);
|
||||
--text-color-link: #d61d4a;
|
||||
--text-color-link-active: #853439;
|
||||
--text-color-link-visited: #e8325e;
|
||||
|
||||
--syntax-tab-size: 2;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--color-gray-20: #e0e0e0;
|
||||
--color-gray-50: #C0C0C0;
|
||||
--color-gray-90: #dad8d8;
|
||||
|
||||
/* --text-color is assigned to --color-gray-_ above */
|
||||
--text-color-link: #1493fb;
|
||||
--text-color-link-active: #6969f7;
|
||||
--text-color-link-visited: #a6a6f8;
|
||||
|
||||
--background-color: #15202b;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Global stylesheet */
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@view-transition {
|
||||
navigation: auto;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
padding: 0;
|
||||
margin: 0 auto;
|
||||
font-family: var(--font-family);
|
||||
color: var(--text-color);
|
||||
background-color: var(--background-color);
|
||||
}
|
||||
html {
|
||||
overflow-y: scroll;
|
||||
}
|
||||
body {
|
||||
max-width: 40em;
|
||||
}
|
||||
|
||||
/* https://www.a11yproject.com/posts/how-to-hide-content/ */
|
||||
.visually-hidden {
|
||||
clip: rect(0 0 0 0);
|
||||
clip-path: inset(50%);
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
white-space: nowrap;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
p {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
li {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
a[href] {
|
||||
color: var(--text-color-link);
|
||||
}
|
||||
a[href]:visited {
|
||||
color: var(--text-color-link-visited);
|
||||
}
|
||||
a[href]:hover,
|
||||
a[href]:active {
|
||||
color: var(--text-color-link-active);
|
||||
}
|
||||
|
||||
main,
|
||||
footer {
|
||||
padding: 1rem;
|
||||
}
|
||||
main :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
header {
|
||||
border-bottom: 1px dashed var(--color-gray-20);
|
||||
}
|
||||
header:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
footer {
|
||||
border-top: 1px dashed var(--color-gray-50);
|
||||
}
|
||||
|
||||
.links-nextprev {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: .5em 1em;
|
||||
list-style: "";
|
||||
border-top: 1px dashed var(--color-gray-20);
|
||||
padding: 1em 0;
|
||||
}
|
||||
.links-nextprev > * {
|
||||
flex-grow: 1;
|
||||
}
|
||||
.links-nextprev-next {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
table {
|
||||
margin: 1em 0;
|
||||
}
|
||||
table td,
|
||||
table th {
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
pre,
|
||||
code {
|
||||
font-family: var(--font-family-monospace);
|
||||
}
|
||||
pre:not([class*="language-"]) {
|
||||
margin: .5em 0;
|
||||
line-height: 1.375; /* 22px /16 */
|
||||
-moz-tab-size: var(--syntax-tab-size);
|
||||
-o-tab-size: var(--syntax-tab-size);
|
||||
tab-size: var(--syntax-tab-size);
|
||||
-webkit-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
overflow-x: auto;
|
||||
}
|
||||
code {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
header {
|
||||
display: flex;
|
||||
gap: 1em .5em;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
padding: 1em;
|
||||
}
|
||||
.home-link {
|
||||
font-size: 1.5em; /* 16px /16 */
|
||||
font-weight: 700;
|
||||
margin-right: 2em;
|
||||
}
|
||||
.home-link:link:not(:hover) {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Nav */
|
||||
.nav {
|
||||
display: flex;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.nav-item {
|
||||
display: inline-block;
|
||||
margin-right: 1em;
|
||||
}
|
||||
.nav-item a[href]:not(:hover) {
|
||||
text-decoration: none;
|
||||
}
|
||||
.nav a[href][aria-current="page"] {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Posts list */
|
||||
.postlist {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
padding-left: 1.5rem;
|
||||
}
|
||||
.postlist-item {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: baseline;
|
||||
counter-increment: start-from -1;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.postlist-item:before {
|
||||
display: inline-block;
|
||||
pointer-events: none;
|
||||
content: "" counter(start-from, decimal-leading-zero) ". ";
|
||||
line-height: 100%;
|
||||
text-align: right;
|
||||
margin-left: -1.5rem;
|
||||
}
|
||||
.postlist-date,
|
||||
.postlist-item:before {
|
||||
font-size: 0.8125em; /* 13px /16 */
|
||||
color: var(--color-gray-90);
|
||||
}
|
||||
.postlist-date {
|
||||
word-spacing: -0.5px;
|
||||
}
|
||||
.postlist-link {
|
||||
font-size: 1.1875em; /* 19px /16 */
|
||||
font-weight: 700;
|
||||
flex-basis: calc(100% - 1.5rem);
|
||||
padding-left: .25em;
|
||||
padding-right: .5em;
|
||||
text-underline-position: from-font;
|
||||
text-underline-offset: 0;
|
||||
text-decoration-thickness: 1px;
|
||||
}
|
||||
.postlist-item-active .postlist-link {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Archive list */
|
||||
.archivelist {
|
||||
padding: 0;
|
||||
padding-left: 2.5rem;
|
||||
}
|
||||
.archivelist-item {
|
||||
align-items: baseline;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.archivelist-item::marker {
|
||||
text-align: right;
|
||||
margin-left: -1.5rem;
|
||||
font-size: 0.8125em; /* 13px /16 */
|
||||
color: var(--color-gray-90);
|
||||
}
|
||||
.archivelist-date {
|
||||
font-size: 0.8125em; /* 13px /16 */
|
||||
color: var(--color-gray-90);
|
||||
word-spacing: -0.5px;
|
||||
}
|
||||
.archivelist-link {
|
||||
font-size: 1.1875em; /* 19px /16 */
|
||||
font-weight: 700;
|
||||
flex-basis: calc(100% - 1.5rem);
|
||||
padding-left: .25em;
|
||||
padding-right: .5em;
|
||||
text-underline-position: from-font;
|
||||
text-underline-offset: 0;
|
||||
text-decoration-thickness: 1px;
|
||||
}
|
||||
.archivelist-item-active .archivelist-link {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
/* Tags */
|
||||
.post-tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-transform: capitalize;
|
||||
font-style: italic;
|
||||
}
|
||||
.postlist-item > .post-tag {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
/* Tags list */
|
||||
.post-metadata {
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
gap: .5em;
|
||||
list-style: none;
|
||||
border-top: 1px dashed var(--color-gray-20);
|
||||
border-bottom: 1px dashed var(--color-gray-20);
|
||||
padding: 3px 0px 3px 0px;
|
||||
margin: 0;
|
||||
font-size: .8em;
|
||||
}
|
||||
.post-metadata time {
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
/* Direct Links / Markdown Headers */
|
||||
.header-anchor {
|
||||
text-decoration: none;
|
||||
font-style: normal;
|
||||
font-size: 1em;
|
||||
margin-left: .1em;
|
||||
}
|
||||
a[href].header-anchor,
|
||||
a[href].header-anchor:visited {
|
||||
color: transparent;
|
||||
}
|
||||
a[href].header-anchor:focus,
|
||||
a[href].header-anchor:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
a[href].header-anchor:focus,
|
||||
:hover > a[href].header-anchor {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
h2 + .header-anchor {
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
summary {
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
margin-bottom: .5em;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
display: block;
|
||||
margin-left: 2em;
|
||||
margin-right: 3em;
|
||||
padding-left: 10px;
|
||||
border-left: 10px solid var(--text-color-link);
|
||||
}
|
||||
|
||||
hr.new {
|
||||
border: none;
|
||||
border-top: 1px dashed var(--color-gray-50);
|
||||
}
|
||||
/* Webmention Section */
|
||||
|
||||
.webmentions {
|
||||
display:block;
|
||||
text-align: left;
|
||||
}
|
||||
.webmentions__facepile {
|
||||
display:flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.webmentions__face {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
border-radius: 50%;
|
||||
object-fit: cover;
|
||||
flex: none;
|
||||
}
|
||||
.webmentions__list {
|
||||
list-style-type: none;
|
||||
padding:0;
|
||||
}
|
||||
.webmentions__item {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
/* Single Webmention */
|
||||
|
||||
.webmention {
|
||||
display:block;
|
||||
}
|
||||
.webmention__meta,
|
||||
.webmention__author {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.webmention__meta {
|
||||
margin-bottom:.5rem;
|
||||
}
|
||||
.webmention__author {
|
||||
margin-right:.25rem;
|
||||
}
|
||||
.webmention__author__photo {
|
||||
height: 3rem;
|
||||
width: 3rem;
|
||||
border-radius: 50%;
|
||||
object-fit: cover;
|
||||
margin-right:.5rem;
|
||||
}
|
||||
.webmention__pubdate {
|
||||
font-style: italic;
|
||||
}
|
||||
/* Message Box */
|
||||
.message-box {
|
||||
--color-message-box: #ffc;
|
||||
|
||||
display: block;
|
||||
background-color: var(--color-message-box);
|
||||
color: var(--color-gray-90);
|
||||
padding: 1em 0.625em; /* 16px 10px /16 */
|
||||
}
|
||||
.message-box ol {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.message-box {
|
||||
--color-message-box: #082840;
|
||||
}
|
||||
}</style>
|
||||
</head>
|
||||
<body>
|
||||
<a href="#skip" class="visually-hidden">Skip to main content</a>
|
||||
|
||||
<header>
|
||||
<a href="/" class="home-link">kfitz</a>
|
||||
<nav>
|
||||
<h2 class="visually-hidden" id="top-level-navigation-menu">Top level navigation menu</h2>
|
||||
<ul class="nav">
|
||||
<li class="nav-item"><a href="/">Home</a></li>
|
||||
<li class="nav-item"><a href="/blog/">Archive</a></li>
|
||||
<li class="nav-item"><a href="/about/">About</a></li>
|
||||
<li class="nav-item"><a href="/projects/">Projects</a></li>
|
||||
<li class="nav-item"><a href="/presentations/">Presentations</a></li>
|
||||
<li class="nav-item"><a href="/teaching/">Teaching</a></li>
|
||||
<li class="nav-item"><a href="/feed/feed.xml">Feed</a></li>
|
||||
</ul>
|
||||
<link href="/pagefind/pagefind-component-ui.css" rel="stylesheet">
|
||||
<script src="/pagefind/pagefind-component-ui.js" type="module"></script>
|
||||
<pagefind-searchbox></pagefind-searchbox>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
|
||||
<main id="skip">
|
||||
<heading-anchors>
|
||||
|
||||
<h1 id="free-and-sustainable">Free and Sustainable</h1>
|
||||
|
||||
<ul class="post-metadata">
|
||||
<li><time datetime="2026-11-18">18 November 2026</time></li>
|
||||
<li><a href="/tags/commons/" class="post-tag">commons</a>, </li>
|
||||
<li><a href="/tags/sustainability/" class="post-tag">sustainability</a></li>
|
||||
</ul>
|
||||
|
||||
<p><em>Crossposted from the <a href="https://about.hcommons.org/2026/11/18/free-and-sustainable/">Knowledge Commons team blog</a>.</em></p>
|
||||
<p>My colleague Martin Eve was <a href="https://bsky.app/profile/did:plc:hnpt7ns2lecdujegbi6qkqqm/post/3n2dpljhmae2b">speculating on Bluesky</a> the other day that while he has enjoyed Tailscale's robust free plan, he should probably think about signing up a for a paid offering to ensure that this ridiculously useful service is able to stay sustainable. Someone responded with a link to Tailscale's own post, from 2022, exploring <a href="https://tailscale.com/blog/free-plan">how the free plan is able to remain free</a>. It's a fantastic look behind the curtain at their financial modeling and business design. The long and the short of it is that they can remain free to end users for their individual use because many of those happy end users are then able to persuade their companies to subscribe to paid accounts. This mode of "bottom-up marketing" allows them to keep their customer acquisition costs very low and focus their investments on product development and service scaling.</p>
|
||||
<p>I read this post with great interest not just because I too have a free Tailscale account and have been a little worried about how long I'd be able to get away with that, but also because the model of free-to-individuals, supported-by-organizations is exactly what we're building for Knowledge Commons. We are committed to keeping that free tier free -- we are, after all, an open-source, open-access, values-first nonprofit organization -- but like Tailscale, we need a paid tier to make the platform sustainable.</p>
|
||||
<p>Martin pointed out to me in discussion that one key difference is that Tailscale has by default a somewhat affluent user base -- users with multiple devices and the desire to connect them into a secure network. And those interests tend to indicate that the average Tailscale user is likely to be working in a technical capacity, and if they're happy with the service they're likely to recommend it to their co-workers, and at some point suggest to their bosses that their work environment might benefit from it, and somewhere in that chain it's not at all unlikely that they'll have the ear of someone with the company buying power to sign up for a paid tier of service.</p>
|
||||
<p>Knowledge Commons is different in nearly all of these respects. While many of our users have extensive technical knowledge, the tech community isn’t our target audience. Scholars and practitioners work in a far broader range of organizational contexts, and we want all of them to feel a sense of belonging within an open, collective community, where independent scholars are just as welcome as tenured professors, and where users need not be working in a specifically technical position in order to make active use of our services.</p>
|
||||
<p>However, we still need to find ways to make connections between our individual users and the folks who have the capacity to support us. At the individual level, of course, we have the <a href="https://about.hcommons.org/kc-champions/">KC Champions program</a>, which encourages users who might benefit from some extra services to join us and, in so doing, help keep the platform’s free tier thriving. But we also need institutional and organizational memberships in order to enable the platform to achieve real sustainability, and figuring out how to connect to the right people at those institutions can be hard – especially when a cold email from our team can feel like yet another message from yet another vendor trying to sell yet another commercial product to institutions with already stressed budgets.</p>
|
||||
<p>This is where we need your help. The most important thing that our individual users can do for us is talk to others about Knowledge Commons. We’ve got some <a href="https://about.hcommons.org/become-a-commons-ambassador/">resources available</a> that might help you get started. Tell your colleagues why and how you use the platform and encourage them to use it as well. Tell your instructional technology or library services contacts about us and why you think it would be great for your institution to think about adopting nonprofit, community-governed alternatives to the kinds of corporate platforms that so many are currently using. And then let us know you’ve done so! If you can share your contact’s information with us (by emailing <a href="mailto:network@hcommons.org">network@hcommons.org</a>), we can follow up to offer a demo or a campus visit as well as any other information that’s helpful to your institution’s deciders.</p>
|
||||
<p>The point is this: the Knowledge Commons team is ready to support your institution, but we need your help with starting the conversation. Together, we can help keep our free tier robust while still reaching sustainability.</p>
|
||||
<p>So how can we help you help us with that process? If you have thoughts to share about how we can collectively get the word out about Knowledge Commons, please share them in the comments!</p>
|
||||
|
||||
<ul class="links-nextprev"><li class="links-nextprev-prev">← Previous<br> <a href="/in-the-wake/">In the Wake</a></li>
|
||||
</ul>
|
||||
|
||||
<hyvor-talk-comments website-id="9100" page-id="/free-sustainable/"></hyvor-talk-comments>
|
||||
|
||||
<div class="webmentions" id="webmentions">
|
||||
<h3 id="webmentions-2">Webmentions</h3>
|
||||
|
||||
|
||||
<p>No replies yet.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</heading-anchors>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<p><em>Built with <a href="https://www.11ty.dev/">Eleventy v3.1.0</a>. All content <a href="https://creativecommons.org/licenses/by/4.0/deed.en">CC BY 4.0</a> if you're human.</em></p><p></p>
|
||||
</footer>
|
||||
|
||||
<script type="module" src="/dist/rJ3_G-2ArF.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
+35
-1
@@ -692,7 +692,7 @@ hr.new {
|
||||
<p>What further questions do you have? Let us know in the comments; we'd very much like to keep a discussion of these issues going.</p>
|
||||
<p>And again, we thank you for your support, and we apologize for the inconvenience that this hack and the resulting process of remediation created. We continue to focus on doing better for all of our community members.</p>
|
||||
|
||||
<ul class="links-nextprev"><li class="links-nextprev-prev">← Previous<br> <a href="/blog/2026-07-02-workflow/">Publishing Workflow vs Business Model</a></li>
|
||||
<ul class="links-nextprev"><li class="links-nextprev-prev">← Previous<br> <a href="/blog/2026-07-02-workflow/">Publishing Workflow vs Business Model</a></li><li class="links-nextprev-next">Next →<br><a href="/free-sustainable/">Free and Sustainable</a></li>
|
||||
</ul>
|
||||
|
||||
<hyvor-talk-comments website-id="9100" page-id="/in-the-wake/"></hyvor-talk-comments>
|
||||
@@ -705,8 +705,42 @@ hr.new {
|
||||
|
||||
|
||||
|
||||
<h4 id="1-like">1 Like</h4>
|
||||
<div class="webmentions__facepile">
|
||||
|
||||
|
||||
|
||||
<a class="h-card u-url link-u-exempt" href="https://hcommons.social/@kfitz/117412629522373216#favorited-by-109341594800646443" target="_blank" rel="noopener noreferrer">
|
||||
|
||||
|
||||
|
||||
<img class="webmention__author__photo" src="https://avatars.webmention.io/spaces.hcommons.social/ab4b7646a634ca10c6be18445fa0851353483afc57d224f4bc96a0ef2c7da905.jpg" alt="Mareike König (she/her)" title="Mareike König (she/her)" loading="lazy">
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<h4 id="1-repost">1 Repost</h4>
|
||||
<div class="webmentions__facepile">
|
||||
|
||||
|
||||
<a class="h-card u-url link-u-exempt" href="https://hcommons.social/@kfitz/117412629522373216#reblogged-by-110968551455120939" target="_blank" rel="noopener noreferrer">
|
||||
|
||||
|
||||
|
||||
<img class="webmention__author__photo" src="https://avatars.webmention.io/spaces.hcommons.social/8b6108aaafd06c80da03772d82f91939f42978df4837fc0db85464232cc46f77.jpg" alt="Tom Elliott" title="Tom Elliott" loading="lazy">
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+7
-7
@@ -14,7 +14,7 @@
|
||||
|
||||
|
||||
|
||||
<style>.postlist { counter-reset: start-from 1814 }
|
||||
<style>.postlist { counter-reset: start-from 1815 }
|
||||
/* This is an arbitrary CSS string added to the bundle */
|
||||
/* Defaults */
|
||||
@font-face {
|
||||
@@ -557,6 +557,11 @@ Director, <a href="https://hcommons.org">Knowledge Commons</a>.</p>
|
||||
|
||||
<ol reversed="" class="postlist">
|
||||
|
||||
<li class="postlist-item">
|
||||
<a href="/free-sustainable/" class="postlist-link">Free and Sustainable</a>
|
||||
<time class="postlist-date" datetime="2026-11-18">November 2026</time>
|
||||
</li>
|
||||
|
||||
<li class="postlist-item">
|
||||
<a href="/in-the-wake/" class="postlist-link">In the Wake</a>
|
||||
<time class="postlist-date" datetime="2026-10-09">October 2026</time>
|
||||
@@ -577,17 +582,12 @@ Director, <a href="https://hcommons.org">Knowledge Commons</a>.</p>
|
||||
<time class="postlist-date" datetime="2026-04-12">April 2026</time>
|
||||
</li>
|
||||
|
||||
<li class="postlist-item">
|
||||
<a href="/join-kc-coalition/" class="postlist-link">Join the KC Coalition</a>
|
||||
<time class="postlist-date" datetime="2025-12-18">December 2025</time>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
<p>1808 more posts can be found in <a href="/blog/">the archive</a>.</p>
|
||||
<p>1809 more posts can be found in <a href="/blog/">the archive</a>.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -771,6 +771,7 @@ pagefind-modal-trigger {
|
||||
:is(*, #\#):is(*, #\#):is(*, #\#) .pf-checkbox-input {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
flex-shrink: 0;
|
||||
margin: 0;
|
||||
accent-color: var(--pf-text);
|
||||
cursor: pointer;
|
||||
@@ -1482,9 +1483,16 @@ pagefind-modal-trigger {
|
||||
:is(*, #\#):is(*, #\#):is(*, #\#) pagefind-keyboard-hints,
|
||||
:is(*, #\#):is(*, #\#):is(*, #\#) .pf-keyboard-hints,
|
||||
:is(*, #\#):is(*, #\#):is(*, #\#) .pf-searchbox-footer,
|
||||
:is(*, #\#):is(*, #\#):is(*, #\#) .pf-modal-footer-hint {
|
||||
:is(*, #\#):is(*, #\#):is(*, #\#) .pf-modal-footer-hint,
|
||||
:is(*, #\#):is(*, #\#):is(*, #\#) .pf-trigger-shortcut {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:is(*, #\#):is(*, #\#):is(*, #\#)
|
||||
.pf-searchbox-input-wrapper:has(.pf-trigger-shortcut)
|
||||
.pf-searchbox-input {
|
||||
padding-inline-end: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
"use strict";(()=>{var ls=Object.defineProperty;var h=(n,s)=>{for(var e in s)ls(n,e,{get:s[e],enumerable:!0})};var Bt={};h(Bt,{PagefindConfig:()=>Re,PagefindElement:()=>f,PagefindFilterDropdown:()=>Me,PagefindFilterPane:()=>Ne,PagefindInput:()=>ke,PagefindKeyboardHints:()=>Le,PagefindModal:()=>Oe,PagefindModalBody:()=>Ie,PagefindModalFooter:()=>Ue,PagefindModalHeader:()=>we,PagefindModalTrigger:()=>He,PagefindResults:()=>Se,PagefindSearchbox:()=>Fe,PagefindSummary:()=>Ae,configureInstance:()=>Qt,getInstanceManager:()=>Ce});var os="a[href], button, input, [tabindex]";function Kt(n){let s=n.querySelectorAll(os);for(let e of s)if(!(e.tabIndex<0)&&!e.disabled&&!e.hasAttribute("hidden")&&window.getComputedStyle(e).display!=="none")return!0;return!1}function $t(n,s){let e=null;for(let t of s)t.contains(n)||!(n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING)||Kt(t)&&(e===null||t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING)&&(e=t);return e}function Pe(n,s){let e=null;for(let t of s)t.contains(n)||!(n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)||Kt(t)&&(e===null||t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)&&(e=t);return e}var Ve={};h(Ve,{comments:()=>us,default:()=>ps,direction:()=>ds,strings:()=>hs,thanks_to:()=>cs});var cs="Jan Claasen <jan@cloudcannon.com>",us="",ds="ltr",hs={placeholder:"Soek",clear_search:"Opruim",load_more:"Laai nog resultate",search_label:"Soek hierdie webwerf",filters_label:"Filters",zero_results:"Geen resultate vir [SEARCH_TERM]",many_results:"[COUNT] resultate vir [SEARCH_TERM]",one_result:"[COUNT] resultate vir [SEARCH_TERM]",total_zero_results:"Geen resultate",total_one_result:"[COUNT] resultaat",total_many_results:"[COUNT] resultate",alt_search:"Geen resultate vir [SEARCH_TERM]. Toon resultate vir [DIFFERENT_TERM] in plaas daarvan",search_suggestion:"Geen resultate vir [SEARCH_TERM]. Probeer eerder een van die volgende terme:",searching:"Soek vir [SEARCH_TERM]",results_label:"Soekresultate",keyboard_navigate:"navigeer",keyboard_select:"kies",keyboard_clear:"wis",keyboard_close:"sluit",keyboard_search:"soek",error_search:"Soek het misluk",filter_selected_one:"[COUNT] gekies",filter_selected_many:"[COUNT] gekies",input_hint:"Resultate sal verskyn terwyl jy tik",loading:"Laai"},ps={thanks_to:cs,comments:us,direction:ds,strings:hs};var qe={};h(qe,{comments:()=>_s,default:()=>Es,direction:()=>fs,strings:()=>gs,thanks_to:()=>ms});var ms="Jermanuts",_s="",fs="rtl",gs={placeholder:"\u0628\u062D\u062B",clear_search:"\u0627\u0645\u0633\u062D",load_more:"\u062D\u0645\u0651\u0650\u0644 \u0627\u0644\u0645\u0632\u064A\u062F \u0645\u0646 \u0627\u0644\u0646\u062A\u0627\u0626\u062C",search_label:"\u0627\u0628\u062D\u062B \u0641\u064A \u0647\u0630\u0627 \u0627\u0644\u0645\u0648\u0642\u0639",filters_label:"\u062A\u0635\u0641\u064A\u0627\u062A",zero_results:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C \u0644 [SEARCH_TERM]",many_results:"[COUNT] \u0646\u062A\u0627\u0626\u062C \u0644 [SEARCH_TERM]",one_result:"[COUNT] \u0646\u062A\u064A\u062C\u0629 \u0644 [SEARCH_TERM]",total_zero_results:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C",total_one_result:"[COUNT] \u0646\u062A\u064A\u062C\u0629",total_many_results:"[COUNT] \u0646\u062A\u0627\u0626\u062C",alt_search:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C \u0644 [SEARCH_TERM]. \u064A\u0639\u0631\u0636 \u0627\u0644\u0646\u062A\u0627\u0626\u062C \u0644 [DIFFERENT_TERM] \u0628\u062F\u0644\u0627\u064B \u0645\u0646 \u0630\u0644\u0643",search_suggestion:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C \u0644 [SEARCH_TERM]. \u062C\u0631\u0628 \u0623\u062D\u062F \u0639\u0645\u0644\u064A\u0627\u062A \u0627\u0644\u0628\u062D\u062B \u0627\u0644\u062A\u0627\u0644\u064A\u0629:",searching:"\u064A\u0628\u062D\u062B \u0639\u0646 [SEARCH_TERM]...",results_label:"\u0646\u062A\u0627\u0626\u062C \u0627\u0644\u0628\u062D\u062B",keyboard_navigate:"\u062A\u0646\u0642\u0644",keyboard_select:"\u0627\u062E\u062A\u064A\u0627\u0631",keyboard_clear:"\u0627\u0645\u0633\u062D",keyboard_close:"\u0625\u063A\u0644\u0627\u0642",keyboard_search:"\u0628\u062D\u062B",error_search:"\u0641\u0634\u0644 \u0627\u0644\u0628\u062D\u062B",filter_selected_one:"[COUNT] \u0645\u062D\u062F\u062F",filter_selected_many:"[COUNT] \u0645\u062D\u062F\u062F",input_hint:"\u0633\u062A\u0638\u0647\u0631 \u0627\u0644\u0646\u062A\u0627\u0626\u062C \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u0643\u062A\u0627\u0628\u0629",loading:"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644"},Es={thanks_to:ms,comments:_s,direction:fs,strings:gs};var Ge={};h(Ge,{comments:()=>Ts,default:()=>vs,direction:()=>Cs,strings:()=>ys,thanks_to:()=>bs});var bs="Maruf Alom <mail@marufalom.com>",Ts="",Cs="ltr",ys={placeholder:"\u0985\u09A8\u09C1\u09B8\u09A8\u09CD\u09A7\u09BE\u09A8 \u0995\u09B0\u09C1\u09A8",clear_search:"\u09AE\u09C1\u099B\u09C7 \u09AB\u09C7\u09B2\u09C1Line truncated
|
||||
`)),document?.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"?console.error(`[DEBUG: Loaded from ${document.currentScript?.src??"bad script location"}]`):console.error("no known script location"),this.__dispatch__("error",{type:"bundle_load_failed",message:"Could not load search bundle",bundlePath:this.options.bundlePath,error:t}),this.hasAnnouncementCapability()||this.announce("error_search",{},"assertive");return}let e=s.createInstance(this.pagefindOptions||{});for(let t of this.options.mergeIndex){if(!t.bundlePath)throw new Error("mergeIndex requires a bundlePath parameter");let{bundlePath:r,...i}=t;await e.mergeIndex(r,i)}this.__pagefind__=e,this.availableFilters=await this.__pagefind__.filters(),this.totalFilters=this.availableFilters,this.__dispatch__("filters",{available:this.availableFilters,total:this.totalFilters}),this.faceted&&this.__searchID__===0&&this.triggerSearch("")}thinSubResults(s,e=3){if(s.length<=e)return s;let t=[...s].sort((r,i)=>(i.locations?.length??0)-(r.locations?.length??0)).slice(0,e).map(r=>r.url);return s.filter(r=>t.includes(r.url))}getDisplaySubResults(s,e=3){if(!Array.isArray(s.sub_results))return[];let r=s.sub_results[0]?.url===(s.meta?.url||s.url)?s.sub_results.slice(1):s.sub_results;return this.thinSubResults(r,e)}};var Pt=class{constructor(){this.instances=new Map;this.defaultOptions={bundlePath:this.detectBundlePath()}}detectBundlePath(){try{if(document?.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"){let s=new URL(document.currentScript.src).pathname.match(/^(.*\/)(?:pagefind[-_])?.*\.js.*$/);if(s)return s[1]}}catch{}return"/pagefind/"}getInstance(s="default",e={}){let t=this.instances.get(s);if(t)return t;let r={...this.defaultOptions,...e},i=new Te(s,r);return this.instances.set(s,i),i}hasInstance(s){return this.instances.has(s)}removeInstance(s){this.instances.delete(s)}getInstanceNames(){return Array.from(this.instances.keys())}},Ft=null;function Ce(){return Ft||(Ft=new Pt),Ft}function Qt(n,s){let e=Ce();return e.hasInstance(n)?(console.warn(`[Pagefind Component UI]: Instance "${n}" already exists, configuration ignored`),e.getInstance(n)):e.getInstance(n,s)}var ye=n=>!(n==null||n===!1||n===0||n===""||Number.isNaN(n)||Array.isArray(n)&&n.length===0||typeof n=="object"&&n!==null&&!Array.isArray(n)&&Object.keys(n).length===0),T=(n,s,e)=>n.length<s?`[Error: ${e}() needs ${s} args]`:null,es={eq:(n,...s)=>T(s,2,"eq")??m(s[0],n)===m(s[1],n),ne:(n,...s)=>T(s,2,"ne")??m(s[0],n)!==m(s[1],n),gt:(n,...s)=>T(s,2,"gt")??Number(m(s[0],n))>Number(m(s[1],n)),lt:(n,...s)=>T(s,2,"lt")??Number(m(s[0],n))<Number(m(s[1],n)),gte:(n,...s)=>T(s,2,"gte")??Number(m(s[0],n))>=Number(m(s[1],n)),lte:(n,...s)=>T(s,2,"lte")??Number(m(s[0],n))<=Number(m(s[1],n)),and:(n,...s)=>{let e=!0;for(let t of s)if(e=m(t,n),!ye(e))return e;return e},or:(n,...s)=>{let e=!1;for(let t of s)if(e=m(t,n),ye(e))return e;return e},not:(n,...s)=>T(s,1,"not")??!ye(m(s[0],n)),lowercase:(n,...s)=>String(m(s[0],n)).toLowerCase(),uppercase:(n,...s)=>String(m(s[0],n)).toUpperCase(),trim:(n,...s)=>String(m(s[0],n)).trim(),truncate:(n,...s)=>{let e=T(s,2,"truncate");if(e)return e;let t=String(m(s[0],n)),r=Number(m(s[1],n)),i=s[2]?String(m(s[2],n)):"...";return t.length>r?t.slice(0,r)+i:t},replace:(n,...s)=>T(s,3,"replace")??String(m(s[0],n)).split(String(m(s[1],n))).join(String(m(s[2],n))),limit:(n,...s)=>{let e=T(s,2,"limit");if(e)return e;let t=m(s[0],n),r=m(s[1],n);return Array.isArray(t)?t.slice(0,r<0?0:r):t},first:(n,...s)=>{let e=T(s,1,"first");if(e)return e;let t=m(s[0],n);return Array.isArray(t)?t[0]:t},last:(n,...s)=>{let e=T(s,1,"last");if(e)return e;let t=m(s[0],n);return Array.isArray(t)?t[t.length-1]:t},length:(n,...s)=>{let e=T(s,1,"length");if(e)return e;let t=m(s[0],n);return Array.isArray(t)?t.length:String(t).length},join:(n,...s)=>T(s,2,"join")??(e=>Array.isArray(e)?e.join(String(m(s[1],n))):String(e))(m(s[0],n)),default:(n,...s)=>{let e=T(s,2,"default");if(e)return e;let t=m(s[0],n);return ye(t)?t:m(s[1],n)},safeUrl:(n,...s)=>{let e=String(m(s[0],n)??"").trim();return e&&/^(?:\.{0,2}\/|[#?]|(?:https?|ftp):\/\/|(?:mailto|tel):)/i.test(e)?e:""}},m=(n,s)=>{if(!n)return;if(n.t==="L")return n.val;if(n.t==="V"){let t=(i,a)=>Object.prototype.hasOwnProperty.call(i,a),r=s;for(let i of n.path){if(r==null||!t(r,i))return;r=r[i]}return r}let e=es[n.fn];return e?n.t==="C"?e(s,...n.args):e(s,n.left,...n.args):`[Error: unknown ${n.fn}()]`},ga=n=>n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),ve=(n,s)=>{let e="";for(let t of n){if(t.t==="T"){e+=t.val;continue}if(t.t==="I"){let r=m(t.expr,s);if(Array.isArray(r))e+="[Error: use #each for arrays]";else if(typeof r=="object"&&r!==null)e+="[Error: cannot render object]";else{let i=String(r??"");e+=t.raw?i:ga(i)}continue}if(t.t==="F"){let r=!1;for(let i of t.branches)if(ye(m(i.cond,s))){e+=ve(i.body,s),r=!0;break}!r&&t.else&&(e+=ve(t.else,s));continue}if(t.t==="E")
Line truncated
|
||||
\r`.includes(s[e]);)e++},r=u=>s.slice(e,e+u.length)===u,i=u=>{r(u)&&(e+=u.length)},a=()=>{let u="";for(;e<s.length&&/\w/.test(s[e]);)u+=s[e++];return u},l=()=>{t();let u=e,d,_=s[e];if(_==='"'||_==="'"){let p=s[e++],g="";for(;e<s.length&&s[e]!==p;){if(s[e]==="\\"&&e+1<s.length){e++;let E=s[e];g+=E==="n"?`
|
||||
`:E==="t"?" ":E==="r"?"\r":E,e++;continue}g+=s[e++]}e<s.length?e++:g="",d={t:"L",val:g}}else if(/[-0-9.]/.test(_)){let p="",g=0;for(s[e]==="-"&&(p+=s[e++]),s[e]==="."&&(p+=s[e++],g=1);e<s.length&&(/[0-9]/.test(s[e])||s[e]==="."&&!g++);)p+=s[e++];d=p==="-"||p==="."||p===""?{t:"V",path:[p||"-"]}:{t:"L",val:parseFloat(p)}}else{let p=a();if(p==="true")d={t:"L",val:!0};else if(p==="false")d={t:"L",val:!1};else if(p==="null")d={t:"L",val:null};else if(t(),s[e]==="("){e++;let g=[];for(t();e<s.length&&s[e]!==")"&&s[e]!=="}";)g.push(l()),t(),s[e]===","&&(e++,t());s[e]===")"&&e++,d={t:"C",fn:p,args:g}}else{let g=[p];for(;s[e]===".";)e++,g.push(a());d={t:"V",path:g}}}for(t();s[e]==="|";){e++,t();let p=a();t();let g=[];if(s[e]==="("){for(e++,t();e<s.length&&s[e]!==")"&&s[e]!=="}";)g.push(l()),t(),s[e]===","&&(e++,t());s[e]===")"&&e++}d={t:"P",left:d,fn:p,args:g},t()}return e===u&&e<s.length&&e++,d},o=(u=[])=>{let d=[];e:for(;e<s.length;){for(let p of u)if(r(p))break e;if(s[e]==="\\"&&r("\\{{")){e++,d.push({t:"T",val:"{{"}),e+=2;continue}if(r("{{")){if(e+=2,t(),s[e]==="+"){e++,t();let g=l();for(t(),i("+"),t();e<s.length&&!r("}}");)e++;i("}}"),d.push({t:"I",expr:g,raw:1});continue}if(s[e]==="#"){e++;let g=a();if(t(),g==="if"){let E=[],C=l();for(t(),i("}}"),E.push({cond:C,body:o(["{{:else if","{{:elseif","{{:else}}","{{/if}}"])});r("{{:else if")||r("{{:elseif");){e+=r("{{:elseif")?9:10,t();let v=l();t(),i("}}"),E.push({cond:v,body:o(["{{:else if","{{:elseif","{{:else}}","{{/if}}"])})}let y;r("{{:else}}")&&(e+=9,y=o(["{{/if}}"])),i("{{/if}}"),d.push({t:"F",branches:E,else:y});continue}if(g==="each"){let E=l();t();let C=a();if(t(),C!=="as"){d.push({t:"T",val:"[Error: #each missing 'as']"});continue}let y=a();t();let v;s[e]===","&&(e++,t(),v=a(),t()),i("}}");let $e=o(["{{:else}}","{{/each}}"]),N;r("{{:else}}")&&(e+=9,N=o(["{{/each}}"])),i("{{/each}}"),d.push({t:"E",arr:E,as:y,idx:v,body:$e,else:N});continue}d.push({t:"T",val:`[Error: unknown #${g}]`}),t(),i("}}");continue}let p=l();for(t();e<s.length&&!r("}}");)e++;i("}}"),d.push({t:"I",expr:p});continue}let _="";for(;e<s.length;){for(let p of u)if(r(p)){_&&d.push({t:"T",val:_});continue e}if(s[e]==="\\"&&r("\\{{")||r("{{"))break;_+=s[e++]}_&&d.push({t:"T",val:_})}return d},c=o();return u=>ve(c,u)};var ts=(n,s)=>{es[n]=(e,...t)=>s(...t.map(r=>m(r,e)))};var f=class extends HTMLElement{constructor(){super();this.instance=null;this._initialized=!1}connectedCallback(){if(this._initialized)return;this._initialized=!0;let e=this.getAttribute("instance")||"default",t=Ce();this.instance=t.getInstance(e),this.init(),this.register&&typeof this.register=="function"&&this.register(this.instance)}disconnectedCallback(){this.cleanup&&typeof this.cleanup=="function"&&this.cleanup(),this._initialized=!1}attributeChangedCallback(e,t,r){if(!this._initialized||t===r)return;let i=this.kebabToCamel(e);r==="false"?this[i]=!1:r==="true"?this[i]=!0:r==null?this[i]=!1:this[i]=r,this.update&&typeof this.update=="function"&&this.update()}kebabToCamel(e){return e.replace(/-([a-z])/g,t=>t[1].toUpperCase())}ensureId(e="pagefind"){return!this.id&&this.instance&&(this.id=this.instance.generateId(e)),this.id}init(){}reconcileAria(){}register(e){}cleanup(){}update(){}showError(e){let t=document.createElement("div");t.className="pf-error",t.innerHTML=`
|
||||
"use strict";(()=>{var hs=Object.defineProperty;var h=(a,s)=>{for(var e in s)hs(a,e,{get:s[e],enumerable:!0})};var Gt={};h(Gt,{PagefindConfig:()=>Se,PagefindElement:()=>f,PagefindFilterDropdown:()=>He,PagefindFilterPane:()=>xe,PagefindInput:()=>Ne,PagefindKeyboardHints:()=>Pe,PagefindModal:()=>we,PagefindModalBody:()=>Fe,PagefindModalFooter:()=>ze,PagefindModalHeader:()=>Le,PagefindModalTrigger:()=>Ue,PagefindResults:()=>Oe,PagefindSearchbox:()=>De,PagefindSummary:()=>Me,configureInstance:()=>is,getInstanceManager:()=>ve});var ps="a[href], button, input, [tabindex]";function Wt(a){let s=a.querySelectorAll(ps);for(let e of s)if(!(e.tabIndex<0)&&!e.disabled&&!e.hasAttribute("hidden")&&window.getComputedStyle(e).display!=="none")return!0;return!1}function Yt(a,s){let e=null;for(let t of s)t.contains(a)||!(a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING)||Wt(t)&&(e===null||t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING)&&(e=t);return e}function je(a,s){let e=null;for(let t of s)t.contains(a)||!(a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)||Wt(t)&&(e===null||t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)&&(e=t);return e}var We={};h(We,{comments:()=>_s,default:()=>Es,direction:()=>fs,strings:()=>gs,thanks_to:()=>ms});var ms="Jan Claasen <jan@cloudcannon.com>",_s="",fs="ltr",gs={placeholder:"Soek",clear_search:"Opruim",load_more:"Laai nog resultate",search_label:"Soek hierdie webwerf",filters_label:"Filters",zero_results:"Geen resultate vir [SEARCH_TERM]",many_results:"[COUNT] resultate vir [SEARCH_TERM]",one_result:"[COUNT] resultate vir [SEARCH_TERM]",total_zero_results:"Geen resultate",total_one_result:"[COUNT] resultaat",total_many_results:"[COUNT] resultate",alt_search:"Geen resultate vir [SEARCH_TERM]. Toon resultate vir [DIFFERENT_TERM] in plaas daarvan",search_suggestion:"Geen resultate vir [SEARCH_TERM]. Probeer eerder een van die volgende terme:",searching:"Soek vir [SEARCH_TERM]",results_label:"Soekresultate",keyboard_navigate:"navigeer",keyboard_select:"kies",keyboard_clear:"wis",keyboard_close:"sluit",keyboard_search:"soek",error_search:"Soek het misluk",filter_selected_one:"[COUNT] gekies",filter_selected_many:"[COUNT] gekies",input_hint:"Resultate sal verskyn terwyl jy tik",loading:"Laai"},Es={thanks_to:ms,comments:_s,direction:fs,strings:gs};var Ye={};h(Ye,{comments:()=>Ts,default:()=>Rs,direction:()=>Cs,strings:()=>ys,thanks_to:()=>bs});var bs="Jermanuts",Ts="",Cs="rtl",ys={placeholder:"\u0628\u062D\u062B",clear_search:"\u0627\u0645\u0633\u062D",load_more:"\u062D\u0645\u0651\u0650\u0644 \u0627\u0644\u0645\u0632\u064A\u062F \u0645\u0646 \u0627\u0644\u0646\u062A\u0627\u0626\u062C",search_label:"\u0627\u0628\u062D\u062B \u0641\u064A \u0647\u0630\u0627 \u0627\u0644\u0645\u0648\u0642\u0639",filters_label:"\u062A\u0635\u0641\u064A\u0627\u062A",zero_results:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C \u0644 [SEARCH_TERM]",many_results:"[COUNT] \u0646\u062A\u0627\u0626\u062C \u0644 [SEARCH_TERM]",one_result:"[COUNT] \u0646\u062A\u064A\u062C\u0629 \u0644 [SEARCH_TERM]",total_zero_results:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C",total_one_result:"[COUNT] \u0646\u062A\u064A\u062C\u0629",total_many_results:"[COUNT] \u0646\u062A\u0627\u0626\u062C",alt_search:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C \u0644 [SEARCH_TERM]. \u064A\u0639\u0631\u0636 \u0627\u0644\u0646\u062A\u0627\u0626\u062C \u0644 [DIFFERENT_TERM] \u0628\u062F\u0644\u0627\u064B \u0645\u0646 \u0630\u0644\u0643",search_suggestion:"\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C \u0644 [SEARCH_TERM]. \u062C\u0631\u0628 \u0623\u062D\u062F \u0639\u0645\u0644\u064A\u0627\u062A \u0627\u0644\u0628\u062D\u062B \u0627\u0644\u062A\u0627\u0644\u064A\u0629:",searching:"\u064A\u0628\u062D\u062B \u0639\u0646 [SEARCH_TERM]...",results_label:"\u0646\u062A\u0627\u0626\u062C \u0627\u0644\u0628\u062D\u062B",keyboard_navigate:"\u062A\u0646\u0642\u0644",keyboard_select:"\u0627\u062E\u062A\u064A\u0627\u0631",keyboard_clear:"\u0627\u0645\u0633\u062D",keyboard_close:"\u0625\u063A\u0644\u0627\u0642",keyboard_search:"\u0628\u062D\u062B",error_search:"\u0641\u0634\u0644 \u0627\u0644\u0628\u062D\u062B",filter_selected_one:"[COUNT] \u0645\u062D\u062F\u062F",filter_selected_many:"[COUNT] \u0645\u062D\u062F\u062F",input_hint:"\u0633\u062A\u0638\u0647\u0631 \u0627\u0644\u0646\u062A\u0627\u0626\u062C \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u0643\u062A\u0627\u0628\u0629",loading:"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644"},Rs={thanks_to:bs,comments:Ts,direction:Cs,strings:ys};var Je={};h(Je,{comments:()=>ks,default:()=>Ns,direction:()=>As,strings:()=>Ss,thanks_to:()=>vs});var vs="Salif Mehmed <mail@salif.eu>",ks="",As="ltr",Ss={placeholder:"\u0422\u044A\u0440\u0441\u0435\u043D\u0435",clear_search:"\u0418\u0437\u0447\u0438\u0441\u0442\u0432\u0430\u043D\u0435",load_more:"\u0417\u0430\u04Line truncated
|
||||
`)),document?.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"?console.error(`[DEBUG: Loaded from ${document.currentScript?.src??"bad script location"}]`):console.error("no known script location"),this.__dispatch__("error",{type:"bundle_load_failed",message:"Could not load search bundle",bundlePath:this.options.bundlePath,error:t}),this.hasAnnouncementCapability()||this.announce("error_search",{},"assertive");return}let e=s.createInstance(this.pagefindOptions||{});for(let t of this.options.mergeIndex){if(!t.bundlePath)throw new Error("mergeIndex requires a bundlePath parameter");let{bundlePath:r,...i}=t;await e.mergeIndex(r,i)}this.__pagefind__=e,this.availableFilters=await this.__pagefind__.filters(),this.totalFilters=this.availableFilters,this.__dispatch__("filters",{available:this.availableFilters,total:this.totalFilters}),this.faceted&&this.__searchID__===0&&this.triggerSearch("")}thinSubResults(s,e=3){if(s.length<=e)return s;let t=[...s].sort((r,i)=>(i.locations?.length??0)-(r.locations?.length??0)).slice(0,e).map(r=>r.url);return s.filter(r=>t.includes(r.url))}getDisplaySubResults(s,e=3){if(!Array.isArray(s.sub_results))return[];let r=s.sub_results[0]?.url===(s.meta?.url||s.url)?s.sub_results.slice(1):s.sub_results;return this.thinSubResults(r,e)}};var Kt=class{constructor(){this.instances=new Map;this.defaultOptions={bundlePath:this.detectBundlePath()}}detectBundlePath(){try{if(document?.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"){let s=new URL(document.currentScript.src).pathname.match(/^(.*\/)(?:pagefind[-_])?.*\.js.*$/);if(s)return s[1]}}catch{}return"/pagefind/"}getInstance(s="default",e={}){let t=this.instances.get(s);if(t)return t;let r={...this.defaultOptions,...e},i=new Re(s,r);return this.instances.set(s,i),i}hasInstance(s){return this.instances.has(s)}removeInstance(s){this.instances.delete(s)}getInstanceNames(){return Array.from(this.instances.keys())}},Bt=null;function ve(){return Bt||(Bt=new Kt),Bt}function is(a,s){let e=ve();if(e.hasInstance(a)){let t=e.getInstance(a);return t.applyOptions(s),t}return e.getInstance(a,s)}var ke=a=>!(a==null||a===!1||a===0||a===""||Number.isNaN(a)||Array.isArray(a)&&a.length===0||typeof a=="object"&&a!==null&&!Array.isArray(a)&&Object.keys(a).length===0),b=(a,s,e)=>a.length<s?`[Error: ${e}() needs ${s} args]`:null,ns={eq:(a,...s)=>b(s,2,"eq")??m(s[0],a)===m(s[1],a),ne:(a,...s)=>b(s,2,"ne")??m(s[0],a)!==m(s[1],a),gt:(a,...s)=>b(s,2,"gt")??Number(m(s[0],a))>Number(m(s[1],a)),lt:(a,...s)=>b(s,2,"lt")??Number(m(s[0],a))<Number(m(s[1],a)),gte:(a,...s)=>b(s,2,"gte")??Number(m(s[0],a))>=Number(m(s[1],a)),lte:(a,...s)=>b(s,2,"lte")??Number(m(s[0],a))<=Number(m(s[1],a)),and:(a,...s)=>{let e=!0;for(let t of s)if(e=m(t,a),!ke(e))return e;return e},or:(a,...s)=>{let e=!1;for(let t of s)if(e=m(t,a),ke(e))return e;return e},not:(a,...s)=>b(s,1,"not")??!ke(m(s[0],a)),lowercase:(a,...s)=>String(m(s[0],a)).toLowerCase(),uppercase:(a,...s)=>String(m(s[0],a)).toUpperCase(),trim:(a,...s)=>String(m(s[0],a)).trim(),truncate:(a,...s)=>{let e=b(s,2,"truncate");if(e)return e;let t=String(m(s[0],a)),r=Number(m(s[1],a)),i=s[2]?String(m(s[2],a)):"...";return t.length>r?t.slice(0,r)+i:t},replace:(a,...s)=>b(s,3,"replace")??String(m(s[0],a)).split(String(m(s[1],a))).join(String(m(s[2],a))),limit:(a,...s)=>{let e=b(s,2,"limit");if(e)return e;let t=m(s[0],a),r=m(s[1],a);return Array.isArray(t)?t.slice(0,r<0?0:r):t},first:(a,...s)=>{let e=b(s,1,"first");if(e)return e;let t=m(s[0],a);return Array.isArray(t)?t[0]:t},last:(a,...s)=>{let e=b(s,1,"last");if(e)return e;let t=m(s[0],a);return Array.isArray(t)?t[t.length-1]:t},length:(a,...s)=>{let e=b(s,1,"length");if(e)return e;let t=m(s[0],a);return Array.isArray(t)?t.length:String(t).length},join:(a,...s)=>b(s,2,"join")??(e=>Array.isArray(e)?e.join(String(m(s[1],a))):String(e))(m(s[0],a)),default:(a,...s)=>{let e=b(s,2,"default");if(e)return e;let t=m(s[0],a);return ke(t)?t:m(s[1],a)},safeUrl:(a,...s)=>{let e=String(m(s[0],a)??"").trim();return e&&/^(?:\.{0,2}\/|[#?]|(?:https?|ftp):\/\/|(?:mailto|tel):)/i.test(e)?e:""}},m=(a,s)=>{if(!a)return;if(a.t==="L")return a.val;if(a.t==="V"){let t=(i,n)=>Object.prototype.hasOwnProperty.call(i,n),r=s;for(let i of a.path){if(r==null||!t(r,i))return;r=r[i]}return r}let e=ns[a.fn];return e?a.t==="C"?e(s,...a.args):e(s,a.left,...a.args):`[Error: unknown ${a.fn}()]`},Ha=a=>a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),Ae=(a,s)=>{let e="";for(let t of a){if(t.t==="T"){e+=t.val;continue}if(t.t==="I"){let r=m(t.expr,s);if(Array.isArray(r))e+="[Error: use #each for arrays]";else if(typeof r=="object"&&r!==null)e+="[Error: cannot render object]";else{let i=String(r??"");e+=t.raw?i:Ha(i)}continue}if(t.t==="F"){let r=!1;for(let i of t.branches)if(ke(m(i.cond,s))){e+=Ae(i.body,s),r=!0;break}!r&&t.else&&(e+=Ae(t.else,s));continue}if(t.t==="E"){let r=m(t.arr,s);if(!Array.isArray(r)){e+="[Error: #each ne
Line truncated
|
||||
\r`.includes(s[e]);)e++},r=u=>s.slice(e,e+u.length)===u,i=u=>{r(u)&&(e+=u.length)},n=()=>{let u="";for(;e<s.length&&/\w/.test(s[e]);)u+=s[e++];return u},l=()=>{t();let u=e,d,_=s[e];if(_==='"'||_==="'"){let p=s[e++],g="";for(;e<s.length&&s[e]!==p;){if(s[e]==="\\"&&e+1<s.length){e++;let E=s[e];g+=E==="n"?`
|
||||
`:E==="t"?" ":E==="r"?"\r":E,e++;continue}g+=s[e++]}e<s.length?e++:g="",d={t:"L",val:g}}else if(/[-0-9.]/.test(_)){let p="",g=0;for(s[e]==="-"&&(p+=s[e++]),s[e]==="."&&(p+=s[e++],g=1);e<s.length&&(/[0-9]/.test(s[e])||s[e]==="."&&!g++);)p+=s[e++];d=p==="-"||p==="."||p===""?{t:"V",path:[p||"-"]}:{t:"L",val:parseFloat(p)}}else{let p=n();if(p==="true")d={t:"L",val:!0};else if(p==="false")d={t:"L",val:!1};else if(p==="null")d={t:"L",val:null};else if(t(),s[e]==="("){e++;let g=[];for(t();e<s.length&&s[e]!==")"&&s[e]!=="}";)g.push(l()),t(),s[e]===","&&(e++,t());s[e]===")"&&e++,d={t:"C",fn:p,args:g}}else{let g=[p];for(;s[e]===".";)e++,g.push(n());d={t:"V",path:g}}}for(t();s[e]==="|";){e++,t();let p=n();t();let g=[];if(s[e]==="("){for(e++,t();e<s.length&&s[e]!==")"&&s[e]!=="}";)g.push(l()),t(),s[e]===","&&(e++,t());s[e]===")"&&e++}d={t:"P",left:d,fn:p,args:g},t()}return e===u&&e<s.length&&e++,d},o=(u=[])=>{let d=[];e:for(;e<s.length;){for(let p of u)if(r(p))break e;if(s[e]==="\\"&&r("\\{{")){e++,d.push({t:"T",val:"{{"}),e+=2;continue}if(r("{{")){if(e+=2,t(),s[e]==="+"){e++,t();let g=l();for(t(),i("+"),t();e<s.length&&!r("}}");)e++;i("}}"),d.push({t:"I",expr:g,raw:1});continue}if(s[e]==="#"){e++;let g=n();if(t(),g==="if"){let E=[],T=l();for(t(),i("}}"),E.push({cond:T,body:o(["{{:else if","{{:elseif","{{:else}}","{{/if}}"])});r("{{:else if")||r("{{:elseif");){e+=r("{{:elseif")?9:10,t();let v=l();t(),i("}}"),E.push({cond:v,body:o(["{{:else if","{{:elseif","{{:else}}","{{/if}}"])})}let R;r("{{:else}}")&&(e+=9,R=o(["{{/if}}"])),i("{{/if}}"),d.push({t:"F",branches:E,else:R});continue}if(g==="each"){let E=l();t();let T=n();if(t(),T!=="as"){d.push({t:"T",val:"[Error: #each missing 'as']"});continue}let R=n();t();let v;s[e]===","&&(e++,t(),v=n(),t()),i("}}");let Ge=o(["{{:else}}","{{/each}}"]),M;r("{{:else}}")&&(e+=9,M=o(["{{/each}}"])),i("{{/each}}"),d.push({t:"E",arr:E,as:R,idx:v,body:Ge,else:M});continue}d.push({t:"T",val:`[Error: unknown #${g}]`}),t(),i("}}");continue}let p=l();for(t();e<s.length&&!r("}}");)e++;i("}}"),d.push({t:"I",expr:p});continue}let _="";for(;e<s.length;){for(let p of u)if(r(p)){_&&d.push({t:"T",val:_});continue e}if(s[e]==="\\"&&r("\\{{")||r("{{"))break;_+=s[e++]}_&&d.push({t:"T",val:_})}return d},c=o();return u=>Ae(c,u)};var as=(a,s)=>{ns[a]=(e,...t)=>s(...t.map(r=>m(r,e)))};var f=class extends HTMLElement{constructor(){super();this.instance=null;this._initialized=!1}connectedCallback(){if(this._initialized)return;this._initialized=!0;let e=this.getAttribute("instance")||"default",t=ve();this.instance=t.getInstance(e),this.instance.ensureLanguage(),this.init(),this.register&&typeof this.register=="function"&&this.register(this.instance)}disconnectedCallback(){this.cleanup&&typeof this.cleanup=="function"&&this.cleanup(),this.instance?.unregisterComponent(this),this._initialized=!1}attributeChangedCallback(e,t,r){if(!this._initialized||t===r)return;let i=this.kebabToCamel(e);r==="false"?this[i]=!1:r==="true"?this[i]=!0:r==null?this[i]=!1:this[i]=r,this.update&&typeof this.update=="function"&&this.update()}kebabToCamel(e){return e.replace(/-([a-z])/g,t=>t[1].toUpperCase())}ensureId(e="pagefind"){return!this.id&&this.instance&&(this.id=this.instance.generateId(e)),this.id}init(){}reconcileAria(){}register(e){}cleanup(){}update(){}showError(e){let t=document.createElement("div");t.className="pf-error",t.innerHTML=`
|
||||
<strong>Pagefind Error:</strong> ${this.escapeHtml(e.message||"Unknown error")}
|
||||
${e.details?`<br><small>${this.escapeHtml(e.details)}</small>`:""}
|
||||
`,this.appendChild(t),this.dispatchEvent(new CustomEvent("pagefind-error",{detail:e,bubbles:!0,composed:!0}))}escapeHtml(e){let t=document.createElement("div");return t.textContent=e,t.innerHTML}};var Re=class extends f{init(){this.setAttribute("hidden","")}register(s){s.registerUtility(this);let e=this.getAttribute("bundle-path");e&&(s.options.bundlePath=e);let t=this.getAttribute("base-url");t&&(s.pagefindOptions.baseUrl=t);let r=this.getAttribute("excerpt-length");r&&(s.pagefindOptions.excerptLength=parseInt(r,10));let i=this.getAttribute("lang");i&&s.setLanguage(i);let a=this.getAttribute("meta-cache-tag");a&&(s.pagefindOptions.metaCacheTag=a);let l=this.getAttribute("highlight-param");l&&(s.pagefindOptions.highlightParam=l),this.hasAttribute("exact-diacritics")&&(s.pagefindOptions.exactDiacritics=!0),this.hasAttribute("no-worker")&&(s.pagefindOptions.noWorker=!0),this.hasAttribute("faceted")&&(s.faceted=!0),this.hasAttribute("preload")&&s.triggerLoad()}};customElements.get("pagefind-config")||customElements.define("pagefind-config",Re);var Ea=(n=100)=>new Promise(s=>setTimeout(s,n)),ke=class extends f{constructor(){super();this.inputEl=null;this.clearEl=null;this.searchID=0;this.placeholder="";this.debounce=300;this.autofocus=!1}static get observedAttributes(){return["placeholder","debounce","autofocus"]}readAttributes(){this.hasAttribute("placeholder")&&(this.placeholder=this.getAttribute("placeholder")||""),this.hasAttribute("debounce")&&(this.debounce=parseInt(this.getAttribute("debounce")||"300",10)||300),this.hasAttribute("autofocus")&&(this.autofocus=this.hasAttribute("autofocus"))}init(){this.readAttributes(),this.render()}render(){this.innerHTML="";let e=this.instance.generateId("pfmod-input"),t=this.instance?.translate("search_label")||"Search this site",r=this.instance?.translate("clear_search")||"Clear",i=this.placeholder||this.instance?.translate("placeholder")||"Search";this.instance?.direction==="rtl"?this.setAttribute("dir","rtl"):this.removeAttribute("dir");let a=document.createElement("search");a.className="pf-input-wrapper",a.setAttribute("role","search"),a.setAttribute("aria-label",t);let l=document.createElement("label");l.setAttribute("for",e),l.setAttribute("data-pf-sr-hidden","true"),l.textContent=t,a.appendChild(l),this.inputEl=document.createElement("input"),this.inputEl.id=e,this.inputEl.className="pf-input",this.inputEl.setAttribute("type","search"),this.inputEl.setAttribute("autocomplete","off"),this.inputEl.setAttribute("autocapitalize","none"),this.inputEl.setAttribute("enterkeyhint","search"),this.inputEl.setAttribute("placeholder",i),this.autofocus&&this.inputEl.setAttribute("autofocus","autofocus");let o=this.instance.generateId("pf-input-hint"),c=this.instance?.translate("input_hint")||"Results will appear as you type",u=document.createElement("span");u.id=o,u.setAttribute("data-pf-sr-hidden","true"),u.textContent=c,this.inputEl.setAttribute("aria-describedby",o),a.appendChild(this.inputEl),a.appendChild(u),this.clearEl=document.createElement("button"),this.clearEl.className="pf-input-clear",this.clearEl.setAttribute("type","button"),this.clearEl.setAttribute("data-pf-suppressed","true"),this.clearEl.textContent=r,a.appendChild(this.clearEl),this.appendChild(a),this.setupEventHandlers()}setupEventHandlers(){!this.inputEl||!this.clearEl||(this.inputEl.addEventListener("input",async e=>{let t=e.target;if(this.instance&&typeof t?.value=="string"){this.updateState(t.value);let r=++this.searchID;if(await Ea(this.debounce),r!==this.searchID)return;this.instance?.triggerSearch(t.value)}}),this.inputEl.addEventListener("keydown",e=>{e.key==="Escape"&&(++this.searchID,this.inputEl&&(this.inputEl.value=""),this.instance?.triggerSearch(""),this.updateState("")),e.key==="ArrowDown"&&(e.preventDefault(),this.inputEl&&this.instance?.focusNextResults(this.inputEl))}),this.inputEl.addEventListener("focus",()=>{this.instance?.triggerLoad();let e=this.instance?.translate("keyboard_navigate")||"navigate",t=this.instance?.translate("keyboard_clear")||"clear";this.instance?.registerShortcut({label:"\u2193",description:e},this),this.instance?.registerShortcut({label:"esc",description:t},this)}),this.inputEl.addEventListener("blur",()=>{this.instance?.deregisterAllShortcuts(this)}),this.clearEl.addEventListener("click",()=>{this.inputEl&&(this.inputEl.value="",this.instance?.triggerSearch(""),this.updateState(""),this.inputEl.focus())}))}updateState(e){this.clearEl&&(e&&e?.length?this.clearEl.removeAttribute("data-pf-suppressed"):this.clearEl.setAttribute("data-pf-suppressed","true"))}register(e){e.registerInput(this,{keyboardNavigation:!0}),e.on("search",t=>{this.inputEl&&document.activeElement!==this.inputEl&&(this.inputEl.value=t,this.updateState(t))},this),e.on("error",t=>{let r=t;this.showError({message:r.message||"Search initialization failed",details:r.bundlePath?`Bundle path: ${r.bundlePath}`:void 0})},this),e.on("translations",()=>{let t=this.inputEl?.value||"";this.render(
Line truncated
|
||||
`,this.appendChild(t),this.dispatchEvent(new CustomEvent("pagefind-error",{detail:e,bubbles:!0,composed:!0}))}escapeHtml(e){let t=document.createElement("div");return t.textContent=e,t.innerHTML}};var Se=class extends f{init(){this.setAttribute("hidden","")}register(s){s.registerUtility(this);let e=this.getAttribute("bundle-path");e&&(s.options.bundlePath=e);let t=this.getAttribute("base-url");t&&(s.pagefindOptions.baseUrl=t);let r=this.getAttribute("excerpt-length");r&&(s.pagefindOptions.excerptLength=parseInt(r,10));let i=this.getAttribute("excerpt-ellipsis");i&&(s.pagefindOptions.excerptEllipsis=i);let n=this.getAttribute("lang");n&&s.setLanguage(n);let l=this.getAttribute("meta-cache-tag");l&&(s.pagefindOptions.metaCacheTag=l);let o=this.getAttribute("highlight-param");o&&(s.pagefindOptions.highlightParam=o);let c=this.getAttribute("sort");if(c){let[u,d="asc"]=c.split(":");s.searchSort={[u]:d}}this.hasAttribute("exact-diacritics")&&(s.pagefindOptions.exactDiacritics=!0),this.hasAttribute("no-worker")&&(s.pagefindOptions.noWorker=!0),this.hasAttribute("faceted")&&(s.faceted=!0),this.hasAttribute("preload")&&s.triggerLoad()}};customElements.get("pagefind-config")||customElements.define("pagefind-config",Se);function S(a){let s=!1,e=Number.NEGATIVE_INFINITY;return a.addEventListener("compositionstart",()=>{s=!0}),a.addEventListener("compositionend",()=>{s=!1,e=performance.now()}),a.addEventListener("keyup",()=>{e=Number.NEGATIVE_INFINITY}),a.addEventListener("focusout",()=>{s=!1}),t=>t.isComposing||s||performance.now()-e<50}var wa=(a=100)=>new Promise(s=>setTimeout(s,a)),Ne=class extends f{constructor(){super();this.inputEl=null;this.clearEl=null;this.searchID=0;this.placeholder="";this.debounce=300;this.autofocus=!1}static get observedAttributes(){return["placeholder","debounce","autofocus"]}readAttributes(){this.hasAttribute("placeholder")&&(this.placeholder=this.getAttribute("placeholder")||""),this.hasAttribute("debounce")&&(this.debounce=parseInt(this.getAttribute("debounce")||"300",10)||300),this.hasAttribute("autofocus")&&(this.autofocus=this.hasAttribute("autofocus"))}init(){this.readAttributes(),this.render()}render(){this.innerHTML="";let e=this.instance.generateId("pfmod-input"),t=this.instance?.translate("search_label")||"Search this site",r=this.instance?.translate("clear_search")||"Clear",i=this.placeholder||this.instance?.translate("placeholder")||"Search";this.instance?.direction==="rtl"?this.setAttribute("dir","rtl"):this.removeAttribute("dir");let n=document.createElement("search");n.className="pf-input-wrapper",n.setAttribute("role","search"),n.setAttribute("aria-label",t);let l=document.createElement("label");l.setAttribute("for",e),l.setAttribute("data-pf-sr-hidden","true"),l.textContent=t,n.appendChild(l),this.inputEl=document.createElement("input"),this.inputEl.id=e,this.inputEl.className="pf-input",this.inputEl.setAttribute("type","search"),this.inputEl.setAttribute("autocomplete","off"),this.inputEl.setAttribute("autocapitalize","none"),this.inputEl.setAttribute("enterkeyhint","search"),this.inputEl.setAttribute("placeholder",i),this.autofocus&&this.inputEl.setAttribute("autofocus","autofocus");let o=this.instance.generateId("pf-input-hint"),c=this.instance?.translate("input_hint")||"Results will appear as you type",u=document.createElement("span");u.id=o,u.setAttribute("data-pf-sr-hidden","true"),u.textContent=c,this.inputEl.setAttribute("aria-describedby",o),n.appendChild(this.inputEl),n.appendChild(u),this.clearEl=document.createElement("button"),this.clearEl.className="pf-input-clear",this.clearEl.setAttribute("type","button"),this.clearEl.setAttribute("data-pf-suppressed","true"),this.clearEl.textContent=r,n.appendChild(this.clearEl),this.appendChild(n),this.setupEventHandlers()}setupEventHandlers(){if(!this.inputEl||!this.clearEl)return;this.inputEl.addEventListener("input",async t=>{let r=t.target;if(this.instance&&typeof r?.value=="string"){this.updateState(r.value);let i=++this.searchID;if(await wa(this.debounce),i!==this.searchID)return;this.instance?.triggerSearch(r.value)}});let e=S(this.inputEl);this.inputEl.addEventListener("keydown",t=>{e(t)||(t.key==="Escape"&&(++this.searchID,this.inputEl&&(this.inputEl.value=""),this.instance?.triggerSearch(""),this.updateState("")),t.key==="ArrowDown"&&(t.preventDefault(),this.inputEl&&this.instance?.focusNextResults(this.inputEl)))}),this.inputEl.addEventListener("focus",()=>{this.instance?.triggerLoad();let t=this.instance?.translate("keyboard_navigate")||"navigate",r=this.instance?.translate("keyboard_clear")||"clear";this.instance?.registerShortcut({label:"\u2193",description:t},this),this.instance?.registerShortcut({label:"esc",description:r},this)}),this.inputEl.addEventListener("blur",()=>{this.instance?.deregisterAllShortcuts(this)}),this.clearEl.addEventListener("click",()=>{this.inputEl&&(this.inputEl.value="",this.instance?.triggerSearch(""),this.updateState(""),this.inputEl.focus())})}updateState(e){this.clea
Line truncated
|
||||
<div class="pf-result-card">
|
||||
{{#if and(options.show_images, meta.image)}}
|
||||
<img class="pf-result-image" src="{{ meta.image | resolveUrl(meta.url | default(url)) }}" alt="{{ meta.image_alt | default(meta.title) }}">
|
||||
@@ -28,7 +28,7 @@
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
</li>`,Ta=`<li class="pf-result" aria-hidden="true">
|
||||
</li>`,Ua=`<li class="pf-result" aria-hidden="true">
|
||||
<div class="pf-result-card">
|
||||
<div class="pf-skeleton pf-skeleton-image"></div>
|
||||
<div class="pf-result-content">
|
||||
@@ -36,7 +36,7 @@
|
||||
<p class="pf-result-excerpt pf-skeleton pf-skeleton-excerpt"></p>
|
||||
</div>
|
||||
</div>
|
||||
</li>`,Ca=R(ba),ya=R(Ta),rs=(n,s)=>{for(let e of n)if(e instanceof Element){e.setAttribute("data-pf-result-index",String(s));break}},zt=n=>{if(!(n instanceof HTMLElement))return null;let s=window.getComputedStyle(n).overflowY;return s!=="visible"&&s!=="hidden"?n:zt(n.parentNode)},Dt=class{constructor(s){this.result=null;this.loading=!1;this.observer=null;this.rawResult=s.result,this.index=s.index,this.placeholderNodes=s.placeholderNodes,this.resultFn=s.resultFn,this.intersectionEl=s.intersectionEl,this.showImages=s.showImages,this.showSubResults=s.showSubResults,this.maxSubResults=s.maxSubResults,this.linkTarget=s.linkTarget,this.onLoad=s.onLoad,this.setupObserver()}setupObserver(){if(this.result!==null||this.observer!==null||!this.placeholderNodes?.length)return;let s={root:this.intersectionEl,rootMargin:"50px",threshold:.01};this.observer=new IntersectionObserver((e,t)=>{this.result===null&&e?.[0]?.isIntersecting&&(this.load(),t.disconnect(),this.observer=null)},s),this.observer.observe(this.placeholderNodes[0])}async load(){if(this.placeholderNodes?.length&&!(this.result!==null||this.loading)){this.loading=!0;try{this.result=await this.rawResult.data();let s=this.resultFn(this.result,{showImages:this.showImages,showSubResults:this.showSubResults,maxSubResults:this.maxSubResults,linkTarget:this.linkTarget}),e=ss(s);for(rs(e,this.index);this.placeholderNodes.length>1;){let r=this.placeholderNodes.pop();r instanceof Element&&r.remove()}let t=this.placeholderNodes[0];t instanceof Element&&t.replaceWith(...e)}catch{this.loading=!1}this.onLoad?.()}}cleanup(){this.observer&&(this.observer.disconnect(),this.observer=null)}},Se=class extends f{constructor(){super();this.containerEl=null;this.intersectionEl=document.body;this.results=[];this.showImages=!1;this.hideSubResults=!1;this.maxSubResults=3;this.maxResults=0;this.linkTarget=null;this.resultTemplate=null;this.compiledResultTemplate=null;this.compiledPlaceholderTemplate=null;this.selectedIndex=-1;this.selectedAnchor=null;this.loadingAnnouncementTimeout=null}static get observedAttributes(){return["show-images","hide-sub-results","max-sub-results","max-results","link-target"]}init(){this.hasAttribute("show-images")&&(this.showImages=this.getAttribute("show-images")!=="false"),this.hasAttribute("hide-sub-results")&&(this.hideSubResults=this.getAttribute("hide-sub-results")!=="false"),this.hasAttribute("max-sub-results")&&(this.maxSubResults=parseInt(this.getAttribute("max-sub-results")||"3",10)||3),this.hasAttribute("max-results")&&(this.maxResults=parseInt(this.getAttribute("max-results")||"0",10)),this.hasAttribute("link-target")&&(this.linkTarget=this.getAttribute("link-target")),this.checkForTemplates(),this.render()}checkForTemplates(){let e=this.querySelector('script[type="text/pagefind-template"]:not([data-template]), script[type="text/pagefind-template"][data-template="result"]');e&&(this.compiledResultTemplate=R((e.textContent||"").trim()));let t=this.querySelector('script[type="text/pagefind-template"][data-template="placeholder"]');t&&(this.compiledPlaceholderTemplate=R((t.textContent||"").trim()))}buildTemplateData(e,t){let r=t.showSubResults?this.instance.getDisplaySubResults(e,t.maxSubResults):[];return{meta:e.meta||{},excerpt:e.excerpt||"",url:e.url||"",sub_results:r.map(i=>({title:i.title,url:i.url,excerpt:i.excerpt})),options:{link_target:t.linkTarget,show_images:t.showImages}}}getResultRenderer(){if(this.resultTemplate){let e=this.resultTemplate;return(t,r)=>e(t)}if(this.compiledResultTemplate){let e=this.compiledResultTemplate;return(t,r)=>{let i=this.buildTemplateData(t,r);return e(i)}}return(e,t)=>{let r=this.buildTemplateData(e,t);return Ca(r)}}getPlaceholder(){return this.compiledPlaceholderTemplate?this.compiledPlaceholderTemplate({}):ya({})}render(){let e=[];this.querySelectorAll('script[type="text/pagefind-template"]').forEach(r=>{e.push(r)}),this.innerHTML="",e.forEach(r=>this.appendChild(r));let t=this.instance?.translate("results_label")||"Search results";this.instance?.direction==="rtl"?this.setAttribute("dir","rtl"):this.removeAttribute("dir"),this.containerEl=document.createElement("ul"),this.containerEl.className="pf-results",this.containerEl.setAttribute("aria-label",t),this.containerEl.setAttribute("aria-busy","false"),this.appendChild(this.containerEl),this.setupKeyboardHandlers()}appendResults(e){if(this.containerEl)for(let t of e)this.containerEl.appendChild(t)}register(e){e.registerResults(this,{keyboardNavigation:!0,announcements:!0}),e.on("results",t=>{if(!this.containerEl)return;let r=t;for(let c of this.results)c.cleanup();this.containerEl.innerHTML="",this.containerEl.setAttribute("aria-busy","false"),this.intersectionEl=zt(this.containerEl),this.selectedIndex=-1,this.selectedAnchor=null;let i=this.maxResults>0?r.results.slice(0,this.maxResults):r.results,a=i.length,l=e.searchTerm;if(l){let c=a===0?"zero_results":a===1?"one_result":"many_results",u=a===0?"assertive":"polite";e.announce(c,{SEARCH_TERM:l,COUNT:a},u)}elLine truncated
|
||||
</li>`,La=k(Ia),Fa=k(Ua),os=(a,s)=>{for(let e of a)if(e instanceof Element){e.setAttribute("data-pf-result-index",String(s));break}},$t=a=>{if(!(a instanceof HTMLElement))return null;let s=window.getComputedStyle(a).overflowY;return s!=="visible"&&s!=="hidden"?a:$t(a.parentNode)},Vt=class{constructor(s){this.result=null;this.loading=!1;this.observer=null;this.rawResult=s.result,this.index=s.index,this.placeholderNodes=s.placeholderNodes,this.resultFn=s.resultFn,this.intersectionEl=s.intersectionEl,this.showImages=s.showImages,this.showSubResults=s.showSubResults,this.maxSubResults=s.maxSubResults,this.linkTarget=s.linkTarget,this.onLoad=s.onLoad,this.setupObserver()}setupObserver(){if(this.result!==null||this.observer!==null||!this.placeholderNodes?.length)return;let s={root:this.intersectionEl,rootMargin:"50px",threshold:.01};this.observer=new IntersectionObserver((e,t)=>{this.result===null&&e?.[0]?.isIntersecting&&(this.load(),t.disconnect(),this.observer=null)},s),this.observer.observe(this.placeholderNodes[0])}async load(){if(this.placeholderNodes?.length&&!(this.result!==null||this.loading)){this.loading=!0;try{this.result=await this.rawResult.data();let s=this.resultFn(this.result,{showImages:this.showImages,showSubResults:this.showSubResults,maxSubResults:this.maxSubResults,linkTarget:this.linkTarget}),e=ls(s);for(os(e,this.index);this.placeholderNodes.length>1;){let r=this.placeholderNodes.pop();r instanceof Element&&r.remove()}let t=this.placeholderNodes[0];t instanceof Element&&t.replaceWith(...e)}catch{this.loading=!1}this.onLoad?.()}}cleanup(){this.observer&&(this.observer.disconnect(),this.observer=null)}},Oe=class extends f{constructor(){super();this.containerEl=null;this.intersectionEl=document.body;this.results=[];this.showImages=!1;this.hideSubResults=!1;this.maxSubResults=3;this.maxResults=0;this.linkTarget=null;this.resultTemplate=null;this.compiledResultTemplate=null;this.compiledPlaceholderTemplate=null;this.selectedIndex=-1;this.selectedAnchor=null;this.loadingAnnouncementTimeout=null}static get observedAttributes(){return["show-images","hide-sub-results","max-sub-results","max-results","link-target"]}init(){this.hasAttribute("show-images")&&(this.showImages=this.getAttribute("show-images")!=="false"),this.hasAttribute("hide-sub-results")&&(this.hideSubResults=this.getAttribute("hide-sub-results")!=="false"),this.hasAttribute("max-sub-results")&&(this.maxSubResults=parseInt(this.getAttribute("max-sub-results")||"3",10)||3),this.hasAttribute("max-results")&&(this.maxResults=parseInt(this.getAttribute("max-results")||"0",10)),this.hasAttribute("link-target")&&(this.linkTarget=this.getAttribute("link-target")),this.checkForTemplates(),this.render()}checkForTemplates(){let e=this.querySelector('script[type="text/pagefind-template"]:not([data-template]), script[type="text/pagefind-template"][data-template="result"]');e&&(this.compiledResultTemplate=k((e.textContent||"").trim()));let t=this.querySelector('script[type="text/pagefind-template"][data-template="placeholder"]');t&&(this.compiledPlaceholderTemplate=k((t.textContent||"").trim()))}buildTemplateData(e,t){let r=t.showSubResults?this.instance.getDisplaySubResults(e,t.maxSubResults):[];return{meta:e.meta||{},excerpt:e.excerpt||"",url:e.url||"",sub_results:r.map(i=>({title:i.title,url:i.url,excerpt:i.excerpt})),options:{link_target:t.linkTarget,show_images:t.showImages}}}getResultRenderer(){if(this.resultTemplate){let e=this.resultTemplate;return(t,r)=>e(t)}if(this.compiledResultTemplate){let e=this.compiledResultTemplate;return(t,r)=>{let i=this.buildTemplateData(t,r);return e(i)}}return(e,t)=>{let r=this.buildTemplateData(e,t);return La(r)}}getPlaceholder(){return this.compiledPlaceholderTemplate?this.compiledPlaceholderTemplate({}):Fa({})}render(){let e=[];this.querySelectorAll('script[type="text/pagefind-template"]').forEach(r=>{e.push(r)}),this.innerHTML="",e.forEach(r=>this.appendChild(r));let t=this.instance?.translate("results_label")||"Search results";this.instance?.direction==="rtl"?this.setAttribute("dir","rtl"):this.removeAttribute("dir"),this.containerEl=document.createElement("ul"),this.containerEl.className="pf-results",this.containerEl.setAttribute("aria-label",t),this.containerEl.setAttribute("aria-busy","false"),this.appendChild(this.containerEl),this.setupKeyboardHandlers()}appendResults(e){if(this.containerEl)for(let t of e)this.containerEl.appendChild(t)}register(e){e.registerResults(this,{keyboardNavigation:!0,announcements:!0}),e.on("results",t=>{if(!this.containerEl)return;let r=t;for(let c of this.results)c.cleanup();this.containerEl.innerHTML="",this.containerEl.setAttribute("aria-busy","false"),this.intersectionEl=$t(this.containerEl),this.selectedIndex=-1,this.selectedAnchor=null;let i=this.maxResults>0?r.results.slice(0,this.maxResults):r.results,n=i.length,l=e.searchTerm;if(l){let c=n===0?"zero_results":n===1?"one_result":"many_results",u=n===0?"assertive":"polite";e.announce(c,{SEARCH_TERM:l,COUNT:n},u)}elLine truncated
|
||||
<p class="pf-searchbox-result-title" id="{{ aria.title_id }}">{{ meta.title | default("Untitled") }}</p>
|
||||
{{#if excerpt}}
|
||||
<p class="pf-searchbox-result-excerpt" id="{{ aria.excerpt_id }}">{{+ excerpt +}}</p>
|
||||
@@ -50,7 +50,7 @@
|
||||
{{/if}}
|
||||
</a>
|
||||
{{/each}}
|
||||
</div>{{/if}}`,ns=R(Ra),ka=`<div class="pf-searchbox-result pf-searchbox-placeholder" aria-hidden="true">
|
||||
</div>{{/if}}`,us=k(Pa),Da=`<div class="pf-searchbox-result pf-searchbox-placeholder" aria-hidden="true">
|
||||
<p class="pf-searchbox-result-title pf-skeleton pf-skeleton-title"></p>
|
||||
<p class="pf-searchbox-result-excerpt pf-skeleton pf-skeleton-excerpt"></p>
|
||||
</div>`,Aa=R(ka),jt=class{constructor(s){this.data=null;this.cachedOptions=null;this.loading=!1;this.retryDelay=0;this.observer=null;this.rawResult=s.rawResult,this.placeholderEl=s.placeholderEl,this.renderFn=s.renderFn,this.intersectionRoot=s.intersectionRoot,this.index=s.index,this.onLoad=s.onLoad,this.setupObserver()}setupObserver(){if(this.data!==null||this.observer!==null)return;let s={root:this.intersectionRoot,rootMargin:"50px",threshold:.01};this.observer=new IntersectionObserver((e,t)=>{this.data===null&&e?.[0]?.isIntersecting&&(this.load(),t.disconnect(),this.observer=null)},s),this.observer.observe(this.placeholderEl)}async load(){if(!(this.data!==null||this.loading)){this.loading=!0;try{this.data=await this.rawResult.data();let s=this.renderFn(this.data),e=Ke(s);if(e.length>0&&this.placeholderEl.parentNode){let t=e.find(r=>r instanceof Element);this.placeholderEl.replaceWith(...e),t instanceof Element&&(this.placeholderEl=t,as(t,this.index),this.cacheOptions())}}catch{await new Promise(s=>setTimeout(s,this.retryDelay||100)),this.retryDelay=Math.min((this.retryDelay||100)*2,1e4),this.loading=!1}this.onLoad?.()}}cacheOptions(){if(!this.data||!this.placeholderEl){this.cachedOptions=null;return}this.placeholderEl.getAttribute("role")==="group"?this.cachedOptions=Array.from(this.placeholderEl.querySelectorAll('[role="option"]')):this.placeholderEl.getAttribute("role")==="option"?this.cachedOptions=[this.placeholderEl]:this.cachedOptions=[]}cleanup(){this.observer&&(this.observer.disconnect(),this.observer=null),this.cachedOptions=null}},Fe=class extends f{constructor(){super();this.containerEl=null;this.inputEl=null;this.dropdownEl=null;this.resultsEl=null;this.statusEl=null;this.footerEl=null;this.isOpen=!1;this.isLoading=!1;this.results=[];this.activeIndex=-1;this.activeOptionOffset=0;this.searchID=0;this.searchTerm="";this.pendingNavigation=0;this.loadingAnnouncementTimeout=null;this.selectedEl=null;this._userPlaceholder=null;this.debounce=150;this.autofocus=!1;this.showSubResults=!1;this.maxResults=0;this.showKeyboardHints=!0;this.shortcut="mod+k";this.hideShortcut=!1;this.resultTemplate=null;this.compiledResultTemplate=null;this.compiledPlaceholderTemplate=null;this._documentClickHandler=null;this._shortcutKeyHandler=null;this._keyBinding=null;this._shortcutEl=null}static get observedAttributes(){return["placeholder","debounce","autofocus","show-sub-results","max-results","show-keyboard-hints","shortcut","hide-shortcut"]}get placeholder(){return this._userPlaceholder||this.instance?.translate("placeholder")||"Search..."}readAttributes(){this.hasAttribute("placeholder")&&(this._userPlaceholder=this.getAttribute("placeholder")),this.hasAttribute("debounce")&&(this.debounce=parseInt(this.getAttribute("debounce")||"150",10)||150),this.hasAttribute("autofocus")&&(this.autofocus=this.hasAttribute("autofocus")),this.hasAttribute("show-sub-results")&&(this.showSubResults=this.getAttribute("show-sub-results")!=="false"),this.hasAttribute("max-results")&&(this.maxResults=parseInt(this.getAttribute("max-results")||"0",10)),this.hasAttribute("show-keyboard-hints")&&(this.showKeyboardHints=this.getAttribute("show-keyboard-hints")!=="false"),this.hasAttribute("shortcut")&&(this.shortcut=this.getAttribute("shortcut")||"mod+k"),this.hasAttribute("hide-shortcut")&&(this.hideShortcut=this.getAttribute("hide-shortcut")!=="false"),this._keyBinding=je(this.shortcut)}init(){this.readAttributes(),this.checkForTemplates(),this.render(),this.setupOutsideClickHandler(),this.setupShortcutHandler()}checkForTemplates(){let e=this.querySelector('script[type="text/pagefind-template"]:not([data-template]), script[type="text/pagefind-template"][data-template="result"]');e&&(this.compiledResultTemplate=R((e.textContent||"").trim()));let t=this.querySelector('script[type="text/pagefind-template"][data-template="placeholder"]');t&&(this.compiledPlaceholderTemplate=R((t.textContent||"").trim()))}getPlaceholder(){return this.compiledPlaceholderTemplate?this.compiledPlaceholderTemplate({}):Aa({})}render(){let e=[];this.querySelectorAll('script[type="text/pagefind-template"]').forEach(l=>{e.push(l)}),this.innerHTML="",e.forEach(l=>this.appendChild(l));let t=this.instance.generateId("pf-sb-input"),r=this.instance.generateId("pf-sb-results");this.containerEl=document.createElement("div"),this.containerEl.className="pf-searchbox",this.appendChild(this.containerEl);let i=document.createElement("div");if(i.className="pf-searchbox-input-wrapper",this.containerEl.appendChild(i),this.inputEl=document.createElement("input"),this.inputEl.id=t,this.inputEl.className="pf-searchbox-input",this.inputEl.type="text",this.inputEl.setAttribute("role","combobox"),this.inputEl.setAttribute("aria-autocomplete","list"),this.inputEl.setAttribute("aria-controls",r),this.inputEl.setAttribute("aria-expanded","false"),this.inputEl.setAttribute("autocomplete","off"),this.inputEl.setAttribute("autocapitalize","none"),this.inputEl.placeholder=this.placeholder,thiLine truncated
|
||||
</div>`,ja=k(Da),qt=class{constructor(s){this.data=null;this.cachedOptions=null;this.loading=!1;this.retryDelay=0;this.observer=null;this.rawResult=s.rawResult,this.placeholderEl=s.placeholderEl,this.renderFn=s.renderFn,this.intersectionRoot=s.intersectionRoot,this.index=s.index,this.onLoad=s.onLoad,this.setupObserver()}setupObserver(){if(this.data!==null||this.observer!==null)return;let s={root:this.intersectionRoot,rootMargin:"50px",threshold:.01};this.observer=new IntersectionObserver((e,t)=>{this.data===null&&e?.[0]?.isIntersecting&&(this.load(),t.disconnect(),this.observer=null)},s),this.observer.observe(this.placeholderEl)}async load(){if(!(this.data!==null||this.loading)){this.loading=!0;try{this.data=await this.rawResult.data();let s=this.renderFn(this.data),e=qe(s);if(e.length>0&&this.placeholderEl.parentNode){let t=e.find(r=>r instanceof Element);this.placeholderEl.replaceWith(...e),t instanceof Element&&(this.placeholderEl=t,ds(t,this.index),this.cacheOptions())}}catch{await new Promise(s=>setTimeout(s,this.retryDelay||100)),this.retryDelay=Math.min((this.retryDelay||100)*2,1e4),this.loading=!1}this.onLoad?.()}}cacheOptions(){if(!this.data||!this.placeholderEl){this.cachedOptions=null;return}this.placeholderEl.getAttribute("role")==="group"?this.cachedOptions=Array.from(this.placeholderEl.querySelectorAll('[role="option"]')):this.placeholderEl.getAttribute("role")==="option"?this.cachedOptions=[this.placeholderEl]:this.cachedOptions=[]}cleanup(){this.observer&&(this.observer.disconnect(),this.observer=null),this.cachedOptions=null}},De=class extends f{constructor(){super();this.containerEl=null;this.inputEl=null;this.dropdownEl=null;this.resultsEl=null;this.statusEl=null;this.footerEl=null;this.isOpen=!1;this.isLoading=!1;this.results=[];this.activeIndex=-1;this.activeOptionOffset=0;this.searchID=0;this.searchTerm="";this.pendingNavigation=0;this.loadingAnnouncementTimeout=null;this.selectedEl=null;this._userPlaceholder=null;this.debounce=150;this.autofocus=!1;this.showSubResults=!1;this.maxSubResults=3;this.maxResults=0;this.showKeyboardHints=!0;this.shortcut="mod+k";this.hideShortcut=!1;this.resultTemplate=null;this.compiledResultTemplate=null;this.compiledPlaceholderTemplate=null;this._documentClickHandler=null;this._shortcutKeyHandler=null;this._keyBinding=null;this._shortcutEl=null}static get observedAttributes(){return["placeholder","debounce","autofocus","show-sub-results","max-sub-results","max-results","show-keyboard-hints","shortcut","hide-shortcut"]}get placeholder(){return this._userPlaceholder||this.instance?.translate("placeholder")||"Search..."}set placeholder(e){this._userPlaceholder=e,this.inputEl&&(this.inputEl.placeholder=this.placeholder)}readAttributes(){this.hasAttribute("placeholder")&&(this._userPlaceholder=this.getAttribute("placeholder")),this.hasAttribute("debounce")&&(this.debounce=parseInt(this.getAttribute("debounce")||"150",10)||150),this.hasAttribute("autofocus")&&(this.autofocus=this.hasAttribute("autofocus")),this.hasAttribute("show-sub-results")&&(this.showSubResults=this.getAttribute("show-sub-results")!=="false"),this.hasAttribute("max-sub-results")&&(this.maxSubResults=parseInt(this.getAttribute("max-sub-results")||"3",10)||3),this.hasAttribute("max-results")&&(this.maxResults=parseInt(this.getAttribute("max-results")||"0",10)),this.hasAttribute("show-keyboard-hints")&&(this.showKeyboardHints=this.getAttribute("show-keyboard-hints")!=="false"),this.hasAttribute("shortcut")&&(this.shortcut=this.getAttribute("shortcut")||"mod+k"),this.hasAttribute("hide-shortcut")&&(this.hideShortcut=this.getAttribute("hide-shortcut")!=="false"),this._keyBinding=$e(this.shortcut)}init(){this.readAttributes(),this.checkForTemplates(),this.render(),this.setupOutsideClickHandler(),this.setupShortcutHandler()}checkForTemplates(){let e=this.querySelector('script[type="text/pagefind-template"]:not([data-template]), script[type="text/pagefind-template"][data-template="result"]');e&&(this.compiledResultTemplate=k((e.textContent||"").trim()));let t=this.querySelector('script[type="text/pagefind-template"][data-template="placeholder"]');t&&(this.compiledPlaceholderTemplate=k((t.textContent||"").trim()))}getPlaceholder(){return this.compiledPlaceholderTemplate?this.compiledPlaceholderTemplate({}):ja({})}render(){let e=[];this.querySelectorAll('script[type="text/pagefind-template"]').forEach(l=>{e.push(l)}),this.innerHTML="",e.forEach(l=>this.appendChild(l));let t=this.instance.generateId("pf-sb-input"),r=this.instance.generateId("pf-sb-results");this.containerEl=document.createElement("div"),this.containerEl.className="pf-searchbox",this.appendChild(this.containerEl);let i=document.createElement("div");if(i.className="pf-searchbox-input-wrapper",this.containerEl.appendChild(i),this.inputEl=document.createElement("input"),this.inputEl.id=t,this.inputEl.className="pf-searchbox-input",this.inputEl.type="text",this.inputEl.setAttribute("role","combobox"),this.inputEl.setAttribute("aria-autocLine truncated
|
||||
@@ -1 +1 @@
|
||||
{"version":"1.5.2","languages":{"en":{"hash":"en_c0d6c66ace","wasm":"en","page_count":1887}},"include_characters":["_","‿","⁀","⁔","︳","︴","﹍","﹎","﹏","_"]}
|
||||
{"version":"1.6.0","languages":{"en":{"hash":"en_18e3c28af9","wasm":"en","page_count":1889}},"include_characters":["_","‿","⁀","⁔","︳","︴","﹍","﹎","﹏","_"]}
|
||||
@@ -6,7 +6,11 @@ var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __commonJS = (cb, mod) => function __require() {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
try {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
} catch (e) {
|
||||
throw mod = 0, e;
|
||||
}
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
(()=>{var Os=Object.defineProperty;var x=(l,e)=>{for(var t in e)Os(l,t,{get:e[t],enumerable:!0})};function R(){}function Bt(l){return l()}function ct(){return Object.create(null)}function H(l){l.forEach(Bt)}function ut(l){return typeof l=="function"}function O(l,e){return l!=l?e==e:l!==e||l&&typeof l=="object"||typeof l=="function"}var ot;function ge(l,e){return l===e?!0:(ot||(ot=document.createElement("a")),ot.href=e,l===ot.href)}function Wl(l){return Object.keys(l).length===0}var ht=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;var Ct=class l{_listeners="WeakMap"in ht?new WeakMap:void 0;_observer=void 0;options;constructor(e){this.options=e}observe(e,t){return this._listeners.set(e,t),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){return this._observer??(this._observer=new ResizeObserver(e=>{for(let t of e)l.entries.set(t.target,t),this._listeners.get(t.target)?.(t)}))}};Ct.entries="WeakMap"in ht?new WeakMap:void 0;var Sl=!1;function Vl(){Sl=!0}function Dl(){Sl=!1}function b(l,e){l.appendChild(e)}function h(l,e,t){l.insertBefore(e,t||null)}function B(l){l.parentNode&&l.parentNode.removeChild(l)}function $(l,e){for(let t=0;t<l.length;t+=1)l[t]&&l[t].d(e)}function F(l){return document.createElement(l)}function Ps(l){return document.createElementNS("http://www.w3.org/2000/svg",l)}function G(l){return document.createTextNode(l)}function Z(){return G(" ")}function ee(){return G("")}function w(l,e,t,s){return l.addEventListener(e,t,s),()=>l.removeEventListener(e,t,s)}function _(l,e,t){t==null?l.removeAttribute(e):l.getAttribute(e)!==t&&l.setAttribute(e,t)}function Tl(l){return Array.from(l.childNodes)}function W(l,e){e=""+e,l.data!==e&&(l.data=e)}function oe(l,e){l.value=e??""}function z(l,e,t){l.classList.toggle(e,!!t)}var It=class{is_svg=!1;e=void 0;n=void 0;t=void 0;a=void 0;constructor(e=!1){this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,s=null){this.e||(this.is_svg?this.e=Ps(t.nodeName):this.e=F(t.nodeType===11?"TEMPLATE":t.nodeName),this.t=t.tagName!=="TEMPLATE"?t:t.content,this.c(e)),this.i(s)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)h(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(B)}};function vl(l){let e={};return l.childNodes.forEach(t=>{e[t.slot||"default"]=!0}),e}var te;function j(l){te=l}function Ut(){if(!te)throw new Error("Function called outside component initialization");return te}function xt(l){Ut().$$.on_mount.push(l)}function yt(l){Ut().$$.on_destroy.push(l)}var se=[];var Ce=[],ue=[],Gt=[],sa=Promise.resolve(),Nt=!1;function Ml(){Nt||(Nt=!0,sa.then(dt))}function Ae(l){ue.push(l)}function Yl(l){Gt.push(l)}var Zt=new Set,ce=0;function dt(){if(ce!==0)return;let l=te;do{try{for(;ce<se.length;){let e=se[ce];ce++,j(e),aa(e.$$)}}catch(e){throw se.length=0,ce=0,e}for(j(null),se.length=0,ce=0;Ce.length;)Ce.pop()();for(let e=0;e<ue.length;e+=1){let t=ue[e];Zt.has(t)||(Zt.add(t),t())}ue.length=0}while(se.length);for(;Gt.length;)Gt.pop()();Nt=!1,Zt.clear(),j(l)}function aa(l){if(l.fragment!==null){l.update(),H(l.before_update);let e=l.dirty;l.dirty=[-1],l.fragment&&l.fragment.p(l.ctx,e),l.after_update.forEach(Ae)}}function wl(l){let e=[],t=[];ue.forEach(s=>l.indexOf(s)===-1?e.push(s):t.push(s)),t.forEach(s=>s()),ue=e}var At=new Set,ae;function re(){ae={r:0,c:[],p:ae}}function ie(){ae.r||H(ae.c),ae=ae.p}function k(l,e){l&&l.i&&(At.delete(l),l.i(e))}function D(l,e,t,s){if(l&&l.o){if(At.has(l))return;At.add(l),ae.c.push(()=>{At.delete(l),s&&(t&&l.d(1),s())}),l.o(e)}else s&&s()}function V(l){return l?.length!==void 0?l:Array.from(l)}function zl(l,e){D(l,1,1,()=>{e.delete(l.key)})}function Jl(l,e,t,s,a,r,i,n,g,C,u,A){let c=l.length,d=r.length,o=c,I={};for(;o--;)I[l[o].key]=o;let m=[],f=new Map,p=new Map,U=[];for(o=d;o--;){let N=A(a,r,o),S=t(N),E=i.get(S);E?s&&U.push(()=>E.p(N,e)):(E=C(S,N),E.c()),f.set(S,m[o]=E),S in I&&p.set(S,Math.abs(o-I[S]))}let y=new Set,q=new Set;function J(N){k(N,1),N.m(n,u),i.set(N.key,N),u=N.first,d--}for(;c&&d;){let N=m[d-1],S=l[c-1],E=N.key,v=S.key;N===S?(u=N.first,c--,d--):f.has(v)?!i.has(E)||y.has(E)?J(N):q.has(v)?c--:p.get(E)>p.get(v)?(q.add(E),J(N)):(y.add(v),c--):(g(S,i),c--)}for(;c--;){let N=l[c];f.has(N.key)||g(N,i)}for(;d;)J(m[d-1]);return H(U),m}var ra=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],ia=new Set([...ra]);function Ol(l,e,t){let s=l.$$.props[e];s!==void 0&&(l.$$.bound[s]=t,t(l.$$.ctx[s]))}function _t(l){l&&l.c()}function _e(l,e,t){let{fragment:s,after_update:a}=l.$$;s&&s.m(e,t),Ae(()=>{let r=l.$$.on_mount.map(Bt).filter(ut);l.$$.on_destroy?l.$$.on_destroy.push(...r):H(r),l.$$.on_mount=[]}),a.Line truncated
|
||||
`)),document?.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"?console.error(`[DEBUG: Loaded from ${document.currentScript.src??"bad script location"}]`):console.error("no known script location")}u||t(24,u=C?12:30);let X={...m||{},excerptLength:u};await Q.options(X);for(let L of f){if(!L.bundlePath)throw new Error("mergeIndex requires a bundlePath parameter");let Y=L.bundlePath;delete L.bundlePath,await Q.mergeIndex(Y,L)}E=Q,Ws()}},Ws=async()=>{E&&(Xl=await E.filters(),(!Ie||!Object.keys(Ie).length)&&t(18,Ie=Xl))},Ss=Q=>{let X={};return Object.entries(Q).filter(([,L])=>L).forEach(([L])=>{let[Y,ne]=L.split(/:(.*)$/);X[Y]=X[Y]||[],X[Y].push(ne)}),X},de,Vs=async(Q,X)=>{if(!Q){t(15,Ft=!1),de&&clearTimeout(de);return}let L=Ss(X),Y=()=>Ds(Q,L);I>0&&Q?(de&&clearTimeout(de),de=setTimeout(Y,I),await Rl(),E.preload(Q,{filters:L})):Y(),Ts()},Rl=async()=>{for(;!E;)Ll(),await new Promise(Q=>setTimeout(Q,50))},Ds=async(Q,X)=>{t(16,Nl=Q||""),typeof c=="function"&&(Q=c(Q)),t(14,ft=!0),t(15,Ft=!0),await Rl();let L=++Gl,Y={filters:X};J&&typeof J=="object"&&(Y.sort=J);let ne=await E.search(Q,Y);Gl===L&&(ne.filters&&Object.keys(ne.filters)?.length&&t(18,Ie=ne.filters),t(13,Zl=ne),t(14,ft=!1),t(17,pt=i))},Ts=()=>{let Q=gt.offsetWidth;Q!=Ls&&t(10,v.style.paddingRight=`${Q+2}px`,v)},vs=Q=>{Q?.preventDefault(),t(17,pt+=i)},Hs=Q=>{Q.key==="Escape"&&(t(9,S=""),v.blur()),Q.key==="Enter"&&Q.preventDefault()};function Ms(){S=this.value,t(9,S),t(23,p)}function Ys(Q){Ce[Q?"unshift":"push"](()=>{v=Q,t(10,v)})}function ws(Q){Ce[Q?"unshift":"push"](()=>{gt=Q,t(11,gt)})}let zs=()=>{t(9,S=""),v.blur()};function Js(Q){N=Q,t(0,N)}return l.$$set=Q=>{"base_path"in Q&&t(25,r=Q.base_path),"page_size"in Q&&t(26,i=Q.page_size),"reset_styles"in Q&&t(1,n=Q.reset_styles),"show_images"in Q&&t(2,g=Q.show_images),"show_sub_results"in Q&&t(3,C=Q.show_sub_results),"excerpt_length"in Q&&t(24,u=Q.excerpt_length),"process_result"in Q&&t(4,A=Q.process_result),"process_term"in Q&&t(27,c=Q.process_term),"show_empty_filters"in Q&&t(5,d=Q.show_empty_filters),"open_filters"in Q&&t(6,o=Q.open_filters),"debounce_timeout_ms"in Q&&t(28,I=Q.debounce_timeout_ms),"pagefind_options"in Q&&t(29,m=Q.pagefind_options),"merge_index"in Q&&t(30,f=Q.merge_index),"trigger_search_term"in Q&&t(23,p=Q.trigger_search_term),"translations"in Q&&t(7,U=Q.translations),"autofocus"in Q&&t(8,y=Q.autofocus),"focus_on_slash"in Q&&t(31,q=Q.focus_on_slash),"sort"in Q&&t(32,J=Q.sort),"selected_filters"in Q&&t(0,N=Q.selected_filters)},l.$$.update=()=>{l.$$.dirty[0]&8388608&&p&&(t(9,S=p),t(23,p="")),l.$$.dirty[0]&513&&Vs(S,N)},[N,n,g,C,A,d,o,U,y,S,v,gt,bt,Zl,ft,Ft,Nl,pt,Ie,El,Rs,Ll,vs,p,u,r,i,c,I,m,f,q,J,Hs,Ms,Ys,ws,zs,Js]}var xl=class extends M{constructor(e){super(),K(this,e,Vg,Wg,O,{base_path:25,page_size:26,reset_styles:1,show_images:2,show_sub_results:3,excerpt_length:24,process_result:4,process_term:27,show_empty_filters:5,open_filters:6,debounce_timeout_ms:28,pagefind_options:29,merge_index:30,trigger_search_term:23,translations:7,autofocus:8,focus_on_slash:31,sort:32,selected_filters:0},null,[-1,-1])}},ks=xl;var yl;try{document?.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"&&(yl=new URL(document.currentScript.src).pathname.match(/^(.*\/)(?:pagefind-)?ui.js.*$/)[1])}catch{yl="/pagefind/"}var mt=class{constructor(e){this._pfs=null;let t=e.element??"[data-pagefind-ui]",s=e.bundlePath??yl,a=e.pageSize??5,r=e.resetStyles??!0,i=e.showImages??!0,n=e.showSubResults??!1,g=e.excerptLength??0,C=e.processResult??null,u=e.processTerm??null,A=e.showEmptyFilters??!0,c=e.openFilters??[],d=e.debounceTimeoutMs??300,o=e.mergeIndex??[],I=e.translations??[],m=e.autofocus??!1,f=e.focusOnSlash??!1,p=e.sort??null;delete e.element,delete e.bundlePath,delete e.pageSize,delete e.resetStyles,delete e.showImages,delete e.showSubResults,delete e.excerptLength,delete e.processResult,delete e.processTerm,delete e.showEmptyFilters,delete e.openFilters,delete e.debounceTimeoutMs,delete e.mergeIndex,delete e.translations,delete e.autofocus,delete e.focusOnSlash,delete e.sort;let U=t instanceof HTMLElement?t:document.querySelector(t);U?this._pfs=new ks({target:U,props:{base_path:s,page_size:a,reset_styles:r,show_images:i,show_sub_results:n,excerpt_length:g,process_result:C,process_term:u,show_empty_filters:A,open_filters:c,debounce_timeout_ms:d,merge_index:o,translations:I,autofocus:m,focus_on_slash:f,sort:p,pagefind_options:e}}):console.error(`Pagefind UI couldn't find the selector ${t}`)}triggerSearch(e){this._pfs.$$set({trigger_search_term:e})}triggerFilters(e){let t={};for(let[s,a]of Object.entries(e))if(Array.isArray(a))for(let r of a)t[`${s}:${r}`]=!0;else t[`${s}:${a}`]=!0;this._pfs.$$set({selected_filters:t})}destroy(){this._pfs.$destroy()}};window.PagefindUI=mt;})();
|
||||
(()=>{var qs=Object.defineProperty;var x=(l,e)=>{for(var t in e)qs(l,t,{get:e[t],enumerable:!0})};function R(){}function Ut(l){return l()}function Ct(){return Object.create(null)}function v(l){l.forEach(Ut)}function It(l){return typeof l=="function"}function j(l,e){return l!=l?e==e:l!==e||l&&typeof l=="object"||typeof l=="function"}var ut;function oe(l,e){return l===e?!0:(ut||(ut=document.createElement("a")),ut.href=e,l===ut.href)}function Tl(l){return Object.keys(l).length===0}var xt=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;var dt=class l{_listeners="WeakMap"in xt?new WeakMap:void 0;_observer=void 0;options;constructor(e){this.options=e}observe(e,t){return this._listeners.set(e,t),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){return this._observer??(this._observer=new ResizeObserver(e=>{for(let t of e)l.entries.set(t.target,t),this._listeners.get(t.target)?.(t)}))}};dt.entries="WeakMap"in xt?new WeakMap:void 0;var vl=!1;function Hl(){vl=!0}function Ml(){vl=!1}function b(l,e){l.appendChild(e)}function h(l,e,t){l.insertBefore(e,t||null)}function B(l){l.parentNode&&l.parentNode.removeChild(l)}function $(l,e){for(let t=0;t<l.length;t+=1)l[t]&&l[t].d(e)}function p(l){return document.createElement(l)}function ta(l){return document.createElementNS("http://www.w3.org/2000/svg",l)}function G(l){return document.createTextNode(l)}function Z(){return G(" ")}function ee(){return G("")}function z(l,e,t,s){return l.addEventListener(e,t,s),()=>l.removeEventListener(e,t,s)}function _(l,e,t){t==null?l.removeAttribute(e):l.getAttribute(e)!==t&&l.setAttribute(e,t)}function Yl(l){return Array.from(l.childNodes)}function W(l,e){e=""+e,l.data!==e&&(l.data=e)}function ge(l,e){l.value=e??""}function J(l,e,t){l.classList.toggle(e,!!t)}var At=class{is_svg=!1;e=void 0;n=void 0;t=void 0;a=void 0;constructor(e=!1){this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,s=null){this.e||(this.is_svg?this.e=ta(t.nodeName):this.e=p(t.nodeType===11?"TEMPLATE":t.nodeName),this.t=t.tagName!=="TEMPLATE"?t:t.content,this.c(e)),this.i(s)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)h(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(B)}};function wl(l){let e={};return l.childNodes.forEach(t=>{e[t.slot||"default"]=!0}),e}var te;function K(l){te=l}function yt(){if(!te)throw new Error("Function called outside component initialization");return te}function Zt(l){yt().$$.on_mount.push(l)}function Gt(l){yt().$$.on_destroy.push(l)}var le=[];var Ce=[],ue=[],Et=[],na=Promise.resolve(),Xt=!1;function Jl(){Xt||(Xt=!0,na.then(_t))}function Ae(l){ue.push(l)}function Ol(l){Et.push(l)}var Nt=new Set,ce=0;function _t(){if(ce!==0)return;let l=te;do{try{for(;ce<le.length;){let e=le[ce];ce++,K(e),oa(e.$$)}}catch(e){throw le.length=0,ce=0,e}for(K(null),le.length=0,ce=0;Ce.length;)Ce.pop()();for(let e=0;e<ue.length;e+=1){let t=ue[e];Nt.has(t)||(Nt.add(t),t())}ue.length=0}while(le.length);for(;Et.length;)Et.pop()();Xt=!1,Nt.clear(),K(l)}function oa(l){if(l.fragment!==null){l.update(),v(l.before_update);let e=l.dirty;l.dirty=[-1],l.fragment&&l.fragment.p(l.ctx,e),l.after_update.forEach(Ae)}}function jl(l){let e=[],t=[];ue.forEach(s=>l.indexOf(s)===-1?e.push(s):t.push(s)),t.forEach(s=>s()),ue=e}var Qt=new Set,se;function ae(){se={r:0,c:[],p:se}}function re(){se.r||v(se.c),se=se.p}function k(l,e){l&&l.i&&(Qt.delete(l),l.i(e))}function D(l,e,t,s){if(l&&l.o){if(Qt.has(l))return;Qt.add(l),se.c.push(()=>{Qt.delete(l),s&&(t&&l.d(1),s())}),l.o(e)}else s&&s()}function V(l){return l?.length!==void 0?l:Array.from(l)}function Kl(l,e){D(l,1,1,()=>{e.delete(l.key)})}function Pl(l,e,t,s,a,i,r,o,n,g,c,A){let C=l.length,d=i.length,u=C,I={};for(;u--;)I[l[u].key]=u;let m=[],f=new Map,F=new Map,U=[];for(u=d;u--;){let N=A(a,i,u),S=t(N),X=r.get(S);X?s&&U.push(()=>X.p(N,e)):(X=g(S,N),X.c()),f.set(S,m[u]=X),S in I&&F.set(S,Math.abs(u-I[S]))}let y=new Set,q=new Set;function O(N){k(N,1),N.m(o,c),r.set(N.key,N),c=N.first,d--}for(;C&&d;){let N=m[d-1],S=l[C-1],X=N.key,T=S.key;N===S?(c=N.first,C--,d--):f.has(T)?!r.has(X)||y.has(X)?O(N):q.has(T)?C--:F.get(X)>F.get(T)?(q.add(X),O(N)):(y.add(T),C--):(n(S,r),C--)}for(;C--;){let N=l[C];f.has(N.key)||n(N,r)}for(;d;)O(m[d-1]);return v(U),m}var ga=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],ca=new Set([...ga]);function ql(l,e,t){let s=l.$$.props[e];s!==void 0&&(l.$$.bound[s]=t,t(l.$$.ctx[s]))}function mt(l){l&&l.c()}function _e(l,e,t){let{fragment:s,after_update:a}=l.$$;s&&s.m(e,t),Ae(()=>{let i=l.$$.on_mount.map(Ut).filter(It);l.$$.on_destroy?l.$$.on_destroy.push(...i):v(i),l.$$.on_mount=[]}),a.Line truncated
|
||||
`)),document?.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"?console.error(`[DEBUG: Loaded from ${document.currentScript.src??"bad script location"}]`):console.error("no known script location")}c||t(24,c=g?12:30);let E={...m||{},excerptLength:c};await Q.options(E);for(let L of f){if(!L.bundlePath)throw new Error("mergeIndex requires a bundlePath parameter");let w=L.bundlePath;delete L.bundlePath,await Q.mergeIndex(w,L)}X=Q,Ts()}},Ts=async()=>{X&&(Rl=await X.filters(),(!Ie||!Object.keys(Ie).length)&&t(18,Ie=Rl))},vs=Q=>{let E={};return Object.entries(Q).filter(([,L])=>L).forEach(([L])=>{let[w,ne]=L.split(/:(.*)$/);E[w]=E[w]||[],E[w].push(ne)}),E},de,Hs=async(Q,E)=>{if(!Q){t(15,Bt=!1),de&&clearTimeout(de);return}let L=vs(E),w=()=>Ms(Q,L);I>0&&Q?(de&&clearTimeout(de),de=setTimeout(w,I),await Dl(),X.preload(Q,{filters:L})):w(),Ys()},Dl=async()=>{for(;!X;)Vl(),await new Promise(Q=>setTimeout(Q,50))},Ms=async(Q,E)=>{t(16,Ll=Q||""),typeof C=="function"&&(Q=C(Q)),t(14,Ft=!0),t(15,Bt=!0),await Dl();let L=++kl,w={filters:E};O&&typeof O=="object"&&(w.sort=O);let ne=await X.search(Q,w);kl===L&&(ne.filters&&Object.keys(ne.filters)?.length&&t(18,Ie=ne.filters),t(13,Xl=ne),t(14,Ft=!1),t(17,ht=r))},Ys=()=>{let Q=ct.offsetWidth;Q!=Vs&&t(10,T.style.paddingRight=`${Q+2}px`,T)},ws=Q=>{Q?.preventDefault(),t(17,ht+=r)},zs=Q=>{Q.key==="Escape"&&(t(9,S=""),T.blur()),Q.key==="Enter"&&Q.preventDefault()};function Js(){S=this.value,t(9,S),t(23,F)}function Os(Q){Ce[Q?"unshift":"push"](()=>{T=Q,t(10,T)})}function js(Q){Ce[Q?"unshift":"push"](()=>{ct=Q,t(11,ct)})}let Ks=()=>{t(9,S=""),T.blur()};function Ps(Q){N=Q,t(0,N)}return l.$$set=Q=>{"base_path"in Q&&t(25,i=Q.base_path),"page_size"in Q&&t(26,r=Q.page_size),"reset_styles"in Q&&t(1,o=Q.reset_styles),"show_images"in Q&&t(2,n=Q.show_images),"show_sub_results"in Q&&t(3,g=Q.show_sub_results),"excerpt_length"in Q&&t(24,c=Q.excerpt_length),"process_result"in Q&&t(4,A=Q.process_result),"process_term"in Q&&t(27,C=Q.process_term),"show_empty_filters"in Q&&t(5,d=Q.show_empty_filters),"open_filters"in Q&&t(6,u=Q.open_filters),"debounce_timeout_ms"in Q&&t(28,I=Q.debounce_timeout_ms),"pagefind_options"in Q&&t(29,m=Q.pagefind_options),"merge_index"in Q&&t(30,f=Q.merge_index),"trigger_search_term"in Q&&t(23,F=Q.trigger_search_term),"translations"in Q&&t(7,U=Q.translations),"autofocus"in Q&&t(8,y=Q.autofocus),"focus_on_slash"in Q&&t(31,q=Q.focus_on_slash),"sort"in Q&&t(32,O=Q.sort),"selected_filters"in Q&&t(0,N=Q.selected_filters)},l.$$.update=()=>{l.$$.dirty[0]&8388608&&F&&(t(9,S=F),t(23,F="")),l.$$.dirty[0]&513&&Hs(S,N)},[N,o,n,g,A,d,u,U,y,S,T,ct,pt,Xl,Ft,Bt,Ll,ht,Ie,Wl,Ds,Vl,ws,F,c,i,r,C,I,m,f,q,O,zs,Js,Os,js,Ks,Ps]}var Nl=class extends Y{constructor(e){super(),P(this,e,$o,Po,j,{base_path:25,page_size:26,reset_styles:1,show_images:2,show_sub_results:3,excerpt_length:24,process_result:4,process_term:27,show_empty_filters:5,open_filters:6,debounce_timeout_ms:28,pagefind_options:29,merge_index:30,trigger_search_term:23,translations:7,autofocus:8,focus_on_slash:31,sort:32,selected_filters:0},null,[-1,-1])}},Ss=Nl;var El;try{document?.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"&&(El=new URL(document.currentScript.src).pathname.match(/^(.*\/)(?:pagefind-)?ui.js.*$/)[1])}catch{El="/pagefind/"}var ft=class{constructor(e){this._pfs=null;let t=e.element??"[data-pagefind-ui]",s=e.bundlePath??El,a=e.pageSize??5,i=e.resetStyles??!0,r=e.showImages??!0,o=e.showSubResults??!1,n=e.excerptLength??0,g=e.processResult??null,c=e.processTerm??null,A=e.showEmptyFilters??!0,C=e.openFilters??[],d=e.debounceTimeoutMs??300,u=e.mergeIndex??[],I=e.translations??[],m=e.autofocus??!1,f=e.focusOnSlash??!1,F=e.sort??null;delete e.element,delete e.bundlePath,delete e.pageSize,delete e.resetStyles,delete e.showImages,delete e.showSubResults,delete e.excerptLength,delete e.processResult,delete e.processTerm,delete e.showEmptyFilters,delete e.openFilters,delete e.debounceTimeoutMs,delete e.mergeIndex,delete e.translations,delete e.autofocus,delete e.focusOnSlash,delete e.sort;let U=t instanceof HTMLElement?t:document.querySelector(t);U?this._pfs=new Ss({target:U,props:{base_path:s,page_size:a,reset_styles:i,show_images:r,show_sub_results:o,excerpt_length:n,process_result:g,process_term:c,show_empty_filters:A,open_filters:C,debounce_timeout_ms:d,merge_index:u,translations:I,autofocus:m,focus_on_slash:f,sort:F,pagefind_options:e}}):console.error(`Pagefind UI couldn't find the selector ${t}`)}triggerSearch(e){this._pfs.$$set({trigger_search_term:e})}triggerFilters(e){let t={};for(let[s,a]of Object.entries(e))if(Array.isArray(a))for(let i of a)t[`${s}:${i}`]=!0;else t[`${s}:${a}`]=!0;this._pfs.$$set({selected_filters:t})}destroy(){this._pfs.$destroy()}};window.PagefindUI=ft;})();
|
||||
@@ -1,6 +1,6 @@
|
||||
const pagefind_version="1.5.2";let wasm_bindgen=(function(exports){let script_src;if(typeof document!=='undefined'&&document.currentScript!==null){script_src=new URL("UNHANDLED",location.href).toString();}function add_synthetic_filter(ptr,filter){const ptr0=passStringToWasm0(filter,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ret=wasm.add_synthetic_filter(ptr,ptr0,len0);return ret>>>0;}exports.add_synthetic_filter=add_synthetic_filter;function enter_playground_mode(ptr){const ret=wasm.enter_playground_mode(ptr);return ret>>>0;}exports.enter_playground_mode=enter_playground_mode;function filters(ptr){let deferred1_0;let deferred1_1;try{const ret=wasm.filters(ptr);deferred1_0=ret[0];deferred1_1=ret[1];return getStringFromWasm0(ret[0],ret[1]);}finally{wasm.__wbindgen_free(deferred1_0,deferred1_1,1);}}exports.filters=filters;function init_pagefind(metadata_bytes){const ptr0=passArray8ToWasm0(metadata_bytes,wasm.__wbindgen_malloc);const len0=WASM_VECTOR_LEN;const ret=wasm.init_pagefind(ptr0,len0);return ret>>>0;}exports.init_pagefind=init_pagefind;function load_filter_chunk(ptr,chunk_bytes){const ptr0=passArray8ToWasm0(chunk_bytes,wasm.__wbindgen_malloc);const len0=WASM_VECTOR_LEN;const ret=wasm.load_filter_chunk(ptr,ptr0,len0);return ret>>>0;}exports.load_filter_chunk=load_filter_chunk;function load_index_chunk(ptr,chunk_bytes){const ptr0=passArray8ToWasm0(chunk_bytes,wasm.__wbindgen_malloc);const len0=WASM_VECTOR_LEN;const ret=wasm.load_index_chunk(ptr,ptr0,len0);return ret>>>0;}exports.load_index_chunk=load_index_chunk;function request_all_filter_indexes(ptr){let deferred1_0;let deferred1_1;try{const ret=wasm.request_all_filter_indexes(ptr);deferred1_0=ret[0];deferred1_1=ret[1];return getStringFromWasm0(ret[0],ret[1]);}finally{wasm.__wbindgen_free(deferred1_0,deferred1_1,1);}}exports.request_all_filter_indexes=request_all_filter_indexes;function request_filter_indexes(ptr,filters){let deferred2_0;let deferred2_1;try{const ptr0=passStringToWasm0(filters,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ret=wasm.request_filter_indexes(ptr,ptr0,len0);deferred2_0=ret[0];deferred2_1=ret[1];return getStringFromWasm0(ret[0],ret[1]);}finally{wasm.__wbindgen_free(deferred2_0,deferred2_1,1);}}exports.request_filter_indexes=request_filter_indexes;function request_indexes(ptr,query){let deferred2_0;let deferred2_1;try{const ptr0=passStringToWasm0(query,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ret=wasm.request_indexes(ptr,ptr0,len0);deferred2_0=ret[0];deferred2_1=ret[1];return getStringFromWasm0(ret[0],ret[1]);}finally{wasm.__wbindgen_free(deferred2_0,deferred2_1,1);}}exports.request_indexes=request_indexes;function search(ptr,query,original_query,filter,sort,exact,exact_diacritics){let deferred5_0;let deferred5_1;try{const ptr0=passStringToWasm0(query,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ptr1=passStringToWasm0(original_query,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len1=WASM_VECTOR_LEN;const ptr2=passStringToWasm0(filter,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len2=WASM_VECTOR_LEN;const ptr3=passStringToWasm0(sort,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len3=WASM_VECTOR_LEN;const ret=wasm.search(ptr,ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3,exact,exact_diacritics);deferred5_0=ret[0];deferred5_1=ret[1];return getStringFromWasm0(ret[0],ret[1]);}finally{wasm.__wbindgen_free(deferred5_0,deferred5_1,1);}}exports.search=search;function set_ranking_weights(ptr,weights){const ptr0=passStringToWasm0(weights,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ret=wasm.set_ranking_weights(ptr,ptr0,len0);return ret>>>0;}exports.set_ranking_weights=set_ranking_weights;function __wbg_get_imports(){const import0={__proto__:null,__wbindgen_init_externref_table:function(){const table=wasm.__wbindgen_externrefs;const offset=table.grow(4);table.set(0,undefined);table.set(offset+0,undefined);table.set(offset+1,null);table.set(offset+2,true);table.set(offset+3,false);},};return{__proto__:null,"./pagefind_web_bg.js":import0,};}function getStringFromWasm0(ptr,len){ptr=ptr>>>0;return decodeText(ptr,len);}let cachedUint8ArrayMemory0=null;function getUint8ArrayMemory0(){if(cachedUint8ArrayMemory0===null||cachedUint8ArrayMemory0.byteLength===0){cachedUint8ArrayMemory0=new Uint8Array(wasm.memory.buffer);}return cachedUint8ArrayMemory0;}function passArray8ToWasm0(arg,malloc){const ptr=malloc(arg.length*1,1)>>>0;getUint8ArrayMemory0().set(arg,ptr/1);WASM_VECTOR_LEN=arg.length;return ptr;}function passStringToWasm0(arg,malloc,realloc){if(realloc===undefined){const buf=cachedTextEncoder.encode(arg);const ptr=malloc(buf.length,1)>>>0;getUint8ArrayMemory0().subarray(ptr,ptr+buf.length).set(buf);WASM_VECTOR_LEN=buf.length;return ptr;}let len=arg.length;let ptr=malloc(len,1)>>>0;const mem=getUint8ArrayMemory0();let offset=0;for(;offset<len;Line truncated
|
||||
const pagefind_version="1.6.0";let wasm_bindgen=(function(exports){let script_src;if(typeof document!=='undefined'&&document.currentScript!==null){script_src=new URL("UNHANDLED",location.href).toString();}function add_synthetic_filter(ptr,filter){const ptr0=passStringToWasm0(filter,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ret=wasm.add_synthetic_filter(ptr,ptr0,len0);return ret>>>0;}exports.add_synthetic_filter=add_synthetic_filter;function enter_playground_mode(ptr){const ret=wasm.enter_playground_mode(ptr);return ret>>>0;}exports.enter_playground_mode=enter_playground_mode;function filters(ptr){let deferred1_0;let deferred1_1;try{const ret=wasm.filters(ptr);deferred1_0=ret[0];deferred1_1=ret[1];return getStringFromWasm0(ret[0],ret[1]);}finally{wasm.__wbindgen_free(deferred1_0,deferred1_1,1);}}exports.filters=filters;function init_pagefind(metadata_bytes){const ptr0=passArray8ToWasm0(metadata_bytes,wasm.__wbindgen_malloc);const len0=WASM_VECTOR_LEN;const ret=wasm.init_pagefind(ptr0,len0);return ret>>>0;}exports.init_pagefind=init_pagefind;function load_filter_chunk(ptr,chunk_bytes){const ptr0=passArray8ToWasm0(chunk_bytes,wasm.__wbindgen_malloc);const len0=WASM_VECTOR_LEN;const ret=wasm.load_filter_chunk(ptr,ptr0,len0);return ret>>>0;}exports.load_filter_chunk=load_filter_chunk;function load_index_chunk(ptr,chunk_bytes){const ptr0=passArray8ToWasm0(chunk_bytes,wasm.__wbindgen_malloc);const len0=WASM_VECTOR_LEN;const ret=wasm.load_index_chunk(ptr,ptr0,len0);return ret>>>0;}exports.load_index_chunk=load_index_chunk;function request_all_filter_indexes(ptr){let deferred1_0;let deferred1_1;try{const ret=wasm.request_all_filter_indexes(ptr);deferred1_0=ret[0];deferred1_1=ret[1];return getStringFromWasm0(ret[0],ret[1]);}finally{wasm.__wbindgen_free(deferred1_0,deferred1_1,1);}}exports.request_all_filter_indexes=request_all_filter_indexes;function request_filter_indexes(ptr,filters){let deferred2_0;let deferred2_1;try{const ptr0=passStringToWasm0(filters,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ret=wasm.request_filter_indexes(ptr,ptr0,len0);deferred2_0=ret[0];deferred2_1=ret[1];return getStringFromWasm0(ret[0],ret[1]);}finally{wasm.__wbindgen_free(deferred2_0,deferred2_1,1);}}exports.request_filter_indexes=request_filter_indexes;function request_indexes(ptr,query){let deferred2_0;let deferred2_1;try{const ptr0=passStringToWasm0(query,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ret=wasm.request_indexes(ptr,ptr0,len0);deferred2_0=ret[0];deferred2_1=ret[1];return getStringFromWasm0(ret[0],ret[1]);}finally{wasm.__wbindgen_free(deferred2_0,deferred2_1,1);}}exports.request_indexes=request_indexes;function search(ptr,query,original_query,filter,sort,exact,exact_diacritics){let deferred5_0;let deferred5_1;try{const ptr0=passStringToWasm0(query,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ptr1=passStringToWasm0(original_query,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len1=WASM_VECTOR_LEN;const ptr2=passStringToWasm0(filter,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len2=WASM_VECTOR_LEN;const ptr3=passStringToWasm0(sort,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len3=WASM_VECTOR_LEN;const ret=wasm.search(ptr,ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3,exact,exact_diacritics);deferred5_0=ret[0];deferred5_1=ret[1];return getStringFromWasm0(ret[0],ret[1]);}finally{wasm.__wbindgen_free(deferred5_0,deferred5_1,1);}}exports.search=search;function set_ranking_weights(ptr,weights){const ptr0=passStringToWasm0(weights,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ret=wasm.set_ranking_weights(ptr,ptr0,len0);return ret>>>0;}exports.set_ranking_weights=set_ranking_weights;function __wbg_get_imports(){const import0={__proto__:null,__wbindgen_init_externref_table:function(){const table=wasm.__wbindgen_externrefs;const offset=table.grow(4);table.set(0,undefined);table.set(offset+0,undefined);table.set(offset+1,null);table.set(offset+2,true);table.set(offset+3,false);},};return{__proto__:null,"./pagefind_web_bg.js":import0,};}function getStringFromWasm0(ptr,len){return decodeText(ptr>>>0,len);}let cachedUint8ArrayMemory0=null;function getUint8ArrayMemory0(){if(cachedUint8ArrayMemory0===null||cachedUint8ArrayMemory0.byteLength===0){cachedUint8ArrayMemory0=new Uint8Array(wasm.memory.buffer);}return cachedUint8ArrayMemory0;}function passArray8ToWasm0(arg,malloc){const ptr=malloc(arg.length*1,1)>>>0;getUint8ArrayMemory0().set(arg,ptr/1);WASM_VECTOR_LEN=arg.length;return ptr;}function passStringToWasm0(arg,malloc,realloc){if(realloc===undefined){const buf=cachedTextEncoder.encode(arg);const ptr=malloc(buf.length,1)>>>0;getUint8ArrayMemory0().subarray(ptr,ptr+buf.length).set(buf);WASM_VECTOR_LEN=buf.length;return ptr;}let len=arg.length;let ptr=malloc(len,1)>>>0;const mem=getUint8ArrayMemory0();let offset=0;for(;offset<len;offset++Line truncated
|
||||
${e?.toString()}`);throw new Error("Failed to load Pagefind metadata");}}findIndex(language){if(this.languages){let index=this.languages[language];if(index)return index;index=this.languages[language.split("-")[0]];if(index)return index;let topLang=Object.values(this.languages).sort((a,b)=>b.page_count-a.page_count);if(topLang[0])return topLang[0];}throw new Error("Pagefind Error: No language indexes found.");}async loadMeta(index){try{let compressed_resp=await this.throttledFetch(`${this.basePath}pagefind.${index}.pf_meta`);let compressed_meta=await compressed_resp.arrayBuffer();this.searchMeta=this.decompress(new Uint8Array(compressed_meta),"Pagefind metadata");}catch(e){console.error(`Failed to load the meta index:
|
||||
${e?.toString()}`);}}async loadWasm(language){try{const wasm_url=`${this.basePath}wasm.${language}.pagefind`;let compressed_resp=await this.throttledFetch(wasm_url);let compressed_wasm=await compressed_resp.arrayBuffer();const final_wasm=this.decompress(new Uint8Array(compressed_wasm),"Pagefind WebAssembly");if(!final_wasm){throw new Error("No WASM after decompression");}this.wasm=await this.backend({module_or_path:final_wasm});}catch(e){console.error(`Failed to load the Pagefind WASM:
|
||||
${e?.toString()}`);throw new Error(`Failed to load the Pagefind WASM:
|
||||
${e?.toString()}`);}}async _loadGenericChunk(url,method){try{let compressed_resp=await this.throttledFetch(url);let compressed_chunk=await compressed_resp.arrayBuffer();let chunk=this.decompress(new Uint8Array(compressed_chunk),url);let ptr=await this.getPtr();this.raw_ptr=this.backend[method](ptr,chunk);}catch(e){console.error(`Failed to load the index chunk ${url}:
|
||||
${e?.toString()}`);}}async loadChunk(hash){if(!this.loaded_chunks[hash]){const url=`${this.basePath}index/${hash}.pf_index`;this.loaded_chunks[hash]=this._loadGenericChunk(url,"load_index_chunk");}return await this.loaded_chunks[hash];}async loadFilterChunk(hash){if(!this.loaded_filters[hash]){const url=`${this.basePath}filter/${hash}.pf_filter`;this.loaded_filters[hash]=this._loadGenericChunk(url,"load_filter_chunk");}return await this.loaded_filters[hash];}async _loadFragment(hash){let compressed_resp=await this.throttledFetch(`${this.basePath}fragment/${hash}.pf_fragment`);let compressed_fragment=await compressed_resp.arrayBuffer();let fragment=this.decompress(new Uint8Array(compressed_fragment),`Fragment ${hash}`);return JSON.parse(new TextDecoder().decode(fragment));}async loadFragment(hash,weighted_locations=[],search_term){if(!this.loaded_fragments[hash]){this.loaded_fragments[hash]=this._loadFragment(hash);}let fragment=await this.loaded_fragments[hash];fragment.weighted_locations=weighted_locations;fragment.locations=weighted_locations.map((l)=>l.location);if(!fragment.raw_content){fragment.raw_content=fragment.content.replace(/</g,"<").replace(/>/g,">");fragment.content=fragment.content.replace(/\u200B/g,"");}if(!fragment.raw_url){fragment.raw_url=fragment.url;}fragment.url=this.processedUrl(fragment.raw_url,search_term);const excerpt_start=calculate_excerpt_region(weighted_locations,this.excerptLength);const excerpts=build_excerpt(fragment.raw_content,excerpt_start,this.excerptLength,fragment.locations);fragment.excerpt=excerpts.excerpt;fragment.plain_excerpt=excerpts.plain_excerpt;fragment.sub_results=calculate_sub_results(fragment,this.excerptLength);return fragment;}fullUrl(raw){if(/^(https?:)?\/\//.test(raw)){return raw;}return`${this.baseUrl}/${raw}`.replace(/\/+/g,"/").replace(/^(https?:\/)/,"$1/");}processedUrl(url,search_term){const normalized=this.fullUrl(url);if(this.highlightParam===null){return normalized;}let individual_terms=search_term.split(/\s+/);try{let processed=new URL(normalized);for(const term of individual_terms){processed.searchParams.append(this.highlightParam,term);}return processed.toString();}catch(e){try{let processed=new URL(`https://example.com${normalized}`);for(const term of individual_terms){processed.searchParams.append(this.highlightParam,term);}return processed.toString().replace(/^https:\/\/example\.com/,"");}catch(e2){return normalized;}}}async getPtr(){while(this.raw_ptr===null){if(this.initError){throw this.initError;}await asyncSleep(50);}if(!this.raw_ptr){console.error("Pagefind: WASM Error (No pointer)");throw new Error("Pagefind: WASM Error (No pointer)");}return this.raw_ptr;}stringifyFilters(obj={}){return JSON.stringify(obj);}stringifySorts(obj={}){let sorts=Object.entries(obj);for(let[sort,direction]of sorts){if(sorts.length>1){console.warn(`Pagefind was provided multiple sort options in this search, but can only operate on one. Using the ${sort} sort.`);}if(direction!=="asc"&&direction!=="desc"){console.warn(`Pagefind was provided a sort with unknown direction ${direction}. Supported: [asc, desc]`);}return`${sort}:${direction}`;}return``;}async filters(){let ptr=await this.getPtr();let filters=this.backend.request_all_filter_indexes(ptr);let filter_array=JSON.parse(filters);if(Array.isArray(filter_array)){let filter_chunks=filter_array.filter((v)=>v).map((chunk)=>this.loadFilterChunk(chunk));await Promise.all([...filter_chunks]);}ptr=await this.getPtr();let results=this.backend.filters(ptr);return JSON.parse(results);}async preload(term,options={}){await this.search(term,{...options,preload:true});}async search(term,options={}){options={verbose:false,filters:{},sort:{},...options};const log=(str)=>{if(options.verbose)console.log(str);};log(`Starting search on ${this.basePath}`);let start=Date.now();let ptr=await this.getPtr();let filter_only=term===null;term=term??"";let exact_search=/^\s*".+"\s*$/.test(term);if(exact_search){log(`Running an exact search`);}let trueLanguage=null;try{trueLanguage=Intl.getCanonicalLocales(this.loadedLanguage)[0];}catch(err2){}const term_chunks=[];if(trueLanguage&&typeof Intl.Segmenter!=="undefined"){const graphemeSegmenter=new Intl.Segmenter(trueLanguage,{granularity:"grapheme"});if(needsWordSegmentation(trueLanguage)){const wordSegmenter=new Intl.Segmenter(trueLanguage,{granularity:"word"});for(const{segment:word}of wordSegmenter.segment(term)){const wordChunks=[];for(const{segment:grapheme}of graphemeSegmenter.segment(word)){if(this.includeCharacters?.includes(grapheme)){wordChunks.push(grapheme);}else if(!/^\p{Pd}|\p{Pe}|\p{Pf}|\p{Pi}|\p{Po}|\p{Ps}$/u.test(grapheme)){wordChunks.push(grapheme.toLocaleLowerCase());}}if(wordChunks.length>0){term_chunks.push(wordChunks.join(""));}}term=term_chunks.join(" ").replace(/\s{2,}/g," ").trim();}else{for(const{segment:grapheme}of graphemeSegmenter.segment(term)){if(this.includeCharacters?.includes(grapheme)){term_chunks.push(grapheme);}else if(!/^\p{Pd}|\p{Pe}|\p{Pf}|
Line truncated
|
||||
${e?.toString()}`);throw e;}}cachedLoad(cache,hash,load){if(!cache[hash]){cache[hash]=load().catch((e)=>{delete cache[hash];throw e;});}return cache[hash];}async loadChunk(hash){await this.cachedLoad(this.loaded_chunks,hash,()=>this._loadGenericChunk(`${this.basePath}index/${hash}.pf_index`,"load_index_chunk")).catch(()=>{});}async loadFilterChunk(hash){await this.cachedLoad(this.loaded_filters,hash,()=>this._loadGenericChunk(`${this.basePath}filter/${hash}.pf_filter`,"load_filter_chunk")).catch(()=>{});}async _loadFragmentGroup(groupHash){return this.cachedLoad(this.loaded_fragment_groups,groupHash,async()=>{let compressed_resp=await this.throttledFetch(`${this.basePath}fragment/${groupHash}.pf_fragment`);let compressed_fragment=await compressed_resp.arrayBuffer();let fragment=this.decompress(new Uint8Array(compressed_fragment),`Fragment group ${groupHash}`);return JSON.parse(new TextDecoder().decode(fragment));});}async _loadFragment(hash,groupHash=""){if(groupHash){let group=await this._loadFragmentGroup(groupHash);return group[hash];}else{let compressed_resp=await this.throttledFetch(`${this.basePath}fragment/${hash}.pf_fragment`);let compressed_fragment=await compressed_resp.arrayBuffer();let fragment=this.decompress(new Uint8Array(compressed_fragment),`Fragment ${hash}`);return JSON.parse(new TextDecoder().decode(fragment));}}async loadFragment(hash,groupHash="",weighted_locations=[],search_term){let fragment=await this.cachedLoad(this.loaded_fragments,hash,()=>this._loadFragment(hash,groupHash));fragment.weighted_locations=weighted_locations;fragment.locations=weighted_locations.map((l)=>l.location);if(!fragment.raw_content){fragment.raw_content=fragment.content.replace(/</g,"<").replace(/>/g,">");fragment.content=fragment.content.replace(/\u200B/g,"");}if(!fragment.raw_url){fragment.raw_url=fragment.url;}fragment.url=this.processedUrl(fragment.raw_url,search_term);const excerpt_start=calculate_excerpt_region(weighted_locations,this.excerptLength);const excerpts=build_excerpt(fragment.raw_content,excerpt_start,this.excerptLength,fragment.locations,void 0,void 0,this.excerptEllipsis);fragment.excerpt=excerpts.excerpt;fragment.plain_excerpt=excerpts.plain_excerpt;fragment.sub_results=calculate_sub_results(fragment,this.excerptLength,this.excerptEllipsis);return fragment;}fullUrl(raw){if(/^(https?:)?\/\//.test(raw)){return raw;}return`${this.baseUrl}/${raw}`.replace(/\/+/g,"/").replace(/^(https?:\/)/,"$1/");}processedUrl(url,search_term){const normalized=this.fullUrl(url);if(this.highlightParam===null){return normalized;}let individual_terms=search_term.split(/\s+/);try{let processed=new URL(normalized);for(const term of individual_terms){processed.searchParams.append(this.highlightParam,term);}return processed.toString();}catch(e){try{let processed=new URL(`https://example.com${normalized}`);for(const term of individual_terms){processed.searchParams.append(this.highlightParam,term);}return processed.toString().replace(/^https:\/\/example\.com/,"");}catch(e2){return normalized;}}}async getPtr(){while(this.raw_ptr===null){if(this.initError){throw this.initError;}await asyncSleep(50);}if(!this.raw_ptr){console.error("Pagefind: WASM Error (No pointer)");throw new Error("Pagefind: WASM Error (No pointer)");}return this.raw_ptr;}stringifyFilters(obj={}){return JSON.stringify(obj);}stringifySorts(obj={}){let sorts=Object.entries(obj);for(let[sort,direction]of sorts){if(sorts.length>1){console.warn(`Pagefind was provided multiple sort options in this search, but can only operate on one. Using the ${sort} sort.`);}if(direction!=="asc"&&direction!=="desc"){console.warn(`Pagefind was provided a sort with unknown direction ${direction}. Supported: [asc, desc]`);}return`${sort}:${direction}`;}return``;}async filters(){let ptr=await this.getPtr();let filters=this.backend.request_all_filter_indexes(ptr);let filter_array=JSON.parse(filters);if(Array.isArray(filter_array)){let filter_chunks=filter_array.filter((v)=>v).map((chunk)=>this.loadFilterChunk(chunk));await Promise.all([...filter_chunks]);}ptr=await this.getPtr();let results=this.backend.filters(ptr);return JSON.parse(results);}async preload(term,options={}){await this.search(term,{...options,preload:true});}async search(term,options={}){options={verbose:false,filters:{},sort:{},...options};const log=(str)=>{if(options.verbose)console.log(str);};log(`Starting search on ${this.basePath}`);let start=Date.now();let ptr=await this.getPtr();let filter_only=term===null;term=term??"";let exact_search=/^\s*".+"\s*$/.test(term);if(exact_search){log(`Running an exact search`);}let trueLanguage=null;try{trueLanguage=Intl.getCanonicalLocales(this.loadedLanguage)[0];}catch(err2){}const term_chunks=[];if(trueLanguage&&typeof Intl.Segmenter!=="undefined"){const graphemeSegmenter=new Intl.Segmenter(trueLanguage,{granularity:"grapheme"});if(needsWordSegmentation(trueLanguage)){const wordSegmenter=new Intl.Segmenter(trueLanguage,{granularity:"word"});for(const{segment:wor
Line truncated
|
||||
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
const pagefind_version="1.5.2";let wasm_bindgen=(function(exports){let script_src;if(typeof document!=='undefined'&&document.currentScript!==null){script_src=new URL("UNHANDLED",location.href).toString();}function add_synthetic_filter(ptr,filter){const ptr0=passStringToWasm0(filter,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ret=wasm.add_synthetic_filter(ptr,ptr0,len0);return ret>>>0;}exports.add_synthetic_filter=add_synthetic_filter;function enter_playground_mode(ptr){const ret=wasm.enter_playground_mode(ptr);return ret>>>0;}exports.enter_playground_mode=enter_playground_mode;function filters(ptr){let deferred1_0;let deferred1_1;try{const ret=wasm.filters(ptr);deferred1_0=ret[0];deferred1_1=ret[1];return getStringFromWasm0(ret[0],ret[1]);}finally{wasm.__wbindgen_free(deferred1_0,deferred1_1,1);}}exports.filters=filters;function init_pagefind(metadata_bytes){const ptr0=passArray8ToWasm0(metadata_bytes,wasm.__wbindgen_malloc);const len0=WASM_VECTOR_LEN;const ret=wasm.init_pagefind(ptr0,len0);return ret>>>0;}exports.init_pagefind=init_pagefind;function load_filter_chunk(ptr,chunk_bytes){const ptr0=passArray8ToWasm0(chunk_bytes,wasm.__wbindgen_malloc);const len0=WASM_VECTOR_LEN;const ret=wasm.load_filter_chunk(ptr,ptr0,len0);return ret>>>0;}exports.load_filter_chunk=load_filter_chunk;function load_index_chunk(ptr,chunk_bytes){const ptr0=passArray8ToWasm0(chunk_bytes,wasm.__wbindgen_malloc);const len0=WASM_VECTOR_LEN;const ret=wasm.load_index_chunk(ptr,ptr0,len0);return ret>>>0;}exports.load_index_chunk=load_index_chunk;function request_all_filter_indexes(ptr){let deferred1_0;let deferred1_1;try{const ret=wasm.request_all_filter_indexes(ptr);deferred1_0=ret[0];deferred1_1=ret[1];return getStringFromWasm0(ret[0],ret[1]);}finally{wasm.__wbindgen_free(deferred1_0,deferred1_1,1);}}exports.request_all_filter_indexes=request_all_filter_indexes;function request_filter_indexes(ptr,filters){let deferred2_0;let deferred2_1;try{const ptr0=passStringToWasm0(filters,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ret=wasm.request_filter_indexes(ptr,ptr0,len0);deferred2_0=ret[0];deferred2_1=ret[1];return getStringFromWasm0(ret[0],ret[1]);}finally{wasm.__wbindgen_free(deferred2_0,deferred2_1,1);}}exports.request_filter_indexes=request_filter_indexes;function request_indexes(ptr,query){let deferred2_0;let deferred2_1;try{const ptr0=passStringToWasm0(query,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ret=wasm.request_indexes(ptr,ptr0,len0);deferred2_0=ret[0];deferred2_1=ret[1];return getStringFromWasm0(ret[0],ret[1]);}finally{wasm.__wbindgen_free(deferred2_0,deferred2_1,1);}}exports.request_indexes=request_indexes;function search(ptr,query,original_query,filter,sort,exact,exact_diacritics){let deferred5_0;let deferred5_1;try{const ptr0=passStringToWasm0(query,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ptr1=passStringToWasm0(original_query,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len1=WASM_VECTOR_LEN;const ptr2=passStringToWasm0(filter,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len2=WASM_VECTOR_LEN;const ptr3=passStringToWasm0(sort,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len3=WASM_VECTOR_LEN;const ret=wasm.search(ptr,ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3,exact,exact_diacritics);deferred5_0=ret[0];deferred5_1=ret[1];return getStringFromWasm0(ret[0],ret[1]);}finally{wasm.__wbindgen_free(deferred5_0,deferred5_1,1);}}exports.search=search;function set_ranking_weights(ptr,weights){const ptr0=passStringToWasm0(weights,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ret=wasm.set_ranking_weights(ptr,ptr0,len0);return ret>>>0;}exports.set_ranking_weights=set_ranking_weights;function __wbg_get_imports(){const import0={__proto__:null,__wbindgen_init_externref_table:function(){const table=wasm.__wbindgen_externrefs;const offset=table.grow(4);table.set(0,undefined);table.set(offset+0,undefined);table.set(offset+1,null);table.set(offset+2,true);table.set(offset+3,false);},};return{__proto__:null,"./pagefind_web_bg.js":import0,};}function getStringFromWasm0(ptr,len){ptr=ptr>>>0;return decodeText(ptr,len);}let cachedUint8ArrayMemory0=null;function getUint8ArrayMemory0(){if(cachedUint8ArrayMemory0===null||cachedUint8ArrayMemory0.byteLength===0){cachedUint8ArrayMemory0=new Uint8Array(wasm.memory.buffer);}return cachedUint8ArrayMemory0;}function passArray8ToWasm0(arg,malloc){const ptr=malloc(arg.length*1,1)>>>0;getUint8ArrayMemory0().set(arg,ptr/1);WASM_VECTOR_LEN=arg.length;return ptr;}function passStringToWasm0(arg,malloc,realloc){if(realloc===undefined){const buf=cachedTextEncoder.encode(arg);const ptr=malloc(buf.length,1)>>>0;getUint8ArrayMemory0().subarray(ptr,ptr+buf.length).set(buf);WASM_VECTOR_LEN=buf.length;return ptr;}let len=arg.length;let ptr=malloc(len,1)>>>0;const mem=getUint8ArrayMemory0();let offset=0;for(;offset<len;Line truncated
|
||||
const pagefind_version="1.6.0";let wasm_bindgen=(function(exports){let script_src;if(typeof document!=='undefined'&&document.currentScript!==null){script_src=new URL("UNHANDLED",location.href).toString();}function add_synthetic_filter(ptr,filter){const ptr0=passStringToWasm0(filter,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ret=wasm.add_synthetic_filter(ptr,ptr0,len0);return ret>>>0;}exports.add_synthetic_filter=add_synthetic_filter;function enter_playground_mode(ptr){const ret=wasm.enter_playground_mode(ptr);return ret>>>0;}exports.enter_playground_mode=enter_playground_mode;function filters(ptr){let deferred1_0;let deferred1_1;try{const ret=wasm.filters(ptr);deferred1_0=ret[0];deferred1_1=ret[1];return getStringFromWasm0(ret[0],ret[1]);}finally{wasm.__wbindgen_free(deferred1_0,deferred1_1,1);}}exports.filters=filters;function init_pagefind(metadata_bytes){const ptr0=passArray8ToWasm0(metadata_bytes,wasm.__wbindgen_malloc);const len0=WASM_VECTOR_LEN;const ret=wasm.init_pagefind(ptr0,len0);return ret>>>0;}exports.init_pagefind=init_pagefind;function load_filter_chunk(ptr,chunk_bytes){const ptr0=passArray8ToWasm0(chunk_bytes,wasm.__wbindgen_malloc);const len0=WASM_VECTOR_LEN;const ret=wasm.load_filter_chunk(ptr,ptr0,len0);return ret>>>0;}exports.load_filter_chunk=load_filter_chunk;function load_index_chunk(ptr,chunk_bytes){const ptr0=passArray8ToWasm0(chunk_bytes,wasm.__wbindgen_malloc);const len0=WASM_VECTOR_LEN;const ret=wasm.load_index_chunk(ptr,ptr0,len0);return ret>>>0;}exports.load_index_chunk=load_index_chunk;function request_all_filter_indexes(ptr){let deferred1_0;let deferred1_1;try{const ret=wasm.request_all_filter_indexes(ptr);deferred1_0=ret[0];deferred1_1=ret[1];return getStringFromWasm0(ret[0],ret[1]);}finally{wasm.__wbindgen_free(deferred1_0,deferred1_1,1);}}exports.request_all_filter_indexes=request_all_filter_indexes;function request_filter_indexes(ptr,filters){let deferred2_0;let deferred2_1;try{const ptr0=passStringToWasm0(filters,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ret=wasm.request_filter_indexes(ptr,ptr0,len0);deferred2_0=ret[0];deferred2_1=ret[1];return getStringFromWasm0(ret[0],ret[1]);}finally{wasm.__wbindgen_free(deferred2_0,deferred2_1,1);}}exports.request_filter_indexes=request_filter_indexes;function request_indexes(ptr,query){let deferred2_0;let deferred2_1;try{const ptr0=passStringToWasm0(query,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ret=wasm.request_indexes(ptr,ptr0,len0);deferred2_0=ret[0];deferred2_1=ret[1];return getStringFromWasm0(ret[0],ret[1]);}finally{wasm.__wbindgen_free(deferred2_0,deferred2_1,1);}}exports.request_indexes=request_indexes;function search(ptr,query,original_query,filter,sort,exact,exact_diacritics){let deferred5_0;let deferred5_1;try{const ptr0=passStringToWasm0(query,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ptr1=passStringToWasm0(original_query,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len1=WASM_VECTOR_LEN;const ptr2=passStringToWasm0(filter,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len2=WASM_VECTOR_LEN;const ptr3=passStringToWasm0(sort,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len3=WASM_VECTOR_LEN;const ret=wasm.search(ptr,ptr0,len0,ptr1,len1,ptr2,len2,ptr3,len3,exact,exact_diacritics);deferred5_0=ret[0];deferred5_1=ret[1];return getStringFromWasm0(ret[0],ret[1]);}finally{wasm.__wbindgen_free(deferred5_0,deferred5_1,1);}}exports.search=search;function set_ranking_weights(ptr,weights){const ptr0=passStringToWasm0(weights,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const len0=WASM_VECTOR_LEN;const ret=wasm.set_ranking_weights(ptr,ptr0,len0);return ret>>>0;}exports.set_ranking_weights=set_ranking_weights;function __wbg_get_imports(){const import0={__proto__:null,__wbindgen_init_externref_table:function(){const table=wasm.__wbindgen_externrefs;const offset=table.grow(4);table.set(0,undefined);table.set(offset+0,undefined);table.set(offset+1,null);table.set(offset+2,true);table.set(offset+3,false);},};return{__proto__:null,"./pagefind_web_bg.js":import0,};}function getStringFromWasm0(ptr,len){return decodeText(ptr>>>0,len);}let cachedUint8ArrayMemory0=null;function getUint8ArrayMemory0(){if(cachedUint8ArrayMemory0===null||cachedUint8ArrayMemory0.byteLength===0){cachedUint8ArrayMemory0=new Uint8Array(wasm.memory.buffer);}return cachedUint8ArrayMemory0;}function passArray8ToWasm0(arg,malloc){const ptr=malloc(arg.length*1,1)>>>0;getUint8ArrayMemory0().set(arg,ptr/1);WASM_VECTOR_LEN=arg.length;return ptr;}function passStringToWasm0(arg,malloc,realloc){if(realloc===undefined){const buf=cachedTextEncoder.encode(arg);const ptr=malloc(buf.length,1)>>>0;getUint8ArrayMemory0().subarray(ptr,ptr+buf.length).set(buf);WASM_VECTOR_LEN=buf.length;return ptr;}let len=arg.length;let ptr=malloc(len,1)>>>0;const mem=getUint8ArrayMemory0();let offset=0;for(;offset<len;offset++Line truncated
|
||||
${e?.toString()}`);throw new Error("Failed to load Pagefind metadata");}}findIndex(language){if(this.languages){let index=this.languages[language];if(index)return index;index=this.languages[language.split("-")[0]];if(index)return index;let topLang=Object.values(this.languages).sort((a,b)=>b.page_count-a.page_count);if(topLang[0])return topLang[0];}throw new Error("Pagefind Error: No language indexes found.");}async loadMeta(index){try{let compressed_resp=await this.throttledFetch(`${this.basePath}pagefind.${index}.pf_meta`);let compressed_meta=await compressed_resp.arrayBuffer();this.searchMeta=this.decompress(new Uint8Array(compressed_meta),"Pagefind metadata");}catch(e){console.error(`Failed to load the meta index:
|
||||
${e?.toString()}`);}}async loadWasm(language){try{const wasm_url=`${this.basePath}wasm.${language}.pagefind`;let compressed_resp=await this.throttledFetch(wasm_url);let compressed_wasm=await compressed_resp.arrayBuffer();const final_wasm=this.decompress(new Uint8Array(compressed_wasm),"Pagefind WebAssembly");if(!final_wasm){throw new Error("No WASM after decompression");}this.wasm=await this.backend({module_or_path:final_wasm});}catch(e){console.error(`Failed to load the Pagefind WASM:
|
||||
${e?.toString()}`);throw new Error(`Failed to load the Pagefind WASM:
|
||||
${e?.toString()}`);}}async _loadGenericChunk(url,method){try{let compressed_resp=await this.throttledFetch(url);let compressed_chunk=await compressed_resp.arrayBuffer();let chunk=this.decompress(new Uint8Array(compressed_chunk),url);let ptr=await this.getPtr();this.raw_ptr=this.backend[method](ptr,chunk);}catch(e){console.error(`Failed to load the index chunk ${url}:
|
||||
${e?.toString()}`);}}async loadChunk(hash){if(!this.loaded_chunks[hash]){const url=`${this.basePath}index/${hash}.pf_index`;this.loaded_chunks[hash]=this._loadGenericChunk(url,"load_index_chunk");}return await this.loaded_chunks[hash];}async loadFilterChunk(hash){if(!this.loaded_filters[hash]){const url=`${this.basePath}filter/${hash}.pf_filter`;this.loaded_filters[hash]=this._loadGenericChunk(url,"load_filter_chunk");}return await this.loaded_filters[hash];}async _loadFragment(hash){let compressed_resp=await this.throttledFetch(`${this.basePath}fragment/${hash}.pf_fragment`);let compressed_fragment=await compressed_resp.arrayBuffer();let fragment=this.decompress(new Uint8Array(compressed_fragment),`Fragment ${hash}`);return JSON.parse(new TextDecoder().decode(fragment));}async loadFragment(hash,weighted_locations=[],search_term){if(!this.loaded_fragments[hash]){this.loaded_fragments[hash]=this._loadFragment(hash);}let fragment=await this.loaded_fragments[hash];fragment.weighted_locations=weighted_locations;fragment.locations=weighted_locations.map((l)=>l.location);if(!fragment.raw_content){fragment.raw_content=fragment.content.replace(/</g,"<").replace(/>/g,">");fragment.content=fragment.content.replace(/\u200B/g,"");}if(!fragment.raw_url){fragment.raw_url=fragment.url;}fragment.url=this.processedUrl(fragment.raw_url,search_term);const excerpt_start=calculate_excerpt_region(weighted_locations,this.excerptLength);const excerpts=build_excerpt(fragment.raw_content,excerpt_start,this.excerptLength,fragment.locations);fragment.excerpt=excerpts.excerpt;fragment.plain_excerpt=excerpts.plain_excerpt;fragment.sub_results=calculate_sub_results(fragment,this.excerptLength);return fragment;}fullUrl(raw){if(/^(https?:)?\/\//.test(raw)){return raw;}return`${this.baseUrl}/${raw}`.replace(/\/+/g,"/").replace(/^(https?:\/)/,"$1/");}processedUrl(url,search_term){const normalized=this.fullUrl(url);if(this.highlightParam===null){return normalized;}let individual_terms=search_term.split(/\s+/);try{let processed=new URL(normalized);for(const term of individual_terms){processed.searchParams.append(this.highlightParam,term);}return processed.toString();}catch(e){try{let processed=new URL(`https://example.com${normalized}`);for(const term of individual_terms){processed.searchParams.append(this.highlightParam,term);}return processed.toString().replace(/^https:\/\/example\.com/,"");}catch(e2){return normalized;}}}async getPtr(){while(this.raw_ptr===null){if(this.initError){throw this.initError;}await asyncSleep(50);}if(!this.raw_ptr){console.error("Pagefind: WASM Error (No pointer)");throw new Error("Pagefind: WASM Error (No pointer)");}return this.raw_ptr;}stringifyFilters(obj={}){return JSON.stringify(obj);}stringifySorts(obj={}){let sorts=Object.entries(obj);for(let[sort,direction]of sorts){if(sorts.length>1){console.warn(`Pagefind was provided multiple sort options in this search, but can only operate on one. Using the ${sort} sort.`);}if(direction!=="asc"&&direction!=="desc"){console.warn(`Pagefind was provided a sort with unknown direction ${direction}. Supported: [asc, desc]`);}return`${sort}:${direction}`;}return``;}async filters(){let ptr=await this.getPtr();let filters2=this.backend.request_all_filter_indexes(ptr);let filter_array=JSON.parse(filters2);if(Array.isArray(filter_array)){let filter_chunks=filter_array.filter((v)=>v).map((chunk)=>this.loadFilterChunk(chunk));await Promise.all([...filter_chunks]);}ptr=await this.getPtr();let results=this.backend.filters(ptr);return JSON.parse(results);}async preload(term,options2={}){await this.search(term,{...options2,preload:true});}async search(term,options2={}){options2={verbose:false,filters:{},sort:{},...options2};const log=(str)=>{if(options2.verbose)console.log(str);};log(`Starting search on ${this.basePath}`);let start=Date.now();let ptr=await this.getPtr();let filter_only=term===null;term=term??"";let exact_search=/^\s*".+"\s*$/.test(term);if(exact_search){log(`Running an exact search`);}let trueLanguage=null;try{trueLanguage=Intl.getCanonicalLocales(this.loadedLanguage)[0];}catch(err2){}const term_chunks=[];if(trueLanguage&&typeof Intl.Segmenter!=="undefined"){const graphemeSegmenter=new Intl.Segmenter(trueLanguage,{granularity:"grapheme"});if(needsWordSegmentation(trueLanguage)){const wordSegmenter=new Intl.Segmenter(trueLanguage,{granularity:"word"});for(const{segment:word}of wordSegmenter.segment(term)){const wordChunks=[];for(const{segment:grapheme}of graphemeSegmenter.segment(word)){if(this.includeCharacters?.includes(grapheme)){wordChunks.push(grapheme);}else if(!/^\p{Pd}|\p{Pe}|\p{Pf}|\p{Pi}|\p{Po}|\p{Ps}$/u.test(grapheme)){wordChunks.push(grapheme.toLocaleLowerCase());}}if(wordChunks.length>0){term_chunks.push(wordChunks.join(""));}}term=term_chunks.join(" ").replace(/\s{2,}/g," ").trim();}else{for(const{segment:grapheme}of graphemeSegmenter.segment(term)){if(this.includeCharacters?.includes(grapheme)){term_chunks.push(grapheme);}else if(!/^\p{Pd}|\p{Pe}
Line truncated
|
||||
${e?.toString()}`);throw e;}}cachedLoad(cache,hash,load){if(!cache[hash]){cache[hash]=load().catch((e)=>{delete cache[hash];throw e;});}return cache[hash];}async loadChunk(hash){await this.cachedLoad(this.loaded_chunks,hash,()=>this._loadGenericChunk(`${this.basePath}index/${hash}.pf_index`,"load_index_chunk")).catch(()=>{});}async loadFilterChunk(hash){await this.cachedLoad(this.loaded_filters,hash,()=>this._loadGenericChunk(`${this.basePath}filter/${hash}.pf_filter`,"load_filter_chunk")).catch(()=>{});}async _loadFragmentGroup(groupHash){return this.cachedLoad(this.loaded_fragment_groups,groupHash,async()=>{let compressed_resp=await this.throttledFetch(`${this.basePath}fragment/${groupHash}.pf_fragment`);let compressed_fragment=await compressed_resp.arrayBuffer();let fragment=this.decompress(new Uint8Array(compressed_fragment),`Fragment group ${groupHash}`);return JSON.parse(new TextDecoder().decode(fragment));});}async _loadFragment(hash,groupHash=""){if(groupHash){let group=await this._loadFragmentGroup(groupHash);return group[hash];}else{let compressed_resp=await this.throttledFetch(`${this.basePath}fragment/${hash}.pf_fragment`);let compressed_fragment=await compressed_resp.arrayBuffer();let fragment=this.decompress(new Uint8Array(compressed_fragment),`Fragment ${hash}`);return JSON.parse(new TextDecoder().decode(fragment));}}async loadFragment(hash,groupHash="",weighted_locations=[],search_term){let fragment=await this.cachedLoad(this.loaded_fragments,hash,()=>this._loadFragment(hash,groupHash));fragment.weighted_locations=weighted_locations;fragment.locations=weighted_locations.map((l)=>l.location);if(!fragment.raw_content){fragment.raw_content=fragment.content.replace(/</g,"<").replace(/>/g,">");fragment.content=fragment.content.replace(/\u200B/g,"");}if(!fragment.raw_url){fragment.raw_url=fragment.url;}fragment.url=this.processedUrl(fragment.raw_url,search_term);const excerpt_start=calculate_excerpt_region(weighted_locations,this.excerptLength);const excerpts=build_excerpt(fragment.raw_content,excerpt_start,this.excerptLength,fragment.locations,void 0,void 0,this.excerptEllipsis);fragment.excerpt=excerpts.excerpt;fragment.plain_excerpt=excerpts.plain_excerpt;fragment.sub_results=calculate_sub_results(fragment,this.excerptLength,this.excerptEllipsis);return fragment;}fullUrl(raw){if(/^(https?:)?\/\//.test(raw)){return raw;}return`${this.baseUrl}/${raw}`.replace(/\/+/g,"/").replace(/^(https?:\/)/,"$1/");}processedUrl(url,search_term){const normalized=this.fullUrl(url);if(this.highlightParam===null){return normalized;}let individual_terms=search_term.split(/\s+/);try{let processed=new URL(normalized);for(const term of individual_terms){processed.searchParams.append(this.highlightParam,term);}return processed.toString();}catch(e){try{let processed=new URL(`https://example.com${normalized}`);for(const term of individual_terms){processed.searchParams.append(this.highlightParam,term);}return processed.toString().replace(/^https:\/\/example\.com/,"");}catch(e2){return normalized;}}}async getPtr(){while(this.raw_ptr===null){if(this.initError){throw this.initError;}await asyncSleep(50);}if(!this.raw_ptr){console.error("Pagefind: WASM Error (No pointer)");throw new Error("Pagefind: WASM Error (No pointer)");}return this.raw_ptr;}stringifyFilters(obj={}){return JSON.stringify(obj);}stringifySorts(obj={}){let sorts=Object.entries(obj);for(let[sort,direction]of sorts){if(sorts.length>1){console.warn(`Pagefind was provided multiple sort options in this search, but can only operate on one. Using the ${sort} sort.`);}if(direction!=="asc"&&direction!=="desc"){console.warn(`Pagefind was provided a sort with unknown direction ${direction}. Supported: [asc, desc]`);}return`${sort}:${direction}`;}return``;}async filters(){let ptr=await this.getPtr();let filters2=this.backend.request_all_filter_indexes(ptr);let filter_array=JSON.parse(filters2);if(Array.isArray(filter_array)){let filter_chunks=filter_array.filter((v)=>v).map((chunk)=>this.loadFilterChunk(chunk));await Promise.all([...filter_chunks]);}ptr=await this.getPtr();let results=this.backend.filters(ptr);return JSON.parse(results);}async preload(term,options2={}){await this.search(term,{...options2,preload:true});}async search(term,options2={}){options2={verbose:false,filters:{},sort:{},...options2};const log=(str)=>{if(options2.verbose)console.log(str);};log(`Starting search on ${this.basePath}`);let start=Date.now();let ptr=await this.getPtr();let filter_only=term===null;term=term??"";let exact_search=/^\s*".+"\s*$/.test(term);if(exact_search){log(`Running an exact search`);}let trueLanguage=null;try{trueLanguage=Intl.getCanonicalLocales(this.loadedLanguage)[0];}catch(err2){}const term_chunks=[];if(trueLanguage&&typeof Intl.Segmenter!=="undefined"){const graphemeSegmenter=new Intl.Segmenter(trueLanguage,{granularity:"grapheme"});if(needsWordSegmentation(trueLanguage)){const wordSegmenter=new Intl.Segmenter(trueLanguage,{granularity:"word"});for(const{seg
Line truncated
|
||||
Binary file not shown.
Binary file not shown.
+6
-1
@@ -9116,8 +9116,13 @@
|
||||
<lastmod>2026-10-09</lastmod>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://kfitz.info/free-sustainable/</loc>
|
||||
<lastmod>2026-11-18</lastmod>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://kfitz.info/feed/feed.xml</loc>
|
||||
<lastmod>2026-10-09</lastmod>
|
||||
<lastmod>2026-11-18</lastmod>
|
||||
</url>
|
||||
</urlset>
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
|
||||
|
||||
<style>.postlist { counter-reset: start-from 7 }
|
||||
<style>.postlist { counter-reset: start-from 8 }
|
||||
/* This is an arbitrary CSS string added to the bundle */
|
||||
/* Defaults */
|
||||
@font-face {
|
||||
@@ -541,6 +541,11 @@ pre[class*="language-diff-"] {
|
||||
|
||||
<ol reversed="" class="postlist">
|
||||
|
||||
<li class="postlist-item">
|
||||
<a href="/free-sustainable/" class="postlist-link">Free and Sustainable</a>
|
||||
<time class="postlist-date" datetime="2026-11-18">November 2026</time>
|
||||
</li>
|
||||
|
||||
<li class="postlist-item">
|
||||
<a href="/in-the-wake/" class="postlist-link">In the Wake</a>
|
||||
<time class="postlist-date" datetime="2026-10-09">October 2026</time>
|
||||
|
||||
@@ -728,6 +728,9 @@ pre[class*="language-diff-"] {
|
||||
<li><a href="/tags/leading/" class="post-tag">leading</a></li>
|
||||
|
||||
|
||||
<li><a href="/tags/sustainability/" class="post-tag">sustainability</a></li>
|
||||
|
||||
|
||||
<li><a href="/tags/page/" class="post-tag">page</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -0,0 +1,564 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Tagged 'sustainability'</title>
|
||||
<meta name="description" content="The long-running and erratically updated blog of Kathleen Fitzpatrick.">
|
||||
<link rel="alternate" href="feed/feed.xml" type="application/atom+xml" title="kfitz">
|
||||
<script async="" src="https://talk.hyvor.com/embed/embed.js" type="module"></script>
|
||||
<link rel="webmention" href="https://webmention.io/kfitz.info/webmention">
|
||||
<link rel="pingback" href="https://webmention.io/kfitz.info/xmlrpc">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<style>.postlist { counter-reset: start-from 2 }
|
||||
/* This is an arbitrary CSS string added to the bundle */
|
||||
/* Defaults */
|
||||
@font-face {
|
||||
font-family: "Atkinson Hyperlegible";
|
||||
src: url('/css/files/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2');
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Atkinson Hyperlegible";
|
||||
font-weight: bold;
|
||||
src: url('/css/files/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2');
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Atkinson Hyperlegible";
|
||||
font-style: italic
|
||||
src: url('/css/files/atkinson-hyperlegible-latin-400-italic.woff2') format('woff2');
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
:root {
|
||||
--font-family: "Atkinson Hyperlegible", -apple-system, system-ui, sans-serif;
|
||||
--font-family-monospace: Consolas, Menlo, Monaco, Andale Mono WT, Andale Mono, Lucida Console, Lucida Sans Typewriter, DejaVu Sans Mono, Bitstream Vera Sans Mono, Liberation Mono, Nimbus Mono L, Courier New, Courier, monospace;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
/* Theme colors */
|
||||
:root {
|
||||
--color-gray-20: #e0e0e0;
|
||||
--color-gray-50: #C0C0C0;
|
||||
--color-gray-90: #333;
|
||||
|
||||
--background-color: #fff;
|
||||
|
||||
--text-color: var(--color-gray-90);
|
||||
--text-color-link: #d61d4a;
|
||||
--text-color-link-active: #853439;
|
||||
--text-color-link-visited: #e8325e;
|
||||
|
||||
--syntax-tab-size: 2;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--color-gray-20: #e0e0e0;
|
||||
--color-gray-50: #C0C0C0;
|
||||
--color-gray-90: #dad8d8;
|
||||
|
||||
/* --text-color is assigned to --color-gray-_ above */
|
||||
--text-color-link: #1493fb;
|
||||
--text-color-link-active: #6969f7;
|
||||
--text-color-link-visited: #a6a6f8;
|
||||
|
||||
--background-color: #15202b;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Global stylesheet */
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@view-transition {
|
||||
navigation: auto;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
padding: 0;
|
||||
margin: 0 auto;
|
||||
font-family: var(--font-family);
|
||||
color: var(--text-color);
|
||||
background-color: var(--background-color);
|
||||
}
|
||||
html {
|
||||
overflow-y: scroll;
|
||||
}
|
||||
body {
|
||||
max-width: 40em;
|
||||
}
|
||||
|
||||
/* https://www.a11yproject.com/posts/how-to-hide-content/ */
|
||||
.visually-hidden {
|
||||
clip: rect(0 0 0 0);
|
||||
clip-path: inset(50%);
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
white-space: nowrap;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
p {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
li {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
a[href] {
|
||||
color: var(--text-color-link);
|
||||
}
|
||||
a[href]:visited {
|
||||
color: var(--text-color-link-visited);
|
||||
}
|
||||
a[href]:hover,
|
||||
a[href]:active {
|
||||
color: var(--text-color-link-active);
|
||||
}
|
||||
|
||||
main,
|
||||
footer {
|
||||
padding: 1rem;
|
||||
}
|
||||
main :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
header {
|
||||
border-bottom: 1px dashed var(--color-gray-20);
|
||||
}
|
||||
header:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
footer {
|
||||
border-top: 1px dashed var(--color-gray-50);
|
||||
}
|
||||
|
||||
.links-nextprev {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: .5em 1em;
|
||||
list-style: "";
|
||||
border-top: 1px dashed var(--color-gray-20);
|
||||
padding: 1em 0;
|
||||
}
|
||||
.links-nextprev > * {
|
||||
flex-grow: 1;
|
||||
}
|
||||
.links-nextprev-next {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
table {
|
||||
margin: 1em 0;
|
||||
}
|
||||
table td,
|
||||
table th {
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
pre,
|
||||
code {
|
||||
font-family: var(--font-family-monospace);
|
||||
}
|
||||
pre:not([class*="language-"]) {
|
||||
margin: .5em 0;
|
||||
line-height: 1.375; /* 22px /16 */
|
||||
-moz-tab-size: var(--syntax-tab-size);
|
||||
-o-tab-size: var(--syntax-tab-size);
|
||||
tab-size: var(--syntax-tab-size);
|
||||
-webkit-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
overflow-x: auto;
|
||||
}
|
||||
code {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
header {
|
||||
display: flex;
|
||||
gap: 1em .5em;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
padding: 1em;
|
||||
}
|
||||
.home-link {
|
||||
font-size: 1.5em; /* 16px /16 */
|
||||
font-weight: 700;
|
||||
margin-right: 2em;
|
||||
}
|
||||
.home-link:link:not(:hover) {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Nav */
|
||||
.nav {
|
||||
display: flex;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.nav-item {
|
||||
display: inline-block;
|
||||
margin-right: 1em;
|
||||
}
|
||||
.nav-item a[href]:not(:hover) {
|
||||
text-decoration: none;
|
||||
}
|
||||
.nav a[href][aria-current="page"] {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Posts list */
|
||||
.postlist {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
padding-left: 1.5rem;
|
||||
}
|
||||
.postlist-item {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: baseline;
|
||||
counter-increment: start-from -1;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.postlist-item:before {
|
||||
display: inline-block;
|
||||
pointer-events: none;
|
||||
content: "" counter(start-from, decimal-leading-zero) ". ";
|
||||
line-height: 100%;
|
||||
text-align: right;
|
||||
margin-left: -1.5rem;
|
||||
}
|
||||
.postlist-date,
|
||||
.postlist-item:before {
|
||||
font-size: 0.8125em; /* 13px /16 */
|
||||
color: var(--color-gray-90);
|
||||
}
|
||||
.postlist-date {
|
||||
word-spacing: -0.5px;
|
||||
}
|
||||
.postlist-link {
|
||||
font-size: 1.1875em; /* 19px /16 */
|
||||
font-weight: 700;
|
||||
flex-basis: calc(100% - 1.5rem);
|
||||
padding-left: .25em;
|
||||
padding-right: .5em;
|
||||
text-underline-position: from-font;
|
||||
text-underline-offset: 0;
|
||||
text-decoration-thickness: 1px;
|
||||
}
|
||||
.postlist-item-active .postlist-link {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Archive list */
|
||||
.archivelist {
|
||||
padding: 0;
|
||||
padding-left: 2.5rem;
|
||||
}
|
||||
.archivelist-item {
|
||||
align-items: baseline;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.archivelist-item::marker {
|
||||
text-align: right;
|
||||
margin-left: -1.5rem;
|
||||
font-size: 0.8125em; /* 13px /16 */
|
||||
color: var(--color-gray-90);
|
||||
}
|
||||
.archivelist-date {
|
||||
font-size: 0.8125em; /* 13px /16 */
|
||||
color: var(--color-gray-90);
|
||||
word-spacing: -0.5px;
|
||||
}
|
||||
.archivelist-link {
|
||||
font-size: 1.1875em; /* 19px /16 */
|
||||
font-weight: 700;
|
||||
flex-basis: calc(100% - 1.5rem);
|
||||
padding-left: .25em;
|
||||
padding-right: .5em;
|
||||
text-underline-position: from-font;
|
||||
text-underline-offset: 0;
|
||||
text-decoration-thickness: 1px;
|
||||
}
|
||||
.archivelist-item-active .archivelist-link {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
/* Tags */
|
||||
.post-tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-transform: capitalize;
|
||||
font-style: italic;
|
||||
}
|
||||
.postlist-item > .post-tag {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
/* Tags list */
|
||||
.post-metadata {
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
gap: .5em;
|
||||
list-style: none;
|
||||
border-top: 1px dashed var(--color-gray-20);
|
||||
border-bottom: 1px dashed var(--color-gray-20);
|
||||
padding: 3px 0px 3px 0px;
|
||||
margin: 0;
|
||||
font-size: .8em;
|
||||
}
|
||||
.post-metadata time {
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
/* Direct Links / Markdown Headers */
|
||||
.header-anchor {
|
||||
text-decoration: none;
|
||||
font-style: normal;
|
||||
font-size: 1em;
|
||||
margin-left: .1em;
|
||||
}
|
||||
a[href].header-anchor,
|
||||
a[href].header-anchor:visited {
|
||||
color: transparent;
|
||||
}
|
||||
a[href].header-anchor:focus,
|
||||
a[href].header-anchor:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
a[href].header-anchor:focus,
|
||||
:hover > a[href].header-anchor {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
h2 + .header-anchor {
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
summary {
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
margin-bottom: .5em;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
display: block;
|
||||
margin-left: 2em;
|
||||
margin-right: 3em;
|
||||
padding-left: 10px;
|
||||
border-left: 10px solid var(--text-color-link);
|
||||
}
|
||||
|
||||
hr.new {
|
||||
border: none;
|
||||
border-top: 1px dashed var(--color-gray-50);
|
||||
}
|
||||
/* Webmention Section */
|
||||
|
||||
.webmentions {
|
||||
display:block;
|
||||
text-align: left;
|
||||
}
|
||||
.webmentions__facepile {
|
||||
display:flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.webmentions__face {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
border-radius: 50%;
|
||||
object-fit: cover;
|
||||
flex: none;
|
||||
}
|
||||
.webmentions__list {
|
||||
list-style-type: none;
|
||||
padding:0;
|
||||
}
|
||||
.webmentions__item {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
/* Single Webmention */
|
||||
|
||||
.webmention {
|
||||
display:block;
|
||||
}
|
||||
.webmention__meta,
|
||||
.webmention__author {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.webmention__meta {
|
||||
margin-bottom:.5rem;
|
||||
}
|
||||
.webmention__author {
|
||||
margin-right:.25rem;
|
||||
}
|
||||
.webmention__author__photo {
|
||||
height: 3rem;
|
||||
width: 3rem;
|
||||
border-radius: 50%;
|
||||
object-fit: cover;
|
||||
margin-right:.5rem;
|
||||
}
|
||||
.webmention__pubdate {
|
||||
font-style: italic;
|
||||
}
|
||||
/* Message Box */
|
||||
.message-box {
|
||||
--color-message-box: #ffc;
|
||||
|
||||
display: block;
|
||||
background-color: var(--color-message-box);
|
||||
color: var(--color-gray-90);
|
||||
padding: 1em 0.625em; /* 16px 10px /16 */
|
||||
}
|
||||
.message-box ol {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.message-box {
|
||||
--color-message-box: #082840;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* New diff- syntax
|
||||
*/
|
||||
|
||||
pre[class*="language-diff-"] {
|
||||
--eleventy-code-padding: 1.25em;
|
||||
padding-left: var(--eleventy-code-padding);
|
||||
padding-right: var(--eleventy-code-padding);
|
||||
}
|
||||
.token.deleted {
|
||||
background-color: hsl(0, 51%, 37%);
|
||||
color: inherit;
|
||||
}
|
||||
.token.inserted {
|
||||
background-color: hsl(126, 31%, 39%);
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* Make the + and - characters unselectable for copy/paste */
|
||||
.token.prefix.unchanged,
|
||||
.token.prefix.inserted,
|
||||
.token.prefix.deleted {
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
.token.prefix.inserted,
|
||||
.token.prefix.deleted {
|
||||
width: var(--eleventy-code-padding);
|
||||
background-color: rgba(0,0,0,.2);
|
||||
}
|
||||
|
||||
/* Optional: full-width background color */
|
||||
.token.inserted:not(.prefix),
|
||||
.token.deleted:not(.prefix) {
|
||||
display: block;
|
||||
margin-left: calc(-1 * var(--eleventy-code-padding));
|
||||
margin-right: calc(-1 * var(--eleventy-code-padding));
|
||||
text-decoration: none; /* override del, ins, mark defaults */
|
||||
color: inherit; /* override del, ins, mark defaults */
|
||||
}</style>
|
||||
</head>
|
||||
<body>
|
||||
<a href="#skip" class="visually-hidden">Skip to main content</a>
|
||||
|
||||
<header>
|
||||
<a href="/" class="home-link">kfitz</a>
|
||||
<nav>
|
||||
<h2 class="visually-hidden" id="top-level-navigation-menu">Top level navigation menu</h2>
|
||||
<ul class="nav">
|
||||
<li class="nav-item"><a href="/">Home</a></li>
|
||||
<li class="nav-item"><a href="/blog/">Archive</a></li>
|
||||
<li class="nav-item"><a href="/about/">About</a></li>
|
||||
<li class="nav-item"><a href="/projects/">Projects</a></li>
|
||||
<li class="nav-item"><a href="/presentations/">Presentations</a></li>
|
||||
<li class="nav-item"><a href="/teaching/">Teaching</a></li>
|
||||
<li class="nav-item"><a href="/feed/feed.xml">Feed</a></li>
|
||||
</ul>
|
||||
<link href="/pagefind/pagefind-component-ui.css" rel="stylesheet">
|
||||
<script src="/pagefind/pagefind-component-ui.js" type="module"></script>
|
||||
<pagefind-searchbox></pagefind-searchbox>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
|
||||
<main id="skip">
|
||||
<heading-anchors>
|
||||
|
||||
<h1 id="tagged-sustainability">Tagged “sustainability”</h1>
|
||||
|
||||
|
||||
|
||||
<ol reversed="" class="postlist">
|
||||
|
||||
<li class="postlist-item">
|
||||
<a href="/free-sustainable/" class="postlist-link">Free and Sustainable</a>
|
||||
<time class="postlist-date" datetime="2026-11-18">November 2026</time>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
<p>See <a href="/tags/">all tags</a>.</p>
|
||||
|
||||
|
||||
</heading-anchors>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<p><em>Built with <a href="https://www.11ty.dev/">Eleventy v3.1.0</a>. All content <a href="https://creativecommons.org/licenses/by/4.0/deed.en">CC BY 4.0</a> if you're human.</em></p><p></p>
|
||||
</footer>
|
||||
|
||||
<script type="module" src="/dist/rJ3_G-2ArF.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user