@pritzlaff/agile 0.0.0-stage → 1.0.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 CHANGED
@@ -1,3 +1,103 @@
1
- # Temporary Holding Version
1
+ # Agile board
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ **[▶ Open the board](https://aaronp.github.io/agile/)** ·
4
+ [Acme example](https://aaronp.github.io/agile/?src=examples/acme-sprint/board.md)
5
+
6
+ A kanban board driven by **one markdown file**: columns, tasks, their owners, tags, history and the board's
7
+ style. This repo is the app. Your board can live in its own repo and be loaded with `?src=` (see
8
+ [Publishing your own board](#publishing-your-own-board)).
9
+
10
+ - **Board**, **Split** (board beside its markdown), **Archive** and **Markdown** views.
11
+ - The **☰ menu** holds **New**, **Open**, **Save**, **Download**, **Copy link** and **Style**.
12
+ - **Copy link** copies a URL with the whole board compressed into it (`#board=…`, deflate + base64url), plus the current view and filters. Opening it shows that board without overwriting the one saved in that browser, and edits to it update the `#board=` in the address bar; it lives in the hash, so it never reaches the server. Links over 2000 characters copy with a warning, since some apps cut them.
13
+ - **Badge and card**: the top of the ☰ menu shows an SVG badge of task counts, like `B: 4 📋 | P: 2 ⏳ | D: 7 ✅`. Click it to choose which columns it shows, each with a symbol (up to 6 characters), an icon and a color (saved in the file as `badge:` in the front matter), and to download or copy the badge and `card.json`. `card.json` is the board as data for a dashboard: title, a status pill (`3 open` or `All done`), done/total, and a count per badge column in the badge's colors; the dialog previews it. In CI, `agile badge` and `agile card` write the same files (see [Using it in a project](#using-it-in-a-project)).
14
+ - **New** starts a blank board (To Do, Doing, Done) in the current style, after asking, since it replaces the board saved in this browser.
15
+ - **Child tasks**: the **+** on a card (on hover) or **Create child task** in the task panel adds a task under it, nested as deep as you like. Children sit indented beneath their parent with a connecting line; one moved to another column shows "↳ parent", and leaves a dotted stand-in under the parent that jumps to it. The chevron on a parent folds its children away. Saved as `- parent: t-03`.
16
+ - **History** (the clock beside Undo / Redo): a time slider with a step for every move in the tasks' history, archived ones included. It shows the board, archive and markdown as they stood then, read-only; **Now** returns to the live board. It's replayed from each task's `history:`, so deleted tasks don't appear, columns since renamed come back under their old names, and titles, tags and descriptions are today's.
17
+ - **Undo / Redo** (↶ ↷, or Ctrl/⌘ Z and Ctrl/⌘ Shift Z / Ctrl Y) step back through every change, up to 100. Typing in one field counts as one step; opening a board or starting a new one clears the history.
18
+ - **Open**: drop a `.md` file, choose one, open one from a URL (GitHub file links work) or pick a recent one.
19
+ - **Save** (Ctrl/⌘ S) writes a board served by `make dev` or the `agile` command back to its file. Otherwise
20
+ it writes to a file you pick once, then to the same file each time; browsers without a file picker
21
+ (Firefox, Safari) download it instead. **Download** always downloads `<title>.md`.
22
+ - Nine styles (Minimal, Paper, Terminal, Ocean, Ball pit, plus Graph paper, Night shift, Blueprint and Warm ledger from [Decision Ledger](https://aaronp.github.io/adr/)), with their settings stored in the file.
23
+
24
+ Edits are saved in this browser (localStorage), except for a board opened from a URL. **The `.md` file is the
25
+ real copy**, so keep it in git.
26
+
27
+ | Query | Shows |
28
+ | --- | --- |
29
+ | _(none)_ | The board saved in this browser, or the sample |
30
+ | `?src=<url>` | That markdown file (absolute, or relative to the page). It isn't saved in the browser, so it never overwrites your board. |
31
+ | `?view=` | `board` (default), `split`, `archive` or `markdown` |
32
+ | `?q=` `?tags=a,b` `?owners=a,b` | Search text and filters |
33
+ | `?task=<id>` | Opens that task, e.g. `?task=t-07` |
34
+ | `?theme=` | `minimal`, `paper`, `terminal`, `ocean`, `ballpit`, `graph`, `night`, `blueprint` or `ledger`, without changing the file. Picking a style saves it in the file. |
35
+
36
+ The address bar follows the app, so any view can be bookmarked or shared. Files on another host must allow
37
+ CORS (GitHub Pages and raw.githubusercontent.com both do).
38
+
39
+ ## Viewing locally
40
+
41
+ ```sh
42
+ make dev # serves the repo on http://localhost:8000/ and prints the example's URL
43
+ ```
44
+
45
+ Save writes the `?src=` file back to disk (any existing `.md` in the repo). The server only listens on loopback.
46
+
47
+ ## Using it in a project
48
+
49
+ The app is published to npm as [`@pritzlaff/agile`](https://www.npmjs.com/package/@pritzlaff/agile):
50
+
51
+ ```sh
52
+ bunx @pritzlaff/agile board.md # serves the board on localhost and opens it; Save writes board.md
53
+ bunx @pritzlaff/agile badge board.md # writes badge.svg beside it (or: badge board.md out-dir)
54
+ bunx @pritzlaff/agile card board.md # writes card.json
55
+ ```
56
+
57
+ The card links to `AGILE_HOST` (default `https://aaronp.github.io/agile/`) with `?src=AGILE_SRC` (default:
58
+ the path given). [`examples/bun-app`](examples/bun-app) keeps its board beside the code, with a
59
+ `make snapshot` target and a Pages workflow that publishes the board, badge and card.
60
+
61
+ ## Hosting
62
+
63
+ `.github/workflows/pages.yml` runs the tests on pushes to `main` or `master`, then publishes the app as
64
+ `index.html` with `examples/` beside it. Set Settings → Pages → Source: **GitHub Actions**; the
65
+ `github-pages` environment must allow your branch. `.md` files are served raw, without Jekyll.
66
+
67
+ ## Publishing your own board
68
+
69
+ Your board lives in its own data-only repo (`board.md`, a redirecting `index.html` and a Pages workflow),
70
+ and this repo stays the app. Create an empty repo on GitHub, then:
71
+
72
+ ```sh
73
+ git clone https://github.com/aaronp/agile.git
74
+ cd agile/examples/acme-sprint
75
+ make clone REPO=you/your-board # or ./clone.sh to be prompted
76
+ ```
77
+
78
+ This copies the example to `../your-board` as a fresh repo on `main`, points its README link at
79
+ `https://you.github.io/your-board/` and sets the `origin` remote. Edit `board.md`, commit and
80
+ `git push -u origin main`, then set Settings → Pages → Source: **GitHub Actions**.
81
+
82
+ ## Development
83
+
84
+ ```sh
85
+ make test # bun test: the format, the address bar, opening, recents, saving, the card and the CLI
86
+ ```
87
+
88
+ Releasing to npm (needs a clean tree and `npm login`):
89
+
90
+ ```sh
91
+ make bump-patch # or bump-minor / bump-major: bumps package.json, commits and tags v<version>
92
+ make publish # tests, then npm publish
93
+ git push --follow-tags
94
+ ```
95
+
96
+ | Path | What |
97
+ | --- | --- |
98
+ | `Main.dc.html` | The app: an `<x-dc>` template plus its logic (schema, markdown parser and serializer, board operations, themes, effects) |
99
+ | `support.js`, `vendor/` | The runtime that renders the template in a browser |
100
+ | `bin/agile.mjs` | The `agile` command: a local server with write-back, and `badge` / `card` (loads the logic from `Main.dc.html`) |
101
+ | `examples/acme-sprint/` | A cloneable data-only repo that points back at this app |
102
+ | `examples/bun-app/` | A Bun project using the published package for its own board |
103
+ | `app.test.ts` | Runs the logic with the browser stubbed out |
package/bin/agile.mjs ADDED
@@ -0,0 +1,98 @@
1
+ #!/usr/bin/env node
2
+ // agile <board.md | dir>: serves the app on localhost with the board's folder beside it, then opens the board.
3
+ // Files are re-read on every request; Save (Ctrl/⌘ S) writes an existing .md in that folder back (PUT).
4
+ // agile card <board.md> [out-dir]: writes card.json, the board as a dashboard card (out-dir defaults to the file's folder).
5
+ // agile badge <board.md> [out-dir]: writes badge.svg. Both follow the badge settings in the board's front matter.
6
+ // The card links to the app at AGILE_HOST (default https://aaronp.github.io/agile/) with ?src=AGILE_SRC,
7
+ // where AGILE_SRC is where the published board lives (default: the path given, relative to AGILE_HOST).
8
+ import { createServer } from 'node:http';
9
+ import { readFile, rename, stat, writeFile } from 'node:fs/promises';
10
+ import { spawn } from 'node:child_process';
11
+ import { basename, dirname, extname, join, resolve, sep } from 'node:path';
12
+ import { fileURLToPath } from 'node:url';
13
+
14
+ const app = fileURLToPath(new URL('..', import.meta.url));
15
+
16
+ /** The board logic, straight from the app page (it only needs a component base class to load). */
17
+ async function logic() {
18
+ const html = await readFile(join(app, 'Main.dc.html'), 'utf8');
19
+ const js = html.split('<script type="text/x-dc" data-dc-script')[1].split('>').slice(1).join('>').split('</script>')[0];
20
+ return new Function('DCLogic', `${js}\nreturn { parseBoard, badgeSvg, boardCard, boardLink, AGILE_HOST };`)(class {});
21
+ }
22
+
23
+ const [cmd, ...args] = process.argv.slice(2);
24
+ if (cmd === 'card' || cmd === 'badge') {
25
+ const [md, out = dirname(md ?? '')] = args;
26
+ if (!md) { console.error(`Usage: agile ${cmd} <board.md> [out-dir]`); process.exit(1); }
27
+ try {
28
+ const { parseBoard, badgeSvg, boardCard, boardLink, AGILE_HOST } = await logic();
29
+ const board = parseBoard(await readFile(md, 'utf8'));
30
+ const today = new Date().toLocaleDateString('en-CA');
31
+ const card = boardCard(board, today, { label: md, url: boardLink(process.env.AGILE_HOST || AGILE_HOST, process.env.AGILE_SRC || md) });
32
+ const [name, body] = cmd === 'card' ? ['card.json', JSON.stringify(card, null, 2) + '\n'] : ['badge.svg', badgeSvg(board) + '\n'];
33
+ await writeFile(join(out, name), body);
34
+ console.log(`Wrote ${join(out, name)}`);
35
+ process.exit(0);
36
+ } catch (e) {
37
+ console.error(`agile: ${md}: ${e.message}`);
38
+ process.exit(1);
39
+ }
40
+ }
41
+
42
+ if (!cmd || cmd === '-h' || cmd === '--help') {
43
+ console.error('Usage: agile <board.md | dir> (PORT=8000 to pick the port, NO_OPEN=1 to skip opening a browser)');
44
+ console.error(' agile card <board.md> [out-dir] (writes card.json)');
45
+ console.error(' agile badge <board.md> [out-dir] (writes badge.svg)');
46
+ process.exit(cmd ? 0 : 1);
47
+ }
48
+ const target = resolve(cmd);
49
+ const isDir = await stat(target).then((s) => s.isDirectory(), (e) => { console.error(`agile: cannot read ${cmd}: ${e.message}`); process.exit(1); });
50
+ const root = isDir ? target : dirname(target);
51
+ const APP_FILES = new Set(['/support.js', '/vendor/react.js', '/vendor/react-dom.js']);
52
+ const TYPES = { '.html': 'text/html', '.js': 'text/javascript', '.md': 'text/markdown', '.json': 'application/json', '.svg': 'image/svg+xml', '.css': 'text/css' };
53
+ /** An existing markdown file inside the served folder: the only thing a PUT may overwrite. */
54
+ const writable = (abs) => abs.startsWith(root + sep) && /\.md$/i.test(abs);
55
+
56
+ // Loopback names a browser may use for this server. Anything else in Host means DNS rebinding, so it is refused.
57
+ const hosts = (port) => new Set([`127.0.0.1:${port}`, `localhost:${port}`, `[::1]:${port}`]);
58
+ const handler = async (req, res) => {
59
+ if (!hosts(server.address().port).has(req.headers.host)) return res.writeHead(403).end('Forbidden host');
60
+ const p = decodeURIComponent(new URL(req.url, 'http://x').pathname);
61
+ const file = p === '/' ? join(app, 'Main.dc.html') : APP_FILES.has(p) ? join(app, p) : resolve(root, '.' + (p.endsWith('/') ? p + 'index.html' : p));
62
+ if (file !== join(app, 'Main.dc.html') && !APP_FILES.has(p) && !file.startsWith(root + sep)) return res.writeHead(404).end('Not found');
63
+ if (req.method === 'PUT') {
64
+ // Cross-site pages cannot get here: a PUT needs a CORS preflight, which this server never answers.
65
+ if (!writable(file) || !(await stat(file).then((s) => s.isFile(), () => false))) return res.writeHead(403).end('Not writable');
66
+ try {
67
+ const chunks = [];
68
+ for await (const c of req) chunks.push(c);
69
+ const tmp = `${file}.agile-tmp`;
70
+ await writeFile(tmp, Buffer.concat(chunks));
71
+ await rename(tmp, file); // whole file or nothing, never half-written
72
+ return res.writeHead(204).end();
73
+ } catch (e) {
74
+ return res.writeHead(500).end(e.message);
75
+ }
76
+ }
77
+ if (req.method !== 'GET' && req.method !== 'HEAD') return res.writeHead(405).end('Method not allowed');
78
+ try {
79
+ const body = await readFile(file);
80
+ const type = TYPES[extname(file).toLowerCase()] ?? 'application/octet-stream';
81
+ // x-agile-writable tells the app that Save can PUT the board back to this URL.
82
+ res.writeHead(200, { 'content-type': `${type}; charset=utf-8`, 'cache-control': 'no-store', ...(writable(file) ? { 'x-agile-writable': '1' } : {}) }).end(body);
83
+ } catch (e) {
84
+ res.writeHead(e.code === 'ENOENT' || e.code === 'EISDIR' ? 404 : 500).end(e.code === 'ENOENT' ? 'Not found' : e.message);
85
+ }
86
+ };
87
+ const server = createServer(handler);
88
+
89
+ server.listen(Number(process.env.PORT ?? 0), '127.0.0.1', () => {
90
+ const { port } = server.address();
91
+ // Also answer on ::1 so http://localhost:<port> works; skipped if IPv6 loopback is unavailable.
92
+ createServer(handler).on('error', () => {}).listen(port, '::1');
93
+ const url = `http://localhost:${port}/` + (isDir ? '' : `?src=${encodeURIComponent(basename(target))}`);
94
+ console.log(`Serving ${cmd} at ${url} (Ctrl-C to stop)`);
95
+ if (process.env.NO_OPEN) return;
96
+ const [open, argv] = process.platform === 'darwin' ? ['open', [url]] : process.platform === 'win32' ? ['cmd', ['/c', 'start', '', url]] : ['xdg-open', [url]];
97
+ spawn(open, argv, { stdio: 'ignore', detached: true }).on('error', () => {}).unref();
98
+ });
package/package.json CHANGED
@@ -1,6 +1,26 @@
1
1
  {
2
2
  "name": "@pritzlaff/agile",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "A kanban board driven by one markdown file, in one HTML page.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/aaronp/agile.git"
8
+ },
9
+ "homepage": "https://aaronp.github.io/agile/",
10
+ "type": "module",
11
+ "bin": {
12
+ "agile": "bin/agile.mjs"
13
+ },
14
+ "files": [
15
+ "bin",
16
+ "Main.dc.html",
17
+ "support.js",
18
+ "vendor"
19
+ ],
20
+ "scripts": {
21
+ "test": "bun test ./app.test.ts"
22
+ },
23
+ "publishConfig": {
24
+ "access": "public"
25
+ }
26
+ }
package/support.js ADDED
@@ -0,0 +1,48 @@
1
+ // GENERATED from dc-runtime/src/*.ts - do not edit. Rebuild with `bun build.ts` (see the package README for the source-only recipe).
2
+ "use strict";(()=>{var Mt=Object.defineProperty,Tt=(t,n,e)=>n in t?Mt(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,T=(t,n,e)=>Tt(t,typeof n!="symbol"?n+"":n,e);function L(){const t=window.React;if(!t)throw new Error("dc-runtime: window.React is not available yet");return t}function Lt(){const t=window.ReactDOM;if(!t)throw new Error("dc-runtime: window.ReactDOM is not available yet");return t}var A=((...t)=>L().createElement(...t));function Ot(t){const n=t.querySelector("x-dc");if(!n)return null;const e=t.querySelector("script[data-dc-script]"),{props:o,preview:r}=B(e?.getAttribute("data-props")??null);return{template:n.innerHTML,js:e&&e.textContent||"",props:o,preview:r}}function tt(t){const n=/<x-dc(?:\s[^>]*)?>/.exec(t);if(!n)return null;const e=t.lastIndexOf("</x-dc>");if(e===-1||e<n.index)return null;const o=t.slice(n.index+n[0].length,e),s=new DOMParser().parseFromString(t,"text/html").querySelector("script[data-dc-script]"),{props:i,preview:a}=B(s?.getAttribute("data-props")??null);return{template:o,js:s&&s.textContent||"",props:i,preview:a}}function B(t){if(!t)return{props:null,preview:null};let n;try{n=JSON.parse(t)}catch{return{props:null,preview:null}}if(!n||typeof n!="object"||Array.isArray(n))return{props:null,preview:null};const e=n,o=e.$preview&&typeof e.$preview=="object"?e.$preview:null,r={};for(const s of Object.keys(e))s[0]!=="$"&&(r[s]=e[s]);return{props:Object.keys(r).length?r:null,preview:o}}function Pt(t){let n=t||"";try{n=decodeURIComponent(n)}catch{}return(n.split("/").pop()||"Root").replace(/\.dc\.html$|\.html?$/,"")||"Root"}var Dt=`
3
+ .sc-placeholder{background:color-mix(in srgb,currentColor 8%,transparent);
4
+ border:1px solid color-mix(in srgb,currentColor 50%,transparent);
5
+ border-radius:2px;box-sizing:border-box;overflow:hidden}
6
+ @keyframes sc-shine{0%{background-position:100% 50%}100%{background-position:0% 50%}}
7
+ html.sc-dc-streaming .sc-placeholder,
8
+ html.sc-dc-streaming .sc-interp.sc-missing{position:relative;
9
+ background:color-mix(in srgb,currentColor 5%,transparent);
10
+ border-color:transparent}
11
+ html.sc-dc-streaming .sc-placeholder::before,
12
+ html.sc-dc-streaming .sc-interp.sc-missing::before{content:'';
13
+ position:absolute;inset:0;pointer-events:none;
14
+ background:linear-gradient(90deg,rgba(217,119,87,0) 25%,rgba(247,225,211,.95) 37%,rgba(217,119,87,0) 63%);
15
+ background-size:400% 100%;animation:sc-shine 1.4s ease infinite}
16
+ html.sc-dc-streaming .sc-placeholder:nth-child(n+9 of .sc-placeholder)::before,
17
+ html.sc-dc-streaming .sc-interp.sc-missing:nth-child(n+9 of .sc-interp.sc-missing)::before{animation:none;
18
+ background:color-mix(in srgb,currentColor 8%,transparent)}
19
+ .sc-placeholder-error{padding:4px 8px;font:11px/1.4 ui-monospace,monospace;
20
+ color:color-mix(in srgb,currentColor 70%,transparent);word-break:break-word}
21
+ .sc-interp.sc-missing{display:inline-block;width:2em;height:1em;overflow:hidden;
22
+ vertical-align:text-bottom;background:rgba(255,255,255,.3);border:1px solid rgba(0,0,0,.5);
23
+ border-radius:2px;box-sizing:border-box;color:transparent;
24
+ user-select:none}
25
+ .sc-interp.sc-unresolved{font-family:ui-monospace,monospace;font-size:.85em;
26
+ color:color-mix(in srgb,currentColor 50%,transparent);
27
+ background:color-mix(in srgb,currentColor 10%,transparent);border-radius:3px;
28
+ padding:0 3px}
29
+ .sc-host.sc-has-error{position:relative}
30
+ .sc-logic-error{position:absolute;top:8px;left:8px;z-index:2147483647;max-width:60ch;
31
+ padding:6px 10px;background:#b00020;color:#fff;font:12px/1.4 ui-monospace,monospace;
32
+ border-radius:4px;white-space:pre-wrap;pointer-events:none}
33
+ /* Mirrors PRINT_BASELINE_CSS in apps/web deck-stage-export.ts \u2014 keep both
34
+ in sync until dc-runtime regains a build step. */
35
+ @media print {
36
+ @page { margin: 0.5cm; }
37
+ figure, table { break-inside: avoid; }
38
+ #dc-root, #dc-root > .sc-host { height: auto; }
39
+ *, *::before, *::after {
40
+ print-color-adjust: exact; -webkit-print-color-adjust: exact;
41
+ backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
42
+ animation-delay: -99s !important; animation-duration: .001s !important;
43
+ animation-iteration-count: 1 !important; animation-fill-mode: both !important;
44
+ animation-play-state: running !important; transition-duration: 0s !important;
45
+ }
46
+ }
47
+ `,jt="html,body{height:100%;margin:0}#dc-root,#dc-root>.sc-host{height:100%}";function It(t,n){let e=n.pathname||"";if(!/\.dc\.html?$/i.test(zt(e)))try{e=new URL(t.baseURI||"/").pathname}catch{}return Pt(e)}function zt(t){try{return decodeURIComponent(t)}catch{return t}}function Ut(t,n=document){const e=Ot(n);if(!e)return null;const o=L(),r=It(n,location);t.markFetched(r),t.setRootName(r),t.adoptParsed(r,e),window.__resources||fetch(location.href).then(_=>_.ok?_.text():"").then(_=>{const u=_?tt(_):null;u?.template&&t.updateHtml(r,u.template)}).catch(()=>{});const s=n.querySelector("x-dc"),i=n.createElement("div");if(i.id="dc-root",s.replaceWith(i),!e.preview){const _=n.createElement("style");_.textContent=jt,n.head.appendChild(_)}const a=t.getDC(r),f=t.registry.get(r);function l(){const[,_]=o.useState(0);o.useEffect(()=>{const d=()=>_(g=>g+1);return f.subs.add(d),()=>{f.subs.delete(d)}},[]);const u=o.useMemo(()=>{const d={};for(const g in f.propsMeta||{}){const m=f.propsMeta?.[g]?.default;m!==void 0&&(d[g]=m)}return d},[f.propsMeta]);return A(a,{...u,...f.propOverrides||{}})}const c=Lt();return c.createRoot?c.createRoot(i).render(A(l)):c.render(A(l),i),r}var et=/^[A-Za-z_$][A-Za-z0-9_$]*/,Gt=/^-?\d+(\.\d+)?$/;function P(t,n){const e=String(n).trim();if(!e)return;if(e[0]==="("&&e[e.length-1]===")"&&Ft(e))return P(t,e.slice(1,-1));const o=Bt(e);if(o){const r=P(t,e.slice(0,o.index)),s=P(t,e.slice(o.index+o.op.length));switch(o.op){case"===":return r===s;case"!==":return r!==s;case"==":return r==s;default:return r!=s}}if(e[0]==="!")return!P(t,e.slice(1));if(e==="true")return!0;if(e==="false")return!1;if(e==="null")return null;if(e!=="undefined")return Gt.test(e)?Number(e):e.length>=2&&(e[0]==='"'||e[0]==="'")&&e[e.length-1]===e[0]?e.slice(1,-1):Wt(t,e)}function Ft(t){let n=0;for(let e=0;e<t.length-1;e++)if(t[e]==="(")n++;else if(t[e]===")"&&(n--,n===0))return!1;return!0}function Bt(t){let n=0;for(let e=0;e<t.length;e++){const o=t[e];if(o==="["||o==="(")n++;else if(o==="]"||o===")")n--;else if(n===0&&(o==="="||o==="!")&&t[e+1]==="="){if(e>0&&(t[e-1]==="="||t[e-1]==="!")||!t.slice(0,e).trim())continue;const r=t[e+2]==="="?o+"==":o+"=";return{index:e,op:r}}}return null}function Wt(t,n){const e=n.match(et);if(!e)return;let o=t?.[e[0]],r=e[0].length;for(;r<n.length;)if(n[r]==="."){const s=n.slice(r+1).match(et)||n.slice(r+1).match(/^\d+/);if(!s)return;o=o?.[s[0]],r+=1+s[0].length}else if(n[r]==="["){let s=1,i=r+1;for(;i<n.length&&s>0;){if(n[i]==="[")s++;else if(n[i]==="]"&&(s--,s===0))break;i++}if(s!==0)return;const a=P(t,n.slice(r+1,i));o=o?.[a],r=i+1}else return;return o}var W="sc-camel-",$t=new Set("a abbr b bdi bdo br cite code del dfn em i ins kbd mark q s samp small span strike strong sub sup u var wbr".split(" ")),nt={select:"sc-raw-select",table:"sc-raw-table",tbody:"sc-raw-tbody",thead:"sc-raw-thead",tfoot:"sc-raw-tfoot",tr:"sc-raw-tr",td:"sc-raw-td",th:"sc-raw-th",caption:"sc-raw-caption"},ot=Object.fromEntries(Object.entries(nt).map(([t,n])=>[n,t])),qt=new Set("allowFullScreen async autoFocus autoPlay checked controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden itemScope loop multiple muted noModule noValidate open playsInline readOnly required reversed scoped seamless selected".split(" ")),Ht={onclick:"onClick",onchange:"onChange",oninput:"onInput",onsubmit:"onSubmit",onkeydown:"onKeyDown",onkeyup:"onKeyUp",onkeypress:"onKeyPress",onmousedown:"onMouseDown",onmouseup:"onMouseUp",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onfocus:"onFocus",onblur:"onBlur",ondoubleclick:"onDoubleClick",oncontextmenu:"onContextMenu",onmousemove:"onMouseMove",onmouseover:"onMouseOver",onmouseout:"onMouseOut",onpointerdown:"onPointerDown",onpointerup:"onPointerUp",onpointermove:"onPointerMove",onpointerenter:"onPointerEnter",onpointerleave:"onPointerLeave",onpointercancel:"onPointerCancel",onpointerover:"onPointerOver",onpointerout:"onPointerOut",ongotpointercapture:"onGotPointerCapture",onlostpointercapture:"onLostPointerCapture",ontouchstart:"onTouchStart",ontouchend:"onTouchEnd",ontouchmove:"onTouchMove",ontouchcancel:"onTouchCancel",ondragstart:"onDragStart",ondragend:"onDragEnd",ondragenter:"onDragEnter",ondragleave:"onDragLeave",ondragover:"onDragOver",onanimationstart:"onAnimationStart",onanimationend:"onAnimationEnd",onanimationiteration:"onAnimationIteration",ontransitionend:"onTransitionEnd"},Vt=`(?:[^>"']|"[^"]*"|'[^']*')*`,Kt=new RegExp("<(x-import|dc-import)("+Vt+")/>","gi"),rt=`(?:=\\s*"[^"]*"|=\\s*'[^']*'|=(?!\\s*["'])|[^>=])*`,Zt=new RegExp("(<!---?>|<!--[\\s\\S]*?--!?>)|(<(script|style|textarea|title)(?=[\\s/>])"+rt+">)([\\s\\S]*?<\\/\\3(?=[\\s/>])[^>]*>)|<[a-zA-Z][^\\s/>]*(?=[\\s/>])"+rt+">","gi"),Jt=/=\s*"[^"]*"|=\s*'[^']*'|(\s)([a-z]+[A-Z][A-Za-z0-9]*)(?=\s*=)/g;function Xt(t){const n=e=>e.replace(Jt,(o,r,s)=>s===void 0?o:r+W+s.replace(/[A-Z]/g,i=>"-"+i.toLowerCase()));return t.replace(Zt,(e,o,r,s,i)=>o!==void 0?e:r?n(r)+i:n(e))}function Yt(t){t=t.replace(Kt,(n,e,o)=>"<"+e+o+"></"+e+">"),t=t.replace(/<helmet(\s|>)/gi,"<sc-helmet$1"),t=t.replace(/<\/helmet\s*>/gi,"</sc-helmet>"),t=Xt(t);for(const[n,e]of Object.entries(nt))t=t.replace(new RegExp("(</?)"+n+"(?=[\\s>])","gi"),"$1"+e);return t}function U(t){return t.replace(/-([a-z])/g,(n,e)=>e.toUpperCase())}function Qt(t){if(t.startsWith("--")||!/[a-z][A-Z]/.test(t))return t;if(t==="cssFloat")return"float";const n=t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase());return/^(webkit|moz|ms|o)-/.test(n)?"-"+n:n}function st(t){const n={};for(const e of t.split(";")){const o=e.indexOf(":");if(o<0)continue;const r=e.slice(0,o).trim();n[r.startsWith("--")?r:U(r)]=e.slice(o+1).trim()}return n}function O(t){const n=t.match(/^\s*\{\{([\s\S]+?)\}\}\s*$/);if(n){const e=n[1];return o=>P(o,e)}if(t.includes("{{")){const e=t.split(/\{\{([\s\S]+?)\}\}/g);return o=>e.map((r,s)=>s&1?P(o,r)??"":r).join("")}return()=>t}function te(t){return t==="constructor"||t==="prototype"?!1:/^(?:--[a-zA-Z0-9_-]+|[a-z][a-z0-9-]*)$/.test(t)}var ee=/^data-keyframes-(css|attr)-(.+)$/;function ne(t){const n=ee.exec(t);return n?{kind:n[1],prop:n[2]}:null}var oe=new Set(["script","style","link","meta","base","iframe","frame","embed","object","portal","template","head","html","body","animate","set","animatemotion","applet","frameset","noembed","xmp"]);function re(t){return!oe.has(t.toLowerCase())}function se(t){return!(!/^[a-z][a-z0-9-]*$/.test(t)||t.startsWith("on")||t==="srcdoc"||t==="style"||t==="class"||t==="id"||t==="is"||t==="contenteditable"||t==="key"||t==="ref"||t==="children"||t==="dangerouslysetinnerhtml"||t.startsWith("data-dc-")||t.startsWith("data-om-")||t.startsWith("data-dm-")||t.startsWith("data-react-")||t.startsWith("data-keyframes-")||t.startsWith("sc-camel-"))}var ie=new Set(["href","action","formaction","cite","ping","longdesc"]),ce=new Set(["src","srcset","poster","data","background"]);function ae(t,n){const e=String(n),o=ie.has(t);if(!o&&!ce.has(t))return e;const r=t==="srcset"?e.split(",").map(s=>s.trim().split(/\s+/)[0]??""):t==="ping"?e.trim().split(/\s+/):[e];for(const s of r)if(!le(s,o))return null;return e}function le(t,n){const e=t.replace(/[\t\n\r]/g,"").trim();if(!e)return!0;try{const o=new URL(e,"https://dc-keyframes-base.invalid/").protocol;return o==="http:"||o==="https:"||n&&(o==="mailto:"||o==="tel:")?!0:!n&&o==="data:"&&/^data:image\/(?!svg)/i.test(e.replace(/\s+/g,""))}catch{return!1}}function ue(t){let n=t;if(typeof n=="string"){const e=n.trim();if(!e)return null;const o=z.get(e);if(o!==void 0)return o;let r;try{r=JSON.parse(e)}catch{return z.set(e,null),null}const s=it(r);return z.size>512&&z.clear(),z.set(e,s),s}return it(n)}var z=new Map;function it(t){if(!Array.isArray(t))return null;const n=[];for(const e of t){if(!e||typeof e!="object"||Array.isArray(e))continue;const{t:o,v:r}=e;typeof o!="number"||!Number.isFinite(o)||(typeof r=="number"?!Number.isFinite(r):typeof r!="string")||n.push(e)}return n.length?n.sort((e,o)=>e.t-o.t):null}function fe(t,n){const e=t[0];if(n<=e.t)return e.v;const o=t[t.length-1];if(n>=o.t)return o.v;let r=0;for(;r<t.length-1&&t[r+1].t<=n;)r++;const s=t[r],i=t[r+1];if(i.t===s.t)return i.v;const a=(n-s.t)/(i.t-s.t);return me(s.v,i.v,pe(s.ease,a),a)}var ct={in:[.42,0,1,1],out:[0,0,.58,1],inOut:[.42,0,.58,1],ease:[.25,.1,.25,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]},de=/^cubic-bezier\(\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*,\s*(-?[\d.]+)\s*\)$/i;function pe(t,n){if(n<=0)return 0;if(n>=1)return 1;if(typeof t!="string"||!t||t==="linear")return n;const e=Object.hasOwn(ct,t)?ct[t]:void 0;if(e)return at(e,n);const o=de.exec(t.trim());if(o){const r=$(Number(o[1])),s=Number(o[2]),i=$(Number(o[3])),a=Number(o[4]);if([r,s,i,a].every(Number.isFinite))return at([r,s,i,a],n)}return n}function $(t){return t<0?0:t>1?1:t}function at([t,n,e,o],r){const s=3*t,i=3*(e-t)-s,a=1-s-i,f=3*n,l=3*(o-n)-f,c=1-f-l,_=v=>((a*v+i)*v+s)*v,u=v=>((c*v+l)*v+f)*v,d=v=>(3*a*v+2*i)*v+s;let g=r;for(let v=0;v<8;v++){const b=_(g)-r;if(Math.abs(b)<1e-6)return u(g);const k=d(g);if(Math.abs(k)<1e-6)break;g-=b/k}let m=0,S=1;for(g=r;S-m>1e-6;)_(g)<r?m=g:S=g,g=(m+S)/2;return u(g)}var lt=/^(-?\d*\.?\d+(?:e[-+]?\d+)?)([a-z%]*)$/i,ut=/^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,G=/-?\d*\.?\d+(?:e[-+]?\d+)?/g;function me(t,n,e,o=e){if(typeof t=="number"&&typeof n=="number")return t+(n-t)*e;const r=String(t),s=String(n),i=lt.exec(r),a=lt.exec(s);if(i&&a){const u=i[2].toLowerCase(),d=a[2].toLowerCase();if(u===d||!u||!d){const g=q(Number(i[1]),Number(a[1]),e);return ft(g)+(u||d)}return o<1?t:n}const f=ut.exec(r),l=ut.exec(s);if(f&&l)return he(f[1],l[1],e);const c=r.match(G),_=s.match(G);if(c&&_&&c.length===_.length){const u=r.split(G),d=s.split(G);if(u.length===d.length&&u.every((g,m)=>g===d[m])){let g="";for(let m=0;m<u.length;m++)if(g+=u[m],m<c.length){const S=c[m],v=_[m],b=/^-?0\d/.test(S)||/^-?0\d/.test(v);g+=b?o<1?S:v:ft(q(Number(S),Number(v),e))}return g}}return o<1?t:n}function q(t,n,e){return t+(n-t)*e}function ft(t){return String(Math.round(t*1e4)/1e4)}function he(t,n,e){const o=dt(t),r=dt(n),s=f=>Math.round($(f/255)*255).toString(16).padStart(2,"0"),i=o.length===4||r.length===4?4:3;let a="#";for(let f=0;f<i;f++)a+=s(q(o[f]??255,r[f]??255,e));return a}function dt(t){return(t.length<=4?t.split("").map(e=>e+e):t.match(/../g)??[]).map(e=>parseInt(e,16))}function H(t,n,e){const o=[],r=[];let s=!1;const i=[];let a=null;for(const{name:f,value:l}of[...t.attributes]){if(f==="sc-name"||f==="data-dc-tpl")continue;if(n==="dom"){const _=ne(f),u=!_||_.kind==="css"||re(ot[t.localName]||t.localName);_&&u&&(_.kind==="css"?te(_.prop):se(_.prop))&&i.push({kind:_.kind,prop:_.prop,getter:O(l)})}let c=f;if(c.startsWith(W)&&(c=U(c.slice(W.length))),c==="hint-size"){a=l;continue}if(c.startsWith("style-")){r.push(e.pseudoClass(c.slice(6),l));continue}if(n!=="dom")c.includes("-")&&!(n==="x-import"&&(c.startsWith("aria-")||c.startsWith("data-")))&&(c=U(c));else if(c==="class")c="className";else if(c==="for")c="htmlFor";else if(c.startsWith("on"))c=Ht[c]||"on"+c[2].toUpperCase()+c.slice(3);else if(c==="checked"&&t.localName==="input"&&!l.includes("{{")&&!e.omelette){o.push(["defaultChecked",()=>!0]),s=!0;continue}else if(l===""&&qt.has(c)&&!e.omelette){o.push([c,()=>!0]);continue}o.push([c,O(l)])}return{propGetters:o,pseudoClasses:r,hintSize:a,kfTracks:i,initialChecked:s}}var ge=new Set(["position","left","right","top","bottom","inset","width","height","z-index","transform"]),pt=t=>t.startsWith("--")?t:t.replace(/[A-Z]/g,n=>"-"+n.toLowerCase());function mt(t){const n=typeof t=="string"?st(t):t!=null&&typeof t=="object"?t:null;if(!n)return;const e={};for(const[o,r]of Object.entries(n))ge.has(pt(o))&&(e[o]=r);return Object.keys(e).length?e:void 0}function _e(t,n){const e=document.createElement("template");e.innerHTML=Yt(t);let o=0;(function i(a){a.nodeType===Node.ELEMENT_NODE&&a.setAttribute("data-dc-tpl",String(o++));for(const f of a.childNodes)i(f)})(e.content);const r=j(e.content,n),s=((i,a)=>r.map((f,l)=>f(i||{},a,l)));return s.__annotated=e.innerHTML,s}function j(t,n){return[...t.childNodes].map(e=>be(e,n)).filter(e=>e!=null)}function be(t,n){if(t.nodeType===Node.TEXT_NODE)return ye(t);if(t.nodeType!==Node.ELEMENT_NODE)return null;const e=t,o=e.tagName.toLowerCase();return o==="sc-for"?we(e,n):o==="sc-if"?ve(e,n):o==="x-import"?Se(e,n):o==="sc-helmet"?n.helmet(e):o==="dc-import"?Ee(e,n):Oe(e,n)}var ht=new Set;function gt(t,n){const e=(t?.__name||"?")+"\0"+n;ht.has(e)||(ht.add(e),console.warn("[dc-runtime] "+(t?.__name||"template")+": "+n))}function ye(t){const n=t.nodeValue??"";if(!n.includes("{{"))return!n.trim()&&!n.includes(" ")?null:()=>n;const e=n.split(/\{\{([\s\S]+?)\}\}/g);return(o,r,s)=>A(L().Fragment,{key:s},...e.map((i,a)=>{if(!(a&1))return i;const f=P(o,i);return f===void 0?r?.__streamingNow?A("span",{key:a,className:"sc-interp sc-missing"},i.trim()):document.body?.hasAttribute("data-dc-editor-on")?A("span",{key:a,className:"sc-interp sc-unresolved"},"{{ "+i.trim()+" }}"):(gt(r,"{{ "+i.trim()+" }} never resolved \u2014 rendered as empty"),null):L().isValidElement(f)||Array.isArray(f)?A(L().Fragment,{key:a},f):f===null||typeof f=="boolean"?null:A("span",{key:a,className:"sc-interp"},String(f))}))}function we(t,n){const e=O(t.getAttribute("list")||""),o=t.getAttribute("as")||"item",r=parseInt(t.getAttribute("hint-placeholder-count")||"0",10),s=j(t,n),i=t.getAttribute("list")||"";return(a,f,l)=>{let c=e(a);return Array.isArray(c)||(f?.__streamingNow?c=r>0?Array(r).fill(void 0):[]:(c!=null&&gt(f,'sc-for list="'+i+'" is not an array ('+typeof c+")"),c=[])),A(L().Fragment,{key:l},c.map((_,u)=>{const d={...a,[o]:_,$index:u};return A(L().Fragment,{key:u},s.map((g,m)=>g(d,f,m)))}))}}function ve(t,n){const e=O(t.getAttribute("value")||""),o=t.getAttribute("hint-placeholder-val"),r=o!=null?O(o):null,s=j(t,n);return(i,a,f)=>{let l=e(i);return l===void 0&&r&&a?.__streamingNow&&(l=r(i)),l?A(L().Fragment,{key:f},s.map((c,_)=>c(i,a,_))):null}}function Ee(t,n){const e=t.getAttribute("name")||t.getAttribute("component")||"";t.removeAttribute("name"),t.removeAttribute("component");const o=t.getAttribute("data-dc-tpl"),r=t.getAttribute("style");t.removeAttribute("style");const s=r!=null?O(r):null,{propGetters:i,hintSize:a}=H(t,"dc-import",n),f=j(t,n);return(l,c,_)=>{const u={key:_,__hintSize:a,__tplId:o,__hostStyle:s?mt(s(l)):void 0};for(const[d,g]of i){const m=g(l);if(d==="dcProps"){m&&typeof m=="object"&&Object.assign(u,m);continue}u[d]=m}return f.length&&(u.children=f.map((d,g)=>d(l,c,g))),A(n.component(e),u)}}function Se(t,n){const e=O(t.getAttribute("component-from-global-scope")||""),o=O(t.getAttribute("component")||t.getAttribute("name")||""),r=t.getAttribute("from")||(t.getAttribute("component-from-global-scope")?"":t.getAttribute("src")||t.getAttribute("import")||""),s=r.trim()?r.trim().split(/\s+/):[],i=s.length?s[s.length-1]:"",a=b=>/\.(jsx|tsx)(\?|#|$)/i.test(b)?"jsx":"js",f=t.getAttribute("data-dc-tpl"),l=t.getAttribute("style");t.removeAttribute("style");const c=l!=null?O(l):null,_=f!=null||c!=null,{propGetters:u,hintSize:d}=H(t,"x-import",n),m=t.children.length>0||!!(t.textContent||"").trim()?j(t,n):[],S=r.includes("{{");if(s.length&&!S){let b;for(const k of s)b=n.loadExternal(a(k),k,b)}const v=(b,k)=>{const w=b(k),p=w==null?"":String(w);return p.includes("{{")?"":p};return(b,k,w)=>{const p=v(e,b),h=p||v(o,b),y=!h||S?null:p?n.resolveExternalGlobal(i,p):n.resolveExternal(i,h),E=c?mt(c(b)):void 0,x=_?{key:w,className:"sc-host-x","data-dc-tpl":f,style:E||{display:"contents"}}:null;if(!y){const C=S?"x-import `from` cannot contain {{ \u2026 }} \u2014 module URLs are resolved at parse time; use a literal URL":n.resolveExternalError(i,h),N=n.placeholder({key:x?void 0:w,name:h,hintSize:d,error:C});return x?A("div",x,N):N}const R=x?{}:{key:w};let M=!1;for(const[C,N]of u){if(C==="component"||C==="componentFromGlobalScope"||C==="from")continue;const D=N(b);if(D===void 0&&(M=!0),C==="dcProps"){D&&typeof D=="object"&&Object.assign(R,D);continue}R[C]=D}if(M&&k?.__htmlStreamingNow){const C=n.placeholder({key:x?void 0:w,name:h,hintSize:d,error:null});return x?A("div",x,C):C}return m.length&&(R.children=m.map((C,N)=>C(b,k,N))),x?A("div",x,A(y,R)):A(y,R)}}function xe(t){const n=t.cloneNode(!0);for(const r of n.querySelectorAll("*"))for(;r.attributes.length;)r.removeAttribute(r.attributes[0].name);const e=n.innerHTML;let o=5381;for(let r=0;r<e.length;r++)o=(o<<5)+o+e.charCodeAt(r)|0;return e.length+"."+(o>>>0).toString(36)}var ke=new Set("script style textarea option title select canvas iframe video audio".split(" ")),Ae=":not("+[...$t].join(",")+")",_t=/-{0,2}[A-Za-z_][A-Za-z0-9_-]*/y,Ce=/^(?:behavior|-moz-binding)$/i,bt=/[ \t\n\r\f]/;function Ne(t){let n="",e=0,o=0,r=!0;const s=t.length;for(;e<s;){if(r){let a=e;for(;a<s&&bt.test(t[a]);)a++;if(t[a]==="/"&&t[a+1]==="*"){const l=t.indexOf("*/",a+2),c=l<0?s:l+2;n+=t.slice(e,c),e=c;continue}r=!1,_t.lastIndex=a;const f=_t.exec(t);if(f){let l=a+f[0].length;for(;;){for(;l<s&&bt.test(t[l]);)l++;if(t[l]!=="/"||t[l+1]!=="*")break;const c=t.indexOf("*/",l+2);l=c<0?s:c+2}if(t[l]===":"){const c=Qt(f[0]);n+=t.slice(e,a)+(Ce.test(c)?f[0]:c),e=a+f[0].length;continue}}}const i=t[e];if(i==='"'||i==="'"){let a=e+1;for(;a<s&&t[a]!==i;)a+=t[a]==="\\"?2:1;n+=t.slice(e,a+1),e=a+1;continue}if(i==="/"&&t[e+1]==="*"){const a=t.indexOf("*/",e+2),f=a<0?s:a+2;n+=t.slice(e,f),e=f;continue}if(i==="\\"){n+=t.slice(e,e+2),e+=2;continue}i==="("||i==="{"||i==="["?o++:i===")"||i==="}"||i==="]"?o=Math.max(0,o-1):i===";"&&o===0&&(r=!0),n+=i,e++}return n}function Re(t,n){return t==null?void 0:t+"\0"+n.join(";")}function Me(t,n){const e=Re(t,n);return o=>{if(!o||o.__dcCss===e)return;o.__dcCss=e;const r=o.style,s=n.map(i=>[i,r.getPropertyValue(i)]);r.cssText=t?Ne(t):"";for(let i=r.length;i-- >0;){const a=r[i];if(!r.getPropertyPriority(a))continue;const f=r.getPropertyValue(a);f&&r.setProperty(a,f),r.getPropertyPriority(a)&&r.removeProperty(a)}for(const[i,a]of s)a&&r.setProperty(i,a)}}function Te(t,n){typeof t=="function"?t(n):t.current=n}function yt(t,n,e,o){let r=t.get(e);return r||(t.size>=n&&t.delete(t.keys().next().value),t.set(e,r=o())),r}var wt=new WeakMap;function Le(){const t=new Map;return(n,e,o)=>{const r=(n==null?"none":"css:"+n)+"\0"+e.join(";"),s=()=>Me(n,e);if(o==null||typeof o!="function"&&typeof o!="object")return yt(t,64,r,s);let i=wt.get(o);return i||wt.set(o,i=new Map),yt(i,1024,r,()=>{const a=s();return f=>{a(f),Te(o,f)}})}}function Oe(t,n){const e=ot[t.localName]||t.localName,o=t.getAttribute("data-dc-tpl"),r=t.childNodes.length>0&&!ke.has(e)&&t.querySelector(Ae)===null,{propGetters:s,pseudoClasses:i,kfTracks:a,initialChecked:f}=H(t,"dom",n),l=(r?"|"+xe(t):"")+(f?"|checked":""),c=j(t,n),_=n.omelette?null:Le();return(u,d,g)=>{const m={key:g+l,"data-dc-tpl":o};let S=null;for(const[b,k]of s){let w=k(u);b==="style"&&typeof w=="string"&&(S=w,w=st(w)),(b==="value"||b==="checked")&&w===void 0&&(w=b==="checked"?!1:""),m[b]=w}i.length&&(m.className=[m.className,...i].filter(Boolean).join(" "));const v=[];if(a.length){const b=n.keyframesPlayhead?n.keyframesPlayhead():0;let k=null;for(const w of a){const p=ue(w.getter(u));if(!p)continue;const h=fe(p,b);if(w.kind==="css")v.push(w.prop),k||(k=m.style&&typeof m.style=="object"?{...m.style}:{},m.style=k),k[w.prop.startsWith("--")?w.prop:U(w.prop)]=h;else{const y=ae(w.prop,h);y!=null&&(m[w.prop]=y)}}}if(_){const b=S==null&&m.style&&typeof m.style=="object"?Object.keys(m.style).map(pt):v;m.ref=_(S,b.sort(),m.ref)}return A(e,m,...c.map((b,k)=>b(u,d,k)))}}var Pe=10,vt=300,De=t=>t.length>vt?t.slice(0,vt-1)+"\u2026":t;function je(t,n,e){const o=new Map;let r=null,s=!1;const i=()=>{if(e()){n(i);return}s=!1;const f=[...new Set(o.values())].slice(0,Pe).map(c=>({message:De(c)})),l=JSON.stringify(f);l!==r&&(r=l,t(f))},a=()=>{s||(s=!0,n(i))};return{show(f){const l={};return o.set(l,f),a(),()=>{o.delete(l),a()}},begin:a}}var V=null;function Ie(t){V=t}function Et(t){return V?.show(t)}function ze(){V?.begin()}var I=class{constructor(t){T(this,"props"),T(this,"state",{}),T(this,"__host"),this.props=t||{}}setState(t,n){this.__host&&this.__host.__setLogicState(t,n)}forceUpdate(){this.__host&&this.__host.forceUpdate()}componentDidMount(){}componentDidUpdate(t){}componentWillUnmount(){}renderVals(){return{}}};function Ue(t){return new Function("DCLogic","StreamableLogic","React",t+`
48
+ ;return (typeof Component!=="undefined"&&Component)||undefined;`)(I,I,L())}function Ge(t,n){if(!n)return!1;const e=Object.keys(t).filter(r=>r!=="children"),o=Object.keys(n).filter(r=>r!=="children");if(e.length!==o.length)return!1;for(const r of e)if(t[r]!==n[r])return!1;return!0}var K,St=t=>t.chrome?{className:t.className,"data-omelette-chrome":""}:{className:t.className};function Z(t){return K?A(K,t):A("div",St(t),t.message)}function F({name:t,hintSize:n,streaming:e,error:o}){const[r,s]=(n||"100%,60px").split(","),i=o?(t?t+": ":"")+o:null;return A("div",{className:"sc-placeholder"+(e?" sc-streaming":""),style:{width:r.trim(),height:s&&s.trim()},title:t},i?Z({className:"sc-placeholder-error",message:i}):null)}function Fe(t){if(!t)return;const[n,e]=t.split(",");return{minWidth:n.trim(),minHeight:e&&e.trim()}}function Be(t,n,e=()=>{}){const o=L();K=class extends o.Component{constructor(){super(...arguments),T(this,"off")}componentDidMount(){this.off=Et(this.props.message)}componentDidUpdate(f){f.message!==this.props.message&&(this.off?.(),this.off=Et(this.props.message))}componentWillUnmount(){this.off?.()}render(){return A("div",St(this.props),this.props.message)}};const r=o.createContext([]);class s extends o.Component{constructor(l){super(l),T(this,"__name"),T(this,"__sub"),T(this,"__needsDidMount",!1),T(this,"__streamingNow",!1),T(this,"__htmlStreamingNow",!1),T(this,"__failedLogic",null),T(this,"__failedUserProps",null),T(this,"__failedVer",-1),T(this,"__ctorError",null),T(this,"logic"),this.__name=l.__name,this.state={__v:0,__err:null},this.__sub=()=>{this.state.__err&&this.setState({__err:null}),this.forceUpdate()},this.__makeLogic(t.get(this.__name).Logic,null),n(this.__name)}static getDerivedStateFromError(l){return{__err:l instanceof Error&&l.message?l.message:String(l)}}componentDidCatch(l,c){console.error("[dc-runtime] render error in <"+this.__name+">:",l,c?.componentStack||"")}__makeLogic(l,c){const _=l||I;try{this.logic=new _(this.__userProps()),this.__failedLogic=null,this.__failedUserProps=null,this.__ctorError=null}catch(u){console.error(u),this.__failedLogic=l,this.__failedUserProps=this.__userProps(),this.__failedVer=t.get(this.__name).ver,this.__ctorError=this.__name+": "+(u instanceof Error&&u.message?u.message:String(u)),this.logic=new I(this.__userProps())}this.logic.__host=this,c&&(this.logic.state={...this.logic.state||{},...c})}__userProps(){const{__name:l,__hintSize:c,__tplId:_,__hostStyle:u,...d}=this.props;return d}__setLogicState(l,c){const _=this.logic.state,u=typeof l=="function"?l(_):l;this.logic.state={..._,...u},this.setState(d=>({__v:d.__v+1}),c)}__reconcileLogic(){const l=t.get(this.__name),c=l.Logic,_=this.logic.constructor;if(!(c===_||!c&&_===I||c===this.__failedLogic&&l.ver===this.__failedVer&&Ge(this.__userProps(),this.__failedUserProps))){if(!this.__needsDidMount)try{this.logic.componentWillUnmount()}catch(u){console.error(u)}this.__makeLogic(c,this.logic.state),this.__needsDidMount=!0}}componentDidMount(){t.get(this.__name).subs.add(this.__sub);try{this.logic.componentDidMount()}catch(l){console.error(l)}}componentDidUpdate(l){if(this.logic.props=this.__userProps(),this.__needsDidMount){if(this.state.__err||!t.get(this.__name).tpl)return;this.__needsDidMount=!1;try{this.logic.componentDidMount()}catch(c){console.error(c)}}else try{this.logic.componentDidUpdate(l)}catch(c){console.error(c)}}componentWillUnmount(){if(t.get(this.__name).subs.delete(this.__sub),!this.__needsDidMount)try{this.logic.componentWillUnmount()}catch(l){console.error(l)}}render(){e(this.__name);const l=t.get(this.__name),c="sc-host"+(l.htmlStreaming?" sc-streaming-html":"")+(l.jsStreaming?" sc-streaming-js":""),_=l.htmlStreaming?Fe(this.props.__hintSize):void 0,u=this.props.__hostStyle||_?{..._||{},...this.props.__hostStyle||{}}:void 0,d={className:c,style:u,"data-sc-name":this.__name,"data-dc-tpl":this.props.__tplId},g=Array.isArray(this.context)?this.context:[];if(g.includes(this.__name)){const b=[...g.slice(g.indexOf(this.__name)),this.__name].join(" \u2192 ");return A("div",{...d,className:c+" sc-has-error"},A(F,{name:this.__name,hintSize:this.props.__hintSize,error:"circular import: "+b}))}if(this.state.__err)return A("div",{...d,className:c+" sc-has-error"},Z({className:"sc-logic-error",message:this.__name+": "+this.state.__err,chrome:!0}),A(F,{name:this.__name,hintSize:this.props.__hintSize,error:this.state.__err}));if(this.__reconcileLogic(),!l.tpl)return A("div",d,A(F,{name:this.__name,hintSize:this.props.__hintSize}));const m=this.__userProps();this.logic.props=m;let S=m,v=l.logicError||this.__ctorError;try{S={...m,...this.logic.renderVals()||{}}}catch(b){console.error(b),v=this.__name+".renderVals(): "+(b instanceof Error&&b.message?b.message:String(b))}return this.__streamingNow=!!(l.htmlStreaming||l.jsStreaming),this.__htmlStreamingNow=!!l.htmlStreaming,A("div",{...d,className:c+(v?" sc-has-error":"")},v&&Z({className:"sc-logic-error",message:v,chrome:!0}),A(r.Provider,{value:[...g,this.__name]},l.tpl(S,this)))}}T(s,"contextType",r);const i=new Map;function a(f){const l=i.get(f);if(l)return l;function c(_){const[,u]=o.useState(0);return o.useEffect(()=>{const d=()=>u(g=>g+1);return t.get(f).subs.add(d),()=>{t.get(f).subs.delete(d)}},[]),n(f),A(s,{..._,__name:f})}return c.displayName=f,i.set(f,c),c}return{getDC:a,StreamableComponent:s}}function J(t){const n=window.__resourceBlobs,e=n?n[t.split("#")[0]]:void 0;return e instanceof Blob?e:null}var We="https://cdn.jsdelivr.net/npm/react@18.3.1/umd/react.production.min.js",$e="sha384-DGyLxAyjq0f9SPpVevD6IgztCFlnMF6oW/XQGmfe+IsZ8TqEiDrcHkMLKI6fiB/Z",qe="https://cdn.jsdelivr.net/npm/react-dom@18.3.1/umd/react-dom.production.min.js",He="sha384-gTGxhz21lVGYNMcdJOyq01Edg0jhn/c22nsx0kyqP0TxaV5WVdsSH1fSDUf5YJj1",Ve="https://cdn.jsdelivr.net/npm/@babel/standalone@7.29.0/babel.min.js",Ke="sha384-m08KidiNqLdpJqLq95G/LEi8Qvjl/xUYll3QILypMoQ65QorJ9Lvtp2RXYGBFj1y";function X(t,n){const e=window.__resources,o=e?e[t]:void 0;return typeof o=="string"&&o?{src:o}:{src:t,integrity:n}}var xt=t=>!t.includes(".")&&t.includes("-");function Y(t){return typeof t=="function"?!Je(t):typeof t=="object"&&t!==null&&typeof t.$$typeof=="symbol"}function Q(t,n){let e=t;for(const o of n.split(".")){if(e==null)return;e=e[o]}return e}var kt=50,At=3e4;function Ze(t){const n=new Map;let e=null;const o=new Map,r=new Set;function s(){if(window.Babel)return Promise.resolve();if(e)return e;const u=X(Ve,Ke);return e=new Promise((d,g)=>{const m=document.createElement("script");m.src=u.src,u.integrity&&(m.integrity=u.integrity,m.crossOrigin="anonymous"),m.onload=()=>d(),m.onerror=g,document.head.appendChild(m)}),e}const i=new Map;function a(u,d,g){const m=i.get(d);if(m)return m;n.set(d,null),console.info("[dc-runtime] x-import: loading",d,"("+u+")");const v=Promise.all([u==="jsx"?s():Promise.resolve(),g??Promise.resolve()]).then(()=>{const b=J(d);return b?b.text():fetch(d).then(k=>{if(!k.ok)throw new Error("HTTP "+k.status);return k.text()})}).then(b=>{const k=u==="jsx"?window.Babel.transform(b,{filename:d,presets:["react","typescript"]}).code:b,w={exports:{}},p=new Set(Object.keys(window));new Function("React","module","exports","require",k)(L(),w,w.exports,()=>({}));const h={};for(const y of Object.keys(window))!p.has(y)&&typeof window[y]=="function"&&(h[y]=window[y]);n.set(d,{mod:w.exports,globals:h}),console.info("[dc-runtime] x-import: loaded",d,"\u2014 exports:",Object.keys(w.exports),"window globals:",Object.keys(h)),t()}).catch(b=>{n.set(d,{mod:{},globals:{},error:"failed to load: "+(b instanceof Error&&b.message?b.message:String(b))}),console.error("[dc-runtime] x-import: FAILED to load",d,"("+u+")",b),t()});return i.set(d,v),v}function f(u,d){const g=n.get(u);if(!g)return null;const{mod:m,globals:S}=g,v=m&&m[d]||S&&S[d]||typeof window<"u"&&window[d]||m&&m.default;if(typeof v=="function")return v;const b=u+"\0"+d;return o.has(b)||(o.set(b,g.error||'no export named "'+d+'" (has: '+Object.keys(m).join(", ")+")"),console.error("[dc-runtime] x-import: module",u,"loaded but has no component named",JSON.stringify(d),"\u2014 available exports:",Object.keys(m),"window globals:",Object.keys(S),". The module must `module.exports = {"+d+"}` or set `window."+d+"`.")),null}function l(u){if(r.has(u))return;r.add(u);const d=Date.now(),g=xt(u),m=()=>{if(g?customElements.get(u):Y(Q(window,u))){r.delete(u),t();return}if(Date.now()-d>=At){console.warn("[dc-runtime] x-import: global",JSON.stringify(u),"never appeared on window after "+At+"ms");return}setTimeout(m,kt)};setTimeout(m,kt)}function c(u,d){const g=xt(d);if(!u){if(g)return customElements.get(d)?d:(l(d),null);const b=Q(window,d);return Y(b)?b:(l(d),null)}const m=n.get(u);if(!m)return null;if(g&&customElements.get(d))return d;const S=m.globals[d]??Q(window,d);if(Y(S))return S;if(d.includes("."))return null;const v=u+"\0global\0"+d;return o.has(v)||(o.set(v,null),g&&!customElements.get(d)&&console.warn("[dc-runtime] x-import:",u,"loaded but no custom element",JSON.stringify(d),"is registered and window."+d+" is not a function \u2014 rendering <"+d+"> as an unknown element.")),d}function _(u,d){const g=n.get(u);return g?.error?g.error:o.get(u+"\0"+d)||null}return{load:a,resolve:f,resolveGlobal:c,getError:_}}function Je(t){try{return typeof t=="function"&&typeof HTMLElement<"u"&&t.prototype instanceof HTMLElement}catch{return!1}}var Xe=".fx{display:flex}.col{display:flex;flex-direction:column}.grid{display:grid}.ac{align-items:center}.jc{justify-content:center}.jb{justify-content:space-between}.f1{flex:1}.noshrink{flex-shrink:0}.wrap{flex-wrap:wrap}.fw5{font-weight:500}.fw6{font-weight:600}.fw7{font-weight:700}.fw8{font-weight:800}.fs11{font-size:11px}.fs12{font-size:12px}.fs13{font-size:13px}.fs14{font-size:14px}.fs15{font-size:15px}.fs16{font-size:16px}.fs20{font-size:20px}.fs22{font-size:22px}.upper{text-transform:uppercase}.tc{text-align:center}.nowrap{white-space:nowrap}.gap8{gap:8px}.gap10{gap:10px}.gap12{gap:12px}.gap16{gap:16px}.gap24{gap:24px}.m0{margin:0}.mt8{margin-top:8px}.mt12{margin-top:12px}.mt16{margin-top:16px}.mb8{margin-bottom:8px}.mb12{margin-bottom:12px}.mb16{margin-bottom:16px}.posrel{position:relative}.posabs{position:absolute}.round{border-radius:50%}.ohide{overflow:hidden}.bbox{box-sizing:border-box}.pointer{cursor:pointer}.w100{width:100%}.b0{border:none}",Ye=/<meta\b[^>]*\bname\s*=\s*["']design_doc_mode["'][^>]*\b(?:content|value)\s*=\s*["'](\w+)["']/i,Qe="#ededeb",tn="#171717",en="#f0eee6",nn="#2e2c26";function on(t,n,e={}){const o=new Set,r=new Map;let s=null,i=null,a="light";try{const u=t.documentElement.dataset.theme;a=u==="dark"||u==="light"?u:new URLSearchParams(t.defaultView?.location.search??"").get("theme")==="dark"?"dark":"light"}catch{}function f(){if(!i)return;const u=e.omelette?a==="dark"?nn:en:a==="dark"?tn:Qe;i.textContent=`html,body{background:${u}}#dc-root>.sc-host{position:relative}`}function l(u){if(window.parent!==window)try{window.parent.postMessage({type:"__dc_design_mode",mode:u},"*")}catch{}}function c(u){u!==s&&(s=u,l(u),u==="canvas"?(t.documentElement.setAttribute("data-dc-canvas",""),i=t.createElement("style"),i.setAttribute("data-dc-canvas",""),f(),t.head.appendChild(i)):(t.documentElement.removeAttribute("data-dc-canvas"),i?.remove(),i=null))}window.addEventListener("message",u=>{const d=u.data&&u.data.type;if(d==="__dc_theme"){const g=u.data.theme;(g==="light"||g==="dark")&&(a=g,f());return}!s||d!=="__dc_probe"||l(s)});function _(u){const d=[...u.children],g=u.nextSibling!=null||u.parentNode?.nextSibling!=null;if(u.hasAttribute("data-dc-atomics")&&!o.has("__dc-atomics")){o.add("__dc-atomics");const m=t.createElement("style");m.id="__dc-atomics",m.textContent=Xe,t.head.appendChild(m)}return(m,S)=>{const v=S&&S.__name||"",b=!!(v&&n(v));for(let k=0;k<d.length;k++){const w=d[k],p=w.tagName,h=b&&!g&&k===d.length-1;if(p==="SCRIPT"){if(h)continue;const y="SCRIPT|"+(w.getAttribute("src")||w.textContent||"");if(o.has(y))continue;o.add(y);const E=t.createElement("script");for(const{name:x,value:R}of[...w.attributes])E.setAttribute(x,R);w.textContent&&(E.textContent=w.textContent),t.head.appendChild(E)}else if(p==="LINK"||p==="META"){if(h)continue;const y=p+"|"+(w.getAttribute("href")||w.getAttribute("src")||w.outerHTML);if(o.has(y))continue;if(o.add(y),p==="LINK"){const E=(w.getAttribute("rel")||"").toLowerCase().split(/\s+/),x=(w.getAttribute("href")||"").trim(),R=window.__resources,M=R&&E.includes("stylesheet")&&!E.includes("alternate")?R[x]:void 0,C=typeof M=="string"&&M?J(M):null;if(C){const N=t.createElement("style");w.hasAttribute("disabled")?N.setAttribute("media","not all"):w.getAttribute("media")&&N.setAttribute("media",w.getAttribute("media")),w.getAttribute("title")&&N.setAttribute("title",w.getAttribute("title")),C.text().then(D=>{N.textContent=D}),t.head.appendChild(N);continue}}t.head.appendChild(w.cloneNode(!0))}else{const y=v+"|"+k;let E=r.get(y);(!E||E.tagName!==p)&&(E&&E.remove(),E=t.createElement(p.toLowerCase()),r.set(y,E),t.head.appendChild(E));for(const{name:x,value:R}of[...w.attributes])E.getAttribute(x)!==R&&E.setAttribute(x,R);E.textContent!==w.textContent&&(E.textContent=w.textContent)}}return null}}return{compile:_,setDesignDocMode:c}}function Ct(t,n){if(t[n]!=="u"&&t[n]!=="U"||t.slice(n,n+4).toLowerCase()!=="url("||/[a-z0-9_-]/i.test(t[n-1]??""))return-1;let e=n+4;for(;e<t.length&&/\s/.test(t[e]);)e++;if(t[e]==='"'||t[e]==="'")return-1;for(;e<t.length&&t[e]!==")";)t[e]==="\\"&&e++,e++;return e<t.length?e+1:t.length}function rn(t){let n="",e="";for(let o=0;o<t.length;o++){const r=t[o];if(e){if(r==="\\"){n+=r+(t[o+1]??""),o++;continue}r===e&&(e=""),n+=r}else if(r==="'"||r==='"')e=r,n+=r;else if(r==="/"&&t[o+1]==="*"){const s=t.indexOf("*/",o+2);o=s===-1?t.length:s+1,n+=" "}else{const s=Ct(t,o);s===-1?n+=r:(n+=t.slice(o,s),o=s-1)}}return n}function sn(t){t=rn(t);const n=[];let e=0,o=0,r="";for(let s=0;s<t.length;s++){const i=t[s];if(r)i==="\\"?s++:i===r&&(r="");else if(i==="'"||i==='"')r=i;else if(i==="(")o++;else if(i===")")o=Math.max(0,o-1);else if(i===";"&&o===0)n.push(t.slice(e,s)),e=s+1;else{const a=Ct(t,s);a!==-1&&(s=a-1)}}return n.push(t.slice(e)),n.map(s=>s.trim()).filter(Boolean).map(s=>/!\s*important$/i.test(s)?s:s+" !important").join(";")}function cn(t){let n=null;const e=new Map;let o=0;return(r,s)=>{const i=r+"|"+s,a=e.get(i);if(a)return a;n||(n=t.createElement("style"),t.head.appendChild(n));const f="scp"+(o++).toString(36),l=r==="before"||r==="after",c=l?"."+f+"::"+r:"."+f+":"+r;return n.sheet.insertRule(c+"{"+(l?s:sn(s))+"}",n.sheet.cssRules.length),e.set(i,f),f}}function an(){const t=Object.create(null);function n(o){return t[o]||(t[o]={html:"",tpl:null,Logic:null,jsStreaming:!1,htmlStreaming:!1,ver:0,subs:new Set,fetched:!1})}function e(o){const r=n(o);r.ver++;for(const s of r.subs)s()}return{entries:t,get:n,bump:e,bumpAll(){for(const o in t)e(o)}}}var ln=".";function un(t=document,n={}){const e=n.omelette===!0,o=an(),r=cn(t),s=on(t,p=>o.get(p).htmlStreaming,{omelette:e}),i=Ze(()=>o.bumpAll()),a=Be(o,_,g),f={component:p=>a.getDC(p),placeholder:p=>A(F,p),helmet:p=>s.compile(p),loadExternal:(p,h,y)=>i.load(p,h,y),resolveExternal:(p,h)=>i.resolve(p,h),resolveExternalGlobal:(p,h)=>i.resolveGlobal(p,h),resolveExternalError:(p,h)=>i.getError(p,h),pseudoClass:r,keyframesPlayhead:()=>l,omelette:e};let l=0;function c(p){const h=typeof p=="number"&&Number.isFinite(p)?Math.max(0,p):0;h!==l&&(l=h,o.bumpAll())}function _(p){const h=o.get(p);if(h.fetched)return;h.fetched=!0;const y=ln+"/"+encodeURIComponent(p)+".dc.html",E=window.__resources,x=E?E[y]:void 0,R=typeof x=="string"&&x?x:y,M=J(R);(M?M.text():fetch(R).then(C=>C.ok?C.text():(console.error('[dc-runtime] sibling fetch for "'+p+'" failed:',y,"returned",C.status,"\u2014 the reference renders as an empty placeholder."),""))).then(C=>{if(!C)return;const N=tt(C);if(!N){console.error('[dc-runtime] sibling fetch for "'+p+'":',y,"has no <x-dc> block \u2014 not a Design Component.");return}N.props&&(h.propsMeta=N.props),N.preview&&(h.preview=N.preview),N.template&&!h.html&&m(p,N.template),N.js&&!h.Logic&&S(p,N.js)}).catch(C=>console.error('[dc-runtime] sibling fetch for "'+p+'" threw:',y,C))}let u=null;function d(p,h){h.tplStale=!1;try{h.tpl=_e(h.html,f)}catch(y){console.error("[dc-runtime] template compile FAILED for",p,y)}}function g(p){const h=o.get(p);h.tplStale&&d(p,h)}function m(p,h){const y=o.get(p);if(y.html=h,p===u){const E=Ye.exec(h)?.[1]??null;(E||!y.htmlStreaming)&&s.setDesignDocMode(E)}y.subs.size===0?y.tplStale=!0:d(p,y),o.bump(p)}function S(p,h){const y=o.get(p),E=y.jsSeq=(y.jsSeq||0)+1;try{const x=Ue(h);if(y.jsSeq!==E)return;typeof x!="function"?y.logicError=p+".dc.html: <script data-dc-script> must define `class Component extends DCLogic`":(y.logicError=null,y.Logic=x)}catch(x){if(y.jsSeq!==E)return;console.error("[dc-runtime] logic class eval FAILED for",p,"\u2014 the template renders with props only.",x),y.logicError=p+": "+(x instanceof Error&&x.message?x.message:String(x))}o.bump(p)}function v(p,h,y){const E=o.get(p);h==="html"?E.htmlStreaming=!!y:E.jsStreaming=!!y;let x=!1;for(const R in o.entries){const M=o.entries[R];if(M&&(M.htmlStreaming||M.jsStreaming)){x=!0;break}}t.documentElement.classList.toggle("sc-dc-streaming",x),o.bump(p)}function b(p,h,y,E){if(E&&(o.get(p).fetched=!0),h==="html")v(p,"html",!!E),m(p,y);else if(h==="js")v(p,"js",!!E),E||S(p,y);else if(h==="props"){const{props:x,preview:R}=B(y),M=o.get(p);M.propsMeta=x??void 0,M.preview=R,o.bump(p)}}function k(p,h){o.get(p).propOverrides=h&&typeof h=="object"?{...h}:null,o.bump(p)}function w(p,h){if(!h)return;const y=o.get(p);h.props&&(y.propsMeta=h.props),h.preview&&(y.preview=h.preview),h.template&&m(p,h.template),h.js&&S(p,h.js)}return{registry:o,getDC:a.getDC,updateHtml:m,updateJs:S,dcUpdate:b,setProps:k,seekKeyframes:c,keyframesPlayhead:()=>l,adoptParsed:w,setRootName:p=>{u=p},markFetched:p=>{o.get(p).fetched=!0},annotatedTemplate:p=>{g(p);const h=o.get(p);return h.tpl&&h.tpl.__annotated||null},templateSource:p=>o.get(p).html||null,StreamableLogic:I}}function fn(t=6e4,n=Date.now){const e=new Map,o=r=>{const s=e.get(r);return s===void 0?!1:n()-s>t?(e.delete(r),!1):!0};return{push(r,s,i){i!=="dc-model"&&(s?e.set(r,n()):e.delete(r))},live(r){if(r!==void 0)return o(r);for(const s of[...e.keys()])if(o(s))return!0;return!1}}}var Nt="[dc] Something in this page tried to replace one of the Design runtime's functions, most likely a second copy of the runtime. It was stopped so that edits keep showing here. If the page loads support.js or a copy of it a second time, remove the extra script tag or <x-import>.";function dn(t){const n=t.__dcHostRuntime===!0;try{delete t.__dcHostRuntime}catch{}return n}function pn(t,n,e,o=()=>!1){for(const[r,s]of Object.entries(n)){if(e&&r.startsWith("__dc")){let i=s;const a=()=>i;try{Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:a,set:f=>{if(!o())throw new TypeError(Nt);i=f}})}catch{}if(Object.getOwnPropertyDescriptor(t,r)?.get===a)continue}Object.assign(t,{[r]:s})}}function mn(){const t=document.createElement("style");t.textContent="x-dc{display:none!important}",document.head.appendChild(t)}function Rt(t,n){return new Promise((e,o)=>{const r=document.createElement("script");r.src=t,n&&(r.integrity=n,r.crossOrigin="anonymous"),r.async=!1,r.onload=()=>e(),r.onerror=()=>o(new Error(`failed to load ${t}`)),document.head.appendChild(r)})}function hn(){const t=window;if(t.React&&t.ReactDOM)return Promise.resolve();const n=X(We,$e),e=X(qe,He);return Promise.all([Rt(n.src,n.integrity),Rt(e.src,e.integrity)]).then(()=>{})}var gn=dn(window);function _n(){const t=window.__dcRuntimeMode==="omelette",n=un(document,{omelette:t});let e="Root",o=!1,r=!1;const s=document.createElement("style");s.textContent=Dt,document.head.prepend(s);const i=()=>{if(window.parent===window)return;const c=n.registry.entries[e];try{window.parent.postMessage({type:"__dc_booted",rootName:e,mounted:o,propsMeta:c&&c.propsMeta||null,preview:c&&c.preview||null,tellsErrors:!0},"*")}catch{}},a=fn();window.parent!==window&&Ie(je(c=>{try{const _={type:"__dc_render_errors",errors:c};window.parent.postMessage(_,"*")}catch{}},c=>{setTimeout(c,200)},()=>a.live()));const f={__dcUpdate:(c,_,u,d,g)=>{a.push(c,d,g),n.dcUpdate(c,_,u,d),c===e&&!d&&_==="props"&&i()},__dcStreaming:c=>a.live(c),__dcSetProps:(c,_)=>n.setProps(c,_),__dcSeekKeyframes:c=>n.seekKeyframes(c),__dcKeyframesPlayhead:()=>n.keyframesPlayhead(),__dcRootName:()=>e,__dcAnnotatedTemplate:c=>n.annotatedTemplate(c),__dcTemplateSource:c=>n.templateSource(c),__dcBoot:()=>{const c=Ut(n,document);c!=null&&(e=c,o=!0),i(),ze()},__dcRegistry:n.registry.entries,getDC:c=>n.getDC(c),DCLogic:n.StreamableLogic,StreamableLogic:n.StreamableLogic};pn(window,{...f,__dcContentKeyed:!0},gn,()=>r&&!o);const l=()=>{try{f.__dcBoot()}finally{r=!0}};document.readyState!=="loading"?l():document.addEventListener("DOMContentLoaded",l)}mn(),hn().then(_n).catch(t=>{throw t instanceof Error&&t.message===Nt?console.error(t.message):console.error("[dc] failed to load React or boot:",t),t})})();