@artis-lab/cli 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -11
- package/package.json +4 -1
- package/src/bin.js +5 -10
- package/src/index.js +15 -9
- package/src/lib/app.d.ts +3 -0
- package/src/lib/app.js +9 -0
- package/src/lib/args.d.ts +1 -0
- package/src/lib/args.js +5 -3
- package/src/lib/chunk-43WVFZLO.js +104 -0
- package/src/lib/chunk-46DMRA3V.js +141 -0
- package/src/lib/chunk-CCCATRMP.js +591 -0
- package/src/lib/{chunk-OBEJTKCR.js → chunk-CT5TD6L2.js} +9 -5
- package/src/lib/{chunk-KY47KP5E.js → chunk-JYMG2Y6C.js} +1 -1
- package/src/lib/chunk-KJV7R7DE.js +82 -0
- package/src/lib/{chunk-YXGHBN47.js → chunk-PG7WDW5F.js} +599 -305
- package/src/lib/chunk-Q5KBGVKT.js +155 -0
- package/src/lib/{chunk-YAZGW7Y4.js → chunk-QZFIUZXT.js} +256 -83
- package/src/lib/cli.d.ts +44 -23
- package/src/lib/cli.js +15 -9
- package/src/lib/config.d.ts +31 -1
- package/src/lib/config.js +11 -3
- package/src/lib/files.js +1 -1
- package/src/lib/next-actions.d.ts +13 -0
- package/src/lib/next-actions.js +16 -0
- package/src/lib/oauth.d.ts +45 -0
- package/src/lib/oauth.js +18 -0
- package/src/lib/revision-bases.js +2 -2
- package/src/lib/skill-install.d.ts +1 -1
- package/src/lib/skill-install.js +2 -2
- package/src/lib/verify.d.ts +27 -10
- package/src/lib/verify.js +3 -3
- package/src/lib/chunk-QNS7GLAA.js +0 -63
- package/src/lib/chunk-U3ZF6SRR.js +0 -25
- /package/src/lib/{chunk-QDQQASRY.js → chunk-MEPQKMK5.js} +0 -0
|
@@ -1,8 +1,36 @@
|
|
|
1
1
|
// packages/cli/src/lib/verify.ts
|
|
2
|
+
import { randomUUID } from "node:crypto";
|
|
2
3
|
import { createServer } from "node:http";
|
|
3
4
|
|
|
5
|
+
// packages/sdk/src/lib/assets.ts
|
|
6
|
+
var assetLimits = {
|
|
7
|
+
/** One asset. */
|
|
8
|
+
maxFileBytes: 20 * 1024 * 1024,
|
|
9
|
+
maxArtifactBytes: 256 * 1024 * 1024,
|
|
10
|
+
maxArtifactAssets: 1e3,
|
|
11
|
+
maxOwnerBytes: 2 * 1024 * 1024 * 1024,
|
|
12
|
+
/** One upload through MCP, whose body carries the bytes as base64. */
|
|
13
|
+
maxMcpFileBytes: 2 * 1024 * 1024,
|
|
14
|
+
/** Code points kept of an asset's original name. */
|
|
15
|
+
maxNameLength: 255,
|
|
16
|
+
/** A pending upload older than this is reclaimed by the next upload. */
|
|
17
|
+
pendingTtlMs: 60 * 60 * 1e3,
|
|
18
|
+
/** How many leading bytes decide a file's type: the binary signatures
|
|
19
|
+
* need 12, an svg's `<svg` can sit behind a prolog and comments. */
|
|
20
|
+
sniffBytes: 64 * 1024
|
|
21
|
+
};
|
|
22
|
+
function assetResponseCsp(contentType) {
|
|
23
|
+
if (contentType === "image/svg+xml") {
|
|
24
|
+
return "default-src 'none'; style-src 'unsafe-inline'; sandbox";
|
|
25
|
+
}
|
|
26
|
+
if (/^(text\/|application\/json)/.test(contentType)) {
|
|
27
|
+
return "default-src 'none'; sandbox";
|
|
28
|
+
}
|
|
29
|
+
return void 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
4
32
|
// packages/sdk/src/lib/contract.ts
|
|
5
|
-
var
|
|
33
|
+
var pageViewEvents = {
|
|
6
34
|
/** The bridge dispatches it on an annotation's anchor element (bubbling)
|
|
7
35
|
* before it scrolls to that annotation. */
|
|
8
36
|
reveal: "artis:reveal",
|
|
@@ -10,18 +38,18 @@ var pageEvents = {
|
|
|
10
38
|
* after it changed which content is visible. */
|
|
11
39
|
viewChanged: "artis:view-changed"
|
|
12
40
|
};
|
|
13
|
-
var
|
|
41
|
+
var pageViewEventsDocs = `Pages that show only part of their content at a time (tabs, accordions, carousels, slides) can cooperate with review comments through two DOM events. Both work on every page; a page that ignores them still works.
|
|
14
42
|
|
|
15
|
-
- **\`${
|
|
16
|
-
- **\`${
|
|
43
|
+
- **\`${pageViewEvents.reveal}\`**: when a reviewer opens a comment, Artis dispatches a bubbling \`CustomEvent\` on the commented element (for a text comment, the element holding the start of the quote) before scrolling to it, even when that element is hidden. \`event.detail\` is \`{ annotationId: string }\`. Listen on \`document\` and make \`event.target\` visible (switch to its tab, open its \`<details>\`, go to its slide), synchronously or soon after. Artis waits one frame, or for \`${pageViewEvents.viewChanged}\` if it comes first; if the element is still hidden after that frame, it waits up to half a second more for \`${pageViewEvents.viewChanged}\`. Then it scrolls to the element.
|
|
44
|
+
- **\`${pageViewEvents.viewChanged}\`**: dispatch \`document.dispatchEvent(new Event('${pageViewEvents.viewChanged}'))\` after the page changes which content is visible (any cause: the reader's click, a key, a timer, \`${pageViewEvents.reveal}\`). Artis then re-places comment pins at once. Without it, pins move only after a DOM mutation settles (about a second) and not at all for a pure class, attribute or style switch. No \`detail\` is read.
|
|
17
45
|
|
|
18
46
|
Comments on content that is currently not rendered (\`display: none\`, \`visibility: hidden\`, a closed \`<details>\`, \`hidden\`) show no pin until it becomes visible again.`;
|
|
19
47
|
var pageAddressDocs = `In the Artis viewer the page's own \`#fragment\` shows in the viewer's address bar, so a copied link opens the page where the reader was (a slide, a tab, a section), and a fragment the reader types or follows there reaches the page as an ordinary \`hashchange\`.
|
|
20
48
|
|
|
21
|
-
- **Change it with \`history.replaceState\`** (or \`location.replace\`), not by assigning \`location.hash\` or \`pushState\`: the page runs in a frame whose history is the viewer's, so every pushed entry is one more press of Back before the reader leaves. After a \`replaceState\`, which fires no event, dispatch \`${
|
|
49
|
+
- **Change it with \`history.replaceState\`** (or \`location.replace\`), not by assigning \`location.hash\` or \`pushState\`: the page runs in a frame whose history is the viewer's, so every pushed entry is one more press of Back before the reader leaves. After a \`replaceState\`, which fires no event, dispatch \`${pageViewEvents.viewChanged}\` (above) so Artis sees the new fragment.
|
|
22
50
|
- **Leave the \`artis=\` part alone.** The fragment Artis loads the page with ends in \`&artis=\u2026\`, the viewer's configuration. Read and write only the part in front of it, and keep the rest when you write.
|
|
23
51
|
- Only a plain target is mirrored: up to 200 URL fragment characters without \`&\`, \`=\` or \`#\`, such as \`slide-4\` or \`pricing\`. Other fragments still work in the page; the address bar just keeps its previous one.`;
|
|
24
|
-
var
|
|
52
|
+
var pageViewEventsTypes = ` /** \`event.detail\` of \`${pageViewEvents.reveal}\`. */
|
|
25
53
|
interface ArtisRevealDetail {
|
|
26
54
|
readonly annotationId: string;
|
|
27
55
|
}
|
|
@@ -29,13 +57,13 @@ var pageEventsTypes = ` /** \`event.detail\` of \`${pageEvents.reveal}\`. */
|
|
|
29
57
|
interface DocumentEventMap {
|
|
30
58
|
/** Dispatched by Artis on a commented element (bubbling) before it
|
|
31
59
|
* scrolls to it: make \`event.target\` visible. */
|
|
32
|
-
'${
|
|
60
|
+
'${pageViewEvents.reveal}': CustomEvent<ArtisRevealDetail>;
|
|
33
61
|
/** Dispatch it after changing which content is visible. */
|
|
34
|
-
'${
|
|
62
|
+
'${pageViewEvents.viewChanged}': Event;
|
|
35
63
|
}
|
|
36
64
|
|
|
37
65
|
interface HTMLElementEventMap {
|
|
38
|
-
'${
|
|
66
|
+
'${pageViewEvents.reveal}': CustomEvent<ArtisRevealDetail>;
|
|
39
67
|
}`;
|
|
40
68
|
|
|
41
69
|
// packages/slides-format/src/lib/constants.ts
|
|
@@ -101,12 +129,6 @@ var SLIDE_CANVAS = {
|
|
|
101
129
|
"4:3": { width: 1440, height: 1080 },
|
|
102
130
|
margin: 128
|
|
103
131
|
};
|
|
104
|
-
function slideSizeFromMeta(content) {
|
|
105
|
-
return content?.trim() === "4:3" ? "4:3" : "16:9";
|
|
106
|
-
}
|
|
107
|
-
function slideCanvasFromMeta(content) {
|
|
108
|
-
return SLIDE_CANVAS[slideSizeFromMeta(content)];
|
|
109
|
-
}
|
|
110
132
|
var SLIDE_ID_PATTERN = /^[A-Za-z0-9_-]{1,64}$/;
|
|
111
133
|
var GOOGLE_FONTS_STYLESHEET_PREFIX = "https://fonts.googleapis.com/css2?";
|
|
112
134
|
var GOOGLE_FONTS_ORIGINS = [
|
|
@@ -1050,6 +1072,8 @@ var NOT_BOXES = /* @__PURE__ */ new Set([
|
|
|
1050
1072
|
|
|
1051
1073
|
// packages/slides-format/src/lib/issues.ts
|
|
1052
1074
|
var SLIDES_ISSUE_CODES = {
|
|
1075
|
+
// The deck's files (format 2): deck.json and the slide files it lists.
|
|
1076
|
+
"deck-files": "error",
|
|
1053
1077
|
// Markup and document structure.
|
|
1054
1078
|
"malformed-markup": "error",
|
|
1055
1079
|
"no-slides": "error",
|
|
@@ -10145,18 +10169,20 @@ function readSlidesDeckManifest(text) {
|
|
|
10145
10169
|
}
|
|
10146
10170
|
var escapeText = (text) => text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
10147
10171
|
var escapeAttribute = (text) => escapeText(text).replace(/"/g, """);
|
|
10148
|
-
function
|
|
10172
|
+
function composeSlidesDeck(files) {
|
|
10149
10173
|
const read = (filePath) => Object.prototype.hasOwnProperty.call(files, filePath) ? files[filePath] : void 0;
|
|
10150
10174
|
const manifest = readSlidesDeckManifest(read(SLIDES_DECK_FILE));
|
|
10151
|
-
if (!manifest.ok) return manifest;
|
|
10175
|
+
if (!manifest.ok) return { ...manifest, file: SLIDES_DECK_FILE };
|
|
10152
10176
|
const { title, size, fonts, slides } = manifest.value;
|
|
10153
10177
|
const sections = [];
|
|
10154
10178
|
for (const id of slides) {
|
|
10155
|
-
const
|
|
10179
|
+
const file = slideFilePath(id);
|
|
10180
|
+
const source = read(file);
|
|
10156
10181
|
if (source === void 0) {
|
|
10157
10182
|
return {
|
|
10158
10183
|
ok: false,
|
|
10159
|
-
error: `${
|
|
10184
|
+
error: `${file} is missing: ${SLIDES_DECK_FILE} lists slide ${id}.`,
|
|
10185
|
+
file: SLIDES_DECK_FILE
|
|
10160
10186
|
};
|
|
10161
10187
|
}
|
|
10162
10188
|
const opening = /^<section\b[^>]*>/i.exec(source.trim())?.[0];
|
|
@@ -10165,39 +10191,83 @@ function composeSlidesFiles(files) {
|
|
|
10165
10191
|
if (sectionId !== id) {
|
|
10166
10192
|
return {
|
|
10167
10193
|
ok: false,
|
|
10168
|
-
error: `${
|
|
10194
|
+
error: `${file} must be one <section id="${id}"> element.`,
|
|
10195
|
+
file
|
|
10169
10196
|
};
|
|
10170
10197
|
}
|
|
10171
|
-
sections.push(source
|
|
10198
|
+
sections.push({ file, source });
|
|
10199
|
+
}
|
|
10200
|
+
const lines = [];
|
|
10201
|
+
const sources = [];
|
|
10202
|
+
const add = (text, source) => {
|
|
10203
|
+
text.split("\n").forEach((line, index) => {
|
|
10204
|
+
lines.push(line);
|
|
10205
|
+
sources.push(source(index));
|
|
10206
|
+
});
|
|
10207
|
+
};
|
|
10208
|
+
const skeleton = () => null;
|
|
10209
|
+
const deck = () => ({ file: SLIDES_DECK_FILE });
|
|
10210
|
+
add('<!doctype html>\n<html>\n<head>\n<meta charset="utf-8">', skeleton);
|
|
10211
|
+
add(`<title>${escapeText(title)}</title>`, deck);
|
|
10212
|
+
if (size !== "16:9") {
|
|
10213
|
+
add(`<meta name="${SLIDE_SIZE_META_NAME}" content="${size}">`, deck);
|
|
10214
|
+
}
|
|
10215
|
+
for (const href of fonts) {
|
|
10216
|
+
add(`<link rel="stylesheet" href="${escapeAttribute(href)}">`, deck);
|
|
10172
10217
|
}
|
|
10173
10218
|
const css = (read(SLIDES_STYLESHEET_FILE) ?? "").replace(
|
|
10174
10219
|
/<\/style/gi,
|
|
10175
10220
|
"<\\/style"
|
|
10176
10221
|
);
|
|
10177
|
-
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10181
|
-
|
|
10182
|
-
|
|
10183
|
-
|
|
10184
|
-
|
|
10185
|
-
|
|
10186
|
-
|
|
10187
|
-
|
|
10188
|
-
|
|
10189
|
-
|
|
10190
|
-
|
|
10191
|
-
|
|
10192
|
-
|
|
10193
|
-
|
|
10194
|
-
</
|
|
10195
|
-
|
|
10196
|
-
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
|
|
10200
|
-
|
|
10222
|
+
if (css) {
|
|
10223
|
+
const stylesheet = () => ({ file: SLIDES_STYLESHEET_FILE });
|
|
10224
|
+
add("<style>", stylesheet);
|
|
10225
|
+
add(css, (index) => ({ file: SLIDES_STYLESHEET_FILE, line: index + 1 }));
|
|
10226
|
+
add("</style>", stylesheet);
|
|
10227
|
+
}
|
|
10228
|
+
add("</head>\n<body>", skeleton);
|
|
10229
|
+
for (const { file, source } of sections) {
|
|
10230
|
+
const leading = source.slice(0, source.length - source.trimStart().length);
|
|
10231
|
+
const firstLine = leading.split("\n").length;
|
|
10232
|
+
const firstColumn = leading.length - (leading.lastIndexOf("\n") + 1);
|
|
10233
|
+
add(source.trim(), (index) => ({
|
|
10234
|
+
file,
|
|
10235
|
+
line: firstLine + index,
|
|
10236
|
+
columnOffset: index === 0 ? firstColumn : 0
|
|
10237
|
+
}));
|
|
10238
|
+
}
|
|
10239
|
+
add("</body>\n</html>\n", skeleton);
|
|
10240
|
+
return { ok: true, value: { html: lines.join("\n"), lines: sources } };
|
|
10241
|
+
}
|
|
10242
|
+
|
|
10243
|
+
// packages/slides-format/src/lib/check-files.ts
|
|
10244
|
+
function checkSlidesFiles(files) {
|
|
10245
|
+
const composed = composeSlidesDeck(files);
|
|
10246
|
+
if (!composed.ok) {
|
|
10247
|
+
return [
|
|
10248
|
+
{
|
|
10249
|
+
severity: "error",
|
|
10250
|
+
code: "deck-files",
|
|
10251
|
+
message: composed.error,
|
|
10252
|
+
file: composed.file
|
|
10253
|
+
}
|
|
10254
|
+
];
|
|
10255
|
+
}
|
|
10256
|
+
const { html, lines } = composed.value;
|
|
10257
|
+
return checkSlidesDeck(html).map((issue2) => {
|
|
10258
|
+
const { line, column, ...rest } = issue2;
|
|
10259
|
+
const source = line === void 0 ? void 0 : lines[line - 1];
|
|
10260
|
+
if (source?.line !== void 0) {
|
|
10261
|
+
return {
|
|
10262
|
+
...rest,
|
|
10263
|
+
file: source.file,
|
|
10264
|
+
line: source.line,
|
|
10265
|
+
...column === void 0 ? {} : { column: column + (source.columnOffset ?? 0) }
|
|
10266
|
+
};
|
|
10267
|
+
}
|
|
10268
|
+
const file = source?.file ?? (issue2.slide?.id ? slideFilePath(issue2.slide.id) : void 0);
|
|
10269
|
+
return file ? { ...rest, file } : rest;
|
|
10270
|
+
});
|
|
10201
10271
|
}
|
|
10202
10272
|
|
|
10203
10273
|
// packages/cli/src/lib/verify.ts
|
|
@@ -10218,8 +10288,9 @@ function artifactContentSecurityPolicy(origin, sandboxTokens = [], options = {})
|
|
|
10218
10288
|
sandbox.push(token);
|
|
10219
10289
|
}
|
|
10220
10290
|
}
|
|
10221
|
-
const
|
|
10222
|
-
|
|
10291
|
+
const assets = `${origin}/_blob/`;
|
|
10292
|
+
const connectSrc = options.connectSrc && /^https?:\/\/[^\s;,'"]+\/$/.test(options.connectSrc) ? `connect-src ${options.connectSrc} ${assets}; ` : `connect-src ${assets}; `;
|
|
10293
|
+
return `sandbox ${sandbox.join(" ")}; default-src 'none'; script-src 'unsafe-inline' ${origin}/__artis/; style-src ${styleSrc}; img-src data: blob: ${assets}; font-src ${fontSrc} ${assets}; media-src ${assets}; ${connectSrc}form-action 'none'; base-uri 'none'`;
|
|
10223
10294
|
}
|
|
10224
10295
|
var VerifyUnavailableError = class extends Error {
|
|
10225
10296
|
};
|
|
@@ -10237,7 +10308,13 @@ async function launchBrowser() {
|
|
|
10237
10308
|
const attempts = executablePath ? [{ executablePath }] : [{ channel: "chrome" }, { channel: "msedge" }, { channel: "chromium" }];
|
|
10238
10309
|
for (const attempt of attempts) {
|
|
10239
10310
|
try {
|
|
10240
|
-
return await chromium.launch({
|
|
10311
|
+
return await chromium.launch({
|
|
10312
|
+
headless: true,
|
|
10313
|
+
// The page's artifact host, `<uuid>.localhost`, is the loopback
|
|
10314
|
+
// address the server listens on, whatever the system resolver says.
|
|
10315
|
+
args: ["--host-resolver-rules=MAP *.localhost 127.0.0.1"],
|
|
10316
|
+
...attempt
|
|
10317
|
+
});
|
|
10241
10318
|
} catch {
|
|
10242
10319
|
}
|
|
10243
10320
|
}
|
|
@@ -10245,30 +10322,98 @@ async function launchBrowser() {
|
|
|
10245
10322
|
executablePath ? `Could not launch the browser at ARTIS_CHROME_PATH (${executablePath}).` : "artis verify uses the system Google Chrome (or Edge). Install one, or set ARTIS_CHROME_PATH to a Chromium-based browser."
|
|
10246
10323
|
);
|
|
10247
10324
|
}
|
|
10248
|
-
var SLIDES_RUNTIME_PATH = "/__artis/types/slides/
|
|
10249
|
-
|
|
10325
|
+
var SLIDES_RUNTIME_PATH = "/__artis/types/slides/v2/verify.js";
|
|
10326
|
+
var LOCAL_REVISION = "verify";
|
|
10327
|
+
var ASSET_PATH = /^\/_blob\/([0-9a-f-]{36})$/;
|
|
10328
|
+
var FILE_PATH = /^\/r\/([^/]+)\/files\/(.+)$/;
|
|
10329
|
+
async function serveRevision(files, type, assets = { notLoaded: /* @__PURE__ */ new Set() }) {
|
|
10330
|
+
const loaded = /* @__PURE__ */ new Map();
|
|
10331
|
+
const pagePath = `/r/${LOCAL_REVISION}/`;
|
|
10250
10332
|
const server = createServer((request, response) => {
|
|
10251
10333
|
const url = new URL(request.url ?? "/", "http://localhost");
|
|
10252
|
-
const
|
|
10334
|
+
const origin = `http://${request.headers.host}`;
|
|
10335
|
+
const asset = ASSET_PATH.exec(url.pathname);
|
|
10336
|
+
if (asset) {
|
|
10337
|
+
const id = asset[1];
|
|
10338
|
+
if (!assets.load) {
|
|
10339
|
+
assets.notLoaded.add(id);
|
|
10340
|
+
response.writeHead(204).end();
|
|
10341
|
+
return;
|
|
10342
|
+
}
|
|
10343
|
+
let pending = loaded.get(id);
|
|
10344
|
+
if (!pending) {
|
|
10345
|
+
pending = assets.load(id).catch(() => "unchecked");
|
|
10346
|
+
loaded.set(id, pending);
|
|
10347
|
+
}
|
|
10348
|
+
void pending.then((found) => {
|
|
10349
|
+
if (found === "unchecked") {
|
|
10350
|
+
assets.notLoaded.add(id);
|
|
10351
|
+
response.writeHead(204).end();
|
|
10352
|
+
return;
|
|
10353
|
+
}
|
|
10354
|
+
if (!found) {
|
|
10355
|
+
response.writeHead(404).end();
|
|
10356
|
+
return;
|
|
10357
|
+
}
|
|
10358
|
+
const csp = assetResponseCsp(found.contentType);
|
|
10359
|
+
response.writeHead(200, {
|
|
10360
|
+
"content-type": found.contentType,
|
|
10361
|
+
"x-content-type-options": "nosniff",
|
|
10362
|
+
...csp ? { "content-security-policy": csp } : {}
|
|
10363
|
+
});
|
|
10364
|
+
response.end(found.bytes);
|
|
10365
|
+
});
|
|
10366
|
+
return;
|
|
10367
|
+
}
|
|
10253
10368
|
if (type === "slides" && url.pathname === SLIDES_RUNTIME_PATH) {
|
|
10254
10369
|
response.writeHead(200, {
|
|
10255
10370
|
"content-type": "text/javascript; charset=utf-8"
|
|
10256
10371
|
});
|
|
10257
|
-
response.end('"use strict";(()=>{var Xe=["rect","rounded","ellipse","diamond","arrow-right","arrow-left","arrow-up","arrow-down","line"];var Ue="slide-size",gt={"16:9":{width:1920,height:1080},"4:3":{width:1440,height:1080},margin:128};function vt(e){return e?.trim()==="4:3"?"4:3":"16:9"}function je(e){return gt[vt(e)]}var Ot={slidesPerDeck:500,boxesPerSlide:200,divDepth:15,textPerSlide:2e4,inlineMarksPerSlide:100,tableCellsPerSlide:4e3,tableRows:100,tableColumns:24,notesLength:4e3,svgBytes:52*1024};var Ye=`\n@layer artis-slides-base {\n * { margin: 0; }\n body { font-size: 32px; }\n h1, h2, h3 { font-weight: 600; }\n h1 { font-size: 96px; }\n h2 { font-size: 64px; }\n h3 { font-size: 44px; }\n section, section div { display: flow-root; }\n table { border-collapse: collapse; }\n th, td {\n padding: 0.35em 0.6em;\n text-align: left;\n border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent);\n }\n th { font-weight: 600; }\n tr:first-child > th {\n border-bottom-color: color-mix(in srgb, currentColor 60%, transparent);\n }\n x-shape, x-icon, x-connector { display: block; }\n x-shape[kind="rounded"] { border-radius: var(--artis-shape-radius, 16px); }\n x-icon { width: 1em; height: 1em; }\n x-connector { border: 2px solid; }\n .fragment {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.3s ease, visibility 0.3s;\n }\n .fragment.visible { opacity: 1; visibility: inherit; }\n}\n`,xt=`\n --artis-slides-letterbox: #e7e7eb;\n --artis-slides-ui-bg: rgba(250, 250, 252, 0.96);\n --artis-slides-ui-fg: #1f1f24;\n --artis-slides-ui-muted: #6a6a75;\n --artis-slides-ui-line: rgba(0, 0, 0, 0.12);\n --artis-slides-ui-hover: rgba(0, 0, 0, 0.06);\n --artis-slides-accent: #3563e9;`,qe=`\n --artis-slides-letterbox: #17171b;\n --artis-slides-ui-bg: rgba(30, 30, 35, 0.96);\n --artis-slides-ui-fg: #ececf1;\n --artis-slides-ui-muted: #9a9aa6;\n --artis-slides-ui-line: rgba(255, 255, 255, 0.12);\n --artis-slides-ui-hover: rgba(255, 255, 255, 0.08);\n --artis-slides-accent: #7c9dff;`;function Ze(e){let t="html.artis-slides",r=`${t} > body > section`,n=`${t}[data-artis-view="overview"]`,i=`${t}[data-artis-present]`;return`\n${t} {${xt}\n --artis-slides-bar: 44px;\n --artis-slides-notes: 0px;\n --artis-slides-reserved: var(--artis-slides-bar);\n}\n@media (prefers-color-scheme: dark) {\n ${t}:not([data-theme="light"]) {${qe}\n }\n}\n${t}[data-theme="dark"] {${qe}\n}\n${t} {\n height: 100% !important;\n margin: 0 !important;\n padding: 0 !important;\n overflow: hidden !important;\n background: var(--artis-slides-letterbox) !important;\n}\n${t} > body {\n position: relative !important;\n display: block !important;\n box-sizing: border-box !important;\n width: 100% !important;\n height: calc(100vh - var(--artis-slides-reserved)) !important;\n min-height: 0 !important;\n max-height: none !important;\n margin: 0 !important;\n padding: 0 !important;\n overflow: hidden !important;\n background: transparent !important;\n}\n${r} {\n position: absolute !important;\n inset: 0 auto auto 0 !important;\n box-sizing: border-box !important;\n width: var(--artis-slides-width) !important;\n height: var(--artis-slides-height) !important;\n min-width: 0 !important;\n min-height: 0 !important;\n max-width: none !important;\n max-height: none !important;\n margin: 0 !important;\n overflow: hidden !important;\n isolation: isolate !important;\n transform: var(--artis-slides-transform, none) !important;\n transform-origin: 0 0 !important;\n}\n${r}[data-artis-fill] {\n background-color: var(--artis-slides-fill-color) !important;\n background-image: var(--artis-slides-fill-image) !important;\n}\n/* Slides off the stage keep their boxes, so counter(page) still counts\n them, but are visibility:hidden and content-visibility:hidden: nothing\n paints, and the bridge\'s checkVisibility() reads their content as hidden.\n A skipped slide (<section hidden>) keeps its attribute and is not\n rendered at all, so it counts no page, as upstream. It is shown only when\n an annotation reveal lands on it; the base layer\'s display then wins over\n the user agent\'s [hidden] rule. */\n${r}:not([data-artis-shown]) {\n visibility: hidden !important;\n content-visibility: hidden !important;\n pointer-events: none !important;\n}\n${r}[hidden]:not([data-artis-shown]) {\n display: none !important;\n}\n${r} > aside {\n display: none !important;\n}\n${r}[data-artis-leaving] {\n pointer-events: none !important;\n}\n/* Printing: shapes are measured on every slide, so none may be skipped. */\n${t}[data-artis-printing] > body > section:not([hidden]) {\n content-visibility: visible !important;\n}\n${i} {\n --artis-slides-letterbox: #000;\n --artis-slides-reserved: var(--artis-slides-notes);\n}\n${i}[data-artis-idle],\n${i}[data-artis-idle] * {\n cursor: none !important;\n}\n@media (prefers-reduced-motion: reduce) {\n ${r},\n ${r} * {\n animation: none !important;\n transition: none !important;\n }\n}\n${t} x-shape[kind="ellipse"] {\n border-radius: 50% !important;\n}\n${t} x-shape[kind="rect"] {\n border-radius: 0 !important;\n}\n${t} x-shape[data-artis-drawn] {\n background: none !important;\n border-color: transparent !important;\n box-shadow: none !important;\n}\n${t} x-connector {\n border-color: transparent !important;\n pointer-events: none;\n}\n${t} x-connector[x1] {\n position: absolute !important;\n inset: 0 !important;\n width: auto !important;\n height: auto !important;\n box-sizing: border-box !important;\n}\n${n} {\n overflow-y: auto !important;\n}\n${n} > body {\n overflow: visible !important;\n}\n${n} > body > section {\n cursor: pointer;\n box-shadow: 0 0 0 calc(1px / var(--artis-slides-thumb-scale)) var(--artis-slides-ui-line) !important;\n}\n${n} > body > section * {\n pointer-events: none !important;\n}\n${n} > body > section[data-artis-selected] {\n outline: calc(3px / var(--artis-slides-thumb-scale)) solid var(--artis-slides-accent) !important;\n outline-offset: calc(4px / var(--artis-slides-thumb-scale)) !important;\n}\n${t} > [data-artis-slides-controls] {\n position: fixed !important;\n inset: auto 0 0 0 !important;\n height: calc(var(--artis-slides-bar) + var(--artis-slides-notes)) !important;\n display: block !important;\n margin: 0 !important;\n padding: 0 !important;\n z-index: 2147483000 !important;\n pointer-events: none !important;\n}\n/* One slide a page at the canvas size, skipped slides left out, without the\n controls. Every click step shows: the runtime adds .visible before the\n browser prints (beforeprint), whoever starts the print. */\n@page {\n size: ${e.width}px ${e.height}px;\n margin: 0;\n}\n@media print {\n ${t} {\n height: auto !important;\n overflow: visible !important;\n background: none !important;\n }\n ${t} > body {\n height: auto !important;\n overflow: visible !important;\n }\n /* :nth-child(n) twice outranks every screen rule on a slide (off-stage,\n overview, selected), whatever the view when printing starts. */\n ${r}:nth-child(n):nth-child(n) {\n position: relative !important;\n inset: auto !important;\n transform: none !important;\n translate: none !important;\n opacity: 1 !important;\n visibility: visible !important;\n content-visibility: visible !important;\n box-shadow: none !important;\n outline: none !important;\n break-inside: avoid !important;\n print-color-adjust: exact !important;\n -webkit-print-color-adjust: exact !important;\n }\n /* Before each shown slide but the first: no blank page at the end. */\n ${r}:not([hidden]) ~ section:not([hidden]) {\n break-before: page !important;\n }\n ${r}[hidden] {\n display: none !important;\n }\n ${t} > [data-artis-slides-controls] {\n display: none !important;\n }\n}\n`}var Je=`\n:host { all: initial; }\n.bar {\n box-sizing: border-box;\n height: var(--artis-slides-bar);\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n padding: 0 8px;\n background: var(--artis-slides-ui-bg);\n border-top: 1px solid var(--artis-slides-ui-line);\n color: var(--artis-slides-ui-fg);\n font: 500 13px/1 system-ui, -apple-system, "Segoe UI", sans-serif;\n font-variant-numeric: tabular-nums;\n -webkit-user-select: none;\n user-select: none;\n}\nbutton {\n all: unset;\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n border-radius: 6px;\n color: inherit;\n cursor: pointer;\n}\nbutton:hover { background: var(--artis-slides-ui-hover); }\nbutton:focus-visible { outline: 2px solid var(--artis-slides-accent); outline-offset: 1px; }\nbutton:disabled { opacity: 0.35; cursor: default; background: none; }\nbutton[aria-pressed="true"] { color: var(--artis-slides-accent); }\nsvg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }\n.page { min-width: 64px; text-align: center; color: var(--artis-slides-ui-muted); }\n.spacer { width: 12px; }\n.bar { pointer-events: auto; transition: opacity 0.2s ease; }\n.bar.presenting { border-top-color: transparent; }\n.bar.away { opacity: 0; pointer-events: none; }\n.notes {\n box-sizing: border-box;\n height: var(--artis-slides-notes);\n overflow-y: auto;\n padding: 12px 20px 16px;\n background: var(--artis-slides-ui-bg);\n border-top: 1px solid var(--artis-slides-ui-line);\n color: var(--artis-slides-ui-fg);\n font: 400 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;\n pointer-events: auto;\n}\n.notes[hidden] { display: none; }\n.notes p { margin: 0 auto 0.6em; max-width: 72ch; }\n.notes .empty { color: var(--artis-slides-ui-muted); }\n@media (prefers-reduced-motion: reduce) {\n .bar { transition: none; }\n}\n`;var R={previous:\'<svg viewBox="0 0 24 24"><path d="M15 5l-7 7 7 7"/></svg>\',next:\'<svg viewBox="0 0 24 24"><path d="M9 5l7 7-7 7"/></svg>\',notes:\'<svg viewBox="0 0 24 24"><rect x="4.5" y="3.5" width="15" height="17" rx="2"/><path d="M8.5 8.5h7M8.5 12h7M8.5 15.5h4"/></svg>\',overview:\'<svg viewBox="0 0 24 24"><rect x="3.5" y="4.5" width="7" height="6" rx="1"/><rect x="13.5" y="4.5" width="7" height="6" rx="1"/><rect x="3.5" y="13.5" width="7" height="6" rx="1"/><rect x="13.5" y="13.5" width="7" height="6" rx="1"/></svg>\',present:\'<svg viewBox="0 0 24 24"><path d="M4 9V5.5A1.5 1.5 0 0 1 5.5 4H9M15 4h3.5A1.5 1.5 0 0 1 20 5.5V9M20 15v3.5a1.5 1.5 0 0 1-1.5 1.5H15M9 20H5.5A1.5 1.5 0 0 1 4 18.5V15"/></svg>\',stop:\'<svg viewBox="0 0 24 24"><path d="M9 4v3.5A1.5 1.5 0 0 1 7.5 9H4M15 4v3.5A1.5 1.5 0 0 0 16.5 9H20M20 15h-3.5a1.5 1.5 0 0 0-1.5 1.5V20M4 15h3.5A1.5 1.5 0 0 1 9 16.5V20"/></svg>\'};function Qe(e,t){let r=e.createElement("div");r.setAttribute("data-artis-slides-controls","");let n=r.attachShadow({mode:"open"});n.innerHTML=`<style>${Je}</style><div class="bar" role="toolbar" aria-label="Slides"><button type="button" data-action="previous" aria-label="Previous" title="Previous (\\u2190)">${R.previous}</button><span class="page" aria-live="polite"></span><button type="button" data-action="next" aria-label="Next" title="Next (\\u2192)">${R.next}</button><span class="spacer"></span><button type="button" data-action="notes" aria-label="Speaker notes" aria-pressed="false" title="Speaker notes (S)">${R.notes}</button><button type="button" data-action="overview" aria-label="Overview" aria-pressed="false" title="Overview (O)">${R.overview}</button><button type="button" data-action="present" aria-label="Present" aria-pressed="false" title="Present (F)">${R.present}</button></div><div class="notes" role="region" aria-label="Speaker notes" hidden></div>`;let i=c=>n.querySelector(`[data-action="${c}"]`),l=n.querySelector(".bar"),d=n.querySelector(".page"),f=n.querySelector(".notes");i("previous").addEventListener("click",()=>t.previous()),i("next").addEventListener("click",()=>t.next()),i("notes").addEventListener("click",()=>t.toggleNotes()),i("overview").addEventListener("click",()=>t.toggleOverview()),i("present").addEventListener("click",()=>t.togglePresent()),e.documentElement.append(r);let h;return{host:r,update(c){d.textContent=`${c.page>0?c.page:"\\u2013"} / ${c.total}`,i("previous").disabled=c.overview||!c.canPrevious,i("next").disabled=c.overview||!c.canNext,i("notes").disabled=c.overview,i("notes").setAttribute("aria-pressed",String(c.notesOpen)),i("overview").setAttribute("aria-pressed",String(c.overview));let b=i("present");if(b.setAttribute("aria-pressed",String(c.presenting)),b.setAttribute("aria-label",c.presenting?"Stop presenting":"Present"),b.title=c.presenting?"Stop presenting (Esc)":"Present (F)",b.innerHTML=c.presenting?R.stop:R.present,l.classList.toggle("presenting",c.presenting),f.hidden=!c.notesOpen||c.overview,h!==c.notes){if(h=c.notes,f.replaceChildren(),c.notes.length===0){let y=e.createElement("p");y.className="empty",y.textContent="No speaker notes for this slide.",f.append(y)}for(let y of c.notes){let E=e.createElement("p");E.textContent=y,f.append(E)}f.scrollTop=0}},setBarShown(c){l.classList.toggle("away",!c)},isEngaged(){return r.matches(":hover")||n.activeElement!==null}}}function se(e,t,r){let n=t,i=r;switch(e){case"diamond":return[[n/2,0],[n,i/2],[n/2,i],[0,i/2]];case"arrow-right":return te(n,i).map(([l,d])=>[l,d]);case"arrow-left":return te(n,i).map(([l,d])=>[n-l,d]);case"arrow-down":return te(i,n).map(([l,d])=>[d,l]);case"arrow-up":return te(i,n).map(([l,d])=>[d,i-l]);default:return}}var yt=48;function tt(e,t){let r=Math.max(0,Math.min(e,t));return Math.round(Math.min(r*.15,yt)*100)/100}function te(e,t){let r=e*.6,n=t*.25,i=t*.75;return[[0,n],[r,n],[r,0],[e,t/2],[r,t],[r,i],[0,i]]}function F(e){return e.map(([t,r])=>`${et(t)},${et(r)}`).join(" ")}function et(e){return Math.round(e*100)/100}function ae(e,t,r){let[n,i]=t,[l,d]=r;switch(e){case"hv":return[t,[l,i],r];case"vh":return[t,[n,d],r];case"elbow":{let f=(n+l)/2;return[t,[f,i],[f,d],r]}default:return[t,r]}}function B(e,t){let r=(e??"").trim(),n=/^(-?\\d+(?:\\.\\d+)?)(px|%)?$/.exec(r);if(!n)return NaN;let i=Number(n[1]);return n[2]==="%"?i/100*t:i}function le(e,t,r){switch(e){case"tr":return[[t,0],[0,r]];case"bl":return[[0,r],[t,0]];case"br":return[[t,r],[0,0]];default:return[[0,0],[t,r]]}}function de(e){let t=n=>n==="none"||n==="open"||n==="filled"?n:void 0,r=e.head??"end";return{start:t(e.headStart)??(r==="both"?"filled":"none"),end:t(e.headEnd)??(r==="none"?"none":"filled")}}function ce(e,t,r){let n=t[0]-e[0],i=t[1]-e[1],l=Math.hypot(n,i)||1,d=n/l,f=i/l,h=r*.4,c=[t[0]-d*r,t[1]-f*r];return{corners:[t,[c[0]-f*h,c[1]+d*h],[c[0]+f*h,c[1]-d*h]],base:c}}var ue={Activity:\'<polyline points="2.5 12 6.5 12 9.5 5 14.5 19 17.5 12 21.5 12"/>\',Book:\'<path d="M12 6.5C10 5 7 4.5 3 5v13c4-.5 7 0 9 1.5 2-1.5 5-2 9-1.5V5c-4-.5-7 0-9 1.5z"/><path d="M12 6.5v13"/>\',Chart:\'<path d="M3.5 3.5v17h17"/><path d="M8 16.5v-4"/><path d="M12.5 16.5v-8"/><path d="M17 16.5v-11"/>\',Chat:\'<path d="M5 4.5h14a2 2 0 0 1 2 2v8.5a2 2 0 0 1-2 2h-7.5L6 21v-4H5a2 2 0 0 1-2-2V6.5a2 2 0 0 1 2-2z"/>\',Check:\'<path d="M4.5 12.5l5 5L19.5 7"/>\',CheckCircle:\'<circle cx="12" cy="12" r="9"/><path d="M8 12.3l2.8 2.8 5.2-5.6"/>\',Clock:\'<circle cx="12" cy="12" r="9"/><path d="M12 7v5.2l3.5 2.1"/>\',Cloud:\'<path d="M7 19h10.5a4.5 4.5 0 0 0 .6-8.96A6 6 0 0 0 6.4 11.1 4 4 0 0 0 7 19z"/>\',Code:\'<path d="M8.5 6.5L3 12l5.5 5.5"/><path d="M15.5 6.5L21 12l-5.5 5.5"/>\',Database:\'<ellipse cx="12" cy="6" rx="7.5" ry="3"/><path d="M4.5 6v12c0 1.7 3.4 3 7.5 3s7.5-1.3 7.5-3V6"/><path d="M4.5 12c0 1.7 3.4 3 7.5 3s7.5-1.3 7.5-3"/>\',Globe:\'<circle cx="12" cy="12" r="9"/><path d="M3 12h18"/><path d="M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3z"/>\',GraduationCap:\'<path d="M2 9.5L12 4.5l10 5-10 5z"/><path d="M6 11.5v4.8c2.6 2.3 9.4 2.3 12 0v-4.8"/><path d="M22 9.5v5"/>\',Home:\'<path d="M3 11.5L12 4l9 7.5"/><path d="M5.5 9.5V20h4.5v-5.5h4V20h4.5V9.5"/>\',Key:\'<circle cx="8" cy="15.5" r="4"/><path d="M10.9 12.6L19.5 4"/><path d="M15.5 8l2.8 2.8"/><path d="M17.8 5.7l2.4 2.4"/>\',Lightbulb:\'<path d="M9 18h6"/><path d="M10 21h4"/><path d="M12 3a6 6 0 0 0-3.6 10.8c.7.6 1.1 1.3 1.1 2.1v.1h5v-.1c0-.8.4-1.5 1.1-2.1A6 6 0 0 0 12 3z"/>\',Lightning:\'<path d="M13.5 2.5L4.5 14h7l-1 7.5 9-11.5h-7z"/>\',Link:\'<path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1"/><path d="M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1"/>\',Lock:\'<rect x="5" y="10.5" width="14" height="10.5" rx="2"/><path d="M8 10.5V7.5a4 4 0 0 1 8 0v3"/><path d="M12 14.5v2.5"/>\',PaperPlane:\'<path d="M21 3L3 10.5l7 3 3 7.5z"/><path d="M21 3L10 13.5"/>\',Play:\'<path d="M7 4.5l12.5 7.5L7 19.5z"/>\',Search:\'<circle cx="10.5" cy="10.5" r="6.5"/><path d="M15.3 15.3L21 21"/>\',Settings:\'<circle cx="12" cy="12" r="2.8"/><circle cx="12" cy="12" r="6.5"/><path stroke-width="3" d="M12 2.8v2.7M12 18.5v2.7M2.8 12h2.7M18.5 12h2.7M5.5 5.5l1.9 1.9M16.6 16.6l1.9 1.9M5.5 18.5l1.9-1.9M16.6 7.4l1.9-1.9"/>\',Star:\'<polygon points="12 3 14.35 9.26 21.04 9.56 15.8 13.74 17.58 20.19 12 16.5 6.42 20.19 8.2 13.74 2.96 9.56 9.65 9.26"/>\',ThumbsUp:\'<path d="M7 10.5V21H3.5V10.5z"/><path d="M7 10.5l4-7.5c1.5 0 2.5 1 2.5 2.5V9.5H19a2 2 0 0 1 2 2.3l-1.2 7.4A2.2 2.2 0 0 1 17.6 21H7"/>\',Tool:\'<path d="M9.5 8.5l5-5 6 6-5 5z"/><path d="M12.5 11.5L4 20"/>\',Trust:\'<path d="M12 3l8 3v6c0 4.5-3.4 8.2-8 9-4.6-.8-8-4.5-8-9V6z"/><path d="M8.8 12.2l2.2 2.2 4.2-4.4"/>\',Users:\'<circle cx="9" cy="8" r="3.5"/><path d="M2.5 20c0-3.6 2.9-6 6.5-6s6.5 2.4 6.5 6"/><path d="M16 4.6a3.5 3.5 0 0 1 0 6.8"/><path d="M18 14.3c2 .7 3.5 2.6 3.5 5.7"/>\',Verified:\'<polygon points="12 2.5 14.91 4.98 18.72 5.28 19.02 9.09 21.5 12 19.02 14.91 18.72 18.72 14.91 19.02 12 21.5 9.09 19.02 5.28 18.72 4.98 14.91 2.5 12 4.98 9.09 5.28 5.28 9.09 4.98"/><path d="M8.5 12.2l2.4 2.4 4.6-4.8"/>\',Warning:\'<path d="M12 3.5L2.5 20h19z"/><path d="M12 10v4.5"/><path d="M12 17.5v.01"/>\',Wrench:\'<path d="M13.2 4.6A4.8 4.8 0 0 0 11 11L4 18a2.1 2.1 0 0 0 3 3l7-7a4.8 4.8 0 0 0 6.4-2.2L17 10.5 14 10l-.5-3z"/>\'};function pe(e){if(!(!e||!Object.prototype.hasOwnProperty.call(ue,e)))return`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" role="img" aria-label="${e}">${ue[e]}</svg>`}var H="http://www.w3.org/2000/svg",St=Xe,wt=["rect","rounded","ellipse"];function fe(e){if(e.shadowRoot)return e.shadowRoot;try{return e.attachShadow({mode:"open"})}catch{return null}}function nt(e){for(let t of Array.from(e.querySelectorAll("x-icon"))){let r=pe(t.getAttribute("name")),n=r?fe(t):null;!n||!r||(n.innerHTML=`<style>:host{line-height:0}svg{display:block;width:100%;height:100%}</style>${r}`)}}var j=new WeakMap;function q(e,t=!1){for(let r of Array.from(e.querySelectorAll("x-shape")))At(r,t);for(let r of Array.from(e.querySelectorAll("x-connector")))Mt(r,t)}function D(e){let t=parseFloat(e);return Number.isFinite(t)?t:0}function Et(e){if(!e||e==="none")return;let t=0,r=e.length;for(let b=0;b<e.length;b++){let y=e[b];if(y==="(")t++;else if(y===")")t--;else if(y===","&&t===0){r=b;break}}let n=e.slice(0,r).trim();if(/\\binset\\b/.test(n))return;let i=/(rgba?\\([^)]*\\)|hsla?\\([^)]*\\)|#[0-9a-f]{3,8}\\b)/i.exec(n),l=n.replace(i?.[0]??"","").trim().split(/\\s+/).filter(b=>/^-?[\\d.]+(px)?$/.test(b));if(l.length<2)return;let[d,f,h="0px"]=l,c=b=>b.endsWith("px")?b:`${b}px`;return`drop-shadow(${c(d)} ${c(f)} ${c(h)} ${i?.[0]??"currentColor"})`}function At(e,t){let r=e.getAttribute("kind")??"";if(r==="rounded"&&e.style.setProperty("--artis-shape-radius",`${tt(e.offsetWidth,e.offsetHeight)}px`),!St.includes(r)||wt.includes(r))return;e.removeAttribute("data-artis-drawn");let n=getComputedStyle(e),i={backgroundColor:n.backgroundColor,backgroundImage:n.backgroundImage,borderTopColor:n.borderTopColor,borderTopWidth:n.borderTopWidth,borderLeftWidth:n.borderLeftWidth,paddingTop:n.paddingTop,paddingLeft:n.paddingLeft,boxShadow:n.boxShadow},l=e.offsetWidth,d=e.offsetHeight,f=`${l}x${d}|${i.backgroundColor}|${i.backgroundImage}|${i.borderTopColor}|${i.borderTopWidth}|${i.boxShadow}`;if(!l&&!d){j.has(e)&&e.setAttribute("data-artis-drawn","");return}let h=D(i.borderTopWidth),c=D(i.borderLeftWidth),b=h>0?i.borderTopColor:void 0;if(r==="line"){let p=h||2;if(l<=p*2||d<=p*2)return}if(e.setAttribute("data-artis-drawn",""),!t&&j.get(e)===f)return;j.set(e,f);let y=fe(e);if(!y){e.removeAttribute("data-artis-drawn");return}let E=h+D(i.paddingTop),T=c+D(i.paddingLeft),k=Et(i.boxShadow),u=document.createElement("div");u.setAttribute("style",`position:relative;width:${l}px;height:${d}px;margin:${-E}px 0 0 ${-T}px;`+(k?`filter:${k};`:""));let g=document.createElementNS(H,"svg");if(g.setAttribute("width",String(l)),g.setAttribute("height",String(d)),g.setAttribute("viewBox",`0 0 ${l} ${d}`),g.setAttribute("style","position:absolute;inset:0;overflow:visible"),r==="line"){let p=document.createElementNS(H,"line");p.setAttribute("x1","0"),p.setAttribute("y1","0"),p.setAttribute("x2",String(l)),p.setAttribute("y2",String(d)),p.setAttribute("stroke",b??i.backgroundColor),p.setAttribute("stroke-width",String(h||2)),p.setAttribute("stroke-linecap","round"),g.append(p)}else{let p=se(r,l,d)??[],v=document.createElement("div");if(v.setAttribute("style",`position:absolute;inset:0;background-color:${i.backgroundColor};background-image:${i.backgroundImage};clip-path:polygon(${p.map(([x,w])=>`${x}px ${w}px`).join(",")})`),u.append(v),b){let x=document.createElementNS(H,"polygon");x.setAttribute("points",F(p)),x.setAttribute("fill","none"),x.setAttribute("stroke",b),x.setAttribute("stroke-width",String(h)),x.setAttribute("stroke-linejoin","round");let w="artis-shape-clip",A=document.createElementNS(H,"defs"),N=document.createElementNS(H,"clipPath");N.setAttribute("id",w);let P=document.createElementNS(H,"polygon");P.setAttribute("points",F(p)),N.append(P),A.append(N),x.setAttribute("stroke-width",String(h*2)),x.setAttribute("clip-path",`url(#${w})`),g.append(A,x)}}u.append(g),y.replaceChildren(u)}function Mt(e,t){let r=getComputedStyle(e),n=e.offsetWidth,i=e.offsetHeight,l=Math.min(32,D(r.borderTopWidth)||2),d=r.borderTopStyle,f=w=>e.getAttribute(w),h=[n,i,l,d,...["x1","y1","x2","y2","route","from","head","head-start","head-end"].map(w=>f(w)??"")].join("|");if(!n&&!i||!t&&j.get(e)===h)return;let c,b;if(e.hasAttribute("x1")){let w=B(f("x1"),n),A=B(f("y1"),i),N=B(f("x2"),n),P=B(f("y2"),i);if(![w,A,N,P].every(Number.isFinite))return;c=[w,A],b=[N,P]}else[c,b]=le(f("from"),n,i);let y=fe(e);if(!y)return;j.set(e,h);let E=ae(f("route"),c,b),T=de({head:f("head"),headStart:f("head-start"),headEnd:f("head-end")}),k=Math.max(12,l*4.5),u=document.createElementNS(H,"svg");u.setAttribute("width",String(n)),u.setAttribute("height",String(i)),u.setAttribute("style",`display:block;overflow:visible;margin:${-D(r.borderTopWidth)}px 0 0 ${-D(r.borderLeftWidth)}px`);let g=E.map(w=>[...w]),p=[],v=(w,A,N,P)=>{if(w==="none")return;let C=ce(A,N,k);if(w==="filled"){let M=document.createElementNS(H,"polygon");M.setAttribute("points",F(C.corners)),M.setAttribute("fill","currentColor"),p.push(M);let O=P?g.length-1:0;g[O]=[C.base[0],C.base[1]]}else{let M=document.createElementNS(H,"polyline");M.setAttribute("points",F([C.corners[1],C.corners[0],C.corners[2]])),M.setAttribute("fill","none"),M.setAttribute("stroke","currentColor"),M.setAttribute("stroke-width",String(l)),M.setAttribute("stroke-linecap","round"),M.setAttribute("stroke-linejoin","round"),p.push(M)}};E.length>=2&&(v(T.end,E[E.length-2],E[E.length-1],!0),v(T.start,E[1],E[0],!1));let x=document.createElementNS(H,"polyline");x.setAttribute("points",F(g)),x.setAttribute("fill","none"),x.setAttribute("stroke","currentColor"),x.setAttribute("stroke-width",String(l)),x.setAttribute("stroke-linejoin","round"),d==="dashed"?x.setAttribute("stroke-dasharray",`${l*3} ${l*2}`):d==="dotted"&&(x.setAttribute("stroke-dasharray",`0 ${l*2}`),x.setAttribute("stroke-linecap","round")),u.append(x,...p),y.replaceChildren(u)}function me(e){let t=new Map,r=[];return e.forEach((i,l)=>{let d=i===null?NaN:Number(i.trim());if(i!==null&&i.trim()!==""&&Number.isFinite(d)){let f=t.get(d);f?f.push(l):t.set(d,[l])}else r.push([l])}),[...[...t.entries()].sort((i,l)=>i[0]-l[0]).map(([,i])=>i),...r]}function Y(e,t,r,n){let i=r[e.slide]??0,l=Math.min(Math.max(e.step,0),i);if(n===1&&l<i)return{slide:e.slide,step:l+1};if(n===-1&&l>0)return{slide:e.slide,step:l-1};for(let d=e.slide+n;d>=0&&d<t.length;d+=n)if(!t[d])return{slide:d,step:n===1?0:r[d]??0};return{slide:e.slide,step:l}}function he(e,t){return Math.max(e,...t.map(r=>r+1))}function be(e,t,r){return Array.from({length:e},(n,i)=>({visible:r||i<t,current:!r&&i===t-1}))}function Z(e,t,r){for(let n=t+r;n>=0&&n<e.length;n+=r)if(!e[n])return n;return t}function J(e){return e.indexOf(!1)}function ge(e){return e.lastIndexOf(!1)}function ne(e,t){if(t<0||t>=e.length)return J(e);if(!e[t])return t;let r=Z(e,t,1);if(r!==t)return r;let n=Z(e,t,-1);return n!==t?n:-1}function ve(e){return e.filter(t=>!t).length}function re(e,t){if(t<0||t>=e.length||e[t])return 0;let r=0;for(let n=0;n<=t;n++)e[n]||r++;return r}function xe(e,t){if(!Number.isInteger(t)||t<1)return-1;let r=0;for(let n=0;n<e.length;n++)if(!e[n]&&++r===t)return n;return-1}var Tt=/^slide-(\\d+)$/;function Ct(e){try{return decodeURIComponent(e)}catch{return}}function rt(e){return e.replace(/^#/,"").split("&").filter(t=>t!=="")}function oe(e){for(let t of rt(e)){if(t.includes("="))continue;let r=Ct(t);if(r)return r}}function ye(e,t){if(!e)return-1;let r=t.findIndex(i=>i.id===e);if(r>=0)return r;let n=Tt.exec(e);return n?xe(t.map(i=>i.hidden),Number(n[1])):-1}function Se(e,t){return e.id?e.id:`slide-${t}`}function we(e,t){let r=rt(e).filter(n=>n.includes("="));return`#${[encodeURIComponent(t),...r].join("&")}`}function Ee(e,t){let r=e.indexOf("#");return`${r===-1?e:e.slice(0,r)}${t}`}function Ae(e,t){switch(e){case"ArrowRight":case"ArrowDown":case"PageDown":case"n":case"N":return"next";case" ":return t?"previous":"next";case"ArrowLeft":case"ArrowUp":case"PageUp":case"p":case"P":return"previous";case"Home":return"first";case"End":return"last";case"o":case"O":return"overview";case"f":case"F":return"present";case"s":case"S":return"notes";case"Escape":return"escape";default:return}}function Me(e){if(!e.presenting||e.reducedMotion||e.from<0||e.from===e.to)return"none";let t=e.leaving?.trim().toLowerCase();return t==="fade"||t==="push"?t:"none"}function Te(e,t,r,n,i=0){let l=f=>Math.max(1,f-2*i),d=Math.max(0,Math.min(l(e)/r,l(t)/n));return{scale:d,x:(e-r*d)/2,y:(t-n*d)/2}}function Ce(e,t,r,n,i={}){let l=i.gap??24,d=i.padding??24,f=i.thumbWidth??320,h=Math.max(1,e-2*d),c=Math.max(1,Math.min(Math.max(t,1),Math.floor((h+l)/(f+l)))),b=Math.max(1,(h-l*(c-1))/c),y=b/r,E=n*y,T=[],k=0,u=0;for(let p=0;p<t;p++)p>0&&(u===c||i.sectionStarts?.[p])&&(k++,u=0),T.push({x:d+u*(b+l),y:d+k*(E+l)}),u++;let g=t===0?0:k+1;return{columns:c,scale:y,width:b,height:E,cells:T,contentHeight:2*d+g*E+Math.max(0,g-1)*l}}function Le(e,t,r){if(e.length===0)return t;if(r==="left")return Math.max(0,t-1);if(r==="right")return Math.min(e.length-1,t+1);let n=e[t];if(!n)return t;let i=[...new Set(e.map(c=>c.y))].sort((c,b)=>c-b),l=i.indexOf(n.y),d=i[l+(r==="down"?1:-1)];if(d===void 0)return t;let f=t,h=1/0;return e.forEach((c,b)=>{if(c.y!==d)return;let y=Math.abs(c.x-n.x);y<h&&(f=b,h=y)}),f}function $e(e){return e?e.split(/\\n[^\\S\\n]*\\n\\s*/).map(t=>t.replace(/\\s+/g," ").trim()).filter(t=>t!==""):[]}function ke(e){return Math.round(Math.min(240,Math.max(96,e*.28)))}var Ne="artis:view-changed",Pe="artis:reveal";function He(e,t){return!e||e.mode!==t.mode?!0:t.mode==="overview"?!1:e.index!==t.index||e.step!==t.step||e.scale!==t.scale||e.x!==t.x||e.y!==t.y}function Oe(e,t){return e>=0&&e<t?e:-1}var $t=40,kt=450,ot=2500,it=\'a[href], button, input, select, textarea, label, summary, video, audio, [contenteditable=""], [contenteditable="true"], x-embed\';function lt(e){let t=e.defaultView,r=e.body;t&&r&&Nt(e,t,r)}function Nt(e,t,r){let n=Array.from(r.children).filter(o=>o.tagName==="SECTION");if(n.length===0)return;let i=e.documentElement,l=je(e.querySelector(`meta[name="${Ue}"]`)?.getAttribute("content")),d=e.createElement("style");d.textContent=Ye+Ze(l),(e.head??i).append(d),i.style.setProperty("--artis-slides-width",`${l.width}px`),i.style.setProperty("--artis-slides-height",`${l.height}px`);let f=st(t,n);i.classList.add("artis-slides"),at(n,f);for(let o of n)Pt(t,o),Ht(t,o);nt(r);let h=n.map(o=>{let s=Array.from(o.querySelectorAll(".fragment")).filter(a=>!a.closest("aside"));return me(s.map(a=>a.getAttribute("data-fragment-index"))).map(a=>a.map(m=>s[m]))}),c=new Map;h.forEach(o=>o.forEach((s,a)=>{for(let m of s)c.set(m,a)}));let b=h.map(o=>o.length),y=n.map(o=>{let s=Array.from(o.children).filter(a=>a.tagName==="ASIDE");return $e(s[s.length-1]?.textContent)}),E=()=>n.map(o=>({id:o.id,hidden:o.hasAttribute("hidden")})),T=()=>n.map(o=>o.hasAttribute("hidden")),k=()=>t.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1,u=-1,g=0,p="slide",v=!1,x=!1,w=!1,A=0,N,P=[],C,M,O=Qe(e,{previous:()=>z(-1),next:()=>z(1),toggleOverview:()=>X(p==="overview"?"slide":"overview"),toggleNotes:()=>Ve(),togglePresent:()=>ee(!v)});function K(){return n.filter(o=>!o.hasAttribute("hidden"))}function Ie(o){let s=He(N,o);N=o,s&&e.dispatchEvent(new Event(Ne))}function V(o,s,a){let m=h[o]??[];be(m.length,s,a).forEach((S,$)=>{for(let _ of m[$])_.classList.toggle("visible",S.visible),_.classList.toggle("current-fragment",S.current)})}function Q(){n.forEach((o,s)=>V(s,0,!0))}function W(o){if(!o||typeof o.getAnimations!="function")return;let s=v&&!k();for(let a of o.getAnimations({subtree:!0}))if("animationName"in a)try{s?(a.currentTime=0,a.play()):a.effect?.getComputedTiming().endTime!==1/0&&a.finish()}catch{}}function _e(){let o=w&&p==="slide"?ke(t.innerHeight):0,s=(v?0:44)+o;return i.style.setProperty("--artis-slides-notes",`${o}px`),i.style.setProperty("--artis-slides-reserved",`${s}px`),Te(t.innerWidth,Math.max(0,t.innerHeight-s),l.width,l.height,v||t.innerWidth<480?0:16)}function Re(){let o=T(),s={slide:u,step:g},a=v?b:b.map(()=>0),m=Y(s,o,a,-1),S=Y(s,o,a,1);O.update({page:re(o,u),total:ve(o),canPrevious:m.slide!==u||m.step!==g,canNext:S.slide!==u||S.step!==g,overview:p==="overview",presenting:v,notesOpen:w,notes:y[u]??[]})}function L(){if(p==="overview"){De();return}let o=_e(),s=C?.from??-1;n.forEach((a,m)=>{m===u||m===s?(a.setAttribute("data-artis-shown",""),a.style.setProperty("--artis-slides-transform",`translate(${o.x}px, ${o.y}px) scale(${o.scale})`)):(a.removeAttribute("data-artis-shown"),a.style.removeProperty("--artis-slides-transform")),a.toggleAttribute("data-artis-leaving",m===s),a.removeAttribute("data-artis-selected")}),r.style.removeProperty("height"),u>=0&&q(n[u]),Re(),C||Ie({mode:p,index:u,step:v?g:0,...o})}function De(){_e();let o=K(),s=Ce(i.clientWidth||t.innerWidth,o.length,l.width,l.height,{sectionStarts:o.map(a=>a.hasAttribute("data-section"))});P=s.cells,i.style.setProperty("--artis-slides-thumb-scale",String(s.scale)),r.style.setProperty("height",`${s.contentHeight}px`,"important");for(let a of n){let m=o.indexOf(a),S=s.cells[m];if(a.removeAttribute("data-artis-leaving"),!S){a.removeAttribute("data-artis-shown"),a.style.removeProperty("--artis-slides-transform");continue}a.setAttribute("data-artis-shown",""),a.style.setProperty("--artis-slides-transform",`translate(${S.x}px, ${S.y}px) scale(${s.scale})`),a.toggleAttribute("data-artis-selected",m===A),a.setAttribute("aria-label",`Slide ${m+1}`)}for(let a of o)q(a),W(a);Re(),Ie({mode:p,index:u,step:0,scale:0,x:0,y:0})}function X(o){if(o!==p)if(G(),p=o,p==="overview")i.setAttribute("data-artis-view","overview"),Q(),A=Math.max(0,K().indexOf(n[u])),L(),ie();else{i.removeAttribute("data-artis-view");for(let s of n)s.removeAttribute("aria-label");i.scrollTop=0,v&&V(u,g,!1),L(),W(n[u])}}function ie(){K()[A]?.scrollIntoView?.({block:"nearest"})}function G(){let o=C;if(o){C=void 0;for(let s of o.animations)s.cancel();o.done()}}function ut(o,s){let a=n[o],m=n[u];if(s==="none"||typeof m.animate!="function"){L();return}let S={duration:kt,easing:"ease-in-out",fill:"forwards"},$=u>o,_=`${$?"":"-"}${t.innerWidth}px`,bt=`${$?"-":""}${t.innerWidth}px`;C={from:o,animations:[],done:()=>L()},L();let Be=s==="fade"?[a.animate({opacity:[1,0]},S),m.animate({opacity:[0,1]},S)]:[a.animate({translate:["0px 0px",`${bt} 0px`]},S),m.animate({translate:[`${_} 0px`,"0px 0px"]},S)],Ke=C;Ke.animations=Be,Be[1].finished.then(()=>{C===Ke&&G()}).catch(()=>{})}function I(o,s={}){if(o<0||o>=n.length)return;G();let a=u,m=o!==a,S=v?Math.max(0,s.step??0):0,$=S!==g;u=o,g=S,v&&V(o,g,!1),p==="overview"?X("slide"):m?(ut(a,s.animate===!1?"none":Me({leaving:n[a]?.getAttribute("data-transition"),from:a,to:o,presenting:v,reducedMotion:k()})),W(n[o])):$&&L(),s.writeHash!==!1&&pt(o)}function pt(o){let s=n[o],a=Se({id:s.id,hidden:s.hasAttribute("hidden")},re(T(),o)),m=we(t.location.hash,a);if(m!==t.location.hash&&oe(t.location.hash)!==a)try{t.location.replace(Ee(t.location.href,m))}catch{}}function z(o){if(p==="overview")return;let s=T();if(!v){I(Z(s,u,o));return}let a=Y({slide:u,step:g},s,b,o);a.slide!==u?I(a.slide,{step:a.step}):a.step!==g&&(g=a.step,V(u,g,!1),L())}function Ve(){p==="slide"&&(w=!w,G(),L())}function ee(o){o!==v&&(G(),v=o,i.toggleAttribute("data-artis-present",o),g=0,o?(w=!1,ft(),p==="overview"?X("slide"):(V(u,g,!1),L(),W(n[u])),We()):(x&&e.fullscreenElement&&e.exitFullscreen?.().catch(()=>{}),x=!1,clearTimeout(M),i.removeAttribute("data-artis-idle"),O.setBarShown(!0),Q(),L(),W(n[u])))}function ft(){if(!(!e.fullscreenEnabled||e.fullscreenElement))try{i.requestFullscreen?.()?.catch(()=>{})}catch{}}e.addEventListener("fullscreenchange",()=>{if(e.fullscreenElement===i){v?x=!0:e.exitFullscreen?.().catch(()=>{});return}x&&(x=!1,ee(!1))});function We(){v&&(i.removeAttribute("data-artis-idle"),O.setBarShown(!0),clearTimeout(M),M=setTimeout(function o(){if(v){if(O.isEngaged()){M=setTimeout(o,ot);return}i.setAttribute("data-artis-idle",""),O.setBarShown(!1)}},ot))}e.addEventListener("mousemove",We,{passive:!0});function Ge(o){let s=oe(o);if(!s)return-1;let a=ye(s,E());if(a>=0)return ne(T(),a);let S=e.getElementById(s)?.closest("body > section");return S?ne(T(),n.indexOf(S)):-1}t.addEventListener("hashchange",()=>{let o=Ge(t.location.hash);o>=0&&o!==u&&I(o,{writeHash:!1,animate:!1})}),t.addEventListener("resize",()=>L()),e.addEventListener("scroll",o=>{if(p!=="slide")return;let s=o.target===e?i:o.target;s instanceof Element&&(s===i||s===r||s.parentElement===r&&s.tagName==="SECTION")&&(s.scrollTop!==0||s.scrollLeft!==0)&&(s.scrollTop=0,s.scrollLeft=0)},!0),e.addEventListener(Pe,o=>{let s=o.target,a=s instanceof Element?s.closest("body > section"):null,m=Oe(a?n.indexOf(a):-1,n.length);if(m<0)return;let S=[];for(let $=s.closest(".fragment");$&&a?.contains($);$=$.parentElement?.closest(".fragment")??null){let _=c.get($);_!==void 0&&S.push(_)}I(m,{animate:!1,step:he(m===u?g:0,S)})}),e.addEventListener("keydown",o=>{if(o.defaultPrevented||o.ctrlKey||o.metaKey||o.altKey)return;let s=o.target;if(s instanceof Element&&(s===O.host&&(o.key===" "||o.key==="Enter")||s.closest(it)&&s!==r))return;(p==="overview"?ht(o.key):mt(o))&&o.preventDefault()});function mt(o){let s=T();switch(Ae(o.key,o.shiftKey)){case"next":return z(1),!0;case"previous":return z(-1),!0;case"first":return I(J(s)),!0;case"last":return I(ge(s)),!0;case"overview":return X("overview"),!0;case"present":return ee(!v),!0;case"notes":return Ve(),!0;case"escape":return v?(ee(!1),!0):!1;default:return!1}}function ht(o){let s=K(),a={ArrowLeft:"left",ArrowRight:"right",ArrowUp:"up",ArrowDown:"down"};if(o in a){A=Le(P,A,a[o]);for(let m of n)m.toggleAttribute("data-artis-selected",m===s[A]);return ie(),!0}if(o==="Enter"||o===" "){let m=s[A];return m&&I(n.indexOf(m)),!0}return o==="Escape"||o==="o"||o==="O"?(X("slide"),!0):o==="Home"||o==="End"?(A=o==="Home"?0:s.length-1,De(),ie(),!0):!1}e.addEventListener("click",o=>{if(o.button!==0)return;let s=o.target;if(!(s instanceof Element))return;let a=s.closest("body > section");if(!a)return;if(p==="overview"){o.preventDefault(),I(n.indexOf(a));return}if(!v||o.detail>1||s.closest(it))return;let m=t.getSelection();m&&!m.isCollapsed||z(1)});let U;e.addEventListener("touchstart",o=>{let s=o.touches[0];U=o.touches.length===1&&s?{x:s.clientX,y:s.clientY}:void 0},{passive:!0}),e.addEventListener("touchend",o=>{let s=o.changedTouches[0];if(!U||!s||p==="overview")return;let a=s.clientX-U.x,m=s.clientY-U.y;U=void 0,!(Math.abs(a)<$t||Math.abs(a)<Math.abs(m)*1.5)&&z(a<0?1:-1)},{passive:!0}),t.addEventListener("beforeprint",()=>{G(),i.setAttribute("data-artis-printing",""),r.style.removeProperty("height"),Q();for(let o of K()){q(o);for(let s of o.getAnimations?.({subtree:!0})??[])try{s.effect?.getComputedTiming().endTime!==1/0&&s.finish()}catch{}}}),t.addEventListener("afterprint",()=>{i.removeAttribute("data-artis-printing"),v&&p==="slide"&&V(u,g,!1),L()});let ze=()=>{i.classList.remove("artis-slides");let o=st(t,n);i.classList.add("artis-slides"),at(n,o);for(let s of n)s.hasAttribute("data-artis-shown")&&q(s,!0)};new MutationObserver(ze).observe(i,{attributes:!0,attributeFilter:["data-theme"]}),t.matchMedia?.("(prefers-color-scheme: dark)").addEventListener?.("change",ze),Q();let Fe=Ge(t.location.hash);u=Fe>=0?Fe:J(T()),L(),W(n[u]),e.fonts?.ready.then(()=>L()).catch(()=>{})}function st(e,t){for(let h of t)h.removeAttribute("data-artis-fill");let r=h=>h.backgroundImage==="none"&&/^(transparent|rgba\\(0, 0, 0, 0\\))$/.test(h.backgroundColor),n=e.document,i=e.getComputedStyle(n.body),l=e.getComputedStyle(n.documentElement),d=r(i)?r(l)?void 0:l:i,f=d?{color:d.backgroundColor,image:d.backgroundImage}:{color:"#ffffff",image:"none"};return t.map(h=>r(e.getComputedStyle(h))?f:void 0)}function at(e,t){e.forEach((r,n)=>{let i=t[n];if(!i){r.removeAttribute("data-artis-fill");return}r.style.setProperty("--artis-slides-fill-color",i.color),r.style.setProperty("--artis-slides-fill-image",i.image),r.setAttribute("data-artis-fill","")})}function Pt(e,t){for(let r of Array.from(t.children)){if(r.tagName==="ASIDE")continue;let n=e.getComputedStyle(r).position;if(n!=="absolute"&&n!=="fixed")return;e.getComputedStyle(r).zIndex==="auto"&&r.style.setProperty("z-index","-1")}}function Ht(e,t){for(let r of Array.from(t.querySelectorAll("*"))){let n=r.parentElement;if(!n)continue;let i=e.getComputedStyle(n);if(!/flex/.test(i.display)||!i.flexDirection.startsWith("column"))continue;let l=e.getComputedStyle(r);parseFloat(l.flexGrow)>0&&l.minHeight==="auto"&&r.style.setProperty("min-height","0")}}var dt=Symbol.for("artis.types.slides.v1");function ct(){let e=globalThis;typeof document>"u"||e[dt]||(e[dt]=!0,lt(document))}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ct,{once:!0}):ct());})();\n');
|
|
10372
|
+
response.end('"use strict";(()=>{var Te=["rect","rounded","ellipse","diamond","arrow-right","arrow-left","arrow-up","arrow-down","line"];var le=["16:9","4:3"],ee="slide-size",Ct={"16:9":{width:1920,height:1080},"4:3":{width:1440,height:1080},margin:128};function It(e){return e?.trim()==="4:3"?"4:3":"16:9"}function Le(e){return Ct[It(e)]}var $e=/^[A-Za-z0-9_-]{1,64}$/,de="https://fonts.googleapis.com/css2?";var ce={slidesPerDeck:500,boxesPerSlide:200,divDepth:15,textPerSlide:2e4,inlineMarksPerSlide:100,tableCellsPerSlide:4e3,tableRows:100,tableColumns:24,notesLength:4e3,svgBytes:52*1024};var k="deck.json",R="deck.css",te=e=>`slides/${e}.html`,Ce=4;function ne(e){if(e===void 0)return{ok:!1,error:`${k} is missing.`};let t;try{t=JSON.parse(e)}catch{return{ok:!1,error:`${k} is not valid JSON.`}}if(!t||typeof t!="object"||Array.isArray(t))return{ok:!1,error:`${k} must be a JSON object.`};let n=t,r=n.title??"";if(typeof r!="string")return{ok:!1,error:`${k}: title must be a string.`};let o=n.size??"16:9";if(!le.includes(o))return{ok:!1,error:`${k}: size must be ${le.map(c=>`"${c}"`).join(" or ")}.`};let a=n.fonts??[];if(!Array.isArray(a)||a.length>Ce||!a.every(c=>typeof c=="string"&&c.startsWith(de)&&!/[\\s"<>]/.test(c)))return{ok:!1,error:`${k}: fonts must be at most ${Ce} Google Fonts stylesheet URLs (${de}\\u2026).`};let d=n.slides;if(!Array.isArray(d)||d.length===0||d.length>ce.slidesPerDeck)return{ok:!1,error:`${k}: slides must list 1 to ${ce.slidesPerDeck} slide ids.`};let f=new Set;for(let c of d){if(typeof c!="string"||!$e.test(c))return{ok:!1,error:`${k}: ${JSON.stringify(c)} is not a slide id (letters, digits, _ and -, at most 64).`};if(f.has(c))return{ok:!1,error:`${k}: slide ${c} is listed twice.`};f.add(c)}return{ok:!0,value:{title:r,size:o,fonts:a,slides:d}}}var Ie=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),Nt=e=>Ie(e).replace(/"/g,""");function ue(e){let t=Ne(e);return t.ok?{ok:!0,value:t.value.html}:{ok:!1,error:t.error}}function Ne(e){let t=S=>Object.prototype.hasOwnProperty.call(e,S)?e[S]:void 0,n=ne(t(k));if(!n.ok)return{...n,file:k};let{title:r,size:o,fonts:a,slides:d}=n.value,f=[];for(let S of d){let p=te(S),b=t(p);if(b===void 0)return{ok:!1,error:`${p} is missing: ${k} lists slide ${S}.`,file:k};let m=/^<section\\b[^>]*>/i.exec(b.trim())?.[0],v=m&&/\\sid\\s*=\\s*(?:"([^"]*)"|\'([^\']*)\'|([^\\s>]+))/i.exec(m);if((v?v[1]??v[2]??v[3]:void 0)!==S)return{ok:!1,error:`${p} must be one <section id="${S}"> element.`,file:p};f.push({file:p,source:b})}let c=[],u=[],h=(S,p)=>{S.split(`\n`).forEach((b,m)=>{c.push(b),u.push(p(m))})},x=()=>null,w=()=>({file:k});h(`<!doctype html>\n<html>\n<head>\n<meta charset="utf-8">`,x),h(`<title>${Ie(r)}</title>`,w),o!=="16:9"&&h(`<meta name="${ee}" content="${o}">`,w);for(let S of a)h(`<link rel="stylesheet" href="${Nt(S)}">`,w);let M=(t(R)??"").replace(/<\\/style/gi,"<\\\\/style");if(M){let S=()=>({file:R});h("<style>",S),h(M,p=>({file:R,line:p+1})),h("</style>",S)}h(`</head>\n<body>`,x);for(let{file:S,source:p}of f){let b=p.slice(0,p.length-p.trimStart().length),m=b.split(`\n`).length,v=b.length-(b.lastIndexOf(`\n`)+1);h(p.trim(),y=>({file:S,line:m+y,columnOffset:y===0?v:0}))}return h(`</body>\n</html>\n`,x),{ok:!0,value:{html:c.join(`\n`),lines:u}}}var _e=`\n@layer artis-slides-base {\n * { margin: 0; }\n body { font-size: 32px; }\n h1, h2, h3 { font-weight: 600; }\n h1 { font-size: 96px; }\n h2 { font-size: 64px; }\n h3 { font-size: 44px; }\n section, section div { display: flow-root; }\n table { border-collapse: collapse; }\n th, td {\n padding: 0.35em 0.6em;\n text-align: left;\n border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent);\n }\n th { font-weight: 600; }\n tr:first-child > th {\n border-bottom-color: color-mix(in srgb, currentColor 60%, transparent);\n }\n x-shape, x-icon, x-connector { display: block; }\n x-shape[kind="rounded"] { border-radius: var(--artis-shape-radius, 16px); }\n x-icon { width: 1em; height: 1em; }\n x-connector { border: 2px solid; }\n .fragment {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.3s ease, visibility 0.3s;\n }\n .fragment.visible { opacity: 1; visibility: inherit; }\n}\n`,Ot=`\n --artis-slides-letterbox: #e7e7eb;\n --artis-slides-ui-bg: rgba(250, 250, 252, 0.96);\n --artis-slides-ui-fg: #1f1f24;\n --artis-slides-ui-muted: #6a6a75;\n --artis-slides-ui-line: rgba(0, 0, 0, 0.12);\n --artis-slides-ui-hover: rgba(0, 0, 0, 0.06);\n --artis-slides-accent: #3563e9;`,Oe=`\n --artis-slides-letterbox: #17171b;\n --artis-slides-ui-bg: rgba(30, 30, 35, 0.96);\n --artis-slides-ui-fg: #ececf1;\n --artis-slides-ui-muted: #9a9aa6;\n --artis-slides-ui-line: rgba(255, 255, 255, 0.12);\n --artis-slides-ui-hover: rgba(255, 255, 255, 0.08);\n --artis-slides-accent: #7c9dff;`;function Pe(e){let t="html.artis-slides",n=`${t} > body > section`,r=`${t}[data-artis-view="overview"]`,o=`${t}[data-artis-present]`;return`\n${t} {${Ot}\n --artis-slides-bar: 44px;\n --artis-slides-notes: 0px;\n --artis-slides-reserved: var(--artis-slides-bar);\n}\n@media (prefers-color-scheme: dark) {\n ${t}:not([data-theme="light"]) {${Oe}\n }\n}\n${t}[data-theme="dark"] {${Oe}\n}\n${t} {\n height: 100% !important;\n margin: 0 !important;\n padding: 0 !important;\n overflow: hidden !important;\n background: var(--artis-slides-letterbox) !important;\n}\n${t} > body {\n position: relative !important;\n display: block !important;\n box-sizing: border-box !important;\n width: 100% !important;\n height: calc(100vh - var(--artis-slides-reserved)) !important;\n min-height: 0 !important;\n max-height: none !important;\n margin: 0 !important;\n padding: 0 !important;\n overflow: hidden !important;\n background: transparent !important;\n}\n${n} {\n position: absolute !important;\n inset: 0 auto auto 0 !important;\n box-sizing: border-box !important;\n width: var(--artis-slides-width) !important;\n height: var(--artis-slides-height) !important;\n min-width: 0 !important;\n min-height: 0 !important;\n max-width: none !important;\n max-height: none !important;\n margin: 0 !important;\n overflow: hidden !important;\n isolation: isolate !important;\n transform: var(--artis-slides-transform, none) !important;\n transform-origin: 0 0 !important;\n}\n${n}[data-artis-fill] {\n background-color: var(--artis-slides-fill-color) !important;\n background-image: var(--artis-slides-fill-image) !important;\n}\n/* Slides off the stage keep their boxes, so counter(page) still counts\n them, but are visibility:hidden and content-visibility:hidden: nothing\n paints, and the bridge\'s checkVisibility() reads their content as hidden.\n A skipped slide (<section hidden>) keeps its attribute and is not\n rendered at all, so it counts no page, as upstream. It is shown only when\n an annotation reveal lands on it; the base layer\'s display then wins over\n the user agent\'s [hidden] rule. */\n${n}:not([data-artis-shown]) {\n visibility: hidden !important;\n content-visibility: hidden !important;\n pointer-events: none !important;\n}\n${n}[hidden]:not([data-artis-shown]) {\n display: none !important;\n}\n${n} > aside {\n display: none !important;\n}\n${n}[data-artis-leaving] {\n pointer-events: none !important;\n}\n/* Printing: shapes are measured on every slide, so none may be skipped. */\n${t}[data-artis-printing] > body > section:not([hidden]) {\n content-visibility: visible !important;\n}\n${o} {\n --artis-slides-letterbox: #000;\n --artis-slides-reserved: var(--artis-slides-notes);\n}\n${o}[data-artis-idle],\n${o}[data-artis-idle] * {\n cursor: none !important;\n}\n@media (prefers-reduced-motion: reduce) {\n ${n},\n ${n} * {\n animation: none !important;\n transition: none !important;\n }\n}\n${t} x-shape[kind="ellipse"] {\n border-radius: 50% !important;\n}\n${t} x-shape[kind="rect"] {\n border-radius: 0 !important;\n}\n${t} x-shape[data-artis-drawn] {\n background: none !important;\n border-color: transparent !important;\n box-shadow: none !important;\n}\n${t} x-connector {\n border-color: transparent !important;\n pointer-events: none;\n}\n${t} x-connector[x1] {\n position: absolute !important;\n inset: 0 !important;\n width: auto !important;\n height: auto !important;\n box-sizing: border-box !important;\n}\n${r} {\n overflow-y: auto !important;\n}\n${r} > body {\n overflow: visible !important;\n}\n${r} > body > section {\n cursor: pointer;\n box-shadow: 0 0 0 calc(1px / var(--artis-slides-thumb-scale)) var(--artis-slides-ui-line) !important;\n}\n${r} > body > section * {\n pointer-events: none !important;\n}\n${r} > body > section[data-artis-selected] {\n outline: calc(3px / var(--artis-slides-thumb-scale)) solid var(--artis-slides-accent) !important;\n outline-offset: calc(4px / var(--artis-slides-thumb-scale)) !important;\n}\n${t} > [data-artis-slides-controls] {\n position: fixed !important;\n inset: auto 0 0 0 !important;\n height: calc(var(--artis-slides-bar) + var(--artis-slides-notes)) !important;\n display: block !important;\n margin: 0 !important;\n padding: 0 !important;\n z-index: 2147483000 !important;\n pointer-events: none !important;\n}\n/* One slide a page at the canvas size, skipped slides left out, without the\n controls. Every click step shows: the runtime adds .visible before the\n browser prints (beforeprint), whoever starts the print. */\n@page {\n size: ${e.width}px ${e.height}px;\n margin: 0;\n}\n@media print {\n ${t} {\n height: auto !important;\n overflow: visible !important;\n background: none !important;\n }\n ${t} > body {\n height: auto !important;\n overflow: visible !important;\n }\n /* :nth-child(n) twice outranks every screen rule on a slide (off-stage,\n overview, selected), whatever the view when printing starts. */\n ${n}:nth-child(n):nth-child(n) {\n position: relative !important;\n inset: auto !important;\n transform: none !important;\n translate: none !important;\n opacity: 1 !important;\n visibility: visible !important;\n content-visibility: visible !important;\n box-shadow: none !important;\n outline: none !important;\n break-inside: avoid !important;\n print-color-adjust: exact !important;\n -webkit-print-color-adjust: exact !important;\n }\n /* Before each shown slide but the first: no blank page at the end. */\n ${n}:not([hidden]) ~ section:not([hidden]) {\n break-before: page !important;\n }\n ${n}[hidden] {\n display: none !important;\n }\n ${t} > [data-artis-slides-controls] {\n display: none !important;\n }\n}\n`}var He=`\n:host { all: initial; }\n.bar {\n box-sizing: border-box;\n height: var(--artis-slides-bar);\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n padding: 0 8px;\n background: var(--artis-slides-ui-bg);\n border-top: 1px solid var(--artis-slides-ui-line);\n color: var(--artis-slides-ui-fg);\n font: 500 13px/1 system-ui, -apple-system, "Segoe UI", sans-serif;\n font-variant-numeric: tabular-nums;\n -webkit-user-select: none;\n user-select: none;\n}\nbutton {\n all: unset;\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n border-radius: 6px;\n color: inherit;\n cursor: pointer;\n}\nbutton:hover { background: var(--artis-slides-ui-hover); }\nbutton:focus-visible { outline: 2px solid var(--artis-slides-accent); outline-offset: 1px; }\nbutton:disabled { opacity: 0.35; cursor: default; background: none; }\nbutton[aria-pressed="true"] { color: var(--artis-slides-accent); }\nsvg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }\n.page { min-width: 64px; text-align: center; color: var(--artis-slides-ui-muted); }\n.spacer { width: 12px; }\n.bar { pointer-events: auto; transition: opacity 0.2s ease; }\n.bar.presenting { border-top-color: transparent; }\n.bar.away { opacity: 0; pointer-events: none; }\n.notes {\n box-sizing: border-box;\n height: var(--artis-slides-notes);\n overflow-y: auto;\n padding: 12px 20px 16px;\n background: var(--artis-slides-ui-bg);\n border-top: 1px solid var(--artis-slides-ui-line);\n color: var(--artis-slides-ui-fg);\n font: 400 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;\n pointer-events: auto;\n}\n.notes[hidden] { display: none; }\n.notes p { margin: 0 auto 0.6em; max-width: 72ch; }\n.notes .empty { color: var(--artis-slides-ui-muted); }\n@media (prefers-reduced-motion: reduce) {\n .bar { transition: none; }\n}\n`;var F={previous:\'<svg viewBox="0 0 24 24"><path d="M15 5l-7 7 7 7"/></svg>\',next:\'<svg viewBox="0 0 24 24"><path d="M9 5l7 7-7 7"/></svg>\',notes:\'<svg viewBox="0 0 24 24"><rect x="4.5" y="3.5" width="15" height="17" rx="2"/><path d="M8.5 8.5h7M8.5 12h7M8.5 15.5h4"/></svg>\',overview:\'<svg viewBox="0 0 24 24"><rect x="3.5" y="4.5" width="7" height="6" rx="1"/><rect x="13.5" y="4.5" width="7" height="6" rx="1"/><rect x="3.5" y="13.5" width="7" height="6" rx="1"/><rect x="13.5" y="13.5" width="7" height="6" rx="1"/></svg>\',present:\'<svg viewBox="0 0 24 24"><path d="M4 9V5.5A1.5 1.5 0 0 1 5.5 4H9M15 4h3.5A1.5 1.5 0 0 1 20 5.5V9M20 15v3.5a1.5 1.5 0 0 1-1.5 1.5H15M9 20H5.5A1.5 1.5 0 0 1 4 18.5V15"/></svg>\',stop:\'<svg viewBox="0 0 24 24"><path d="M9 4v3.5A1.5 1.5 0 0 1 7.5 9H4M15 4v3.5A1.5 1.5 0 0 0 16.5 9H20M20 15h-3.5a1.5 1.5 0 0 0-1.5 1.5V20M4 15h3.5A1.5 1.5 0 0 1 9 16.5V20"/></svg>\'};function De(e,t){let n=e.createElement("div");n.setAttribute("data-artis-slides-controls","");let r=n.attachShadow({mode:"open"});r.innerHTML=`<style>${He}</style><div class="bar" role="toolbar" aria-label="Slides"><button type="button" data-action="previous" aria-label="Previous" title="Previous (\\u2190)">${F.previous}</button><span class="page" aria-live="polite"></span><button type="button" data-action="next" aria-label="Next" title="Next (\\u2192)">${F.next}</button><span class="spacer"></span><button type="button" data-action="notes" aria-label="Speaker notes" aria-pressed="false" title="Speaker notes (S)">${F.notes}</button><button type="button" data-action="overview" aria-label="Overview" aria-pressed="false" title="Overview (O)">${F.overview}</button><button type="button" data-action="present" aria-label="Present" aria-pressed="false" title="Present (F)">${F.present}</button></div><div class="notes" role="region" aria-label="Speaker notes" hidden></div>`;let o=u=>r.querySelector(`[data-action="${u}"]`),a=r.querySelector(".bar"),d=r.querySelector(".page"),f=r.querySelector(".notes");o("previous").addEventListener("click",()=>t.previous()),o("next").addEventListener("click",()=>t.next()),o("notes").addEventListener("click",()=>t.toggleNotes()),o("overview").addEventListener("click",()=>t.toggleOverview()),o("present").addEventListener("click",()=>t.togglePresent()),e.documentElement.append(n);let c;return{host:n,update(u){d.textContent=`${u.page>0?u.page:"\\u2013"} / ${u.total}`,o("previous").disabled=u.overview||!u.canPrevious,o("next").disabled=u.overview||!u.canNext,o("notes").disabled=u.overview,o("notes").setAttribute("aria-pressed",String(u.notesOpen)),o("overview").setAttribute("aria-pressed",String(u.overview));let h=o("present");if(h.setAttribute("aria-pressed",String(u.presenting)),h.setAttribute("aria-label",u.presenting?"Stop presenting":"Present"),h.title=u.presenting?"Stop presenting (Esc)":"Present (F)",h.innerHTML=u.presenting?F.stop:F.present,a.classList.toggle("presenting",u.presenting),f.hidden=!u.notesOpen||u.overview,c!==u.notes){if(c=u.notes,f.replaceChildren(),u.notes.length===0){let x=e.createElement("p");x.className="empty",x.textContent="No speaker notes for this slide.",f.append(x)}for(let x of u.notes){let w=e.createElement("p");w.textContent=x,f.append(w)}f.scrollTop=0}},setBarShown(u){a.classList.toggle("away",!u)},isEngaged(){return n.matches(":hover")||r.activeElement!==null}}}function Fe(e,t,n){let r=t,o=n;switch(e){case"diamond":return[[r/2,0],[r,o/2],[r/2,o],[0,o/2]];case"arrow-right":return re(r,o).map(([a,d])=>[a,d]);case"arrow-left":return re(r,o).map(([a,d])=>[r-a,d]);case"arrow-down":return re(o,r).map(([a,d])=>[d,a]);case"arrow-up":return re(o,r).map(([a,d])=>[d,o-a]);default:return}}var _t=48;function ze(e,t){let n=Math.max(0,Math.min(e,t));return Math.round(Math.min(n*.15,_t)*100)/100}function re(e,t){let n=e*.6,r=t*.25,o=t*.75;return[[0,r],[n,r],[n,0],[e,t/2],[n,t],[n,o],[0,o]]}function B(e){return e.map(([t,n])=>`${Re(t)},${Re(n)}`).join(" ")}function Re(e){return Math.round(e*100)/100}function Ve(e,t,n){let[r,o]=t,[a,d]=n;switch(e){case"hv":return[t,[a,o],n];case"vh":return[t,[r,d],n];case"elbow":{let f=(r+a)/2;return[t,[f,o],[f,d],n]}default:return[t,n]}}function q(e,t){let n=(e??"").trim(),r=/^(-?\\d+(?:\\.\\d+)?)(px|%)?$/.exec(n);if(!r)return NaN;let o=Number(r[1]);return r[2]==="%"?o/100*t:o}function We(e,t,n){switch(e){case"tr":return[[t,0],[0,n]];case"bl":return[[0,n],[t,0]];case"br":return[[t,n],[0,0]];default:return[[0,0],[t,n]]}}function Ge(e){let t=r=>r==="none"||r==="open"||r==="filled"?r:void 0,n=e.head??"end";return{start:t(e.headStart)??(n==="both"?"filled":"none"),end:t(e.headEnd)??(n==="none"?"none":"filled")}}function Ke(e,t,n){let r=t[0]-e[0],o=t[1]-e[1],a=Math.hypot(r,o)||1,d=r/a,f=o/a,c=n*.4,u=[t[0]-d*n,t[1]-f*n];return{corners:[t,[u[0]-f*c,u[1]+d*c],[u[0]+f*c,u[1]-d*c]],base:u}}var Be={Activity:\'<polyline points="2.5 12 6.5 12 9.5 5 14.5 19 17.5 12 21.5 12"/>\',Book:\'<path d="M12 6.5C10 5 7 4.5 3 5v13c4-.5 7 0 9 1.5 2-1.5 5-2 9-1.5V5c-4-.5-7 0-9 1.5z"/><path d="M12 6.5v13"/>\',Chart:\'<path d="M3.5 3.5v17h17"/><path d="M8 16.5v-4"/><path d="M12.5 16.5v-8"/><path d="M17 16.5v-11"/>\',Chat:\'<path d="M5 4.5h14a2 2 0 0 1 2 2v8.5a2 2 0 0 1-2 2h-7.5L6 21v-4H5a2 2 0 0 1-2-2V6.5a2 2 0 0 1 2-2z"/>\',Check:\'<path d="M4.5 12.5l5 5L19.5 7"/>\',CheckCircle:\'<circle cx="12" cy="12" r="9"/><path d="M8 12.3l2.8 2.8 5.2-5.6"/>\',Clock:\'<circle cx="12" cy="12" r="9"/><path d="M12 7v5.2l3.5 2.1"/>\',Cloud:\'<path d="M7 19h10.5a4.5 4.5 0 0 0 .6-8.96A6 6 0 0 0 6.4 11.1 4 4 0 0 0 7 19z"/>\',Code:\'<path d="M8.5 6.5L3 12l5.5 5.5"/><path d="M15.5 6.5L21 12l-5.5 5.5"/>\',Database:\'<ellipse cx="12" cy="6" rx="7.5" ry="3"/><path d="M4.5 6v12c0 1.7 3.4 3 7.5 3s7.5-1.3 7.5-3V6"/><path d="M4.5 12c0 1.7 3.4 3 7.5 3s7.5-1.3 7.5-3"/>\',Globe:\'<circle cx="12" cy="12" r="9"/><path d="M3 12h18"/><path d="M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3z"/>\',GraduationCap:\'<path d="M2 9.5L12 4.5l10 5-10 5z"/><path d="M6 11.5v4.8c2.6 2.3 9.4 2.3 12 0v-4.8"/><path d="M22 9.5v5"/>\',Home:\'<path d="M3 11.5L12 4l9 7.5"/><path d="M5.5 9.5V20h4.5v-5.5h4V20h4.5V9.5"/>\',Key:\'<circle cx="8" cy="15.5" r="4"/><path d="M10.9 12.6L19.5 4"/><path d="M15.5 8l2.8 2.8"/><path d="M17.8 5.7l2.4 2.4"/>\',Lightbulb:\'<path d="M9 18h6"/><path d="M10 21h4"/><path d="M12 3a6 6 0 0 0-3.6 10.8c.7.6 1.1 1.3 1.1 2.1v.1h5v-.1c0-.8.4-1.5 1.1-2.1A6 6 0 0 0 12 3z"/>\',Lightning:\'<path d="M13.5 2.5L4.5 14h7l-1 7.5 9-11.5h-7z"/>\',Link:\'<path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1"/><path d="M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1"/>\',Lock:\'<rect x="5" y="10.5" width="14" height="10.5" rx="2"/><path d="M8 10.5V7.5a4 4 0 0 1 8 0v3"/><path d="M12 14.5v2.5"/>\',PaperPlane:\'<path d="M21 3L3 10.5l7 3 3 7.5z"/><path d="M21 3L10 13.5"/>\',Play:\'<path d="M7 4.5l12.5 7.5L7 19.5z"/>\',Search:\'<circle cx="10.5" cy="10.5" r="6.5"/><path d="M15.3 15.3L21 21"/>\',Settings:\'<circle cx="12" cy="12" r="2.8"/><circle cx="12" cy="12" r="6.5"/><path stroke-width="3" d="M12 2.8v2.7M12 18.5v2.7M2.8 12h2.7M18.5 12h2.7M5.5 5.5l1.9 1.9M16.6 16.6l1.9 1.9M5.5 18.5l1.9-1.9M16.6 7.4l1.9-1.9"/>\',Star:\'<polygon points="12 3 14.35 9.26 21.04 9.56 15.8 13.74 17.58 20.19 12 16.5 6.42 20.19 8.2 13.74 2.96 9.56 9.65 9.26"/>\',ThumbsUp:\'<path d="M7 10.5V21H3.5V10.5z"/><path d="M7 10.5l4-7.5c1.5 0 2.5 1 2.5 2.5V9.5H19a2 2 0 0 1 2 2.3l-1.2 7.4A2.2 2.2 0 0 1 17.6 21H7"/>\',Tool:\'<path d="M9.5 8.5l5-5 6 6-5 5z"/><path d="M12.5 11.5L4 20"/>\',Trust:\'<path d="M12 3l8 3v6c0 4.5-3.4 8.2-8 9-4.6-.8-8-4.5-8-9V6z"/><path d="M8.8 12.2l2.2 2.2 4.2-4.4"/>\',Users:\'<circle cx="9" cy="8" r="3.5"/><path d="M2.5 20c0-3.6 2.9-6 6.5-6s6.5 2.4 6.5 6"/><path d="M16 4.6a3.5 3.5 0 0 1 0 6.8"/><path d="M18 14.3c2 .7 3.5 2.6 3.5 5.7"/>\',Verified:\'<polygon points="12 2.5 14.91 4.98 18.72 5.28 19.02 9.09 21.5 12 19.02 14.91 18.72 18.72 14.91 19.02 12 21.5 9.09 19.02 5.28 18.72 4.98 14.91 2.5 12 4.98 9.09 5.28 5.28 9.09 4.98"/><path d="M8.5 12.2l2.4 2.4 4.6-4.8"/>\',Warning:\'<path d="M12 3.5L2.5 20h19z"/><path d="M12 10v4.5"/><path d="M12 17.5v.01"/>\',Wrench:\'<path d="M13.2 4.6A4.8 4.8 0 0 0 11 11L4 18a2.1 2.1 0 0 0 3 3l7-7a4.8 4.8 0 0 0 6.4-2.2L17 10.5 14 10l-.5-3z"/>\'};function Xe(e){if(!(!e||!Object.prototype.hasOwnProperty.call(Be,e)))return`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" role="img" aria-label="${e}">${Be[e]}</svg>`}var _="http://www.w3.org/2000/svg",Pt=Te,Ht=["rect","rounded","ellipse"];function pe(e){if(e.shadowRoot)return e.shadowRoot;try{return e.attachShadow({mode:"open"})}catch{return null}}function je(e){for(let t of Array.from(e.querySelectorAll("x-icon"))){let n=Xe(t.getAttribute("name")),r=n?pe(t):null;!r||!n||(r.innerHTML=`<style>:host{line-height:0}svg{display:block;width:100%;height:100%}</style>${n}`)}}var Y=new WeakMap;function Z(e,t=!1){for(let n of Array.from(e.querySelectorAll("x-shape")))Rt(n,t);for(let n of Array.from(e.querySelectorAll("x-connector")))Ft(n,t)}function z(e){let t=parseFloat(e);return Number.isFinite(t)?t:0}function Dt(e){if(!e||e==="none")return;let t=0,n=e.length;for(let h=0;h<e.length;h++){let x=e[h];if(x==="(")t++;else if(x===")")t--;else if(x===","&&t===0){n=h;break}}let r=e.slice(0,n).trim();if(/\\binset\\b/.test(r))return;let o=/(rgba?\\([^)]*\\)|hsla?\\([^)]*\\)|#[0-9a-f]{3,8}\\b)/i.exec(r),a=r.replace(o?.[0]??"","").trim().split(/\\s+/).filter(h=>/^-?[\\d.]+(px)?$/.test(h));if(a.length<2)return;let[d,f,c="0px"]=a,u=h=>h.endsWith("px")?h:`${h}px`;return`drop-shadow(${u(d)} ${u(f)} ${u(c)} ${o?.[0]??"currentColor"})`}function Rt(e,t){let n=e.getAttribute("kind")??"";if(n==="rounded"&&e.style.setProperty("--artis-shape-radius",`${ze(e.offsetWidth,e.offsetHeight)}px`),!Pt.includes(n)||Ht.includes(n))return;e.removeAttribute("data-artis-drawn");let r=getComputedStyle(e),o={backgroundColor:r.backgroundColor,backgroundImage:r.backgroundImage,borderTopColor:r.borderTopColor,borderTopWidth:r.borderTopWidth,borderLeftWidth:r.borderLeftWidth,paddingTop:r.paddingTop,paddingLeft:r.paddingLeft,boxShadow:r.boxShadow},a=e.offsetWidth,d=e.offsetHeight,f=`${a}x${d}|${o.backgroundColor}|${o.backgroundImage}|${o.borderTopColor}|${o.borderTopWidth}|${o.boxShadow}`;if(!a&&!d){Y.has(e)&&e.setAttribute("data-artis-drawn","");return}let c=z(o.borderTopWidth),u=z(o.borderLeftWidth),h=c>0?o.borderTopColor:void 0;if(n==="line"){let m=c||2;if(a<=m*2||d<=m*2)return}if(e.setAttribute("data-artis-drawn",""),!t&&Y.get(e)===f)return;Y.set(e,f);let x=pe(e);if(!x){e.removeAttribute("data-artis-drawn");return}let w=c+z(o.paddingTop),M=u+z(o.paddingLeft),S=Dt(o.boxShadow),p=document.createElement("div");p.setAttribute("style",`position:relative;width:${a}px;height:${d}px;margin:${-w}px 0 0 ${-M}px;`+(S?`filter:${S};`:""));let b=document.createElementNS(_,"svg");if(b.setAttribute("width",String(a)),b.setAttribute("height",String(d)),b.setAttribute("viewBox",`0 0 ${a} ${d}`),b.setAttribute("style","position:absolute;inset:0;overflow:visible"),n==="line"){let m=document.createElementNS(_,"line");m.setAttribute("x1","0"),m.setAttribute("y1","0"),m.setAttribute("x2",String(a)),m.setAttribute("y2",String(d)),m.setAttribute("stroke",h??o.backgroundColor),m.setAttribute("stroke-width",String(c||2)),m.setAttribute("stroke-linecap","round"),b.append(m)}else{let m=Fe(n,a,d)??[],v=document.createElement("div");if(v.setAttribute("style",`position:absolute;inset:0;background-color:${o.backgroundColor};background-image:${o.backgroundImage};clip-path:polygon(${m.map(([y,A])=>`${y}px ${A}px`).join(",")})`),p.append(v),h){let y=document.createElementNS(_,"polygon");y.setAttribute("points",B(m)),y.setAttribute("fill","none"),y.setAttribute("stroke",h),y.setAttribute("stroke-width",String(c)),y.setAttribute("stroke-linejoin","round");let A="artis-shape-clip",T=document.createElementNS(_,"defs"),N=document.createElementNS(_,"clipPath");N.setAttribute("id",A);let O=document.createElementNS(_,"polygon");O.setAttribute("points",B(m)),N.append(O),T.append(N),y.setAttribute("stroke-width",String(c*2)),y.setAttribute("clip-path",`url(#${A})`),b.append(T,y)}}p.append(b),x.replaceChildren(p)}function Ft(e,t){let n=getComputedStyle(e),r=e.offsetWidth,o=e.offsetHeight,a=Math.min(32,z(n.borderTopWidth)||2),d=n.borderTopStyle,f=A=>e.getAttribute(A),c=[r,o,a,d,...["x1","y1","x2","y2","route","from","head","head-start","head-end"].map(A=>f(A)??"")].join("|");if(!r&&!o||!t&&Y.get(e)===c)return;let u,h;if(e.hasAttribute("x1")){let A=q(f("x1"),r),T=q(f("y1"),o),N=q(f("x2"),r),O=q(f("y2"),o);if(![A,T,N,O].every(Number.isFinite))return;u=[A,T],h=[N,O]}else[u,h]=We(f("from"),r,o);let x=pe(e);if(!x)return;Y.set(e,c);let w=Ve(f("route"),u,h),M=Ge({head:f("head"),headStart:f("head-start"),headEnd:f("head-end")}),S=Math.max(12,a*4.5),p=document.createElementNS(_,"svg");p.setAttribute("width",String(r)),p.setAttribute("height",String(o)),p.setAttribute("style",`display:block;overflow:visible;margin:${-z(n.borderTopWidth)}px 0 0 ${-z(n.borderLeftWidth)}px`);let b=w.map(A=>[...A]),m=[],v=(A,T,N,O)=>{if(A==="none")return;let $=Ke(T,N,S);if(A==="filled"){let L=document.createElementNS(_,"polygon");L.setAttribute("points",B($.corners)),L.setAttribute("fill","currentColor"),m.push(L);let P=O?b.length-1:0;b[P]=[$.base[0],$.base[1]]}else{let L=document.createElementNS(_,"polyline");L.setAttribute("points",B([$.corners[1],$.corners[0],$.corners[2]])),L.setAttribute("fill","none"),L.setAttribute("stroke","currentColor"),L.setAttribute("stroke-width",String(a)),L.setAttribute("stroke-linecap","round"),L.setAttribute("stroke-linejoin","round"),m.push(L)}};w.length>=2&&(v(M.end,w[w.length-2],w[w.length-1],!0),v(M.start,w[1],w[0],!1));let y=document.createElementNS(_,"polyline");y.setAttribute("points",B(b)),y.setAttribute("fill","none"),y.setAttribute("stroke","currentColor"),y.setAttribute("stroke-width",String(a)),y.setAttribute("stroke-linejoin","round"),d==="dashed"?y.setAttribute("stroke-dasharray",`${a*3} ${a*2}`):d==="dotted"&&(y.setAttribute("stroke-dasharray",`0 ${a*2}`),y.setAttribute("stroke-linecap","round")),p.append(y,...m),x.replaceChildren(p)}function Ue(e){let t=new Map,n=[];return e.forEach((o,a)=>{let d=o===null?NaN:Number(o.trim());if(o!==null&&o.trim()!==""&&Number.isFinite(d)){let f=t.get(d);f?f.push(a):t.set(d,[a])}else n.push([a])}),[...[...t.entries()].sort((o,a)=>o[0]-a[0]).map(([,o])=>o),...n]}function oe(e,t,n,r){let o=n[e.slide]??0,a=Math.min(Math.max(e.step,0),o);if(r===1&&a<o)return{slide:e.slide,step:a+1};if(r===-1&&a>0)return{slide:e.slide,step:a-1};for(let d=e.slide+r;d>=0&&d<t.length;d+=r)if(!t[d])return{slide:d,step:r===1?0:n[d]??0};return{slide:e.slide,step:a}}function qe(e,t){return Math.max(e,...t.map(n=>n+1))}function Ye(e,t,n){return Array.from({length:e},(r,o)=>({visible:n||o<t,current:!n&&o===t-1}))}function ie(e,t,n){for(let r=t+n;r>=0&&r<e.length;r+=n)if(!e[r])return r;return t}function se(e){return e.indexOf(!1)}function Ze(e){return e.lastIndexOf(!1)}function fe(e,t){if(t<0||t>=e.length)return se(e);if(!e[t])return t;let n=ie(e,t,1);if(n!==t)return n;let r=ie(e,t,-1);return r!==t?r:-1}function Je(e){return e.filter(t=>!t).length}function me(e,t){if(t<0||t>=e.length||e[t])return 0;let n=0;for(let r=0;r<=t;r++)e[r]||n++;return n}function Qe(e,t){if(!Number.isInteger(t)||t<1)return-1;let n=0;for(let r=0;r<e.length;r++)if(!e[r]&&++n===t)return r;return-1}var zt=/^slide-(\\d+)$/;function Vt(e){try{return decodeURIComponent(e)}catch{return}}function et(e){return e.replace(/^#/,"").split("&").filter(t=>t!=="")}function he(e){for(let t of et(e)){if(t.includes("="))continue;let n=Vt(t);if(n)return n}}function tt(e,t){if(!e)return-1;let n=t.findIndex(o=>o.id===e);if(n>=0)return n;let r=zt.exec(e);return r?Qe(t.map(o=>o.hidden),Number(r[1])):-1}function nt(e,t){return e.id?e.id:`slide-${t}`}function rt(e,t){let n=et(e).filter(r=>r.includes("="));return`#${[encodeURIComponent(t),...n].join("&")}`}function ot(e,t){let n=e.indexOf("#");return`${n===-1?e:e.slice(0,n)}${t}`}function it(e,t){switch(e){case"ArrowRight":case"ArrowDown":case"PageDown":case"n":case"N":return"next";case" ":return t?"previous":"next";case"ArrowLeft":case"ArrowUp":case"PageUp":case"p":case"P":return"previous";case"Home":return"first";case"End":return"last";case"o":case"O":return"overview";case"f":case"F":return"present";case"s":case"S":return"notes";case"Escape":return"escape";default:return}}function st(e){if(!e.presenting||e.reducedMotion||e.from<0||e.from===e.to)return"none";let t=e.leaving?.trim().toLowerCase();return t==="fade"||t==="push"?t:"none"}function at(e,t,n,r,o=0){let a=f=>Math.max(1,f-2*o),d=Math.max(0,Math.min(a(e)/n,a(t)/r));return{scale:d,x:(e-n*d)/2,y:(t-r*d)/2}}function lt(e,t,n,r,o={}){let a=o.gap??24,d=o.padding??24,f=o.thumbWidth??320,c=Math.max(1,e-2*d),u=Math.max(1,Math.min(Math.max(t,1),Math.floor((c+a)/(f+a)))),h=Math.max(1,(c-a*(u-1))/u),x=h/n,w=r*x,M=[],S=0,p=0;for(let m=0;m<t;m++)m>0&&(p===u||o.sectionStarts?.[m])&&(S++,p=0),M.push({x:d+p*(h+a),y:d+S*(w+a)}),p++;let b=t===0?0:S+1;return{columns:u,scale:x,width:h,height:w,cells:M,contentHeight:2*d+b*w+Math.max(0,b-1)*a}}function dt(e,t,n){if(e.length===0)return t;if(n==="left")return Math.max(0,t-1);if(n==="right")return Math.min(e.length-1,t+1);let r=e[t];if(!r)return t;let o=[...new Set(e.map(u=>u.y))].sort((u,h)=>u-h),a=o.indexOf(r.y),d=o[a+(n==="down"?1:-1)];if(d===void 0)return t;let f=t,c=1/0;return e.forEach((u,h)=>{if(u.y!==d)return;let x=Math.abs(u.x-r.x);x<c&&(f=h,c=x)}),f}function ct(e){return e?e.split(/\\n[^\\S\\n]*\\n\\s*/).map(t=>t.replace(/\\s+/g," ").trim()).filter(t=>t!==""):[]}function ut(e){return Math.round(Math.min(240,Math.max(96,e*.28)))}var pt="artis:view-changed",ft="artis:reveal";function mt(e,t){return!e||e.mode!==t.mode?!0:t.mode==="overview"?!1:e.index!==t.index||e.step!==t.step||e.scale!==t.scale||e.x!==t.x||e.y!==t.y}function ht(e,t){return e>=0&&e<t?e:-1}var Gt=40,Kt=450,gt=2500,bt=\'a[href], button, input, select, textarea, label, summary, video, audio, [contenteditable=""], [contenteditable="true"], x-embed\';function St(e){let t=e.defaultView,n=e.body;t&&n&&Bt(e,t,n)}function Bt(e,t,n){let r=Array.from(n.children).filter(i=>i.tagName==="SECTION");if(r.length===0)return;let o=e.documentElement,a=Le(e.querySelector(`meta[name="${ee}"]`)?.getAttribute("content")),d=e.createElement("style");d.textContent=_e+Pe(a),(e.head??o).append(d),o.style.setProperty("--artis-slides-width",`${a.width}px`),o.style.setProperty("--artis-slides-height",`${a.height}px`);let f=vt(t,r);o.classList.add("artis-slides"),yt(r,f);for(let i of r)Xt(t,i),jt(t,i);je(n);let c=r.map(i=>{let s=Array.from(i.querySelectorAll(".fragment")).filter(l=>!l.closest("aside"));return Ue(s.map(l=>l.getAttribute("data-fragment-index"))).map(l=>l.map(g=>s[g]))}),u=new Map;c.forEach(i=>i.forEach((s,l)=>{for(let g of s)u.set(g,l)}));let h=c.map(i=>i.length),x=r.map(i=>{let s=Array.from(i.children).filter(l=>l.tagName==="ASIDE");return ct(s[s.length-1]?.textContent)}),w=()=>r.map(i=>({id:i.id,hidden:i.hasAttribute("hidden")})),M=()=>r.map(i=>i.hasAttribute("hidden")),S=()=>t.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1,p=-1,b=0,m="slide",v=!1,y=!1,A=!1,T=0,N,O=[],$,L,P=De(e,{previous:()=>K(-1),next:()=>K(1),toggleOverview:()=>j(m==="overview"?"slide":"overview"),toggleNotes:()=>Se(),togglePresent:()=>Q(!v)});function X(){return r.filter(i=>!i.hasAttribute("hidden"))}function ge(i){let s=mt(N,i);N=i,s&&e.dispatchEvent(new Event(pt))}function V(i,s,l){let g=c[i]??[];Ye(g.length,s,l).forEach((E,I)=>{for(let D of g[I])D.classList.toggle("visible",E.visible),D.classList.toggle("current-fragment",E.current)})}function J(){r.forEach((i,s)=>V(s,0,!0))}function W(i){if(!i||typeof i.getAnimations!="function")return;let s=v&&!S();for(let l of i.getAnimations({subtree:!0}))if("animationName"in l)try{s?(l.currentTime=0,l.play()):l.effect?.getComputedTiming().endTime!==1/0&&l.finish()}catch{}}function be(){let i=A&&m==="slide"?ut(t.innerHeight):0,s=(v?0:44)+i;return o.style.setProperty("--artis-slides-notes",`${i}px`),o.style.setProperty("--artis-slides-reserved",`${s}px`),at(t.innerWidth,Math.max(0,t.innerHeight-s),a.width,a.height,v||t.innerWidth<480?0:16)}function ve(){let i=M(),s={slide:p,step:b},l=v?h:h.map(()=>0),g=oe(s,i,l,-1),E=oe(s,i,l,1);P.update({page:me(i,p),total:Je(i),canPrevious:g.slide!==p||g.step!==b,canNext:E.slide!==p||E.step!==b,overview:m==="overview",presenting:v,notesOpen:A,notes:x[p]??[]})}function C(){if(m==="overview"){ye();return}let i=be(),s=$?.from??-1;r.forEach((l,g)=>{g===p||g===s?(l.setAttribute("data-artis-shown",""),l.style.setProperty("--artis-slides-transform",`translate(${i.x}px, ${i.y}px) scale(${i.scale})`)):(l.removeAttribute("data-artis-shown"),l.style.removeProperty("--artis-slides-transform")),l.toggleAttribute("data-artis-leaving",g===s),l.removeAttribute("data-artis-selected")}),n.style.removeProperty("height"),p>=0&&Z(r[p]),ve(),$||ge({mode:m,index:p,step:v?b:0,...i})}function ye(){be();let i=X(),s=lt(o.clientWidth||t.innerWidth,i.length,a.width,a.height,{sectionStarts:i.map(l=>l.hasAttribute("data-section"))});O=s.cells,o.style.setProperty("--artis-slides-thumb-scale",String(s.scale)),n.style.setProperty("height",`${s.contentHeight}px`,"important");for(let l of r){let g=i.indexOf(l),E=s.cells[g];if(l.removeAttribute("data-artis-leaving"),!E){l.removeAttribute("data-artis-shown"),l.style.removeProperty("--artis-slides-transform");continue}l.setAttribute("data-artis-shown",""),l.style.setProperty("--artis-slides-transform",`translate(${E.x}px, ${E.y}px) scale(${s.scale})`),l.toggleAttribute("data-artis-selected",g===T),l.setAttribute("aria-label",`Slide ${g+1}`)}for(let l of i)Z(l),W(l);ve(),ge({mode:m,index:p,step:0,scale:0,x:0,y:0})}function j(i){if(i!==m)if(G(),m=i,m==="overview")o.setAttribute("data-artis-view","overview"),J(),T=Math.max(0,X().indexOf(r[p])),C(),ae();else{o.removeAttribute("data-artis-view");for(let s of r)s.removeAttribute("aria-label");o.scrollTop=0,v&&V(p,b,!1),C(),W(r[p])}}function ae(){X()[T]?.scrollIntoView?.({block:"nearest"})}function G(){let i=$;if(i){$=void 0;for(let s of i.animations)s.cancel();i.done()}}function At(i,s){let l=r[i],g=r[p];if(s==="none"||typeof g.animate!="function"){C();return}let E={duration:Kt,easing:"ease-in-out",fill:"forwards"},I=p>i,D=`${I?"":"-"}${t.innerWidth}px`,$t=`${I?"-":""}${t.innerWidth}px`;$={from:i,animations:[],done:()=>C()},C();let Me=s==="fade"?[l.animate({opacity:[1,0]},E),g.animate({opacity:[0,1]},E)]:[l.animate({translate:["0px 0px",`${$t} 0px`]},E),g.animate({translate:[`${D} 0px`,"0px 0px"]},E)],ke=$;ke.animations=Me,Me[1].finished.then(()=>{$===ke&&G()}).catch(()=>{})}function H(i,s={}){if(i<0||i>=r.length)return;G();let l=p,g=i!==l,E=v?Math.max(0,s.step??0):0,I=E!==b;p=i,b=E,v&&V(i,b,!1),m==="overview"?j("slide"):g?(At(l,s.animate===!1?"none":st({leaving:r[l]?.getAttribute("data-transition"),from:l,to:i,presenting:v,reducedMotion:S()})),W(r[i])):I&&C(),s.writeHash!==!1&&Mt(i)}function Mt(i){let s=r[i],l=nt({id:s.id,hidden:s.hasAttribute("hidden")},me(M(),i)),g=rt(t.location.hash,l);if(g!==t.location.hash&&he(t.location.hash)!==l)try{t.location.replace(ot(t.location.href,g))}catch{}}function K(i){if(m==="overview")return;let s=M();if(!v){H(ie(s,p,i));return}let l=oe({slide:p,step:b},s,h,i);l.slide!==p?H(l.slide,{step:l.step}):l.step!==b&&(b=l.step,V(p,b,!1),C())}function Se(){m==="slide"&&(A=!A,G(),C())}function Q(i){i!==v&&(G(),v=i,o.toggleAttribute("data-artis-present",i),b=0,i?(A=!1,kt(),m==="overview"?j("slide"):(V(p,b,!1),C(),W(r[p])),xe()):(y&&e.fullscreenElement&&e.exitFullscreen?.().catch(()=>{}),y=!1,clearTimeout(L),o.removeAttribute("data-artis-idle"),P.setBarShown(!0),J(),C(),W(r[p])))}function kt(){if(!(!e.fullscreenEnabled||e.fullscreenElement))try{o.requestFullscreen?.()?.catch(()=>{})}catch{}}e.addEventListener("fullscreenchange",()=>{if(e.fullscreenElement===o){v?y=!0:e.exitFullscreen?.().catch(()=>{});return}y&&(y=!1,Q(!1))});function xe(){v&&(o.removeAttribute("data-artis-idle"),P.setBarShown(!0),clearTimeout(L),L=setTimeout(function i(){if(v){if(P.isEngaged()){L=setTimeout(i,gt);return}o.setAttribute("data-artis-idle",""),P.setBarShown(!1)}},gt))}e.addEventListener("mousemove",xe,{passive:!0});function we(i){let s=he(i);if(!s)return-1;let l=tt(s,w());if(l>=0)return fe(M(),l);let E=e.getElementById(s)?.closest("body > section");return E?fe(M(),r.indexOf(E)):-1}t.addEventListener("hashchange",()=>{let i=we(t.location.hash);i>=0&&i!==p&&H(i,{writeHash:!1,animate:!1})}),t.addEventListener("resize",()=>C()),e.addEventListener("scroll",i=>{if(m!=="slide")return;let s=i.target===e?o:i.target;s instanceof Element&&(s===o||s===n||s.parentElement===n&&s.tagName==="SECTION")&&(s.scrollTop!==0||s.scrollLeft!==0)&&(s.scrollTop=0,s.scrollLeft=0)},!0),e.addEventListener(ft,i=>{let s=i.target,l=s instanceof Element?s.closest("body > section"):null,g=ht(l?r.indexOf(l):-1,r.length);if(g<0)return;let E=[];for(let I=s.closest(".fragment");I&&l?.contains(I);I=I.parentElement?.closest(".fragment")??null){let D=u.get(I);D!==void 0&&E.push(D)}H(g,{animate:!1,step:qe(g===p?b:0,E)})}),e.addEventListener("keydown",i=>{if(i.defaultPrevented||i.ctrlKey||i.metaKey||i.altKey)return;let s=i.target;if(s instanceof Element&&(s===P.host&&(i.key===" "||i.key==="Enter")||s.closest(bt)&&s!==n))return;(m==="overview"?Lt(i.key):Tt(i))&&i.preventDefault()});function Tt(i){let s=M();switch(it(i.key,i.shiftKey)){case"next":return K(1),!0;case"previous":return K(-1),!0;case"first":return H(se(s)),!0;case"last":return H(Ze(s)),!0;case"overview":return j("overview"),!0;case"present":return Q(!v),!0;case"notes":return Se(),!0;case"escape":return v?(Q(!1),!0):!1;default:return!1}}function Lt(i){let s=X(),l={ArrowLeft:"left",ArrowRight:"right",ArrowUp:"up",ArrowDown:"down"};if(i in l){T=dt(O,T,l[i]);for(let g of r)g.toggleAttribute("data-artis-selected",g===s[T]);return ae(),!0}if(i==="Enter"||i===" "){let g=s[T];return g&&H(r.indexOf(g)),!0}return i==="Escape"||i==="o"||i==="O"?(j("slide"),!0):i==="Home"||i==="End"?(T=i==="Home"?0:s.length-1,ye(),ae(),!0):!1}e.addEventListener("click",i=>{if(i.button!==0)return;let s=i.target;if(!(s instanceof Element))return;let l=s.closest("body > section");if(!l)return;if(m==="overview"){i.preventDefault(),H(r.indexOf(l));return}if(!v||i.detail>1||s.closest(bt))return;let g=t.getSelection();g&&!g.isCollapsed||K(1)});let U;e.addEventListener("touchstart",i=>{let s=i.touches[0];U=i.touches.length===1&&s?{x:s.clientX,y:s.clientY}:void 0},{passive:!0}),e.addEventListener("touchend",i=>{let s=i.changedTouches[0];if(!U||!s||m==="overview")return;let l=s.clientX-U.x,g=s.clientY-U.y;U=void 0,!(Math.abs(l)<Gt||Math.abs(l)<Math.abs(g)*1.5)&&K(l<0?1:-1)},{passive:!0}),t.addEventListener("beforeprint",()=>{G(),o.setAttribute("data-artis-printing",""),n.style.removeProperty("height"),J();for(let i of X()){Z(i);for(let s of i.getAnimations?.({subtree:!0})??[])try{s.effect?.getComputedTiming().endTime!==1/0&&s.finish()}catch{}}}),t.addEventListener("afterprint",()=>{o.removeAttribute("data-artis-printing"),v&&m==="slide"&&V(p,b,!1),C()});let Ee=()=>{o.classList.remove("artis-slides");let i=vt(t,r);o.classList.add("artis-slides"),yt(r,i);for(let s of r)s.hasAttribute("data-artis-shown")&&Z(s,!0)};new MutationObserver(Ee).observe(o,{attributes:!0,attributeFilter:["data-theme"]}),t.matchMedia?.("(prefers-color-scheme: dark)").addEventListener?.("change",Ee),J();let Ae=we(t.location.hash);p=Ae>=0?Ae:se(M()),C(),W(r[p]),e.fonts?.ready.then(()=>C()).catch(()=>{})}function vt(e,t){for(let c of t)c.removeAttribute("data-artis-fill");let n=c=>c.backgroundImage==="none"&&/^(transparent|rgba\\(0, 0, 0, 0\\))$/.test(c.backgroundColor),r=e.document,o=e.getComputedStyle(r.body),a=e.getComputedStyle(r.documentElement),d=n(o)?n(a)?void 0:a:o,f=d?{color:d.backgroundColor,image:d.backgroundImage}:{color:"#ffffff",image:"none"};return t.map(c=>n(e.getComputedStyle(c))?f:void 0)}function yt(e,t){e.forEach((n,r)=>{let o=t[r];if(!o){n.removeAttribute("data-artis-fill");return}n.style.setProperty("--artis-slides-fill-color",o.color),n.style.setProperty("--artis-slides-fill-image",o.image),n.setAttribute("data-artis-fill","")})}function Xt(e,t){for(let n of Array.from(t.children)){if(n.tagName==="ASIDE")continue;let r=e.getComputedStyle(n).position;if(r!=="absolute"&&r!=="fixed")return;e.getComputedStyle(n).zIndex==="auto"&&n.style.setProperty("z-index","-1")}}function jt(e,t){for(let n of Array.from(t.querySelectorAll("*"))){let r=n.parentElement;if(!r)continue;let o=e.getComputedStyle(r);if(!/flex/.test(o.display)||!o.flexDirection.startsWith("column"))continue;let a=e.getComputedStyle(n);parseFloat(a.flexGrow)>0&&a.minHeight==="auto"&&n.style.setProperty("min-height","0")}}var xt=Symbol.for("artis.types.slides.v2");async function wt(e,t=!1){let n=new URL(`files/${e}`,location.href);n.search=location.search,n.hash="";let r=await fetch(n.href);if(!(t&&r.status===404)){if(!r.ok)throw new Error(`${e}: HTTP ${r.status}`);return r.text()}}async function Ut(e){let t=await wt(k),n=ne(t);if(!n.ok)throw new Error(n.error);let r=[R,...n.value.slides.map(te)],o=await Promise.all(r.map(c=>wt(c,c===R))),a={[k]:t};r.forEach((c,u)=>{a[c]=o[u]});let d=ue(a);if(!d.ok)throw new Error(d.error);let f=new DOMParser().parseFromString(d.value,"text/html");e.title=f.title;for(let c of Array.from(f.head.children))c.tagName==="TITLE"||c.getAttribute("charset")||e.head.append(e.importNode(c,!0));e.body.prepend(...Array.from(f.body.children).map(c=>e.importNode(c,!0)))}function qt(e,t){let n=e.createElement("p");n.setAttribute("role","alert"),n.style.cssText="font: 16px system-ui, sans-serif; margin: 2em;",n.textContent=`This deck could not be loaded. ${t instanceof Error?t.message:String(t)}`,e.body.prepend(n)}function Et(){let e=globalThis;typeof document>"u"||e[xt]||(e[xt]=!0,Ut(document).then(()=>St(document),t=>qt(document,t)))}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Et,{once:!0}):Et());})();\n');
|
|
10373
|
+
return;
|
|
10374
|
+
}
|
|
10375
|
+
const file = FILE_PATH.exec(url.pathname);
|
|
10376
|
+
if (file) {
|
|
10377
|
+
let filePath;
|
|
10378
|
+
try {
|
|
10379
|
+
filePath = decodeURIComponent(file[2]);
|
|
10380
|
+
} catch {
|
|
10381
|
+
}
|
|
10382
|
+
const content = file[1] === LOCAL_REVISION && filePath !== void 0 && Object.prototype.hasOwnProperty.call(files, filePath) ? files[filePath] : void 0;
|
|
10383
|
+
if (content === void 0) {
|
|
10384
|
+
response.writeHead(404).end();
|
|
10385
|
+
return;
|
|
10386
|
+
}
|
|
10387
|
+
response.writeHead(200, {
|
|
10388
|
+
"content-type": "text/plain; charset=utf-8",
|
|
10389
|
+
"content-security-policy": artifactContentSecurityPolicy(origin),
|
|
10390
|
+
"x-content-type-options": "nosniff"
|
|
10391
|
+
});
|
|
10392
|
+
response.end(content);
|
|
10393
|
+
return;
|
|
10394
|
+
}
|
|
10395
|
+
if (url.pathname === "/" || url.pathname === `/r/${LOCAL_REVISION}`) {
|
|
10396
|
+
response.writeHead(302, { location: `${pagePath}${url.search}` }).end();
|
|
10258
10397
|
return;
|
|
10259
10398
|
}
|
|
10260
|
-
if (url.pathname !==
|
|
10399
|
+
if (url.pathname !== pagePath) {
|
|
10261
10400
|
response.writeHead(404).end();
|
|
10262
10401
|
return;
|
|
10263
10402
|
}
|
|
10264
|
-
const
|
|
10403
|
+
const theme = url.searchParams.get("theme") === "dark" ? "dark" : "light";
|
|
10265
10404
|
response.writeHead(200, {
|
|
10266
10405
|
"content-type": "text/html; charset=utf-8",
|
|
10267
10406
|
"content-security-policy": artifactContentSecurityPolicy(origin, [], {
|
|
10268
|
-
googleFonts: type !== void 0
|
|
10407
|
+
googleFonts: type !== void 0,
|
|
10408
|
+
artifactHost: true,
|
|
10409
|
+
// The runtime may fetch this revision's files, and nothing else.
|
|
10410
|
+
connectSrc: type ? `${origin}/r/${LOCAL_REVISION}/files/` : void 0
|
|
10269
10411
|
})
|
|
10270
10412
|
});
|
|
10271
|
-
const page = stampTheme(
|
|
10413
|
+
const page = stampTheme(
|
|
10414
|
+
type === "slides" ? '<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <title>Slides</title>\n </head>\n <body></body>\n</html>\n' : files["index.html"] ?? "",
|
|
10415
|
+
theme
|
|
10416
|
+
);
|
|
10272
10417
|
response.end(
|
|
10273
10418
|
type === "slides" ? injectRuntime(page, SLIDES_RUNTIME_PATH) : page
|
|
10274
10419
|
);
|
|
@@ -10281,9 +10426,10 @@ async function serveDocument(html, type) {
|
|
|
10281
10426
|
});
|
|
10282
10427
|
});
|
|
10283
10428
|
const { port } = server.address();
|
|
10429
|
+
const host = `${randomUUID()}.localhost:${port}`;
|
|
10284
10430
|
return {
|
|
10285
10431
|
server,
|
|
10286
|
-
url: (theme) => `http
|
|
10432
|
+
url: (theme) => `http://${host}${pagePath}?theme=${theme}`
|
|
10287
10433
|
};
|
|
10288
10434
|
}
|
|
10289
10435
|
function stampTheme(html, theme) {
|
|
@@ -10458,8 +10604,22 @@ var INSPECT_PAGE = `(() => {
|
|
|
10458
10604
|
function isCspConsoleMessage(text) {
|
|
10459
10605
|
return /Content Security Policy/i.test(text);
|
|
10460
10606
|
}
|
|
10607
|
+
function isOptionalFileMissing(type, message) {
|
|
10608
|
+
return type === "slides" && /status of 404/.test(message.text()) && message.location().url.split("?")[0].endsWith(`/files/${SLIDES_STYLESHEET_FILE}`);
|
|
10609
|
+
}
|
|
10610
|
+
var DECK_LOADED = `new Promise((resolve) => {
|
|
10611
|
+
const started = Date.now();
|
|
10612
|
+
const poll = () => {
|
|
10613
|
+
if (document.querySelector('body > section[data-artis-shown]')) return resolve(null);
|
|
10614
|
+
const alert = document.querySelector('[role="alert"]');
|
|
10615
|
+
if (alert) return resolve('The deck did not load: ' + alert.textContent);
|
|
10616
|
+
if (Date.now() - started > 10000) return resolve('The deck did not load: no slide was shown within 10 s.');
|
|
10617
|
+
setTimeout(poll, 50);
|
|
10618
|
+
};
|
|
10619
|
+
poll();
|
|
10620
|
+
})`;
|
|
10461
10621
|
function measureSlides(canvas) {
|
|
10462
|
-
const args = [canvas,
|
|
10622
|
+
const args = [canvas, pageViewEvents.reveal, pageViewEvents.viewChanged].map((value) => JSON.stringify(value)).join(", ");
|
|
10463
10623
|
return `(async (canvas, reveal, viewChanged) => {
|
|
10464
10624
|
const describe = (el) => {
|
|
10465
10625
|
let text = el.tagName.toLowerCase();
|
|
@@ -10546,24 +10706,27 @@ function measureSlides(canvas) {
|
|
|
10546
10706
|
return findings;
|
|
10547
10707
|
})(${args})`;
|
|
10548
10708
|
}
|
|
10549
|
-
function deckCanvas(
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
if (name?.[1]?.toLowerCase() !== SLIDE_SIZE_META_NAME) continue;
|
|
10553
|
-
const content = /\bcontent\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i.exec(
|
|
10554
|
-
meta
|
|
10555
|
-
);
|
|
10556
|
-
return slideCanvasFromMeta(content?.[1] ?? content?.[2] ?? content?.[3]);
|
|
10557
|
-
}
|
|
10558
|
-
return slideCanvasFromMeta(void 0);
|
|
10709
|
+
function deckCanvas(files) {
|
|
10710
|
+
const manifest = readSlidesDeckManifest(files[SLIDES_DECK_FILE]);
|
|
10711
|
+
return SLIDE_CANVAS[manifest.ok ? manifest.value.size : "16:9"];
|
|
10559
10712
|
}
|
|
10560
|
-
|
|
10713
|
+
function verifyHtml(html, options = {}) {
|
|
10714
|
+
return verifyFiles({ "index.html": html }, options);
|
|
10715
|
+
}
|
|
10716
|
+
async function verifyFiles(files, options = {}) {
|
|
10561
10717
|
const { type } = options;
|
|
10562
|
-
const
|
|
10718
|
+
const notLoaded = /* @__PURE__ */ new Set();
|
|
10719
|
+
const checked = type === "slides" ? checkSlidesFiles(files) : void 0;
|
|
10563
10720
|
const formatIssues = checked?.map(toFormatIssue);
|
|
10564
10721
|
const formatOk = !checked || !hasSlidesErrors(checked);
|
|
10565
|
-
const report = (runs, ok) =>
|
|
10566
|
-
|
|
10722
|
+
const report = (runs, ok) => ({
|
|
10723
|
+
...type ? { ok, type, formatIssues, runs } : { ok, runs },
|
|
10724
|
+
...notLoaded.size ? { assetsNotLoaded: [...notLoaded] } : {}
|
|
10725
|
+
});
|
|
10726
|
+
const { server, url } = await serveRevision(files, type, {
|
|
10727
|
+
load: options.loadAsset,
|
|
10728
|
+
notLoaded
|
|
10729
|
+
});
|
|
10567
10730
|
try {
|
|
10568
10731
|
let browser;
|
|
10569
10732
|
try {
|
|
@@ -10575,7 +10738,7 @@ async function verifyHtml(html, options = {}) {
|
|
|
10575
10738
|
throw error;
|
|
10576
10739
|
}
|
|
10577
10740
|
try {
|
|
10578
|
-
const runs = await runChecks(browser, url, type,
|
|
10741
|
+
const runs = await runChecks(browser, url, type, files);
|
|
10579
10742
|
return report(runs, formatOk && runs.every(runIsClean));
|
|
10580
10743
|
} finally {
|
|
10581
10744
|
await browser.close().catch(() => void 0);
|
|
@@ -10591,6 +10754,7 @@ function toFormatIssue(issue2) {
|
|
|
10591
10754
|
message: issue2.message
|
|
10592
10755
|
};
|
|
10593
10756
|
if (issue2.slide) copy.slide = { ...issue2.slide };
|
|
10757
|
+
if (issue2.file !== void 0) copy.file = issue2.file;
|
|
10594
10758
|
if (issue2.line !== void 0) copy.line = issue2.line;
|
|
10595
10759
|
if (issue2.column !== void 0) copy.column = issue2.column;
|
|
10596
10760
|
return copy;
|
|
@@ -10598,7 +10762,7 @@ function toFormatIssue(issue2) {
|
|
|
10598
10762
|
function runIsClean(run) {
|
|
10599
10763
|
return !run.overflow && !run.clippedSvgs.length && !run.consoleErrors.length && !run.cspViolations.length && !run.slideOverflow?.length;
|
|
10600
10764
|
}
|
|
10601
|
-
async function runChecks(browser, url, type,
|
|
10765
|
+
async function runChecks(browser, url, type, files) {
|
|
10602
10766
|
const runs = [];
|
|
10603
10767
|
for (const width of runWidths(type)) {
|
|
10604
10768
|
for (const theme of verifyThemes) {
|
|
@@ -10610,7 +10774,7 @@ async function runChecks(browser, url, type, html) {
|
|
|
10610
10774
|
const page = await context.newPage();
|
|
10611
10775
|
const consoleErrors = [];
|
|
10612
10776
|
page.on("console", (message) => {
|
|
10613
|
-
if (message.type() === "error" && !isCspConsoleMessage(message.text())) {
|
|
10777
|
+
if (message.type() === "error" && !isCspConsoleMessage(message.text()) && !isOptionalFileMissing(type, message)) {
|
|
10614
10778
|
consoleErrors.push(message.text());
|
|
10615
10779
|
}
|
|
10616
10780
|
});
|
|
@@ -10621,6 +10785,10 @@ async function runChecks(browser, url, type, html) {
|
|
|
10621
10785
|
});
|
|
10622
10786
|
await page.addInitScript(RECORD_CSP_VIOLATIONS);
|
|
10623
10787
|
await page.goto(url(theme), { waitUntil: "load", timeout: 15e3 });
|
|
10788
|
+
if (type === "slides") {
|
|
10789
|
+
const failed = await page.evaluate(DECK_LOADED);
|
|
10790
|
+
if (failed) consoleErrors.push(failed);
|
|
10791
|
+
}
|
|
10624
10792
|
await page.waitForTimeout(400);
|
|
10625
10793
|
const findings = await page.evaluate(INSPECT_PAGE);
|
|
10626
10794
|
const run = {
|
|
@@ -10636,7 +10804,7 @@ async function runChecks(browser, url, type, html) {
|
|
|
10636
10804
|
if (type === "slides") {
|
|
10637
10805
|
page.setDefaultTimeout(12e4);
|
|
10638
10806
|
run.slideOverflow = await page.evaluate(
|
|
10639
|
-
measureSlides(deckCanvas(
|
|
10807
|
+
measureSlides(deckCanvas(files))
|
|
10640
10808
|
);
|
|
10641
10809
|
}
|
|
10642
10810
|
runs.push(run);
|
|
@@ -10666,10 +10834,9 @@ function issueLocation(issue2) {
|
|
|
10666
10834
|
`slide ${issue2.slide.index}${issue2.slide.id ? ` (#${issue2.slide.id})` : ""}`
|
|
10667
10835
|
);
|
|
10668
10836
|
}
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
);
|
|
10837
|
+
const line = issue2.line !== void 0 ? `line ${issue2.line}${issue2.column !== void 0 ? `:${issue2.column}` : ""}` : void 0;
|
|
10838
|
+
if (issue2.file !== void 0 || line) {
|
|
10839
|
+
parts.push([issue2.file, line].filter(Boolean).join(" "));
|
|
10673
10840
|
}
|
|
10674
10841
|
return parts.length ? parts.join(", ") : "the deck";
|
|
10675
10842
|
}
|
|
@@ -10688,7 +10855,14 @@ function formatIssueLines(issues) {
|
|
|
10688
10855
|
];
|
|
10689
10856
|
}
|
|
10690
10857
|
function formatVerifyReport(report) {
|
|
10691
|
-
|
|
10858
|
+
const lines = reportLines(report);
|
|
10859
|
+
if (report.assetsNotLoaded?.length) {
|
|
10860
|
+
const count = report.assetsNotLoaded.length;
|
|
10861
|
+
lines.push(
|
|
10862
|
+
`${count} asset${count === 1 ? "" : "s"} (/_blob/\u2026) not loaded: a local file has none, and a published artifact's are read signed in as someone who may upload to it. Verify the published artifact signed in as such a user to check them.`
|
|
10863
|
+
);
|
|
10864
|
+
}
|
|
10865
|
+
return lines.map(stripControlCharacters);
|
|
10692
10866
|
}
|
|
10693
10867
|
function reportLines(report) {
|
|
10694
10868
|
const lines = report.formatIssues ? formatFormatIssues(report.formatIssues) : [];
|
|
@@ -10763,7 +10937,6 @@ function reportLines(report) {
|
|
|
10763
10937
|
}
|
|
10764
10938
|
|
|
10765
10939
|
export {
|
|
10766
|
-
composeSlidesFiles,
|
|
10767
10940
|
verifyWidths,
|
|
10768
10941
|
verifyThemes,
|
|
10769
10942
|
verifyTypes,
|
|
@@ -10773,8 +10946,8 @@ export {
|
|
|
10773
10946
|
VerifyUnavailableError,
|
|
10774
10947
|
stampTheme,
|
|
10775
10948
|
injectRuntime,
|
|
10776
|
-
deckCanvas,
|
|
10777
10949
|
verifyHtml,
|
|
10950
|
+
verifyFiles,
|
|
10778
10951
|
stripControlCharacters,
|
|
10779
10952
|
formatFormatIssues,
|
|
10780
10953
|
formatVerifyReport
|