diff --git a/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-003.json b/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-003.json index 0a5a5900..d13bbb47 100644 --- a/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-003.json +++ b/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-003.json @@ -24,5 +24,5 @@ "Run `cd integrations/bricks/admin-app && npm run build` and confirm exit code 0" ], "blocked_reason": null, - "findings": "All steps implemented successfully. Created cheatsheet-data.js with variableGroups (14 categories), classGroups (5 categories), and miscTokens. Created CheatsheetTab.svelte with search, view mode toggle (All/Variables/Classes), collapsible details sections, and total counts display. Updated App.svelte to import CheatsheetTab, hide SaveBar on read-only tabs (cheatsheet, hooks, variables, classes). Added cheatsheet tab to PHP class-admin-page.php and index.html dev harness. Build passes (vite build exits 0). Bundle grew from ~62KB to ~84KB due to the static cheatsheet data." + "findings": "All steps implemented successfully. Created cheatsheet-data.js with variableGroups (14 categories) plus miscTokens (displayed as a 15th Misc group), classGroups (5 categories). Created CheatsheetTab.svelte with search, view mode toggle (All/Variables/Classes), collapsible details sections, and total counts display. Updated App.svelte to import CheatsheetTab, hide SaveBar on read-only tabs (cheatsheet, hooks, variables, classes). Added cheatsheet tab to PHP class-admin-page.php and index.html dev harness. Build passes (vite build exits 0). Bundle grew from ~62KB to ~84KB due to the static cheatsheet data." } diff --git a/.agents/tasks/task-admin-panel-full-api-cheatsheet/task.json b/.agents/tasks/task-admin-panel-full-api-cheatsheet/task.json index a0fa44a0..9a82cb01 100644 --- a/.agents/tasks/task-admin-panel-full-api-cheatsheet/task.json +++ b/.agents/tasks/task-admin-panel-full-api-cheatsheet/task.json @@ -1,7 +1,14 @@ { "task_id": "task-admin-panel-full-api-cheatsheet", "task_description": "Expand the Svelte admin panel to cover the entire public API (variables, classes, bundle settings, hooks) and add a Cheatsheet tab with a searchable index of all CSS custom properties and classes in the framework with descriptions.", - "status": "in_progress", + "status": "completed", "feature_order": ["FEAT-001", "FEAT-002", "FEAT-003"], - "blocked_reason": null + "blocked_reason": null, + "verification": { + "build": "pass", + "tests": "pass", + "test_quality": "skipped", + "docker_build": "skipped", + "summary": "npm run build exits 0, producing app.js (84KB) and app.css (11KB). All review issues resolved. Semantic review v2 approved." + } } diff --git a/integrations/bricks/admin-app/src/components/BundleTab.svelte b/integrations/bricks/admin-app/src/components/BundleTab.svelte index b0ccf2f7..3e982b72 100644 --- a/integrations/bricks/admin-app/src/components/BundleTab.svelte +++ b/integrations/bricks/admin-app/src/components/BundleTab.svelte @@ -10,6 +10,7 @@ let saving = $state(false); let saved = $state(false); let error = $state(''); + let savedTimer = null; async function handleSave() { saving = true; @@ -18,7 +19,8 @@ try { await saveSettings({ html_font_size: fontSize }); saved = true; - setTimeout(() => { saved = false; }, 3000); + if (savedTimer) clearTimeout(savedTimer); + savedTimer = setTimeout(() => { saved = false; savedTimer = null; }, 3000); } catch (e) { error = e.message || 'Save failed'; } finally { diff --git a/integrations/bricks/admin-app/src/components/CheatsheetTab.svelte b/integrations/bricks/admin-app/src/components/CheatsheetTab.svelte index 3df5247d..0b8d7fe9 100644 --- a/integrations/bricks/admin-app/src/components/CheatsheetTab.svelte +++ b/integrations/bricks/admin-app/src/components/CheatsheetTab.svelte @@ -59,22 +59,26 @@ type="search" class="cheatsheet__search" placeholder="Search tokens or classes..." + aria-label="Search tokens or classes" bind:value={search} />
diff --git a/integrations/bricks/admin-app/src/components/ClassesTab.svelte b/integrations/bricks/admin-app/src/components/ClassesTab.svelte index 81a3c1ea..1e25c2f1 100644 --- a/integrations/bricks/admin-app/src/components/ClassesTab.svelte +++ b/integrations/bricks/admin-app/src/components/ClassesTab.svelte @@ -86,6 +86,11 @@ .category__toggle:hover { background: #f6f7f7; } + .category__toggle:focus-visible { + outline: 2px solid #2271b1; + outline-offset: 2px; + border-radius: 4px; + } .category__arrow { font-size: 10px; diff --git a/integrations/bricks/admin-app/src/components/VariablesTab.svelte b/integrations/bricks/admin-app/src/components/VariablesTab.svelte index 8b7fa791..358fe18d 100644 --- a/integrations/bricks/admin-app/src/components/VariablesTab.svelte +++ b/integrations/bricks/admin-app/src/components/VariablesTab.svelte @@ -157,6 +157,11 @@ .category__toggle:hover { background: #f6f7f7; } + .category__toggle:focus-visible { + outline: 2px solid #2271b1; + outline-offset: 2px; + border-radius: 4px; + } .category__arrow { font-size: 10px; diff --git a/integrations/bricks/assets/admin-app/app.css b/integrations/bricks/assets/admin-app/app.css index 16e4637d..dc6f62ea 100644 --- a/integrations/bricks/assets/admin-app/app.css +++ b/integrations/bricks/assets/admin-app/app.css @@ -1 +1 @@ -.tab-nav.svelte-yyiz68{display:flex;gap:2px;border-bottom:1px solid #c3c4c7;flex-wrap:wrap}.tab-nav__btn.svelte-yyiz68{background:transparent;border:1px solid transparent;border-bottom:none;padding:8px 14px;cursor:pointer;font-size:14px;color:#2c3338;border-radius:4px 4px 0 0}.tab-nav__btn.svelte-yyiz68:hover{background:#f0f0f1}.tab-nav__btn.active.svelte-yyiz68{background:#fff;border-color:#c3c4c7;margin-bottom:-1px;color:#1d2327;font-weight:500}.row.svelte-1es83p3{display:grid;grid-template-columns:220px 1fr;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #f0f0f1}.row.svelte-1es83p3:last-child{border-bottom:none}.row__label.svelte-1es83p3 label:where(.svelte-1es83p3){font-weight:500;display:block;color:#1d2327}.row__var.svelte-1es83p3{display:inline-block;margin-top:4px;background:#f6f7f7;padding:1px 6px;border-radius:3px;font-size:11px;color:#50575e}.row__inputs.svelte-1es83p3{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.row__swatch.svelte-1es83p3{width:28px;height:28px;border-radius:4px;border:1px solid #c3c4c7;flex-shrink:0}.row__hex.svelte-1es83p3{width:44px;height:28px;padding:0;border:1px solid #8c8f94;border-radius:3px;cursor:pointer;background:#fff}.row__hex-text.svelte-1es83p3{width:110px}.row__raw.svelte-1es83p3{flex:1;min-width:240px;font-family:ui-monospace,monospace}.row__toggle.svelte-1es83p3{background:transparent;border:none;color:#2271b1;cursor:pointer;padding:4px 8px;font-size:12px;text-decoration:underline}.row__toggle.svelte-1es83p3:hover{color:#135e96}h2.svelte-1vle0rm{margin-top:0}.status-heading.svelte-1vle0rm{margin-top:24px}.hint.svelte-1vle0rm{color:#50575e;margin-bottom:16px;max-width:720px}.rows.svelte-1vle0rm{border:1px solid #f0f0f1;border-radius:4px;padding:0 12px;background:#fcfcfd}h2.svelte-1nfz83c{margin-top:0}.hint.svelte-1nfz83c{color:#50575e;margin-bottom:16px;max-width:720px}.hint.svelte-1nfz83c code:where(.svelte-1nfz83c){background:#f0f0f1;padding:1px 6px;border-radius:3px;font-size:90%}.category.svelte-1nfz83c{border:1px solid #f0f0f1;border-radius:4px;margin-bottom:4px;background:#fcfcfd}.category__toggle.svelte-1nfz83c{all:unset;display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;cursor:pointer;font-size:14px;font-weight:500}.category__toggle.svelte-1nfz83c:hover{background:#f6f7f7}.category__arrow.svelte-1nfz83c{font-size:10px;width:14px;text-align:center}.category__count.svelte-1nfz83c{color:#787c82;font-weight:400;font-size:13px}.category__list.svelte-1nfz83c{list-style:none;margin:0;padding:0 12px 12px 34px;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:4px}.category__list.svelte-1nfz83c li:where(.svelte-1nfz83c) code:where(.svelte-1nfz83c){font-size:12px;background:#f0f0f1;padding:2px 6px;border-radius:3px;word-break:break-all}h2.svelte-1yljizh{margin-top:0}.hint.svelte-1yljizh{color:#50575e;margin-bottom:16px;max-width:720px}.category.svelte-1yljizh{border:1px solid #f0f0f1;border-radius:4px;margin-bottom:4px;background:#fcfcfd}.category__toggle.svelte-1yljizh{all:unset;display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;cursor:pointer;font-size:14px;font-weight:500}.category__toggle.svelte-1yljizh:hover{background:#f6f7f7}.category__arrow.svelte-1yljizh{font-size:10px;width:14px;text-align:center}.category__count.svelte-1yljizh{color:#787c82;font-weight:400;font-size:13px}.category__list.svelte-1yljizh{list-style:none;margin:0;padding:0 12px 12px 34px;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:4px}.category__list.svelte-1yljizh li:where(.svelte-1yljizh) code:where(.svelte-1yljizh){font-size:12px;background:#f0f0f1;padding:2px 6px;border-radius:3px}h2.svelte-13231hj{margin-top:0}.settings-heading.svelte-13231hj{margin-top:24px}.hint.svelte-13231hj{color:#50575e;margin-bottom:16px;max-width:720px}.info.svelte-13231hj{display:grid;grid-template-columns:max-content 1fr;gap:4px 16px;margin-bottom:24px;font-size:14px}.info.svelte-13231hj dt:where(.svelte-13231hj){font-weight:500}.info.svelte-13231hj dd:where(.svelte-13231hj){margin:0;color:#50575e}.setting-row.svelte-13231hj{margin-bottom:16px}.setting-row.svelte-13231hj label:where(.svelte-13231hj){display:block;font-weight:500;margin-bottom:6px}.setting-row.svelte-13231hj select:where(.svelte-13231hj){padding:6px 10px;border:1px solid #8c8f94;border-radius:4px;font-size:14px}.description.svelte-13231hj{color:#50575e;font-size:13px;margin-top:6px}.save-row.svelte-13231hj{display:flex;align-items:center;gap:12px;margin-top:16px}.save-btn.svelte-13231hj{background:#2271b1;color:#fff;border:none;padding:8px 16px;border-radius:4px;cursor:pointer;font-size:13px;font-weight:500}.save-btn.svelte-13231hj:hover{background:#135e96}.save-btn.svelte-13231hj:disabled{opacity:.6;cursor:not-allowed}.status.svelte-13231hj{font-size:13px;font-weight:500}.status--ok.svelte-13231hj{color:#00a32a}.status--err.svelte-13231hj{color:#d63638}h2.svelte-a36hjt{margin-top:0}.hint.svelte-a36hjt{color:#50575e;margin-bottom:20px;max-width:720px}.hook.svelte-a36hjt{border:1px solid #f0f0f1;border-radius:4px;padding:16px;margin-bottom:12px;background:#fcfcfd}.hook__name.svelte-a36hjt{margin:0 0 8px;font-size:14px}.hook__name.svelte-a36hjt code:where(.svelte-a36hjt){background:#e7e8ea;padding:3px 8px;border-radius:3px;font-size:13px}.hook__desc.svelte-a36hjt{margin:0 0 8px;color:#1d2327;font-size:14px}.hook__params.svelte-a36hjt{margin:0 0 12px;font-size:13px;color:#50575e}.hook__params.svelte-a36hjt code:where(.svelte-a36hjt){background:#f0f0f1;padding:1px 4px;border-radius:2px;font-size:12px}.hook__example.svelte-a36hjt{margin:0;padding:12px;background:#1d2327;color:#e4e6e8;border-radius:4px;overflow-x:auto;font-size:12px;line-height:1.5}.hook__example.svelte-a36hjt code:where(.svelte-a36hjt){background:none;padding:0;color:inherit}.cheatsheet.svelte-osej3t{display:flex;flex-direction:column;gap:16px}.cheatsheet__header.svelte-osej3t h2:where(.svelte-osej3t){margin:0 0 4px;font-size:18px}.cheatsheet__counts.svelte-osej3t{margin:0;font-size:13px;color:#50575e}.cheatsheet__controls.svelte-osej3t{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.cheatsheet__search.svelte-osej3t{flex:1;min-width:200px;padding:6px 10px;border:1px solid #c3c4c7;border-radius:4px;font-size:13px}.cheatsheet__search.svelte-osej3t:focus{border-color:#2271b1;outline:none;box-shadow:0 0 0 1px #2271b1}.cheatsheet__view-toggle.svelte-osej3t{display:flex;gap:0}.cheatsheet__view-toggle.svelte-osej3t button:where(.svelte-osej3t){padding:5px 12px;border:1px solid #c3c4c7;background:#fff;font-size:12px;cursor:pointer;color:#50575e}.cheatsheet__view-toggle.svelte-osej3t button:where(.svelte-osej3t):first-child{border-radius:3px 0 0 3px}.cheatsheet__view-toggle.svelte-osej3t button:where(.svelte-osej3t):last-child{border-radius:0 3px 3px 0}.cheatsheet__view-toggle.svelte-osej3t button:where(.svelte-osej3t):not(:first-child){border-left:none}.cheatsheet__view-toggle.svelte-osej3t button.active:where(.svelte-osej3t){background:#2271b1;border-color:#2271b1;color:#fff}.cheatsheet__section.svelte-osej3t{display:flex;flex-direction:column;gap:8px}.cheatsheet__section-title.svelte-osej3t{font-size:15px;margin:8px 0 0;padding-bottom:6px;border-bottom:1px solid #e2e4e7}.cheatsheet__group.svelte-osej3t{border:1px solid #e2e4e7;border-radius:4px;overflow:hidden}.cheatsheet__group-header.svelte-osej3t{padding:8px 12px;background:#f6f7f7;cursor:pointer;font-size:13px;display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}.cheatsheet__group-header.svelte-osej3t::-webkit-details-marker{margin-right:4px}.cheatsheet__group-desc.svelte-osej3t{font-size:12px;color:#646970;font-weight:400}.cheatsheet__list.svelte-osej3t{list-style:none;margin:0;padding:0}.cheatsheet__item.svelte-osej3t{display:flex;align-items:baseline;gap:12px;padding:5px 12px;border-top:1px solid #f0f0f1;font-size:12px;line-height:1.5}.cheatsheet__item.svelte-osej3t:first-child{border-top:1px solid #e2e4e7}.cheatsheet__name.svelte-osej3t{flex-shrink:0;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,monospace;font-size:11.5px;background:#f0f0f1;padding:1px 5px;border-radius:3px;color:#1e1e1e;white-space:nowrap}.cheatsheet__desc.svelte-osej3t{color:#50575e;font-size:12px}.cheatsheet__empty.svelte-osej3t{text-align:center;color:#646970;padding:32px 16px;font-style:italic}.stub.svelte-16jucnb h2:where(.svelte-16jucnb){margin-top:0}.muted.svelte-16jucnb{color:#50575e}code.svelte-16jucnb{background:#f0f0f1;padding:1px 6px;border-radius:3px;font-size:90%}.slashed-preview.svelte-g79qke{background:#fff;border:1px solid #c3c4c7;border-radius:4px;padding:20px;margin-top:8px}.slashed-preview.svelte-g79qke h3:where(.svelte-g79qke){margin-top:0}.slashed-preview__swatches.svelte-g79qke{display:flex;gap:10px;margin-top:10px;flex-wrap:wrap}.slashed-preview__swatch.svelte-g79qke{width:56px;height:56px;border-radius:6px;border:1px solid #c3c4c7;display:flex;align-items:flex-end;justify-content:center;font-size:10px;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.5);padding:4px}.slashed-preview__buttons.svelte-g79qke{display:flex;gap:8px;margin-top:14px}.slashed-preview__btn.svelte-g79qke{color:#fff;padding:8px 16px;border-radius:4px;font-weight:500;border:none;cursor:default}.slashed-preview__caption.svelte-g79qke{margin-top:16px;color:#50575e;font-size:12px}.slashed-preview__caption.svelte-g79qke code:where(.svelte-g79qke){display:block;background:#f6f7f7;padding:8px;border-radius:3px;margin-top:4px;white-space:pre-wrap;font-size:11px;max-height:120px;overflow:auto}.bar.svelte-1oj49qa{position:fixed;bottom:0;left:160px;right:0;background:#fff;border-top:2px solid #c3c4c7;padding:10px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;z-index:100;transition:border-color .15s}.bar.dirty.svelte-1oj49qa{border-top-color:#2271b1}.bar__status.svelte-1oj49qa{font-size:13px}.bar__dirty.svelte-1oj49qa{color:#2271b1;font-weight:500}.bar__pending.svelte-1oj49qa{color:#50575e}.bar__saved.svelte-1oj49qa{color:#00a32a;font-weight:500}.bar__clean.svelte-1oj49qa{color:#50575e}.bar__error.svelte-1oj49qa{color:#d63638;font-weight:500}.bar__actions.svelte-1oj49qa{display:flex;gap:8px}.bar__save.svelte-1oj49qa,.bar__reset.svelte-1oj49qa{padding:6px 14px;border-radius:3px;border:1px solid #2271b1;background:#fff;color:#2271b1;cursor:pointer;font-size:13px}.bar__save.svelte-1oj49qa{background:#2271b1;color:#fff}.bar__save.svelte-1oj49qa:disabled,.bar__reset.svelte-1oj49qa:disabled{opacity:.5;cursor:not-allowed}.bar__reset.svelte-1oj49qa{border-color:#d63638;color:#d63638}@media(max-width:782px){.bar.svelte-1oj49qa{left:0}}.slashed-svelte-admin.svelte-1n46o8q{--gap: 16px;display:flex;flex-direction:column;gap:var(--gap);max-width:1100px;padding-bottom:80px}.slashed-svelte-admin__header.svelte-1n46o8q h1:where(.svelte-1n46o8q){display:flex;align-items:center;gap:12px;margin:0}.slashed-svelte-admin__header.svelte-1n46o8q .badge:where(.svelte-1n46o8q){font-size:11px;font-weight:500;background:#2271b1;color:#fff;padding:3px 8px;border-radius:999px;letter-spacing:.04em;text-transform:uppercase}.muted.svelte-1n46o8q{color:#50575e;margin:4px 0 0}.slashed-svelte-admin__body.svelte-1n46o8q{background:#fff;border:1px solid #c3c4c7;border-radius:4px;padding:20px} +.tab-nav.svelte-yyiz68{display:flex;gap:2px;border-bottom:1px solid #c3c4c7;flex-wrap:wrap}.tab-nav__btn.svelte-yyiz68{background:transparent;border:1px solid transparent;border-bottom:none;padding:8px 14px;cursor:pointer;font-size:14px;color:#2c3338;border-radius:4px 4px 0 0}.tab-nav__btn.svelte-yyiz68:hover{background:#f0f0f1}.tab-nav__btn.active.svelte-yyiz68{background:#fff;border-color:#c3c4c7;margin-bottom:-1px;color:#1d2327;font-weight:500}.row.svelte-1es83p3{display:grid;grid-template-columns:220px 1fr;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #f0f0f1}.row.svelte-1es83p3:last-child{border-bottom:none}.row__label.svelte-1es83p3 label:where(.svelte-1es83p3){font-weight:500;display:block;color:#1d2327}.row__var.svelte-1es83p3{display:inline-block;margin-top:4px;background:#f6f7f7;padding:1px 6px;border-radius:3px;font-size:11px;color:#50575e}.row__inputs.svelte-1es83p3{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.row__swatch.svelte-1es83p3{width:28px;height:28px;border-radius:4px;border:1px solid #c3c4c7;flex-shrink:0}.row__hex.svelte-1es83p3{width:44px;height:28px;padding:0;border:1px solid #8c8f94;border-radius:3px;cursor:pointer;background:#fff}.row__hex-text.svelte-1es83p3{width:110px}.row__raw.svelte-1es83p3{flex:1;min-width:240px;font-family:ui-monospace,monospace}.row__toggle.svelte-1es83p3{background:transparent;border:none;color:#2271b1;cursor:pointer;padding:4px 8px;font-size:12px;text-decoration:underline}.row__toggle.svelte-1es83p3:hover{color:#135e96}h2.svelte-1vle0rm{margin-top:0}.status-heading.svelte-1vle0rm{margin-top:24px}.hint.svelte-1vle0rm{color:#50575e;margin-bottom:16px;max-width:720px}.rows.svelte-1vle0rm{border:1px solid #f0f0f1;border-radius:4px;padding:0 12px;background:#fcfcfd}h2.svelte-1nfz83c{margin-top:0}.hint.svelte-1nfz83c{color:#50575e;margin-bottom:16px;max-width:720px}.hint.svelte-1nfz83c code:where(.svelte-1nfz83c){background:#f0f0f1;padding:1px 6px;border-radius:3px;font-size:90%}.category.svelte-1nfz83c{border:1px solid #f0f0f1;border-radius:4px;margin-bottom:4px;background:#fcfcfd}.category__toggle.svelte-1nfz83c{all:unset;display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;cursor:pointer;font-size:14px;font-weight:500}.category__toggle.svelte-1nfz83c:hover{background:#f6f7f7}.category__toggle.svelte-1nfz83c:focus-visible{outline:2px solid #2271b1;outline-offset:2px;border-radius:4px}.category__arrow.svelte-1nfz83c{font-size:10px;width:14px;text-align:center}.category__count.svelte-1nfz83c{color:#787c82;font-weight:400;font-size:13px}.category__list.svelte-1nfz83c{list-style:none;margin:0;padding:0 12px 12px 34px;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:4px}.category__list.svelte-1nfz83c li:where(.svelte-1nfz83c) code:where(.svelte-1nfz83c){font-size:12px;background:#f0f0f1;padding:2px 6px;border-radius:3px;word-break:break-all}h2.svelte-1yljizh{margin-top:0}.hint.svelte-1yljizh{color:#50575e;margin-bottom:16px;max-width:720px}.category.svelte-1yljizh{border:1px solid #f0f0f1;border-radius:4px;margin-bottom:4px;background:#fcfcfd}.category__toggle.svelte-1yljizh{all:unset;display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;cursor:pointer;font-size:14px;font-weight:500}.category__toggle.svelte-1yljizh:hover{background:#f6f7f7}.category__toggle.svelte-1yljizh:focus-visible{outline:2px solid #2271b1;outline-offset:2px;border-radius:4px}.category__arrow.svelte-1yljizh{font-size:10px;width:14px;text-align:center}.category__count.svelte-1yljizh{color:#787c82;font-weight:400;font-size:13px}.category__list.svelte-1yljizh{list-style:none;margin:0;padding:0 12px 12px 34px;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:4px}.category__list.svelte-1yljizh li:where(.svelte-1yljizh) code:where(.svelte-1yljizh){font-size:12px;background:#f0f0f1;padding:2px 6px;border-radius:3px}h2.svelte-13231hj{margin-top:0}.settings-heading.svelte-13231hj{margin-top:24px}.hint.svelte-13231hj{color:#50575e;margin-bottom:16px;max-width:720px}.info.svelte-13231hj{display:grid;grid-template-columns:max-content 1fr;gap:4px 16px;margin-bottom:24px;font-size:14px}.info.svelte-13231hj dt:where(.svelte-13231hj){font-weight:500}.info.svelte-13231hj dd:where(.svelte-13231hj){margin:0;color:#50575e}.setting-row.svelte-13231hj{margin-bottom:16px}.setting-row.svelte-13231hj label:where(.svelte-13231hj){display:block;font-weight:500;margin-bottom:6px}.setting-row.svelte-13231hj select:where(.svelte-13231hj){padding:6px 10px;border:1px solid #8c8f94;border-radius:4px;font-size:14px}.description.svelte-13231hj{color:#50575e;font-size:13px;margin-top:6px}.save-row.svelte-13231hj{display:flex;align-items:center;gap:12px;margin-top:16px}.save-btn.svelte-13231hj{background:#2271b1;color:#fff;border:none;padding:8px 16px;border-radius:4px;cursor:pointer;font-size:13px;font-weight:500}.save-btn.svelte-13231hj:hover{background:#135e96}.save-btn.svelte-13231hj:disabled{opacity:.6;cursor:not-allowed}.status.svelte-13231hj{font-size:13px;font-weight:500}.status--ok.svelte-13231hj{color:#00a32a}.status--err.svelte-13231hj{color:#d63638}h2.svelte-a36hjt{margin-top:0}.hint.svelte-a36hjt{color:#50575e;margin-bottom:20px;max-width:720px}.hook.svelte-a36hjt{border:1px solid #f0f0f1;border-radius:4px;padding:16px;margin-bottom:12px;background:#fcfcfd}.hook__name.svelte-a36hjt{margin:0 0 8px;font-size:14px}.hook__name.svelte-a36hjt code:where(.svelte-a36hjt){background:#e7e8ea;padding:3px 8px;border-radius:3px;font-size:13px}.hook__desc.svelte-a36hjt{margin:0 0 8px;color:#1d2327;font-size:14px}.hook__params.svelte-a36hjt{margin:0 0 12px;font-size:13px;color:#50575e}.hook__params.svelte-a36hjt code:where(.svelte-a36hjt){background:#f0f0f1;padding:1px 4px;border-radius:2px;font-size:12px}.hook__example.svelte-a36hjt{margin:0;padding:12px;background:#1d2327;color:#e4e6e8;border-radius:4px;overflow-x:auto;font-size:12px;line-height:1.5}.hook__example.svelte-a36hjt code:where(.svelte-a36hjt){background:none;padding:0;color:inherit}.cheatsheet.svelte-osej3t{display:flex;flex-direction:column;gap:16px}.cheatsheet__header.svelte-osej3t h2:where(.svelte-osej3t){margin:0 0 4px;font-size:18px}.cheatsheet__counts.svelte-osej3t{margin:0;font-size:13px;color:#50575e}.cheatsheet__controls.svelte-osej3t{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.cheatsheet__search.svelte-osej3t{flex:1;min-width:200px;padding:6px 10px;border:1px solid #c3c4c7;border-radius:4px;font-size:13px}.cheatsheet__search.svelte-osej3t:focus{border-color:#2271b1;outline:none;box-shadow:0 0 0 1px #2271b1}.cheatsheet__view-toggle.svelte-osej3t{display:flex;gap:0}.cheatsheet__view-toggle.svelte-osej3t button:where(.svelte-osej3t){padding:5px 12px;border:1px solid #c3c4c7;background:#fff;font-size:12px;cursor:pointer;color:#50575e}.cheatsheet__view-toggle.svelte-osej3t button:where(.svelte-osej3t):first-child{border-radius:3px 0 0 3px}.cheatsheet__view-toggle.svelte-osej3t button:where(.svelte-osej3t):last-child{border-radius:0 3px 3px 0}.cheatsheet__view-toggle.svelte-osej3t button:where(.svelte-osej3t):not(:first-child){border-left:none}.cheatsheet__view-toggle.svelte-osej3t button.active:where(.svelte-osej3t){background:#2271b1;border-color:#2271b1;color:#fff}.cheatsheet__section.svelte-osej3t{display:flex;flex-direction:column;gap:8px}.cheatsheet__section-title.svelte-osej3t{font-size:15px;margin:8px 0 0;padding-bottom:6px;border-bottom:1px solid #e2e4e7}.cheatsheet__group.svelte-osej3t{border:1px solid #e2e4e7;border-radius:4px;overflow:hidden}.cheatsheet__group-header.svelte-osej3t{padding:8px 12px;background:#f6f7f7;cursor:pointer;font-size:13px;display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}.cheatsheet__group-header.svelte-osej3t::-webkit-details-marker{margin-right:4px}.cheatsheet__group-desc.svelte-osej3t{font-size:12px;color:#646970;font-weight:400}.cheatsheet__list.svelte-osej3t{list-style:none;margin:0;padding:0}.cheatsheet__item.svelte-osej3t{display:flex;align-items:baseline;gap:12px;padding:5px 12px;border-top:1px solid #f0f0f1;font-size:12px;line-height:1.5}.cheatsheet__item.svelte-osej3t:first-child{border-top:1px solid #e2e4e7}.cheatsheet__name.svelte-osej3t{flex-shrink:0;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,monospace;font-size:11.5px;background:#f0f0f1;padding:1px 5px;border-radius:3px;color:#1e1e1e;white-space:nowrap}.cheatsheet__desc.svelte-osej3t{color:#50575e;font-size:12px}.cheatsheet__empty.svelte-osej3t{text-align:center;color:#646970;padding:32px 16px;font-style:italic}.stub.svelte-16jucnb h2:where(.svelte-16jucnb){margin-top:0}.muted.svelte-16jucnb{color:#50575e}code.svelte-16jucnb{background:#f0f0f1;padding:1px 6px;border-radius:3px;font-size:90%}.slashed-preview.svelte-g79qke{background:#fff;border:1px solid #c3c4c7;border-radius:4px;padding:20px;margin-top:8px}.slashed-preview.svelte-g79qke h3:where(.svelte-g79qke){margin-top:0}.slashed-preview__swatches.svelte-g79qke{display:flex;gap:10px;margin-top:10px;flex-wrap:wrap}.slashed-preview__swatch.svelte-g79qke{width:56px;height:56px;border-radius:6px;border:1px solid #c3c4c7;display:flex;align-items:flex-end;justify-content:center;font-size:10px;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.5);padding:4px}.slashed-preview__buttons.svelte-g79qke{display:flex;gap:8px;margin-top:14px}.slashed-preview__btn.svelte-g79qke{color:#fff;padding:8px 16px;border-radius:4px;font-weight:500;border:none;cursor:default}.slashed-preview__caption.svelte-g79qke{margin-top:16px;color:#50575e;font-size:12px}.slashed-preview__caption.svelte-g79qke code:where(.svelte-g79qke){display:block;background:#f6f7f7;padding:8px;border-radius:3px;margin-top:4px;white-space:pre-wrap;font-size:11px;max-height:120px;overflow:auto}.bar.svelte-1oj49qa{position:fixed;bottom:0;left:160px;right:0;background:#fff;border-top:2px solid #c3c4c7;padding:10px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;z-index:100;transition:border-color .15s}.bar.dirty.svelte-1oj49qa{border-top-color:#2271b1}.bar__status.svelte-1oj49qa{font-size:13px}.bar__dirty.svelte-1oj49qa{color:#2271b1;font-weight:500}.bar__pending.svelte-1oj49qa{color:#50575e}.bar__saved.svelte-1oj49qa{color:#00a32a;font-weight:500}.bar__clean.svelte-1oj49qa{color:#50575e}.bar__error.svelte-1oj49qa{color:#d63638;font-weight:500}.bar__actions.svelte-1oj49qa{display:flex;gap:8px}.bar__save.svelte-1oj49qa,.bar__reset.svelte-1oj49qa{padding:6px 14px;border-radius:3px;border:1px solid #2271b1;background:#fff;color:#2271b1;cursor:pointer;font-size:13px}.bar__save.svelte-1oj49qa{background:#2271b1;color:#fff}.bar__save.svelte-1oj49qa:disabled,.bar__reset.svelte-1oj49qa:disabled{opacity:.5;cursor:not-allowed}.bar__reset.svelte-1oj49qa{border-color:#d63638;color:#d63638}@media(max-width:782px){.bar.svelte-1oj49qa{left:0}}.slashed-svelte-admin.svelte-1n46o8q{--gap: 16px;display:flex;flex-direction:column;gap:var(--gap);max-width:1100px;padding-bottom:80px}.slashed-svelte-admin__header.svelte-1n46o8q h1:where(.svelte-1n46o8q){display:flex;align-items:center;gap:12px;margin:0}.slashed-svelte-admin__header.svelte-1n46o8q .badge:where(.svelte-1n46o8q){font-size:11px;font-weight:500;background:#2271b1;color:#fff;padding:3px 8px;border-radius:999px;letter-spacing:.04em;text-transform:uppercase}.muted.svelte-1n46o8q{color:#50575e;margin:4px 0 0}.slashed-svelte-admin__body.svelte-1n46o8q{background:#fff;border:1px solid #c3c4c7;border-radius:4px;padding:20px} diff --git a/integrations/bricks/assets/admin-app/app.js b/integrations/bricks/assets/admin-app/app.js index 14f0a670..618654b3 100644 --- a/integrations/bricks/assets/admin-app/app.js +++ b/integrations/bricks/assets/admin-app/app.js @@ -1,10 +1,10 @@ -var Vn=Object.defineProperty;var zr=e=>{throw TypeError(e)};var Gn=(e,t,s)=>t in e?Vn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var le=(e,t,s)=>Gn(e,typeof t!="symbol"?t+"":t,s),Ks=(e,t,s)=>t.has(e)||zr("Cannot "+s);var c=(e,t,s)=>(Ks(e,t,"read from private field"),s?s.call(e):t.get(e)),T=(e,t,s)=>t.has(e)?zr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),S=(e,t,s,r)=>(Ks(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),P=(e,t,s)=>(Ks(e,t,"access private method"),s);var gr=Array.isArray,Un=Array.prototype.indexOf,wt=Array.prototype.includes,Hs=Array.from,Yn=Object.defineProperty,os=Object.getOwnPropertyDescriptor,Kn=Object.getOwnPropertyDescriptors,Wn=Object.prototype,Zn=Array.prototype,Zr=Object.getPrototypeOf,Lr=Object.isExtensible;const Xn=()=>{};function Jn(e){for(var t=0;t{e=r,t=n});return{promise:s,resolve:e,reject:t}}function sr(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const s=[];for(const r of e)if(s.push(r),s.length===t)break;return s}const te=2,Yt=4,Vs=8,Jr=1<<24,Re=16,Pe=32,lt=64,rr=128,Ee=512,Q=1024,ee=2048,Ve=4096,ne=8192,De=16384,zt=32768,Rr=1<<25,Kt=65536,Ds=1<<17,Qn=1<<18,Jt=1<<19,ei=1<<20,He=1<<25,jt=65536,Ps=1<<21,It=1<<22,ot=1<<23,ls=Symbol("$state"),ti=Symbol(""),js=Symbol("attributes"),nr=Symbol("class"),ir=Symbol("style"),rs=Symbol("text"),As=Symbol("form reset"),Gs=new class extends Error{constructor(){super(...arguments);le(this,"name","StaleReactionError");le(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function si(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function ri(e,t,s){throw new Error("https://svelte.dev/e/each_key_duplicate")}function ni(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ii(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ai(e){throw new Error("https://svelte.dev/e/effect_orphan")}function oi(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function li(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ci(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function fi(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ui(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const di=1,vi=2,Qr=4,hi=8,pi=16,_i=1,gi=2,J=Symbol("uninitialized"),en="http://www.w3.org/1999/xhtml";function mi(){console.warn("https://svelte.dev/e/derived_inert")}function bi(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function yi(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function tn(e){return e===this.v}function wi(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function sn(e){return!wi(e,this.v)}let je=null;function Wt(e){je=e}function Fe(e,t=!1,s){je={p:je,i:!1,c:null,e:null,s:e,x:null,r:D,l:null}}function $e(e){var t=je,s=t.e;if(s!==null){t.e=null;for(var r of s)Tn(r)}return t.i=!0,je=t.p,{}}function rn(){return!0}let dt=[];function nn(){var e=dt;dt=[],Jn(e)}function kt(e){if(dt.length===0&&!cs){var t=dt;queueMicrotask(()=>{t===dt&&nn()})}dt.push(e)}function ki(){for(;dt.length>0;)nn()}function an(e){var t=D;if(t===null)return L.f|=ot,e;if((t.f&zt)===0&&(t.f&Yt)===0)throw e;at(e,t)}function at(e,t){for(;t!==null;){if((t.f&rr)!==0){if((t.f&zt)===0)throw e;try{t.b.error(e);return}catch(s){e=s}}t=t.parent}throw e}const xi=-7169;function U(e,t){e.f=e.f&xi|t}function mr(e){(e.f&Ee)!==0||e.deps===null?U(e,Q):U(e,Ve)}function on(e){if(e!==null)for(const t of e)(t.f&te)===0||(t.f&jt)===0||(t.f^=jt,on(t.deps))}function ln(e,t,s){(e.f&ee)!==0?t.add(e):(e.f&Ve)!==0&&s.add(e),on(e.deps),U(e,Q)}let Ws=null,Pt=null,A=null,ar=null,Me=null,or=null,cs=!1,Zs=!1,Nt=null,Cs=null;var Mr=0;let Si=1;var qt,rt,pt,Bt,Ht,_t,Vt,Ke,hs,_e,ps,nt,Ie,qe,Gt,gt,$,lr,ns,cr,cn,fn,zs,Ei,fr,Ft;const Is=class Is{constructor(){T(this,$);le(this,"id",Si++);T(this,qt,!1);le(this,"linked",!0);T(this,rt,null);T(this,pt,null);le(this,"async_deriveds",new Map);le(this,"current",new Map);le(this,"previous",new Map);le(this,"unblocked",new Set);T(this,Bt,new Set);T(this,Ht,new Set);T(this,_t,new Set);T(this,Vt,0);T(this,Ke,new Map);T(this,hs,null);T(this,_e,[]);T(this,ps,[]);T(this,nt,new Set);T(this,Ie,new Set);T(this,qe,new Map);T(this,Gt,new Set);le(this,"is_fork",!1);T(this,gt,!1)}skip_effect(t){c(this,qe).has(t)||c(this,qe).set(t,{d:[],m:[]}),c(this,Gt).delete(t)}unskip_effect(t,s=r=>this.schedule(r)){var r=c(this,qe).get(t);if(r){c(this,qe).delete(t);for(var n of r.d)U(n,ee),s(n);for(n of r.m)U(n,Ve),s(n)}c(this,Gt).add(t)}capture(t,s,r=!1){t.v!==J&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&ot)===0&&(this.current.set(t,[s,r]),Me?.set(t,s)),this.is_fork||(t.v=s)}activate(){A=this}deactivate(){A=null,Me=null}flush(){try{Zs=!0,A=this,P(this,$,ns).call(this)}finally{Mr=0,or=null,Nt=null,Cs=null,Zs=!1,A=null,Me=null,xt.clear()}}discard(){for(const t of c(this,Ht))t(this);c(this,Ht).clear(),c(this,_t).clear(),P(this,$,Ft).call(this)}register_created_effect(t){c(this,ps).push(t)}increment(t,s){if(S(this,Vt,c(this,Vt)+1),t){let r=c(this,Ke).get(s)??0;c(this,Ke).set(s,r+1)}}decrement(t,s){if(S(this,Vt,c(this,Vt)-1),t){let r=c(this,Ke).get(s)??0;r===1?c(this,Ke).delete(s):c(this,Ke).set(s,r-1)}c(this,gt)||(S(this,gt,!0),kt(()=>{S(this,gt,!1),this.linked&&this.flush()}))}transfer_effects(t,s){for(const r of t)c(this,nt).add(r);for(const r of s)c(this,Ie).add(r);t.clear(),s.clear()}oncommit(t){c(this,Bt).add(t)}ondiscard(t){c(this,Ht).add(t)}on_fork_commit(t){c(this,_t).add(t)}run_fork_commit_callbacks(){for(const t of c(this,_t))t(this);c(this,_t).clear()}settled(){return(c(this,hs)??S(this,hs,Xr())).promise}static ensure(){var t;if(A===null){const s=A=new Is;P(t=s,$,fr).call(t),!Zs&&!cs&&kt(()=>{c(s,qt)||s.flush()})}return A}apply(){{Me=null;return}}schedule(t){if(or=t,t.b?.is_pending&&(t.f&(Yt|Vs|Jr))!==0&&(t.f&zt)===0){t.b.defer_effect(t);return}for(var s=t;s.parent!==null;){s=s.parent;var r=s.f;if(Nt!==null&&s===D&&(L===null||(L.f&te)===0))return;if((r&(lt|Pe))!==0){if((r&Q)===0)return;s.f^=Q}}c(this,_e).push(s)}};qt=new WeakMap,rt=new WeakMap,pt=new WeakMap,Bt=new WeakMap,Ht=new WeakMap,_t=new WeakMap,Vt=new WeakMap,Ke=new WeakMap,hs=new WeakMap,_e=new WeakMap,ps=new WeakMap,nt=new WeakMap,Ie=new WeakMap,qe=new WeakMap,Gt=new WeakMap,gt=new WeakMap,$=new WeakSet,lr=function(){if(this.is_fork)return!0;for(const r of c(this,Ke).keys()){for(var t=r,s=!1;t.parent!==null;){if(c(this,qe).has(t)){s=!0;break}t=t.parent}if(!s)return!0}return!1},ns=function(){var a,f,d;if(S(this,qt,!0),Mr++>1e3&&(P(this,$,Ft).call(this),ji()),!P(this,$,lr).call(this)){for(const v of c(this,nt))c(this,Ie).delete(v),U(v,ee),this.schedule(v);for(const v of c(this,Ie))U(v,Ve),this.schedule(v)}const t=c(this,_e);S(this,_e,[]),this.apply();var s=Nt=[],r=[],n=Cs=[];for(const v of t)try{P(this,$,cr).call(this,v,s,r)}catch(u){throw vn(v),u}if(A=null,n.length>0){var i=Is.ensure();for(const v of n)i.schedule(v)}if(Nt=null,Cs=null,P(this,$,lr).call(this)){P(this,$,zs).call(this,r),P(this,$,zs).call(this,s);for(const[v,u]of c(this,qe))dn(v,u);n.length>0&&P(a=A,$,ns).call(a);return}const o=P(this,$,cn).call(this);if(o){P(f=o,$,fn).call(f,this);return}c(this,nt).clear(),c(this,Ie).clear();for(const v of c(this,Bt))v(this);c(this,Bt).clear(),ar=this,Or(r),Or(s),ar=null,c(this,hs)?.resolve();var l=A;if(this.linked&&c(this,Vt)===0&&P(this,$,Ft).call(this),c(this,_e).length>0){l===null&&(l=this,P(this,$,fr).call(this));const v=l;c(v,_e).push(...c(this,_e).filter(u=>!c(v,_e).includes(u)))}l!==null&&P(d=l,$,ns).call(d)},cr=function(t,s,r){t.f^=Q;for(var n=t.first;n!==null;){var i=n.f,o=(i&(Pe|lt))!==0,l=o&&(i&Q)!==0,a=l||(i&ne)!==0||c(this,qe).has(n);if(!a&&n.fn!==null){o?n.f^=Q:(i&Yt)!==0?s.push(n):ws(n)&&((i&Re)!==0&&c(this,Ie).add(n),Xt(n));var f=n.first;if(f!==null){n=f;continue}}for(;n!==null;){var d=n.next;if(d!==null){n=d;break}n=n.parent}}},cn=function(){for(var t=c(this,rt);t!==null;){if(!t.is_fork){for(const[s,[,r]]of this.current)if(t.current.has(s)&&!r)return t}t=c(t,rt)}return null},fn=function(t){var r;for(const[n,i]of t.current)!this.previous.has(n)&&t.previous.has(n)&&this.previous.set(n,t.previous.get(n)),this.current.set(n,i);for(const[n,i]of t.async_deriveds){const o=this.async_deriveds.get(n);o&&i.promise.then(o.resolve)}const s=n=>{var i=n.reactions;if(i!==null)for(const a of i){var o=a.f;if((o&te)!==0)s(a);else{var l=a;o&(It|Re)&&!this.async_deriveds.has(l)&&(c(this,Ie).delete(l),U(l,ee),this.schedule(l))}}};for(const n of this.current.keys())s(n);this.oncommit(()=>t.discard()),P(r=t,$,Ft).call(r),A=this,P(this,$,ns).call(this)},zs=function(t){for(var s=0;s!this.current.has(u));if(n.length===0)t&&v.discard();else if(s.length>0){if(t)for(const u of c(this,Gt))v.unskip_effect(u,g=>{var _;(g.f&(Re|It))!==0?v.schedule(g):P(_=v,$,zs).call(_,[g])});v.activate();var i=new Set,o=new Map;for(var l of s)un(l,n,i,o);o=new Map;var a=[...v.current.keys()].filter(u=>this.current.has(u)?this.current.get(u)[0]!==u.v:!0);if(a.length>0)for(const u of c(this,ps))(u.f&(De|ne|Ds))===0&&br(u,a,o)&&((u.f&(It|Re))!==0?(U(u,ee),v.schedule(u)):c(v,nt).add(u));if(c(v,_e).length>0&&!c(v,gt)){v.apply();for(var f of c(v,_e))P(d=v,$,cr).call(d,f,[],[]);S(v,_e,[])}v.deactivate()}}}},fr=function(){Pt===null?Ws=Pt=this:(S(Pt,pt,this),S(this,rt,Pt)),Pt=this},Ft=function(){var t=c(this,rt),s=c(this,pt);t===null?Ws=s:S(t,pt,s),s===null?Pt=t:S(s,rt,t),this.linked=!1};let At=Is;function Ti(e){var t=cs;cs=!0;try{for(var s;;){if(ki(),A===null)return s;A.flush()}}finally{cs=t}}function ji(){try{oi()}catch(e){at(e,or)}}let Ye=null;function Or(e){var t=e.length;if(t!==0){for(var s=0;s0)){xt.clear();for(const n of Ye){if((n.f&(De|ne))!==0)continue;const i=[n];let o=n.parent;for(;o!==null;)Ye.has(o)&&(Ye.delete(o),i.push(o)),o=o.parent;for(let l=i.length-1;l>=0;l--){const a=i[l];(a.f&(De|ne))===0&&Xt(a)}}Ye.clear()}}Ye=null}}function un(e,t,s,r){if(!s.has(e)&&(s.add(e),e.reactions!==null))for(const n of e.reactions){const i=n.f;(i&te)!==0?un(n,t,s,r):(i&(It|Re))!==0&&(i&ee)===0&&br(n,t,r)&&(U(n,ee),yr(n))}}function br(e,t,s){const r=s.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const n of e.deps){if(wt.call(t,n))return!0;if((n.f&te)!==0&&br(n,t,s))return s.set(n,!0),!0}return s.set(e,!1),!1}function yr(e){A.schedule(e)}function dn(e,t){if(!((e.f&Pe)!==0&&(e.f&Q)!==0)){(e.f&ee)!==0?t.d.push(e):(e.f&Ve)!==0&&t.m.push(e),U(e,Q);for(var s=e.first;s!==null;)dn(s,t),s=s.next}}function vn(e){U(e,Q);for(var t=e.first;t!==null;)vn(t),t=t.next}function Ai(e){let t=0,s=Ct(0),r;return()=>{Sr()&&(p(s),jn(()=>(t===0&&(r=Nn(()=>e(()=>fs(s)))),t+=1,()=>{kt(()=>{t-=1,t===0&&(r?.(),r=void 0,fs(s))})})))}}var Ci=Kt|Jt;function zi(e,t,s,r){new Li(e,t,s,r)}var ye,_r,we,mt,ce,ke,re,ge,We,bt,it,Ut,_s,gs,Ze,qs,Y,Ri,Mi,Oi,ur,Ls,Rs,dr,vr;class Li{constructor(t,s,r,n){T(this,Y);le(this,"parent");le(this,"is_pending",!1);le(this,"transform_error");T(this,ye);T(this,_r,null);T(this,we);T(this,mt);T(this,ce);T(this,ke,null);T(this,re,null);T(this,ge,null);T(this,We,null);T(this,bt,0);T(this,it,0);T(this,Ut,!1);T(this,_s,new Set);T(this,gs,new Set);T(this,Ze,null);T(this,qs,Ai(()=>(S(this,Ze,Ct(c(this,bt))),()=>{S(this,Ze,null)})));S(this,ye,t),S(this,we,s),S(this,mt,i=>{var o=D;o.b=this,o.f|=rr,r(i)}),this.parent=D.b,this.transform_error=n??this.parent?.transform_error??(i=>i),S(this,ce,Er(()=>{P(this,Y,ur).call(this)},Ci))}defer_effect(t){ln(t,c(this,_s),c(this,gs))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!c(this,we).pending}update_pending_count(t,s){P(this,Y,dr).call(this,t,s),S(this,bt,c(this,bt)+t),!(!c(this,Ze)||c(this,Ut))&&(S(this,Ut,!0),kt(()=>{S(this,Ut,!1),c(this,Ze)&&Zt(c(this,Ze),c(this,bt))}))}get_effect_pending(){return c(this,qs).call(this),p(c(this,Ze))}error(t){if(!c(this,we).onerror&&!c(this,we).failed)throw t;A?.is_fork?(c(this,ke)&&A.skip_effect(c(this,ke)),c(this,re)&&A.skip_effect(c(this,re)),c(this,ge)&&A.skip_effect(c(this,ge)),A.on_fork_commit(()=>{P(this,Y,vr).call(this,t)})):P(this,Y,vr).call(this,t)}}ye=new WeakMap,_r=new WeakMap,we=new WeakMap,mt=new WeakMap,ce=new WeakMap,ke=new WeakMap,re=new WeakMap,ge=new WeakMap,We=new WeakMap,bt=new WeakMap,it=new WeakMap,Ut=new WeakMap,_s=new WeakMap,gs=new WeakMap,Ze=new WeakMap,qs=new WeakMap,Y=new WeakSet,Ri=function(){try{S(this,ke,xe(()=>c(this,mt).call(this,c(this,ye))))}catch(t){this.error(t)}},Mi=function(t){const s=c(this,we).failed;s&&S(this,ge,xe(()=>{s(c(this,ye),()=>t,()=>()=>{})}))},Oi=function(){const t=c(this,we).pending;t&&(this.is_pending=!0,S(this,re,xe(()=>t(c(this,ye)))),kt(()=>{var s=S(this,We,document.createDocumentFragment()),r=St();s.append(r),S(this,ke,P(this,Y,Rs).call(this,()=>xe(()=>c(this,mt).call(this,r)))),c(this,it)===0&&(c(this,ye).before(s),S(this,We,null),Et(c(this,re),()=>{S(this,re,null)}),P(this,Y,Ls).call(this,A))}))},ur=function(){try{if(this.is_pending=this.has_pending_snippet(),S(this,it,0),S(this,bt,0),S(this,ke,xe(()=>{c(this,mt).call(this,c(this,ye))})),c(this,it)>0){var t=S(this,We,document.createDocumentFragment());Ar(c(this,ke),t);const s=c(this,we).pending;S(this,re,xe(()=>s(c(this,ye))))}else P(this,Y,Ls).call(this,A)}catch(s){this.error(s)}},Ls=function(t){this.is_pending=!1,t.transfer_effects(c(this,_s),c(this,gs))},Rs=function(t){var s=D,r=L,n=je;Ge(c(this,ce)),Ae(c(this,ce)),Wt(c(this,ce).ctx);try{return At.ensure(),t()}catch(i){return an(i),null}finally{Ge(s),Ae(r),Wt(n)}},dr=function(t,s){var r;if(!this.has_pending_snippet()){this.parent&&P(r=this.parent,Y,dr).call(r,t,s);return}S(this,it,c(this,it)+t),c(this,it)===0&&(P(this,Y,Ls).call(this,s),c(this,re)&&Et(c(this,re),()=>{S(this,re,null)}),c(this,We)&&(c(this,ye).before(c(this,We)),S(this,We,null)))},vr=function(t){c(this,ke)&&(he(c(this,ke)),S(this,ke,null)),c(this,re)&&(he(c(this,re)),S(this,re,null)),c(this,ge)&&(he(c(this,ge)),S(this,ge,null));var s=c(this,we).onerror;let r=c(this,we).failed;var n=!1,i=!1;const o=()=>{if(n){yi();return}n=!0,i&&ui(),c(this,ge)!==null&&Et(c(this,ge),()=>{S(this,ge,null)}),P(this,Y,Rs).call(this,()=>{P(this,Y,ur).call(this)})},l=a=>{try{i=!0,s?.(a,o),i=!1}catch(f){at(f,c(this,ce)&&c(this,ce).parent)}r&&S(this,ge,P(this,Y,Rs).call(this,()=>{try{return xe(()=>{var f=D;f.b=this,f.f|=rr,r(c(this,ye),()=>a,()=>o)})}catch(f){return at(f,c(this,ce).parent),null}}))};kt(()=>{var a;try{a=this.transform_error(t)}catch(f){at(f,c(this,ce)&&c(this,ce).parent);return}a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(l,f=>at(f,c(this,ce)&&c(this,ce).parent)):l(a)})};function Di(e,t,s,r){const n=wr;var i=e.filter(u=>!u.settled);if(s.length===0&&i.length===0){r(t.map(n));return}var o=D,l=Pi(),a=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(u=>u.promise)):null;function f(u){if((o.f&De)===0){l();try{r(u)}catch(g){at(g,o)}Fs()}}var d=hn();if(s.length===0){a.then(()=>f(t.map(n))).finally(d);return}function v(){Promise.all(s.map(u=>Fi(u))).then(u=>f([...t.map(n),...u])).catch(u=>at(u,o)).finally(d)}a?a.then(()=>{l(),v(),Fs()}):v()}function Pi(){var e=D,t=L,s=je,r=A;return function(i=!0){Ge(e),Ae(t),Wt(s),i&&(e.f&De)===0&&(r?.activate(),r?.apply())}}function Fs(e=!0){Ge(null),Ae(null),Wt(null),e&&A?.deactivate()}function hn(){var e=D,t=e.b,s=A,r=t.is_rendered();return t.update_pending_count(1,s),s.increment(r,e),()=>{t.update_pending_count(-1,s),s.decrement(r,e)}}function wr(e){var t=te|ee;return D!==null&&(D.f|=Jt),{ctx:je,deps:null,effects:null,equals:tn,f:t,fn:e,reactions:null,rv:0,v:J,wv:0,parent:D,ac:null}}const Es=Symbol("obsolete");function Fi(e,t,s){let r=D;r===null&&si();var n=void 0,i=Ct(J),o=!L,l=new Set;return Qi(()=>{var a=D,f=Xr();n=f.promise;try{Promise.resolve(e()).then(f.resolve,g=>{g!==Gs&&f.reject(g)}).finally(Fs)}catch(g){f.reject(g),Fs()}var d=A;if(o){if((a.f&zt)!==0)var v=hn();if(r.b.is_rendered())d.async_deriveds.get(a)?.reject(Es);else for(const g of l.values())g.reject(Es);l.add(f),d.async_deriveds.set(a,f)}const u=(g,_=void 0)=>{v?.(),l.delete(f),_!==Es&&(d.activate(),_?(i.f|=ot,Zt(i,_)):((i.f&ot)!==0&&(i.f^=ot),Zt(i,g)),d.deactivate())};f.promise.then(u,g=>u(null,g||"unknown"))}),Sn(()=>{for(const a of l)a.reject(Es)}),new Promise(a=>{function f(d){function v(){d===n?a(i):f(n)}d.then(v,v)}f(n)})}function G(e){const t=wr(e);return Rn(t),t}function $i(e){const t=wr(e);return t.equals=sn,t}function Ni(e){var t=e.effects;if(t!==null){e.effects=null;for(var s=0;s0&&!gn&&Bi()}return t}function Bi(){gn=!1;for(const e of $s){(e.f&Q)!==0&&U(e,Ve);let t;try{t=ws(e)}catch{t=!0}t&&Xt(e)}$s.clear()}function fs(e){I(e,e.v+1)}function mn(e,t,s){var r=e.reactions;if(r!==null)for(var n=r.length,i=0;i{if(Tt===i)return l();var a=L,f=Tt;Ae(null),Nr(i);var d=l();return Ae(a),Nr(f),d};return r&&s.set("length",Z(e.length)),new Proxy(e,{defineProperty(l,a,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&li();var d=s.get(a);return d===void 0?o(()=>{var v=Z(f.value);return s.set(a,v),v}):I(d,f.value,!0),!0},deleteProperty(l,a){var f=s.get(a);if(f===void 0){if(a in l){const d=o(()=>Z(J));s.set(a,d),fs(n)}}else I(f,J),fs(n);return!0},get(l,a,f){if(a===ls)return e;var d=s.get(a),v=a in l;if(d===void 0&&(!v||os(l,a)?.writable)&&(d=o(()=>{var g=Se(v?l[a]:J),_=Z(g);return _}),s.set(a,d)),d!==void 0){var u=p(d);return u===J?void 0:u}return Reflect.get(l,a,f)},getOwnPropertyDescriptor(l,a){var f=Reflect.getOwnPropertyDescriptor(l,a);if(f&&"value"in f){var d=s.get(a);d&&(f.value=p(d))}else if(f===void 0){var v=s.get(a),u=v?.v;if(v!==void 0&&u!==J)return{enumerable:!0,configurable:!0,value:u,writable:!0}}return f},has(l,a){if(a===ls)return!0;var f=s.get(a),d=f!==void 0&&f.v!==J||Reflect.has(l,a);if(f!==void 0||D!==null&&(!d||os(l,a)?.writable)){f===void 0&&(f=o(()=>{var u=d?Se(l[a]):J,g=Z(u);return g}),s.set(a,f));var v=p(f);if(v===J)return!1}return d},set(l,a,f,d){var v=s.get(a),u=a in l;if(r&&a==="length")for(var g=f;gZ(J)),s.set(g+"",_))}if(v===void 0)(!u||os(l,a)?.writable)&&(v=o(()=>Z(void 0)),I(v,Se(f)),s.set(a,v));else{u=v.v!==J;var m=o(()=>Se(f));I(v,m)}var h=Reflect.getOwnPropertyDescriptor(l,a);if(h?.set&&h.set.call(d,f),!u){if(r&&typeof a=="string"){var w=s.get("length"),b=Number(a);Number.isInteger(b)&&b>=w.v&&I(w,b+1)}fs(n)}return!0},ownKeys(l){p(n);var a=Reflect.ownKeys(l).filter(v=>{var u=s.get(v);return u===void 0||u.v!==J});for(var[f,d]of s)d.v!==J&&!(f in l)&&a.push(f);return a},setPrototypeOf(){ci()}})}function Dr(e){try{if(e!==null&&typeof e=="object"&&ls in e)return e[ls]}catch{}return e}function Hi(e,t){return Object.is(Dr(e),Dr(t))}var Pr,bn,yn,wn;function Vi(){if(Pr===void 0){Pr=window,bn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,s=Text.prototype;yn=os(t,"firstChild").get,wn=os(t,"nextSibling").get,Lr(e)&&(e[nr]=void 0,e[js]=null,e[ir]=void 0,e.__e=void 0),Lr(s)&&(s[rs]=void 0)}}function St(e=""){return document.createTextNode(e)}function Ns(e){return yn.call(e)}function ys(e){return wn.call(e)}function y(e,t){return Ns(e)}function Gi(e,t=!1){{var s=Ns(e);return s instanceof Comment&&s.data===""?ys(s):s}}function k(e,t=1,s=!1){let r=e;for(;t--;)r=ys(r);return r}function Ui(e){e.textContent=""}function kn(){return!1}function Yi(e,t,s){return document.createElementNS(en,e,void 0)}let Fr=!1;function Ki(){Fr||(Fr=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[As]?.()})},{capture:!0}))}function xr(e){var t=L,s=D;Ae(null),Ge(null);try{return e()}finally{Ae(t),Ge(s)}}function xn(e,t,s,r=s){e.addEventListener(t,()=>xr(s));const n=e[As];n?e[As]=()=>{n(),r(!0)}:e[As]=()=>r(!0),Ki()}function Wi(e){D===null&&(L===null&&ai(),ii()),ct&&ni()}function Zi(e,t){var s=t.last;s===null?t.last=t.first=e:(s.next=e,e.prev=s,t.last=e)}function Je(e,t){var s=D;s!==null&&(s.f&ne)!==0&&(e|=ne);var r={ctx:je,deps:null,nodes:null,f:e|ee|Ee,first:null,fn:t,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,wv:0,ac:null};A?.register_created_effect(r);var n=r;if((e&Yt)!==0)Nt!==null?Nt.push(r):At.ensure().schedule(r);else if(t!==null){try{Xt(r)}catch(o){throw he(r),o}n.deps===null&&n.teardown===null&&n.nodes===null&&n.first===n.last&&(n.f&Jt)===0&&(n=n.first,(e&Re)!==0&&(e&Kt)!==0&&n!==null&&(n.f|=Kt))}if(n!==null&&(n.parent=s,s!==null&&Zi(n,s),L!==null&&(L.f&te)!==0&&(e<)===0)){var i=L;(i.effects??(i.effects=[])).push(n)}return r}function Sr(){return L!==null&&!Oe}function Sn(e){const t=Je(Vs,null);return U(t,Q),t.teardown=e,t}function En(e){Wi();var t=D.f,s=!L&&(t&Pe)!==0&&(t&zt)===0;if(s){var r=je;(r.e??(r.e=[])).push(e)}else return Tn(e)}function Tn(e){return Je(Yt|ei,e)}function Xi(e){At.ensure();const t=Je(lt|Jt,e);return(s={})=>new Promise(r=>{s.outro?Et(t,()=>{he(t),r(void 0)}):(he(t),r(void 0))})}function Ji(e){return Je(Yt,e)}function Qi(e){return Je(It|Jt,e)}function jn(e,t=0){return Je(Vs|t,e)}function q(e,t=[],s=[],r=[]){Di(r,t,s,n=>{Je(Vs,()=>e(...n.map(p)))})}function Er(e,t=0){var s=Je(Re|t,e);return s}function xe(e){return Je(Pe|Jt,e)}function An(e){var t=e.teardown;if(t!==null){const s=ct,r=L;$r(!0),Ae(null);try{t.call(null)}finally{$r(s),Ae(r)}}}function Tr(e,t=!1){var s=e.first;for(e.first=e.last=null;s!==null;){const n=s.ac;n!==null&&xr(()=>{n.abort(Gs)});var r=s.next;(s.f<)!==0?s.parent=null:he(s,t),s=r}}function ea(e){for(var t=e.first;t!==null;){var s=t.next;(t.f&Pe)===0&&he(t),t=s}}function he(e,t=!0){var s=!1;(t||(e.f&Qn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(ta(e.nodes.start,e.nodes.end),s=!0),U(e,Rr),Tr(e,t&&!s),vs(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const i of r)i.stop();An(e),e.f^=Rr,e.f|=De;var n=e.parent;n!==null&&n.first!==null&&Cn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function ta(e,t){for(;e!==null;){var s=e===t?null:ys(e);e.remove(),e=s}}function Cn(e){var t=e.parent,s=e.prev,r=e.next;s!==null&&(s.next=r),r!==null&&(r.prev=s),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=s))}function Et(e,t,s=!0){var r=[];zn(e,r,!0);var n=()=>{s&&he(e),t&&t()},i=r.length;if(i>0){var o=()=>--i||n();for(var l of r)l.out(o)}else n()}function zn(e,t,s){if((e.f&ne)===0){e.f^=ne;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||s)&&t.push(l);for(var n=e.first;n!==null;){var i=n.next;if((n.f<)===0){var o=(n.f&Kt)!==0||(n.f&Pe)!==0&&(e.f&Re)!==0;zn(n,t,o?s:!1)}n=i}}}function jr(e){Ln(e,!0)}function Ln(e,t){if((e.f&ne)!==0){e.f^=ne,(e.f&Q)===0&&(U(e,ee),At.ensure().schedule(e));for(var s=e.first;s!==null;){var r=s.next,n=(s.f&Kt)!==0||(s.f&Pe)!==0;Ln(s,n?t:!1),s=r}var i=e.nodes&&e.nodes.t;if(i!==null)for(const o of i)(o.is_global||t)&&o.in()}}function Ar(e,t){if(e.nodes)for(var s=e.nodes.start,r=e.nodes.end;s!==null;){var n=s===r?null:ys(s);t.append(s),s=n}}let Ms=!1,ct=!1;function $r(e){ct=e}let L=null,Oe=!1;function Ae(e){L=e}let D=null;function Ge(e){D=e}let Te=null;function Rn(e){L!==null&&(Te===null?Te=[e]:Te.push(e))}let fe=null,pe=0,be=null;function sa(e){be=e}let Mn=1,vt=0,Tt=vt;function Nr(e){Tt=e}function On(){return++Mn}function ws(e){var t=e.f;if((t&ee)!==0)return!0;if(t&te&&(e.f&=~jt),(t&Ve)!==0){for(var s=e.deps,r=s.length,n=0;ne.wv)return!0}(t&Ee)!==0&&Me===null&&U(e,Q)}return!1}function Dn(e,t,s=!0){var r=e.reactions;if(r!==null&&!(Te!==null&&wt.call(Te,e)))for(var n=0;n{e.ac.abort(Gs)}),e.ac=null);try{e.f|=Ps;var d=e.fn,v=d();e.f|=zt;var u=e.deps,g=A?.is_fork;if(fe!==null){var _;if(g||vs(e,pe),u!==null&&pe>0)for(u.length=pe+fe.length,_=0;_{throw h});throw u}}finally{e[ht]=t,delete e.currentTarget,Ae(d),Ge(v)}}}const oa=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function la(e){return oa?.createHTML(e)??e}function ca(e){var t=Yi("template");return t.innerHTML=la(e.replaceAll("","")),t.content}function Br(e,t){var s=D;s.nodes===null&&(s.nodes={start:e,end:t,a:null,t:null})}function z(e,t){var s=(t&_i)!==0,r=(t&gi)!==0,n,i=!e.startsWith("");return()=>{n===void 0&&(n=ca(i?e:""+e),s||(n=Ns(n)));var o=r||bn?document.importNode(n,!0):n.cloneNode(!0);if(s){var l=Ns(o),a=o.lastChild;Br(l,a)}else Br(o,o);return o}}function C(e,t){e!==null&&e.before(t)}function j(e,t){var s=t==null?"":typeof t=="object"?`${t}`:t;s!==(e[rs]??(e[rs]=e.nodeValue))&&(e[rs]=s,e.nodeValue=`${s}`)}function fa(e,t){return ua(e,t)}const Ts=new Map;function ua(e,{target:t,anchor:s,props:r={},events:n,context:i,intro:o=!0,transformError:l}){Vi();var a=void 0,f=Xi(()=>{var d=s??t.appendChild(St());zi(d,{pending:()=>{}},g=>{Fe({});var _=je;i&&(_.c=i),n&&(r.$$events=n),a=e(g,r)||{},$e()},l);var v=new Set,u=g=>{for(var _=0;_{for(var g of v)for(const h of[t,document]){var _=Ts.get(h),m=_.get(g);--m==0?(h.removeEventListener(g,qr),_.delete(g),_.size===0&&Ts.delete(h)):_.set(g,m)}hr.delete(u),d!==s&&d.parentNode?.removeChild(d)}});return da.set(a,f),a}let da=new WeakMap;var ze,Be,me,yt,ms,bs,Bs;class va{constructor(t,s=!0){le(this,"anchor");T(this,ze,new Map);T(this,Be,new Map);T(this,me,new Map);T(this,yt,new Set);T(this,ms,!0);T(this,bs,t=>{if(c(this,ze).has(t)){var s=c(this,ze).get(t),r=c(this,Be).get(s);if(r)jr(r),c(this,yt).delete(s);else{var n=c(this,me).get(s);n&&(c(this,Be).set(s,n.effect),c(this,me).delete(s),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),r=n.effect)}for(const[i,o]of c(this,ze)){if(c(this,ze).delete(i),i===t)break;const l=c(this,me).get(o);l&&(he(l.effect),c(this,me).delete(o))}for(const[i,o]of c(this,Be)){if(i===s||c(this,yt).has(i))continue;const l=()=>{if(Array.from(c(this,ze).values()).includes(i)){var f=document.createDocumentFragment();Ar(o,f),f.append(St()),c(this,me).set(i,{effect:o,fragment:f})}else he(o);c(this,yt).delete(i),c(this,Be).delete(i)};c(this,ms)||!r?(c(this,yt).add(i),Et(o,l,!1)):l()}}});T(this,Bs,t=>{c(this,ze).delete(t);const s=Array.from(c(this,ze).values());for(const[r,n]of c(this,me))s.includes(r)||(he(n.effect),c(this,me).delete(r))});this.anchor=t,S(this,ms,s)}ensure(t,s){var r=A,n=kn();if(s&&!c(this,Be).has(t)&&!c(this,me).has(t))if(n){var i=document.createDocumentFragment(),o=St();i.append(o),c(this,me).set(t,{effect:xe(()=>s(o)),fragment:i})}else c(this,Be).set(t,xe(()=>s(this.anchor)));if(c(this,ze).set(r,t),n){for(const[l,a]of c(this,Be))l===t?r.unskip_effect(a):r.skip_effect(a);for(const[l,a]of c(this,me))l===t?r.unskip_effect(a.effect):r.skip_effect(a.effect);r.oncommit(c(this,bs)),r.ondiscard(c(this,Bs))}else c(this,bs).call(this,r)}}ze=new WeakMap,Be=new WeakMap,me=new WeakMap,yt=new WeakMap,ms=new WeakMap,bs=new WeakMap,Bs=new WeakMap;function ve(e,t,s=!1){var r=new va(e),n=s?Kt:0;function i(o,l){r.ensure(o,l)}Er(()=>{var o=!1;t((l,a=0)=>{o=!0,i(a,l)}),o||i(-1,null)},n)}function ts(e,t){return t}function ha(e,t,s){for(var r=[],n=t.length,i,o=t.length,l=0;l{if(i){if(i.pending.delete(v),i.done.add(v),i.pending.size===0){var u=e.outrogroups;pr(e,Hs(i.done)),u.delete(i),u.size===0&&(e.outrogroups=null)}}else o-=1},!1)}if(o===0){var a=r.length===0&&s!==null;if(a){var f=s,d=f.parentNode;Ui(d),d.append(f),e.items.clear()}pr(e,t,!a)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function pr(e,t,s=!0){var r;if(e.pending.size>0){r=new Set;for(const o of e.pending.values())for(const l of o)r.add(e.items.get(l).e)}for(var n=0;n{var x=s();return gr(x)?x:x==null?[]:Hs(x)}),u,g=new Map,_=!0;function m(x){(b.effect.f&De)===0&&(b.pending.delete(x),b.fallback=d,pa(b,u,o,t,r),d!==null&&(u.length===0?(d.f&He)===0?jr(d):(d.f^=He,is(d,null,o)):Et(d,()=>{d=null})))}function h(x){b.pending.delete(x)}var w=Er(()=>{u=p(v);for(var x=u.length,F=new Set,K=A,W=kn(),B=0;Bi(o)):(d=xe(()=>i(Hr??(Hr=St()))),d.f|=He)),x>F.size&&ri(),!_)if(g.set(K,F),W){for(const[O,N]of l)F.has(O)||K.skip_effect(N.e);K.oncommit(m),K.ondiscard(h)}else m(K);p(v)}),b={effect:w,items:l,pending:g,outrogroups:null,fallback:d};_=!1}function ss(e){for(;e!==null&&(e.f&Pe)===0;)e=e.next;return e}function pa(e,t,s,r,n){var i=(r&hi)!==0,o=t.length,l=e.items,a=ss(e.effect.first),f,d=null,v,u=[],g=[],_,m,h,w;if(i)for(w=0;w0){var R=(r&Qr)!==0&&o===0?s:null;if(i){for(w=0;w{if(v!==void 0)for(h of v)h.nodes?.a?.apply()})}function _a(e,t,s,r,n,i,o,l){var a=(o&di)!==0?(o&pi)===0?qi(s,!1,!1):Ct(s):null,f=(o&vi)!==0?Ct(n):null;return{v:a,i:f,e:xe(()=>(i(t,a??s,f??n,l),()=>{e.delete(r)}))}}function is(e,t,s){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end,i=t&&(t.f&He)===0?t.nodes.start:s;r!==null;){var o=ys(r);if(i.before(r),r===n)return;r=o}}function st(e,t,s){t===null?e.effect.first=s:t.next=s,s===null?e.effect.last=t:s.prev=t}const Vr=[...` -\r\f \v\uFEFF`];function ga(e,t,s){var r=e==null?"":""+e;if(s){for(var n of Object.keys(s))if(s[n])r=r?r+" "+n:n;else if(r.length)for(var i=n.length,o=0;(o=r.indexOf(n,o))>=0;){var l=o+i;(o===0||Vr.includes(r[o-1]))&&(l===r.length||Vr.includes(r[l]))?r=(o===0?"":r.substring(0,o))+r.substring(l+1):o=l}}return r===""?null:r}function Gr(e,t=!1){var s=t?" !important;":";",r="";for(var n of Object.keys(e)){var i=e[n];i!=null&&i!==""&&(r+=" "+n+": "+i+s)}return r}function Xs(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function ma(e,t){if(t){var s="",r,n;if(Array.isArray(t)?(r=t[0],n=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,o=0,l=!1,a=[];r&&a.push(...Object.keys(r).map(Xs)),n&&a.push(...Object.keys(n).map(Xs));var f=0,d=-1;const m=e.length;for(var v=0;v{qn(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Sn(()=>{t.disconnect()})}function ya(e,t,s=t){var r=new WeakSet,n=!0;xn(e,"change",i=>{var o=i?"[selected]":":checked",l;if(e.multiple)l=[].map.call(e.querySelectorAll(o),ds);else{var a=e.querySelector(o)??e.querySelector("option:not([disabled])");l=a&&ds(a)}s(l),e.__value=l,A!==null&&r.add(A)}),Ji(()=>{var i=t();if(e===document.activeElement){var o=A;if(r.has(o))return}if(qn(e,i,n),n&&i===void 0){var l=e.querySelector(":checked");l!==null&&(i=ds(l),s(i))}e.__value=i,n=!1}),ba(e)}function ds(e){return"__value"in e?e.__value:e.value}const wa=Symbol("is custom element"),ka=Symbol("is html");function Xe(e,t,s,r){var n=xa(e);n[t]!==(n[t]=s)&&(t==="loading"&&(e[ti]=s),s==null?e.removeAttribute(t):typeof s!="string"&&Sa(e).includes(t)?e[t]=s:e.setAttribute(t,s))}function xa(e){return e[js]??(e[js]={[wa]:e.nodeName.includes("-"),[ka]:e.namespaceURI===en})}var Ur=new Map;function Sa(e){var t=e.getAttribute("is")||e.nodeName,s=Ur.get(t);if(s)return s;Ur.set(t,s=[]);for(var r,n=e,i=Element.prototype;i!==n;){r=Kn(n);for(var o in r)r[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&s.push(o);n=Zr(n)}return s}function Os(e,t,s=t){var r=new WeakSet;xn(e,"input",async n=>{var i=n?e.defaultValue:e.value;if(i=Qs(e)?er(i):i,s(i),A!==null&&r.add(A),await na(),i!==(i=t())){var o=e.selectionStart,l=e.selectionEnd,a=e.value.length;if(e.value=i??"",l!==null){var f=e.value.length;o===l&&l===a&&f>a?(e.selectionStart=f,e.selectionEnd=f):(e.selectionStart=o,e.selectionEnd=Math.min(l,f))}}}),Nn(t)==null&&e.value&&(s(Qs(e)?er(e.value):e.value),A!==null&&r.add(A)),jn(()=>{var n=t();if(e===document.activeElement){var i=A;if(r.has(i))return}Qs(e)&&n===er(e.value)||e.type==="date"&&!n&&!e.value||n!==e.value&&(e.value=n??"")})}function Qs(e){var t=e.type;return t==="number"||t==="range"}function er(e){return e===""?null:+e}function tr(e,t,s,r){var n=r,i=!0,o=()=>(i&&(i=!1,n=r),n),l;l=e[t],l===void 0&&r!==void 0&&(l=o());var a;return a=()=>{var f=e[t];return f===void 0?o():(i=!0,f)},a}const Ea="5";var Wr;typeof window<"u"&&((Wr=window.__svelte??(window.__svelte={})).v??(Wr.v=new Set)).add(Ea);const $t=typeof window<"u"&&window.slashedBricksApp?window.slashedBricksApp:{defaults:{},settings:{},tabs:{},rest:{url:"",nonce:""}},se={defaults:$t.defaults||{},tabs:$t.tabs||{},rest:$t.rest||{url:"",nonce:""},inventory:$t.inventory||{variables:[],sf_classes:[],is_classes:[]},pluginSettings:$t.pluginSettings||{}},Le=Se(structuredClone($t.settings||{})),E=Se({activeTab:Ta(se.tabs)||"colors",dirty:!1,saving:!1,lastSavedAt:null,error:""});function Ta(e){for(const t in e)return t;return null}function ja(){E.dirty=!0,E.error=""}function Aa(e){Le[e]&&delete Le[e]}var Ca=z(''),za=z('');function La(e,t){Fe(t,!0);var s=za();ue(s,21,()=>Object.entries(se.tabs),([r,n])=>r,(r,n)=>{var i=G(()=>sr(p(n),2));let o=()=>p(i)[0],l=()=>p(i)[1];var a=Ca();let f;var d=y(a);q(()=>{f=us(a,1,"tab-nav__btn svelte-yyiz68",null,f,{active:E.activeTab===o()}),j(d,l())}),de("click",a,()=>E.activeTab=o()),C(r,a)}),C(e,s),$e()}Lt(["click"]);var Ra=z(' '),Ma=z(' ',1),Oa=z(''),Da=z('
');function Yr(e,t){Fe(t,!0);let s=tr(t,"hexHint",3,""),r=tr(t,"rawHint",3,""),n=tr(t,"cssVar",3,"");const i=/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,o=(()=>{const O=(Le.colors?.[t.storeKey]??"").trim(),N=O===""||i.test(O);return{mode:N?"hex":"raw",hex:N?O:"",raw:N?"":O}})();let l=Z(Se(o.mode)),a=Z(Se(o.hex)),f=Z(Se(o.raw));function d(){Le.colors||(Le.colors={});const O=p(f).trim(),N=p(a).trim(),V=p(l)==="raw"?O:N;V===""?delete Le.colors[t.storeKey]:Le.colors[t.storeKey]=V,ja()}function v(){p(l)==="hex"?(I(l,"raw"),I(a,"")):(I(l,"hex"),I(f,"")),d()}const u=G(()=>(p(l)==="raw"?p(f):p(a))||s()||"transparent");var g=Da(),_=y(g),m=y(_),h=y(m),w=k(m,2);{var b=O=>{var N=Ra(),V=y(N);q(()=>j(V,n())),C(O,N)};ve(w,O=>{n()&&O(b)})}var x=k(_,2),F=y(x);let K;var W=k(F,2);{var B=O=>{var N=Ma(),V=Gi(N),ie=k(V,2);q(()=>{Xe(V,"id",t.storeKey),Xe(ie,"placeholder",s())}),de("input",V,d),Os(V,()=>p(a),Ce=>I(a,Ce)),de("input",ie,d),Os(ie,()=>p(a),Ce=>I(a,Ce)),C(O,N)},X=O=>{var N=Oa();q(()=>{Xe(N,"id",t.storeKey),Xe(N,"placeholder",r())}),de("input",N,d),Os(N,()=>p(f),V=>I(f,V)),C(O,N)};ve(W,O=>{p(l)==="hex"?O(B):O(X,-1)})}var R=k(W,2),M=y(R);q(()=>{Xe(m,"for",t.storeKey),j(h,t.label),K=as(F,"",K,{background:p(u)}),j(M,p(l)==="hex"?"Advanced (oklch / raw)":"Use HEX picker")}),de("click",R,v),C(e,g),$e()}Lt(["input","click"]);var Pa=z(`

Brand Colors

Pick a color via the HEX input, or switch to Advanced to paste any +var Vn=Object.defineProperty;var zr=e=>{throw TypeError(e)};var Gn=(e,t,s)=>t in e?Vn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var le=(e,t,s)=>Gn(e,typeof t!="symbol"?t+"":t,s),Ks=(e,t,s)=>t.has(e)||zr("Cannot "+s);var c=(e,t,s)=>(Ks(e,t,"read from private field"),s?s.call(e):t.get(e)),j=(e,t,s)=>t.has(e)?zr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),S=(e,t,s,r)=>(Ks(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),P=(e,t,s)=>(Ks(e,t,"access private method"),s);var gr=Array.isArray,Un=Array.prototype.indexOf,wt=Array.prototype.includes,Hs=Array.from,Yn=Object.defineProperty,os=Object.getOwnPropertyDescriptor,Kn=Object.getOwnPropertyDescriptors,Wn=Object.prototype,Zn=Array.prototype,Zr=Object.getPrototypeOf,Lr=Object.isExtensible;const Xn=()=>{};function Jn(e){for(var t=0;t{e=r,t=n});return{promise:s,resolve:e,reject:t}}function sr(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const s=[];for(const r of e)if(s.push(r),s.length===t)break;return s}const te=2,Yt=4,Vs=8,Jr=1<<24,Me=16,Fe=32,lt=64,rr=128,Te=512,Q=1024,ee=2048,Ge=4096,ne=8192,Pe=16384,zt=32768,Rr=1<<25,Kt=65536,Ds=1<<17,Qn=1<<18,Jt=1<<19,ei=1<<20,Ve=1<<25,jt=65536,Ps=1<<21,It=1<<22,ot=1<<23,ls=Symbol("$state"),ti=Symbol(""),js=Symbol("attributes"),nr=Symbol("class"),ir=Symbol("style"),rs=Symbol("text"),As=Symbol("form reset"),Gs=new class extends Error{constructor(){super(...arguments);le(this,"name","StaleReactionError");le(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function si(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function ri(e,t,s){throw new Error("https://svelte.dev/e/each_key_duplicate")}function ni(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ii(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ai(e){throw new Error("https://svelte.dev/e/effect_orphan")}function oi(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function li(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ci(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function fi(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ui(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const di=1,vi=2,Qr=4,hi=8,pi=16,_i=1,gi=2,J=Symbol("uninitialized"),en="http://www.w3.org/1999/xhtml";function mi(){console.warn("https://svelte.dev/e/derived_inert")}function bi(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function yi(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function tn(e){return e===this.v}function wi(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function sn(e){return!wi(e,this.v)}let Ae=null;function Wt(e){Ae=e}function $e(e,t=!1,s){Ae={p:Ae,i:!1,c:null,e:null,s:e,x:null,r:D,l:null}}function Ne(e){var t=Ae,s=t.e;if(s!==null){t.e=null;for(var r of s)Tn(r)}return t.i=!0,Ae=t.p,{}}function rn(){return!0}let dt=[];function nn(){var e=dt;dt=[],Jn(e)}function kt(e){if(dt.length===0&&!cs){var t=dt;queueMicrotask(()=>{t===dt&&nn()})}dt.push(e)}function ki(){for(;dt.length>0;)nn()}function an(e){var t=D;if(t===null)return M.f|=ot,e;if((t.f&zt)===0&&(t.f&Yt)===0)throw e;at(e,t)}function at(e,t){for(;t!==null;){if((t.f&rr)!==0){if((t.f&zt)===0)throw e;try{t.b.error(e);return}catch(s){e=s}}t=t.parent}throw e}const xi=-7169;function Y(e,t){e.f=e.f&xi|t}function mr(e){(e.f&Te)!==0||e.deps===null?Y(e,Q):Y(e,Ge)}function on(e){if(e!==null)for(const t of e)(t.f&te)===0||(t.f&jt)===0||(t.f^=jt,on(t.deps))}function ln(e,t,s){(e.f&ee)!==0?t.add(e):(e.f&Ge)!==0&&s.add(e),on(e.deps),Y(e,Q)}let Ws=null,Pt=null,C=null,ar=null,Oe=null,or=null,cs=!1,Zs=!1,Nt=null,Cs=null;var Mr=0;let Si=1;var qt,rt,pt,Bt,Ht,_t,Vt,We,hs,_e,ps,nt,qe,Be,Gt,gt,$,lr,ns,cr,cn,fn,zs,Ei,fr,Ft;const Is=class Is{constructor(){j(this,$);le(this,"id",Si++);j(this,qt,!1);le(this,"linked",!0);j(this,rt,null);j(this,pt,null);le(this,"async_deriveds",new Map);le(this,"current",new Map);le(this,"previous",new Map);le(this,"unblocked",new Set);j(this,Bt,new Set);j(this,Ht,new Set);j(this,_t,new Set);j(this,Vt,0);j(this,We,new Map);j(this,hs,null);j(this,_e,[]);j(this,ps,[]);j(this,nt,new Set);j(this,qe,new Set);j(this,Be,new Map);j(this,Gt,new Set);le(this,"is_fork",!1);j(this,gt,!1)}skip_effect(t){c(this,Be).has(t)||c(this,Be).set(t,{d:[],m:[]}),c(this,Gt).delete(t)}unskip_effect(t,s=r=>this.schedule(r)){var r=c(this,Be).get(t);if(r){c(this,Be).delete(t);for(var n of r.d)Y(n,ee),s(n);for(n of r.m)Y(n,Ge),s(n)}c(this,Gt).add(t)}capture(t,s,r=!1){t.v!==J&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&ot)===0&&(this.current.set(t,[s,r]),Oe?.set(t,s)),this.is_fork||(t.v=s)}activate(){C=this}deactivate(){C=null,Oe=null}flush(){try{Zs=!0,C=this,P(this,$,ns).call(this)}finally{Mr=0,or=null,Nt=null,Cs=null,Zs=!1,C=null,Oe=null,xt.clear()}}discard(){for(const t of c(this,Ht))t(this);c(this,Ht).clear(),c(this,_t).clear(),P(this,$,Ft).call(this)}register_created_effect(t){c(this,ps).push(t)}increment(t,s){if(S(this,Vt,c(this,Vt)+1),t){let r=c(this,We).get(s)??0;c(this,We).set(s,r+1)}}decrement(t,s){if(S(this,Vt,c(this,Vt)-1),t){let r=c(this,We).get(s)??0;r===1?c(this,We).delete(s):c(this,We).set(s,r-1)}c(this,gt)||(S(this,gt,!0),kt(()=>{S(this,gt,!1),this.linked&&this.flush()}))}transfer_effects(t,s){for(const r of t)c(this,nt).add(r);for(const r of s)c(this,qe).add(r);t.clear(),s.clear()}oncommit(t){c(this,Bt).add(t)}ondiscard(t){c(this,Ht).add(t)}on_fork_commit(t){c(this,_t).add(t)}run_fork_commit_callbacks(){for(const t of c(this,_t))t(this);c(this,_t).clear()}settled(){return(c(this,hs)??S(this,hs,Xr())).promise}static ensure(){var t;if(C===null){const s=C=new Is;P(t=s,$,fr).call(t),!Zs&&!cs&&kt(()=>{c(s,qt)||s.flush()})}return C}apply(){{Oe=null;return}}schedule(t){if(or=t,t.b?.is_pending&&(t.f&(Yt|Vs|Jr))!==0&&(t.f&zt)===0){t.b.defer_effect(t);return}for(var s=t;s.parent!==null;){s=s.parent;var r=s.f;if(Nt!==null&&s===D&&(M===null||(M.f&te)===0))return;if((r&(lt|Fe))!==0){if((r&Q)===0)return;s.f^=Q}}c(this,_e).push(s)}};qt=new WeakMap,rt=new WeakMap,pt=new WeakMap,Bt=new WeakMap,Ht=new WeakMap,_t=new WeakMap,Vt=new WeakMap,We=new WeakMap,hs=new WeakMap,_e=new WeakMap,ps=new WeakMap,nt=new WeakMap,qe=new WeakMap,Be=new WeakMap,Gt=new WeakMap,gt=new WeakMap,$=new WeakSet,lr=function(){if(this.is_fork)return!0;for(const r of c(this,We).keys()){for(var t=r,s=!1;t.parent!==null;){if(c(this,Be).has(t)){s=!0;break}t=t.parent}if(!s)return!0}return!1},ns=function(){var a,f,u;if(S(this,qt,!0),Mr++>1e3&&(P(this,$,Ft).call(this),ji()),!P(this,$,lr).call(this)){for(const v of c(this,nt))c(this,qe).delete(v),Y(v,ee),this.schedule(v);for(const v of c(this,qe))Y(v,Ge),this.schedule(v)}const t=c(this,_e);S(this,_e,[]),this.apply();var s=Nt=[],r=[],n=Cs=[];for(const v of t)try{P(this,$,cr).call(this,v,s,r)}catch(d){throw vn(v),d}if(C=null,n.length>0){var i=Is.ensure();for(const v of n)i.schedule(v)}if(Nt=null,Cs=null,P(this,$,lr).call(this)){P(this,$,zs).call(this,r),P(this,$,zs).call(this,s);for(const[v,d]of c(this,Be))dn(v,d);n.length>0&&P(a=C,$,ns).call(a);return}const o=P(this,$,cn).call(this);if(o){P(f=o,$,fn).call(f,this);return}c(this,nt).clear(),c(this,qe).clear();for(const v of c(this,Bt))v(this);c(this,Bt).clear(),ar=this,Or(r),Or(s),ar=null,c(this,hs)?.resolve();var l=C;if(this.linked&&c(this,Vt)===0&&P(this,$,Ft).call(this),c(this,_e).length>0){l===null&&(l=this,P(this,$,fr).call(this));const v=l;c(v,_e).push(...c(this,_e).filter(d=>!c(v,_e).includes(d)))}l!==null&&P(u=l,$,ns).call(u)},cr=function(t,s,r){t.f^=Q;for(var n=t.first;n!==null;){var i=n.f,o=(i&(Fe|lt))!==0,l=o&&(i&Q)!==0,a=l||(i&ne)!==0||c(this,Be).has(n);if(!a&&n.fn!==null){o?n.f^=Q:(i&Yt)!==0?s.push(n):ws(n)&&((i&Me)!==0&&c(this,qe).add(n),Xt(n));var f=n.first;if(f!==null){n=f;continue}}for(;n!==null;){var u=n.next;if(u!==null){n=u;break}n=n.parent}}},cn=function(){for(var t=c(this,rt);t!==null;){if(!t.is_fork){for(const[s,[,r]]of this.current)if(t.current.has(s)&&!r)return t}t=c(t,rt)}return null},fn=function(t){var r;for(const[n,i]of t.current)!this.previous.has(n)&&t.previous.has(n)&&this.previous.set(n,t.previous.get(n)),this.current.set(n,i);for(const[n,i]of t.async_deriveds){const o=this.async_deriveds.get(n);o&&i.promise.then(o.resolve)}const s=n=>{var i=n.reactions;if(i!==null)for(const a of i){var o=a.f;if((o&te)!==0)s(a);else{var l=a;o&(It|Me)&&!this.async_deriveds.has(l)&&(c(this,qe).delete(l),Y(l,ee),this.schedule(l))}}};for(const n of this.current.keys())s(n);this.oncommit(()=>t.discard()),P(r=t,$,Ft).call(r),C=this,P(this,$,ns).call(this)},zs=function(t){for(var s=0;s!this.current.has(d));if(n.length===0)t&&v.discard();else if(s.length>0){if(t)for(const d of c(this,Gt))v.unskip_effect(d,g=>{var _;(g.f&(Me|It))!==0?v.schedule(g):P(_=v,$,zs).call(_,[g])});v.activate();var i=new Set,o=new Map;for(var l of s)un(l,n,i,o);o=new Map;var a=[...v.current.keys()].filter(d=>this.current.has(d)?this.current.get(d)[0]!==d.v:!0);if(a.length>0)for(const d of c(this,ps))(d.f&(Pe|ne|Ds))===0&&br(d,a,o)&&((d.f&(It|Me))!==0?(Y(d,ee),v.schedule(d)):c(v,nt).add(d));if(c(v,_e).length>0&&!c(v,gt)){v.apply();for(var f of c(v,_e))P(u=v,$,cr).call(u,f,[],[]);S(v,_e,[])}v.deactivate()}}}},fr=function(){Pt===null?Ws=Pt=this:(S(Pt,pt,this),S(this,rt,Pt)),Pt=this},Ft=function(){var t=c(this,rt),s=c(this,pt);t===null?Ws=s:S(t,pt,s),s===null?Pt=t:S(s,rt,t),this.linked=!1};let At=Is;function Ti(e){var t=cs;cs=!0;try{for(var s;;){if(ki(),C===null)return s;C.flush()}}finally{cs=t}}function ji(){try{oi()}catch(e){at(e,or)}}let Ke=null;function Or(e){var t=e.length;if(t!==0){for(var s=0;s0)){xt.clear();for(const n of Ke){if((n.f&(Pe|ne))!==0)continue;const i=[n];let o=n.parent;for(;o!==null;)Ke.has(o)&&(Ke.delete(o),i.push(o)),o=o.parent;for(let l=i.length-1;l>=0;l--){const a=i[l];(a.f&(Pe|ne))===0&&Xt(a)}}Ke.clear()}}Ke=null}}function un(e,t,s,r){if(!s.has(e)&&(s.add(e),e.reactions!==null))for(const n of e.reactions){const i=n.f;(i&te)!==0?un(n,t,s,r):(i&(It|Me))!==0&&(i&ee)===0&&br(n,t,r)&&(Y(n,ee),yr(n))}}function br(e,t,s){const r=s.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const n of e.deps){if(wt.call(t,n))return!0;if((n.f&te)!==0&&br(n,t,s))return s.set(n,!0),!0}return s.set(e,!1),!1}function yr(e){C.schedule(e)}function dn(e,t){if(!((e.f&Fe)!==0&&(e.f&Q)!==0)){(e.f&ee)!==0?t.d.push(e):(e.f&Ge)!==0&&t.m.push(e),Y(e,Q);for(var s=e.first;s!==null;)dn(s,t),s=s.next}}function vn(e){Y(e,Q);for(var t=e.first;t!==null;)vn(t),t=t.next}function Ai(e){let t=0,s=Ct(0),r;return()=>{Sr()&&(p(s),jn(()=>(t===0&&(r=Nn(()=>e(()=>fs(s)))),t+=1,()=>{kt(()=>{t-=1,t===0&&(r?.(),r=void 0,fs(s))})})))}}var Ci=Kt|Jt;function zi(e,t,s,r){new Li(e,t,s,r)}var ye,_r,we,mt,ce,ke,re,ge,Ze,bt,it,Ut,_s,gs,Xe,qs,K,Ri,Mi,Oi,ur,Ls,Rs,dr,vr;class Li{constructor(t,s,r,n){j(this,K);le(this,"parent");le(this,"is_pending",!1);le(this,"transform_error");j(this,ye);j(this,_r,null);j(this,we);j(this,mt);j(this,ce);j(this,ke,null);j(this,re,null);j(this,ge,null);j(this,Ze,null);j(this,bt,0);j(this,it,0);j(this,Ut,!1);j(this,_s,new Set);j(this,gs,new Set);j(this,Xe,null);j(this,qs,Ai(()=>(S(this,Xe,Ct(c(this,bt))),()=>{S(this,Xe,null)})));S(this,ye,t),S(this,we,s),S(this,mt,i=>{var o=D;o.b=this,o.f|=rr,r(i)}),this.parent=D.b,this.transform_error=n??this.parent?.transform_error??(i=>i),S(this,ce,Er(()=>{P(this,K,ur).call(this)},Ci))}defer_effect(t){ln(t,c(this,_s),c(this,gs))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!c(this,we).pending}update_pending_count(t,s){P(this,K,dr).call(this,t,s),S(this,bt,c(this,bt)+t),!(!c(this,Xe)||c(this,Ut))&&(S(this,Ut,!0),kt(()=>{S(this,Ut,!1),c(this,Xe)&&Zt(c(this,Xe),c(this,bt))}))}get_effect_pending(){return c(this,qs).call(this),p(c(this,Xe))}error(t){if(!c(this,we).onerror&&!c(this,we).failed)throw t;C?.is_fork?(c(this,ke)&&C.skip_effect(c(this,ke)),c(this,re)&&C.skip_effect(c(this,re)),c(this,ge)&&C.skip_effect(c(this,ge)),C.on_fork_commit(()=>{P(this,K,vr).call(this,t)})):P(this,K,vr).call(this,t)}}ye=new WeakMap,_r=new WeakMap,we=new WeakMap,mt=new WeakMap,ce=new WeakMap,ke=new WeakMap,re=new WeakMap,ge=new WeakMap,Ze=new WeakMap,bt=new WeakMap,it=new WeakMap,Ut=new WeakMap,_s=new WeakMap,gs=new WeakMap,Xe=new WeakMap,qs=new WeakMap,K=new WeakSet,Ri=function(){try{S(this,ke,xe(()=>c(this,mt).call(this,c(this,ye))))}catch(t){this.error(t)}},Mi=function(t){const s=c(this,we).failed;s&&S(this,ge,xe(()=>{s(c(this,ye),()=>t,()=>()=>{})}))},Oi=function(){const t=c(this,we).pending;t&&(this.is_pending=!0,S(this,re,xe(()=>t(c(this,ye)))),kt(()=>{var s=S(this,Ze,document.createDocumentFragment()),r=St();s.append(r),S(this,ke,P(this,K,Rs).call(this,()=>xe(()=>c(this,mt).call(this,r)))),c(this,it)===0&&(c(this,ye).before(s),S(this,Ze,null),Et(c(this,re),()=>{S(this,re,null)}),P(this,K,Ls).call(this,C))}))},ur=function(){try{if(this.is_pending=this.has_pending_snippet(),S(this,it,0),S(this,bt,0),S(this,ke,xe(()=>{c(this,mt).call(this,c(this,ye))})),c(this,it)>0){var t=S(this,Ze,document.createDocumentFragment());Ar(c(this,ke),t);const s=c(this,we).pending;S(this,re,xe(()=>s(c(this,ye))))}else P(this,K,Ls).call(this,C)}catch(s){this.error(s)}},Ls=function(t){this.is_pending=!1,t.transfer_effects(c(this,_s),c(this,gs))},Rs=function(t){var s=D,r=M,n=Ae;Ue(c(this,ce)),Ce(c(this,ce)),Wt(c(this,ce).ctx);try{return At.ensure(),t()}catch(i){return an(i),null}finally{Ue(s),Ce(r),Wt(n)}},dr=function(t,s){var r;if(!this.has_pending_snippet()){this.parent&&P(r=this.parent,K,dr).call(r,t,s);return}S(this,it,c(this,it)+t),c(this,it)===0&&(P(this,K,Ls).call(this,s),c(this,re)&&Et(c(this,re),()=>{S(this,re,null)}),c(this,Ze)&&(c(this,ye).before(c(this,Ze)),S(this,Ze,null)))},vr=function(t){c(this,ke)&&(he(c(this,ke)),S(this,ke,null)),c(this,re)&&(he(c(this,re)),S(this,re,null)),c(this,ge)&&(he(c(this,ge)),S(this,ge,null));var s=c(this,we).onerror;let r=c(this,we).failed;var n=!1,i=!1;const o=()=>{if(n){yi();return}n=!0,i&&ui(),c(this,ge)!==null&&Et(c(this,ge),()=>{S(this,ge,null)}),P(this,K,Rs).call(this,()=>{P(this,K,ur).call(this)})},l=a=>{try{i=!0,s?.(a,o),i=!1}catch(f){at(f,c(this,ce)&&c(this,ce).parent)}r&&S(this,ge,P(this,K,Rs).call(this,()=>{try{return xe(()=>{var f=D;f.b=this,f.f|=rr,r(c(this,ye),()=>a,()=>o)})}catch(f){return at(f,c(this,ce).parent),null}}))};kt(()=>{var a;try{a=this.transform_error(t)}catch(f){at(f,c(this,ce)&&c(this,ce).parent);return}a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(l,f=>at(f,c(this,ce)&&c(this,ce).parent)):l(a)})};function Di(e,t,s,r){const n=wr;var i=e.filter(d=>!d.settled);if(s.length===0&&i.length===0){r(t.map(n));return}var o=D,l=Pi(),a=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(d=>d.promise)):null;function f(d){if((o.f&Pe)===0){l();try{r(d)}catch(g){at(g,o)}Fs()}}var u=hn();if(s.length===0){a.then(()=>f(t.map(n))).finally(u);return}function v(){Promise.all(s.map(d=>Fi(d))).then(d=>f([...t.map(n),...d])).catch(d=>at(d,o)).finally(u)}a?a.then(()=>{l(),v(),Fs()}):v()}function Pi(){var e=D,t=M,s=Ae,r=C;return function(i=!0){Ue(e),Ce(t),Wt(s),i&&(e.f&Pe)===0&&(r?.activate(),r?.apply())}}function Fs(e=!0){Ue(null),Ce(null),Wt(null),e&&C?.deactivate()}function hn(){var e=D,t=e.b,s=C,r=t.is_rendered();return t.update_pending_count(1,s),s.increment(r,e),()=>{t.update_pending_count(-1,s),s.decrement(r,e)}}function wr(e){var t=te|ee;return D!==null&&(D.f|=Jt),{ctx:Ae,deps:null,effects:null,equals:tn,f:t,fn:e,reactions:null,rv:0,v:J,wv:0,parent:D,ac:null}}const Es=Symbol("obsolete");function Fi(e,t,s){let r=D;r===null&&si();var n=void 0,i=Ct(J),o=!M,l=new Set;return Qi(()=>{var a=D,f=Xr();n=f.promise;try{Promise.resolve(e()).then(f.resolve,g=>{g!==Gs&&f.reject(g)}).finally(Fs)}catch(g){f.reject(g),Fs()}var u=C;if(o){if((a.f&zt)!==0)var v=hn();if(r.b.is_rendered())u.async_deriveds.get(a)?.reject(Es);else for(const g of l.values())g.reject(Es);l.add(f),u.async_deriveds.set(a,f)}const d=(g,_=void 0)=>{v?.(),l.delete(f),_!==Es&&(u.activate(),_?(i.f|=ot,Zt(i,_)):((i.f&ot)!==0&&(i.f^=ot),Zt(i,g)),u.deactivate())};f.promise.then(d,g=>d(null,g||"unknown"))}),Sn(()=>{for(const a of l)a.reject(Es)}),new Promise(a=>{function f(u){function v(){u===n?a(i):f(n)}u.then(v,v)}f(n)})}function U(e){const t=wr(e);return Rn(t),t}function $i(e){const t=wr(e);return t.equals=sn,t}function Ni(e){var t=e.effects;if(t!==null){e.effects=null;for(var s=0;s0&&!gn&&Bi()}return t}function Bi(){gn=!1;for(const e of $s){(e.f&Q)!==0&&Y(e,Ge);let t;try{t=ws(e)}catch{t=!0}t&&Xt(e)}$s.clear()}function fs(e){N(e,e.v+1)}function mn(e,t,s){var r=e.reactions;if(r!==null)for(var n=r.length,i=0;i{if(Tt===i)return l();var a=M,f=Tt;Ce(null),Nr(i);var u=l();return Ce(a),Nr(f),u};return r&&s.set("length",X(e.length)),new Proxy(e,{defineProperty(l,a,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&li();var u=s.get(a);return u===void 0?o(()=>{var v=X(f.value);return s.set(a,v),v}):N(u,f.value,!0),!0},deleteProperty(l,a){var f=s.get(a);if(f===void 0){if(a in l){const u=o(()=>X(J));s.set(a,u),fs(n)}}else N(f,J),fs(n);return!0},get(l,a,f){if(a===ls)return e;var u=s.get(a),v=a in l;if(u===void 0&&(!v||os(l,a)?.writable)&&(u=o(()=>{var g=Ee(v?l[a]:J),_=X(g);return _}),s.set(a,u)),u!==void 0){var d=p(u);return d===J?void 0:d}return Reflect.get(l,a,f)},getOwnPropertyDescriptor(l,a){var f=Reflect.getOwnPropertyDescriptor(l,a);if(f&&"value"in f){var u=s.get(a);u&&(f.value=p(u))}else if(f===void 0){var v=s.get(a),d=v?.v;if(v!==void 0&&d!==J)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return f},has(l,a){if(a===ls)return!0;var f=s.get(a),u=f!==void 0&&f.v!==J||Reflect.has(l,a);if(f!==void 0||D!==null&&(!u||os(l,a)?.writable)){f===void 0&&(f=o(()=>{var d=u?Ee(l[a]):J,g=X(d);return g}),s.set(a,f));var v=p(f);if(v===J)return!1}return u},set(l,a,f,u){var v=s.get(a),d=a in l;if(r&&a==="length")for(var g=f;gX(J)),s.set(g+"",_))}if(v===void 0)(!d||os(l,a)?.writable)&&(v=o(()=>X(void 0)),N(v,Ee(f)),s.set(a,v));else{d=v.v!==J;var m=o(()=>Ee(f));N(v,m)}var h=Reflect.getOwnPropertyDescriptor(l,a);if(h?.set&&h.set.call(u,f),!d){if(r&&typeof a=="string"){var w=s.get("length"),b=Number(a);Number.isInteger(b)&&b>=w.v&&N(w,b+1)}fs(n)}return!0},ownKeys(l){p(n);var a=Reflect.ownKeys(l).filter(v=>{var d=s.get(v);return d===void 0||d.v!==J});for(var[f,u]of s)u.v!==J&&!(f in l)&&a.push(f);return a},setPrototypeOf(){ci()}})}function Dr(e){try{if(e!==null&&typeof e=="object"&&ls in e)return e[ls]}catch{}return e}function Hi(e,t){return Object.is(Dr(e),Dr(t))}var Pr,bn,yn,wn;function Vi(){if(Pr===void 0){Pr=window,bn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,s=Text.prototype;yn=os(t,"firstChild").get,wn=os(t,"nextSibling").get,Lr(e)&&(e[nr]=void 0,e[js]=null,e[ir]=void 0,e.__e=void 0),Lr(s)&&(s[rs]=void 0)}}function St(e=""){return document.createTextNode(e)}function Ns(e){return yn.call(e)}function ys(e){return wn.call(e)}function y(e,t){return Ns(e)}function Gi(e,t=!1){{var s=Ns(e);return s instanceof Comment&&s.data===""?ys(s):s}}function k(e,t=1,s=!1){let r=e;for(;t--;)r=ys(r);return r}function Ui(e){e.textContent=""}function kn(){return!1}function Yi(e,t,s){return document.createElementNS(en,e,void 0)}let Fr=!1;function Ki(){Fr||(Fr=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[As]?.()})},{capture:!0}))}function xr(e){var t=M,s=D;Ce(null),Ue(null);try{return e()}finally{Ce(t),Ue(s)}}function xn(e,t,s,r=s){e.addEventListener(t,()=>xr(s));const n=e[As];n?e[As]=()=>{n(),r(!0)}:e[As]=()=>r(!0),Ki()}function Wi(e){D===null&&(M===null&&ai(),ii()),ct&&ni()}function Zi(e,t){var s=t.last;s===null?t.last=t.first=e:(s.next=e,e.prev=s,t.last=e)}function Je(e,t){var s=D;s!==null&&(s.f&ne)!==0&&(e|=ne);var r={ctx:Ae,deps:null,nodes:null,f:e|ee|Te,first:null,fn:t,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,wv:0,ac:null};C?.register_created_effect(r);var n=r;if((e&Yt)!==0)Nt!==null?Nt.push(r):At.ensure().schedule(r);else if(t!==null){try{Xt(r)}catch(o){throw he(r),o}n.deps===null&&n.teardown===null&&n.nodes===null&&n.first===n.last&&(n.f&Jt)===0&&(n=n.first,(e&Me)!==0&&(e&Kt)!==0&&n!==null&&(n.f|=Kt))}if(n!==null&&(n.parent=s,s!==null&&Zi(n,s),M!==null&&(M.f&te)!==0&&(e<)===0)){var i=M;(i.effects??(i.effects=[])).push(n)}return r}function Sr(){return M!==null&&!De}function Sn(e){const t=Je(Vs,null);return Y(t,Q),t.teardown=e,t}function En(e){Wi();var t=D.f,s=!M&&(t&Fe)!==0&&(t&zt)===0;if(s){var r=Ae;(r.e??(r.e=[])).push(e)}else return Tn(e)}function Tn(e){return Je(Yt|ei,e)}function Xi(e){At.ensure();const t=Je(lt|Jt,e);return(s={})=>new Promise(r=>{s.outro?Et(t,()=>{he(t),r(void 0)}):(he(t),r(void 0))})}function Ji(e){return Je(Yt,e)}function Qi(e){return Je(It|Jt,e)}function jn(e,t=0){return Je(Vs|t,e)}function I(e,t=[],s=[],r=[]){Di(r,t,s,n=>{Je(Vs,()=>e(...n.map(p)))})}function Er(e,t=0){var s=Je(Me|t,e);return s}function xe(e){return Je(Fe|Jt,e)}function An(e){var t=e.teardown;if(t!==null){const s=ct,r=M;$r(!0),Ce(null);try{t.call(null)}finally{$r(s),Ce(r)}}}function Tr(e,t=!1){var s=e.first;for(e.first=e.last=null;s!==null;){const n=s.ac;n!==null&&xr(()=>{n.abort(Gs)});var r=s.next;(s.f<)!==0?s.parent=null:he(s,t),s=r}}function ea(e){for(var t=e.first;t!==null;){var s=t.next;(t.f&Fe)===0&&he(t),t=s}}function he(e,t=!0){var s=!1;(t||(e.f&Qn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(ta(e.nodes.start,e.nodes.end),s=!0),Y(e,Rr),Tr(e,t&&!s),vs(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const i of r)i.stop();An(e),e.f^=Rr,e.f|=Pe;var n=e.parent;n!==null&&n.first!==null&&Cn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function ta(e,t){for(;e!==null;){var s=e===t?null:ys(e);e.remove(),e=s}}function Cn(e){var t=e.parent,s=e.prev,r=e.next;s!==null&&(s.next=r),r!==null&&(r.prev=s),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=s))}function Et(e,t,s=!0){var r=[];zn(e,r,!0);var n=()=>{s&&he(e),t&&t()},i=r.length;if(i>0){var o=()=>--i||n();for(var l of r)l.out(o)}else n()}function zn(e,t,s){if((e.f&ne)===0){e.f^=ne;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||s)&&t.push(l);for(var n=e.first;n!==null;){var i=n.next;if((n.f<)===0){var o=(n.f&Kt)!==0||(n.f&Fe)!==0&&(e.f&Me)!==0;zn(n,t,o?s:!1)}n=i}}}function jr(e){Ln(e,!0)}function Ln(e,t){if((e.f&ne)!==0){e.f^=ne,(e.f&Q)===0&&(Y(e,ee),At.ensure().schedule(e));for(var s=e.first;s!==null;){var r=s.next,n=(s.f&Kt)!==0||(s.f&Fe)!==0;Ln(s,n?t:!1),s=r}var i=e.nodes&&e.nodes.t;if(i!==null)for(const o of i)(o.is_global||t)&&o.in()}}function Ar(e,t){if(e.nodes)for(var s=e.nodes.start,r=e.nodes.end;s!==null;){var n=s===r?null:ys(s);t.append(s),s=n}}let Ms=!1,ct=!1;function $r(e){ct=e}let M=null,De=!1;function Ce(e){M=e}let D=null;function Ue(e){D=e}let je=null;function Rn(e){M!==null&&(je===null?je=[e]:je.push(e))}let fe=null,pe=0,be=null;function sa(e){be=e}let Mn=1,vt=0,Tt=vt;function Nr(e){Tt=e}function On(){return++Mn}function ws(e){var t=e.f;if((t&ee)!==0)return!0;if(t&te&&(e.f&=~jt),(t&Ge)!==0){for(var s=e.deps,r=s.length,n=0;ne.wv)return!0}(t&Te)!==0&&Oe===null&&Y(e,Q)}return!1}function Dn(e,t,s=!0){var r=e.reactions;if(r!==null&&!(je!==null&&wt.call(je,e)))for(var n=0;n{e.ac.abort(Gs)}),e.ac=null);try{e.f|=Ps;var u=e.fn,v=u();e.f|=zt;var d=e.deps,g=C?.is_fork;if(fe!==null){var _;if(g||vs(e,pe),d!==null&&pe>0)for(d.length=pe+fe.length,_=0;_{throw h});throw d}}finally{e[ht]=t,delete e.currentTarget,Ce(u),Ue(v)}}}const oa=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function la(e){return oa?.createHTML(e)??e}function ca(e){var t=Yi("template");return t.innerHTML=la(e.replaceAll("","")),t.content}function Br(e,t){var s=D;s.nodes===null&&(s.nodes={start:e,end:t,a:null,t:null})}function L(e,t){var s=(t&_i)!==0,r=(t&gi)!==0,n,i=!e.startsWith("");return()=>{n===void 0&&(n=ca(i?e:""+e),s||(n=Ns(n)));var o=r||bn?document.importNode(n,!0):n.cloneNode(!0);if(s){var l=Ns(o),a=o.lastChild;Br(l,a)}else Br(o,o);return o}}function z(e,t){e!==null&&e.before(t)}function A(e,t){var s=t==null?"":typeof t=="object"?`${t}`:t;s!==(e[rs]??(e[rs]=e.nodeValue))&&(e[rs]=s,e.nodeValue=`${s}`)}function fa(e,t){return ua(e,t)}const Ts=new Map;function ua(e,{target:t,anchor:s,props:r={},events:n,context:i,intro:o=!0,transformError:l}){Vi();var a=void 0,f=Xi(()=>{var u=s??t.appendChild(St());zi(u,{pending:()=>{}},g=>{$e({});var _=Ae;i&&(_.c=i),n&&(r.$$events=n),a=e(g,r)||{},Ne()},l);var v=new Set,d=g=>{for(var _=0;_{for(var g of v)for(const h of[t,document]){var _=Ts.get(h),m=_.get(g);--m==0?(h.removeEventListener(g,qr),_.delete(g),_.size===0&&Ts.delete(h)):_.set(g,m)}hr.delete(d),u!==s&&u.parentNode?.removeChild(u)}});return da.set(a,f),a}let da=new WeakMap;var Le,He,me,yt,ms,bs,Bs;class va{constructor(t,s=!0){le(this,"anchor");j(this,Le,new Map);j(this,He,new Map);j(this,me,new Map);j(this,yt,new Set);j(this,ms,!0);j(this,bs,t=>{if(c(this,Le).has(t)){var s=c(this,Le).get(t),r=c(this,He).get(s);if(r)jr(r),c(this,yt).delete(s);else{var n=c(this,me).get(s);n&&(c(this,He).set(s,n.effect),c(this,me).delete(s),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),r=n.effect)}for(const[i,o]of c(this,Le)){if(c(this,Le).delete(i),i===t)break;const l=c(this,me).get(o);l&&(he(l.effect),c(this,me).delete(o))}for(const[i,o]of c(this,He)){if(i===s||c(this,yt).has(i))continue;const l=()=>{if(Array.from(c(this,Le).values()).includes(i)){var f=document.createDocumentFragment();Ar(o,f),f.append(St()),c(this,me).set(i,{effect:o,fragment:f})}else he(o);c(this,yt).delete(i),c(this,He).delete(i)};c(this,ms)||!r?(c(this,yt).add(i),Et(o,l,!1)):l()}}});j(this,Bs,t=>{c(this,Le).delete(t);const s=Array.from(c(this,Le).values());for(const[r,n]of c(this,me))s.includes(r)||(he(n.effect),c(this,me).delete(r))});this.anchor=t,S(this,ms,s)}ensure(t,s){var r=C,n=kn();if(s&&!c(this,He).has(t)&&!c(this,me).has(t))if(n){var i=document.createDocumentFragment(),o=St();i.append(o),c(this,me).set(t,{effect:xe(()=>s(o)),fragment:i})}else c(this,He).set(t,xe(()=>s(this.anchor)));if(c(this,Le).set(r,t),n){for(const[l,a]of c(this,He))l===t?r.unskip_effect(a):r.skip_effect(a);for(const[l,a]of c(this,me))l===t?r.unskip_effect(a.effect):r.skip_effect(a.effect);r.oncommit(c(this,bs)),r.ondiscard(c(this,Bs))}else c(this,bs).call(this,r)}}Le=new WeakMap,He=new WeakMap,me=new WeakMap,yt=new WeakMap,ms=new WeakMap,bs=new WeakMap,Bs=new WeakMap;function ve(e,t,s=!1){var r=new va(e),n=s?Kt:0;function i(o,l){r.ensure(o,l)}Er(()=>{var o=!1;t((l,a=0)=>{o=!0,i(a,l)}),o||i(-1,null)},n)}function ts(e,t){return t}function ha(e,t,s){for(var r=[],n=t.length,i,o=t.length,l=0;l{if(i){if(i.pending.delete(v),i.done.add(v),i.pending.size===0){var d=e.outrogroups;pr(e,Hs(i.done)),d.delete(i),d.size===0&&(e.outrogroups=null)}}else o-=1},!1)}if(o===0){var a=r.length===0&&s!==null;if(a){var f=s,u=f.parentNode;Ui(u),u.append(f),e.items.clear()}pr(e,t,!a)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function pr(e,t,s=!0){var r;if(e.pending.size>0){r=new Set;for(const o of e.pending.values())for(const l of o)r.add(e.items.get(l).e)}for(var n=0;n{var x=s();return gr(x)?x:x==null?[]:Hs(x)}),d,g=new Map,_=!0;function m(x){(b.effect.f&Pe)===0&&(b.pending.delete(x),b.fallback=u,pa(b,d,o,t,r),u!==null&&(d.length===0?(u.f&Ve)===0?jr(u):(u.f^=Ve,is(u,null,o)):Et(u,()=>{u=null})))}function h(x){b.pending.delete(x)}var w=Er(()=>{d=p(v);for(var x=d.length,O=new Set,W=C,V=kn(),q=0;qi(o)):(u=xe(()=>i(Hr??(Hr=St()))),u.f|=Ve)),x>O.size&&ri(),!_)if(g.set(W,O),V){for(const[R,F]of l)O.has(R)||W.skip_effect(F.e);W.oncommit(m),W.ondiscard(h)}else m(W);p(v)}),b={effect:w,items:l,pending:g,outrogroups:null,fallback:u};_=!1}function ss(e){for(;e!==null&&(e.f&Fe)===0;)e=e.next;return e}function pa(e,t,s,r,n){var i=(r&hi)!==0,o=t.length,l=e.items,a=ss(e.effect.first),f,u=null,v,d=[],g=[],_,m,h,w;if(i)for(w=0;w0){var B=(r&Qr)!==0&&o===0?s:null;if(i){for(w=0;w{if(v!==void 0)for(h of v)h.nodes?.a?.apply()})}function _a(e,t,s,r,n,i,o,l){var a=(o&di)!==0?(o&pi)===0?qi(s,!1,!1):Ct(s):null,f=(o&vi)!==0?Ct(n):null;return{v:a,i:f,e:xe(()=>(i(t,a??s,f??n,l),()=>{e.delete(r)}))}}function is(e,t,s){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end,i=t&&(t.f&Ve)===0?t.nodes.start:s;r!==null;){var o=ys(r);if(i.before(r),r===n)return;r=o}}function st(e,t,s){t===null?e.effect.first=s:t.next=s,s===null?e.effect.last=t:s.prev=t}const Vr=[...` +\r\f \v\uFEFF`];function ga(e,t,s){var r=e==null?"":""+e;if(s){for(var n of Object.keys(s))if(s[n])r=r?r+" "+n:n;else if(r.length)for(var i=n.length,o=0;(o=r.indexOf(n,o))>=0;){var l=o+i;(o===0||Vr.includes(r[o-1]))&&(l===r.length||Vr.includes(r[l]))?r=(o===0?"":r.substring(0,o))+r.substring(l+1):o=l}}return r===""?null:r}function Gr(e,t=!1){var s=t?" !important;":";",r="";for(var n of Object.keys(e)){var i=e[n];i!=null&&i!==""&&(r+=" "+n+": "+i+s)}return r}function Xs(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function ma(e,t){if(t){var s="",r,n;if(Array.isArray(t)?(r=t[0],n=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,o=0,l=!1,a=[];r&&a.push(...Object.keys(r).map(Xs)),n&&a.push(...Object.keys(n).map(Xs));var f=0,u=-1;const m=e.length;for(var v=0;v{qn(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Sn(()=>{t.disconnect()})}function ya(e,t,s=t){var r=new WeakSet,n=!0;xn(e,"change",i=>{var o=i?"[selected]":":checked",l;if(e.multiple)l=[].map.call(e.querySelectorAll(o),ds);else{var a=e.querySelector(o)??e.querySelector("option:not([disabled])");l=a&&ds(a)}s(l),e.__value=l,C!==null&&r.add(C)}),Ji(()=>{var i=t();if(e===document.activeElement){var o=C;if(r.has(o))return}if(qn(e,i,n),n&&i===void 0){var l=e.querySelector(":checked");l!==null&&(i=ds(l),s(i))}e.__value=i,n=!1}),ba(e)}function ds(e){return"__value"in e?e.__value:e.value}const wa=Symbol("is custom element"),ka=Symbol("is html");function Se(e,t,s,r){var n=xa(e);n[t]!==(n[t]=s)&&(t==="loading"&&(e[ti]=s),s==null?e.removeAttribute(t):typeof s!="string"&&Sa(e).includes(t)?e[t]=s:e.setAttribute(t,s))}function xa(e){return e[js]??(e[js]={[wa]:e.nodeName.includes("-"),[ka]:e.namespaceURI===en})}var Ur=new Map;function Sa(e){var t=e.getAttribute("is")||e.nodeName,s=Ur.get(t);if(s)return s;Ur.set(t,s=[]);for(var r,n=e,i=Element.prototype;i!==n;){r=Kn(n);for(var o in r)r[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&s.push(o);n=Zr(n)}return s}function Os(e,t,s=t){var r=new WeakSet;xn(e,"input",async n=>{var i=n?e.defaultValue:e.value;if(i=Qs(e)?er(i):i,s(i),C!==null&&r.add(C),await na(),i!==(i=t())){var o=e.selectionStart,l=e.selectionEnd,a=e.value.length;if(e.value=i??"",l!==null){var f=e.value.length;o===l&&l===a&&f>a?(e.selectionStart=f,e.selectionEnd=f):(e.selectionStart=o,e.selectionEnd=Math.min(l,f))}}}),Nn(t)==null&&e.value&&(s(Qs(e)?er(e.value):e.value),C!==null&&r.add(C)),jn(()=>{var n=t();if(e===document.activeElement){var i=C;if(r.has(i))return}Qs(e)&&n===er(e.value)||e.type==="date"&&!n&&!e.value||n!==e.value&&(e.value=n??"")})}function Qs(e){var t=e.type;return t==="number"||t==="range"}function er(e){return e===""?null:+e}function tr(e,t,s,r){var n=r,i=!0,o=()=>(i&&(i=!1,n=r),n),l;l=e[t],l===void 0&&r!==void 0&&(l=o());var a;return a=()=>{var f=e[t];return f===void 0?o():(i=!0,f)},a}const Ea="5";var Wr;typeof window<"u"&&((Wr=window.__svelte??(window.__svelte={})).v??(Wr.v=new Set)).add(Ea);const $t=typeof window<"u"&&window.slashedBricksApp?window.slashedBricksApp:{defaults:{},settings:{},tabs:{},rest:{url:"",nonce:""}},se={defaults:$t.defaults||{},tabs:$t.tabs||{},rest:$t.rest||{url:"",nonce:""},inventory:$t.inventory||{variables:[],sf_classes:[],is_classes:[]},pluginSettings:$t.pluginSettings||{}},Re=Ee(structuredClone($t.settings||{})),E=Ee({activeTab:Ta(se.tabs)||"colors",dirty:!1,saving:!1,lastSavedAt:null,error:""});function Ta(e){for(const t in e)return t;return null}function ja(){E.dirty=!0,E.error=""}function Aa(e){Re[e]&&delete Re[e]}var Ca=L(''),za=L('

');function La(e,t){$e(t,!0);var s=za();ue(s,21,()=>Object.entries(se.tabs),([r,n])=>r,(r,n)=>{var i=U(()=>sr(p(n),2));let o=()=>p(i)[0],l=()=>p(i)[1];var a=Ca();let f;var u=y(a);I(()=>{f=us(a,1,"tab-nav__btn svelte-yyiz68",null,f,{active:E.activeTab===o()}),A(u,l())}),de("click",a,()=>E.activeTab=o()),z(r,a)}),z(e,s),Ne()}Lt(["click"]);var Ra=L(' '),Ma=L(' ',1),Oa=L(''),Da=L('
');function Yr(e,t){$e(t,!0);let s=tr(t,"hexHint",3,""),r=tr(t,"rawHint",3,""),n=tr(t,"cssVar",3,"");const i=/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,o=(()=>{const R=(Re.colors?.[t.storeKey]??"").trim(),F=R===""||i.test(R);return{mode:F?"hex":"raw",hex:F?R:"",raw:F?"":R}})();let l=X(Ee(o.mode)),a=X(Ee(o.hex)),f=X(Ee(o.raw));function u(){Re.colors||(Re.colors={});const R=p(f).trim(),F=p(a).trim(),G=p(l)==="raw"?R:F;G===""?delete Re.colors[t.storeKey]:Re.colors[t.storeKey]=G,ja()}function v(){p(l)==="hex"?(N(l,"raw"),N(a,"")):(N(l,"hex"),N(f,"")),u()}const d=U(()=>(p(l)==="raw"?p(f):p(a))||s()||"transparent");var g=Da(),_=y(g),m=y(_),h=y(m),w=k(m,2);{var b=R=>{var F=Ra(),G=y(F);I(()=>A(G,n())),z(R,F)};ve(w,R=>{n()&&R(b)})}var x=k(_,2),O=y(x);let W;var V=k(O,2);{var q=R=>{var F=Ma(),G=Gi(F),ie=k(G,2);I(()=>{Se(G,"id",t.storeKey),Se(ie,"placeholder",s())}),de("input",G,u),Os(G,()=>p(a),ze=>N(a,ze)),de("input",ie,u),Os(ie,()=>p(a),ze=>N(a,ze)),z(R,F)},Z=R=>{var F=Oa();I(()=>{Se(F,"id",t.storeKey),Se(F,"placeholder",r())}),de("input",F,u),Os(F,()=>p(f),G=>N(f,G)),z(R,F)};ve(V,R=>{p(l)==="hex"?R(q):R(Z,-1)})}var B=k(V,2),T=y(B);I(()=>{Se(m,"for",t.storeKey),A(h,t.label),W=as(O,"",W,{background:p(d)}),A(T,p(l)==="hex"?"Advanced (oklch / raw)":"Use HEX picker")}),de("click",B,v),z(e,g),Ne()}Lt(["input","click"]);var Pa=L(`

Brand Colors

Pick a color via the HEX input, or switch to Advanced to paste any CSS color value (oklch, rgb, hsl, var(...), etc). Whatever you save is fed - straight into the framework as the source of the brand scale.

Status Colors

`);function Fa(e,t){Fe(t,!0);const s=se.defaults?.colors??{},r=l=>l.charAt(0).toUpperCase()+l.slice(1);var n=Pa(),i=k(y(n),4);ue(i,21,()=>Object.entries(s.brand??{}),([l,a])=>l,(l,a)=>{var f=G(()=>sr(p(a),2));let d=()=>p(f)[0],v=()=>p(f)[1];{let u=G(()=>`brand_${d()}`),g=G(()=>r(d())),_=G(()=>s.brand_hex_hints?.[d()]??""),m=G(()=>`--sf-color-${d()}-light`);Yr(l,{get storeKey(){return p(u)},get label(){return p(g)},get hexHint(){return p(_)},get rawHint(){return v()},get cssVar(){return p(m)}})}});var o=k(i,4);ue(o,21,()=>Object.entries(s.status??{}),([l,a])=>l,(l,a)=>{var f=G(()=>sr(p(a),2));let d=()=>p(f)[0],v=()=>p(f)[1];{let u=G(()=>`status_${d()}`),g=G(()=>r(d())),_=G(()=>s.status_hex_hints?.[d()]??""),m=G(()=>`--sf-color-${d()}-light`);Yr(l,{get storeKey(){return p(u)},get label(){return p(g)},get hexHint(){return p(_)},get rawHint(){return v()},get cssVar(){return p(m)}})}}),C(e,n),$e()}var $a=z('
  • '),Na=z('
      '),Ia=z('
      '),qa=z(`

      All --sf-* custom properties declared in the active SLASHED bundle, - grouped by category.

      `);function Ba(e,t){Fe(t,!0);const s=se.inventory?.variables??[],r={color:"Colors",text:"Typography",font:"Typography",leading:"Typography",tracking:"Typography",body:"Typography",heading:"Typography",h1:"Typography",h2:"Typography",h3:"Typography",h4:"Typography",h5:"Typography",h6:"Typography",prose:"Typography",code:"Typography",optical:"Typography",line:"Typography",space:"Spacing",gap:"Spacing",gutter:"Spacing",component:"Spacing",section:"Spacing",flow:"Spacing",safe:"Spacing",header:"Spacing",sticky:"Spacing",size:"Sizing",aspect:"Sizing",ratio:"Sizing",touch:"Sizing",container:"Layout",stack:"Layout",cluster:"Layout",sidebar:"Layout",switcher:"Layout",grid:"Layout",cover:"Layout",frame:"Layout",reel:"Layout",imposter:"Layout",bento:"Layout",box:"Layout",center:"Layout",content:"Layout",breakout:"Layout",divider:"Layout",field:"Layout",border:"Borders",stroke:"Borders",radius:"Radius",shadow:"Shadows",blur:"Effects",opacity:"Effects",gradient:"Effects",mask:"Effects",perspective:"Effects",drop:"Effects",contrast:"Effects",duration:"Motion",ease:"Motion",transition:"Motion",motion:"Motion",animation:"Motion",icon:"Icons",z:"Z-Index",is:"States",current:"States",focus:"Focus",caret:"Focus",scroll:"Scroll",scrollbar:"Scroll",print:"Print",truncate:"Misc"},n=["Colors","Typography","Spacing","Sizing","Layout","Borders","Radius","Shadows","Effects","Motion","Icons","Z-Index","States","Focus","Scroll","Print","Misc"];function i(_){let m=_;m.startsWith("--sf-")&&(m=m.slice(5));const h=m.indexOf("-"),w=h===-1?m:m.slice(0,h);return r[w]||"Misc"}function o(_){const m={};for(const w of _){const b=i(w);m[b]||(m[b]=[]),m[b].push(w)}const h=[];for(const w of n)m[w]?.length&&(m[w].sort(),h.push({category:w,items:m[w]}));for(const w of Object.keys(m))!n.includes(w)&&m[w]?.length&&(m[w].sort(),h.push({category:w,items:m[w]}));return h}const l=o(s);let a=Se({});function f(_){a[_]=!a[_]}var d=qa(),v=y(d),u=y(v),g=k(v,4);ue(g,17,()=>l,({category:_,items:m})=>_,(_,m)=>{let h=()=>p(m).category,w=()=>p(m).items;var b=Ia(),x=y(b),F=y(x),K=y(F),W=k(F,2),B=y(W),X=k(W,2),R=y(X),M=k(x,2);{var O=N=>{var V=Na();ue(V,20,w,ie=>ie,(ie,Ce)=>{var ks=$a(),Us=y(ks),H=y(Us);q(()=>j(H,Ce)),C(ie,ks)}),C(N,V)};ve(M,N=>{a[h()]&&N(O)})}q(()=>{Xe(x,"aria-expanded",a[h()]?"true":"false"),j(K,a[h()]?"▼":"▶"),j(B,h()),j(R,`(${w().length??""})`)}),de("click",x,()=>f(h())),C(_,b)}),q(()=>j(u,`CSS Variables (${s.length??""})`)),C(e,d),$e()}Lt(["click"]);var Ha=z('
    • '),Va=z('
        '),Ga=z('
      • '),Ua=z('
          '),Ya=z('

          All utility and state classes declared in the active SLASHED bundle.

          ');function Ka(e,t){Fe(t,!0);const s=se.inventory?.sf_classes??[],r=se.inventory?.is_classes??[];let n=Z(!1),i=Z(!1);var o=Ya(),l=y(o),a=y(l),f=k(l,4),d=y(f),v=y(d),u=y(v),g=k(v,4),_=y(g),m=k(d,2);{var h=R=>{var M=Va();ue(M,20,()=>s,O=>O,(O,N)=>{var V=Ha(),ie=y(V),Ce=y(ie);q(()=>j(Ce,`.${N??""}`)),C(O,V)}),C(R,M)};ve(m,R=>{p(n)&&R(h)})}var w=k(f,2),b=y(w),x=y(b),F=y(x),K=k(x,4),W=y(K),B=k(b,2);{var X=R=>{var M=Ua();ue(M,20,()=>r,O=>O,(O,N)=>{var V=Ga(),ie=y(V),Ce=y(ie);q(()=>j(Ce,`.${N??""}`)),C(O,V)}),C(R,M)};ve(B,R=>{p(i)&&R(X)})}q(()=>{j(a,`Registered Classes (${s.length+r.length})`),Xe(d,"aria-expanded",p(n)?"true":"false"),j(u,p(n)?"▼":"▶"),j(_,`(${s.length??""})`),Xe(b,"aria-expanded",p(i)?"true":"false"),j(F,p(i)?"▼":"▶"),j(W,`(${r.length??""})`)}),de("click",d,()=>I(n,!p(n))),de("click",b,()=>I(i,!p(i))),C(e,o),$e()}Lt(["click"]);async function Cr(e,t){const{url:s,nonce:r}=se.rest;if(!s)return console.info("[slashed-admin] (dev) would POST",e,t),{ok:!0,dev:!0};const n=await fetch(s+e,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":r},body:JSON.stringify(t)});if(!n.ok){const i=await n.text();throw new Error(i||`HTTP ${n.status}`)}return n.json()}function Wa(e,t){return Cr("/tokens",{section:e,values:t})}function Za(e){return Cr("/tokens/reset",{section:e})}function Xa(e){return Cr("/settings",e)}var Ja=z('Saved'),Qa=z(' '),eo=z(`

          Bundle Info

          The SLASHED CSS bundle is loaded automatically by the plugin. The inventory + straight into the framework as the source of the brand scale.

          Status Colors

          `);function Fa(e,t){$e(t,!0);const s=se.defaults?.colors??{},r=l=>l.charAt(0).toUpperCase()+l.slice(1);var n=Pa(),i=k(y(n),4);ue(i,21,()=>Object.entries(s.brand??{}),([l,a])=>l,(l,a)=>{var f=U(()=>sr(p(a),2));let u=()=>p(f)[0],v=()=>p(f)[1];{let d=U(()=>`brand_${u()}`),g=U(()=>r(u())),_=U(()=>s.brand_hex_hints?.[u()]??""),m=U(()=>`--sf-color-${u()}-light`);Yr(l,{get storeKey(){return p(d)},get label(){return p(g)},get hexHint(){return p(_)},get rawHint(){return v()},get cssVar(){return p(m)}})}});var o=k(i,4);ue(o,21,()=>Object.entries(s.status??{}),([l,a])=>l,(l,a)=>{var f=U(()=>sr(p(a),2));let u=()=>p(f)[0],v=()=>p(f)[1];{let d=U(()=>`status_${u()}`),g=U(()=>r(u())),_=U(()=>s.status_hex_hints?.[u()]??""),m=U(()=>`--sf-color-${u()}-light`);Yr(l,{get storeKey(){return p(d)},get label(){return p(g)},get hexHint(){return p(_)},get rawHint(){return v()},get cssVar(){return p(m)}})}}),z(e,n),Ne()}var $a=L('
        • '),Na=L('
            '),Ia=L('
            '),qa=L(`

            All --sf-* custom properties declared in the active SLASHED bundle, + grouped by category.

            `);function Ba(e,t){$e(t,!0);const s=se.inventory?.variables??[],r={color:"Colors",text:"Typography",font:"Typography",leading:"Typography",tracking:"Typography",body:"Typography",heading:"Typography",h1:"Typography",h2:"Typography",h3:"Typography",h4:"Typography",h5:"Typography",h6:"Typography",prose:"Typography",code:"Typography",optical:"Typography",line:"Typography",space:"Spacing",gap:"Spacing",gutter:"Spacing",component:"Spacing",section:"Spacing",flow:"Spacing",safe:"Spacing",header:"Spacing",sticky:"Spacing",size:"Sizing",aspect:"Sizing",ratio:"Sizing",touch:"Sizing",container:"Layout",stack:"Layout",cluster:"Layout",sidebar:"Layout",switcher:"Layout",grid:"Layout",cover:"Layout",frame:"Layout",reel:"Layout",imposter:"Layout",bento:"Layout",box:"Layout",center:"Layout",content:"Layout",breakout:"Layout",divider:"Layout",field:"Layout",border:"Borders",stroke:"Borders",radius:"Radius",shadow:"Shadows",blur:"Effects",opacity:"Effects",gradient:"Effects",mask:"Effects",perspective:"Effects",drop:"Effects",contrast:"Effects",duration:"Motion",ease:"Motion",transition:"Motion",motion:"Motion",animation:"Motion",icon:"Icons",z:"Z-Index",is:"States",current:"States",focus:"Focus",caret:"Focus",scroll:"Scroll",scrollbar:"Scroll",print:"Print",truncate:"Misc"},n=["Colors","Typography","Spacing","Sizing","Layout","Borders","Radius","Shadows","Effects","Motion","Icons","Z-Index","States","Focus","Scroll","Print","Misc"];function i(_){let m=_;m.startsWith("--sf-")&&(m=m.slice(5));const h=m.indexOf("-"),w=h===-1?m:m.slice(0,h);return r[w]||"Misc"}function o(_){const m={};for(const w of _){const b=i(w);m[b]||(m[b]=[]),m[b].push(w)}const h=[];for(const w of n)m[w]?.length&&(m[w].sort(),h.push({category:w,items:m[w]}));for(const w of Object.keys(m))!n.includes(w)&&m[w]?.length&&(m[w].sort(),h.push({category:w,items:m[w]}));return h}const l=o(s);let a=Ee({});function f(_){a[_]=!a[_]}var u=qa(),v=y(u),d=y(v),g=k(v,4);ue(g,17,()=>l,({category:_,items:m})=>_,(_,m)=>{let h=()=>p(m).category,w=()=>p(m).items;var b=Ia(),x=y(b),O=y(x),W=y(O),V=k(O,2),q=y(V),Z=k(V,2),B=y(Z),T=k(x,2);{var R=F=>{var G=Na();ue(G,20,w,ie=>ie,(ie,ze)=>{var ks=$a(),Us=y(ks),H=y(Us);I(()=>A(H,ze)),z(ie,ks)}),z(F,G)};ve(T,F=>{a[h()]&&F(R)})}I(()=>{Se(x,"aria-expanded",a[h()]?"true":"false"),A(W,a[h()]?"▼":"▶"),A(q,h()),A(B,`(${w().length??""})`)}),de("click",x,()=>f(h())),z(_,b)}),I(()=>A(d,`CSS Variables (${s.length??""})`)),z(e,u),Ne()}Lt(["click"]);var Ha=L('
          • '),Va=L('
              '),Ga=L('
            • '),Ua=L('
                '),Ya=L('

                All utility and state classes declared in the active SLASHED bundle.

                ');function Ka(e,t){$e(t,!0);const s=se.inventory?.sf_classes??[],r=se.inventory?.is_classes??[];let n=X(!1),i=X(!1);var o=Ya(),l=y(o),a=y(l),f=k(l,4),u=y(f),v=y(u),d=y(v),g=k(v,4),_=y(g),m=k(u,2);{var h=B=>{var T=Va();ue(T,20,()=>s,R=>R,(R,F)=>{var G=Ha(),ie=y(G),ze=y(ie);I(()=>A(ze,`.${F??""}`)),z(R,G)}),z(B,T)};ve(m,B=>{p(n)&&B(h)})}var w=k(f,2),b=y(w),x=y(b),O=y(x),W=k(x,4),V=y(W),q=k(b,2);{var Z=B=>{var T=Ua();ue(T,20,()=>r,R=>R,(R,F)=>{var G=Ga(),ie=y(G),ze=y(ie);I(()=>A(ze,`.${F??""}`)),z(R,G)}),z(B,T)};ve(q,B=>{p(i)&&B(Z)})}I(()=>{A(a,`Registered Classes (${s.length+r.length})`),Se(u,"aria-expanded",p(n)?"true":"false"),A(d,p(n)?"▼":"▶"),A(_,`(${s.length??""})`),Se(b,"aria-expanded",p(i)?"true":"false"),A(O,p(i)?"▼":"▶"),A(V,`(${r.length??""})`)}),de("click",u,()=>N(n,!p(n))),de("click",b,()=>N(i,!p(i))),z(e,o),Ne()}Lt(["click"]);async function Cr(e,t){const{url:s,nonce:r}=se.rest;if(!s)return console.info("[slashed-admin] (dev) would POST",e,t),{ok:!0,dev:!0};const n=await fetch(s+e,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":r},body:JSON.stringify(t)});if(!n.ok){const i=await n.text();throw new Error(i||`HTTP ${n.status}`)}return n.json()}function Wa(e,t){return Cr("/tokens",{section:e,values:t})}function Za(e){return Cr("/tokens/reset",{section:e})}function Xa(e){return Cr("/settings",e)}var Ja=L('Saved'),Qa=L(' '),eo=L(`

                Bundle Info

                The SLASHED CSS bundle is loaded automatically by the plugin. The inventory is parsed from whichever bundle is active (essential / optimal / full) and - drives the variable pickers, class autocomplete, and color palette in Bricks.

                Variables registered
                Classes registered

                Plugin Settings

                Override the HTML root font-size. Use this if Bricks forces a font-size you don't want.

                `);function to(e,t){Fe(t,!0);let s=Z(Se(se.pluginSettings?.html_font_size??"")),r=Z(!1),n=Z(!1),i=Z("");async function o(){I(r,!0),I(n,!1),I(i,"");try{await Xa({html_font_size:p(s)}),I(n,!0),setTimeout(()=>{I(n,!1)},3e3)}catch(R){I(i,R.message||"Save failed",!0)}finally{I(r,!1)}}var l=eo(),a=k(y(l),4),f=k(y(a),2),d=y(f),v=k(f,4),u=y(v),g=k(a,4),_=k(y(g),2),m=y(_);m.value=m.__value="";var h=k(m);h.value=h.__value="100";var w=k(h);w.value=w.__value="62.5";var b=k(g,2),x=y(b),F=y(x),K=k(x,2);{var W=R=>{var M=Ja();C(R,M)};ve(K,R=>{p(n)&&R(W)})}var B=k(K,2);{var X=R=>{var M=Qa(),O=y(M);q(()=>j(O,p(i))),C(R,M)};ve(B,R=>{p(i)&&R(X)})}q(()=>{j(d,se.inventory?.variables?.length??0),j(u,(se.inventory?.sf_classes?.length??0)+(se.inventory?.is_classes?.length??0)),x.disabled=p(r),j(F,p(r)?"Saving...":"Save Settings")}),ya(_,()=>p(s),R=>I(s,R)),de("click",x,o),C(e,l),$e()}Lt(["click"]);var so=z('

                Parameters:

                 
                '),ro=z(`

                Filter Hooks Reference

                These WordPress filter hooks let you customize the SLASHED Bricks integration + drives the variable pickers, class autocomplete, and color palette in Bricks.

                Variables registered
                Classes registered

                Plugin Settings

                Override the HTML root font-size. Use this if Bricks forces a font-size you don't want.

                `);function to(e,t){$e(t,!0);let s=X(Ee(se.pluginSettings?.html_font_size??"")),r=X(!1),n=X(!1),i=X(""),o=null;async function l(){N(r,!0),N(n,!1),N(i,"");try{await Xa({html_font_size:p(s)}),N(n,!0),o&&clearTimeout(o),o=setTimeout(()=>{N(n,!1),o=null},3e3)}catch(T){N(i,T.message||"Save failed",!0)}finally{N(r,!1)}}var a=eo(),f=k(y(a),4),u=k(y(f),2),v=y(u),d=k(u,4),g=y(d),_=k(f,4),m=k(y(_),2),h=y(m);h.value=h.__value="";var w=k(h);w.value=w.__value="100";var b=k(w);b.value=b.__value="62.5";var x=k(_,2),O=y(x),W=y(O),V=k(O,2);{var q=T=>{var R=Ja();z(T,R)};ve(V,T=>{p(n)&&T(q)})}var Z=k(V,2);{var B=T=>{var R=Qa(),F=y(R);I(()=>A(F,p(i))),z(T,R)};ve(Z,T=>{p(i)&&T(B)})}I(()=>{A(v,se.inventory?.variables?.length??0),A(g,(se.inventory?.sf_classes?.length??0)+(se.inventory?.is_classes?.length??0)),O.disabled=p(r),A(W,p(r)?"Saving...":"Save Settings")}),ya(m,()=>p(s),T=>N(s,T)),de("click",O,l),z(e,a),Ne()}Lt(["click"]);var so=L('

                Parameters:

                 
                '),ro=L(`

                Filter Hooks Reference

                These WordPress filter hooks let you customize the SLASHED Bricks integration from your theme or a mu-plugin. Each hook fires during plugin initialization.

                `);function no(e){const t=[{name:"slashed_bricks/css_bundle_url",description:"Override which CSS bundle URL to load.",params:"$url (string) - The current CSS bundle URL.",example:`add_filter( 'slashed_bricks/css_bundle_url', function( $url ) { // Load from a CDN instead. return 'https://cdn.example.com/slashed/slashed.optimal.css'; @@ -34,12 +34,12 @@ add_filter( 'slashed_bricks/inventory_local_path', function() { 'SLASHED Primary', 'SLASHED Secondary', ] ) ); -} );`}];var s=ro(),r=k(y(s),4);ue(r,17,()=>t,n=>n.name,(n,i)=>{var o=so(),l=y(o),a=y(l),f=y(a),d=k(l,2),v=y(d),u=k(d,2),g=k(y(u),2),_=y(g),m=k(u,2),h=y(m),w=y(h);q(()=>{j(f,p(i).name),j(v,p(i).description),j(_,p(i).params),j(w,p(i).example)}),C(n,o)}),C(e,s)}const io=[{category:"Colors",description:"Brand, status, semantic, and derived color tokens. Source colors use oklch(); the framework derives light-dark pairs, palettes, and alpha scales automatically.",tokens:[{name:"--sf-color-{brand}-light",description:"Source color for the brand (oklch registered value). Set this to rebrand."},{name:"--sf-color-{brand}",description:"Resolved light-dark adaptive color for use in rules."},{name:"--sf-color-{brand}-{50-950}",description:"Palette scale: 50 (lightest) to 950 (darkest) mixed with base/text."},{name:"--sf-color-{brand}-a{5-95}",description:"Alpha scale: 5% to 95% opacity of the brand color."},{name:"--sf-color-{brand}-hover/active/muted/subtle/ghost/lighter/darker/xlight/xdark/superlight/superdark",description:"Semantic aliases for common UI states, mapped to palette steps."},{name:"--sf-color-bg",description:"Page background color, derived from base."},{name:"--sf-color-text",description:"Main body text color, contrast-aware."},{name:"--sf-color-heading",description:"Heading text color, slightly stronger than body text."},{name:"--sf-color-link",description:"Link color, derived from action brand."},{name:"--sf-color-border",description:"Default border color."},{name:"--sf-color-surface",description:"Card/panel surface color (equals base)."},{name:"--sf-color-overlay",description:"Semi-transparent overlay for modals."},{name:"--sf-color-dim",description:"50% black overlay for dimming backgrounds."},{name:"--sf-color-success/warning/error/info/danger",description:"Status feedback colors with -light source, -muted, -strong, -subtle variants."}]},{category:"Typography",description:"Font families, sizes (fluid clamp-based scale), weights, line-heights, letter-spacing, and heading configuration.",tokens:[{name:"--sf-font-body",description:"Body font stack (system-ui default)."},{name:"--sf-font-heading",description:"Heading font stack (defaults to body)."},{name:"--sf-font-mono",description:"Monospace font stack."},{name:"--sf-font-display",description:"Display/hero font (defaults to heading)."},{name:"--sf-font-geometric/humanist/slab",description:"Curated fallback stacks for common typographic personalities."},{name:"--sf-text-{2xs..4xl}",description:"Fluid type scale using clamp(). Sizes: 2xs, xs, s, m, l, xl, 2xl, 3xl, 4xl."},{name:"--sf-text-display-{s,m,l}",description:"Extra-large display/hero sizes."},{name:"--sf-text-scale",description:"Global multiplier for the type scale (default 1)."},{name:"--sf-font-weight-{thin..black}",description:"Named weight tokens: thin(100), extralight(200), light(300), normal(400), medium(500), semibold(600), bold(700), extrabold(800), black(900)."},{name:"--sf-leading-{tight,snug,normal,relaxed}",description:"Line-height presets: 1.1, 1.3, 1.5, 1.625."},{name:"--sf-tracking-{tight,normal,wide,wider,widest}",description:"Letter-spacing presets from -0.025em to 0.1em."},{name:"--sf-h{1-6}-size/font-weight/line-height/letter-spacing",description:"Per-heading-level configuration tokens."},{name:"--sf-body-*",description:"Body text configuration: font-size, font-weight, line-height, color, text-wrap."}]},{category:"Spacing",description:"Fluid spacing scale (clamp-based), gutters, section padding, and component padding.",tokens:[{name:"--sf-space-{2xs..4xl}",description:"Fluid spacing scale. Sizes: none, px, 2xs, xs, s, m, l, xl, 2xl, 3xl, 4xl."},{name:"--sf-space-scale",description:"Global multiplier for all space tokens (default 1)."},{name:"--sf-space-gutter",description:"Page-edge gutter (defaults to space-l)."},{name:"--sf-gap",description:"Default gap for layouts (defaults to space-m)."},{name:"--sf-content-gap",description:"Gap between content elements (defaults to space-s)."},{name:"--sf-section-pad--{s,m,l,xl}",description:"Vertical padding for page sections."},{name:"--sf-component-pad",description:"Internal padding for components (defaults to space-m)."},{name:"--sf-header-height",description:"Expected fixed header height for sticky offset calculations."},{name:"--sf-safe-{top,right,bottom,left}",description:"Safe area insets for notched devices."}]},{category:"Sizing",description:"Component sizes, touch targets, and aspect ratios.",tokens:[{name:"--sf-size-{xs..xl}",description:"Named size tokens: xs(1.5rem), s(2rem), m(2.5rem), l(2.75rem), xl(3.5rem)."},{name:"--sf-touch-target",description:"Minimum interactive element size (defaults to size-l, 2.75rem)."},{name:"--sf-ratio-{square,photo,video,cinema,golden,portrait}",description:"Predefined aspect ratios for frames and containers."},{name:"--sf-icon-{xs..xl}",description:"Icon sizing in em units (0.875em to 3em)."}]},{category:"Layout",description:"Container widths, layout primitive tokens (stack, cluster, grid, sidebar, switcher, bento, cover, frame, reel, imposter).",tokens:[{name:"--sf-container-{narrow,default,prose,wide,full}",description:"Max-width presets for .sf-container."},{name:"--sf-stack-gap",description:"Vertical gap between .sf-stack children."},{name:"--sf-cluster-gap/align/justify",description:"Inline cluster layout tokens."},{name:"--sf-sidebar-width/gap/min-width",description:"Sidebar layout tokens."},{name:"--sf-switcher-threshold/gap",description:"Column-to-stack breakpoint and gap."},{name:"--sf-grid-min/gap",description:"Auto-fill grid minimum item width and gap."},{name:"--sf-bento-cols/gap/row",description:"Dense bento grid configuration."},{name:"--sf-cover-min-height/padding",description:"Full-height cover layout."},{name:"--sf-frame-ratio",description:"Aspect ratio for .sf-frame (defaults to 16/9)."},{name:"--sf-reel-gap/height/item-width",description:"Horizontal scroll strip configuration."},{name:"--sf-imposter-margin",description:"Safety margin for absolute-centered overlays."},{name:"--sf-breakout-width/content-width",description:"Breakout grid track widths."},{name:"--sf-divider-color/style/width",description:"Divider appearance tokens."}]},{category:"Borders",description:"Border widths and styles.",tokens:[{name:"--sf-border-width-{hairline,1,2,3,4}",description:"Border width scale: 0.5px, 1px, 2px, 3px, 4px."},{name:"--sf-border-style/dotted/soft/strong",description:"Border style presets (solid, dotted, dashed, solid)."},{name:"--sf-stroke-{thin,regular,bold,heavy}",description:"Stroke widths for SVG/icon use: 1px, 1.5px, 2px, 3px."}]},{category:"Radius",description:"Border radius scale and special shapes.",tokens:[{name:"--sf-radius-{none,xs,s,m,l,xl,2xl,3xl,4xl,full}",description:"Radius scale from 0 to 9999px (pill)."},{name:"--sf-radius-scale",description:"Global multiplier for all radius tokens (default 1)."},{name:"--sf-radius-pill",description:"Fully rounded (9999px)."},{name:"--sf-radius-outer",description:"Outer radius = inner + padding (for nested rounding)."}]},{category:"Shadows",description:"Box shadows, drop shadows, text shadows, and shadow configuration.",tokens:[{name:"--sf-shadow-{xs,s,m,l,xl,2xl}",description:"Elevation shadow scale, progressively more dramatic."},{name:"--sf-shadow-inner",description:"Inset shadow for recessed elements."},{name:"--sf-shadow-glow",description:"Colored glow effect (uses --sf-shadow-glow-color)."},{name:"--sf-shadow-none",description:"Explicit no-shadow value."},{name:"--sf-shadow-color",description:"Base shadow color (derived from neutral)."},{name:"--sf-shadow-strength",description:"Shadow opacity multiplier (adapts to dark mode)."},{name:"--sf-drop-shadow-{s,m,l}",description:"CSS filter drop-shadow equivalents."},{name:"--sf-text-shadow-{s,m,l,none}",description:"Text shadow presets."}]},{category:"Effects",description:"Blurs, opacities, gradients, masks, and perspective.",tokens:[{name:"--sf-blur-{xs,s,m,l,xl}",description:"Blur radius scale: 4px to 48px."},{name:"--sf-opacity-{0,10,25,50,75,100,disabled}",description:"Named opacity presets."},{name:"--sf-gradient-{brand,primary,secondary,tertiary,surface}",description:"Predefined gradients using brand colors."},{name:"--sf-gradient-fade--{t,b,l,r}",description:"Directional fade-to-background gradients."},{name:"--sf-mask-scrim-start/end",description:"Scroll mask fade depth."},{name:"--sf-perspective-{near,normal,far}",description:"3D perspective presets: 500px, 1000px, 2000px."},{name:"--sf-contrast-bias/threshold",description:"Color contrast tuning for auto text-on-color logic."}]},{category:"Motion",description:"Durations, easing curves, transitions, and animations.",tokens:[{name:"--sf-duration-{none,instant,fast,normal,slow,slower}",description:"Duration scale: 0ms to 600ms (respects --sf-motion-scale)."},{name:"--sf-motion-scale",description:"Global animation speed multiplier (set 0 to disable)."},{name:"--sf-ease-{linear,in,out,in-out,bounce,elastic,overshoot,spring}",description:"Easing function presets."},{name:"--sf-transition-{all,colors,opacity,shadow,transform,fast,slow,enter,exit}",description:"Pre-composed transition shorthands."},{name:"--sf-animation-{fade-in,fade-out,scale-up,scale-down,slide-in-*,float,ping,blink,color-pulse}",description:"Named keyframe animation shorthands."},{name:"--sf-animation-delay-{1-5}",description:"Stagger delays for sequential animations."}]},{category:"Z-Index",description:"Z-index scale for predictable layering.",tokens:[{name:"--sf-z-{below,base,raised,low,mid,high,top,max}",description:"Z-index scale: -1, 0, 1, 10, 100, 500, 900, 9999."}]},{category:"Focus",description:"Focus ring appearance for keyboard navigation.",tokens:[{name:"--sf-focus-ring-width/offset/color/style/shadow",description:"Focus indicator configuration."},{name:"--sf-caret-color",description:"Text input caret color (defaults to action)."}]},{category:"Scroll",description:"Scroll timeline and scrollbar styling.",tokens:[{name:"--sf-scroll-timeline-range-start/end",description:"Scroll-driven animation range."},{name:"--sf-scrollbar-thumb/track",description:"Custom scrollbar colors."}]},{category:"Print",description:"Print stylesheet configuration.",tokens:[{name:"--sf-print-base-size/page-margin/page-size",description:"Print layout tokens: 11pt base, 2cm margins, A4 size."}]}],ao=[{category:"Layout Primitives",description:"Breakpoint-free, container-query-driven layout components. Each is a single class with per-instance token overrides via inline style.",classes:[{name:".sf-section",description:"Vertical page rhythm with size variants (--s/--m/--l/--xl/--collapse)."},{name:".sf-section-group",description:"Collapses gap between adjacent sections."},{name:".sf-container",description:"Centered max-width wrapper with gutters. Variants: --narrow, --wide, --full, --prose."},{name:".sf-box",description:"Isolated unit with padding and optional border."},{name:".sf-center",description:"Intrinsic centering with max-width. Variant: --intrinsic."},{name:".sf-stack",description:"Vertical flow with consistent gap. Size variants: --2xs to --3xl. Alignment: --center, --end, --stretch."},{name:".sf-cluster",description:"Wrapping inline group. Size variants: --2xs to --xl. Alignment: --center, --end, --between. Wrap: --no-wrap."},{name:".sf-sidebar",description:"Content + side panel that wraps. Variants: --right, --narrow, --wide."},{name:".sf-switcher",description:"N columns above threshold, stacked below. Variants: --no-wrap, --vertical."},{name:".sf-grid",description:"Auto-fill responsive grid. Size variants: --xs to --xl. Variants: --fit, --dense."},{name:".sf-grid-{1,2,3,4,6}",description:"Fixed-column grids, container-responsive."},{name:".sf-grid-{1-2,2-1,1-3,3-1}",description:"Ratio two-column grids."},{name:".sf-bento",description:"Dense free-form grid. Variants: --2, --4, --compact, --tall."},{name:".sf-alternate",description:"Zigzag two-column layout, reverses every other row."},{name:".sf-pancake",description:"Sticky-footer grid: header / main(1fr) / footer."},{name:".sf-content-grid",description:"Breakout layout grid. Children use .sf-breakout or .sf-full-bleed."},{name:".sf-cover",description:"Full-height region with centered content. Variants: --min, --max, --padding-s, --padding-l."},{name:".sf-frame",description:"Aspect-ratio media box. Variants: --square, --portrait, --video, --cinema, --3-2, --4-3, --golden."},{name:".sf-reel",description:"Horizontal scroll strip with optional mask fade."},{name:".sf-imposter",description:"Absolutely-centered overlay. Variants: --fixed, --contain."},{name:".sf-subgrid / .sf-subgrid-rows",description:"Inherit parent grid tracks."},{name:".sf-divider",description:"Token-driven separator. Variant: --vertical."},{name:".sf-icon",description:"Em-based inline icon sizing. Sizes: --xs to --xl. Variant: --boxed."},{name:".sf-prose",description:"Readable long-form text with automatic vertical rhythm."},{name:".sf-not-prose",description:"Reset zone inside .sf-prose for embedded components."}]},{category:"Macros",description:"Recipe classes that answer 'what does this element do/look like?' - composable with layout primitives.",classes:[{name:".sf-flow",description:"Lobotomized owl: consistent gap between consecutive children."},{name:".sf-truncate",description:"Single-line ellipsis overflow."},{name:".sf-line-clamp-{2,3,N}",description:"Multi-line text clamping with ellipsis. -N reads --sf-line-clamp."},{name:".sf-equal-height",description:"Forces flex children to share the tallest child's height."},{name:".sf-aspect",description:"Generic aspect-ratio container (reads --sf-aspect token)."},{name:".sf-scroll-shadow",description:"Top + bottom mask gradient for scrolling containers."},{name:".sf-scroll-snap",description:"Vertical scroll-snap container."},{name:".sf-overflow-fade",description:"End-edge horizontal fade for overflowing inline content."},{name:".sf-no-tap-highlight",description:"Suppresses WebKit/Android tap highlight."},{name:".sf-text-gradient",description:"Gradient text effect using background-clip."},{name:".sf-clickable-parent",description:"Makes an entire card clickable via the first link inside."},{name:".sf-link-external",description:"Adds external link indicator marker."}]},{category:"Surfaces",description:"Color surface utility classes that set background and text color for a brand context.",classes:[{name:".sf-surface--{primary,secondary,tertiary,action,neutral,inverse}",description:"Brand-colored surface with auto-contrast text."},{name:".sf-surface--{success,warning,error,info,danger}",description:"Status-colored surfaces."}]},{category:"Animations",description:"CSS animation utility classes that apply predefined keyframe animations.",classes:[{name:".sf-fade-in / .sf-fade-out",description:"Opacity entrance/exit animations."},{name:".sf-scale-up / .sf-scale-down",description:"Scale entrance/exit animations."},{name:".sf-slide-in-{up,down,left,right}",description:"Directional slide-in entrance animations."},{name:".sf-color-pulse",description:"Continuous color pulse animation."},{name:".sf-entrance--fade / --fade-up / --fade-down / --fade-left / --fade-right / --scale-up",description:"Scroll-triggered entrance animations (scroll-timeline driven)."}]},{category:"State Classes (.is-*)",description:"Runtime state classes toggled by JS or mirrored from ARIA. They live in the slashed.states layer. Always pair with matching ARIA attributes.",classes:[{name:".is-hidden / .is-invisible / .is-visible",description:"Visibility control: removed from layout / hidden but keeps box / visible."},{name:".is-disabled / .is-readonly",description:"Non-interactive states with dimming."},{name:".is-loading / .is-pending / .is-busy",description:"Loading states: spinner replacement / optimistic UI / cursor hint."},{name:".is-skeleton",description:"Placeholder shimmer animation."},{name:".is-active / .is-selected / .is-current / .is-pressed",description:"Selection/activation states."},{name:".is-highlighted",description:"Transient emphasis (e.g. search result highlight)."},{name:".is-open / .is-collapsed / .is-expanded",description:"Disclosure states for modals, drawers, accordions."},{name:".is-valid / .is-invalid",description:"Form field validation results (maps to aria-invalid)."},{name:".is-success / .is-error / .is-warning / .is-info / .is-danger",description:"General feedback states and destructive-action context."},{name:".is-sticky / .is-pinned / .is-fixed / .is-fullscreen",description:"Positioning states."},{name:".is-clipped / .is-scrollable / .is-truncated / .is-resizable",description:"Overflow handling states."},{name:".is-dragging / .is-drop-target / .is-draggable",description:"Drag and drop states."},{name:".is-overlay / .is-focused / .is-clickable / .is-unselectable",description:"Positioning, focus, cursor, and selection states."},{name:".is-empty",description:"Hide element when empty (:empty pseudo-class)."}]}],oo=[{name:"--sf-is-dark",description:"Numeric flag (0 or 1) indicating dark mode is active. Registered property."},{name:"--sf-lumlocker",description:"Internal luminance lock value for color derivation."},{name:"--sf-color-scheme",description:"CSS color-scheme declaration (light dark)."},{name:"--sf-current-font-weight",description:"Current context font weight (used by strong elements)."},{name:"--sf-link-external-marker",description:"External link arrow character."},{name:"--sf-field-block",description:"Vertical spacing between form fields."},{name:"--sf-field-required-marker",description:"Required field indicator string."}];var lo=z('
              • '),co=z('
                  '),fo=z('
                • '),uo=z('
                  Misc Tokens that do not fit a single category.
                    '),vo=z('

                    CSS Custom Properties (--sf-*)

                    '),ho=z('
                  • '),po=z('
                      '),_o=z('

                      Utility & State Classes

                      '),go=z('

                      '),mo=z('

                      API Cheatsheet

                      ');function bo(e,t){Fe(t,!0);let s=Z(""),r=Z("all");const n=se.inventory?.variables?.length??0,i=se.inventory?.sf_classes?.length??0,o=se.inventory?.is_classes?.length??0;let l=G(()=>v(io,"tokens")),a=G(()=>v(ao,"classes")),f=G(()=>oo.filter(H=>d(H.name,H.description)));function d(H,ae){if(!p(s).trim())return!0;const oe=p(s).trim().toLowerCase();return H.toLowerCase().includes(oe)||ae.toLowerCase().includes(oe)}function v(H,ae){return p(s).trim()?H.map(oe=>({...oe,[ae]:oe[ae].filter(Rt=>d(Rt.name,Rt.description))})).filter(oe=>oe[ae].length>0):H}let u=G(()=>p(r)==="all"||p(r)==="variables"),g=G(()=>p(r)==="all"||p(r)==="classes"),_=G(()=>p(s).trim()!==""&&(!p(u)||p(l).length===0&&p(f).length===0)&&(!p(g)||p(a).length===0));var m=mo(),h=y(m),w=k(y(h),2),b=y(w),x=k(h,2),F=y(x),K=k(F,2),W=y(K);let B;var X=k(W,2);let R;var M=k(X,2);let O;var N=k(x,2);{var V=H=>{var ae=vo(),oe=k(y(ae),2);ue(oe,17,()=>p(l),ts,(Ue,Ne)=>{var Qe=co(),et=y(Qe),ft=y(et),Mt=y(ft),Ot=k(ft,2),ut=y(Ot),Dt=k(et,2);ue(Dt,21,()=>p(Ne).tokens,ts,(tt,es)=>{var xs=lo(),Ss=y(xs),Ys=y(Ss),Bn=k(Ss,2),Hn=y(Bn);q(()=>{j(Ys,p(es).name),j(Hn,p(es).description)}),C(tt,xs)}),q(tt=>{Qe.open=tt,j(Mt,p(Ne).category),j(ut,p(Ne).description)},[()=>!p(s).trim()]),C(Ue,Qe)});var Rt=k(oe,2);{var Qt=Ue=>{var Ne=uo(),Qe=k(y(Ne),2);ue(Qe,21,()=>p(f),ts,(et,ft)=>{var Mt=fo(),Ot=y(Mt),ut=y(Ot),Dt=k(Ot,2),tt=y(Dt);q(()=>{j(ut,p(ft).name),j(tt,p(ft).description)}),C(et,Mt)}),q(et=>Ne.open=et,[()=>!p(s).trim()]),C(Ue,Ne)};ve(Rt,Ue=>{p(f).length>0&&Ue(Qt)})}C(H,ae)};ve(N,H=>{p(u)&&H(V)})}var ie=k(N,2);{var Ce=H=>{var ae=_o(),oe=k(y(ae),2);ue(oe,17,()=>p(a),ts,(Rt,Qt)=>{var Ue=po(),Ne=y(Ue),Qe=y(Ne),et=y(Qe),ft=k(Qe,2),Mt=y(ft),Ot=k(Ne,2);ue(Ot,21,()=>p(Qt).classes,ts,(ut,Dt)=>{var tt=ho(),es=y(tt),xs=y(es),Ss=k(es,2),Ys=y(Ss);q(()=>{j(xs,p(Dt).name),j(Ys,p(Dt).description)}),C(ut,tt)}),q(ut=>{Ue.open=ut,j(et,p(Qt).category),j(Mt,p(Qt).description)},[()=>!p(s).trim()]),C(Rt,Ue)}),C(H,ae)};ve(ie,H=>{p(g)&&H(Ce)})}var ks=k(ie,2);{var Us=H=>{var ae=go(),oe=y(ae);q(()=>j(oe,`No results for "${p(s)??""}"`)),C(H,ae)};ve(ks,H=>{p(_)&&H(Us)})}q(()=>{j(b,`${n??""} variables | ${i??""} layout/utility classes | ${o??""} state classes`),B=us(W,1,"svelte-osej3t",null,B,{active:p(r)==="all"}),R=us(X,1,"svelte-osej3t",null,R,{active:p(r)==="variables"}),O=us(M,1,"svelte-osej3t",null,O,{active:p(r)==="classes"})}),Os(F,()=>p(s),H=>I(s,H)),de("click",W,()=>I(r,"all")),de("click",X,()=>I(r,"variables")),de("click",M,()=>I(r,"classes")),C(e,m),$e()}Lt(["click"]);var yo=z(`

                      Not ported yet. The legacy admin page (SLASHED → SLASHED) +} );`}];var s=ro(),r=k(y(s),4);ue(r,17,()=>t,n=>n.name,(n,i)=>{var o=so(),l=y(o),a=y(l),f=y(a),u=k(l,2),v=y(u),d=k(u,2),g=k(y(d),2),_=y(g),m=k(d,2),h=y(m),w=y(h);I(()=>{A(f,p(i).name),A(v,p(i).description),A(_,p(i).params),A(w,p(i).example)}),z(n,o)}),z(e,s)}const io=[{category:"Colors",description:"Brand, status, semantic, and derived color tokens. Source colors use oklch(); the framework derives light-dark pairs, palettes, and alpha scales automatically.",tokens:[{name:"--sf-color-{brand}-light",description:"Source color for the brand (oklch registered value). Set this to rebrand."},{name:"--sf-color-{brand}",description:"Resolved light-dark adaptive color for use in rules."},{name:"--sf-color-{brand}-{50-950}",description:"Palette scale: 50 (lightest) to 950 (darkest) mixed with base/text."},{name:"--sf-color-{brand}-a{5-95}",description:"Alpha scale: 5% to 95% opacity of the brand color."},{name:"--sf-color-{brand}-hover/active/muted/subtle/ghost/lighter/darker/xlight/xdark/superlight/superdark",description:"Semantic aliases for common UI states, mapped to palette steps."},{name:"--sf-color-bg",description:"Page background color, derived from base."},{name:"--sf-color-text",description:"Main body text color, contrast-aware."},{name:"--sf-color-heading",description:"Heading text color, slightly stronger than body text."},{name:"--sf-color-link",description:"Link color, derived from action brand."},{name:"--sf-color-border",description:"Default border color."},{name:"--sf-color-surface",description:"Card/panel surface color (equals base)."},{name:"--sf-color-overlay",description:"Semi-transparent overlay for modals."},{name:"--sf-color-dim",description:"50% black overlay for dimming backgrounds."},{name:"--sf-color-success/warning/error/info/danger",description:"Status feedback colors with -light source, -muted, -strong, -subtle variants."}]},{category:"Typography",description:"Font families, sizes (fluid clamp-based scale), weights, line-heights, letter-spacing, and heading configuration.",tokens:[{name:"--sf-font-body",description:"Body font stack (system-ui default)."},{name:"--sf-font-heading",description:"Heading font stack (defaults to body)."},{name:"--sf-font-mono",description:"Monospace font stack."},{name:"--sf-font-display",description:"Display/hero font (defaults to heading)."},{name:"--sf-font-geometric/humanist/slab",description:"Curated fallback stacks for common typographic personalities."},{name:"--sf-text-{2xs..4xl}",description:"Fluid type scale using clamp(). Sizes: 2xs, xs, s, m, l, xl, 2xl, 3xl, 4xl."},{name:"--sf-text-display-{s,m,l}",description:"Extra-large display/hero sizes."},{name:"--sf-text-scale",description:"Global multiplier for the type scale (default 1)."},{name:"--sf-font-weight-{thin..black}",description:"Named weight tokens: thin(100), extralight(200), light(300), normal(400), medium(500), semibold(600), bold(700), extrabold(800), black(900)."},{name:"--sf-leading-{tight,snug,normal,relaxed}",description:"Line-height presets: 1.1, 1.3, 1.5, 1.625."},{name:"--sf-tracking-{tight,normal,wide,wider,widest}",description:"Letter-spacing presets from -0.025em to 0.1em."},{name:"--sf-h{1-6}-size/font-weight/line-height/letter-spacing",description:"Per-heading-level configuration tokens."},{name:"--sf-body-*",description:"Body text configuration: font-size, font-weight, line-height, color, text-wrap."}]},{category:"Spacing",description:"Fluid spacing scale (clamp-based), gutters, section padding, and component padding.",tokens:[{name:"--sf-space-{2xs..4xl}",description:"Fluid spacing scale. Sizes: none, px, 2xs, xs, s, m, l, xl, 2xl, 3xl, 4xl."},{name:"--sf-space-scale",description:"Global multiplier for all space tokens (default 1)."},{name:"--sf-space-gutter",description:"Page-edge gutter (defaults to space-l)."},{name:"--sf-gap",description:"Default gap for layouts (defaults to space-m)."},{name:"--sf-content-gap",description:"Gap between content elements (defaults to space-s)."},{name:"--sf-section-pad--{s,m,l,xl}",description:"Vertical padding for page sections."},{name:"--sf-component-pad",description:"Internal padding for components (defaults to space-m)."},{name:"--sf-header-height",description:"Expected fixed header height for sticky offset calculations."},{name:"--sf-safe-{top,right,bottom,left}",description:"Safe area insets for notched devices."}]},{category:"Sizing",description:"Component sizes, touch targets, and aspect ratios.",tokens:[{name:"--sf-size-{xs..xl}",description:"Named size tokens: xs(1.5rem), s(2rem), m(2.5rem), l(2.75rem), xl(3.5rem)."},{name:"--sf-touch-target",description:"Minimum interactive element size (defaults to size-l, 2.75rem)."},{name:"--sf-ratio-{square,photo,video,cinema,golden,portrait}",description:"Predefined aspect ratios for frames and containers."},{name:"--sf-icon-{xs..xl}",description:"Icon sizing in em units (0.875em to 3em)."}]},{category:"Layout",description:"Container widths, layout primitive tokens (stack, cluster, grid, sidebar, switcher, bento, cover, frame, reel, imposter).",tokens:[{name:"--sf-container-{narrow,default,prose,wide,full}",description:"Max-width presets for .sf-container."},{name:"--sf-stack-gap",description:"Vertical gap between .sf-stack children."},{name:"--sf-cluster-gap/align/justify",description:"Inline cluster layout tokens."},{name:"--sf-sidebar-width/gap/min-width",description:"Sidebar layout tokens."},{name:"--sf-switcher-threshold/gap",description:"Column-to-stack breakpoint and gap."},{name:"--sf-grid-min/gap",description:"Auto-fill grid minimum item width and gap."},{name:"--sf-bento-cols/gap/row",description:"Dense bento grid configuration."},{name:"--sf-cover-min-height/padding",description:"Full-height cover layout."},{name:"--sf-frame-ratio",description:"Aspect ratio for .sf-frame (defaults to 16/9)."},{name:"--sf-reel-gap/height/item-width",description:"Horizontal scroll strip configuration."},{name:"--sf-imposter-margin",description:"Safety margin for absolute-centered overlays."},{name:"--sf-breakout-width/content-width",description:"Breakout grid track widths."},{name:"--sf-divider-color/style/width",description:"Divider appearance tokens."}]},{category:"Borders",description:"Border widths and styles.",tokens:[{name:"--sf-border-width-{hairline,1,2,3,4}",description:"Border width scale: 0.5px, 1px, 2px, 3px, 4px."},{name:"--sf-border-style/dotted/soft/strong",description:"Border style presets (solid, dotted, dashed, solid)."},{name:"--sf-stroke-{thin,regular,bold,heavy}",description:"Stroke widths for SVG/icon use: 1px, 1.5px, 2px, 3px."}]},{category:"Radius",description:"Border radius scale and special shapes.",tokens:[{name:"--sf-radius-{none,xs,s,m,l,xl,2xl,3xl,4xl,full}",description:"Radius scale from 0 to 9999px (pill)."},{name:"--sf-radius-scale",description:"Global multiplier for all radius tokens (default 1)."},{name:"--sf-radius-pill",description:"Fully rounded (9999px)."},{name:"--sf-radius-outer",description:"Outer radius = inner + padding (for nested rounding)."}]},{category:"Shadows",description:"Box shadows, drop shadows, text shadows, and shadow configuration.",tokens:[{name:"--sf-shadow-{xs,s,m,l,xl,2xl}",description:"Elevation shadow scale, progressively more dramatic."},{name:"--sf-shadow-inner",description:"Inset shadow for recessed elements."},{name:"--sf-shadow-glow",description:"Colored glow effect (uses --sf-shadow-glow-color)."},{name:"--sf-shadow-none",description:"Explicit no-shadow value."},{name:"--sf-shadow-color",description:"Base shadow color (derived from neutral)."},{name:"--sf-shadow-strength",description:"Shadow opacity multiplier (adapts to dark mode)."},{name:"--sf-drop-shadow-{s,m,l}",description:"CSS filter drop-shadow equivalents."},{name:"--sf-text-shadow-{s,m,l,none}",description:"Text shadow presets."}]},{category:"Effects",description:"Blurs, opacities, gradients, masks, and perspective.",tokens:[{name:"--sf-blur-{xs,s,m,l,xl}",description:"Blur radius scale: 4px to 48px."},{name:"--sf-opacity-{0,10,25,50,75,100,disabled}",description:"Named opacity presets."},{name:"--sf-gradient-{brand,primary,secondary,tertiary,surface}",description:"Predefined gradients using brand colors."},{name:"--sf-gradient-fade--{t,b,l,r}",description:"Directional fade-to-background gradients."},{name:"--sf-mask-scrim-start/end",description:"Scroll mask fade depth."},{name:"--sf-perspective-{near,normal,far}",description:"3D perspective presets: 500px, 1000px, 2000px."},{name:"--sf-contrast-bias/threshold",description:"Color contrast tuning for auto text-on-color logic."}]},{category:"Motion",description:"Durations, easing curves, transitions, and animations.",tokens:[{name:"--sf-duration-{none,instant,fast,normal,slow,slower}",description:"Duration scale: 0ms to 600ms (respects --sf-motion-scale)."},{name:"--sf-motion-scale",description:"Global animation speed multiplier (set 0 to disable)."},{name:"--sf-ease-{linear,in,out,in-out,bounce,elastic,overshoot,spring}",description:"Easing function presets."},{name:"--sf-transition-{all,colors,opacity,shadow,transform,fast,slow,enter,exit}",description:"Pre-composed transition shorthands."},{name:"--sf-animation-{fade-in,fade-out,scale-up,scale-down,slide-in-*,float,ping,blink,color-pulse}",description:"Named keyframe animation shorthands."},{name:"--sf-animation-delay-{1-5}",description:"Stagger delays for sequential animations."}]},{category:"Z-Index",description:"Z-index scale for predictable layering.",tokens:[{name:"--sf-z-{below,base,raised,low,mid,high,top,max}",description:"Z-index scale: -1, 0, 1, 10, 100, 500, 900, 9999."}]},{category:"Focus",description:"Focus ring appearance for keyboard navigation.",tokens:[{name:"--sf-focus-ring-width/offset/color/style/shadow",description:"Focus indicator configuration."},{name:"--sf-caret-color",description:"Text input caret color (defaults to action)."}]},{category:"Scroll",description:"Scroll timeline and scrollbar styling.",tokens:[{name:"--sf-scroll-timeline-range-start/end",description:"Scroll-driven animation range."},{name:"--sf-scrollbar-thumb/track",description:"Custom scrollbar colors."}]},{category:"Print",description:"Print stylesheet configuration.",tokens:[{name:"--sf-print-base-size/page-margin/page-size",description:"Print layout tokens: 11pt base, 2cm margins, A4 size."}]}],ao=[{category:"Layout Primitives",description:"Breakpoint-free, container-query-driven layout components. Each is a single class with per-instance token overrides via inline style.",classes:[{name:".sf-section",description:"Vertical page rhythm with size variants (--s/--m/--l/--xl/--collapse)."},{name:".sf-section-group",description:"Collapses gap between adjacent sections."},{name:".sf-container",description:"Centered max-width wrapper with gutters. Variants: --narrow, --wide, --full, --prose."},{name:".sf-box",description:"Isolated unit with padding and optional border."},{name:".sf-center",description:"Intrinsic centering with max-width. Variant: --intrinsic."},{name:".sf-stack",description:"Vertical flow with consistent gap. Size variants: --2xs to --3xl. Alignment: --center, --end, --stretch."},{name:".sf-cluster",description:"Wrapping inline group. Size variants: --2xs to --xl. Alignment: --center, --end, --between. Wrap: --no-wrap."},{name:".sf-sidebar",description:"Content + side panel that wraps. Variants: --right, --narrow, --wide."},{name:".sf-switcher",description:"N columns above threshold, stacked below. Variants: --no-wrap, --vertical."},{name:".sf-grid",description:"Auto-fill responsive grid. Size variants: --xs to --xl. Variants: --fit, --dense."},{name:".sf-grid-{1,2,3,4,6}",description:"Fixed-column grids, container-responsive."},{name:".sf-grid-{1-2,2-1,1-3,3-1}",description:"Ratio two-column grids."},{name:".sf-bento",description:"Dense free-form grid. Variants: --2, --4, --compact, --tall."},{name:".sf-alternate",description:"Zigzag two-column layout, reverses every other row."},{name:".sf-pancake",description:"Sticky-footer grid: header / main(1fr) / footer."},{name:".sf-content-grid",description:"Breakout layout grid. Children use .sf-breakout or .sf-full-bleed."},{name:".sf-cover",description:"Full-height region with centered content. Variants: --min, --max, --padding-s, --padding-l."},{name:".sf-frame",description:"Aspect-ratio media box. Variants: --square, --portrait, --video, --cinema, --3-2, --4-3, --golden."},{name:".sf-reel",description:"Horizontal scroll strip with optional mask fade."},{name:".sf-imposter",description:"Absolutely-centered overlay. Variants: --fixed, --contain."},{name:".sf-subgrid / .sf-subgrid-rows",description:"Inherit parent grid tracks."},{name:".sf-divider",description:"Token-driven separator. Variant: --vertical."},{name:".sf-icon",description:"Em-based inline icon sizing. Sizes: --xs to --xl. Variant: --boxed."},{name:".sf-prose",description:"Readable long-form text with automatic vertical rhythm."},{name:".sf-not-prose",description:"Reset zone inside .sf-prose for embedded components."}]},{category:"Macros",description:"Recipe classes that answer 'what does this element do/look like?' - composable with layout primitives.",classes:[{name:".sf-flow",description:"Lobotomized owl: consistent gap between consecutive children."},{name:".sf-truncate",description:"Single-line ellipsis overflow."},{name:".sf-line-clamp-{2,3,N}",description:"Multi-line text clamping with ellipsis. -N reads --sf-line-clamp."},{name:".sf-equal-height",description:"Forces flex children to share the tallest child's height."},{name:".sf-aspect",description:"Generic aspect-ratio container (reads --sf-aspect token)."},{name:".sf-scroll-shadow",description:"Top + bottom mask gradient for scrolling containers."},{name:".sf-scroll-snap",description:"Vertical scroll-snap container."},{name:".sf-overflow-fade",description:"End-edge horizontal fade for overflowing inline content."},{name:".sf-no-tap-highlight",description:"Suppresses WebKit/Android tap highlight."},{name:".sf-text-gradient",description:"Gradient text effect using background-clip."},{name:".sf-clickable-parent",description:"Makes an entire card clickable via the first link inside."},{name:".sf-link-external",description:"Adds external link indicator marker."}]},{category:"Surfaces",description:"Color surface utility classes that set background and text color for a brand context.",classes:[{name:".sf-surface--{primary,secondary,tertiary,action,neutral,inverse}",description:"Brand-colored surface with auto-contrast text."},{name:".sf-surface--{success,warning,error,info,danger}",description:"Status-colored surfaces."}]},{category:"Animations",description:"CSS animation utility classes that apply predefined keyframe animations.",classes:[{name:".sf-fade-in / .sf-fade-out",description:"Opacity entrance/exit animations."},{name:".sf-scale-up / .sf-scale-down",description:"Scale entrance/exit animations."},{name:".sf-slide-in-{up,down,left,right}",description:"Directional slide-in entrance animations."},{name:".sf-color-pulse",description:"Continuous color pulse animation."},{name:".sf-entrance--fade / --fade-up / --fade-down / --fade-left / --fade-right / --scale-up",description:"Scroll-triggered entrance animations (scroll-timeline driven)."}]},{category:"State Classes (.is-*)",description:"Runtime state classes toggled by JS or mirrored from ARIA. They live in the slashed.states layer. Always pair with matching ARIA attributes.",classes:[{name:".is-hidden / .is-invisible / .is-visible",description:"Visibility control: removed from layout / hidden but keeps box / visible."},{name:".is-disabled / .is-readonly",description:"Non-interactive states with dimming."},{name:".is-loading / .is-pending / .is-busy",description:"Loading states: spinner replacement / optimistic UI / cursor hint."},{name:".is-skeleton",description:"Placeholder shimmer animation."},{name:".is-active / .is-selected / .is-current / .is-pressed",description:"Selection/activation states."},{name:".is-highlighted",description:"Transient emphasis (e.g. search result highlight)."},{name:".is-open / .is-collapsed / .is-expanded",description:"Disclosure states for modals, drawers, accordions."},{name:".is-valid / .is-invalid",description:"Form field validation results (maps to aria-invalid)."},{name:".is-success / .is-error / .is-warning / .is-info / .is-danger",description:"General feedback states and destructive-action context."},{name:".is-sticky / .is-pinned / .is-fixed / .is-fullscreen",description:"Positioning states."},{name:".is-clipped / .is-scrollable / .is-truncated / .is-resizable",description:"Overflow handling states."},{name:".is-dragging / .is-drop-target / .is-draggable",description:"Drag and drop states."},{name:".is-overlay / .is-focused / .is-clickable / .is-unselectable",description:"Positioning, focus, cursor, and selection states."},{name:".is-empty",description:"Hide element when empty (:empty pseudo-class)."}]}],oo=[{name:"--sf-is-dark",description:"Numeric flag (0 or 1) indicating dark mode is active. Registered property."},{name:"--sf-lumlocker",description:"Internal luminance lock value for color derivation."},{name:"--sf-color-scheme",description:"CSS color-scheme declaration (light dark)."},{name:"--sf-current-font-weight",description:"Current context font weight (used by strong elements)."},{name:"--sf-link-external-marker",description:"External link arrow character."},{name:"--sf-field-block",description:"Vertical spacing between form fields."},{name:"--sf-field-required-marker",description:"Required field indicator string."}];var lo=L('

                    • '),co=L('
                        '),fo=L('
                      • '),uo=L('
                        Misc Tokens that do not fit a single category.
                          '),vo=L('

                          CSS Custom Properties (--sf-*)

                          '),ho=L('
                        • '),po=L('
                            '),_o=L('

                            Utility & State Classes

                            '),go=L('

                            '),mo=L('

                            API Cheatsheet

                            ');function bo(e,t){$e(t,!0);let s=X(""),r=X("all");const n=se.inventory?.variables?.length??0,i=se.inventory?.sf_classes?.length??0,o=se.inventory?.is_classes?.length??0;let l=U(()=>v(io,"tokens")),a=U(()=>v(ao,"classes")),f=U(()=>oo.filter(H=>u(H.name,H.description)));function u(H,ae){if(!p(s).trim())return!0;const oe=p(s).trim().toLowerCase();return H.toLowerCase().includes(oe)||ae.toLowerCase().includes(oe)}function v(H,ae){return p(s).trim()?H.map(oe=>({...oe,[ae]:oe[ae].filter(Rt=>u(Rt.name,Rt.description))})).filter(oe=>oe[ae].length>0):H}let d=U(()=>p(r)==="all"||p(r)==="variables"),g=U(()=>p(r)==="all"||p(r)==="classes"),_=U(()=>p(s).trim()!==""&&(!p(d)||p(l).length===0&&p(f).length===0)&&(!p(g)||p(a).length===0));var m=mo(),h=y(m),w=k(y(h),2),b=y(w),x=k(h,2),O=y(x),W=k(O,2),V=y(W);let q;var Z=k(V,2);let B;var T=k(Z,2);let R;var F=k(x,2);{var G=H=>{var ae=vo(),oe=k(y(ae),2);ue(oe,17,()=>p(l),ts,(Ye,Ie)=>{var Qe=co(),et=y(Qe),ft=y(et),Mt=y(ft),Ot=k(ft,2),ut=y(Ot),Dt=k(et,2);ue(Dt,21,()=>p(Ie).tokens,ts,(tt,es)=>{var xs=lo(),Ss=y(xs),Ys=y(Ss),Bn=k(Ss,2),Hn=y(Bn);I(()=>{A(Ys,p(es).name),A(Hn,p(es).description)}),z(tt,xs)}),I(tt=>{Qe.open=tt,A(Mt,p(Ie).category),A(ut,p(Ie).description)},[()=>!p(s).trim()]),z(Ye,Qe)});var Rt=k(oe,2);{var Qt=Ye=>{var Ie=uo(),Qe=k(y(Ie),2);ue(Qe,21,()=>p(f),ts,(et,ft)=>{var Mt=fo(),Ot=y(Mt),ut=y(Ot),Dt=k(Ot,2),tt=y(Dt);I(()=>{A(ut,p(ft).name),A(tt,p(ft).description)}),z(et,Mt)}),I(et=>Ie.open=et,[()=>!p(s).trim()]),z(Ye,Ie)};ve(Rt,Ye=>{p(f).length>0&&Ye(Qt)})}z(H,ae)};ve(F,H=>{p(d)&&H(G)})}var ie=k(F,2);{var ze=H=>{var ae=_o(),oe=k(y(ae),2);ue(oe,17,()=>p(a),ts,(Rt,Qt)=>{var Ye=po(),Ie=y(Ye),Qe=y(Ie),et=y(Qe),ft=k(Qe,2),Mt=y(ft),Ot=k(Ie,2);ue(Ot,21,()=>p(Qt).classes,ts,(ut,Dt)=>{var tt=ho(),es=y(tt),xs=y(es),Ss=k(es,2),Ys=y(Ss);I(()=>{A(xs,p(Dt).name),A(Ys,p(Dt).description)}),z(ut,tt)}),I(ut=>{Ye.open=ut,A(et,p(Qt).category),A(Mt,p(Qt).description)},[()=>!p(s).trim()]),z(Rt,Ye)}),z(H,ae)};ve(ie,H=>{p(g)&&H(ze)})}var ks=k(ie,2);{var Us=H=>{var ae=go(),oe=y(ae);I(()=>A(oe,`No results for "${p(s)??""}"`)),z(H,ae)};ve(ks,H=>{p(_)&&H(Us)})}I(()=>{A(b,`${n??""} variables | ${i??""} layout/utility classes | ${o??""} state classes`),Se(V,"aria-pressed",p(r)==="all"),q=us(V,1,"svelte-osej3t",null,q,{active:p(r)==="all"}),Se(Z,"aria-pressed",p(r)==="variables"),B=us(Z,1,"svelte-osej3t",null,B,{active:p(r)==="variables"}),Se(T,"aria-pressed",p(r)==="classes"),R=us(T,1,"svelte-osej3t",null,R,{active:p(r)==="classes"})}),Os(O,()=>p(s),H=>N(s,H)),de("click",V,()=>N(r,"all")),de("click",Z,()=>N(r,"variables")),de("click",T,()=>N(r,"classes")),z(e,m),Ne()}Lt(["click"]);var yo=L(`

                            Not ported yet. The legacy admin page (SLASHED → SLASHED) still handles every tab; this v2 page only fully implements the Colors tab to demonstrate the Svelte data flow.

                            Porting another tab follows the same pattern: a single component reading its - section from tokens and writing back via markDirty().

                            `);function wo(e,t){var s=yo(),r=y(s),n=y(r),i=k(r,4),o=k(y(i));o.textContent="Tab.svelte",q(()=>j(n,t.tab)),C(e,s)}var ko=z('
                            '),xo=z('

                            Live preview

                            Primary Action
                            Generated CSS:
                            ');function So(e,t){Fe(t,!0);const s=["primary","secondary","tertiary","action","neutral","base"],r=G(()=>{const g=[],_=Le.colors??{};for(const m of s){const h=_[`brand_${m}`];h&&g.push(`--sf-color-${m}-light:${h}`)}for(const m of["success","warning","error","info","danger"]){const h=_[`status_${m}`];h&&g.push(`--sf-color-${m}-light:${h}`)}return g.join(";")}),n=G(()=>{const g=[],_=Le.colors??{};for(const m of s){const h=_[`brand_${m}`];h&&g.push(`--sf-color-${m}-light: ${h}`)}for(const m of["success","warning","error","info","danger"]){const h=_[`status_${m}`];h&&g.push(`--sf-color-${m}-light: ${h}`)}return g.length===0?"":`.slashed-preview { + section from tokens and writing back via markDirty().

                            `);function wo(e,t){var s=yo(),r=y(s),n=y(r),i=k(r,4),o=k(y(i));o.textContent="Tab.svelte",I(()=>A(n,t.tab)),z(e,s)}var ko=L('
                            '),xo=L('

                            Live preview

                            Primary Action
                            Generated CSS:
                            ');function So(e,t){$e(t,!0);const s=["primary","secondary","tertiary","action","neutral","base"],r=U(()=>{const g=[],_=Re.colors??{};for(const m of s){const h=_[`brand_${m}`];h&&g.push(`--sf-color-${m}-light:${h}`)}for(const m of["success","warning","error","info","danger"]){const h=_[`status_${m}`];h&&g.push(`--sf-color-${m}-light:${h}`)}return g.join(";")}),n=U(()=>{const g=[],_=Re.colors??{};for(const m of s){const h=_[`brand_${m}`];h&&g.push(`--sf-color-${m}-light: ${h}`)}for(const m of["success","warning","error","info","danger"]){const h=_[`status_${m}`];h&&g.push(`--sf-color-${m}-light: ${h}`)}return g.length===0?"":`.slashed-preview { ${g.join(`; `)}; -}`});var i=xo(),o=k(y(i),2);ue(o,20,()=>s,g=>g,(g,_)=>{var m=ko();let h;var w=y(m);q(()=>{Xe(m,"title",_),h=as(m,"",h,{background:`var(--sf-color-${_}-light, #ddd)`}),j(w,_)}),C(g,m)});var l=k(o,2),a=y(l);as(a,"",{},{background:"var(--sf-color-primary-light, #4338ca)"});var f=k(a,2);as(f,"",{},{background:"var(--sf-color-action-light, #0891b2)"});var d=k(l,2),v=k(y(d)),u=y(v);q(()=>{as(i,p(r)),j(u,p(n)||"/* (defaults — no overrides set) */")}),C(e,i),$e()}var Eo=z(' '),To=z('Saving…'),jo=z('Saved'),Ao=z('Unsaved changes'),Co=z('All changes saved'),zo=z('
                            ');function Lo(e,t){Fe(t,!0);async function s(){if(!E.saving){E.saving=!0,E.error="";try{const b=E.activeTab,x=Le[b]??{},F=await Wa(b,x);F&&F.values&&(Le[b]=F.values),E.dirty=!1,E.lastSavedAt=Date.now()}catch(b){E.error=b&&b.message||String(b)}finally{E.saving=!1}}}async function r(){if(!E.saving&&confirm(`Reset the ${se.tabs[E.activeTab]??E.activeTab} tab to defaults?`)){E.saving=!0,E.error="";try{await Za(E.activeTab),Aa(E.activeTab),E.dirty=!1,E.lastSavedAt=Date.now()}catch(b){E.error=b&&b.message||String(b)}finally{E.saving=!1}}}let n=Z(!1);En(()=>{if(E.lastSavedAt){I(n,!0);const b=setTimeout(()=>I(n,!1),2e3);return()=>clearTimeout(b)}});var i=zo();let o;var l=y(i),a=y(l);{var f=b=>{var x=Eo(),F=y(x);q(()=>j(F,E.error)),C(b,x)},d=b=>{var x=To();C(b,x)},v=b=>{var x=jo();C(b,x)},u=b=>{var x=Ao();C(b,x)},g=b=>{var x=Co();C(b,x)};ve(a,b=>{E.error?b(f):E.saving?b(d,1):p(n)?b(v,2):E.dirty?b(u,3):b(g,-1)})}var _=k(l,2),m=y(_),h=k(m,2),w=y(h);q(()=>{o=us(i,1,"bar svelte-1oj49qa",null,o,{dirty:E.dirty}),m.disabled=E.saving,h.disabled=E.saving||!E.dirty,j(w,E.saving?"Saving…":"Save changes")}),de("click",m,r),de("click",h,s),C(e,i),$e()}Lt(["click"]);var Ro=z(`

                            SLASHED Design Tokens v2 · Svelte POC

                            Proof-of-concept admin page rendered with Svelte 5 instead of jQuery. - Currently only the Colors tab is fully ported; other tabs show a stub.

                            `);function Mo(e,t){Fe(t,!0);const s=["cheatsheet","hooks","variables","classes","bundle"];let r=G(()=>s.includes(E.activeTab));En(()=>{function b(x){E.dirty&&(x.preventDefault(),x.returnValue="")}return window.addEventListener("beforeunload",b),()=>window.removeEventListener("beforeunload",b)});var n=Ro(),i=k(y(n),2);La(i,{});var o=k(i,2),l=y(o);{var a=b=>{Fa(b,{})},f=b=>{Ba(b,{})},d=b=>{Ka(b,{})},v=b=>{to(b,{})},u=b=>{no(b)},g=b=>{bo(b,{})},_=b=>{{let x=G(()=>se.tabs[E.activeTab]??E.activeTab);wo(b,{get tab(){return p(x)}})}};ve(l,b=>{E.activeTab==="colors"?b(a):E.activeTab==="variables"?b(f,1):E.activeTab==="classes"?b(d,2):E.activeTab==="bundle"?b(v,3):E.activeTab==="hooks"?b(u,4):E.activeTab==="cheatsheet"?b(g,5):b(_,-1)})}var m=k(o,2);So(m,{});var h=k(m,2);{var w=b=>{Lo(b,{})};ve(h,b=>{p(r)||b(w)})}C(e,n),$e()}const Kr=document.getElementById("slashed-admin-app");Kr&&fa(Mo,{target:Kr}); +}`});var i=xo(),o=k(y(i),2);ue(o,20,()=>s,g=>g,(g,_)=>{var m=ko();let h;var w=y(m);I(()=>{Se(m,"title",_),h=as(m,"",h,{background:`var(--sf-color-${_}-light, #ddd)`}),A(w,_)}),z(g,m)});var l=k(o,2),a=y(l);as(a,"",{},{background:"var(--sf-color-primary-light, #4338ca)"});var f=k(a,2);as(f,"",{},{background:"var(--sf-color-action-light, #0891b2)"});var u=k(l,2),v=k(y(u)),d=y(v);I(()=>{as(i,p(r)),A(d,p(n)||"/* (defaults — no overrides set) */")}),z(e,i),Ne()}var Eo=L(' '),To=L('Saving…'),jo=L('Saved'),Ao=L('Unsaved changes'),Co=L('All changes saved'),zo=L('
                            ');function Lo(e,t){$e(t,!0);async function s(){if(!E.saving){E.saving=!0,E.error="";try{const b=E.activeTab,x=Re[b]??{},O=await Wa(b,x);O&&O.values&&(Re[b]=O.values),E.dirty=!1,E.lastSavedAt=Date.now()}catch(b){E.error=b&&b.message||String(b)}finally{E.saving=!1}}}async function r(){if(!E.saving&&confirm(`Reset the ${se.tabs[E.activeTab]??E.activeTab} tab to defaults?`)){E.saving=!0,E.error="";try{await Za(E.activeTab),Aa(E.activeTab),E.dirty=!1,E.lastSavedAt=Date.now()}catch(b){E.error=b&&b.message||String(b)}finally{E.saving=!1}}}let n=X(!1);En(()=>{if(E.lastSavedAt){N(n,!0);const b=setTimeout(()=>N(n,!1),2e3);return()=>clearTimeout(b)}});var i=zo();let o;var l=y(i),a=y(l);{var f=b=>{var x=Eo(),O=y(x);I(()=>A(O,E.error)),z(b,x)},u=b=>{var x=To();z(b,x)},v=b=>{var x=jo();z(b,x)},d=b=>{var x=Ao();z(b,x)},g=b=>{var x=Co();z(b,x)};ve(a,b=>{E.error?b(f):E.saving?b(u,1):p(n)?b(v,2):E.dirty?b(d,3):b(g,-1)})}var _=k(l,2),m=y(_),h=k(m,2),w=y(h);I(()=>{o=us(i,1,"bar svelte-1oj49qa",null,o,{dirty:E.dirty}),m.disabled=E.saving,h.disabled=E.saving||!E.dirty,A(w,E.saving?"Saving…":"Save changes")}),de("click",m,r),de("click",h,s),z(e,i),Ne()}Lt(["click"]);var Ro=L(`

                            SLASHED Design Tokens v2 · Svelte POC

                            Proof-of-concept admin page rendered with Svelte 5 instead of jQuery. + Currently only the Colors tab is fully ported; other tabs show a stub.

                            `);function Mo(e,t){$e(t,!0);const s=["cheatsheet","hooks","variables","classes","bundle"];let r=U(()=>s.includes(E.activeTab));En(()=>{function b(x){E.dirty&&(x.preventDefault(),x.returnValue="")}return window.addEventListener("beforeunload",b),()=>window.removeEventListener("beforeunload",b)});var n=Ro(),i=k(y(n),2);La(i,{});var o=k(i,2),l=y(o);{var a=b=>{Fa(b,{})},f=b=>{Ba(b,{})},u=b=>{Ka(b,{})},v=b=>{to(b,{})},d=b=>{no(b)},g=b=>{bo(b,{})},_=b=>{{let x=U(()=>se.tabs[E.activeTab]??E.activeTab);wo(b,{get tab(){return p(x)}})}};ve(l,b=>{E.activeTab==="colors"?b(a):E.activeTab==="variables"?b(f,1):E.activeTab==="classes"?b(u,2):E.activeTab==="bundle"?b(v,3):E.activeTab==="hooks"?b(d,4):E.activeTab==="cheatsheet"?b(g,5):b(_,-1)})}var m=k(o,2);So(m,{});var h=k(m,2);{var w=b=>{Lo(b,{})};ve(h,b=>{p(r)||b(w)})}z(e,n),Ne()}const Kr=document.getElementById("slashed-admin-app");Kr&&fa(Mo,{target:Kr}); //# sourceMappingURL=app.js.map diff --git a/integrations/bricks/includes/class-admin-page.php b/integrations/bricks/includes/class-admin-page.php index 4bb8cc0b..6064b153 100644 --- a/integrations/bricks/includes/class-admin-page.php +++ b/integrations/bricks/includes/class-admin-page.php @@ -66,11 +66,6 @@ public function __construct() { 'shadows' => 'Shadows', 'motion' => 'Motion', 'zindex' => 'Z-Index', - 'variables' => 'Variables', - 'classes' => 'Classes', - 'bundle' => 'Bundle', - 'hooks' => 'Hooks', - 'cheatsheet' => 'Cheatsheet', ); add_action( 'admin_menu', array( $this, 'register_menu' ) ); @@ -275,7 +270,13 @@ public function sanitize_section_public( $section, $data ) { * @return array */ public function get_tabs() { - return $this->tabs; + return array_merge( $this->tabs, array( + 'variables' => 'Variables', + 'classes' => 'Classes', + 'bundle' => 'Bundle', + 'hooks' => 'Hooks', + 'cheatsheet' => 'Cheatsheet', + ) ); } /**