From 8f641f112ec6a61eea5f0f6689bdd22aac48894c Mon Sep 17 00:00:00 2001 From: Kiro Agent <244629292+kiro-agent@users.noreply.github.com> Date: Mon, 25 May 2026 23:57:16 +0000 Subject: [PATCH 1/8] chore: verify admin-app build and update compiled assets --- .../context.json | 38 +++++++++++++++++++ .../features/FEAT-001.json | 21 ++++++++++ .../features/FEAT-002.json | 34 +++++++++++++++++ .../features/FEAT-003.json | 28 ++++++++++++++ .../task.json | 7 ++++ integrations/bricks/assets/admin-app/app.js | 14 +++---- 6 files changed, 135 insertions(+), 7 deletions(-) create mode 100644 .agents/tasks/task-admin-panel-full-api-cheatsheet/context.json create mode 100644 .agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-001.json create mode 100644 .agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-002.json create mode 100644 .agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-003.json create mode 100644 .agents/tasks/task-admin-panel-full-api-cheatsheet/task.json diff --git a/.agents/tasks/task-admin-panel-full-api-cheatsheet/context.json b/.agents/tasks/task-admin-panel-full-api-cheatsheet/context.json new file mode 100644 index 00000000..8312c76a --- /dev/null +++ b/.agents/tasks/task-admin-panel-full-api-cheatsheet/context.json @@ -0,0 +1,38 @@ +{ + "project_type": "Svelte 5 SPA (admin-app) embedded in a WordPress plugin (integrations/bricks/)", + "language": "JavaScript (Svelte 5 runes), PHP, CSS", + "build_system": "Vite 6 for the Svelte admin-app. Output goes to integrations/bricks/assets/admin-app/. No build step for the CSS framework itself.", + "test_framework": "No tests for the admin-app. The main SLASHED framework uses Playwright (npm test). The admin-app has no test suite.", + "build_command": "cd integrations/bricks/admin-app && npm install && npm run build", + "test_command": "cd integrations/bricks/admin-app && npm run build (build success = verification since no test suite exists)", + "verification_instructions": "1. npm install in admin-app/. 2. npm run build must succeed without errors. 3. Output files appear in integrations/bricks/assets/admin-app/app.js and app.css.", + "snapshot_or_generated_files": "integrations/bricks/assets/admin-app/app.js and app.css are generated by vite build. They are checked in.", + "setup_instructions": "cd integrations/bricks/admin-app && npm install", + "environment_constraints": "COMMON_DEPENDENCIES network mode - npm install should work. No WordPress runtime available for integration testing. Validation is build-only (vite build).", + "contribution_requirements": "Conventional Commits. CSS custom properties must start with --sf-. The admin-app uses Svelte 5 runes ($state, $derived, $effect, $props). No jQuery in the Svelte app.", + "key_patterns": "1. Svelte 5 runes pattern: module-level reactive state in .svelte.js files using $state(). 2. Tab navigation: meta.tabs drives TabNav.svelte, ui.activeTab selects the active tab body. 3. API calls go through src/lib/api.js using WP REST nonce auth. 4. Hydration data comes from window.slashedBricksApp (populated by PHP wp_localize_script). 5. Each tab is a standalone component rendered conditionally in App.svelte. 6. The inventory (all variables and classes) is available at data/inventory.json. 7. Category mapping logic exists in class-inventory.php (categorize_variable, category_map, category_order).", + "relevant_files": [ + "integrations/bricks/admin-app/src/App.svelte", + "integrations/bricks/admin-app/src/lib/stores.svelte.js", + "integrations/bricks/admin-app/src/lib/api.js", + "integrations/bricks/admin-app/src/components/TabNav.svelte", + "integrations/bricks/admin-app/src/components/ColorTab.svelte", + "integrations/bricks/admin-app/src/components/StubTab.svelte", + "integrations/bricks/admin-app/src/components/SaveBar.svelte", + "integrations/bricks/admin-app/src/components/ColorRow.svelte", + "integrations/bricks/admin-app/src/components/LivePreview.svelte", + "integrations/bricks/admin-app/package.json", + "integrations/bricks/admin-app/vite.config.js", + "integrations/bricks/includes/class-admin-page.php", + "integrations/bricks/includes/class-admin-page-svelte.php", + "integrations/bricks/includes/class-rest-controller.php", + "integrations/bricks/includes/class-inventory.php", + "integrations/bricks/data/inventory.json", + "docs/tokens.md", + "docs/layout.md", + "docs/macros.md", + "docs/states.md", + "integrations/bricks/README.md" + ], + "directory_structure": "integrations/bricks/admin-app/src/ - Svelte SPA source. integrations/bricks/admin-app/src/components/ - tab and UI components. integrations/bricks/admin-app/src/lib/ - stores and API. integrations/bricks/includes/ - PHP backend classes. integrations/bricks/data/ - inventory.json fallback. docs/ - framework documentation. core/ - CSS source files." +} diff --git a/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-001.json b/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-001.json new file mode 100644 index 00000000..0f1cd049 --- /dev/null +++ b/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-001.json @@ -0,0 +1,21 @@ +{ + "id": "FEAT-001", + "type": "chore", + "description": "Install dependencies and verify the admin-app builds successfully as-is before making changes.", + "status": "in_progress", + "steps": [ + "Run `npm install` in integrations/bricks/admin-app/", + "Run `npm run build` in integrations/bricks/admin-app/ and confirm it exits 0", + "Verify output files exist at integrations/bricks/assets/admin-app/app.js and app.css" + ], + "acceptance_criteria": [ + "`npm run build` exits with code 0", + "integrations/bricks/assets/admin-app/app.js exists and is non-empty", + "integrations/bricks/assets/admin-app/app.css exists and is non-empty" + ], + "verification": [ + "Run `cd integrations/bricks/admin-app && npm run build` and confirm exit code 0" + ], + "blocked_reason": null, + "findings": "" +} diff --git a/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-002.json b/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-002.json new file mode 100644 index 00000000..f88617c0 --- /dev/null +++ b/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-002.json @@ -0,0 +1,34 @@ +{ + "id": "FEAT-002", + "type": "feat", + "description": "Expand the Svelte admin panel to cover the entire public API by replacing stub tabs with real content tabs for Variables, Classes, Bundle/Settings, and Hooks, plus improving the existing ColorTab.", + "status": "pending", + "steps": [ + "Step 1 - Create VariablesTab.svelte in src/components/. This tab reads all variables from the inventory (window.slashedBricksApp already provides defaults which contain variable categories from class-inventory.php). For the Svelte SPA, we need to add inventory data to the hydration payload. Since PHP is not available, we will embed a static cheatsheet data module (see FEAT-003). For now, this tab should display all registered variables grouped by their category (Colors, Typography, Spacing, Sizing, Layout, Borders, Radius, Shadows, Effects, Motion, Icons, Z-Index, States, Focus, Scroll, Print, Misc) using the same categorization logic from class-inventory.php. Each category is a collapsible section showing the variable names. This is a read-only view, not an editor.", + "Step 2 - Create ClassesTab.svelte in src/components/. This tab shows all .sf-* layout/utility classes and .is-* state classes in two separate sections. Each class is listed with its name. The data comes from the same static inventory data module.", + "Step 3 - Create BundleTab.svelte in src/components/. This tab shows: (a) Current CSS bundle info (the URL configured, which bundle is active), (b) the html_font_size plugin setting (already exposed via pluginSettings in the hydration payload and the /settings REST endpoint). The font-size select should be functional - on change it calls the existing REST API (POST /slashed-bricks/v1/settings with html_font_size). Show a save button for this section that is independent of the token save flow.", + "Step 4 - Create HooksTab.svelte in src/components/. This is a documentation/reference tab that lists all available filter hooks with their signatures, descriptions, and example PHP code snippets. The content is static/hardcoded since it documents the PHP API. Hooks to document: slashed_bricks/css_bundle_url, slashed_bricks/registered_classes, slashed_bricks/registered_colors, slashed_bricks/registered_variables, slashed_bricks/inventory, slashed_bricks/inventory_local_path, slashed_bricks/color_categories.", + "Step 5 - Update stores.svelte.js to expose inventory data. Add an `inventory` field to the `meta` export that reads from bootstrap.inventory (which we will populate from PHP or from the static fallback). The shape should be { variables: string[], sf_classes: string[], is_classes: string[] }. Also expose pluginSettings from the bootstrap.", + "Step 6 - Update App.svelte to import and render the new tab components. Replace the single StubTab fallback with proper conditional rendering: 'colors' -> ColorTab, 'variables' -> VariablesTab, 'classes' -> ClassesTab, 'bundle' -> BundleTab, 'hooks' -> HooksTab. Any unrecognized tab slug still falls back to StubTab.", + "Step 7 - Update the PHP hydration in class-admin-page-svelte.php to pass inventory data to the SPA. Add 'inventory' key to the wp_localize_script payload containing Slashed_Bricks_Inventory::get() result (variables, sf_classes, is_classes). Also update the 'tabs' to include the new tab slugs.", + "Step 8 - Update class-admin-page.php get_tabs() to add the new tab slugs. Add 'variables' => 'Variables', 'classes' => 'Classes', 'bundle' => 'Bundle', 'hooks' => 'Hooks' to the $this->tabs array. Keep existing tabs (colors, contrast, typography, spacing, radius, shadows, motion, zindex) intact.", + "Step 9 - Update the api.js module to add a saveSettings(settings) function that calls POST /settings with the given payload. This is needed by BundleTab for the font-size setting.", + "Step 10 - Update index.html dev harness to include mock inventory data in window.slashedBricksApp so `vite dev` works for the new tabs. Add inventory with a few sample variables/classes, and the new tab slugs.", + "Step 11 - Build and verify: run `npm run build` in admin-app/ and confirm it succeeds." + ], + "acceptance_criteria": [ + "App.svelte renders VariablesTab, ClassesTab, BundleTab, HooksTab for their respective tab slugs", + "VariablesTab shows variables grouped by category with collapsible sections", + "ClassesTab shows .sf-* and .is-* classes in separate sections", + "BundleTab shows the font-size setting with a functional select + save button", + "HooksTab shows all 7 filter hooks with descriptions and code examples", + "TabNav shows all tabs including the new ones", + "The app still builds successfully with `npm run build`", + "Existing ColorTab functionality is unchanged" + ], + "verification": [ + "Run `cd integrations/bricks/admin-app && npm run build` and confirm exit code 0" + ], + "blocked_reason": null, + "findings": "" +} 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 new file mode 100644 index 00000000..407f7b64 --- /dev/null +++ b/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-003.json @@ -0,0 +1,28 @@ +{ + "id": "FEAT-003", + "type": "feat", + "description": "Add a Cheatsheet tab/subpage that serves as a comprehensive index of all CSS custom properties (--sf-*) and classes (.sf-*, .is-*) available in the SLASHED framework, with short descriptions of what each token/class or group does.", + "status": "pending", + "steps": [ + "Step 1 - Create a cheatsheet data module at src/lib/cheatsheet-data.js. This module exports a structured object containing all variable categories with descriptions, all class groups with descriptions. The data is derived from the documentation in docs/tokens.md, docs/layout.md, docs/macros.md, docs/states.md. Structure: { variableGroups: [ { category, description, tokens: [ { name, description } ] } ], classGroups: [ { category, description, classes: [ { name, description } ] } ] }. For variables, group by category (Colors, Typography, Spacing, Sizing, Layout, Borders, Radius, Shadows, Effects, Motion, Icons, Z-Index, Focus, Scroll, Print, Misc). For classes, group into Layout Primitives, Macros, Animations/Entrance, Surfaces, and State Classes. Include short 1-line descriptions for each group AND for representative individual tokens/classes. For palette scale tokens (--sf-color-primary-50 through -950, -a5 through -a95, etc.), describe the group pattern once rather than repeating for each individual token. Same for similar repetitive groups.", + "Step 2 - Create CheatsheetTab.svelte in src/components/. This is a rich reference page with: (a) A search/filter input at the top that filters tokens and classes by name or description, (b) A toggle to switch between Variables view and Classes view (or show both), (c) Variables view: collapsible category sections, each showing the tokens in that category with their description. Use compact list styling. (d) Classes view: grouped by type (Layout, Macros, Animations, Surfaces, States), each showing class names with descriptions. (e) Total counts displayed (e.g. '607 variables, 143 classes, 40 state classes'). Style it to be scannable and useful as a quick-reference.", + "Step 3 - Add 'cheatsheet' tab to the PHP tabs array in class-admin-page.php and to the index.html dev harness mock tabs.", + "Step 4 - Update App.svelte to import CheatsheetTab and render it when ui.activeTab === 'cheatsheet'.", + "Step 5 - The cheatsheet tab should NOT show the SaveBar (it's read-only reference content). Update the App.svelte or SaveBar logic so the save bar is hidden when activeTab is 'cheatsheet' or 'hooks' (read-only tabs).", + "Step 6 - Build and verify: run `npm run build` in admin-app/ and confirm it succeeds." + ], + "acceptance_criteria": [ + "CheatsheetTab renders a searchable index of all framework variables grouped by category", + "CheatsheetTab renders all .sf-* and .is-* classes grouped by type with descriptions", + "The search filter narrows results by token/class name or description text", + "Category sections are collapsible", + "Read-only tabs (cheatsheet, hooks) do not show the SaveBar", + "The total count of variables and classes is displayed", + "The app builds successfully with `npm run build`" + ], + "verification": [ + "Run `cd integrations/bricks/admin-app && npm run build` and confirm exit code 0" + ], + "blocked_reason": null, + "findings": "" +} diff --git a/.agents/tasks/task-admin-panel-full-api-cheatsheet/task.json b/.agents/tasks/task-admin-panel-full-api-cheatsheet/task.json new file mode 100644 index 00000000..a0fa44a0 --- /dev/null +++ b/.agents/tasks/task-admin-panel-full-api-cheatsheet/task.json @@ -0,0 +1,7 @@ +{ + "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", + "feature_order": ["FEAT-001", "FEAT-002", "FEAT-003"], + "blocked_reason": null +} diff --git a/integrations/bricks/assets/admin-app/app.js b/integrations/bricks/assets/admin-app/app.js index 09b3dea5..ab2bdd9e 100644 --- a/integrations/bricks/assets/admin-app/app.js +++ b/integrations/bricks/assets/admin-app/app.js @@ -1,12 +1,12 @@ -var ms=Object.defineProperty;var an=e=>{throw TypeError(e)};var ys=(e,t,r)=>t in e?ms(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var G=(e,t,r)=>ys(e,typeof t!="symbol"?t+"":t,r),Sr=(e,t,r)=>t.has(e)||an("Cannot "+r);var f=(e,t,r)=>(Sr(e,t,"read from private field"),r?r.call(e):t.get(e)),y=(e,t,r)=>t.has(e)?an("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),m=(e,t,r,n)=>(Sr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),C=(e,t,r)=>(Sr(e,t,"access private method"),r);var Tn=Array.isArray,Es=Array.prototype.indexOf,it=Array.prototype.includes,gr=Array.from,Ss=Object.defineProperty,qt=Object.getOwnPropertyDescriptor,ks=Object.getOwnPropertyDescriptors,Ts=Object.prototype,As=Array.prototype,An=Object.getPrototypeOf,ln=Object.isExtensible;const xs=()=>{};function Cs(e){for(var t=0;t{e=n,t=s});return{promise:r,resolve:e,reject:t}}function Dr(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const r=[];for(const n of e)if(r.push(n),r.length===t)break;return r}const B=2,It=4,wr=8,Cn=1<<24,pe=16,ye=32,Ke=64,Rr=128,ue=512,H=1024,V=2048,Ce=4096,Y=8192,me=16384,dt=32768,on=1<<25,xt=65536,fr=1<<17,Mn=1<<18,Ot=1<<19,Ms=1<<20,Ae=1<<25,ut=65536,ur=1<<21,mt=1<<22,Ue=1<<23,kr=Symbol("$state"),Ns=Symbol(""),er=Symbol("attributes"),Pr=Symbol("class"),Lr=Symbol("style"),Pt=Symbol("text"),tr=Symbol("form reset"),br=new class extends Error{constructor(){super(...arguments);G(this,"name","StaleReactionError");G(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Os(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ds(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Rs(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ps(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ls(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Fs(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function qs(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function js(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Hs(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Is(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Vs=1,Bs=2,Nn=4,$s=8,zs=16,Us=1,Ks=2,q=Symbol("uninitialized"),On="http://www.w3.org/1999/xhtml",Ys="http://www.w3.org/2000/svg",Gs="http://www.w3.org/1998/Math/MathML";function Ws(){console.warn("https://svelte.dev/e/derived_inert")}function Xs(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Dn(e){return e===this.v}function Js(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Rn(e){return!Js(e,this.v)}let ve=null;function Ct(e){ve=e}function ht(e,t=!1,r){ve={p:ve,i:!1,c:null,e:null,s:e,x:null,r:x,l:null}}function _t(e){var t=ve,r=t.e;if(r!==null){t.e=null;for(var n of r)ts(n)}return t.i=!0,ve=t.p,{}}function Pn(){return!0}let We=[];function Ln(){var e=We;We=[],Cs(e)}function at(e){if(We.length===0&&!jt){var t=We;queueMicrotask(()=>{t===We&&Ln()})}We.push(e)}function Qs(){for(;We.length>0;)Ln()}function Fn(e){var t=x;if(t===null)return k.f|=Ue,e;if((t.f&dt)===0&&(t.f&It)===0)throw e;$e(e,t)}function $e(e,t){for(;t!==null;){if((t.f&Rr)!==0){if((t.f&dt)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}const Zs=-7169;function D(e,t){e.f=e.f&Zs|t}function Gr(e){(e.f&ue)!==0||e.deps===null?D(e,H):D(e,Ce)}function qn(e){if(e!==null)for(const t of e)(t.f&B)===0||(t.f&ut)===0||(t.f^=ut,qn(t.deps))}function jn(e,t,r){(e.f&V)!==0?t.add(e):(e.f&Ce)!==0&&r.add(e),qn(e.deps),D(e,H)}let Tr=null,pt=null,S=null,Fr=null,ge=null,qr=null,jt=!1,Ar=!1,bt=null,rr=null;var fn=0;let ei=1;var yt,Ie,Ze,Et,St,et,kt,Pe,zt,ee,Ut,Ve,Ee,Se,Tt,tt,M,jr,Lt,Hr,Hn,In,nr,ti,Ir,gt;const hr=class hr{constructor(){y(this,M);G(this,"id",ei++);y(this,yt,!1);G(this,"linked",!0);y(this,Ie,null);y(this,Ze,null);G(this,"async_deriveds",new Map);G(this,"current",new Map);G(this,"previous",new Map);G(this,"unblocked",new Set);y(this,Et,new Set);y(this,St,new Set);y(this,et,new Set);y(this,kt,0);y(this,Pe,new Map);y(this,zt,null);y(this,ee,[]);y(this,Ut,[]);y(this,Ve,new Set);y(this,Ee,new Set);y(this,Se,new Map);y(this,Tt,new Set);G(this,"is_fork",!1);y(this,tt,!1)}skip_effect(t){f(this,Se).has(t)||f(this,Se).set(t,{d:[],m:[]}),f(this,Tt).delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=f(this,Se).get(t);if(n){f(this,Se).delete(t);for(var s of n.d)D(s,V),r(s);for(s of n.m)D(s,Ce),r(s)}f(this,Tt).add(t)}capture(t,r,n=!1){t.v!==q&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&Ue)===0&&(this.current.set(t,[r,n]),ge?.set(t,r)),this.is_fork||(t.v=r)}activate(){S=this}deactivate(){S=null,ge=null}flush(){try{Ar=!0,S=this,C(this,M,Lt).call(this)}finally{fn=0,qr=null,bt=null,rr=null,Ar=!1,S=null,ge=null,lt.clear()}}discard(){for(const t of f(this,St))t(this);f(this,St).clear(),f(this,et).clear(),C(this,M,gt).call(this)}register_created_effect(t){f(this,Ut).push(t)}increment(t,r){if(m(this,kt,f(this,kt)+1),t){let n=f(this,Pe).get(r)??0;f(this,Pe).set(r,n+1)}}decrement(t,r){if(m(this,kt,f(this,kt)-1),t){let n=f(this,Pe).get(r)??0;n===1?f(this,Pe).delete(r):f(this,Pe).set(r,n-1)}f(this,tt)||(m(this,tt,!0),at(()=>{m(this,tt,!1),this.linked&&this.flush()}))}transfer_effects(t,r){for(const n of t)f(this,Ve).add(n);for(const n of r)f(this,Ee).add(n);t.clear(),r.clear()}oncommit(t){f(this,Et).add(t)}ondiscard(t){f(this,St).add(t)}on_fork_commit(t){f(this,et).add(t)}run_fork_commit_callbacks(){for(const t of f(this,et))t(this);f(this,et).clear()}settled(){return(f(this,zt)??m(this,zt,xn())).promise}static ensure(){var t;if(S===null){const r=S=new hr;C(t=r,M,Ir).call(t),!Ar&&!jt&&at(()=>{f(r,yt)||r.flush()})}return S}apply(){{ge=null;return}}schedule(t){if(qr=t,t.b?.is_pending&&(t.f&(It|wr|Cn))!==0&&(t.f&dt)===0){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var n=r.f;if(bt!==null&&r===x&&(k===null||(k.f&B)===0))return;if((n&(Ke|ye))!==0){if((n&H)===0)return;r.f^=H}}f(this,ee).push(r)}};yt=new WeakMap,Ie=new WeakMap,Ze=new WeakMap,Et=new WeakMap,St=new WeakMap,et=new WeakMap,kt=new WeakMap,Pe=new WeakMap,zt=new WeakMap,ee=new WeakMap,Ut=new WeakMap,Ve=new WeakMap,Ee=new WeakMap,Se=new WeakMap,Tt=new WeakMap,tt=new WeakMap,M=new WeakSet,jr=function(){if(this.is_fork)return!0;for(const n of f(this,Pe).keys()){for(var t=n,r=!1;t.parent!==null;){if(f(this,Se).has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1},Lt=function(){var a,u,v;if(m(this,yt,!0),fn++>1e3&&(C(this,M,gt).call(this),ni()),!C(this,M,jr).call(this)){for(const d of f(this,Ve))f(this,Ee).delete(d),D(d,V),this.schedule(d);for(const d of f(this,Ee))D(d,Ce),this.schedule(d)}const t=f(this,ee);m(this,ee,[]),this.apply();var r=bt=[],n=[],s=rr=[];for(const d of t)try{C(this,M,Hr).call(this,d,r,n)}catch(c){throw $n(d),c}if(S=null,s.length>0){var i=hr.ensure();for(const d of s)i.schedule(d)}if(bt=null,rr=null,C(this,M,jr).call(this)){C(this,M,nr).call(this,n),C(this,M,nr).call(this,r);for(const[d,c]of f(this,Se))Bn(d,c);s.length>0&&C(a=S,M,Lt).call(a);return}const l=C(this,M,Hn).call(this);if(l){C(u=l,M,In).call(u,this);return}f(this,Ve).clear(),f(this,Ee).clear();for(const d of f(this,Et))d(this);f(this,Et).clear(),Fr=this,un(n),un(r),Fr=null,f(this,zt)?.resolve();var o=S;if(this.linked&&f(this,kt)===0&&C(this,M,gt).call(this),f(this,ee).length>0){o===null&&(o=this,C(this,M,Ir).call(this));const d=o;f(d,ee).push(...f(this,ee).filter(c=>!f(d,ee).includes(c)))}o!==null&&C(v=o,M,Lt).call(v)},Hr=function(t,r,n){t.f^=H;for(var s=t.first;s!==null;){var i=s.f,l=(i&(ye|Ke))!==0,o=l&&(i&H)!==0,a=o||(i&Y)!==0||f(this,Se).has(s);if(!a&&s.fn!==null){l?s.f^=H:(i&It)!==0?r.push(s):Jt(s)&&((i&pe)!==0&&f(this,Ee).add(s),Nt(s));var u=s.first;if(u!==null){s=u;continue}}for(;s!==null;){var v=s.next;if(v!==null){s=v;break}s=s.parent}}},Hn=function(){for(var t=f(this,Ie);t!==null;){if(!t.is_fork){for(const[r,[,n]]of this.current)if(t.current.has(r)&&!n)return t}t=f(t,Ie)}return null},In=function(t){var n;for(const[s,i]of t.current)!this.previous.has(s)&&t.previous.has(s)&&this.previous.set(s,t.previous.get(s)),this.current.set(s,i);for(const[s,i]of t.async_deriveds){const l=this.async_deriveds.get(s);l&&i.promise.then(l.resolve)}const r=s=>{var i=s.reactions;if(i!==null)for(const a of i){var l=a.f;if((l&B)!==0)r(a);else{var o=a;l&(mt|pe)&&!this.async_deriveds.has(o)&&(f(this,Ee).delete(o),D(o,V),this.schedule(o))}}};for(const s of this.current.keys())r(s);this.oncommit(()=>t.discard()),C(n=t,M,gt).call(n),S=this,C(this,M,Lt).call(this)},nr=function(t){for(var r=0;r!this.current.has(c));if(s.length===0)t&&d.discard();else if(r.length>0){if(t)for(const c of f(this,Tt))d.unskip_effect(c,p=>{var _;(p.f&(pe|mt))!==0?d.schedule(p):C(_=d,M,nr).call(_,[p])});d.activate();var i=new Set,l=new Map;for(var o of r)Vn(o,s,i,l);l=new Map;var a=[...d.current.keys()].filter(c=>this.current.has(c)?this.current.get(c)[0]!==c.v:!0);if(a.length>0)for(const c of f(this,Ut))(c.f&(me|Y|fr))===0&&Wr(c,a,l)&&((c.f&(mt|pe))!==0?(D(c,V),d.schedule(c)):f(d,Ve).add(c));if(f(d,ee).length>0&&!f(d,tt)){d.apply();for(var u of f(d,ee))C(v=d,M,Hr).call(v,u,[],[]);m(d,ee,[])}d.deactivate()}}}},Ir=function(){pt===null?Tr=pt=this:(m(pt,Ze,this),m(this,Ie,pt)),pt=this},gt=function(){var t=f(this,Ie),r=f(this,Ze);t===null?Tr=r:m(t,Ze,r),r===null?pt=t:m(r,Ie,t),this.linked=!1};let ct=hr;function ri(e){var t=jt;jt=!0;try{for(var r;;){if(Qs(),S===null)return r;S.flush()}}finally{jt=t}}function ni(){try{Fs()}catch(e){$e(e,qr)}}let Re=null;function un(e){var t=e.length;if(t!==0){for(var r=0;r0)){lt.clear();for(const s of Re){if((s.f&(me|Y))!==0)continue;const i=[s];let l=s.parent;for(;l!==null;)Re.has(l)&&(Re.delete(l),i.push(l)),l=l.parent;for(let o=i.length-1;o>=0;o--){const a=i[o];(a.f&(me|Y))===0&&Nt(a)}}Re.clear()}}Re=null}}function Vn(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const s of e.reactions){const i=s.f;(i&B)!==0?Vn(s,t,r,n):(i&(mt|pe))!==0&&(i&V)===0&&Wr(s,t,n)&&(D(s,V),Xr(s))}}function Wr(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const s of e.deps){if(it.call(t,s))return!0;if((s.f&B)!==0&&Wr(s,t,r))return r.set(s,!0),!0}return r.set(e,!1),!1}function Xr(e){S.schedule(e)}function Bn(e,t){if(!((e.f&ye)!==0&&(e.f&H)!==0)){(e.f&V)!==0?t.d.push(e):(e.f&Ce)!==0&&t.m.push(e),D(e,H);for(var r=e.first;r!==null;)Bn(r,t),r=r.next}}function $n(e){D(e,H);for(var t=e.first;t!==null;)$n(t),t=t.next}function si(e){let t=0,r=vt(0),n;return()=>{en()&&(b(r),rs(()=>(t===0&&(n=_s(()=>e(()=>Ht(r)))),t+=1,()=>{at(()=>{t-=1,t===0&&(n?.(),n=void 0,Ht(r))})})))}}var ii=xt|Ot;function ai(e,t,r,n){new li(e,t,r,n)}var ae,Yr,le,rt,W,oe,K,te,Le,nt,Be,At,Kt,Yt,Fe,_r,R,oi,fi,ui,Vr,sr,ir,Br,$r;class li{constructor(t,r,n,s){y(this,R);G(this,"parent");G(this,"is_pending",!1);G(this,"transform_error");y(this,ae);y(this,Yr,null);y(this,le);y(this,rt);y(this,W);y(this,oe,null);y(this,K,null);y(this,te,null);y(this,Le,null);y(this,nt,0);y(this,Be,0);y(this,At,!1);y(this,Kt,new Set);y(this,Yt,new Set);y(this,Fe,null);y(this,_r,si(()=>(m(this,Fe,vt(f(this,nt))),()=>{m(this,Fe,null)})));m(this,ae,t),m(this,le,r),m(this,rt,i=>{var l=x;l.b=this,l.f|=Rr,n(i)}),this.parent=x.b,this.transform_error=s??this.parent?.transform_error??(i=>i),m(this,W,mr(()=>{C(this,R,Vr).call(this)},ii))}defer_effect(t){jn(t,f(this,Kt),f(this,Yt))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!f(this,le).pending}update_pending_count(t,r){C(this,R,Br).call(this,t,r),m(this,nt,f(this,nt)+t),!(!f(this,Fe)||f(this,At))&&(m(this,At,!0),at(()=>{m(this,At,!1),f(this,Fe)&&Mt(f(this,Fe),f(this,nt))}))}get_effect_pending(){return f(this,_r).call(this),b(f(this,Fe))}error(t){if(!f(this,le).onerror&&!f(this,le).failed)throw t;S?.is_fork?(f(this,oe)&&S.skip_effect(f(this,oe)),f(this,K)&&S.skip_effect(f(this,K)),f(this,te)&&S.skip_effect(f(this,te)),S.on_fork_commit(()=>{C(this,R,$r).call(this,t)})):C(this,R,$r).call(this,t)}}ae=new WeakMap,Yr=new WeakMap,le=new WeakMap,rt=new WeakMap,W=new WeakMap,oe=new WeakMap,K=new WeakMap,te=new WeakMap,Le=new WeakMap,nt=new WeakMap,Be=new WeakMap,At=new WeakMap,Kt=new WeakMap,Yt=new WeakMap,Fe=new WeakMap,_r=new WeakMap,R=new WeakSet,oi=function(){try{m(this,oe,ne(()=>f(this,rt).call(this,f(this,ae))))}catch(t){this.error(t)}},fi=function(t){const r=f(this,le).failed;r&&m(this,te,ne(()=>{r(f(this,ae),()=>t,()=>()=>{})}))},ui=function(){const t=f(this,le).pending;t&&(this.is_pending=!0,m(this,K,ne(()=>t(f(this,ae)))),at(()=>{var r=m(this,Le,document.createDocumentFragment()),n=qe();r.append(n),m(this,oe,C(this,R,ir).call(this,()=>ne(()=>f(this,rt).call(this,n)))),f(this,Be)===0&&(f(this,ae).before(r),m(this,Le,null),ot(f(this,K),()=>{m(this,K,null)}),C(this,R,sr).call(this,S))}))},Vr=function(){try{if(this.is_pending=this.has_pending_snippet(),m(this,Be,0),m(this,nt,0),m(this,oe,ne(()=>{f(this,rt).call(this,f(this,ae))})),f(this,Be)>0){var t=m(this,Le,document.createDocumentFragment());nn(f(this,oe),t);const r=f(this,le).pending;m(this,K,ne(()=>r(f(this,ae))))}else C(this,R,sr).call(this,S)}catch(r){this.error(r)}},sr=function(t){this.is_pending=!1,t.transfer_effects(f(this,Kt),f(this,Yt))},ir=function(t){var r=x,n=k,s=ve;Me(f(this,W)),de(f(this,W)),Ct(f(this,W).ctx);try{return ct.ensure(),t()}catch(i){return Fn(i),null}finally{Me(r),de(n),Ct(s)}},Br=function(t,r){var n;if(!this.has_pending_snippet()){this.parent&&C(n=this.parent,R,Br).call(n,t,r);return}m(this,Be,f(this,Be)+t),f(this,Be)===0&&(C(this,R,sr).call(this,r),f(this,K)&&ot(f(this,K),()=>{m(this,K,null)}),f(this,Le)&&(f(this,ae).before(f(this,Le)),m(this,Le,null)))},$r=function(t){f(this,oe)&&(Q(f(this,oe)),m(this,oe,null)),f(this,K)&&(Q(f(this,K)),m(this,K,null)),f(this,te)&&(Q(f(this,te)),m(this,te,null));var r=f(this,le).onerror;let n=f(this,le).failed;var s=!1,i=!1;const l=()=>{if(s){Xs();return}s=!0,i&&Is(),f(this,te)!==null&&ot(f(this,te),()=>{m(this,te,null)}),C(this,R,ir).call(this,()=>{C(this,R,Vr).call(this)})},o=a=>{try{i=!0,r?.(a,l),i=!1}catch(u){$e(u,f(this,W)&&f(this,W).parent)}n&&m(this,te,C(this,R,ir).call(this,()=>{try{return ne(()=>{var u=x;u.b=this,u.f|=Rr,n(f(this,ae),()=>a,()=>l)})}catch(u){return $e(u,f(this,W).parent),null}}))};at(()=>{var a;try{a=this.transform_error(t)}catch(u){$e(u,f(this,W)&&f(this,W).parent);return}a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(o,u=>$e(u,f(this,W)&&f(this,W).parent)):o(a)})};function ci(e,t,r,n){const s=Jr;var i=e.filter(c=>!c.settled);if(r.length===0&&i.length===0){n(t.map(s));return}var l=x,o=vi(),a=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(c=>c.promise)):null;function u(c){if((l.f&me)===0){o();try{n(c)}catch(p){$e(p,l)}cr()}}var v=zn();if(r.length===0){a.then(()=>u(t.map(s))).finally(v);return}function d(){Promise.all(r.map(c=>di(c))).then(c=>u([...t.map(s),...c])).catch(c=>$e(c,l)).finally(v)}a?a.then(()=>{o(),d(),cr()}):d()}function vi(){var e=x,t=k,r=ve,n=S;return function(i=!0){Me(e),de(t),Ct(r),i&&(e.f&me)===0&&(n?.activate(),n?.apply())}}function cr(e=!0){Me(null),de(null),Ct(null),e&&S?.deactivate()}function zn(){var e=x,t=e.b,r=S,n=t.is_rendered();return t.update_pending_count(1,r),r.increment(n,e),()=>{t.update_pending_count(-1,r),r.decrement(n,e)}}function Jr(e){var t=B|V;return x!==null&&(x.f|=Ot),{ctx:ve,deps:null,effects:null,equals:Dn,f:t,fn:e,reactions:null,rv:0,v:q,wv:0,parent:x,ac:null}}const Qt=Symbol("obsolete");function di(e,t,r){let n=x;n===null&&Os();var s=void 0,i=vt(q),l=!k,o=new Set;return xi(()=>{var a=x,u=xn();s=u.promise;try{Promise.resolve(e()).then(u.resolve,p=>{p!==br&&u.reject(p)}).finally(cr)}catch(p){u.reject(p),cr()}var v=S;if(l){if((a.f&dt)!==0)var d=zn();if(n.b.is_rendered())v.async_deriveds.get(a)?.reject(Qt);else for(const p of o.values())p.reject(Qt);o.add(u),v.async_deriveds.set(a,u)}const c=(p,_=void 0)=>{d?.(),o.delete(u),_!==Qt&&(v.activate(),_?(i.f|=Ue,Mt(i,_)):((i.f&Ue)!==0&&(i.f^=Ue),Mt(i,p)),v.deactivate())};u.promise.then(c,p=>c(null,p||"unknown"))}),Ti(()=>{for(const a of o)a.reject(Qt)}),new Promise(a=>{function u(v){function d(){v===s?a(i):u(s)}v.then(d,d)}u(s)})}function X(e){const t=Jr(e);return os(t),t}function hi(e){const t=Jr(e);return t.equals=Rn,t}function _i(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r0&&!Yn&&wi()}return t}function wi(){Yn=!1;for(const e of vr){(e.f&H)!==0&&D(e,Ce);let t;try{t=Jt(e)}catch{t=!0}t&&Nt(e)}vr.clear()}function Ht(e){z(e,e.v+1)}function Gn(e,t,r){var n=e.reactions;if(n!==null)for(var s=n.length,i=0;i{if(ft===i)return o();var a=k,u=ft;de(null),hn(i);var v=o();return de(a),hn(u),v};return n&&r.set("length",fe(e.length)),new Proxy(e,{defineProperty(o,a,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&qs();var v=r.get(a);return v===void 0?l(()=>{var d=fe(u.value);return r.set(a,d),d}):z(v,u.value,!0),!0},deleteProperty(o,a){var u=r.get(a);if(u===void 0){if(a in o){const v=l(()=>fe(q));r.set(a,v),Ht(s)}}else z(u,q),Ht(s);return!0},get(o,a,u){if(a===kr)return e;var v=r.get(a),d=a in o;if(v===void 0&&(!d||qt(o,a)?.writable)&&(v=l(()=>{var p=xe(d?o[a]:q),_=fe(p);return _}),r.set(a,v)),v!==void 0){var c=b(v);return c===q?void 0:c}return Reflect.get(o,a,u)},getOwnPropertyDescriptor(o,a){var u=Reflect.getOwnPropertyDescriptor(o,a);if(u&&"value"in u){var v=r.get(a);v&&(u.value=b(v))}else if(u===void 0){var d=r.get(a),c=d?.v;if(d!==void 0&&c!==q)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return u},has(o,a){if(a===kr)return!0;var u=r.get(a),v=u!==void 0&&u.v!==q||Reflect.has(o,a);if(u!==void 0||x!==null&&(!v||qt(o,a)?.writable)){u===void 0&&(u=l(()=>{var c=v?xe(o[a]):q,p=fe(c);return p}),r.set(a,u));var d=b(u);if(d===q)return!1}return v},set(o,a,u,v){var d=r.get(a),c=a in o;if(n&&a==="length")for(var p=u;pfe(q)),r.set(p+"",_))}if(d===void 0)(!c||qt(o,a)?.writable)&&(d=l(()=>fe(void 0)),z(d,xe(u)),r.set(a,d));else{c=d.v!==q;var g=l(()=>xe(u));z(d,g)}var h=Reflect.getOwnPropertyDescriptor(o,a);if(h?.set&&h.set.call(v,u),!c){if(n&&typeof a=="string"){var E=r.get("length"),w=Number(a);Number.isInteger(w)&&w>=E.v&&z(E,w+1)}Ht(s)}return!0},ownKeys(o){b(s);var a=Reflect.ownKeys(o).filter(d=>{var c=r.get(d);return c===void 0||c.v!==q});for(var[u,v]of r)v.v!==q&&!(u in o)&&a.push(u);return a},setPrototypeOf(){js()}})}var cn,Wn,Xn,Jn;function bi(){if(cn===void 0){cn=window,Wn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Xn=qt(t,"firstChild").get,Jn=qt(t,"nextSibling").get,ln(e)&&(e[Pr]=void 0,e[er]=null,e[Lr]=void 0,e.__e=void 0),ln(r)&&(r[Pt]=void 0)}}function qe(e=""){return document.createTextNode(e)}function ze(e){return Xn.call(e)}function Xt(e){return Jn.call(e)}function N(e,t){return ze(e)}function zr(e,t=!1){{var r=ze(e);return r instanceof Comment&&r.data===""?Xt(r):r}}function P(e,t=1,r=!1){let n=e;for(;t--;)n=Xt(n);return n}function mi(e){e.textContent=""}function Qn(){return!1}function Zn(e,t,r){return document.createElementNS(t??On,e,void 0)}let vn=!1;function yi(){vn||(vn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[tr]?.()})},{capture:!0}))}function Zr(e){var t=k,r=x;de(null),Me(null);try{return e()}finally{de(t),Me(r)}}function Ei(e,t,r,n=r){e.addEventListener(t,()=>Zr(r));const s=e[tr];s?e[tr]=()=>{s(),n(!0)}:e[tr]=()=>n(!0),yi()}function Si(e){x===null&&(k===null&&Ls(),Ps()),Ye&&Rs()}function ki(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Ge(e,t){var r=x;r!==null&&(r.f&Y)!==0&&(e|=Y);var n={ctx:ve,deps:null,nodes:null,f:e|V|ue,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};S?.register_created_effect(n);var s=n;if((e&It)!==0)bt!==null?bt.push(n):ct.ensure().schedule(n);else if(t!==null){try{Nt(n)}catch(l){throw Q(n),l}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&Ot)===0&&(s=s.first,(e&pe)!==0&&(e&xt)!==0&&s!==null&&(s.f|=xt))}if(s!==null&&(s.parent=r,r!==null&&ki(s,r),k!==null&&(k.f&B)!==0&&(e&Ke)===0)){var i=k;(i.effects??(i.effects=[])).push(s)}return n}function en(){return k!==null&&!be}function Ti(e){const t=Ge(wr,null);return D(t,H),t.teardown=e,t}function es(e){Si();var t=x.f,r=!k&&(t&ye)!==0&&(t&dt)===0;if(r){var n=ve;(n.e??(n.e=[])).push(e)}else return ts(e)}function ts(e){return Ge(It|Ms,e)}function Ai(e){ct.ensure();const t=Ge(Ke|Ot,e);return(r={})=>new Promise(n=>{r.outro?ot(t,()=>{Q(t),n(void 0)}):(Q(t),n(void 0))})}function xi(e){return Ge(mt|Ot,e)}function rs(e,t=0){return Ge(wr|t,e)}function we(e,t=[],r=[],n=[]){ci(n,t,r,s=>{Ge(wr,()=>e(...s.map(b)))})}function mr(e,t=0){var r=Ge(pe|t,e);return r}function ne(e){return Ge(ye|Ot,e)}function ns(e){var t=e.teardown;if(t!==null){const r=Ye,n=k;dn(!0),de(null);try{t.call(null)}finally{dn(r),de(n)}}}function tn(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const s=r.ac;s!==null&&Zr(()=>{s.abort(br)});var n=r.next;(r.f&Ke)!==0?r.parent=null:Q(r,t),r=n}}function Ci(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&ye)===0&&Q(t),t=r}}function Q(e,t=!0){var r=!1;(t||(e.f&Mn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(ss(e.nodes.start,e.nodes.end),r=!0),D(e,on),tn(e,t&&!r),Vt(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const i of n)i.stop();ns(e),e.f^=on,e.f|=me;var s=e.parent;s!==null&&s.first!==null&&is(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function ss(e,t){for(;e!==null;){var r=e===t?null:Xt(e);e.remove(),e=r}}function is(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function ot(e,t,r=!0){var n=[];as(e,n,!0);var s=()=>{r&&Q(e),t&&t()},i=n.length;if(i>0){var l=()=>--i||s();for(var o of n)o.out(l)}else s()}function as(e,t,r){if((e.f&Y)===0){e.f^=Y;var n=e.nodes&&e.nodes.t;if(n!==null)for(const o of n)(o.is_global||r)&&t.push(o);for(var s=e.first;s!==null;){var i=s.next;if((s.f&Ke)===0){var l=(s.f&xt)!==0||(s.f&ye)!==0&&(e.f&pe)!==0;as(s,t,l?r:!1)}s=i}}}function rn(e){ls(e,!0)}function ls(e,t){if((e.f&Y)!==0){e.f^=Y,(e.f&H)===0&&(D(e,V),ct.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,s=(r.f&xt)!==0||(r.f&ye)!==0;ls(r,s?t:!1),r=n}var i=e.nodes&&e.nodes.t;if(i!==null)for(const l of i)(l.is_global||t)&&l.in()}}function nn(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var s=r===n?null:Xt(r);t.append(r),r=s}}let ar=!1,Ye=!1;function dn(e){Ye=e}let k=null,be=!1;function de(e){k=e}let x=null;function Me(e){x=e}let ce=null;function os(e){k!==null&&(ce===null?ce=[e]:ce.push(e))}let J=null,Z=0,ie=null;function Mi(e){ie=e}let fs=1,Xe=0,ft=Xe;function hn(e){ft=e}function us(){return++fs}function Jt(e){var t=e.f;if((t&V)!==0)return!0;if(t&B&&(e.f&=~ut),(t&Ce)!==0){for(var r=e.deps,n=r.length,s=0;se.wv)return!0}(t&ue)!==0&&ge===null&&D(e,H)}return!1}function cs(e,t,r=!0){var n=e.reactions;if(n!==null&&!(ce!==null&&it.call(ce,e)))for(var s=0;s{e.ac.abort(br)}),e.ac=null);try{e.f|=ur;var v=e.fn,d=v();e.f|=dt;var c=e.deps,p=S?.is_fork;if(J!==null){var _;if(p||Vt(e,Z),c!==null&&Z>0)for(c.length=Z+J.length,_=0;_{throw h});throw c}}finally{e[Je]=t,delete e.currentTarget,de(v),Me(d)}}}const Pi=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Li(e){return Pi?.createHTML(e)??e}function Fi(e){var t=Zn("template");return t.innerHTML=Li(e.replaceAll("","")),t.content}function Bt(e,t){var r=x;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function $(e,t){var r=(t&Us)!==0,n=(t&Ks)!==0,s,i=!e.startsWith("");return()=>{s===void 0&&(s=Fi(i?e:""+e),r||(s=ze(s)));var l=n||Wn?document.importNode(s,!0):s.cloneNode(!0);if(r){var o=ze(l),a=l.lastChild;Bt(o,a)}else Bt(l,l);return l}}function gn(){var e=document.createDocumentFragment(),t=document.createComment(""),r=qe();return e.append(t,r),Bt(t,r),e}function j(e,t){e!==null&&e.before(t)}function je(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[Pt]??(e[Pt]=e.nodeValue))&&(e[Pt]=r,e.nodeValue=`${r}`)}function qi(e,t){return ji(e,t)}const Zt=new Map;function ji(e,{target:t,anchor:r,props:n={},events:s,context:i,intro:l=!0,transformError:o}){bi();var a=void 0,u=Ai(()=>{var v=r??t.appendChild(qe());ai(v,{pending:()=>{}},p=>{ht({});var _=ve;i&&(_.c=i),s&&(n.$$events=s),a=e(p,n)||{},_t()},o);var d=new Set,c=p=>{for(var _=0;_{for(var p of d)for(const h of[t,document]){var _=Zt.get(h),g=_.get(p);--g==0?(h.removeEventListener(p,pn),_.delete(p),_.size===0&&Zt.delete(h)):_.set(p,g)}Ur.delete(c),v!==r&&v.parentNode?.removeChild(v)}});return Hi.set(a,u),a}let Hi=new WeakMap;var _e,ke,re,st,Gt,Wt,pr;class Ii{constructor(t,r=!0){G(this,"anchor");y(this,_e,new Map);y(this,ke,new Map);y(this,re,new Map);y(this,st,new Set);y(this,Gt,!0);y(this,Wt,t=>{if(f(this,_e).has(t)){var r=f(this,_e).get(t),n=f(this,ke).get(r);if(n)rn(n),f(this,st).delete(r);else{var s=f(this,re).get(r);s&&(f(this,ke).set(r,s.effect),f(this,re).delete(r),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),n=s.effect)}for(const[i,l]of f(this,_e)){if(f(this,_e).delete(i),i===t)break;const o=f(this,re).get(l);o&&(Q(o.effect),f(this,re).delete(l))}for(const[i,l]of f(this,ke)){if(i===r||f(this,st).has(i))continue;const o=()=>{if(Array.from(f(this,_e).values()).includes(i)){var u=document.createDocumentFragment();nn(l,u),u.append(qe()),f(this,re).set(i,{effect:l,fragment:u})}else Q(l);f(this,st).delete(i),f(this,ke).delete(i)};f(this,Gt)||!n?(f(this,st).add(i),ot(l,o,!1)):o()}}});y(this,pr,t=>{f(this,_e).delete(t);const r=Array.from(f(this,_e).values());for(const[n,s]of f(this,re))r.includes(n)||(Q(s.effect),f(this,re).delete(n))});this.anchor=t,m(this,Gt,r)}ensure(t,r){var n=S,s=Qn();if(r&&!f(this,ke).has(t)&&!f(this,re).has(t))if(s){var i=document.createDocumentFragment(),l=qe();i.append(l),f(this,re).set(t,{effect:ne(()=>r(l)),fragment:i})}else f(this,ke).set(t,ne(()=>r(this.anchor)));if(f(this,_e).set(n,t),s){for(const[o,a]of f(this,ke))o===t?n.unskip_effect(a):n.skip_effect(a);for(const[o,a]of f(this,re))o===t?n.unskip_effect(a.effect):n.skip_effect(a.effect);n.oncommit(f(this,Wt)),n.ondiscard(f(this,pr))}else f(this,Wt).call(this,n)}}_e=new WeakMap,ke=new WeakMap,re=new WeakMap,st=new WeakMap,Gt=new WeakMap,Wt=new WeakMap,pr=new WeakMap;function $t(e,t,r=!1){var n=new Ii(e),s=r?xt:0;function i(l,o){n.ensure(l,o)}mr(()=>{var l=!1;t((o,a=0)=>{l=!0,i(a,o)}),l||i(-1,null)},s)}function Vi(e,t,r){for(var n=[],s=t.length,i,l=t.length,o=0;o{if(i){if(i.pending.delete(d),i.done.add(d),i.pending.size===0){var c=e.outrogroups;Kr(e,gr(i.done)),c.delete(i),c.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var a=n.length===0&&r!==null;if(a){var u=r,v=u.parentNode;mi(v),v.append(u),e.items.clear()}Kr(e,t,!a)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function Kr(e,t,r=!0){var n;if(e.pending.size>0){n=new Set;for(const l of e.pending.values())for(const o of l)n.add(e.items.get(o).e)}for(var s=0;s{var T=r();return Tn(T)?T:T==null?[]:gr(T)}),c,p=new Map,_=!0;function g(T){(w.effect.f&me)===0&&(w.pending.delete(T),w.fallback=v,Bi(w,c,l,t,n),v!==null&&(c.length===0?(v.f&Ae)===0?rn(v):(v.f^=Ae,Ft(v,null,l)):ot(v,()=>{v=null})))}function h(T){w.pending.delete(T)}var E=mr(()=>{c=b(d);for(var T=c.length,O=new Set,se=S,Ne=Qn(),U=0;Ui(l)):(v=ne(()=>i(wn??(wn=qe()))),v.f|=Ae)),T>O.size&&Ds(),!_)if(p.set(se,O),Ne){for(const[L,F]of o)O.has(L)||se.skip_effect(F.e);se.oncommit(g),se.ondiscard(h)}else g(se);b(d)}),w={effect:E,items:o,pending:p,outrogroups:null,fallback:v};_=!1}function Rt(e){for(;e!==null&&(e.f&ye)===0;)e=e.next;return e}function Bi(e,t,r,n,s){var i=(n&$s)!==0,l=t.length,o=e.items,a=Rt(e.effect.first),u,v=null,d,c=[],p=[],_,g,h,E;if(i)for(E=0;E0){var De=(n&Nn)!==0&&l===0?r:null;if(i){for(E=0;E{if(d!==void 0)for(h of d)h.nodes?.a?.apply()})}function $i(e,t,r,n,s,i,l,o){var a=(l&Vs)!==0?(l&zs)===0?gi(r,!1,!1):vt(r):null,u=(l&Bs)!==0?vt(s):null;return{v:a,i:u,e:ne(()=>(i(t,a??r,u??s,o),()=>{e.delete(n)}))}}function Ft(e,t,r){if(e.nodes)for(var n=e.nodes.start,s=e.nodes.end,i=t&&(t.f&Ae)===0?t.nodes.start:r;n!==null;){var l=Xt(n);if(i.before(n),n===s)return;n=l}}function He(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function zi(e,t,r=!1,n=!1,s=!1,i=!1){var l=e,o="";if(r)var a=e;we(()=>{var u=x;if(o!==(o=t()??"")){if(r){u.nodes=null,a.innerHTML=o,o!==""&&Bt(ze(a),a.lastChild);return}if(u.nodes!==null&&(ss(u.nodes.start,u.nodes.end),u.nodes=null),o!==""){var v=n?Ys:s?Gs:void 0,d=Zn(n?"svg":s?"math":"template",v);d.innerHTML=o;var c=n||s?d:d.content;if(Bt(ze(c),c.lastChild),n||s)for(;ze(c);)l.before(ze(c));else l.before(c)}}})}function Ui(e,t){var r;r=document.head.appendChild(qe());try{mr(()=>{var n=ne(()=>t(r));n.f|=Mn})}finally{}}const bn=[...` -\r\f \v\uFEFF`];function Ki(e,t,r){var n=e==null?"":""+e;if(r){for(var s of Object.keys(r))if(r[s])n=n?n+" "+s:s;else if(n.length)for(var i=s.length,l=0;(l=n.indexOf(s,l))>=0;){var o=l+i;(l===0||bn.includes(n[l-1]))&&(o===n.length||bn.includes(n[o]))?n=(l===0?"":n.substring(0,l))+n.substring(o+1):l=o}}return n===""?null:n}function mn(e,t=!1){var r=t?" !important;":";",n="";for(var s of Object.keys(e)){var i=e[s];i!=null&&i!==""&&(n+=" "+s+": "+i+r)}return n}function Yi(e,t){if(t){var r="",n,s;return Array.isArray(t)?(n=t[0],s=t[1]):n=t,n&&(r+=mn(n)),s&&(r+=mn(s,!0)),r=r.trim(),r===""?null:r}return String(e)}function gs(e,t,r,n,s,i){var l=e[Pr];if(l!==r||l===void 0){var o=Ki(r,n,i);o==null?e.removeAttribute("class"):e.className=o,e[Pr]=r}else if(i&&s!==i)for(var a in i){var u=!!i[a];(s==null||u!==!!s[a])&&e.classList.toggle(a,u)}return i}function xr(e,t={},r,n){for(var s in r){var i=r[s];t[s]!==i&&(r[s]==null?e.style.removeProperty(s):e.style.setProperty(s,i,n))}}function lr(e,t,r,n){var s=e[Lr];if(s!==t){var i=Yi(t,n);i==null?e.removeAttribute("style"):e.style.cssText=i,e[Lr]=t}else n&&(Array.isArray(n)?(xr(e,r?.[0],n[0]),xr(e,r?.[1],n[1],"important")):xr(e,r,n));return n}const Gi=Symbol("is custom element"),Wi=Symbol("is html");function wt(e,t,r,n){var s=Xi(e);s[t]!==(s[t]=r)&&(t==="loading"&&(e[Ns]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Ji(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Xi(e){return e[er]??(e[er]={[Gi]:e.nodeName.includes("-"),[Wi]:e.namespaceURI===On})}var yn=new Map;function Ji(e){var t=e.getAttribute("is")||e.nodeName,r=yn.get(t);if(r)return r;yn.set(t,r=[]);for(var n,s=e,i=Element.prototype;i!==s;){n=ks(s);for(var l in n)n[l].set&&l!=="innerHTML"&&l!=="textContent"&&l!=="innerText"&&r.push(l);s=An(s)}return r}function Cr(e,t,r=t){var n=new WeakSet;Ei(e,"input",async s=>{var i=s?e.defaultValue:e.value;if(i=Mr(e)?Nr(i):i,r(i),S!==null&&n.add(S),await Oi(),i!==(i=t())){var l=e.selectionStart,o=e.selectionEnd,a=e.value.length;if(e.value=i??"",o!==null){var u=e.value.length;l===o&&o===a&&u>a?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=l,e.selectionEnd=Math.min(o,u))}}}),_s(t)==null&&e.value&&(r(Mr(e)?Nr(e.value):e.value),S!==null&&n.add(S)),rs(()=>{var s=t();if(e===document.activeElement){var i=S;if(n.has(i))return}Mr(e)&&s===Nr(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function Mr(e){var t=e.type;return t==="number"||t==="range"}function Nr(e){return e===""?null:+e}function Or(e,t,r,n){var s=n,i=!0,l=()=>(i&&(i=!1,s=n),s),o;o=e[t],o===void 0&&n!==void 0&&(o=l());var a;return a=()=>{var u=e[t];return u===void 0?l():(i=!0,u)},a}const Qi="5";var kn;typeof window<"u"&&((kn=window.__svelte??(window.__svelte={})).v??(kn.v=new Set)).add(Qi);const or=typeof window<"u"&&window.slashedBricksApp?window.slashedBricksApp:{defaults:{},settings:{},tabs:{},rest:{url:"",nonce:""}},Dt={defaults:or.defaults||{},tabs:or.tabs||{},rest:or.rest||{url:"",nonce:""}},Te=xe(structuredClone(or.settings||{})),A=xe({activeTab:Zi(Dt.tabs)||"colors",dirty:!1,saving:!1,lastSavedAt:null,error:""});function Zi(e){for(const t in e)return t;return null}function ws(){A.dirty=!0,A.error=""}function ea(e){Te[e]&&delete Te[e],ws()}var ta=$(''),ra=$('');function na(e,t){ht(t,!0);var r=ra();dr(r,21,()=>Object.entries(Dt.tabs),([n,s])=>n,(n,s)=>{var i=X(()=>Dr(b(s),2));let l=()=>b(i)[0],o=()=>b(i)[1];var a=ta();let u;var v=N(a);we(()=>{u=gs(a,1,"tab-nav__btn svelte-yyiz68",null,u,{active:A.activeTab===l()}),je(v,o())}),Qe("click",a,()=>A.activeTab=l()),j(n,a)}),j(e,r),_t()}sn(["click"]);var sa=$(' '),ia=$(' ',1),aa=$(''),la=$('
');function En(e,t){ht(t,!0);let r=Or(t,"hexHint",3,""),n=Or(t,"rawHint",3,""),s=Or(t,"cssVar",3,"");const i=/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,l=(()=>{const L=(Te.colors?.[t.storeKey]??"").trim(),F=L===""||i.test(L);return{mode:F?"hex":"raw",hex:F?L:"",raw:F?"":L}})();let o=fe(xe(l.mode)),a=fe(xe(l.hex)),u=fe(xe(l.raw));function v(){Te.colors||(Te.colors={});const L=b(u).trim(),F=b(a).trim(),he=b(o)==="raw"?L:F;he===""?delete Te.colors[t.storeKey]:Te.colors[t.storeKey]=he,ws()}function d(){b(o)==="hex"?(z(o,"raw"),z(a,"")):(z(o,"hex"),z(u,"")),v()}const c=X(()=>(b(o)==="raw"?b(u):b(a))||r()||"transparent");var p=la(),_=N(p),g=N(_),h=N(g),E=P(g,2);{var w=L=>{var F=sa(),he=N(F);we(()=>je(he,s())),j(L,F)};$t(E,L=>{s()&&L(w)})}var T=P(_,2),O=N(T);let se;var Ne=P(O,2);{var U=L=>{var F=ia(),he=zr(F),yr=P(he,2);we(()=>{wt(he,"id",t.storeKey),wt(yr,"placeholder",r())}),Qe("input",he,v),Cr(he,()=>b(a),Er=>z(a,Er)),Qe("input",yr,v),Cr(yr,()=>b(a),Er=>z(a,Er)),j(L,F)},Oe=L=>{var F=aa();we(()=>{wt(F,"id",t.storeKey),wt(F,"placeholder",n())}),Qe("input",F,v),Cr(F,()=>b(u),he=>z(u,he)),j(L,F)};$t(Ne,L=>{b(o)==="hex"?L(U):L(Oe,-1)})}var De=P(Ne,2),I=N(De);we(()=>{wt(g,"for",t.storeKey),je(h,t.label),se=lr(O,"",se,{background:b(c)}),je(I,b(o)==="hex"?"Advanced (oklch / raw)":"Use HEX picker")}),Qe("click",De,d),j(e,p),_t()}sn(["input","click"]);var oa=$(`

Brand Colors

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

');function Zi(e,t){dt(t,!0);var r=Qi();vr(r,21,()=>Object.entries(Mt.tabs),([n,s])=>n,(n,s)=>{var i=Y(()=>Mr(m(s),2));let a=()=>m(i)[0],f=()=>m(i)[1];var l=Ji();let u;var c=N(l);xe(()=>{u=ds(l,1,"tab-nav__btn svelte-yyiz68",null,u,{active:k.activeTab===a()}),qe(c,f())}),Xe("click",l,()=>k.activeTab=a()),H(n,l)}),H(e,r),ht()}nn(["click"]);var el=B(' '),tl=B(' ',1),rl=B(''),nl=B('
');function yn(e,t){dt(t,!0);let r=Nr(t,"hexHint",3,""),n=Nr(t,"rawHint",3,""),s=Nr(t,"cssVar",3,"");const i=/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,a=(()=>{const j=(pe.colors?.[t.storeKey]??"").trim(),F=j===""||i.test(j);return{mode:F?"hex":"raw",hex:F?j:"",raw:F?"":j}})();let f=oe(Ae(a.mode)),l=oe(Ae(a.hex)),u=oe(Ae(a.raw));function c(){pe.colors||(pe.colors={});const j=m(u).trim(),F=m(l).trim(),he=m(f)==="raw"?j:F;he===""?delete pe.colors[t.storeKey]:pe.colors[t.storeKey]=he,Wi()}function v(){m(f)==="hex"?(z(f,"raw"),z(l,"")):(z(f,"hex"),z(u,"")),c()}const d=Y(()=>(m(f)==="raw"?m(u):m(l))||r()||"transparent");var _=nl(),p=N(_),g=N(p),h=N(g),S=P(g,2);{var b=j=>{var F=el(),he=N(F);xe(()=>qe(he,s())),H(j,F)};cr(S,j=>{s()&&j(b)})}var A=P(p,2),M=N(A);let ne;var Ne=P(M,2);{var U=j=>{var F=tl(),he=hi(F),wr=P(he,2);xe(()=>{gt(he,"id",t.storeKey),gt(wr,"placeholder",r())}),Xe("input",he,c),xr(he,()=>m(l),mr=>z(l,mr)),Xe("input",wr,c),xr(wr,()=>m(l),mr=>z(l,mr)),H(j,F)},Me=j=>{var F=rl();xe(()=>{gt(F,"id",t.storeKey),gt(F,"placeholder",n())}),Xe("input",F,c),xr(F,()=>m(u),he=>z(u,he)),H(j,F)};cr(Ne,j=>{m(f)==="hex"?j(U):j(Me,-1)})}var Re=P(Ne,2),I=N(Re);xe(()=>{gt(g,"for",t.storeKey),qe(h,t.label),ne=Ft(M,"",ne,{background:m(d)}),qe(I,m(f)==="hex"?"Advanced (oklch / raw)":"Use HEX picker")}),Xe("click",Re,v),H(e,_),ht()}nn(["input","click"]);var sl=B(`

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){ht(t,!0);const r=Dt.defaults?.colors??{},n=o=>o.charAt(0).toUpperCase()+o.slice(1);var s=oa(),i=P(N(s),4);dr(i,21,()=>Object.entries(r.brand??{}),([o,a])=>o,(o,a)=>{var u=X(()=>Dr(b(a),2));let v=()=>b(u)[0],d=()=>b(u)[1];{let c=X(()=>`brand_${v()}`),p=X(()=>n(v())),_=X(()=>r.brand_hex_hints?.[v()]??""),g=X(()=>`--sf-color-${v()}-light`);En(o,{get storeKey(){return b(c)},get label(){return b(p)},get hexHint(){return b(_)},get rawHint(){return d()},get cssVar(){return b(g)}})}});var l=P(i,4);dr(l,21,()=>Object.entries(r.status??{}),([o,a])=>o,(o,a)=>{var u=X(()=>Dr(b(a),2));let v=()=>b(u)[0],d=()=>b(u)[1];{let c=X(()=>`status_${v()}`),p=X(()=>n(v())),_=X(()=>r.status_hex_hints?.[v()]??""),g=X(()=>`--sf-color-${v()}-light`);En(o,{get storeKey(){return b(c)},get label(){return b(p)},get hexHint(){return b(_)},get rawHint(){return d()},get cssVar(){return b(g)}})}}),j(e,s),_t()}var ua=$(`

Not ported yet. The legacy admin page (SLASHED → SLASHED) + straight into the framework as the source of the brand scale.

Status Colors

`);function il(e,t){dt(t,!0);const r=Mt.defaults?.colors??{},n=f=>f.charAt(0).toUpperCase()+f.slice(1);var s=sl(),i=P(N(s),4);vr(i,21,()=>Object.entries(r.brand??{}),([f,l])=>f,(f,l)=>{var u=Y(()=>Mr(m(l),2));let c=()=>m(u)[0],v=()=>m(u)[1];{let d=Y(()=>`brand_${c()}`),_=Y(()=>n(c())),p=Y(()=>r.brand_hex_hints?.[c()]??""),g=Y(()=>`--sf-color-${c()}-light`);yn(f,{get storeKey(){return m(d)},get label(){return m(_)},get hexHint(){return m(p)},get rawHint(){return v()},get cssVar(){return m(g)}})}});var a=P(i,4);vr(a,21,()=>Object.entries(r.status??{}),([f,l])=>f,(f,l)=>{var u=Y(()=>Mr(m(l),2));let c=()=>m(u)[0],v=()=>m(u)[1];{let d=Y(()=>`status_${c()}`),_=Y(()=>n(c())),p=Y(()=>r.status_hex_hints?.[c()]??""),g=Y(()=>`--sf-color-${c()}-light`);yn(f,{get storeKey(){return m(d)},get label(){return m(_)},get hexHint(){return m(p)},get rawHint(){return v()},get cssVar(){return m(g)}})}}),H(e,s),ht()}var ll=B(`

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 ca(e,t){var r=ua(),n=N(r),s=N(n),i=P(n,4),l=P(N(i));l.textContent="Tab.svelte",we(()=>je(s,t.tab)),j(e,r)}var va=$('
'),da=$('

Live preview

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

`);function al(e,t){var r=ll(),n=N(r),s=N(n),i=P(n,4),a=P(N(i));a.textContent="Tab.svelte",xe(()=>qe(s,t.tab)),H(e,r)}var ol=B('
'),fl=B('

Live preview

Primary Action
Generated CSS:
');function ul(e,t){dt(t,!0);const r=["primary","secondary","tertiary","action","neutral","base"],n=Y(()=>{const _=[],p=pe.colors??{};for(const g of r){const h=p[`brand_${g}`];h&&_.push(`--sf-color-${g}-light:${h}`)}for(const g of["success","warning","error","info","danger"]){const h=p[`status_${g}`];h&&_.push(`--sf-color-${g}-light:${h}`)}return _.join(";")}),s=Y(()=>{const _=[],p=pe.colors??{};for(const g of r){const h=p[`brand_${g}`];h&&_.push(`--sf-color-${g}-light: ${h}`)}for(const g of["success","warning","error","info","danger"]){const h=p[`status_${g}`];h&&_.push(`--sf-color-${g}-light: ${h}`)}return _.length===0?"":`.slashed-preview { + ${_.join(`; `)}; -}`});var s=da();Ui("g79qke",c=>{var p=gn(),_=zr(p);{var g=h=>{var E=gn(),w=zr(E);zi(w,()=>``),j(h,E)};$t(_,h=>{b(n)&&h(g)})}j(c,p)});var i=P(N(s),2);dr(i,20,()=>r,c=>c,(c,p)=>{var _=va();let g;var h=N(_);we(()=>{wt(_,"title",p),g=lr(_,"",g,{background:`var(--sf-color-${p}-light, #ddd)`}),je(h,p)}),j(c,_)});var l=P(i,2),o=N(l);lr(o,"",{},{background:"var(--sf-color-primary-light, #4338ca)"});var a=P(o,2);lr(a,"",{},{background:"var(--sf-color-action-light, #0891b2)"});var u=P(l,2),v=P(N(u)),d=N(v);we(()=>je(d,b(n)||"/* (defaults — no overrides set) */")),j(e,s),_t()}async function bs(e,t){const{url:r,nonce:n}=Dt.rest;if(!r)return console.info("[slashed-admin] (dev) would POST",e,t),{ok:!0,dev:!0};const s=await fetch(r+e,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":n},body:JSON.stringify(t)});if(!s.ok){const i=await s.text();throw new Error(i||`HTTP ${s.status}`)}return s.json()}function _a(e,t){return bs("/tokens",{section:e,values:t})}function pa(e){return bs("/tokens/reset",{section:e})}var ga=$(' '),wa=$('Saving…'),ba=$('Saved'),ma=$('Unsaved changes'),ya=$('All changes saved'),Ea=$('
');function Sa(e,t){ht(t,!0);async function r(){if(!A.saving){A.saving=!0,A.error="";try{const w=A.activeTab,T=Te[w]??{},O=await _a(w,T);O&&O.values&&(Te[w]=O.values),A.dirty=!1,A.lastSavedAt=Date.now()}catch(w){A.error=w&&w.message||String(w)}finally{A.saving=!1}}}async function n(){if(!A.saving&&confirm(`Reset the ${Dt.tabs[A.activeTab]??A.activeTab} tab to defaults?`)){A.saving=!0;try{await pa(A.activeTab),ea(A.activeTab),A.dirty=!1,A.lastSavedAt=Date.now()}catch(w){A.error=w&&w.message||String(w)}finally{A.saving=!1}}}let s=fe(!1);es(()=>{if(A.lastSavedAt){z(s,!0);const w=setTimeout(()=>z(s,!1),2e3);return()=>clearTimeout(w)}});var i=Ea();let l;var o=N(i),a=N(o);{var u=w=>{var T=ga(),O=N(T);we(()=>je(O,A.error)),j(w,T)},v=w=>{var T=wa();j(w,T)},d=w=>{var T=ba();j(w,T)},c=w=>{var T=ma();j(w,T)},p=w=>{var T=ya();j(w,T)};$t(a,w=>{A.error?w(u):A.saving?w(v,1):b(s)?w(d,2):A.dirty?w(c,3):w(p,-1)})}var _=P(o,2),g=N(_),h=P(g,2),E=N(h);we(()=>{l=gs(i,1,"bar svelte-1oj49qa",null,l,{dirty:A.dirty}),g.disabled=A.saving,h.disabled=A.saving||!A.dirty,je(E,A.saving?"Saving…":"Save changes")}),Qe("click",g,n),Qe("click",h,r),j(e,i),_t()}sn(["click"]);var ka=$(`

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 Ta(e,t){ht(t,!0),es(()=>{function v(d){A.dirty&&(d.preventDefault(),d.returnValue="")}return window.addEventListener("beforeunload",v),()=>window.removeEventListener("beforeunload",v)});var r=ka(),n=P(N(r),2);na(n,{});var s=P(n,2),i=N(s);{var l=v=>{fa(v,{})},o=v=>{{let d=X(()=>Dt.tabs[A.activeTab]??A.activeTab);ca(v,{get tab(){return b(d)}})}};$t(i,v=>{A.activeTab==="colors"?v(l):v(o,-1)})}var a=P(s,2);ha(a,{});var u=P(a,2);Sa(u,{}),j(e,r),_t()}const Sn=document.getElementById("slashed-admin-app");Sn&&qi(Ta,{target:Sn}); +}`});var i=fl(),a=P(N(i),2);vr(a,20,()=>r,_=>_,(_,p)=>{var g=ol();let h;var S=N(g);xe(()=>{gt(g,"title",p),h=Ft(g,"",h,{background:`var(--sf-color-${p}-light, #ddd)`}),qe(S,p)}),H(_,g)});var f=P(a,2),l=N(f);Ft(l,"",{},{background:"var(--sf-color-primary-light, #4338ca)"});var u=P(l,2);Ft(u,"",{},{background:"var(--sf-color-action-light, #0891b2)"});var c=P(f,2),v=P(N(c)),d=N(v);xe(()=>{Ft(i,m(n)),qe(d,m(s)||"/* (defaults — no overrides set) */")}),H(e,i),ht()}async function hs(e,t){const{url:r,nonce:n}=Mt.rest;if(!r)return console.info("[slashed-admin] (dev) would POST",e,t),{ok:!0,dev:!0};const s=await fetch(r+e,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":n},body:JSON.stringify(t)});if(!s.ok){const i=await s.text();throw new Error(i||`HTTP ${s.status}`)}return s.json()}function cl(e,t){return hs("/tokens",{section:e,values:t})}function vl(e){return hs("/tokens/reset",{section:e})}var dl=B(' '),hl=B('Saving…'),_l=B('Saved'),pl=B('Unsaved changes'),gl=B('All changes saved'),bl=B('
');function wl(e,t){dt(t,!0);async function r(){if(!k.saving){k.saving=!0,k.error="";try{const b=k.activeTab,A=pe[b]??{},M=await cl(b,A);M&&M.values&&(pe[b]=M.values),k.dirty=!1,k.lastSavedAt=Date.now()}catch(b){k.error=b&&b.message||String(b)}finally{k.saving=!1}}}async function n(){if(!k.saving&&confirm(`Reset the ${Mt.tabs[k.activeTab]??k.activeTab} tab to defaults?`)){k.saving=!0,k.error="";try{await vl(k.activeTab),Xi(k.activeTab),k.dirty=!1,k.lastSavedAt=Date.now()}catch(b){k.error=b&&b.message||String(b)}finally{k.saving=!1}}}let s=oe(!1);Jn(()=>{if(k.lastSavedAt){z(s,!0);const b=setTimeout(()=>z(s,!1),2e3);return()=>clearTimeout(b)}});var i=bl();let a;var f=N(i),l=N(f);{var u=b=>{var A=dl(),M=N(A);xe(()=>qe(M,k.error)),H(b,A)},c=b=>{var A=hl();H(b,A)},v=b=>{var A=_l();H(b,A)},d=b=>{var A=pl();H(b,A)},_=b=>{var A=gl();H(b,A)};cr(l,b=>{k.error?b(u):k.saving?b(c,1):m(s)?b(v,2):k.dirty?b(d,3):b(_,-1)})}var p=P(f,2),g=N(p),h=P(g,2),S=N(h);xe(()=>{a=ds(i,1,"bar svelte-1oj49qa",null,a,{dirty:k.dirty}),g.disabled=k.saving,h.disabled=k.saving||!k.dirty,qe(S,k.saving?"Saving…":"Save changes")}),Xe("click",g,n),Xe("click",h,r),H(e,i),ht()}nn(["click"]);var ml=B(`

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 yl(e,t){dt(t,!0),Jn(()=>{function c(v){k.dirty&&(v.preventDefault(),v.returnValue="")}return window.addEventListener("beforeunload",c),()=>window.removeEventListener("beforeunload",c)});var r=ml(),n=P(N(r),2);Zi(n,{});var s=P(n,2),i=N(s);{var a=c=>{il(c,{})},f=c=>{{let v=Y(()=>Mt.tabs[k.activeTab]??k.activeTab);al(c,{get tab(){return m(v)}})}};cr(i,c=>{k.activeTab==="colors"?c(a):c(f,-1)})}var l=P(s,2);ul(l,{});var u=P(l,2);wl(u,{}),H(e,r),ht()}const En=document.getElementById("slashed-admin-app");En&&Pi(yl,{target:En}); //# sourceMappingURL=app.js.map From 7d0c8a4286c966882cef9d55a2187eaff8a640f9 Mon Sep 17 00:00:00 2001 From: Kiro Agent <244629292+kiro-agent@users.noreply.github.com> Date: Mon, 25 May 2026 23:57:24 +0000 Subject: [PATCH 2/8] chore: mark FEAT-001 as completed --- .../features/FEAT-001.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-001.json b/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-001.json index 0f1cd049..9bcf217f 100644 --- a/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-001.json +++ b/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-001.json @@ -2,7 +2,7 @@ "id": "FEAT-001", "type": "chore", "description": "Install dependencies and verify the admin-app builds successfully as-is before making changes.", - "status": "in_progress", + "status": "completed", "steps": [ "Run `npm install` in integrations/bricks/admin-app/", "Run `npm run build` in integrations/bricks/admin-app/ and confirm it exits 0", @@ -17,5 +17,5 @@ "Run `cd integrations/bricks/admin-app && npm run build` and confirm exit code 0" ], "blocked_reason": null, - "findings": "" + "findings": "Build succeeds with exit 0. npm install added 90 packages. Compiled output differs slightly from checked-in version due to minification variable naming, which is expected with Svelte/Vite rebuilds." } From 3eb694fa4366f428390956ba507371cfa07909c5 Mon Sep 17 00:00:00 2001 From: Kiro Agent <244629292+kiro-agent@users.noreply.github.com> Date: Tue, 26 May 2026 00:01:03 +0000 Subject: [PATCH 3/8] feat: expand admin SPA with Variables, Classes, Bundle, and Hooks tabs - Create VariablesTab.svelte: read-only view of all --sf-* variables grouped by category (mirrors class-inventory.php categorization logic) - Create ClassesTab.svelte: collapsible lists of .sf-* and .is-* classes - Create BundleTab.svelte: bundle info + html_font_size plugin setting with independent save button calling POST /settings - Create HooksTab.svelte: static reference for all 7 filter hooks with descriptions and PHP code examples - Update stores.svelte.js: expose inventory and pluginSettings from bootstrap - Update api.js: add saveSettings() function - Update App.svelte: route new tab slugs to their components - Update class-admin-page.php: register variables/classes/bundle/hooks tabs - Update class-admin-page-svelte.php: pass inventory data to SPA hydration - Update index.html dev harness: include mock inventory data and new tabs --- .../features/FEAT-002.json | 2 +- integrations/bricks/admin-app/index.html | 31 +++ integrations/bricks/admin-app/src/App.svelte | 12 ++ .../admin-app/src/components/BundleTab.svelte | 136 +++++++++++++ .../src/components/ClassesTab.svelte | 117 +++++++++++ .../admin-app/src/components/HooksTab.svelte | 154 ++++++++++++++ .../src/components/VariablesTab.svelte | 189 ++++++++++++++++++ integrations/bricks/admin-app/src/lib/api.js | 8 + .../bricks/admin-app/src/lib/stores.svelte.js | 4 +- integrations/bricks/assets/admin-app/app.css | 2 +- integrations/bricks/assets/admin-app/app.js | 47 ++++- .../includes/class-admin-page-svelte.php | 1 + .../bricks/includes/class-admin-page.php | 4 + 13 files changed, 697 insertions(+), 10 deletions(-) create mode 100644 integrations/bricks/admin-app/src/components/BundleTab.svelte create mode 100644 integrations/bricks/admin-app/src/components/ClassesTab.svelte create mode 100644 integrations/bricks/admin-app/src/components/HooksTab.svelte create mode 100644 integrations/bricks/admin-app/src/components/VariablesTab.svelte diff --git a/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-002.json b/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-002.json index f88617c0..b9845152 100644 --- a/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-002.json +++ b/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-002.json @@ -2,7 +2,7 @@ "id": "FEAT-002", "type": "feat", "description": "Expand the Svelte admin panel to cover the entire public API by replacing stub tabs with real content tabs for Variables, Classes, Bundle/Settings, and Hooks, plus improving the existing ColorTab.", - "status": "pending", + "status": "in_progress", "steps": [ "Step 1 - Create VariablesTab.svelte in src/components/. This tab reads all variables from the inventory (window.slashedBricksApp already provides defaults which contain variable categories from class-inventory.php). For the Svelte SPA, we need to add inventory data to the hydration payload. Since PHP is not available, we will embed a static cheatsheet data module (see FEAT-003). For now, this tab should display all registered variables grouped by their category (Colors, Typography, Spacing, Sizing, Layout, Borders, Radius, Shadows, Effects, Motion, Icons, Z-Index, States, Focus, Scroll, Print, Misc) using the same categorization logic from class-inventory.php. Each category is a collapsible section showing the variable names. This is a read-only view, not an editor.", "Step 2 - Create ClassesTab.svelte in src/components/. This tab shows all .sf-* layout/utility classes and .is-* state classes in two separate sections. Each class is listed with its name. The data comes from the same static inventory data module.", diff --git a/integrations/bricks/admin-app/index.html b/integrations/bricks/admin-app/index.html index 21e92d58..d9357785 100644 --- a/integrations/bricks/admin-app/index.html +++ b/integrations/bricks/admin-app/index.html @@ -55,6 +55,37 @@ colors: 'Colors', contrast: 'Contrast', typography: 'Typography', + spacing: 'Spacing', + radius: 'Radius', + shadows: 'Shadows', + motion: 'Motion', + zindex: 'Z-Index', + variables: 'Variables', + classes: 'Classes', + bundle: 'Bundle', + hooks: 'Hooks', + }, + inventory: { + variables: [ + '--sf-color-primary-light', '--sf-color-secondary-light', + '--sf-font-body', '--sf-font-heading', '--sf-text-base', + '--sf-space-s', '--sf-space-m', '--sf-space-l', + '--sf-size-touch-min', '--sf-container-max', + '--sf-border-style', '--sf-radius-m', '--sf-shadow-m', + '--sf-blur-m', '--sf-duration-fast', '--sf-ease-out', + '--sf-icon-size', '--sf-z-modal', '--sf-focus-ring-width', + '--sf-scroll-margin', '--sf-print-margin', + ], + sf_classes: [ + 'sf-stack', 'sf-cluster', 'sf-sidebar', 'sf-switcher', + 'sf-grid', 'sf-cover', 'sf-frame', 'sf-reel', 'sf-container', + ], + is_classes: [ + 'is-active', 'is-open', 'is-hidden', 'is-loading', 'is-disabled', + ], + }, + pluginSettings: { + html_font_size: '', }, }; diff --git a/integrations/bricks/admin-app/src/App.svelte b/integrations/bricks/admin-app/src/App.svelte index ddfd2a78..f0efdf85 100644 --- a/integrations/bricks/admin-app/src/App.svelte +++ b/integrations/bricks/admin-app/src/App.svelte @@ -10,6 +10,10 @@ import { meta, ui } from './lib/stores.svelte.js'; import TabNav from './components/TabNav.svelte'; import ColorTab from './components/ColorTab.svelte'; + import VariablesTab from './components/VariablesTab.svelte'; + import ClassesTab from './components/ClassesTab.svelte'; + import BundleTab from './components/BundleTab.svelte'; + import HooksTab from './components/HooksTab.svelte'; import StubTab from './components/StubTab.svelte'; import LivePreview from './components/LivePreview.svelte'; import SaveBar from './components/SaveBar.svelte'; @@ -53,6 +57,14 @@
{#if ui.activeTab === 'colors'} + {:else if ui.activeTab === 'variables'} + + {:else if ui.activeTab === 'classes'} + + {:else if ui.activeTab === 'bundle'} + + {:else if ui.activeTab === 'hooks'} + {:else} {/if} diff --git a/integrations/bricks/admin-app/src/components/BundleTab.svelte b/integrations/bricks/admin-app/src/components/BundleTab.svelte new file mode 100644 index 00000000..b0ccf2f7 --- /dev/null +++ b/integrations/bricks/admin-app/src/components/BundleTab.svelte @@ -0,0 +1,136 @@ + + +
+

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
+
{meta.inventory?.variables?.length ?? 0}
+
Classes registered
+
{(meta.inventory?.sf_classes?.length ?? 0) + (meta.inventory?.is_classes?.length ?? 0)}
+
+ +

Plugin Settings

+ +
+ + +

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

+
+ +
+ + {#if saved} + Saved + {/if} + {#if error} + {error} + {/if} +
+
+ + diff --git a/integrations/bricks/admin-app/src/components/ClassesTab.svelte b/integrations/bricks/admin-app/src/components/ClassesTab.svelte new file mode 100644 index 00000000..81a3c1ea --- /dev/null +++ b/integrations/bricks/admin-app/src/components/ClassesTab.svelte @@ -0,0 +1,117 @@ + + +
+

Registered Classes ({sfClasses.length + isClasses.length})

+

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

+ +
+ + + {#if sfExpanded} +
    + {#each sfClasses as cls (cls)} +
  • .{cls}
  • + {/each} +
+ {/if} +
+ +
+ + + {#if isExpanded} +
    + {#each isClasses as cls (cls)} +
  • .{cls}
  • + {/each} +
+ {/if} +
+
+ + diff --git a/integrations/bricks/admin-app/src/components/HooksTab.svelte b/integrations/bricks/admin-app/src/components/HooksTab.svelte new file mode 100644 index 00000000..db1e4375 --- /dev/null +++ b/integrations/bricks/admin-app/src/components/HooksTab.svelte @@ -0,0 +1,154 @@ + + +
+

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. +

+ + {#each hooks as hook (hook.name)} +
+

{hook.name}

+

{hook.description}

+

Parameters: {hook.params}

+
{hook.example}
+
+ {/each} +
+ + diff --git a/integrations/bricks/admin-app/src/components/VariablesTab.svelte b/integrations/bricks/admin-app/src/components/VariablesTab.svelte new file mode 100644 index 00000000..8b7fa791 --- /dev/null +++ b/integrations/bricks/admin-app/src/components/VariablesTab.svelte @@ -0,0 +1,189 @@ + + +
+

CSS Variables ({variables.length})

+

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

+ + {#each groups as { category, items } (category)} +
+ + + {#if expanded[category]} +
    + {#each items as varName (varName)} +
  • {varName}
  • + {/each} +
+ {/if} +
+ {/each} +
+ + diff --git a/integrations/bricks/admin-app/src/lib/api.js b/integrations/bricks/admin-app/src/lib/api.js index 596cda3e..b7a7da76 100644 --- a/integrations/bricks/admin-app/src/lib/api.js +++ b/integrations/bricks/admin-app/src/lib/api.js @@ -67,3 +67,11 @@ export function saveSection(section, values) { export function resetSection(section) { return call('/tokens/reset', { section }); } + +/** + * Persist plugin-level settings (e.g. html_font_size). PHP validates + * values against an allow-list and stores them in their own wp_option. + */ +export function saveSettings(settings) { + return call('/settings', settings); +} diff --git a/integrations/bricks/admin-app/src/lib/stores.svelte.js b/integrations/bricks/admin-app/src/lib/stores.svelte.js index 7c04d7c2..5ca5fa52 100644 --- a/integrations/bricks/admin-app/src/lib/stores.svelte.js +++ b/integrations/bricks/admin-app/src/lib/stores.svelte.js @@ -21,11 +21,13 @@ const bootstrap = typeof window !== 'undefined' && window.slashedBricksApp ? window.slashedBricksApp : { defaults: {}, settings: {}, tabs: {}, rest: { url: '', nonce: '' } }; -/** Read-only metadata: factory defaults, available tabs, REST handshake. */ +/** Read-only metadata: factory defaults, available tabs, REST handshake, inventory, plugin settings. */ export const meta = { defaults: bootstrap.defaults || {}, tabs: bootstrap.tabs || {}, rest: bootstrap.rest || { url: '', nonce: '' }, + inventory: bootstrap.inventory || { variables: [], sf_classes: [], is_classes: [] }, + pluginSettings: bootstrap.pluginSettings || {}, }; /** Reactive token state. Mutating any nested key triggers re-renders. */ diff --git a/integrations/bricks/assets/admin-app/app.css b/integrations/bricks/assets/admin-app/app.css index 2d8f9fab..f0b0bfba 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}.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__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}.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 ab2bdd9e..1e6a7c0f 100644 --- a/integrations/bricks/assets/admin-app/app.js +++ b/integrations/bricks/assets/admin-app/app.js @@ -1,12 +1,45 @@ -var _s=Object.defineProperty;var sn=e=>{throw TypeError(e)};var ps=(e,t,r)=>t in e?_s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var W=(e,t,r)=>ps(e,typeof t!="symbol"?t+"":t,r),yr=(e,t,r)=>t.has(e)||sn("Cannot "+r);var o=(e,t,r)=>(yr(e,t,"read from private field"),r?r.call(e):t.get(e)),y=(e,t,r)=>t.has(e)?sn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),w=(e,t,r,n)=>(yr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),C=(e,t,r)=>(yr(e,t,"access private method"),r);var kn=Array.isArray,gs=Array.prototype.indexOf,nt=Array.prototype.includes,pr=Array.from,bs=Object.defineProperty,qt=Object.getOwnPropertyDescriptor,ws=Object.getOwnPropertyDescriptors,ms=Object.prototype,ys=Array.prototype,Tn=Object.getPrototypeOf,ln=Object.isExtensible;const Es=()=>{};function Ss(e){for(var t=0;t{e=n,t=s});return{promise:r,resolve:e,reject:t}}function Mr(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const r=[];for(const n of e)if(r.push(n),r.length===t)break;return r}const $=2,Ht=4,gr=8,xn=1<<24,ge=16,ye=32,ze=64,Rr=128,ue=512,L=1024,V=2048,Ce=4096,G=8192,me=16384,vt=32768,an=1<<25,At=65536,lr=1<<17,ks=1<<18,Nt=1<<19,Ts=1<<20,Te=1<<25,ft=65536,ar=1<<21,wt=1<<22,Be=1<<23,Er=Symbol("$state"),As=Symbol(""),Qt=Symbol("attributes"),Dr=Symbol("class"),Pr=Symbol("style"),Dt=Symbol("text"),Zt=Symbol("form reset"),br=new class extends Error{constructor(){super(...arguments);W(this,"name","StaleReactionError");W(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function xs(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Cs(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Os(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ns(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ms(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Rs(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ds(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ps(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function js(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Fs(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const qs=1,Ls=2,Cn=4,Is=8,Hs=16,Vs=1,$s=2,q=Symbol("uninitialized"),On="http://www.w3.org/1999/xhtml";function Bs(){console.warn("https://svelte.dev/e/derived_inert")}function zs(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Nn(e){return e===this.v}function Us(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Mn(e){return!Us(e,this.v)}let ve=null;function xt(e){ve=e}function dt(e,t=!1,r){ve={p:ve,i:!1,c:null,e:null,s:e,x:null,r:x,l:null}}function ht(e){var t=ve,r=t.e;if(r!==null){t.e=null;for(var n of r)Qn(n)}return t.i=!0,ve=t.p,{}}function Rn(){return!0}let Ye=[];function Dn(){var e=Ye;Ye=[],Ss(e)}function st(e){if(Ye.length===0&&!Lt){var t=Ye;queueMicrotask(()=>{t===Ye&&Dn()})}Ye.push(e)}function Ks(){for(;Ye.length>0;)Dn()}function Pn(e){var t=x;if(t===null)return T.f|=Be,e;if((t.f&vt)===0&&(t.f&Ht)===0)throw e;$e(e,t)}function $e(e,t){for(;t!==null;){if((t.f&Rr)!==0){if((t.f&vt)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}const Ys=-7169;function R(e,t){e.f=e.f&Ys|t}function Kr(e){(e.f&ue)!==0||e.deps===null?R(e,L):R(e,Ce)}function jn(e){if(e!==null)for(const t of e)(t.f&$)===0||(t.f&ft)===0||(t.f^=ft,jn(t.deps))}function Fn(e,t,r){(e.f&V)!==0?t.add(e):(e.f&Ce)!==0&&r.add(e),jn(e.deps),R(e,L)}let Sr=null,_t=null,E=null,jr=null,be=null,Fr=null,Lt=!1,kr=!1,bt=null,er=null;var on=0;let Gs=1;var mt,Ie,Je,yt,Et,Qe,St,Pe,$t,ee,Bt,He,Ee,Se,kt,Ze,O,qr,Pt,Lr,qn,Ln,tr,Ws,Ir,pt;const dr=class dr{constructor(){y(this,O);W(this,"id",Gs++);y(this,mt,!1);W(this,"linked",!0);y(this,Ie,null);y(this,Je,null);W(this,"async_deriveds",new Map);W(this,"current",new Map);W(this,"previous",new Map);W(this,"unblocked",new Set);y(this,yt,new Set);y(this,Et,new Set);y(this,Qe,new Set);y(this,St,0);y(this,Pe,new Map);y(this,$t,null);y(this,ee,[]);y(this,Bt,[]);y(this,He,new Set);y(this,Ee,new Set);y(this,Se,new Map);y(this,kt,new Set);W(this,"is_fork",!1);y(this,Ze,!1)}skip_effect(t){o(this,Se).has(t)||o(this,Se).set(t,{d:[],m:[]}),o(this,kt).delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=o(this,Se).get(t);if(n){o(this,Se).delete(t);for(var s of n.d)R(s,V),r(s);for(s of n.m)R(s,Ce),r(s)}o(this,kt).add(t)}capture(t,r,n=!1){t.v!==q&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&Be)===0&&(this.current.set(t,[r,n]),be?.set(t,r)),this.is_fork||(t.v=r)}activate(){E=this}deactivate(){E=null,be=null}flush(){try{kr=!0,E=this,C(this,O,Pt).call(this)}finally{on=0,Fr=null,bt=null,er=null,kr=!1,E=null,be=null,it.clear()}}discard(){for(const t of o(this,Et))t(this);o(this,Et).clear(),o(this,Qe).clear(),C(this,O,pt).call(this)}register_created_effect(t){o(this,Bt).push(t)}increment(t,r){if(w(this,St,o(this,St)+1),t){let n=o(this,Pe).get(r)??0;o(this,Pe).set(r,n+1)}}decrement(t,r){if(w(this,St,o(this,St)-1),t){let n=o(this,Pe).get(r)??0;n===1?o(this,Pe).delete(r):o(this,Pe).set(r,n-1)}o(this,Ze)||(w(this,Ze,!0),st(()=>{w(this,Ze,!1),this.linked&&this.flush()}))}transfer_effects(t,r){for(const n of t)o(this,He).add(n);for(const n of r)o(this,Ee).add(n);t.clear(),r.clear()}oncommit(t){o(this,yt).add(t)}ondiscard(t){o(this,Et).add(t)}on_fork_commit(t){o(this,Qe).add(t)}run_fork_commit_callbacks(){for(const t of o(this,Qe))t(this);o(this,Qe).clear()}settled(){return(o(this,$t)??w(this,$t,An())).promise}static ensure(){var t;if(E===null){const r=E=new dr;C(t=r,O,Ir).call(t),!kr&&!Lt&&st(()=>{o(r,mt)||r.flush()})}return E}apply(){{be=null;return}}schedule(t){if(Fr=t,t.b?.is_pending&&(t.f&(Ht|gr|xn))!==0&&(t.f&vt)===0){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var n=r.f;if(bt!==null&&r===x&&(T===null||(T.f&$)===0))return;if((n&(ze|ye))!==0){if((n&L)===0)return;r.f^=L}}o(this,ee).push(r)}};mt=new WeakMap,Ie=new WeakMap,Je=new WeakMap,yt=new WeakMap,Et=new WeakMap,Qe=new WeakMap,St=new WeakMap,Pe=new WeakMap,$t=new WeakMap,ee=new WeakMap,Bt=new WeakMap,He=new WeakMap,Ee=new WeakMap,Se=new WeakMap,kt=new WeakMap,Ze=new WeakMap,O=new WeakSet,qr=function(){if(this.is_fork)return!0;for(const n of o(this,Pe).keys()){for(var t=n,r=!1;t.parent!==null;){if(o(this,Se).has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1},Pt=function(){var l,u,c;if(w(this,mt,!0),on++>1e3&&(C(this,O,pt).call(this),Js()),!C(this,O,qr).call(this)){for(const v of o(this,He))o(this,Ee).delete(v),R(v,V),this.schedule(v);for(const v of o(this,Ee))R(v,Ce),this.schedule(v)}const t=o(this,ee);w(this,ee,[]),this.apply();var r=bt=[],n=[],s=er=[];for(const v of t)try{C(this,O,Lr).call(this,v,r,n)}catch(d){throw Vn(v),d}if(E=null,s.length>0){var i=dr.ensure();for(const v of s)i.schedule(v)}if(bt=null,er=null,C(this,O,qr).call(this)){C(this,O,tr).call(this,n),C(this,O,tr).call(this,r);for(const[v,d]of o(this,Se))Hn(v,d);s.length>0&&C(l=E,O,Pt).call(l);return}const a=C(this,O,qn).call(this);if(a){C(u=a,O,Ln).call(u,this);return}o(this,He).clear(),o(this,Ee).clear();for(const v of o(this,yt))v(this);o(this,yt).clear(),jr=this,fn(n),fn(r),jr=null,o(this,$t)?.resolve();var f=E;if(this.linked&&o(this,St)===0&&C(this,O,pt).call(this),o(this,ee).length>0){f===null&&(f=this,C(this,O,Ir).call(this));const v=f;o(v,ee).push(...o(this,ee).filter(d=>!o(v,ee).includes(d)))}f!==null&&C(c=f,O,Pt).call(c)},Lr=function(t,r,n){t.f^=L;for(var s=t.first;s!==null;){var i=s.f,a=(i&(ye|ze))!==0,f=a&&(i&L)!==0,l=f||(i&G)!==0||o(this,Se).has(s);if(!l&&s.fn!==null){a?s.f^=L:(i&Ht)!==0?r.push(s):Wt(s)&&((i&ge)!==0&&o(this,Ee).add(s),Ot(s));var u=s.first;if(u!==null){s=u;continue}}for(;s!==null;){var c=s.next;if(c!==null){s=c;break}s=s.parent}}},qn=function(){for(var t=o(this,Ie);t!==null;){if(!t.is_fork){for(const[r,[,n]]of this.current)if(t.current.has(r)&&!n)return t}t=o(t,Ie)}return null},Ln=function(t){var n;for(const[s,i]of t.current)!this.previous.has(s)&&t.previous.has(s)&&this.previous.set(s,t.previous.get(s)),this.current.set(s,i);for(const[s,i]of t.async_deriveds){const a=this.async_deriveds.get(s);a&&i.promise.then(a.resolve)}const r=s=>{var i=s.reactions;if(i!==null)for(const l of i){var a=l.f;if((a&$)!==0)r(l);else{var f=l;a&(wt|ge)&&!this.async_deriveds.has(f)&&(o(this,Ee).delete(f),R(f,V),this.schedule(f))}}};for(const s of this.current.keys())r(s);this.oncommit(()=>t.discard()),C(n=t,O,pt).call(n),E=this,C(this,O,Pt).call(this)},tr=function(t){for(var r=0;r!this.current.has(d));if(s.length===0)t&&v.discard();else if(r.length>0){if(t)for(const d of o(this,kt))v.unskip_effect(d,_=>{var p;(_.f&(ge|wt))!==0?v.schedule(_):C(p=v,O,tr).call(p,[_])});v.activate();var i=new Set,a=new Map;for(var f of r)In(f,s,i,a);a=new Map;var l=[...v.current.keys()].filter(d=>this.current.has(d)?this.current.get(d)[0]!==d.v:!0);if(l.length>0)for(const d of o(this,Bt))(d.f&(me|G|lr))===0&&Yr(d,l,a)&&((d.f&(wt|ge))!==0?(R(d,V),v.schedule(d)):o(v,He).add(d));if(o(v,ee).length>0&&!o(v,Ze)){v.apply();for(var u of o(v,ee))C(c=v,O,Lr).call(c,u,[],[]);w(v,ee,[])}v.deactivate()}}}},Ir=function(){_t===null?Sr=_t=this:(w(_t,Je,this),w(this,Ie,_t)),_t=this},pt=function(){var t=o(this,Ie),r=o(this,Je);t===null?Sr=r:w(t,Je,r),r===null?_t=t:w(r,Ie,t),this.linked=!1};let ut=dr;function Xs(e){var t=Lt;Lt=!0;try{for(var r;;){if(Ks(),E===null)return r;E.flush()}}finally{Lt=t}}function Js(){try{Rs()}catch(e){$e(e,Fr)}}let De=null;function fn(e){var t=e.length;if(t!==0){for(var r=0;r0)){it.clear();for(const s of De){if((s.f&(me|G))!==0)continue;const i=[s];let a=s.parent;for(;a!==null;)De.has(a)&&(De.delete(a),i.push(a)),a=a.parent;for(let f=i.length-1;f>=0;f--){const l=i[f];(l.f&(me|G))===0&&Ot(l)}}De.clear()}}De=null}}function In(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const s of e.reactions){const i=s.f;(i&$)!==0?In(s,t,r,n):(i&(wt|ge))!==0&&(i&V)===0&&Yr(s,t,n)&&(R(s,V),Gr(s))}}function Yr(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const s of e.deps){if(nt.call(t,s))return!0;if((s.f&$)!==0&&Yr(s,t,r))return r.set(s,!0),!0}return r.set(e,!1),!1}function Gr(e){E.schedule(e)}function Hn(e,t){if(!((e.f&ye)!==0&&(e.f&L)!==0)){(e.f&V)!==0?t.d.push(e):(e.f&Ce)!==0&&t.m.push(e),R(e,L);for(var r=e.first;r!==null;)Hn(r,t),r=r.next}}function Vn(e){R(e,L);for(var t=e.first;t!==null;)Vn(t),t=t.next}function Qs(e){let t=0,r=ct(0),n;return()=>{Qr()&&(m(r),Zn(()=>(t===0&&(n=cs(()=>e(()=>It(r)))),t+=1,()=>{st(()=>{t-=1,t===0&&(n?.(),n=void 0,It(r))})})))}}var Zs=At|Nt;function ei(e,t,r,n){new ti(e,t,r,n)}var ie,Ur,le,et,X,ae,K,te,je,tt,Ve,Tt,zt,Ut,Fe,hr,D,ri,ni,si,Hr,rr,nr,Vr,$r;class ti{constructor(t,r,n,s){y(this,D);W(this,"parent");W(this,"is_pending",!1);W(this,"transform_error");y(this,ie);y(this,Ur,null);y(this,le);y(this,et);y(this,X);y(this,ae,null);y(this,K,null);y(this,te,null);y(this,je,null);y(this,tt,0);y(this,Ve,0);y(this,Tt,!1);y(this,zt,new Set);y(this,Ut,new Set);y(this,Fe,null);y(this,hr,Qs(()=>(w(this,Fe,ct(o(this,tt))),()=>{w(this,Fe,null)})));w(this,ie,t),w(this,le,r),w(this,et,i=>{var a=x;a.b=this,a.f|=Rr,n(i)}),this.parent=x.b,this.transform_error=s??this.parent?.transform_error??(i=>i),w(this,X,Zr(()=>{C(this,D,Hr).call(this)},Zs))}defer_effect(t){Fn(t,o(this,zt),o(this,Ut))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!o(this,le).pending}update_pending_count(t,r){C(this,D,Vr).call(this,t,r),w(this,tt,o(this,tt)+t),!(!o(this,Fe)||o(this,Tt))&&(w(this,Tt,!0),st(()=>{w(this,Tt,!1),o(this,Fe)&&Ct(o(this,Fe),o(this,tt))}))}get_effect_pending(){return o(this,hr).call(this),m(o(this,Fe))}error(t){if(!o(this,le).onerror&&!o(this,le).failed)throw t;E?.is_fork?(o(this,ae)&&E.skip_effect(o(this,ae)),o(this,K)&&E.skip_effect(o(this,K)),o(this,te)&&E.skip_effect(o(this,te)),E.on_fork_commit(()=>{C(this,D,$r).call(this,t)})):C(this,D,$r).call(this,t)}}ie=new WeakMap,Ur=new WeakMap,le=new WeakMap,et=new WeakMap,X=new WeakMap,ae=new WeakMap,K=new WeakMap,te=new WeakMap,je=new WeakMap,tt=new WeakMap,Ve=new WeakMap,Tt=new WeakMap,zt=new WeakMap,Ut=new WeakMap,Fe=new WeakMap,hr=new WeakMap,D=new WeakSet,ri=function(){try{w(this,ae,fe(()=>o(this,et).call(this,o(this,ie))))}catch(t){this.error(t)}},ni=function(t){const r=o(this,le).failed;r&&w(this,te,fe(()=>{r(o(this,ie),()=>t,()=>()=>{})}))},si=function(){const t=o(this,le).pending;t&&(this.is_pending=!0,w(this,K,fe(()=>t(o(this,ie)))),st(()=>{var r=w(this,je,document.createDocumentFragment()),n=lt();r.append(n),w(this,ae,C(this,D,nr).call(this,()=>fe(()=>o(this,et).call(this,n)))),o(this,Ve)===0&&(o(this,ie).before(r),w(this,je,null),at(o(this,K),()=>{w(this,K,null)}),C(this,D,rr).call(this,E))}))},Hr=function(){try{if(this.is_pending=this.has_pending_snippet(),w(this,Ve,0),w(this,tt,0),w(this,ae,fe(()=>{o(this,et).call(this,o(this,ie))})),o(this,Ve)>0){var t=w(this,je,document.createDocumentFragment());rn(o(this,ae),t);const r=o(this,le).pending;w(this,K,fe(()=>r(o(this,ie))))}else C(this,D,rr).call(this,E)}catch(r){this.error(r)}},rr=function(t){this.is_pending=!1,t.transfer_effects(o(this,zt),o(this,Ut))},nr=function(t){var r=x,n=T,s=ve;Oe(o(this,X)),de(o(this,X)),xt(o(this,X).ctx);try{return ut.ensure(),t()}catch(i){return Pn(i),null}finally{Oe(r),de(n),xt(s)}},Vr=function(t,r){var n;if(!this.has_pending_snippet()){this.parent&&C(n=this.parent,D,Vr).call(n,t,r);return}w(this,Ve,o(this,Ve)+t),o(this,Ve)===0&&(C(this,D,rr).call(this,r),o(this,K)&&at(o(this,K),()=>{w(this,K,null)}),o(this,je)&&(o(this,ie).before(o(this,je)),w(this,je,null)))},$r=function(t){o(this,ae)&&(Q(o(this,ae)),w(this,ae,null)),o(this,K)&&(Q(o(this,K)),w(this,K,null)),o(this,te)&&(Q(o(this,te)),w(this,te,null));var r=o(this,le).onerror;let n=o(this,le).failed;var s=!1,i=!1;const a=()=>{if(s){zs();return}s=!0,i&&Fs(),o(this,te)!==null&&at(o(this,te),()=>{w(this,te,null)}),C(this,D,nr).call(this,()=>{C(this,D,Hr).call(this)})},f=l=>{try{i=!0,r?.(l,a),i=!1}catch(u){$e(u,o(this,X)&&o(this,X).parent)}n&&w(this,te,C(this,D,nr).call(this,()=>{try{return fe(()=>{var u=x;u.b=this,u.f|=Rr,n(o(this,ie),()=>l,()=>a)})}catch(u){return $e(u,o(this,X).parent),null}}))};st(()=>{var l;try{l=this.transform_error(t)}catch(u){$e(u,o(this,X)&&o(this,X).parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(f,u=>$e(u,o(this,X)&&o(this,X).parent)):f(l)})};function ii(e,t,r,n){const s=Wr;var i=e.filter(d=>!d.settled);if(r.length===0&&i.length===0){n(t.map(s));return}var a=x,f=li(),l=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(d=>d.promise)):null;function u(d){if((a.f&me)===0){f();try{n(d)}catch(_){$e(_,a)}or()}}var c=$n();if(r.length===0){l.then(()=>u(t.map(s))).finally(c);return}function v(){Promise.all(r.map(d=>ai(d))).then(d=>u([...t.map(s),...d])).catch(d=>$e(d,a)).finally(c)}l?l.then(()=>{f(),v(),or()}):v()}function li(){var e=x,t=T,r=ve,n=E;return function(i=!0){Oe(e),de(t),xt(r),i&&(e.f&me)===0&&(n?.activate(),n?.apply())}}function or(e=!0){Oe(null),de(null),xt(null),e&&E?.deactivate()}function $n(){var e=x,t=e.b,r=E,n=t.is_rendered();return t.update_pending_count(1,r),r.increment(n,e),()=>{t.update_pending_count(-1,r),r.decrement(n,e)}}function Wr(e){var t=$|V;return x!==null&&(x.f|=Nt),{ctx:ve,deps:null,effects:null,equals:Nn,f:t,fn:e,reactions:null,rv:0,v:q,wv:0,parent:x,ac:null}}const Xt=Symbol("obsolete");function ai(e,t,r){let n=x;n===null&&xs();var s=void 0,i=ct(q),a=!T,f=new Set;return Si(()=>{var l=x,u=An();s=u.promise;try{Promise.resolve(e()).then(u.resolve,_=>{_!==br&&u.reject(_)}).finally(or)}catch(_){u.reject(_),or()}var c=E;if(a){if((l.f&vt)!==0)var v=$n();if(n.b.is_rendered())c.async_deriveds.get(l)?.reject(Xt);else for(const _ of f.values())_.reject(Xt);f.add(u),c.async_deriveds.set(l,u)}const d=(_,p=void 0)=>{v?.(),f.delete(u),p!==Xt&&(c.activate(),p?(i.f|=Be,Ct(i,p)):((i.f&Be)!==0&&(i.f^=Be),Ct(i,_)),c.deactivate())};u.promise.then(d,_=>d(null,_||"unknown"))}),yi(()=>{for(const l of f)l.reject(Xt)}),new Promise(l=>{function u(c){function v(){c===s?l(i):u(s)}c.then(v,v)}u(s)})}function Y(e){const t=Wr(e);return ss(t),t}function oi(e){const t=Wr(e);return t.equals=Mn,t}function fi(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r0&&!Un&&vi()}return t}function vi(){Un=!1;for(const e of fr){(e.f&L)!==0&&R(e,Ce);let t;try{t=Wt(e)}catch{t=!0}t&&Ot(e)}fr.clear()}function It(e){z(e,e.v+1)}function Kn(e,t,r){var n=e.reactions;if(n!==null)for(var s=n.length,i=0;i{if(ot===i)return f();var l=T,u=ot;de(null),dn(i);var c=f();return de(l),dn(u),c};return n&&r.set("length",oe(e.length)),new Proxy(e,{defineProperty(f,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Ds();var c=r.get(l);return c===void 0?a(()=>{var v=oe(u.value);return r.set(l,v),v}):z(c,u.value,!0),!0},deleteProperty(f,l){var u=r.get(l);if(u===void 0){if(l in f){const c=a(()=>oe(q));r.set(l,c),It(s)}}else z(u,q),It(s);return!0},get(f,l,u){if(l===Er)return e;var c=r.get(l),v=l in f;if(c===void 0&&(!v||qt(f,l)?.writable)&&(c=a(()=>{var _=Ae(v?f[l]:q),p=oe(_);return p}),r.set(l,c)),c!==void 0){var d=m(c);return d===q?void 0:d}return Reflect.get(f,l,u)},getOwnPropertyDescriptor(f,l){var u=Reflect.getOwnPropertyDescriptor(f,l);if(u&&"value"in u){var c=r.get(l);c&&(u.value=m(c))}else if(u===void 0){var v=r.get(l),d=v?.v;if(v!==void 0&&d!==q)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return u},has(f,l){if(l===Er)return!0;var u=r.get(l),c=u!==void 0&&u.v!==q||Reflect.has(f,l);if(u!==void 0||x!==null&&(!c||qt(f,l)?.writable)){u===void 0&&(u=a(()=>{var d=c?Ae(f[l]):q,_=oe(d);return _}),r.set(l,u));var v=m(u);if(v===q)return!1}return c},set(f,l,u,c){var v=r.get(l),d=l in f;if(n&&l==="length")for(var _=u;_oe(q)),r.set(_+"",p))}if(v===void 0)(!d||qt(f,l)?.writable)&&(v=a(()=>oe(void 0)),z(v,Ae(u)),r.set(l,v));else{d=v.v!==q;var g=a(()=>Ae(u));z(v,g)}var h=Reflect.getOwnPropertyDescriptor(f,l);if(h?.set&&h.set.call(c,u),!d){if(n&&typeof l=="string"){var S=r.get("length"),b=Number(l);Number.isInteger(b)&&b>=S.v&&z(S,b+1)}It(s)}return!0},ownKeys(f){m(s);var l=Reflect.ownKeys(f).filter(v=>{var d=r.get(v);return d===void 0||d.v!==q});for(var[u,c]of r)c.v!==q&&!(u in f)&&l.push(u);return l},setPrototypeOf(){Ps()}})}var un,Yn,Gn,Wn;function di(){if(un===void 0){un=window,Yn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Gn=qt(t,"firstChild").get,Wn=qt(t,"nextSibling").get,ln(e)&&(e[Dr]=void 0,e[Qt]=null,e[Pr]=void 0,e.__e=void 0),ln(r)&&(r[Dt]=void 0)}}function lt(e=""){return document.createTextNode(e)}function ur(e){return Gn.call(e)}function Gt(e){return Wn.call(e)}function N(e,t){return ur(e)}function hi(e,t=!1){{var r=ur(e);return r instanceof Comment&&r.data===""?Gt(r):r}}function P(e,t=1,r=!1){let n=e;for(;t--;)n=Gt(n);return n}function _i(e){e.textContent=""}function Xn(){return!1}function pi(e,t,r){return document.createElementNS(On,e,void 0)}let cn=!1;function gi(){cn||(cn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[Zt]?.()})},{capture:!0}))}function Jr(e){var t=T,r=x;de(null),Oe(null);try{return e()}finally{de(t),Oe(r)}}function bi(e,t,r,n=r){e.addEventListener(t,()=>Jr(r));const s=e[Zt];s?e[Zt]=()=>{s(),n(!0)}:e[Zt]=()=>n(!0),gi()}function wi(e){x===null&&(T===null&&Ms(),Ns()),Ue&&Os()}function mi(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Ke(e,t){var r=x;r!==null&&(r.f&G)!==0&&(e|=G);var n={ctx:ve,deps:null,nodes:null,f:e|V|ue,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};E?.register_created_effect(n);var s=n;if((e&Ht)!==0)bt!==null?bt.push(n):ut.ensure().schedule(n);else if(t!==null){try{Ot(n)}catch(a){throw Q(n),a}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&Nt)===0&&(s=s.first,(e&ge)!==0&&(e&At)!==0&&s!==null&&(s.f|=At))}if(s!==null&&(s.parent=r,r!==null&&mi(s,r),T!==null&&(T.f&$)!==0&&(e&ze)===0)){var i=T;(i.effects??(i.effects=[])).push(s)}return n}function Qr(){return T!==null&&!we}function yi(e){const t=Ke(gr,null);return R(t,L),t.teardown=e,t}function Jn(e){wi();var t=x.f,r=!T&&(t&ye)!==0&&(t&vt)===0;if(r){var n=ve;(n.e??(n.e=[])).push(e)}else return Qn(e)}function Qn(e){return Ke(Ht|Ts,e)}function Ei(e){ut.ensure();const t=Ke(ze|Nt,e);return(r={})=>new Promise(n=>{r.outro?at(t,()=>{Q(t),n(void 0)}):(Q(t),n(void 0))})}function Si(e){return Ke(wt|Nt,e)}function Zn(e,t=0){return Ke(gr|t,e)}function xe(e,t=[],r=[],n=[]){ii(n,t,r,s=>{Ke(gr,()=>e(...s.map(m)))})}function Zr(e,t=0){var r=Ke(ge|t,e);return r}function fe(e){return Ke(ye|Nt,e)}function es(e){var t=e.teardown;if(t!==null){const r=Ue,n=T;vn(!0),de(null);try{t.call(null)}finally{vn(r),de(n)}}}function en(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const s=r.ac;s!==null&&Jr(()=>{s.abort(br)});var n=r.next;(r.f&ze)!==0?r.parent=null:Q(r,t),r=n}}function ki(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&ye)===0&&Q(t),t=r}}function Q(e,t=!0){var r=!1;(t||(e.f&ks)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Ti(e.nodes.start,e.nodes.end),r=!0),R(e,an),en(e,t&&!r),Vt(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const i of n)i.stop();es(e),e.f^=an,e.f|=me;var s=e.parent;s!==null&&s.first!==null&&ts(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Ti(e,t){for(;e!==null;){var r=e===t?null:Gt(e);e.remove(),e=r}}function ts(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function at(e,t,r=!0){var n=[];rs(e,n,!0);var s=()=>{r&&Q(e),t&&t()},i=n.length;if(i>0){var a=()=>--i||s();for(var f of n)f.out(a)}else s()}function rs(e,t,r){if((e.f&G)===0){e.f^=G;var n=e.nodes&&e.nodes.t;if(n!==null)for(const f of n)(f.is_global||r)&&t.push(f);for(var s=e.first;s!==null;){var i=s.next;if((s.f&ze)===0){var a=(s.f&At)!==0||(s.f&ye)!==0&&(e.f&ge)!==0;rs(s,t,a?r:!1)}s=i}}}function tn(e){ns(e,!0)}function ns(e,t){if((e.f&G)!==0){e.f^=G,(e.f&L)===0&&(R(e,V),ut.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,s=(r.f&At)!==0||(r.f&ye)!==0;ns(r,s?t:!1),r=n}var i=e.nodes&&e.nodes.t;if(i!==null)for(const a of i)(a.is_global||t)&&a.in()}}function rn(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var s=r===n?null:Gt(r);t.append(r),r=s}}let sr=!1,Ue=!1;function vn(e){Ue=e}let T=null,we=!1;function de(e){T=e}let x=null;function Oe(e){x=e}let ce=null;function ss(e){T!==null&&(ce===null?ce=[e]:ce.push(e))}let J=null,Z=0,se=null;function Ai(e){se=e}let is=1,Ge=0,ot=Ge;function dn(e){ot=e}function ls(){return++is}function Wt(e){var t=e.f;if((t&V)!==0)return!0;if(t&$&&(e.f&=~ft),(t&Ce)!==0){for(var r=e.deps,n=r.length,s=0;se.wv)return!0}(t&ue)!==0&&be===null&&R(e,L)}return!1}function as(e,t,r=!0){var n=e.reactions;if(n!==null&&!(ce!==null&&nt.call(ce,e)))for(var s=0;s{e.ac.abort(br)}),e.ac=null);try{e.f|=ar;var c=e.fn,v=c();e.f|=vt;var d=e.deps,_=E?.is_fork;if(J!==null){var p;if(_||Vt(e,Z),d!==null&&Z>0)for(d.length=Z+J.length,p=0;p{throw h});throw d}}finally{e[We]=t,delete e.currentTarget,de(c),Oe(v)}}}const Mi=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Ri(e){return Mi?.createHTML(e)??e}function Di(e){var t=pi("template");return t.innerHTML=Ri(e.replaceAll("","")),t.content}function pn(e,t){var r=x;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function B(e,t){var r=(t&Vs)!==0,n=(t&$s)!==0,s,i=!e.startsWith("");return()=>{s===void 0&&(s=Di(i?e:""+e),r||(s=ur(s)));var a=n||Yn?document.importNode(s,!0):s.cloneNode(!0);if(r){var f=ur(a),l=a.lastChild;pn(f,l)}else pn(a,a);return a}}function H(e,t){e!==null&&e.before(t)}function qe(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[Dt]??(e[Dt]=e.nodeValue))&&(e[Dt]=r,e.nodeValue=`${r}`)}function Pi(e,t){return ji(e,t)}const Jt=new Map;function ji(e,{target:t,anchor:r,props:n={},events:s,context:i,intro:a=!0,transformError:f}){di();var l=void 0,u=Ei(()=>{var c=r??t.appendChild(lt());ei(c,{pending:()=>{}},_=>{dt({});var p=ve;i&&(p.c=i),s&&(n.$$events=s),l=e(_,n)||{},ht()},f);var v=new Set,d=_=>{for(var p=0;p<_.length;p++){var g=_[p];if(!v.has(g)){v.add(g);var h=Ni(g);for(const A of[t,document]){var S=Jt.get(A);S===void 0&&(S=new Map,Jt.set(A,S));var b=S.get(g);b===void 0?(A.addEventListener(g,_n,{passive:h}),S.set(g,1)):S.set(g,b+1)}}}};return d(pr(vs)),Br.add(d),()=>{for(var _ of v)for(const h of[t,document]){var p=Jt.get(h),g=p.get(_);--g==0?(h.removeEventListener(_,_n),p.delete(_),p.size===0&&Jt.delete(h)):p.set(_,g)}Br.delete(d),c!==r&&c.parentNode?.removeChild(c)}});return Fi.set(l,u),l}let Fi=new WeakMap;var _e,ke,re,rt,Kt,Yt,_r;class qi{constructor(t,r=!0){W(this,"anchor");y(this,_e,new Map);y(this,ke,new Map);y(this,re,new Map);y(this,rt,new Set);y(this,Kt,!0);y(this,Yt,t=>{if(o(this,_e).has(t)){var r=o(this,_e).get(t),n=o(this,ke).get(r);if(n)tn(n),o(this,rt).delete(r);else{var s=o(this,re).get(r);s&&(o(this,ke).set(r,s.effect),o(this,re).delete(r),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),n=s.effect)}for(const[i,a]of o(this,_e)){if(o(this,_e).delete(i),i===t)break;const f=o(this,re).get(a);f&&(Q(f.effect),o(this,re).delete(a))}for(const[i,a]of o(this,ke)){if(i===r||o(this,rt).has(i))continue;const f=()=>{if(Array.from(o(this,_e).values()).includes(i)){var u=document.createDocumentFragment();rn(a,u),u.append(lt()),o(this,re).set(i,{effect:a,fragment:u})}else Q(a);o(this,rt).delete(i),o(this,ke).delete(i)};o(this,Kt)||!n?(o(this,rt).add(i),at(a,f,!1)):f()}}});y(this,_r,t=>{o(this,_e).delete(t);const r=Array.from(o(this,_e).values());for(const[n,s]of o(this,re))r.includes(n)||(Q(s.effect),o(this,re).delete(n))});this.anchor=t,w(this,Kt,r)}ensure(t,r){var n=E,s=Xn();if(r&&!o(this,ke).has(t)&&!o(this,re).has(t))if(s){var i=document.createDocumentFragment(),a=lt();i.append(a),o(this,re).set(t,{effect:fe(()=>r(a)),fragment:i})}else o(this,ke).set(t,fe(()=>r(this.anchor)));if(o(this,_e).set(n,t),s){for(const[f,l]of o(this,ke))f===t?n.unskip_effect(l):n.skip_effect(l);for(const[f,l]of o(this,re))f===t?n.unskip_effect(l.effect):n.skip_effect(l.effect);n.oncommit(o(this,Yt)),n.ondiscard(o(this,_r))}else o(this,Yt).call(this,n)}}_e=new WeakMap,ke=new WeakMap,re=new WeakMap,rt=new WeakMap,Kt=new WeakMap,Yt=new WeakMap,_r=new WeakMap;function cr(e,t,r=!1){var n=new qi(e),s=r?At:0;function i(a,f){n.ensure(a,f)}Zr(()=>{var a=!1;t((f,l=0)=>{a=!0,i(l,f)}),a||i(-1,null)},s)}function Li(e,t,r){for(var n=[],s=t.length,i,a=t.length,f=0;f{if(i){if(i.pending.delete(v),i.done.add(v),i.pending.size===0){var d=e.outrogroups;zr(e,pr(i.done)),d.delete(i),d.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var l=n.length===0&&r!==null;if(l){var u=r,c=u.parentNode;_i(c),c.append(u),e.items.clear()}zr(e,t,!l)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function zr(e,t,r=!0){var n;if(e.pending.size>0){n=new Set;for(const a of e.pending.values())for(const f of a)n.add(e.items.get(f).e)}for(var s=0;s{var A=r();return kn(A)?A:A==null?[]:pr(A)}),d,_=new Map,p=!0;function g(A){(b.effect.f&me)===0&&(b.pending.delete(A),b.fallback=c,Ii(b,d,a,t,n),c!==null&&(d.length===0?(c.f&Te)===0?tn(c):(c.f^=Te,jt(c,null,a)):at(c,()=>{c=null})))}function h(A){b.pending.delete(A)}var S=Zr(()=>{d=m(v);for(var A=d.length,M=new Set,ne=E,Ne=Xn(),U=0;Ui(a)):(c=fe(()=>i(gn??(gn=lt()))),c.f|=Te)),A>M.size&&Cs(),!p)if(_.set(ne,M),Ne){for(const[j,F]of f)M.has(j)||ne.skip_effect(F.e);ne.oncommit(g),ne.ondiscard(h)}else g(ne);m(v)}),b={effect:S,items:f,pending:_,outrogroups:null,fallback:c};p=!1}function Rt(e){for(;e!==null&&(e.f&ye)===0;)e=e.next;return e}function Ii(e,t,r,n,s){var i=(n&Is)!==0,a=t.length,f=e.items,l=Rt(e.effect.first),u,c=null,v,d=[],_=[],p,g,h,S;if(i)for(S=0;S0){var Re=(n&Cn)!==0&&a===0?r:null;if(i){for(S=0;S{if(v!==void 0)for(h of v)h.nodes?.a?.apply()})}function Hi(e,t,r,n,s,i,a,f){var l=(a&qs)!==0?(a&Hs)===0?ci(r,!1,!1):ct(r):null,u=(a&Ls)!==0?ct(s):null;return{v:l,i:u,e:fe(()=>(i(t,l??r,u??s,f),()=>{e.delete(n)}))}}function jt(e,t,r){if(e.nodes)for(var n=e.nodes.start,s=e.nodes.end,i=t&&(t.f&Te)===0?t.nodes.start:r;n!==null;){var a=Gt(n);if(i.before(n),n===s)return;n=a}}function Le(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}const bn=[...` -\r\f \v\uFEFF`];function Vi(e,t,r){var n=e==null?"":""+e;if(r){for(var s of Object.keys(r))if(r[s])n=n?n+" "+s:s;else if(n.length)for(var i=s.length,a=0;(a=n.indexOf(s,a))>=0;){var f=a+i;(a===0||bn.includes(n[a-1]))&&(f===n.length||bn.includes(n[f]))?n=(a===0?"":n.substring(0,a))+n.substring(f+1):a=f}}return n===""?null:n}function wn(e,t=!1){var r=t?" !important;":";",n="";for(var s of Object.keys(e)){var i=e[s];i!=null&&i!==""&&(n+=" "+s+": "+i+r)}return n}function Tr(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function $i(e,t){if(t){var r="",n,s;if(Array.isArray(t)?(n=t[0],s=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,a=0,f=!1,l=[];n&&l.push(...Object.keys(n).map(Tr)),s&&l.push(...Object.keys(s).map(Tr));var u=0,c=-1;const g=e.length;for(var v=0;v{var i=s?e.defaultValue:e.value;if(i=Cr(e)?Or(i):i,r(i),E!==null&&n.add(E),await Ci(),i!==(i=t())){var a=e.selectionStart,f=e.selectionEnd,l=e.value.length;if(e.value=i??"",f!==null){var u=e.value.length;a===f&&f===l&&u>l?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=a,e.selectionEnd=Math.min(f,u))}}}),cs(t)==null&&e.value&&(r(Cr(e)?Or(e.value):e.value),E!==null&&n.add(E)),Zn(()=>{var s=t();if(e===document.activeElement){var i=E;if(n.has(i))return}Cr(e)&&s===Or(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function Cr(e){var t=e.type;return t==="number"||t==="range"}function Or(e){return e===""?null:+e}function Nr(e,t,r,n){var s=n,i=!0,a=()=>(i&&(i=!1,s=n),s),f;f=e[t],f===void 0&&n!==void 0&&(f=a());var l;return l=()=>{var u=e[t];return u===void 0?a():(i=!0,u)},l}const Yi="5";var Sn;typeof window<"u"&&((Sn=window.__svelte??(window.__svelte={})).v??(Sn.v=new Set)).add(Yi);const ir=typeof window<"u"&&window.slashedBricksApp?window.slashedBricksApp:{defaults:{},settings:{},tabs:{},rest:{url:"",nonce:""}},Mt={defaults:ir.defaults||{},tabs:ir.tabs||{},rest:ir.rest||{url:"",nonce:""}},pe=Ae(structuredClone(ir.settings||{})),k=Ae({activeTab:Gi(Mt.tabs)||"colors",dirty:!1,saving:!1,lastSavedAt:null,error:""});function Gi(e){for(const t in e)return t;return null}function Wi(){k.dirty=!0,k.error=""}function Xi(e){pe[e]&&delete pe[e]}var Ji=B(''),Qi=B('');function Zi(e,t){dt(t,!0);var r=Qi();vr(r,21,()=>Object.entries(Mt.tabs),([n,s])=>n,(n,s)=>{var i=Y(()=>Mr(m(s),2));let a=()=>m(i)[0],f=()=>m(i)[1];var l=Ji();let u;var c=N(l);xe(()=>{u=ds(l,1,"tab-nav__btn svelte-yyiz68",null,u,{active:k.activeTab===a()}),qe(c,f())}),Xe("click",l,()=>k.activeTab=a()),H(n,l)}),H(e,r),ht()}nn(["click"]);var el=B(' '),tl=B(' ',1),rl=B(''),nl=B('
');function yn(e,t){dt(t,!0);let r=Nr(t,"hexHint",3,""),n=Nr(t,"rawHint",3,""),s=Nr(t,"cssVar",3,"");const i=/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,a=(()=>{const j=(pe.colors?.[t.storeKey]??"").trim(),F=j===""||i.test(j);return{mode:F?"hex":"raw",hex:F?j:"",raw:F?"":j}})();let f=oe(Ae(a.mode)),l=oe(Ae(a.hex)),u=oe(Ae(a.raw));function c(){pe.colors||(pe.colors={});const j=m(u).trim(),F=m(l).trim(),he=m(f)==="raw"?j:F;he===""?delete pe.colors[t.storeKey]:pe.colors[t.storeKey]=he,Wi()}function v(){m(f)==="hex"?(z(f,"raw"),z(l,"")):(z(f,"hex"),z(u,"")),c()}const d=Y(()=>(m(f)==="raw"?m(u):m(l))||r()||"transparent");var _=nl(),p=N(_),g=N(p),h=N(g),S=P(g,2);{var b=j=>{var F=el(),he=N(F);xe(()=>qe(he,s())),H(j,F)};cr(S,j=>{s()&&j(b)})}var A=P(p,2),M=N(A);let ne;var Ne=P(M,2);{var U=j=>{var F=tl(),he=hi(F),wr=P(he,2);xe(()=>{gt(he,"id",t.storeKey),gt(wr,"placeholder",r())}),Xe("input",he,c),xr(he,()=>m(l),mr=>z(l,mr)),Xe("input",wr,c),xr(wr,()=>m(l),mr=>z(l,mr)),H(j,F)},Me=j=>{var F=rl();xe(()=>{gt(F,"id",t.storeKey),gt(F,"placeholder",n())}),Xe("input",F,c),xr(F,()=>m(u),he=>z(u,he)),H(j,F)};cr(Ne,j=>{m(f)==="hex"?j(U):j(Me,-1)})}var Re=P(Ne,2),I=N(Re);xe(()=>{gt(g,"for",t.storeKey),qe(h,t.label),ne=Ft(M,"",ne,{background:m(d)}),qe(I,m(f)==="hex"?"Advanced (oklch / raw)":"Use HEX picker")}),Xe("click",Re,v),H(e,_),ht()}nn(["input","click"]);var sl=B(`

Brand Colors

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

');function ua(e,t){Fe(t,!0);var r=fa();Ke(r,21,()=>Object.entries(ce.tabs),([n,s])=>n,(n,s)=>{var i=te(()=>Rr(b(s),2));let l=()=>b(i)[0],o=()=>b(i)[1];var a=oa();let u;var v=y(a);G(()=>{u=bs(a,1,"tab-nav__btn svelte-yyiz68",null,u,{active:x.activeTab===l()}),P(v,o())}),je("click",a,()=>x.activeTab=l()),z(n,a)}),z(e,r),Pe()}Pt(["click"]);var ca=$(' '),va=$(' ',1),da=$(''),ha=$('
');function xn(e,t){Fe(t,!0);let r=Mr(t,"hexHint",3,""),n=Mr(t,"rawHint",3,""),s=Mr(t,"cssVar",3,"");const i=/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,l=(()=>{const R=(Ee.colors?.[t.storeKey]??"").trim(),N=R===""||i.test(R);return{mode:N?"hex":"raw",hex:N?R:"",raw:N?"":R}})();let o=W(ge(l.mode)),a=W(ge(l.hex)),u=W(ge(l.raw));function v(){Ee.colors||(Ee.colors={});const R=b(u).trim(),N=b(a).trim(),V=b(o)==="raw"?R:N;V===""?delete Ee.colors[t.storeKey]:Ee.colors[t.storeKey]=V,aa()}function d(){b(o)==="hex"?(q(o,"raw"),q(a,"")):(q(o,"hex"),q(u,"")),v()}const c=te(()=>(b(o)==="raw"?b(u):b(a))||r()||"transparent");var p=ha(),h=y(p),g=y(h),_=y(g),m=k(g,2);{var w=R=>{var N=ca(),V=y(N);G(()=>P(V,s())),z(R,N)};Ue(m,R=>{s()&&R(w)})}var S=k(h,2),F=y(S);let U;var J=k(F,2);{var B=R=>{var N=va(),V=Ei(N),Se=k(V,2);G(()=>{Ve(V,"id",t.storeKey),Ve(Se,"placeholder",r())}),je("input",V,v),Cr(V,()=>b(a),Ne=>q(a,Ne)),je("input",Se,v),Cr(Se,()=>b(a),Ne=>q(a,Ne)),z(R,N)},Q=R=>{var N=da();G(()=>{Ve(N,"id",t.storeKey),Ve(N,"placeholder",n())}),je("input",N,v),Cr(N,()=>b(u),V=>q(u,V)),z(R,N)};Ue(J,R=>{b(o)==="hex"?R(B):R(Q,-1)})}var O=k(J,2),M=y(O);G(()=>{Ve(g,"for",t.storeKey),P(_,t.label),U=Bt(F,"",U,{background:b(c)}),P(M,b(o)==="hex"?"Advanced (oklch / raw)":"Use HEX picker")}),je("click",O,d),z(e,p),Pe()}Pt(["input","click"]);var _a=$(`

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 il(e,t){dt(t,!0);const r=Mt.defaults?.colors??{},n=f=>f.charAt(0).toUpperCase()+f.slice(1);var s=sl(),i=P(N(s),4);vr(i,21,()=>Object.entries(r.brand??{}),([f,l])=>f,(f,l)=>{var u=Y(()=>Mr(m(l),2));let c=()=>m(u)[0],v=()=>m(u)[1];{let d=Y(()=>`brand_${c()}`),_=Y(()=>n(c())),p=Y(()=>r.brand_hex_hints?.[c()]??""),g=Y(()=>`--sf-color-${c()}-light`);yn(f,{get storeKey(){return m(d)},get label(){return m(_)},get hexHint(){return m(p)},get rawHint(){return v()},get cssVar(){return m(g)}})}});var a=P(i,4);vr(a,21,()=>Object.entries(r.status??{}),([f,l])=>f,(f,l)=>{var u=Y(()=>Mr(m(l),2));let c=()=>m(u)[0],v=()=>m(u)[1];{let d=Y(()=>`status_${c()}`),_=Y(()=>n(c())),p=Y(()=>r.status_hex_hints?.[c()]??""),g=Y(()=>`--sf-color-${c()}-light`);yn(f,{get storeKey(){return m(d)},get label(){return m(_)},get hexHint(){return m(p)},get rawHint(){return v()},get cssVar(){return m(g)}})}}),H(e,s),ht()}var ll=B(`

Not ported yet. The legacy admin page (SLASHED → SLASHED) + straight into the framework as the source of the brand scale.

Status Colors

`);function pa(e,t){Fe(t,!0);const r=ce.defaults?.colors??{},n=o=>o.charAt(0).toUpperCase()+o.slice(1);var s=_a(),i=k(y(s),4);Ke(i,21,()=>Object.entries(r.brand??{}),([o,a])=>o,(o,a)=>{var u=te(()=>Rr(b(a),2));let v=()=>b(u)[0],d=()=>b(u)[1];{let c=te(()=>`brand_${v()}`),p=te(()=>n(v())),h=te(()=>r.brand_hex_hints?.[v()]??""),g=te(()=>`--sf-color-${v()}-light`);xn(o,{get storeKey(){return b(c)},get label(){return b(p)},get hexHint(){return b(h)},get rawHint(){return d()},get cssVar(){return b(g)}})}});var l=k(i,4);Ke(l,21,()=>Object.entries(r.status??{}),([o,a])=>o,(o,a)=>{var u=te(()=>Rr(b(a),2));let v=()=>b(u)[0],d=()=>b(u)[1];{let c=te(()=>`status_${v()}`),p=te(()=>n(v())),h=te(()=>r.status_hex_hints?.[v()]??""),g=te(()=>`--sf-color-${v()}-light`);xn(o,{get storeKey(){return b(c)},get label(){return b(p)},get hexHint(){return b(h)},get rawHint(){return d()},get cssVar(){return b(g)}})}}),z(e,s),Pe()}var ga=$('
  • '),ya=$('
      '),ba=$('
      '),ma=$(`

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

      `);function wa(e,t){Fe(t,!0);const r=ce.inventory?.variables??[],n={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"},s=["Colors","Typography","Spacing","Sizing","Layout","Borders","Radius","Shadows","Effects","Motion","Icons","Z-Index","States","Focus","Scroll","Print","Misc"];function i(h){let g=h;g.startsWith("--sf-")&&(g=g.slice(5));const _=g.indexOf("-"),m=_===-1?g:g.slice(0,_);return n[m]||"Misc"}function l(h){const g={};for(const m of h){const w=i(m);g[w]||(g[w]=[]),g[w].push(m)}const _=[];for(const m of s)g[m]?.length&&(g[m].sort(),_.push({category:m,items:g[m]}));for(const m of Object.keys(g))!s.includes(m)&&g[m]?.length&&(g[m].sort(),_.push({category:m,items:g[m]}));return _}const o=l(r);let a=ge({});function u(h){a[h]=!a[h]}var v=ma(),d=y(v),c=y(d),p=k(d,4);Ke(p,17,()=>o,({category:h,items:g})=>h,(h,g)=>{let _=()=>b(g).category,m=()=>b(g).items;var w=ba(),S=y(w),F=y(S),U=y(F),J=k(F,2),B=y(J),Q=k(J,2),O=y(Q),M=k(S,2);{var R=N=>{var V=ya();Ke(V,20,m,Se=>Se,(Se,Ne)=>{var on=ga(),ws=y(on),Ss=y(ws);G(()=>P(Ss,Ne)),z(Se,on)}),z(N,V)};Ue(M,N=>{a[_()]&&N(R)})}G(()=>{Ve(S,"aria-expanded",a[_()]?"true":"false"),P(U,a[_()]?"▼":"▶"),P(B,_()),P(O,`(${m().length??""})`)}),je("click",S,()=>u(_())),z(h,w)}),G(()=>P(c,`CSS Variables (${r.length??""})`)),z(e,v),Pe()}Pt(["click"]);var Sa=$('
    • '),ka=$('
        '),Ea=$('
      • '),Ta=$('
          '),xa=$('

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

          ');function Aa(e,t){Fe(t,!0);const r=ce.inventory?.sf_classes??[],n=ce.inventory?.is_classes??[];let s=W(!1),i=W(!1);var l=xa(),o=y(l),a=y(o),u=k(o,4),v=y(u),d=y(v),c=y(d),p=k(d,4),h=y(p),g=k(v,2);{var _=O=>{var M=ka();Ke(M,20,()=>r,R=>R,(R,N)=>{var V=Sa(),Se=y(V),Ne=y(Se);G(()=>P(Ne,`.${N??""}`)),z(R,V)}),z(O,M)};Ue(g,O=>{b(s)&&O(_)})}var m=k(u,2),w=y(m),S=y(w),F=y(S),U=k(S,4),J=y(U),B=k(w,2);{var Q=O=>{var M=Ta();Ke(M,20,()=>n,R=>R,(R,N)=>{var V=Ea(),Se=y(V),Ne=y(Se);G(()=>P(Ne,`.${N??""}`)),z(R,V)}),z(O,M)};Ue(B,O=>{b(i)&&O(Q)})}G(()=>{P(a,`Registered Classes (${r.length+n.length})`),Ve(v,"aria-expanded",b(s)?"true":"false"),P(c,b(s)?"▼":"▶"),P(h,`(${r.length??""})`),Ve(w,"aria-expanded",b(i)?"true":"false"),P(F,b(i)?"▼":"▶"),P(J,`(${n.length??""})`)}),je("click",v,()=>q(s,!b(s))),je("click",w,()=>q(i,!b(i))),z(e,l),Pe()}Pt(["click"]);async function ln(e,t){const{url:r,nonce:n}=ce.rest;if(!r)return console.info("[slashed-admin] (dev) would POST",e,t),{ok:!0,dev:!0};const s=await fetch(r+e,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":n},body:JSON.stringify(t)});if(!s.ok){const i=await s.text();throw new Error(i||`HTTP ${s.status}`)}return s.json()}function ja(e,t){return ln("/tokens",{section:e,values:t})}function Ca(e){return ln("/tokens/reset",{section:e})}function La(e){return ln("/settings",e)}var Oa=$('Saved'),Ma=$(' '),Ra=$(`

          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 za(e,t){Fe(t,!0);let r=W(ge(ce.pluginSettings?.html_font_size??"")),n=W(!1),s=W(!1),i=W("");async function l(){q(n,!0),q(s,!1),q(i,"");try{await La({html_font_size:b(r)}),q(s,!0),setTimeout(()=>{q(s,!1)},3e3)}catch(O){q(i,O.message||"Save failed",!0)}finally{q(n,!1)}}var o=Ra(),a=k(y(o),4),u=k(y(a),2),v=y(u),d=k(u,4),c=y(d),p=k(a,4),h=k(y(p),2),g=y(h);g.value=g.__value="";var _=k(g);_.value=_.__value="100";var m=k(_);m.value=m.__value="62.5";var w=k(p,2),S=y(w),F=y(S),U=k(S,2);{var J=O=>{var M=Oa();z(O,M)};Ue(U,O=>{b(s)&&O(J)})}var B=k(U,2);{var Q=O=>{var M=Ma(),R=y(M);G(()=>P(R,b(i))),z(O,M)};Ue(B,O=>{b(i)&&O(Q)})}G(()=>{P(v,ce.inventory?.variables?.length??0),P(c,(ce.inventory?.sf_classes?.length??0)+(ce.inventory?.is_classes?.length??0)),S.disabled=b(n),P(F,b(n)?"Saving...":"Save Settings")}),Qi(h,()=>b(r),O=>q(r,O)),je("click",S,l),z(e,o),Pe()}Pt(["click"]);var Da=$('

          Parameters:

           
          '),$a=$(`

          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 Fa(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'; +} );`},{name:"slashed_bricks/registered_classes",description:"Filter the array of classes before registration with Bricks.",params:"$classes (array) - Array of class definitions with name and category.",example:`add_filter( 'slashed_bricks/registered_classes', function( $classes ) { + // Remove state classes. + return array_filter( $classes, function( $class ) { + return $class['category'] !== 'SLASHED State'; + } ); +} );`},{name:"slashed_bricks/registered_colors",description:"Filter the colors array before registration with Bricks.",params:"$colors (array) - Array of color definitions with name, value, and category.",example:`add_filter( 'slashed_bricks/registered_colors', function( $colors ) { + // Only keep brand colors, remove semantic. + return array_filter( $colors, function( $color ) { + return strpos( $color['category'], 'Semantic' ) === false; + } ); +} );`},{name:"slashed_bricks/registered_variables",description:"Filter the CSS variables array before registration with Bricks.",params:"$variables (array) - Associative array keyed by category label.",example:`add_filter( 'slashed_bricks/registered_variables', function( $variables ) { + // Remove z-index variables. + unset( $variables['Z-Index'] ); + return $variables; +} );`},{name:"slashed_bricks/inventory",description:"Replace the resolved inventory wholesale. Useful for tests, custom forks of the framework, or sites that want to ship their own token list.",params:"$inventory (array) - Array with keys 'variables', 'sf_classes', 'is_classes'.",example:`add_filter( 'slashed_bricks/inventory', function( $inventory ) { + $inventory['variables'][] = '--sf-color-my-custom'; + return $inventory; +} );`},{name:"slashed_bricks/inventory_local_path",description:"Override the local CSS path the inventory parses. Return a string for a specific path, false to skip local resolution, or null (default) to use bundled candidates.",params:"$path (string|false|null) - Override path or control flag.",example:`// Use a child-theme copy of the bundle. +add_filter( 'slashed_bricks/inventory_local_path', function() { + return get_stylesheet_directory() . '/assets/slashed.optimal.css'; +} );`},{name:"slashed_bricks/color_categories",description:"Filter which color categories to include in the Bricks palette.",params:"$categories (array) - Associative array of category name to color entries.",example:`add_filter( 'slashed_bricks/color_categories', function( $categories ) { + // Only include primary and secondary brand palettes. + return array_intersect_key( $categories, array_flip( [ + 'SLASHED Primary', + 'SLASHED Secondary', + ] ) ); +} );`}];var r=$a(),n=k(y(r),4);Ke(n,17,()=>t,s=>s.name,(s,i)=>{var l=Da(),o=y(l),a=y(o),u=y(a),v=k(o,2),d=y(v),c=k(v,2),p=k(y(c),2),h=y(p),g=k(c,2),_=y(g),m=y(_);G(()=>{P(u,b(i).name),P(d,b(i).description),P(h,b(i).params),P(m,b(i).example)}),z(s,l)}),z(e,r)}var Pa=$(`

          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 al(e,t){var r=ll(),n=N(r),s=N(n),i=P(n,4),a=P(N(i));a.textContent="Tab.svelte",xe(()=>qe(s,t.tab)),H(e,r)}var ol=B('
          '),fl=B('

          Live preview

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

          `);function Na(e,t){var r=Pa(),n=y(r),s=y(n),i=k(n,4),l=k(y(i));l.textContent="Tab.svelte",G(()=>P(s,t.tab)),z(e,r)}var qa=$('
          '),Ha=$('

          Live preview

          Primary Action
          Generated CSS:
          ');function Ia(e,t){Fe(t,!0);const r=["primary","secondary","tertiary","action","neutral","base"],n=te(()=>{const p=[],h=Ee.colors??{};for(const g of r){const _=h[`brand_${g}`];_&&p.push(`--sf-color-${g}-light:${_}`)}for(const g of["success","warning","error","info","danger"]){const _=h[`status_${g}`];_&&p.push(`--sf-color-${g}-light:${_}`)}return p.join(";")}),s=te(()=>{const p=[],h=Ee.colors??{};for(const g of r){const _=h[`brand_${g}`];_&&p.push(`--sf-color-${g}-light: ${_}`)}for(const g of["success","warning","error","info","danger"]){const _=h[`status_${g}`];_&&p.push(`--sf-color-${g}-light: ${_}`)}return p.length===0?"":`.slashed-preview { + ${p.join(`; `)}; -}`});var i=fl(),a=P(N(i),2);vr(a,20,()=>r,_=>_,(_,p)=>{var g=ol();let h;var S=N(g);xe(()=>{gt(g,"title",p),h=Ft(g,"",h,{background:`var(--sf-color-${p}-light, #ddd)`}),qe(S,p)}),H(_,g)});var f=P(a,2),l=N(f);Ft(l,"",{},{background:"var(--sf-color-primary-light, #4338ca)"});var u=P(l,2);Ft(u,"",{},{background:"var(--sf-color-action-light, #0891b2)"});var c=P(f,2),v=P(N(c)),d=N(v);xe(()=>{Ft(i,m(n)),qe(d,m(s)||"/* (defaults — no overrides set) */")}),H(e,i),ht()}async function hs(e,t){const{url:r,nonce:n}=Mt.rest;if(!r)return console.info("[slashed-admin] (dev) would POST",e,t),{ok:!0,dev:!0};const s=await fetch(r+e,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":n},body:JSON.stringify(t)});if(!s.ok){const i=await s.text();throw new Error(i||`HTTP ${s.status}`)}return s.json()}function cl(e,t){return hs("/tokens",{section:e,values:t})}function vl(e){return hs("/tokens/reset",{section:e})}var dl=B(' '),hl=B('Saving…'),_l=B('Saved'),pl=B('Unsaved changes'),gl=B('All changes saved'),bl=B('
          ');function wl(e,t){dt(t,!0);async function r(){if(!k.saving){k.saving=!0,k.error="";try{const b=k.activeTab,A=pe[b]??{},M=await cl(b,A);M&&M.values&&(pe[b]=M.values),k.dirty=!1,k.lastSavedAt=Date.now()}catch(b){k.error=b&&b.message||String(b)}finally{k.saving=!1}}}async function n(){if(!k.saving&&confirm(`Reset the ${Mt.tabs[k.activeTab]??k.activeTab} tab to defaults?`)){k.saving=!0,k.error="";try{await vl(k.activeTab),Xi(k.activeTab),k.dirty=!1,k.lastSavedAt=Date.now()}catch(b){k.error=b&&b.message||String(b)}finally{k.saving=!1}}}let s=oe(!1);Jn(()=>{if(k.lastSavedAt){z(s,!0);const b=setTimeout(()=>z(s,!1),2e3);return()=>clearTimeout(b)}});var i=bl();let a;var f=N(i),l=N(f);{var u=b=>{var A=dl(),M=N(A);xe(()=>qe(M,k.error)),H(b,A)},c=b=>{var A=hl();H(b,A)},v=b=>{var A=_l();H(b,A)},d=b=>{var A=pl();H(b,A)},_=b=>{var A=gl();H(b,A)};cr(l,b=>{k.error?b(u):k.saving?b(c,1):m(s)?b(v,2):k.dirty?b(d,3):b(_,-1)})}var p=P(f,2),g=N(p),h=P(g,2),S=N(h);xe(()=>{a=ds(i,1,"bar svelte-1oj49qa",null,a,{dirty:k.dirty}),g.disabled=k.saving,h.disabled=k.saving||!k.dirty,qe(S,k.saving?"Saving…":"Save changes")}),Xe("click",g,n),Xe("click",h,r),H(e,i),ht()}nn(["click"]);var ml=B(`

          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 yl(e,t){dt(t,!0),Jn(()=>{function c(v){k.dirty&&(v.preventDefault(),v.returnValue="")}return window.addEventListener("beforeunload",c),()=>window.removeEventListener("beforeunload",c)});var r=ml(),n=P(N(r),2);Zi(n,{});var s=P(n,2),i=N(s);{var a=c=>{il(c,{})},f=c=>{{let v=Y(()=>Mt.tabs[k.activeTab]??k.activeTab);al(c,{get tab(){return m(v)}})}};cr(i,c=>{k.activeTab==="colors"?c(a):c(f,-1)})}var l=P(s,2);ul(l,{});var u=P(l,2);wl(u,{}),H(e,r),ht()}const En=document.getElementById("slashed-admin-app");En&&Pi(yl,{target:En}); +}`});var i=Ha(),l=k(y(i),2);Ke(l,20,()=>r,p=>p,(p,h)=>{var g=qa();let _;var m=y(g);G(()=>{Ve(g,"title",h),_=Bt(g,"",_,{background:`var(--sf-color-${h}-light, #ddd)`}),P(m,h)}),z(p,g)});var o=k(l,2),a=y(o);Bt(a,"",{},{background:"var(--sf-color-primary-light, #4338ca)"});var u=k(a,2);Bt(u,"",{},{background:"var(--sf-color-action-light, #0891b2)"});var v=k(o,2),d=k(y(v)),c=y(d);G(()=>{Bt(i,b(n)),P(c,b(s)||"/* (defaults — no overrides set) */")}),z(e,i),Pe()}var Ba=$(' '),Va=$('Saving…'),Ua=$('Saved'),Ka=$('Unsaved changes'),Ya=$('All changes saved'),Ga=$('
          ');function Wa(e,t){Fe(t,!0);async function r(){if(!x.saving){x.saving=!0,x.error="";try{const w=x.activeTab,S=Ee[w]??{},F=await ja(w,S);F&&F.values&&(Ee[w]=F.values),x.dirty=!1,x.lastSavedAt=Date.now()}catch(w){x.error=w&&w.message||String(w)}finally{x.saving=!1}}}async function n(){if(!x.saving&&confirm(`Reset the ${ce.tabs[x.activeTab]??x.activeTab} tab to defaults?`)){x.saving=!0,x.error="";try{await Ca(x.activeTab),la(x.activeTab),x.dirty=!1,x.lastSavedAt=Date.now()}catch(w){x.error=w&&w.message||String(w)}finally{x.saving=!1}}}let s=W(!1);ns(()=>{if(x.lastSavedAt){q(s,!0);const w=setTimeout(()=>q(s,!1),2e3);return()=>clearTimeout(w)}});var i=Ga();let l;var o=y(i),a=y(o);{var u=w=>{var S=Ba(),F=y(S);G(()=>P(F,x.error)),z(w,S)},v=w=>{var S=Va();z(w,S)},d=w=>{var S=Ua();z(w,S)},c=w=>{var S=Ka();z(w,S)},p=w=>{var S=Ya();z(w,S)};Ue(a,w=>{x.error?w(u):x.saving?w(v,1):b(s)?w(d,2):x.dirty?w(c,3):w(p,-1)})}var h=k(o,2),g=y(h),_=k(g,2),m=y(_);G(()=>{l=bs(i,1,"bar svelte-1oj49qa",null,l,{dirty:x.dirty}),g.disabled=x.saving,_.disabled=x.saving||!x.dirty,P(m,x.saving?"Saving…":"Save changes")}),je("click",g,n),je("click",_,r),z(e,i),Pe()}Pt(["click"]);var Xa=$(`

          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 Za(e,t){Fe(t,!0),ns(()=>{function h(g){x.dirty&&(g.preventDefault(),g.returnValue="")}return window.addEventListener("beforeunload",h),()=>window.removeEventListener("beforeunload",h)});var r=Xa(),n=k(y(r),2);ua(n,{});var s=k(n,2),i=y(s);{var l=h=>{pa(h,{})},o=h=>{wa(h,{})},a=h=>{Aa(h,{})},u=h=>{za(h,{})},v=h=>{Fa(h)},d=h=>{{let g=te(()=>ce.tabs[x.activeTab]??x.activeTab);Na(h,{get tab(){return b(g)}})}};Ue(i,h=>{x.activeTab==="colors"?h(l):x.activeTab==="variables"?h(o,1):x.activeTab==="classes"?h(a,2):x.activeTab==="bundle"?h(u,3):x.activeTab==="hooks"?h(v,4):h(d,-1)})}var c=k(s,2);Ia(c,{});var p=k(c,2);Wa(p,{}),z(e,r),Pe()}const An=document.getElementById("slashed-admin-app");An&&Bi(Za,{target:An}); //# sourceMappingURL=app.js.map diff --git a/integrations/bricks/includes/class-admin-page-svelte.php b/integrations/bricks/includes/class-admin-page-svelte.php index d9a6dfc6..0bb88a17 100644 --- a/integrations/bricks/includes/class-admin-page-svelte.php +++ b/integrations/bricks/includes/class-admin-page-svelte.php @@ -159,6 +159,7 @@ public function enqueue_assets( $hook_suffix ) { 'defaults' => Slashed_Bricks_Token_Defaults::get_all(), 'settings' => $this->admin_page->get_settings(), 'pluginSettings' => $this->admin_page->get_plugin_settings(), + 'inventory' => Slashed_Bricks_Inventory::get(), ) ); } diff --git a/integrations/bricks/includes/class-admin-page.php b/integrations/bricks/includes/class-admin-page.php index e02e1ae4..67c0b3bc 100644 --- a/integrations/bricks/includes/class-admin-page.php +++ b/integrations/bricks/includes/class-admin-page.php @@ -66,6 +66,10 @@ public function __construct() { 'shadows' => 'Shadows', 'motion' => 'Motion', 'zindex' => 'Z-Index', + 'variables' => 'Variables', + 'classes' => 'Classes', + 'bundle' => 'Bundle', + 'hooks' => 'Hooks', ); add_action( 'admin_menu', array( $this, 'register_menu' ) ); From 3c05d2796085675ba2804bc479004cd91d5e1afd Mon Sep 17 00:00:00 2001 From: Kiro Agent <244629292+kiro-agent@users.noreply.github.com> Date: Tue, 26 May 2026 00:01:25 +0000 Subject: [PATCH 4/8] chore: mark FEAT-002 as completed --- .../features/FEAT-002.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-002.json b/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-002.json index b9845152..38cb6ef5 100644 --- a/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-002.json +++ b/.agents/tasks/task-admin-panel-full-api-cheatsheet/features/FEAT-002.json @@ -2,7 +2,7 @@ "id": "FEAT-002", "type": "feat", "description": "Expand the Svelte admin panel to cover the entire public API by replacing stub tabs with real content tabs for Variables, Classes, Bundle/Settings, and Hooks, plus improving the existing ColorTab.", - "status": "in_progress", + "status": "completed", "steps": [ "Step 1 - Create VariablesTab.svelte in src/components/. This tab reads all variables from the inventory (window.slashedBricksApp already provides defaults which contain variable categories from class-inventory.php). For the Svelte SPA, we need to add inventory data to the hydration payload. Since PHP is not available, we will embed a static cheatsheet data module (see FEAT-003). For now, this tab should display all registered variables grouped by their category (Colors, Typography, Spacing, Sizing, Layout, Borders, Radius, Shadows, Effects, Motion, Icons, Z-Index, States, Focus, Scroll, Print, Misc) using the same categorization logic from class-inventory.php. Each category is a collapsible section showing the variable names. This is a read-only view, not an editor.", "Step 2 - Create ClassesTab.svelte in src/components/. This tab shows all .sf-* layout/utility classes and .is-* state classes in two separate sections. Each class is listed with its name. The data comes from the same static inventory data module.", @@ -30,5 +30,5 @@ "Run `cd integrations/bricks/admin-app && npm run build` and confirm exit code 0" ], "blocked_reason": null, - "findings": "" + "findings": "All 11 steps implemented successfully. Build passes (vite build exits 0). Created 4 new tab components (VariablesTab, ClassesTab, BundleTab, HooksTab), updated stores to expose inventory and pluginSettings, added saveSettings to api.js, updated App.svelte routing, updated PHP class-admin-page.php and class-admin-page-svelte.php, and enriched the dev harness index.html with mock data for all new tabs. The compiled output grew from ~47KB to ~62KB due to the new components." } From 8af415d18a72e7ea53e7a90675fa28d7b9566bf7 Mon Sep 17 00:00:00 2001 From: Kiro Agent <244629292+kiro-agent@users.noreply.github.com> Date: Tue, 26 May 2026 00:07:06 +0000 Subject: [PATCH 5/8] feat: add Cheatsheet tab with searchable index of all framework variables and classes --- .../features/FEAT-003.json | 2 +- integrations/bricks/admin-app/index.html | 1 + integrations/bricks/admin-app/src/App.svelte | 10 +- .../src/components/CheatsheetTab.svelte | 290 ++++++++++++++++++ .../admin-app/src/lib/cheatsheet-data.js | 282 +++++++++++++++++ integrations/bricks/assets/admin-app/app.css | 2 +- integrations/bricks/assets/admin-app/app.js | 22 +- .../bricks/includes/class-admin-page.php | 1 + 8 files changed, 596 insertions(+), 14 deletions(-) create mode 100644 integrations/bricks/admin-app/src/components/CheatsheetTab.svelte create mode 100644 integrations/bricks/admin-app/src/lib/cheatsheet-data.js 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 407f7b64..8266c2ae 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 @@ -2,7 +2,7 @@ "id": "FEAT-003", "type": "feat", "description": "Add a Cheatsheet tab/subpage that serves as a comprehensive index of all CSS custom properties (--sf-*) and classes (.sf-*, .is-*) available in the SLASHED framework, with short descriptions of what each token/class or group does.", - "status": "pending", + "status": "in_progress", "steps": [ "Step 1 - Create a cheatsheet data module at src/lib/cheatsheet-data.js. This module exports a structured object containing all variable categories with descriptions, all class groups with descriptions. The data is derived from the documentation in docs/tokens.md, docs/layout.md, docs/macros.md, docs/states.md. Structure: { variableGroups: [ { category, description, tokens: [ { name, description } ] } ], classGroups: [ { category, description, classes: [ { name, description } ] } ] }. For variables, group by category (Colors, Typography, Spacing, Sizing, Layout, Borders, Radius, Shadows, Effects, Motion, Icons, Z-Index, Focus, Scroll, Print, Misc). For classes, group into Layout Primitives, Macros, Animations/Entrance, Surfaces, and State Classes. Include short 1-line descriptions for each group AND for representative individual tokens/classes. For palette scale tokens (--sf-color-primary-50 through -950, -a5 through -a95, etc.), describe the group pattern once rather than repeating for each individual token. Same for similar repetitive groups.", "Step 2 - Create CheatsheetTab.svelte in src/components/. This is a rich reference page with: (a) A search/filter input at the top that filters tokens and classes by name or description, (b) A toggle to switch between Variables view and Classes view (or show both), (c) Variables view: collapsible category sections, each showing the tokens in that category with their description. Use compact list styling. (d) Classes view: grouped by type (Layout, Macros, Animations, Surfaces, States), each showing class names with descriptions. (e) Total counts displayed (e.g. '607 variables, 143 classes, 40 state classes'). Style it to be scannable and useful as a quick-reference.", diff --git a/integrations/bricks/admin-app/index.html b/integrations/bricks/admin-app/index.html index d9357785..a9c083ee 100644 --- a/integrations/bricks/admin-app/index.html +++ b/integrations/bricks/admin-app/index.html @@ -64,6 +64,7 @@ classes: 'Classes', bundle: 'Bundle', hooks: 'Hooks', + cheatsheet: 'Cheatsheet', }, inventory: { variables: [ diff --git a/integrations/bricks/admin-app/src/App.svelte b/integrations/bricks/admin-app/src/App.svelte index f0efdf85..af6a7bb9 100644 --- a/integrations/bricks/admin-app/src/App.svelte +++ b/integrations/bricks/admin-app/src/App.svelte @@ -14,10 +14,14 @@ import ClassesTab from './components/ClassesTab.svelte'; import BundleTab from './components/BundleTab.svelte'; import HooksTab from './components/HooksTab.svelte'; + import CheatsheetTab from './components/CheatsheetTab.svelte'; import StubTab from './components/StubTab.svelte'; import LivePreview from './components/LivePreview.svelte'; import SaveBar from './components/SaveBar.svelte'; + const readOnlyTabs = ['cheatsheet', 'hooks', 'variables', 'classes']; + let isReadOnly = $derived(readOnlyTabs.includes(ui.activeTab)); + // Warn before unload when the form has unsaved changes. // Replaces the equivalent jQuery `$(window).on('beforeunload', ...)` // block in admin-page.js. @@ -65,6 +69,8 @@ {:else if ui.activeTab === 'hooks'} + {:else if ui.activeTab === 'cheatsheet'} + {:else} {/if} @@ -72,7 +78,9 @@ - + {#if !isReadOnly} + + {/if} diff --git a/integrations/bricks/admin-app/src/lib/cheatsheet-data.js b/integrations/bricks/admin-app/src/lib/cheatsheet-data.js new file mode 100644 index 00000000..9bba5b6a --- /dev/null +++ b/integrations/bricks/admin-app/src/lib/cheatsheet-data.js @@ -0,0 +1,282 @@ +/** + * Structured cheatsheet data for the SLASHED framework. + * + * Exports all CSS custom properties (--sf-*) grouped by category + * and all utility/state classes (.sf-*, .is-*) grouped by type. + * Used by CheatsheetTab.svelte to render a searchable index. + */ + +export const variableGroups = [ + { + 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." }, + ] + } +]; + +export const classGroups = [ + { + 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)." }, + ] + } +]; + +export const miscTokens = [ + { 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." }, +]; diff --git a/integrations/bricks/assets/admin-app/app.css b/integrations/bricks/assets/admin-app/app.css index f0b0bfba..16e4637d 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}.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__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} diff --git a/integrations/bricks/assets/admin-app/app.js b/integrations/bricks/assets/admin-app/app.js index 1e6a7c0f..e4bc31bc 100644 --- a/integrations/bricks/assets/admin-app/app.js +++ b/integrations/bricks/assets/admin-app/app.js @@ -1,11 +1,11 @@ -var ks=Object.defineProperty;var fn=e=>{throw TypeError(e)};var Es=(e,t,r)=>t in e?ks(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ne=(e,t,r)=>Es(e,typeof t!="symbol"?t+"":t,r),Er=(e,t,r)=>t.has(e)||fn("Cannot "+r);var f=(e,t,r)=>(Er(e,t,"read from private field"),r?r.call(e):t.get(e)),T=(e,t,r)=>t.has(e)?fn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),E=(e,t,r,n)=>(Er(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),L=(e,t,r)=>(Er(e,t,"access private method"),r);var Gr=Array.isArray,Ts=Array.prototype.indexOf,ct=Array.prototype.includes,wr=Array.from,xs=Object.defineProperty,Vt=Object.getOwnPropertyDescriptor,As=Object.getOwnPropertyDescriptors,js=Object.prototype,Cs=Array.prototype,Cn=Object.getPrototypeOf,un=Object.isExtensible;const Ls=()=>{};function Os(e){for(var t=0;t{e=n,t=s});return{promise:r,resolve:e,reject:t}}function Rr(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const r=[];for(const n of e)if(r.push(n),r.length===t)break;return r}const Z=2,Mt=4,Sr=8,On=1<<24,Te=16,Le=32,et=64,zr=128,ye=512,Y=1024,X=2048,De=4096,re=8192,Ce=16384,mt=32768,cn=1<<25,Rt=65536,dr=1<<17,Ms=1<<18,Ft=1<<19,Rs=1<<20,ze=1<<25,gt=65536,hr=1<<21,Tt=1<<22,Qe=1<<23,Ut=Symbol("$state"),zs=Symbol(""),ar=Symbol("attributes"),Dr=Symbol("class"),$r=Symbol("style"),qt=Symbol("text"),lr=Symbol("form reset"),kr=new class extends Error{constructor(){super(...arguments);ne(this,"name","StaleReactionError");ne(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Ds(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function $s(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Fs(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ps(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ns(e){throw new Error("https://svelte.dev/e/effect_orphan")}function qs(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Hs(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Is(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Bs(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Vs(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Us=1,Ks=2,Mn=4,Ys=8,Gs=16,Ws=1,Xs=2,K=Symbol("uninitialized"),Rn="http://www.w3.org/1999/xhtml";function Zs(){console.warn("https://svelte.dev/e/derived_inert")}function Js(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Qs(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function zn(e){return e===this.v}function ei(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Dn(e){return!ei(e,this.v)}let me=null;function zt(e){me=e}function Fe(e,t=!1,r){me={p:me,i:!1,c:null,e:null,s:e,x:null,r:C,l:null}}function Pe(e){var t=me,r=t.e;if(r!==null){t.e=null;for(var n of r)ss(n)}return t.i=!0,me=t.p,{}}function $n(){return!0}let rt=[];function Fn(){var e=rt;rt=[],Os(e)}function vt(e){if(rt.length===0&&!Kt){var t=rt;queueMicrotask(()=>{t===rt&&Fn()})}rt.push(e)}function ti(){for(;rt.length>0;)Fn()}function Pn(e){var t=C;if(t===null)return j.f|=Qe,e;if((t.f&mt)===0&&(t.f&Mt)===0)throw e;Je(e,t)}function Je(e,t){for(;t!==null;){if((t.f&zr)!==0){if((t.f&mt)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}const ri=-7169;function H(e,t){e.f=e.f&ri|t}function Wr(e){(e.f&ye)!==0||e.deps===null?H(e,Y):H(e,De)}function Nn(e){if(e!==null)for(const t of e)(t.f&Z)===0||(t.f>)===0||(t.f^=gt,Nn(t.deps))}function qn(e,t,r){(e.f&X)!==0?t.add(e):(e.f&De)!==0&&r.add(e),Nn(e.deps),H(e,Y)}let Tr=null,wt=null,A=null,Fr=null,xe=null,Pr=null,Kt=!1,xr=!1,Et=null,or=null;var vn=0;let ni=1;var xt,We,it,At,jt,at,Ct,He,Xt,oe,Zt,Xe,Oe,Me,Lt,lt,D,Nr,Ht,qr,Hn,In,fr,si,Hr,St;const yr=class yr{constructor(){T(this,D);ne(this,"id",ni++);T(this,xt,!1);ne(this,"linked",!0);T(this,We,null);T(this,it,null);ne(this,"async_deriveds",new Map);ne(this,"current",new Map);ne(this,"previous",new Map);ne(this,"unblocked",new Set);T(this,At,new Set);T(this,jt,new Set);T(this,at,new Set);T(this,Ct,0);T(this,He,new Map);T(this,Xt,null);T(this,oe,[]);T(this,Zt,[]);T(this,Xe,new Set);T(this,Oe,new Set);T(this,Me,new Map);T(this,Lt,new Set);ne(this,"is_fork",!1);T(this,lt,!1)}skip_effect(t){f(this,Me).has(t)||f(this,Me).set(t,{d:[],m:[]}),f(this,Lt).delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=f(this,Me).get(t);if(n){f(this,Me).delete(t);for(var s of n.d)H(s,X),r(s);for(s of n.m)H(s,De),r(s)}f(this,Lt).add(t)}capture(t,r,n=!1){t.v!==K&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&Qe)===0&&(this.current.set(t,[r,n]),xe?.set(t,r)),this.is_fork||(t.v=r)}activate(){A=this}deactivate(){A=null,xe=null}flush(){try{xr=!0,A=this,L(this,D,Ht).call(this)}finally{vn=0,Pr=null,Et=null,or=null,xr=!1,A=null,xe=null,dt.clear()}}discard(){for(const t of f(this,jt))t(this);f(this,jt).clear(),f(this,at).clear(),L(this,D,St).call(this)}register_created_effect(t){f(this,Zt).push(t)}increment(t,r){if(E(this,Ct,f(this,Ct)+1),t){let n=f(this,He).get(r)??0;f(this,He).set(r,n+1)}}decrement(t,r){if(E(this,Ct,f(this,Ct)-1),t){let n=f(this,He).get(r)??0;n===1?f(this,He).delete(r):f(this,He).set(r,n-1)}f(this,lt)||(E(this,lt,!0),vt(()=>{E(this,lt,!1),this.linked&&this.flush()}))}transfer_effects(t,r){for(const n of t)f(this,Xe).add(n);for(const n of r)f(this,Oe).add(n);t.clear(),r.clear()}oncommit(t){f(this,At).add(t)}ondiscard(t){f(this,jt).add(t)}on_fork_commit(t){f(this,at).add(t)}run_fork_commit_callbacks(){for(const t of f(this,at))t(this);f(this,at).clear()}settled(){return(f(this,Xt)??E(this,Xt,Ln())).promise}static ensure(){var t;if(A===null){const r=A=new yr;L(t=r,D,Hr).call(t),!xr&&!Kt&&vt(()=>{f(r,xt)||r.flush()})}return A}apply(){{xe=null;return}}schedule(t){if(Pr=t,t.b?.is_pending&&(t.f&(Mt|Sr|On))!==0&&(t.f&mt)===0){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var n=r.f;if(Et!==null&&r===C&&(j===null||(j.f&Z)===0))return;if((n&(et|Le))!==0){if((n&Y)===0)return;r.f^=Y}}f(this,oe).push(r)}};xt=new WeakMap,We=new WeakMap,it=new WeakMap,At=new WeakMap,jt=new WeakMap,at=new WeakMap,Ct=new WeakMap,He=new WeakMap,Xt=new WeakMap,oe=new WeakMap,Zt=new WeakMap,Xe=new WeakMap,Oe=new WeakMap,Me=new WeakMap,Lt=new WeakMap,lt=new WeakMap,D=new WeakSet,Nr=function(){if(this.is_fork)return!0;for(const n of f(this,He).keys()){for(var t=n,r=!1;t.parent!==null;){if(f(this,Me).has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1},Ht=function(){var a,u,v;if(E(this,xt,!0),vn++>1e3&&(L(this,D,St).call(this),ai()),!L(this,D,Nr).call(this)){for(const d of f(this,Xe))f(this,Oe).delete(d),H(d,X),this.schedule(d);for(const d of f(this,Oe))H(d,De),this.schedule(d)}const t=f(this,oe);E(this,oe,[]),this.apply();var r=Et=[],n=[],s=or=[];for(const d of t)try{L(this,D,qr).call(this,d,r,n)}catch(c){throw Un(d),c}if(A=null,s.length>0){var i=yr.ensure();for(const d of s)i.schedule(d)}if(Et=null,or=null,L(this,D,Nr).call(this)){L(this,D,fr).call(this,n),L(this,D,fr).call(this,r);for(const[d,c]of f(this,Me))Vn(d,c);s.length>0&&L(a=A,D,Ht).call(a);return}const l=L(this,D,Hn).call(this);if(l){L(u=l,D,In).call(u,this);return}f(this,Xe).clear(),f(this,Oe).clear();for(const d of f(this,At))d(this);f(this,At).clear(),Fr=this,dn(n),dn(r),Fr=null,f(this,Xt)?.resolve();var o=A;if(this.linked&&f(this,Ct)===0&&L(this,D,St).call(this),f(this,oe).length>0){o===null&&(o=this,L(this,D,Hr).call(this));const d=o;f(d,oe).push(...f(this,oe).filter(c=>!f(d,oe).includes(c)))}o!==null&&L(v=o,D,Ht).call(v)},qr=function(t,r,n){t.f^=Y;for(var s=t.first;s!==null;){var i=s.f,l=(i&(Le|et))!==0,o=l&&(i&Y)!==0,a=o||(i&re)!==0||f(this,Me).has(s);if(!a&&s.fn!==null){l?s.f^=Y:(i&Mt)!==0?r.push(s):nr(s)&&((i&Te)!==0&&f(this,Oe).add(s),$t(s));var u=s.first;if(u!==null){s=u;continue}}for(;s!==null;){var v=s.next;if(v!==null){s=v;break}s=s.parent}}},Hn=function(){for(var t=f(this,We);t!==null;){if(!t.is_fork){for(const[r,[,n]]of this.current)if(t.current.has(r)&&!n)return t}t=f(t,We)}return null},In=function(t){var n;for(const[s,i]of t.current)!this.previous.has(s)&&t.previous.has(s)&&this.previous.set(s,t.previous.get(s)),this.current.set(s,i);for(const[s,i]of t.async_deriveds){const l=this.async_deriveds.get(s);l&&i.promise.then(l.resolve)}const r=s=>{var i=s.reactions;if(i!==null)for(const a of i){var l=a.f;if((l&Z)!==0)r(a);else{var o=a;l&(Tt|Te)&&!this.async_deriveds.has(o)&&(f(this,Oe).delete(o),H(o,X),this.schedule(o))}}};for(const s of this.current.keys())r(s);this.oncommit(()=>t.discard()),L(n=t,D,St).call(n),A=this,L(this,D,Ht).call(this)},fr=function(t){for(var r=0;r!this.current.has(c));if(s.length===0)t&&d.discard();else if(r.length>0){if(t)for(const c of f(this,Lt))d.unskip_effect(c,p=>{var h;(p.f&(Te|Tt))!==0?d.schedule(p):L(h=d,D,fr).call(h,[p])});d.activate();var i=new Set,l=new Map;for(var o of r)Bn(o,s,i,l);l=new Map;var a=[...d.current.keys()].filter(c=>this.current.has(c)?this.current.get(c)[0]!==c.v:!0);if(a.length>0)for(const c of f(this,Zt))(c.f&(Ce|re|dr))===0&&Xr(c,a,l)&&((c.f&(Tt|Te))!==0?(H(c,X),d.schedule(c)):f(d,Xe).add(c));if(f(d,oe).length>0&&!f(d,lt)){d.apply();for(var u of f(d,oe))L(v=d,D,qr).call(v,u,[],[]);E(d,oe,[])}d.deactivate()}}}},Hr=function(){wt===null?Tr=wt=this:(E(wt,it,this),E(this,We,wt)),wt=this},St=function(){var t=f(this,We),r=f(this,it);t===null?Tr=r:E(t,it,r),r===null?wt=t:E(r,We,t),this.linked=!1};let yt=yr;function ii(e){var t=Kt;Kt=!0;try{for(var r;;){if(ti(),A===null)return r;A.flush()}}finally{Kt=t}}function ai(){try{qs()}catch(e){Je(e,Pr)}}let qe=null;function dn(e){var t=e.length;if(t!==0){for(var r=0;r0)){dt.clear();for(const s of qe){if((s.f&(Ce|re))!==0)continue;const i=[s];let l=s.parent;for(;l!==null;)qe.has(l)&&(qe.delete(l),i.push(l)),l=l.parent;for(let o=i.length-1;o>=0;o--){const a=i[o];(a.f&(Ce|re))===0&&$t(a)}}qe.clear()}}qe=null}}function Bn(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const s of e.reactions){const i=s.f;(i&Z)!==0?Bn(s,t,r,n):(i&(Tt|Te))!==0&&(i&X)===0&&Xr(s,t,n)&&(H(s,X),Zr(s))}}function Xr(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const s of e.deps){if(ct.call(t,s))return!0;if((s.f&Z)!==0&&Xr(s,t,r))return r.set(s,!0),!0}return r.set(e,!1),!1}function Zr(e){A.schedule(e)}function Vn(e,t){if(!((e.f&Le)!==0&&(e.f&Y)!==0)){(e.f&X)!==0?t.d.push(e):(e.f&De)!==0&&t.m.push(e),H(e,Y);for(var r=e.first;r!==null;)Vn(r,t),r=r.next}}function Un(e){H(e,Y);for(var t=e.first;t!==null;)Un(t),t=t.next}function li(e){let t=0,r=bt(0),n;return()=>{tn()&&(b(r),is(()=>(t===0&&(n=gs(()=>e(()=>Yt(r)))),t+=1,()=>{vt(()=>{t-=1,t===0&&(n?.(),n=void 0,Yt(r))})})))}}var oi=Rt|Ft;function fi(e,t,r,n){new ui(e,t,r,n)}var de,Yr,he,ot,se,_e,ee,fe,Ie,ft,Ze,Ot,Jt,Qt,Be,br,I,ci,vi,di,Ir,ur,cr,Br,Vr;class ui{constructor(t,r,n,s){T(this,I);ne(this,"parent");ne(this,"is_pending",!1);ne(this,"transform_error");T(this,de);T(this,Yr,null);T(this,he);T(this,ot);T(this,se);T(this,_e,null);T(this,ee,null);T(this,fe,null);T(this,Ie,null);T(this,ft,0);T(this,Ze,0);T(this,Ot,!1);T(this,Jt,new Set);T(this,Qt,new Set);T(this,Be,null);T(this,br,li(()=>(E(this,Be,bt(f(this,ft))),()=>{E(this,Be,null)})));E(this,de,t),E(this,he,r),E(this,ot,i=>{var l=C;l.b=this,l.f|=zr,n(i)}),this.parent=C.b,this.transform_error=s??this.parent?.transform_error??(i=>i),E(this,se,rn(()=>{L(this,I,Ir).call(this)},oi))}defer_effect(t){qn(t,f(this,Jt),f(this,Qt))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!f(this,he).pending}update_pending_count(t,r){L(this,I,Br).call(this,t,r),E(this,ft,f(this,ft)+t),!(!f(this,Be)||f(this,Ot))&&(E(this,Ot,!0),vt(()=>{E(this,Ot,!1),f(this,Be)&&Dt(f(this,Be),f(this,ft))}))}get_effect_pending(){return f(this,br).call(this),b(f(this,Be))}error(t){if(!f(this,he).onerror&&!f(this,he).failed)throw t;A?.is_fork?(f(this,_e)&&A.skip_effect(f(this,_e)),f(this,ee)&&A.skip_effect(f(this,ee)),f(this,fe)&&A.skip_effect(f(this,fe)),A.on_fork_commit(()=>{L(this,I,Vr).call(this,t)})):L(this,I,Vr).call(this,t)}}de=new WeakMap,Yr=new WeakMap,he=new WeakMap,ot=new WeakMap,se=new WeakMap,_e=new WeakMap,ee=new WeakMap,fe=new WeakMap,Ie=new WeakMap,ft=new WeakMap,Ze=new WeakMap,Ot=new WeakMap,Jt=new WeakMap,Qt=new WeakMap,Be=new WeakMap,br=new WeakMap,I=new WeakSet,ci=function(){try{E(this,_e,pe(()=>f(this,ot).call(this,f(this,de))))}catch(t){this.error(t)}},vi=function(t){const r=f(this,he).failed;r&&E(this,fe,pe(()=>{r(f(this,de),()=>t,()=>()=>{})}))},di=function(){const t=f(this,he).pending;t&&(this.is_pending=!0,E(this,ee,pe(()=>t(f(this,de)))),vt(()=>{var r=E(this,Ie,document.createDocumentFragment()),n=ht();r.append(n),E(this,_e,L(this,I,cr).call(this,()=>pe(()=>f(this,ot).call(this,n)))),f(this,Ze)===0&&(f(this,de).before(r),E(this,Ie,null),_t(f(this,ee),()=>{E(this,ee,null)}),L(this,I,ur).call(this,A))}))},Ir=function(){try{if(this.is_pending=this.has_pending_snippet(),E(this,Ze,0),E(this,ft,0),E(this,_e,pe(()=>{f(this,ot).call(this,f(this,de))})),f(this,Ze)>0){var t=E(this,Ie,document.createDocumentFragment());an(f(this,_e),t);const r=f(this,he).pending;E(this,ee,pe(()=>r(f(this,de))))}else L(this,I,ur).call(this,A)}catch(r){this.error(r)}},ur=function(t){this.is_pending=!1,t.transfer_effects(f(this,Jt),f(this,Qt))},cr=function(t){var r=C,n=j,s=me;$e(f(this,se)),we(f(this,se)),zt(f(this,se).ctx);try{return yt.ensure(),t()}catch(i){return Pn(i),null}finally{$e(r),we(n),zt(s)}},Br=function(t,r){var n;if(!this.has_pending_snippet()){this.parent&&L(n=this.parent,I,Br).call(n,t,r);return}E(this,Ze,f(this,Ze)+t),f(this,Ze)===0&&(L(this,I,ur).call(this,r),f(this,ee)&&_t(f(this,ee),()=>{E(this,ee,null)}),f(this,Ie)&&(f(this,de).before(f(this,Ie)),E(this,Ie,null)))},Vr=function(t){f(this,_e)&&(ae(f(this,_e)),E(this,_e,null)),f(this,ee)&&(ae(f(this,ee)),E(this,ee,null)),f(this,fe)&&(ae(f(this,fe)),E(this,fe,null));var r=f(this,he).onerror;let n=f(this,he).failed;var s=!1,i=!1;const l=()=>{if(s){Qs();return}s=!0,i&&Vs(),f(this,fe)!==null&&_t(f(this,fe),()=>{E(this,fe,null)}),L(this,I,cr).call(this,()=>{L(this,I,Ir).call(this)})},o=a=>{try{i=!0,r?.(a,l),i=!1}catch(u){Je(u,f(this,se)&&f(this,se).parent)}n&&E(this,fe,L(this,I,cr).call(this,()=>{try{return pe(()=>{var u=C;u.b=this,u.f|=zr,n(f(this,de),()=>a,()=>l)})}catch(u){return Je(u,f(this,se).parent),null}}))};vt(()=>{var a;try{a=this.transform_error(t)}catch(u){Je(u,f(this,se)&&f(this,se).parent);return}a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(o,u=>Je(u,f(this,se)&&f(this,se).parent)):o(a)})};function hi(e,t,r,n){const s=Jr;var i=e.filter(c=>!c.settled);if(r.length===0&&i.length===0){n(t.map(s));return}var l=C,o=_i(),a=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(c=>c.promise)):null;function u(c){if((l.f&Ce)===0){o();try{n(c)}catch(p){Je(p,l)}_r()}}var v=Kn();if(r.length===0){a.then(()=>u(t.map(s))).finally(v);return}function d(){Promise.all(r.map(c=>pi(c))).then(c=>u([...t.map(s),...c])).catch(c=>Je(c,l)).finally(v)}a?a.then(()=>{o(),d(),_r()}):d()}function _i(){var e=C,t=j,r=me,n=A;return function(i=!0){$e(e),we(t),zt(r),i&&(e.f&Ce)===0&&(n?.activate(),n?.apply())}}function _r(e=!0){$e(null),we(null),zt(null),e&&A?.deactivate()}function Kn(){var e=C,t=e.b,r=A,n=t.is_rendered();return t.update_pending_count(1,r),r.increment(n,e),()=>{t.update_pending_count(-1,r),r.decrement(n,e)}}function Jr(e){var t=Z|X;return C!==null&&(C.f|=Ft),{ctx:me,deps:null,effects:null,equals:zn,f:t,fn:e,reactions:null,rv:0,v:K,wv:0,parent:C,ac:null}}const sr=Symbol("obsolete");function pi(e,t,r){let n=C;n===null&&Ds();var s=void 0,i=bt(K),l=!j,o=new Set;return Mi(()=>{var a=C,u=Ln();s=u.promise;try{Promise.resolve(e()).then(u.resolve,p=>{p!==kr&&u.reject(p)}).finally(_r)}catch(p){u.reject(p),_r()}var v=A;if(l){if((a.f&mt)!==0)var d=Kn();if(n.b.is_rendered())v.async_deriveds.get(a)?.reject(sr);else for(const p of o.values())p.reject(sr);o.add(u),v.async_deriveds.set(a,u)}const c=(p,h=void 0)=>{d?.(),o.delete(u),h!==sr&&(v.activate(),h?(i.f|=Qe,Dt(i,h)):((i.f&Qe)!==0&&(i.f^=Qe),Dt(i,p)),v.deactivate())};u.promise.then(c,p=>c(null,p||"unknown"))}),rs(()=>{for(const a of o)a.reject(sr)}),new Promise(a=>{function u(v){function d(){v===s?a(i):u(s)}v.then(d,d)}u(s)})}function te(e){const t=Jr(e);return us(t),t}function gi(e){const t=Jr(e);return t.equals=Dn,t}function yi(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r0&&!Wn&&wi()}return t}function wi(){Wn=!1;for(const e of pr){(e.f&Y)!==0&&H(e,De);let t;try{t=nr(e)}catch{t=!0}t&&$t(e)}pr.clear()}function Yt(e){q(e,e.v+1)}function Xn(e,t,r){var n=e.reactions;if(n!==null)for(var s=n.length,i=0;i{if(pt===i)return o();var a=j,u=pt;we(null),yn(i);var v=o();return we(a),yn(u),v};return n&&r.set("length",W(e.length)),new Proxy(e,{defineProperty(o,a,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Hs();var v=r.get(a);return v===void 0?l(()=>{var d=W(u.value);return r.set(a,d),d}):q(v,u.value,!0),!0},deleteProperty(o,a){var u=r.get(a);if(u===void 0){if(a in o){const v=l(()=>W(K));r.set(a,v),Yt(s)}}else q(u,K),Yt(s);return!0},get(o,a,u){if(a===Ut)return e;var v=r.get(a),d=a in o;if(v===void 0&&(!d||Vt(o,a)?.writable)&&(v=l(()=>{var p=ge(d?o[a]:K),h=W(p);return h}),r.set(a,v)),v!==void 0){var c=b(v);return c===K?void 0:c}return Reflect.get(o,a,u)},getOwnPropertyDescriptor(o,a){var u=Reflect.getOwnPropertyDescriptor(o,a);if(u&&"value"in u){var v=r.get(a);v&&(u.value=b(v))}else if(u===void 0){var d=r.get(a),c=d?.v;if(d!==void 0&&c!==K)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return u},has(o,a){if(a===Ut)return!0;var u=r.get(a),v=u!==void 0&&u.v!==K||Reflect.has(o,a);if(u!==void 0||C!==null&&(!v||Vt(o,a)?.writable)){u===void 0&&(u=l(()=>{var c=v?ge(o[a]):K,p=W(c);return p}),r.set(a,u));var d=b(u);if(d===K)return!1}return v},set(o,a,u,v){var d=r.get(a),c=a in o;if(n&&a==="length")for(var p=u;pW(K)),r.set(p+"",h))}if(d===void 0)(!c||Vt(o,a)?.writable)&&(d=l(()=>W(void 0)),q(d,ge(u)),r.set(a,d));else{c=d.v!==K;var g=l(()=>ge(u));q(d,g)}var _=Reflect.getOwnPropertyDescriptor(o,a);if(_?.set&&_.set.call(v,u),!c){if(n&&typeof a=="string"){var m=r.get("length"),w=Number(a);Number.isInteger(w)&&w>=m.v&&q(m,w+1)}Yt(s)}return!0},ownKeys(o){b(s);var a=Reflect.ownKeys(o).filter(d=>{var c=r.get(d);return c===void 0||c.v!==K});for(var[u,v]of r)v.v!==K&&!(u in o)&&a.push(u);return a},setPrototypeOf(){Is()}})}function hn(e){try{if(e!==null&&typeof e=="object"&&Ut in e)return e[Ut]}catch{}return e}function Si(e,t){return Object.is(hn(e),hn(t))}var _n,Zn,Jn,Qn;function ki(){if(_n===void 0){_n=window,Zn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Jn=Vt(t,"firstChild").get,Qn=Vt(t,"nextSibling").get,un(e)&&(e[Dr]=void 0,e[ar]=null,e[$r]=void 0,e.__e=void 0),un(r)&&(r[qt]=void 0)}}function ht(e=""){return document.createTextNode(e)}function gr(e){return Jn.call(e)}function rr(e){return Qn.call(e)}function y(e,t){return gr(e)}function Ei(e,t=!1){{var r=gr(e);return r instanceof Comment&&r.data===""?rr(r):r}}function k(e,t=1,r=!1){let n=e;for(;t--;)n=rr(n);return n}function Ti(e){e.textContent=""}function es(){return!1}function xi(e,t,r){return document.createElementNS(Rn,e,void 0)}let pn=!1;function Ai(){pn||(pn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[lr]?.()})},{capture:!0}))}function en(e){var t=j,r=C;we(null),$e(null);try{return e()}finally{we(t),$e(r)}}function ts(e,t,r,n=r){e.addEventListener(t,()=>en(r));const s=e[lr];s?e[lr]=()=>{s(),n(!0)}:e[lr]=()=>n(!0),Ai()}function ji(e){C===null&&(j===null&&Ns(),Ps()),tt&&Fs()}function Ci(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Ye(e,t){var r=C;r!==null&&(r.f&re)!==0&&(e|=re);var n={ctx:me,deps:null,nodes:null,f:e|X|ye,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};A?.register_created_effect(n);var s=n;if((e&Mt)!==0)Et!==null?Et.push(n):yt.ensure().schedule(n);else if(t!==null){try{$t(n)}catch(l){throw ae(n),l}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&Ft)===0&&(s=s.first,(e&Te)!==0&&(e&Rt)!==0&&s!==null&&(s.f|=Rt))}if(s!==null&&(s.parent=r,r!==null&&Ci(s,r),j!==null&&(j.f&Z)!==0&&(e&et)===0)){var i=j;(i.effects??(i.effects=[])).push(s)}return n}function tn(){return j!==null&&!Ae}function rs(e){const t=Ye(Sr,null);return H(t,Y),t.teardown=e,t}function ns(e){ji();var t=C.f,r=!j&&(t&Le)!==0&&(t&mt)===0;if(r){var n=me;(n.e??(n.e=[])).push(e)}else return ss(e)}function ss(e){return Ye(Mt|Rs,e)}function Li(e){yt.ensure();const t=Ye(et|Ft,e);return(r={})=>new Promise(n=>{r.outro?_t(t,()=>{ae(t),n(void 0)}):(ae(t),n(void 0))})}function Oi(e){return Ye(Mt,e)}function Mi(e){return Ye(Tt|Ft,e)}function is(e,t=0){return Ye(Sr|t,e)}function G(e,t=[],r=[],n=[]){hi(n,t,r,s=>{Ye(Sr,()=>e(...s.map(b)))})}function rn(e,t=0){var r=Ye(Te|t,e);return r}function pe(e){return Ye(Le|Ft,e)}function as(e){var t=e.teardown;if(t!==null){const r=tt,n=j;gn(!0),we(null);try{t.call(null)}finally{gn(r),we(n)}}}function nn(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const s=r.ac;s!==null&&en(()=>{s.abort(kr)});var n=r.next;(r.f&et)!==0?r.parent=null:ae(r,t),r=n}}function Ri(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&Le)===0&&ae(t),t=r}}function ae(e,t=!0){var r=!1;(t||(e.f&Ms)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(zi(e.nodes.start,e.nodes.end),r=!0),H(e,cn),nn(e,t&&!r),Wt(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const i of n)i.stop();as(e),e.f^=cn,e.f|=Ce;var s=e.parent;s!==null&&s.first!==null&&ls(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function zi(e,t){for(;e!==null;){var r=e===t?null:rr(e);e.remove(),e=r}}function ls(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function _t(e,t,r=!0){var n=[];os(e,n,!0);var s=()=>{r&&ae(e),t&&t()},i=n.length;if(i>0){var l=()=>--i||s();for(var o of n)o.out(l)}else s()}function os(e,t,r){if((e.f&re)===0){e.f^=re;var n=e.nodes&&e.nodes.t;if(n!==null)for(const o of n)(o.is_global||r)&&t.push(o);for(var s=e.first;s!==null;){var i=s.next;if((s.f&et)===0){var l=(s.f&Rt)!==0||(s.f&Le)!==0&&(e.f&Te)!==0;os(s,t,l?r:!1)}s=i}}}function sn(e){fs(e,!0)}function fs(e,t){if((e.f&re)!==0){e.f^=re,(e.f&Y)===0&&(H(e,X),yt.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,s=(r.f&Rt)!==0||(r.f&Le)!==0;fs(r,s?t:!1),r=n}var i=e.nodes&&e.nodes.t;if(i!==null)for(const l of i)(l.is_global||t)&&l.in()}}function an(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var s=r===n?null:rr(r);t.append(r),r=s}}let vr=!1,tt=!1;function gn(e){tt=e}let j=null,Ae=!1;function we(e){j=e}let C=null;function $e(e){C=e}let be=null;function us(e){j!==null&&(be===null?be=[e]:be.push(e))}let ie=null,le=0,ve=null;function Di(e){ve=e}let cs=1,nt=0,pt=nt;function yn(e){pt=e}function vs(){return++cs}function nr(e){var t=e.f;if((t&X)!==0)return!0;if(t&Z&&(e.f&=~gt),(t&De)!==0){for(var r=e.deps,n=r.length,s=0;se.wv)return!0}(t&ye)!==0&&xe===null&&H(e,Y)}return!1}function ds(e,t,r=!0){var n=e.reactions;if(n!==null&&!(be!==null&&ct.call(be,e)))for(var s=0;s{e.ac.abort(kr)}),e.ac=null);try{e.f|=hr;var v=e.fn,d=v();e.f|=mt;var c=e.deps,p=A?.is_fork;if(ie!==null){var h;if(p||Wt(e,le),c!==null&&le>0)for(c.length=le+ie.length,h=0;h{throw _});throw c}}finally{e[st]=t,delete e.currentTarget,we(v),$e(d)}}}const qi=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Hi(e){return qi?.createHTML(e)??e}function Ii(e){var t=xi("template");return t.innerHTML=Hi(e.replaceAll("","")),t.content}function wn(e,t){var r=C;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function $(e,t){var r=(t&Ws)!==0,n=(t&Xs)!==0,s,i=!e.startsWith("");return()=>{s===void 0&&(s=Ii(i?e:""+e),r||(s=gr(s)));var l=n||Zn?document.importNode(s,!0):s.cloneNode(!0);if(r){var o=gr(l),a=l.lastChild;wn(o,a)}else wn(l,l);return l}}function z(e,t){e!==null&&e.before(t)}function P(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[qt]??(e[qt]=e.nodeValue))&&(e[qt]=r,e.nodeValue=`${r}`)}function Bi(e,t){return Vi(e,t)}const ir=new Map;function Vi(e,{target:t,anchor:r,props:n={},events:s,context:i,intro:l=!0,transformError:o}){ki();var a=void 0,u=Li(()=>{var v=r??t.appendChild(ht());fi(v,{pending:()=>{}},p=>{Fe({});var h=me;i&&(h.c=i),s&&(n.$$events=s),a=e(p,n)||{},Pe()},o);var d=new Set,c=p=>{for(var h=0;h{for(var p of d)for(const _ of[t,document]){var h=ir.get(_),g=h.get(p);--g==0?(_.removeEventListener(p,mn),h.delete(p),h.size===0&&ir.delete(_)):h.set(p,g)}Ur.delete(c),v!==r&&v.parentNode?.removeChild(v)}});return Ui.set(a,u),a}let Ui=new WeakMap;var ke,Re,ue,ut,er,tr,mr;class Ki{constructor(t,r=!0){ne(this,"anchor");T(this,ke,new Map);T(this,Re,new Map);T(this,ue,new Map);T(this,ut,new Set);T(this,er,!0);T(this,tr,t=>{if(f(this,ke).has(t)){var r=f(this,ke).get(t),n=f(this,Re).get(r);if(n)sn(n),f(this,ut).delete(r);else{var s=f(this,ue).get(r);s&&(f(this,Re).set(r,s.effect),f(this,ue).delete(r),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),n=s.effect)}for(const[i,l]of f(this,ke)){if(f(this,ke).delete(i),i===t)break;const o=f(this,ue).get(l);o&&(ae(o.effect),f(this,ue).delete(l))}for(const[i,l]of f(this,Re)){if(i===r||f(this,ut).has(i))continue;const o=()=>{if(Array.from(f(this,ke).values()).includes(i)){var u=document.createDocumentFragment();an(l,u),u.append(ht()),f(this,ue).set(i,{effect:l,fragment:u})}else ae(l);f(this,ut).delete(i),f(this,Re).delete(i)};f(this,er)||!n?(f(this,ut).add(i),_t(l,o,!1)):o()}}});T(this,mr,t=>{f(this,ke).delete(t);const r=Array.from(f(this,ke).values());for(const[n,s]of f(this,ue))r.includes(n)||(ae(s.effect),f(this,ue).delete(n))});this.anchor=t,E(this,er,r)}ensure(t,r){var n=A,s=es();if(r&&!f(this,Re).has(t)&&!f(this,ue).has(t))if(s){var i=document.createDocumentFragment(),l=ht();i.append(l),f(this,ue).set(t,{effect:pe(()=>r(l)),fragment:i})}else f(this,Re).set(t,pe(()=>r(this.anchor)));if(f(this,ke).set(n,t),s){for(const[o,a]of f(this,Re))o===t?n.unskip_effect(a):n.skip_effect(a);for(const[o,a]of f(this,ue))o===t?n.unskip_effect(a.effect):n.skip_effect(a.effect);n.oncommit(f(this,tr)),n.ondiscard(f(this,mr))}else f(this,tr).call(this,n)}}ke=new WeakMap,Re=new WeakMap,ue=new WeakMap,ut=new WeakMap,er=new WeakMap,tr=new WeakMap,mr=new WeakMap;function Ue(e,t,r=!1){var n=new Ki(e),s=r?Rt:0;function i(l,o){n.ensure(l,o)}rn(()=>{var l=!1;t((o,a=0)=>{l=!0,i(a,o)}),l||i(-1,null)},s)}function Yi(e,t,r){for(var n=[],s=t.length,i,l=t.length,o=0;o{if(i){if(i.pending.delete(d),i.done.add(d),i.pending.size===0){var c=e.outrogroups;Kr(e,wr(i.done)),c.delete(i),c.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var a=n.length===0&&r!==null;if(a){var u=r,v=u.parentNode;Ti(v),v.append(u),e.items.clear()}Kr(e,t,!a)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function Kr(e,t,r=!0){var n;if(e.pending.size>0){n=new Set;for(const l of e.pending.values())for(const o of l)n.add(e.items.get(o).e)}for(var s=0;s{var S=r();return Gr(S)?S:S==null?[]:wr(S)}),c,p=new Map,h=!0;function g(S){(w.effect.f&Ce)===0&&(w.pending.delete(S),w.fallback=v,Gi(w,c,l,t,n),v!==null&&(c.length===0?(v.f&ze)===0?sn(v):(v.f^=ze,It(v,null,l)):_t(v,()=>{v=null})))}function _(S){w.pending.delete(S)}var m=rn(()=>{c=b(d);for(var S=c.length,F=new Set,U=A,J=es(),B=0;Bi(l)):(v=pe(()=>i(Sn??(Sn=ht()))),v.f|=ze)),S>F.size&&$s(),!h)if(p.set(U,F),J){for(const[R,N]of o)F.has(R)||U.skip_effect(N.e);U.oncommit(g),U.ondiscard(_)}else g(U);b(d)}),w={effect:m,items:o,pending:p,outrogroups:null,fallback:v};h=!1}function Nt(e){for(;e!==null&&(e.f&Le)===0;)e=e.next;return e}function Gi(e,t,r,n,s){var i=(n&Ys)!==0,l=t.length,o=e.items,a=Nt(e.effect.first),u,v=null,d,c=[],p=[],h,g,_,m;if(i)for(m=0;m0){var O=(n&Mn)!==0&&l===0?r:null;if(i){for(m=0;m{if(d!==void 0)for(_ of d)_.nodes?.a?.apply()})}function Wi(e,t,r,n,s,i,l,o){var a=(l&Us)!==0?(l&Gs)===0?mi(r,!1,!1):bt(r):null,u=(l&Ks)!==0?bt(s):null;return{v:a,i:u,e:pe(()=>(i(t,a??r,u??s,o),()=>{e.delete(n)}))}}function It(e,t,r){if(e.nodes)for(var n=e.nodes.start,s=e.nodes.end,i=t&&(t.f&ze)===0?t.nodes.start:r;n!==null;){var l=rr(n);if(i.before(n),n===s)return;n=l}}function Ge(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}const kn=[...` -\r\f \v\uFEFF`];function Xi(e,t,r){var n=e==null?"":""+e;if(r){for(var s of Object.keys(r))if(r[s])n=n?n+" "+s:s;else if(n.length)for(var i=s.length,l=0;(l=n.indexOf(s,l))>=0;){var o=l+i;(l===0||kn.includes(n[l-1]))&&(o===n.length||kn.includes(n[o]))?n=(l===0?"":n.substring(0,l))+n.substring(o+1):l=o}}return n===""?null:n}function En(e,t=!1){var r=t?" !important;":";",n="";for(var s of Object.keys(e)){var i=e[s];i!=null&&i!==""&&(n+=" "+s+": "+i+r)}return n}function Ar(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function Zi(e,t){if(t){var r="",n,s;if(Array.isArray(t)?(n=t[0],s=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,l=0,o=!1,a=[];n&&a.push(...Object.keys(n).map(Ar)),s&&a.push(...Object.keys(s).map(Ar));var u=0,v=-1;const g=e.length;for(var d=0;d{ms(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),rs(()=>{t.disconnect()})}function Qi(e,t,r=t){var n=new WeakSet,s=!0;ts(e,"change",i=>{var l=i?"[selected]":":checked",o;if(e.multiple)o=[].map.call(e.querySelectorAll(l),Gt);else{var a=e.querySelector(l)??e.querySelector("option:not([disabled])");o=a&&Gt(a)}r(o),e.__value=o,A!==null&&n.add(A)}),Oi(()=>{var i=t();if(e===document.activeElement){var l=A;if(n.has(l))return}if(ms(e,i,s),s&&i===void 0){var o=e.querySelector(":checked");o!==null&&(i=Gt(o),r(i))}e.__value=i,s=!1}),Ji(e)}function Gt(e){return"__value"in e?e.__value:e.value}const ea=Symbol("is custom element"),ta=Symbol("is html");function Ve(e,t,r,n){var s=ra(e);s[t]!==(s[t]=r)&&(t==="loading"&&(e[zs]=r),r==null?e.removeAttribute(t):typeof r!="string"&&na(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function ra(e){return e[ar]??(e[ar]={[ea]:e.nodeName.includes("-"),[ta]:e.namespaceURI===Rn})}var Tn=new Map;function na(e){var t=e.getAttribute("is")||e.nodeName,r=Tn.get(t);if(r)return r;Tn.set(t,r=[]);for(var n,s=e,i=Element.prototype;i!==s;){n=As(s);for(var l in n)n[l].set&&l!=="innerHTML"&&l!=="textContent"&&l!=="innerText"&&r.push(l);s=Cn(s)}return r}function Cr(e,t,r=t){var n=new WeakSet;ts(e,"input",async s=>{var i=s?e.defaultValue:e.value;if(i=Lr(e)?Or(i):i,r(i),A!==null&&n.add(A),await Fi(),i!==(i=t())){var l=e.selectionStart,o=e.selectionEnd,a=e.value.length;if(e.value=i??"",o!==null){var u=e.value.length;l===o&&o===a&&u>a?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=l,e.selectionEnd=Math.min(o,u))}}}),gs(t)==null&&e.value&&(r(Lr(e)?Or(e.value):e.value),A!==null&&n.add(A)),is(()=>{var s=t();if(e===document.activeElement){var i=A;if(n.has(i))return}Lr(e)&&s===Or(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function Lr(e){var t=e.type;return t==="number"||t==="range"}function Or(e){return e===""?null:+e}function Mr(e,t,r,n){var s=n,i=!0,l=()=>(i&&(i=!1,s=n),s),o;o=e[t],o===void 0&&n!==void 0&&(o=l());var a;return a=()=>{var u=e[t];return u===void 0?l():(i=!0,u)},a}const sa="5";var jn;typeof window<"u"&&((jn=window.__svelte??(window.__svelte={})).v??(jn.v=new Set)).add(sa);const kt=typeof window<"u"&&window.slashedBricksApp?window.slashedBricksApp:{defaults:{},settings:{},tabs:{},rest:{url:"",nonce:""}},ce={defaults:kt.defaults||{},tabs:kt.tabs||{},rest:kt.rest||{url:"",nonce:""},inventory:kt.inventory||{variables:[],sf_classes:[],is_classes:[]},pluginSettings:kt.pluginSettings||{}},Ee=ge(structuredClone(kt.settings||{})),x=ge({activeTab:ia(ce.tabs)||"colors",dirty:!1,saving:!1,lastSavedAt:null,error:""});function ia(e){for(const t in e)return t;return null}function aa(){x.dirty=!0,x.error=""}function la(e){Ee[e]&&delete Ee[e]}var oa=$(''),fa=$('');function ua(e,t){Fe(t,!0);var r=fa();Ke(r,21,()=>Object.entries(ce.tabs),([n,s])=>n,(n,s)=>{var i=te(()=>Rr(b(s),2));let l=()=>b(i)[0],o=()=>b(i)[1];var a=oa();let u;var v=y(a);G(()=>{u=bs(a,1,"tab-nav__btn svelte-yyiz68",null,u,{active:x.activeTab===l()}),P(v,o())}),je("click",a,()=>x.activeTab=l()),z(n,a)}),z(e,r),Pe()}Pt(["click"]);var ca=$(' '),va=$(' ',1),da=$(''),ha=$('
          ');function xn(e,t){Fe(t,!0);let r=Mr(t,"hexHint",3,""),n=Mr(t,"rawHint",3,""),s=Mr(t,"cssVar",3,"");const i=/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,l=(()=>{const R=(Ee.colors?.[t.storeKey]??"").trim(),N=R===""||i.test(R);return{mode:N?"hex":"raw",hex:N?R:"",raw:N?"":R}})();let o=W(ge(l.mode)),a=W(ge(l.hex)),u=W(ge(l.raw));function v(){Ee.colors||(Ee.colors={});const R=b(u).trim(),N=b(a).trim(),V=b(o)==="raw"?R:N;V===""?delete Ee.colors[t.storeKey]:Ee.colors[t.storeKey]=V,aa()}function d(){b(o)==="hex"?(q(o,"raw"),q(a,"")):(q(o,"hex"),q(u,"")),v()}const c=te(()=>(b(o)==="raw"?b(u):b(a))||r()||"transparent");var p=ha(),h=y(p),g=y(h),_=y(g),m=k(g,2);{var w=R=>{var N=ca(),V=y(N);G(()=>P(V,s())),z(R,N)};Ue(m,R=>{s()&&R(w)})}var S=k(h,2),F=y(S);let U;var J=k(F,2);{var B=R=>{var N=va(),V=Ei(N),Se=k(V,2);G(()=>{Ve(V,"id",t.storeKey),Ve(Se,"placeholder",r())}),je("input",V,v),Cr(V,()=>b(a),Ne=>q(a,Ne)),je("input",Se,v),Cr(Se,()=>b(a),Ne=>q(a,Ne)),z(R,N)},Q=R=>{var N=da();G(()=>{Ve(N,"id",t.storeKey),Ve(N,"placeholder",n())}),je("input",N,v),Cr(N,()=>b(u),V=>q(u,V)),z(R,N)};Ue(J,R=>{b(o)==="hex"?R(B):R(Q,-1)})}var O=k(J,2),M=y(O);G(()=>{Ve(g,"for",t.storeKey),P(_,t.label),U=Bt(F,"",U,{background:b(c)}),P(M,b(o)==="hex"?"Advanced (oklch / raw)":"Use HEX picker")}),je("click",O,d),z(e,p),Pe()}Pt(["input","click"]);var _a=$(`

          Brand Colors

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

          ');function Ta(e,t){De(t,!0);var s=Ea();le(s,21,()=>Object.entries(_e.tabs),([r,n])=>r,(r,n)=>{var i=W(()=>Xs(_(n),2));let o=()=>_(i)[0],l=()=>_(i)[1];var a=Sa();let f;var d=y(a);B(()=>{f=ls(a,1,"tab-nav__btn svelte-yyiz68",null,f,{active:E.activeTab===o()}),L(d,l())}),ce("click",a,()=>E.activeTab=o()),C(r,a)}),C(e,s),Pe()}zt(["click"]);var ja=z(' '),Aa=z(' ',1),Ca=z(''),za=z('
          ');function Br(e,t){De(t,!0);let s=Zs(t,"hexHint",3,""),r=Zs(t,"rawHint",3,""),n=Zs(t,"cssVar",3,"");const i=/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,o=(()=>{const P=(Ce.colors?.[t.storeKey]??"").trim(),q=P===""||i.test(P);return{mode:q?"hex":"raw",hex:q?P:"",raw:q?"":P}})();let l=Z(ke(o.mode)),a=Z(ke(o.hex)),f=Z(ke(o.raw));function d(){Ce.colors||(Ce.colors={});const P=_(f).trim(),q=_(a).trim(),T=_(l)==="raw"?P:q;T===""?delete Ce.colors[t.storeKey]:Ce.colors[t.storeKey]=T,ka()}function v(){_(l)==="hex"?(I(l,"raw"),I(a,"")):(I(l,"hex"),I(f,"")),d()}const u=W(()=>(_(l)==="raw"?_(f):_(a))||s()||"transparent");var g=za(),p=y(g),m=y(p),h=y(m),w=k(m,2);{var b=P=>{var q=ja(),T=y(q);B(()=>L(T,n())),C(P,q)};fe(w,P=>{n()&&P(b)})}var x=k(p,2),$=y(x);let U;var X=k($,2);{var V=P=>{var q=Aa(),T=Ii(q),H=k(T,2);B(()=>{We(T,"id",t.storeKey),We(H,"placeholder",s())}),ce("input",T,d),zs(T,()=>_(a),G=>I(a,G)),ce("input",H,d),zs(H,()=>_(a),G=>I(a,G)),C(P,q)},ee=P=>{var q=Ca();B(()=>{We(q,"id",t.storeKey),We(q,"placeholder",r())}),ce("input",q,d),zs(q,()=>_(f),T=>I(f,T)),C(P,q)};fe(X,P=>{_(l)==="hex"?P(V):P(ee,-1)})}var M=k(X,2),D=y(M);B(()=>{We(m,"for",t.storeKey),L(h,t.label),U=rs($,"",U,{background:_(u)}),L(D,_(l)==="hex"?"Advanced (oklch / raw)":"Use HEX picker")}),ce("click",M,v),C(e,g),Pe()}zt(["input","click"]);var La=z(`

          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 pa(e,t){Fe(t,!0);const r=ce.defaults?.colors??{},n=o=>o.charAt(0).toUpperCase()+o.slice(1);var s=_a(),i=k(y(s),4);Ke(i,21,()=>Object.entries(r.brand??{}),([o,a])=>o,(o,a)=>{var u=te(()=>Rr(b(a),2));let v=()=>b(u)[0],d=()=>b(u)[1];{let c=te(()=>`brand_${v()}`),p=te(()=>n(v())),h=te(()=>r.brand_hex_hints?.[v()]??""),g=te(()=>`--sf-color-${v()}-light`);xn(o,{get storeKey(){return b(c)},get label(){return b(p)},get hexHint(){return b(h)},get rawHint(){return d()},get cssVar(){return b(g)}})}});var l=k(i,4);Ke(l,21,()=>Object.entries(r.status??{}),([o,a])=>o,(o,a)=>{var u=te(()=>Rr(b(a),2));let v=()=>b(u)[0],d=()=>b(u)[1];{let c=te(()=>`status_${v()}`),p=te(()=>n(v())),h=te(()=>r.status_hex_hints?.[v()]??""),g=te(()=>`--sf-color-${v()}-light`);xn(o,{get storeKey(){return b(c)},get label(){return b(p)},get hexHint(){return b(h)},get rawHint(){return d()},get cssVar(){return b(g)}})}}),z(e,s),Pe()}var ga=$('
        • '),ya=$('
            '),ba=$('
            '),ma=$(`

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

            `);function wa(e,t){Fe(t,!0);const r=ce.inventory?.variables??[],n={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"},s=["Colors","Typography","Spacing","Sizing","Layout","Borders","Radius","Shadows","Effects","Motion","Icons","Z-Index","States","Focus","Scroll","Print","Misc"];function i(h){let g=h;g.startsWith("--sf-")&&(g=g.slice(5));const _=g.indexOf("-"),m=_===-1?g:g.slice(0,_);return n[m]||"Misc"}function l(h){const g={};for(const m of h){const w=i(m);g[w]||(g[w]=[]),g[w].push(m)}const _=[];for(const m of s)g[m]?.length&&(g[m].sort(),_.push({category:m,items:g[m]}));for(const m of Object.keys(g))!s.includes(m)&&g[m]?.length&&(g[m].sort(),_.push({category:m,items:g[m]}));return _}const o=l(r);let a=ge({});function u(h){a[h]=!a[h]}var v=ma(),d=y(v),c=y(d),p=k(d,4);Ke(p,17,()=>o,({category:h,items:g})=>h,(h,g)=>{let _=()=>b(g).category,m=()=>b(g).items;var w=ba(),S=y(w),F=y(S),U=y(F),J=k(F,2),B=y(J),Q=k(J,2),O=y(Q),M=k(S,2);{var R=N=>{var V=ya();Ke(V,20,m,Se=>Se,(Se,Ne)=>{var on=ga(),ws=y(on),Ss=y(ws);G(()=>P(Ss,Ne)),z(Se,on)}),z(N,V)};Ue(M,N=>{a[_()]&&N(R)})}G(()=>{Ve(S,"aria-expanded",a[_()]?"true":"false"),P(U,a[_()]?"▼":"▶"),P(B,_()),P(O,`(${m().length??""})`)}),je("click",S,()=>u(_())),z(h,w)}),G(()=>P(c,`CSS Variables (${r.length??""})`)),z(e,v),Pe()}Pt(["click"]);var Sa=$('
          • '),ka=$('
              '),Ea=$('
            • '),Ta=$('
                '),xa=$('

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

                ');function Aa(e,t){Fe(t,!0);const r=ce.inventory?.sf_classes??[],n=ce.inventory?.is_classes??[];let s=W(!1),i=W(!1);var l=xa(),o=y(l),a=y(o),u=k(o,4),v=y(u),d=y(v),c=y(d),p=k(d,4),h=y(p),g=k(v,2);{var _=O=>{var M=ka();Ke(M,20,()=>r,R=>R,(R,N)=>{var V=Sa(),Se=y(V),Ne=y(Se);G(()=>P(Ne,`.${N??""}`)),z(R,V)}),z(O,M)};Ue(g,O=>{b(s)&&O(_)})}var m=k(u,2),w=y(m),S=y(w),F=y(S),U=k(S,4),J=y(U),B=k(w,2);{var Q=O=>{var M=Ta();Ke(M,20,()=>n,R=>R,(R,N)=>{var V=Ea(),Se=y(V),Ne=y(Se);G(()=>P(Ne,`.${N??""}`)),z(R,V)}),z(O,M)};Ue(B,O=>{b(i)&&O(Q)})}G(()=>{P(a,`Registered Classes (${r.length+n.length})`),Ve(v,"aria-expanded",b(s)?"true":"false"),P(c,b(s)?"▼":"▶"),P(h,`(${r.length??""})`),Ve(w,"aria-expanded",b(i)?"true":"false"),P(F,b(i)?"▼":"▶"),P(J,`(${n.length??""})`)}),je("click",v,()=>q(s,!b(s))),je("click",w,()=>q(i,!b(i))),z(e,l),Pe()}Pt(["click"]);async function ln(e,t){const{url:r,nonce:n}=ce.rest;if(!r)return console.info("[slashed-admin] (dev) would POST",e,t),{ok:!0,dev:!0};const s=await fetch(r+e,{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":n},body:JSON.stringify(t)});if(!s.ok){const i=await s.text();throw new Error(i||`HTTP ${s.status}`)}return s.json()}function ja(e,t){return ln("/tokens",{section:e,values:t})}function Ca(e){return ln("/tokens/reset",{section:e})}function La(e){return ln("/settings",e)}var Oa=$('Saved'),Ma=$(' '),Ra=$(`

                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 Ra(e,t){De(t,!0);const s=_e.defaults?.colors??{},r=l=>l.charAt(0).toUpperCase()+l.slice(1);var n=La(),i=k(y(n),4);le(i,21,()=>Object.entries(s.brand??{}),([l,a])=>l,(l,a)=>{var f=W(()=>Xs(_(a),2));let d=()=>_(f)[0],v=()=>_(f)[1];{let u=W(()=>`brand_${d()}`),g=W(()=>r(d())),p=W(()=>s.brand_hex_hints?.[d()]??""),m=W(()=>`--sf-color-${d()}-light`);Br(l,{get storeKey(){return _(u)},get label(){return _(g)},get hexHint(){return _(p)},get rawHint(){return v()},get cssVar(){return _(m)}})}});var o=k(i,4);le(o,21,()=>Object.entries(s.status??{}),([l,a])=>l,(l,a)=>{var f=W(()=>Xs(_(a),2));let d=()=>_(f)[0],v=()=>_(f)[1];{let u=W(()=>`status_${d()}`),g=W(()=>r(d())),p=W(()=>s.status_hex_hints?.[d()]??""),m=W(()=>`--sf-color-${d()}-light`);Br(l,{get storeKey(){return _(u)},get label(){return _(g)},get hexHint(){return _(p)},get rawHint(){return v()},get cssVar(){return _(m)}})}}),C(e,n),Pe()}var Ma=z('
              • '),Oa=z('
                  '),Da=z('
                  '),Pa=z(`

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

                  `);function Fa(e,t){De(t,!0);const s=_e.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(p){let m=p;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(p){const m={};for(const w of p){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=ke({});function f(p){a[p]=!a[p]}var d=Pa(),v=y(d),u=y(v),g=k(v,4);le(g,17,()=>l,({category:p,items:m})=>p,(p,m)=>{let h=()=>_(m).category,w=()=>_(m).items;var b=Da(),x=y(b),$=y(x),U=y($),X=k($,2),V=y(X),ee=k(X,2),M=y(ee),D=k(x,2);{var P=q=>{var T=Oa();le(T,20,w,H=>H,(H,G)=>{var Ve=Ma(),lt=y(Ve),je=y(lt);B(()=>L(je,G)),C(H,Ve)}),C(q,T)};fe(D,q=>{a[h()]&&q(P)})}B(()=>{We(x,"aria-expanded",a[h()]?"true":"false"),L(U,a[h()]?"▼":"▶"),L(V,h()),L(M,`(${w().length??""})`)}),ce("click",x,()=>f(h())),C(p,b)}),B(()=>L(u,`CSS Variables (${s.length??""})`)),C(e,d),Pe()}zt(["click"]);var $a=z('
                • '),Na=z('
                    '),Ia=z('
                  • '),qa=z('
                      '),Ba=z('

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

                      ');function Ha(e,t){De(t,!0);const s=_e.inventory?.sf_classes??[],r=_e.inventory?.is_classes??[];let n=Z(!1),i=Z(!1);var o=Ba(),l=y(o),a=y(l),f=k(l,4),d=y(f),v=y(d),u=y(v),g=k(v,4),p=y(g),m=k(d,2);{var h=M=>{var D=Na();le(D,20,()=>s,P=>P,(P,q)=>{var T=$a(),H=y(T),G=y(H);B(()=>L(G,`.${q??""}`)),C(P,T)}),C(M,D)};fe(m,M=>{_(n)&&M(h)})}var w=k(f,2),b=y(w),x=y(b),$=y(x),U=k(x,4),X=y(U),V=k(b,2);{var ee=M=>{var D=qa();le(D,20,()=>r,P=>P,(P,q)=>{var T=Ia(),H=y(T),G=y(H);B(()=>L(G,`.${q??""}`)),C(P,T)}),C(M,D)};fe(V,M=>{_(i)&&M(ee)})}B(()=>{L(a,`Registered Classes (${s.length+r.length})`),We(d,"aria-expanded",_(n)?"true":"false"),L(u,_(n)?"▼":"▶"),L(p,`(${s.length??""})`),We(b,"aria-expanded",_(i)?"true":"false"),L($,_(i)?"▼":"▶"),L(X,`(${r.length??""})`)}),ce("click",d,()=>I(n,!_(n))),ce("click",b,()=>I(i,!_(i))),C(e,o),Pe()}zt(["click"]);async function Sr(e,t){const{url:s,nonce:r}=_e.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 Va(e,t){return Sr("/tokens",{section:e,values:t})}function Ga(e){return Sr("/tokens/reset",{section:e})}function Ua(e){return Sr("/settings",e)}var Ya=z('Saved'),Ka=z(' '),Wa=z(`

                      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 za(e,t){Fe(t,!0);let r=W(ge(ce.pluginSettings?.html_font_size??"")),n=W(!1),s=W(!1),i=W("");async function l(){q(n,!0),q(s,!1),q(i,"");try{await La({html_font_size:b(r)}),q(s,!0),setTimeout(()=>{q(s,!1)},3e3)}catch(O){q(i,O.message||"Save failed",!0)}finally{q(n,!1)}}var o=Ra(),a=k(y(o),4),u=k(y(a),2),v=y(u),d=k(u,4),c=y(d),p=k(a,4),h=k(y(p),2),g=y(h);g.value=g.__value="";var _=k(g);_.value=_.__value="100";var m=k(_);m.value=m.__value="62.5";var w=k(p,2),S=y(w),F=y(S),U=k(S,2);{var J=O=>{var M=Oa();z(O,M)};Ue(U,O=>{b(s)&&O(J)})}var B=k(U,2);{var Q=O=>{var M=Ma(),R=y(M);G(()=>P(R,b(i))),z(O,M)};Ue(B,O=>{b(i)&&O(Q)})}G(()=>{P(v,ce.inventory?.variables?.length??0),P(c,(ce.inventory?.sf_classes?.length??0)+(ce.inventory?.is_classes?.length??0)),S.disabled=b(n),P(F,b(n)?"Saving...":"Save Settings")}),Qi(h,()=>b(r),O=>q(r,O)),je("click",S,l),z(e,o),Pe()}Pt(["click"]);var Da=$('

                      Parameters:

                       
                      '),$a=$(`

                      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 Fa(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 ) { + 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 Za(e,t){De(t,!0);let s=Z(ke(_e.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 Ua({html_font_size:_(s)}),I(n,!0),setTimeout(()=>{I(n,!1)},3e3)}catch(M){I(i,M.message||"Save failed",!0)}finally{I(r,!1)}}var l=Wa(),a=k(y(l),4),f=k(y(a),2),d=y(f),v=k(f,4),u=y(v),g=k(a,4),p=k(y(g),2),m=y(p);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),$=y(x),U=k(x,2);{var X=M=>{var D=Ya();C(M,D)};fe(U,M=>{_(n)&&M(X)})}var V=k(U,2);{var ee=M=>{var D=Ka(),P=y(D);B(()=>L(P,_(i))),C(M,D)};fe(V,M=>{_(i)&&M(ee)})}B(()=>{L(d,_e.inventory?.variables?.length??0),L(u,(_e.inventory?.sf_classes?.length??0)+(_e.inventory?.is_classes?.length??0)),x.disabled=_(r),L($,_(r)?"Saving...":"Save Settings")}),pa(p,()=>_(s),M=>I(s,M)),ce("click",x,o),C(e,l),Pe()}zt(["click"]);var Xa=z('

                      Parameters:

                       
                      '),Ja=z(`

                      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 Qa(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'; } );`},{name:"slashed_bricks/registered_classes",description:"Filter the array of classes before registration with Bricks.",params:"$classes (array) - Array of class definitions with name and category.",example:`add_filter( 'slashed_bricks/registered_classes', function( $classes ) { @@ -34,12 +34,12 @@ add_filter( 'slashed_bricks/inventory_local_path', function() { 'SLASHED Primary', 'SLASHED Secondary', ] ) ); -} );`}];var r=$a(),n=k(y(r),4);Ke(n,17,()=>t,s=>s.name,(s,i)=>{var l=Da(),o=y(l),a=y(o),u=y(a),v=k(o,2),d=y(v),c=k(v,2),p=k(y(c),2),h=y(p),g=k(c,2),_=y(g),m=y(_);G(()=>{P(u,b(i).name),P(d,b(i).description),P(h,b(i).params),P(m,b(i).example)}),z(s,l)}),z(e,r)}var Pa=$(`

                      Not ported yet. The legacy admin page (SLASHED → SLASHED) +} );`}];var s=Ja(),r=k(y(s),4);le(r,17,()=>t,n=>n.name,(n,i)=>{var o=Xa(),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),p=y(g),m=k(u,2),h=y(m),w=y(h);B(()=>{L(f,_(i).name),L(v,_(i).description),L(p,_(i).params),L(w,_(i).example)}),C(n,o)}),C(e,s)}const eo=[{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."}]}],to=[{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)."}]}],so=[{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 ro=z('

                    • '),no=z('
                        '),io=z('
                      • '),ao=z('
                        Misc Tokens that do not fit a single category.
                          '),oo=z('

                          CSS Custom Properties (--sf-*)

                          '),lo=z('
                        • '),co=z('
                            '),fo=z('

                            Utility & State Classes

                            '),uo=z('

                            '),vo=z('

                            API Cheatsheet

                            ');function ho(e,t){De(t,!0);let s=Z(""),r=Z("all"),n=W(()=>a(eo,"tokens")),i=W(()=>a(to,"classes")),o=W(()=>so.filter(T=>l(T.name,T.description)));function l(T,H){if(!_(s).trim())return!0;const G=_(s).trim().toLowerCase();return T.toLowerCase().includes(G)||H.toLowerCase().includes(G)}function a(T,H){return _(s).trim()?T.map(G=>({...G,[H]:G[H].filter(Ve=>l(Ve.name,Ve.description))})).filter(G=>G[H].length>0):T}let f=W(()=>_(r)==="all"||_(r)==="variables"),d=W(()=>_(r)==="all"||_(r)==="classes");var v=vo(),u=y(v),g=k(y(u),2);g.textContent="607 variables | 143 layout/utility classes | 40 state classes";var p=k(u,2),m=y(p),h=k(m,2),w=y(h);let b;var x=k(w,2);let $;var U=k(x,2);let X;var V=k(p,2);{var ee=T=>{var H=oo(),G=k(y(H),2);le(G,17,()=>_(n),Jt,(je,Fe)=>{var Xe=no(),Je=y(Xe),ct=y(Je),Lt=y(ct),Rt=k(ct,2),ft=y(Rt),Mt=k(Je,2);le(Mt,21,()=>_(Fe).tokens,Jt,(Qe,Xt)=>{var bs=ro(),ys=y(bs),Bs=y(ys),Fn=k(ys,2),$n=y(Fn);B(()=>{L(Bs,_(Xt).name),L($n,_(Xt).description)}),C(Qe,bs)}),B(Qe=>{Xe.open=Qe,L(Lt,_(Fe).category),L(ft,_(Fe).description)},[()=>!_(s).trim()]),C(je,Xe)});var Ve=k(G,2);{var lt=je=>{var Fe=ao(),Xe=k(y(Fe),2);le(Xe,21,()=>_(o),Jt,(Je,ct)=>{var Lt=io(),Rt=y(Lt),ft=y(Rt),Mt=k(Rt,2),Qe=y(Mt);B(()=>{L(ft,_(ct).name),L(Qe,_(ct).description)}),C(Je,Lt)}),B(Je=>Fe.open=Je,[()=>!_(s).trim()]),C(je,Fe)};fe(Ve,je=>{_(o).length>0&&je(lt)})}C(T,H)};fe(V,T=>{_(f)&&T(ee)})}var M=k(V,2);{var D=T=>{var H=fo(),G=k(y(H),2);le(G,17,()=>_(i),Jt,(Ve,lt)=>{var je=co(),Fe=y(je),Xe=y(Fe),Je=y(Xe),ct=k(Xe,2),Lt=y(ct),Rt=k(Fe,2);le(Rt,21,()=>_(lt).classes,Jt,(ft,Mt)=>{var Qe=lo(),Xt=y(Qe),bs=y(Xt),ys=k(Xt,2),Bs=y(ys);B(()=>{L(bs,_(Mt).name),L(Bs,_(Mt).description)}),C(ft,Qe)}),B(ft=>{je.open=ft,L(Je,_(lt).category),L(Lt,_(lt).description)},[()=>!_(s).trim()]),C(Ve,je)}),C(T,H)};fe(M,T=>{_(d)&&T(D)})}var P=k(M,2);{var q=T=>{var H=uo(),G=y(H);B(()=>L(G,`No results for "${_(s)??""}"`)),C(T,H)};fe(P,T=>{_(f)&&_(n).length===0&&_(o).length===0&&_(d)&&_(i).length===0&&T(q)})}B(()=>{b=ls(w,1,"svelte-osej3t",null,b,{active:_(r)==="all"}),$=ls(x,1,"svelte-osej3t",null,$,{active:_(r)==="variables"}),X=ls(U,1,"svelte-osej3t",null,X,{active:_(r)==="classes"})}),zs(m,()=>_(s),T=>I(s,T)),ce("click",w,()=>I(r,"all")),ce("click",x,()=>I(r,"variables")),ce("click",U,()=>I(r,"classes")),C(e,v),Pe()}zt(["click"]);var po=z(`

                            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 Na(e,t){var r=Pa(),n=y(r),s=y(n),i=k(n,4),l=k(y(i));l.textContent="Tab.svelte",G(()=>P(s,t.tab)),z(e,r)}var qa=$('
                            '),Ha=$('

                            Live preview

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

                            `);function _o(e,t){var s=po(),r=y(s),n=y(r),i=k(r,4),o=k(y(i));o.textContent="Tab.svelte",B(()=>L(n,t.tab)),C(e,s)}var go=z('
                            '),mo=z('

                            Live preview

                            Primary Action
                            Generated CSS:
                            ');function bo(e,t){De(t,!0);const s=["primary","secondary","tertiary","action","neutral","base"],r=W(()=>{const g=[],p=Ce.colors??{};for(const m of s){const h=p[`brand_${m}`];h&&g.push(`--sf-color-${m}-light:${h}`)}for(const m of["success","warning","error","info","danger"]){const h=p[`status_${m}`];h&&g.push(`--sf-color-${m}-light:${h}`)}return g.join(";")}),n=W(()=>{const g=[],p=Ce.colors??{};for(const m of s){const h=p[`brand_${m}`];h&&g.push(`--sf-color-${m}-light: ${h}`)}for(const m of["success","warning","error","info","danger"]){const h=p[`status_${m}`];h&&g.push(`--sf-color-${m}-light: ${h}`)}return g.length===0?"":`.slashed-preview { + ${g.join(`; `)}; -}`});var i=Ha(),l=k(y(i),2);Ke(l,20,()=>r,p=>p,(p,h)=>{var g=qa();let _;var m=y(g);G(()=>{Ve(g,"title",h),_=Bt(g,"",_,{background:`var(--sf-color-${h}-light, #ddd)`}),P(m,h)}),z(p,g)});var o=k(l,2),a=y(o);Bt(a,"",{},{background:"var(--sf-color-primary-light, #4338ca)"});var u=k(a,2);Bt(u,"",{},{background:"var(--sf-color-action-light, #0891b2)"});var v=k(o,2),d=k(y(v)),c=y(d);G(()=>{Bt(i,b(n)),P(c,b(s)||"/* (defaults — no overrides set) */")}),z(e,i),Pe()}var Ba=$(' '),Va=$('Saving…'),Ua=$('Saved'),Ka=$('Unsaved changes'),Ya=$('All changes saved'),Ga=$('
                            ');function Wa(e,t){Fe(t,!0);async function r(){if(!x.saving){x.saving=!0,x.error="";try{const w=x.activeTab,S=Ee[w]??{},F=await ja(w,S);F&&F.values&&(Ee[w]=F.values),x.dirty=!1,x.lastSavedAt=Date.now()}catch(w){x.error=w&&w.message||String(w)}finally{x.saving=!1}}}async function n(){if(!x.saving&&confirm(`Reset the ${ce.tabs[x.activeTab]??x.activeTab} tab to defaults?`)){x.saving=!0,x.error="";try{await Ca(x.activeTab),la(x.activeTab),x.dirty=!1,x.lastSavedAt=Date.now()}catch(w){x.error=w&&w.message||String(w)}finally{x.saving=!1}}}let s=W(!1);ns(()=>{if(x.lastSavedAt){q(s,!0);const w=setTimeout(()=>q(s,!1),2e3);return()=>clearTimeout(w)}});var i=Ga();let l;var o=y(i),a=y(o);{var u=w=>{var S=Ba(),F=y(S);G(()=>P(F,x.error)),z(w,S)},v=w=>{var S=Va();z(w,S)},d=w=>{var S=Ua();z(w,S)},c=w=>{var S=Ka();z(w,S)},p=w=>{var S=Ya();z(w,S)};Ue(a,w=>{x.error?w(u):x.saving?w(v,1):b(s)?w(d,2):x.dirty?w(c,3):w(p,-1)})}var h=k(o,2),g=y(h),_=k(g,2),m=y(_);G(()=>{l=bs(i,1,"bar svelte-1oj49qa",null,l,{dirty:x.dirty}),g.disabled=x.saving,_.disabled=x.saving||!x.dirty,P(m,x.saving?"Saving…":"Save changes")}),je("click",g,n),je("click",_,r),z(e,i),Pe()}Pt(["click"]);var Xa=$(`

                            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 Za(e,t){Fe(t,!0),ns(()=>{function h(g){x.dirty&&(g.preventDefault(),g.returnValue="")}return window.addEventListener("beforeunload",h),()=>window.removeEventListener("beforeunload",h)});var r=Xa(),n=k(y(r),2);ua(n,{});var s=k(n,2),i=y(s);{var l=h=>{pa(h,{})},o=h=>{wa(h,{})},a=h=>{Aa(h,{})},u=h=>{za(h,{})},v=h=>{Fa(h)},d=h=>{{let g=te(()=>ce.tabs[x.activeTab]??x.activeTab);Na(h,{get tab(){return b(g)}})}};Ue(i,h=>{x.activeTab==="colors"?h(l):x.activeTab==="variables"?h(o,1):x.activeTab==="classes"?h(a,2):x.activeTab==="bundle"?h(u,3):x.activeTab==="hooks"?h(v,4):h(d,-1)})}var c=k(s,2);Ia(c,{});var p=k(c,2);Wa(p,{}),z(e,r),Pe()}const An=document.getElementById("slashed-admin-app");An&&Bi(Za,{target:An}); +}`});var i=mo(),o=k(y(i),2);le(o,20,()=>s,g=>g,(g,p)=>{var m=go();let h;var w=y(m);B(()=>{We(m,"title",p),h=rs(m,"",h,{background:`var(--sf-color-${p}-light, #ddd)`}),L(w,p)}),C(g,m)});var l=k(o,2),a=y(l);rs(a,"",{},{background:"var(--sf-color-primary-light, #4338ca)"});var f=k(a,2);rs(f,"",{},{background:"var(--sf-color-action-light, #0891b2)"});var d=k(l,2),v=k(y(d)),u=y(v);B(()=>{rs(i,_(r)),L(u,_(n)||"/* (defaults — no overrides set) */")}),C(e,i),Pe()}var yo=z(' '),wo=z('Saving…'),ko=z('Saved'),xo=z('Unsaved changes'),So=z('All changes saved'),Eo=z('
                            ');function To(e,t){De(t,!0);async function s(){if(!E.saving){E.saving=!0,E.error="";try{const b=E.activeTab,x=Ce[b]??{},$=await Va(b,x);$&&$.values&&(Ce[b]=$.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 ${_e.tabs[E.activeTab]??E.activeTab} tab to defaults?`)){E.saving=!0,E.error="";try{await Ga(E.activeTab),xa(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);yn(()=>{if(E.lastSavedAt){I(n,!0);const b=setTimeout(()=>I(n,!1),2e3);return()=>clearTimeout(b)}});var i=Eo();let o;var l=y(i),a=y(l);{var f=b=>{var x=yo(),$=y(x);B(()=>L($,E.error)),C(b,x)},d=b=>{var x=wo();C(b,x)},v=b=>{var x=ko();C(b,x)},u=b=>{var x=xo();C(b,x)},g=b=>{var x=So();C(b,x)};fe(a,b=>{E.error?b(f):E.saving?b(d,1):_(n)?b(v,2):E.dirty?b(u,3):b(g,-1)})}var p=k(l,2),m=y(p),h=k(m,2),w=y(h);B(()=>{o=ls(i,1,"bar svelte-1oj49qa",null,o,{dirty:E.dirty}),m.disabled=E.saving,h.disabled=E.saving||!E.dirty,L(w,E.saving?"Saving…":"Save changes")}),ce("click",m,r),ce("click",h,s),C(e,i),Pe()}zt(["click"]);var jo=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 Ao(e,t){De(t,!0);const s=["cheatsheet","hooks","variables","classes"];let r=W(()=>s.includes(E.activeTab));yn(()=>{function b(x){E.dirty&&(x.preventDefault(),x.returnValue="")}return window.addEventListener("beforeunload",b),()=>window.removeEventListener("beforeunload",b)});var n=jo(),i=k(y(n),2);Ta(i,{});var o=k(i,2),l=y(o);{var a=b=>{Ra(b,{})},f=b=>{Fa(b,{})},d=b=>{Ha(b,{})},v=b=>{Za(b,{})},u=b=>{Qa(b)},g=b=>{ho(b,{})},p=b=>{{let x=W(()=>_e.tabs[E.activeTab]??E.activeTab);_o(b,{get tab(){return _(x)}})}};fe(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(p,-1)})}var m=k(o,2);bo(m,{});var h=k(m,2);{var w=b=>{To(b,{})};fe(h,b=>{_(r)||b(w)})}C(e,n),Pe()}const Hr=document.getElementById("slashed-admin-app");Hr&&ia(Ao,{target:Hr}); //# sourceMappingURL=app.js.map diff --git a/integrations/bricks/includes/class-admin-page.php b/integrations/bricks/includes/class-admin-page.php index 67c0b3bc..4bb8cc0b 100644 --- a/integrations/bricks/includes/class-admin-page.php +++ b/integrations/bricks/includes/class-admin-page.php @@ -70,6 +70,7 @@ public function __construct() { 'classes' => 'Classes', 'bundle' => 'Bundle', 'hooks' => 'Hooks', + 'cheatsheet' => 'Cheatsheet', ); add_action( 'admin_menu', array( $this, 'register_menu' ) ); From 0a30b338cbe839907fb286889161c9c476e112ef Mon Sep 17 00:00:00 2001 From: Kiro Agent <244629292+kiro-agent@users.noreply.github.com> Date: Tue, 26 May 2026 00:07:16 +0000 Subject: [PATCH 6/8] chore: mark FEAT-003 as completed --- .../features/FEAT-003.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 8266c2ae..0a5a5900 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 @@ -2,7 +2,7 @@ "id": "FEAT-003", "type": "feat", "description": "Add a Cheatsheet tab/subpage that serves as a comprehensive index of all CSS custom properties (--sf-*) and classes (.sf-*, .is-*) available in the SLASHED framework, with short descriptions of what each token/class or group does.", - "status": "in_progress", + "status": "completed", "steps": [ "Step 1 - Create a cheatsheet data module at src/lib/cheatsheet-data.js. This module exports a structured object containing all variable categories with descriptions, all class groups with descriptions. The data is derived from the documentation in docs/tokens.md, docs/layout.md, docs/macros.md, docs/states.md. Structure: { variableGroups: [ { category, description, tokens: [ { name, description } ] } ], classGroups: [ { category, description, classes: [ { name, description } ] } ] }. For variables, group by category (Colors, Typography, Spacing, Sizing, Layout, Borders, Radius, Shadows, Effects, Motion, Icons, Z-Index, Focus, Scroll, Print, Misc). For classes, group into Layout Primitives, Macros, Animations/Entrance, Surfaces, and State Classes. Include short 1-line descriptions for each group AND for representative individual tokens/classes. For palette scale tokens (--sf-color-primary-50 through -950, -a5 through -a95, etc.), describe the group pattern once rather than repeating for each individual token. Same for similar repetitive groups.", "Step 2 - Create CheatsheetTab.svelte in src/components/. This is a rich reference page with: (a) A search/filter input at the top that filters tokens and classes by name or description, (b) A toggle to switch between Variables view and Classes view (or show both), (c) Variables view: collapsible category sections, each showing the tokens in that category with their description. Use compact list styling. (d) Classes view: grouped by type (Layout, Macros, Animations, Surfaces, States), each showing class names with descriptions. (e) Total counts displayed (e.g. '607 variables, 143 classes, 40 state classes'). Style it to be scannable and useful as a quick-reference.", @@ -24,5 +24,5 @@ "Run `cd integrations/bricks/admin-app && npm run build` and confirm exit code 0" ], "blocked_reason": null, - "findings": "" + "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." } From 5d6d3363e443ee819bf60f2fd970ff779123f878 Mon Sep 17 00:00:00 2001 From: Kiro Agent <244629292+kiro-agent@users.noreply.github.com> Date: Tue, 26 May 2026 00:12:13 +0000 Subject: [PATCH 7/8] fix: correct empty-state logic, hard-coded counts, and readOnlyTabs in admin cheatsheet - CheatsheetTab: replace broken AND condition for no-results with a proper $derived that works for all viewMode values - CheatsheetTab: replace hard-coded totalVarCount/totalSfClassCount/ totalIsClassCount with values derived from meta.inventory - App.svelte: add 'bundle' to readOnlyTabs so BundleTab (which has its own save button) does not show the global SaveBar --- .../2025-05-26-001000-review.md | 104 ++++++++++++++++++ integrations/bricks/admin-app/src/App.svelte | 2 +- .../src/components/CheatsheetTab.svelte | 15 ++- integrations/bricks/assets/admin-app/app.js | 20 ++-- 4 files changed, 126 insertions(+), 15 deletions(-) create mode 100644 .agents/tasks/task-admin-panel-full-api-cheatsheet/2025-05-26-001000-review.md diff --git a/.agents/tasks/task-admin-panel-full-api-cheatsheet/2025-05-26-001000-review.md b/.agents/tasks/task-admin-panel-full-api-cheatsheet/2025-05-26-001000-review.md new file mode 100644 index 00000000..cdb7b06f --- /dev/null +++ b/.agents/tasks/task-admin-panel-full-api-cheatsheet/2025-05-26-001000-review.md @@ -0,0 +1,104 @@ +# Full-API admin panel expansion with Cheatsheet + +The admin SPA (Svelte 5) gains five new tab components: VariablesTab, ClassesTab, BundleTab, HooksTab, and CheatsheetTab. Together they expose the entire SLASHED public API — every `--sf-*` variable, `.sf-*`/`.is-*` class, plugin setting, and filter hook — as read-only reference pages, plus one writable setting (html_font_size) in BundleTab. The PHP side adds the new tab slugs and pipes inventory data into the hydration payload. + +**Watch for:** The CheatsheetTab "no results" empty-state has a logic gap that causes it to never appear when a single view mode is selected (confirmed). Hard-coded counts in CheatsheetTab (607/143/40) will silently drift from the actual inventory (confirmed). The `bundle` tab is not in the `readOnlyTabs` list yet it has its own independent save, meaning the global SaveBar also renders on that tab — potentially confusing when only a single-setting save button is relevant (confirmed). + +--- + +## High-level view + +Five read-only reference tabs materialize what was previously scattered across docs and PHP source. VariablesTab and ClassesTab pull live inventory from the PHP hydration payload; CheatsheetTab and HooksTab ship their own static data modules. The design splits "live from server" (inventory-based) from "static documentation" (cheatsheet-data.js, hook definitions), avoiding an extra REST round-trip for content that changes only on plugin release. + +BundleTab is the only new tab with write capability. It calls `POST /settings` with `html_font_size` through the same `call()` helper the existing token endpoints use, but the tab sits outside the `readOnlyTabs` gate, so the global SaveBar is simultaneously visible — two independent save affordances on one screen with unrelated persistence paths. + +The CheatsheetTab introduces a 282-line static data module (`cheatsheet-data.js`) with hand-curated descriptions for every token and class. The search UX filters by name or description, but the empty-state condition has an operator-precedence bug that silences the "no results" message in single-view modes. + +--- + +
                            +Issues (5) + +1. **Empty-state logic in CheatsheetTab** — The `{#if showVariables && ... && showClasses && ...}` condition requires *both* view flags to be true, so the "No results" message never appears when `viewMode` is `'variables'` or `'classes'`. Split into per-mode empty checks or restructure the condition. +2. **Hard-coded counts drift** — `totalVarCount`, `totalSfClassCount`, `totalIsClassCount` in CheatsheetTab are constants (607/143/40) while the actual data comes from `cheatsheet-data.js` and `meta.inventory`. Derive from data or document that they're intentional approximations. +3. **Dual save affordances on BundleTab** — BundleTab has its own "Save Settings" button but is not in `readOnlyTabs`, so the global SaveBar also renders. Either add `'bundle'` to `readOnlyTabs` or hide the global bar contextually for that tab. +4. **Stale cheatsheet data** — `cheatsheet-data.js` is hand-maintained static content that will diverge from the framework CSS over time. Consider a build-time generation step, or add a comment pointing to the authoritative sources. +5. **Inventory absence is silent** — If PHP's `Slashed_Bricks_Inventory::get()` returns an empty or malformed structure, VariablesTab and ClassesTab show "0 items" with no diagnostic. A small notice ("inventory unavailable — check bundle path") would aid debugging. + +
                            + +
                            +Details + +## Empty-state logic bug in CheatsheetTab + +Line 138 of CheatsheetTab.svelte: + +```svelte +{#if showVariables && filteredVariableGroups.length === 0 && filteredMiscTokens.length === 0 && showClasses && filteredClassGroups.length === 0} +``` + +When `viewMode` is `'variables'`, `showClasses` is `false`, so the entire condition short-circuits to `false` regardless of whether the variable results are empty. The user types a non-matching query and sees a blank screen with no feedback. The fix is straightforward — compute a single `noResults` derived that accounts for the active view: + +```js +let noResults = $derived( + search.trim() && ( + (!showVariables || (filteredVariableGroups.length === 0 && filteredMiscTokens.length === 0)) && + (!showClasses || filteredClassGroups.length === 0) + ) +); +``` + +## Hard-coded counts vs. live data + +CheatsheetTab declares: + +```js +const totalVarCount = 607; +const totalSfClassCount = 143; +const totalIsClassCount = 40; +``` + +These are displayed in the header and never recalculated. If someone adds a token to `cheatsheet-data.js` the count won't update. These should be derived: + +```js +const totalVarCount = variableGroups.reduce((n, g) => n + g.tokens.length, 0) + miscTokens.length; +``` + +If 607/143/40 intentionally represent the *framework* totals (not the listed representative tokens), a comment would prevent confusion. + +## Dual save controls on BundleTab + +`readOnlyTabs` in App.svelte: `['cheatsheet', 'hooks', 'variables', 'classes']`. BundleTab is absent, so the global `SaveBar` renders alongside BundleTab's own "Save Settings" button. The global bar's "Save changes" calls `saveSection()` for token data; BundleTab's button calls `saveSettings()`. A user clicking the global save on BundleTab persists nothing meaningful (or worse, persists an empty section object). Adding `'bundle'` to `readOnlyTabs` is the simplest fix since BundleTab already owns its save flow. + +## Categorization drift risk in VariablesTab + +The `CATEGORY_MAP` in VariablesTab is a JS snapshot of `class-inventory.php`'s `category_map()`. If PHP adds a new prefix mapping, the SPA won't pick it up — tokens fall through to "Misc" silently. A cleaner long-term approach: have PHP send pre-categorized groups in the hydration payload rather than duplicating the mapping logic client-side. + +## Cheatsheet data maintenance + +`cheatsheet-data.js` is a hand-curated module separate from `meta.inventory`. It documents the *framework* exhaustively with descriptions, while inventory reflects what's *installed*. The trade-off is maintenance: when the framework ships new tokens, both `cheatsheet-data.js` and the CSS source need updates. A build script that extracts token names from the CSS and merges with a description sidecar would prevent drift. + +
                            + +
                            +File map + +| File | Change | +|------|--------| +| `admin-app/src/components/VariablesTab.svelte` | New — read-only grouped variable list with JS categorization | +| `admin-app/src/components/ClassesTab.svelte` | New — collapsible sf-class / is-class sections | +| `admin-app/src/components/BundleTab.svelte` | New — bundle info + html_font_size save | +| `admin-app/src/components/HooksTab.svelte` | New — static hook reference with PHP code examples | +| `admin-app/src/components/CheatsheetTab.svelte` | New — searchable token/class index with view toggle | +| `admin-app/src/lib/cheatsheet-data.js` | New — 282-line static data module for cheatsheet | +| `admin-app/src/lib/api.js` | Added `saveSettings()` export | +| `admin-app/src/lib/stores.svelte.js` | Exposed `inventory` and `pluginSettings` from bootstrap | +| `admin-app/src/App.svelte` | Import + render new tabs; hide SaveBar on read-only tabs | +| `admin-app/index.html` | Dev harness: mock inventory, pluginSettings, new tab slugs | +| `includes/class-admin-page.php` | Added 5 tab slugs to `$this->tabs` | +| `includes/class-admin-page-svelte.php` | Passes `inventory` in `wp_localize_script` payload | + +Full diff: `git diff 7b05039..HEAD` + +
                            diff --git a/integrations/bricks/admin-app/src/App.svelte b/integrations/bricks/admin-app/src/App.svelte index af6a7bb9..58138846 100644 --- a/integrations/bricks/admin-app/src/App.svelte +++ b/integrations/bricks/admin-app/src/App.svelte @@ -19,7 +19,7 @@ import LivePreview from './components/LivePreview.svelte'; import SaveBar from './components/SaveBar.svelte'; - const readOnlyTabs = ['cheatsheet', 'hooks', 'variables', 'classes']; + const readOnlyTabs = ['cheatsheet', 'hooks', 'variables', 'classes', 'bundle']; let isReadOnly = $derived(readOnlyTabs.includes(ui.activeTab)); // Warn before unload when the form has unsaved changes. diff --git a/integrations/bricks/admin-app/src/components/CheatsheetTab.svelte b/integrations/bricks/admin-app/src/components/CheatsheetTab.svelte index 85db71f7..3df5247d 100644 --- a/integrations/bricks/admin-app/src/components/CheatsheetTab.svelte +++ b/integrations/bricks/admin-app/src/components/CheatsheetTab.svelte @@ -5,13 +5,14 @@ * Read-only quick-reference page. */ import { variableGroups, classGroups, miscTokens } from '../lib/cheatsheet-data.js'; + import { meta } from '../lib/stores.svelte.js'; let search = $state(''); let viewMode = $state('all'); // 'all' | 'variables' | 'classes' - const totalVarCount = 607; - const totalSfClassCount = 143; - const totalIsClassCount = 40; + const totalVarCount = meta.inventory?.variables?.length ?? 0; + const totalSfClassCount = meta.inventory?.sf_classes?.length ?? 0; + const totalIsClassCount = meta.inventory?.is_classes?.length ?? 0; let filteredVariableGroups = $derived(filterGroups(variableGroups, 'tokens')); let filteredClassGroups = $derived(filterGroups(classGroups, 'classes')); @@ -37,6 +38,12 @@ let showVariables = $derived(viewMode === 'all' || viewMode === 'variables'); let showClasses = $derived(viewMode === 'all' || viewMode === 'classes'); + + let noResults = $derived( + search.trim() !== '' && + (!showVariables || (filteredVariableGroups.length === 0 && filteredMiscTokens.length === 0)) && + (!showClasses || filteredClassGroups.length === 0) + );
                            @@ -136,7 +143,7 @@
                            {/if} - {#if showVariables && filteredVariableGroups.length === 0 && filteredMiscTokens.length === 0 && showClasses && filteredClassGroups.length === 0} + {#if noResults}

                            No results for "{search}"

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

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

                              `);function Fa(e,t){De(t,!0);const s=_e.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(p){let m=p;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(p){const m={};for(const w of p){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=ke({});function f(p){a[p]=!a[p]}var d=Pa(),v=y(d),u=y(v),g=k(v,4);le(g,17,()=>l,({category:p,items:m})=>p,(p,m)=>{let h=()=>_(m).category,w=()=>_(m).items;var b=Da(),x=y(b),$=y(x),U=y($),X=k($,2),V=y(X),ee=k(X,2),M=y(ee),D=k(x,2);{var P=q=>{var T=Oa();le(T,20,w,H=>H,(H,G)=>{var Ve=Ma(),lt=y(Ve),je=y(lt);B(()=>L(je,G)),C(H,Ve)}),C(q,T)};fe(D,q=>{a[h()]&&q(P)})}B(()=>{We(x,"aria-expanded",a[h()]?"true":"false"),L(U,a[h()]?"▼":"▶"),L(V,h()),L(M,`(${w().length??""})`)}),ce("click",x,()=>f(h())),C(p,b)}),B(()=>L(u,`CSS Variables (${s.length??""})`)),C(e,d),Pe()}zt(["click"]);var $a=z('
                            • '),Na=z('
                                '),Ia=z('
                              • '),qa=z('
                                  '),Ba=z('

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

                                  ');function Ha(e,t){De(t,!0);const s=_e.inventory?.sf_classes??[],r=_e.inventory?.is_classes??[];let n=Z(!1),i=Z(!1);var o=Ba(),l=y(o),a=y(l),f=k(l,4),d=y(f),v=y(d),u=y(v),g=k(v,4),p=y(g),m=k(d,2);{var h=M=>{var D=Na();le(D,20,()=>s,P=>P,(P,q)=>{var T=$a(),H=y(T),G=y(H);B(()=>L(G,`.${q??""}`)),C(P,T)}),C(M,D)};fe(m,M=>{_(n)&&M(h)})}var w=k(f,2),b=y(w),x=y(b),$=y(x),U=k(x,4),X=y(U),V=k(b,2);{var ee=M=>{var D=qa();le(D,20,()=>r,P=>P,(P,q)=>{var T=Ia(),H=y(T),G=y(H);B(()=>L(G,`.${q??""}`)),C(P,T)}),C(M,D)};fe(V,M=>{_(i)&&M(ee)})}B(()=>{L(a,`Registered Classes (${s.length+r.length})`),We(d,"aria-expanded",_(n)?"true":"false"),L(u,_(n)?"▼":"▶"),L(p,`(${s.length??""})`),We(b,"aria-expanded",_(i)?"true":"false"),L($,_(i)?"▼":"▶"),L(X,`(${r.length??""})`)}),ce("click",d,()=>I(n,!_(n))),ce("click",b,()=>I(i,!_(i))),C(e,o),Pe()}zt(["click"]);async function Sr(e,t){const{url:s,nonce:r}=_e.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 Va(e,t){return Sr("/tokens",{section:e,values:t})}function Ga(e){return Sr("/tokens/reset",{section:e})}function Ua(e){return Sr("/settings",e)}var Ya=z('Saved'),Ka=z(' '),Wa=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){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 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 Za(e,t){De(t,!0);let s=Z(ke(_e.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 Ua({html_font_size:_(s)}),I(n,!0),setTimeout(()=>{I(n,!1)},3e3)}catch(M){I(i,M.message||"Save failed",!0)}finally{I(r,!1)}}var l=Wa(),a=k(y(l),4),f=k(y(a),2),d=y(f),v=k(f,4),u=y(v),g=k(a,4),p=k(y(g),2),m=y(p);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),$=y(x),U=k(x,2);{var X=M=>{var D=Ya();C(M,D)};fe(U,M=>{_(n)&&M(X)})}var V=k(U,2);{var ee=M=>{var D=Ka(),P=y(D);B(()=>L(P,_(i))),C(M,D)};fe(V,M=>{_(i)&&M(ee)})}B(()=>{L(d,_e.inventory?.variables?.length??0),L(u,(_e.inventory?.sf_classes?.length??0)+(_e.inventory?.is_classes?.length??0)),x.disabled=_(r),L($,_(r)?"Saving...":"Save Settings")}),pa(p,()=>_(s),M=>I(s,M)),ce("click",x,o),C(e,l),Pe()}zt(["click"]);var Xa=z('

                                        Parameters:

                                         
                                        '),Ja=z(`

                                        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 Qa(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 ) { + 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 + 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'; } );`},{name:"slashed_bricks/registered_classes",description:"Filter the array of classes before registration with Bricks.",params:"$classes (array) - Array of class definitions with name and category.",example:`add_filter( 'slashed_bricks/registered_classes', function( $classes ) { @@ -34,12 +34,12 @@ add_filter( 'slashed_bricks/inventory_local_path', function() { 'SLASHED Primary', 'SLASHED Secondary', ] ) ); -} );`}];var s=Ja(),r=k(y(s),4);le(r,17,()=>t,n=>n.name,(n,i)=>{var o=Xa(),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),p=y(g),m=k(u,2),h=y(m),w=y(h);B(()=>{L(f,_(i).name),L(v,_(i).description),L(p,_(i).params),L(w,_(i).example)}),C(n,o)}),C(e,s)}const eo=[{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."}]}],to=[{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)."}]}],so=[{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 ro=z('
                                      • '),no=z('
                                          '),io=z('
                                        • '),ao=z('
                                          Misc Tokens that do not fit a single category.
                                            '),oo=z('

                                            CSS Custom Properties (--sf-*)

                                            '),lo=z('
                                          • '),co=z('
                                              '),fo=z('

                                              Utility & State Classes

                                              '),uo=z('

                                              '),vo=z('

                                              API Cheatsheet

                                              ');function ho(e,t){De(t,!0);let s=Z(""),r=Z("all"),n=W(()=>a(eo,"tokens")),i=W(()=>a(to,"classes")),o=W(()=>so.filter(T=>l(T.name,T.description)));function l(T,H){if(!_(s).trim())return!0;const G=_(s).trim().toLowerCase();return T.toLowerCase().includes(G)||H.toLowerCase().includes(G)}function a(T,H){return _(s).trim()?T.map(G=>({...G,[H]:G[H].filter(Ve=>l(Ve.name,Ve.description))})).filter(G=>G[H].length>0):T}let f=W(()=>_(r)==="all"||_(r)==="variables"),d=W(()=>_(r)==="all"||_(r)==="classes");var v=vo(),u=y(v),g=k(y(u),2);g.textContent="607 variables | 143 layout/utility classes | 40 state classes";var p=k(u,2),m=y(p),h=k(m,2),w=y(h);let b;var x=k(w,2);let $;var U=k(x,2);let X;var V=k(p,2);{var ee=T=>{var H=oo(),G=k(y(H),2);le(G,17,()=>_(n),Jt,(je,Fe)=>{var Xe=no(),Je=y(Xe),ct=y(Je),Lt=y(ct),Rt=k(ct,2),ft=y(Rt),Mt=k(Je,2);le(Mt,21,()=>_(Fe).tokens,Jt,(Qe,Xt)=>{var bs=ro(),ys=y(bs),Bs=y(ys),Fn=k(ys,2),$n=y(Fn);B(()=>{L(Bs,_(Xt).name),L($n,_(Xt).description)}),C(Qe,bs)}),B(Qe=>{Xe.open=Qe,L(Lt,_(Fe).category),L(ft,_(Fe).description)},[()=>!_(s).trim()]),C(je,Xe)});var Ve=k(G,2);{var lt=je=>{var Fe=ao(),Xe=k(y(Fe),2);le(Xe,21,()=>_(o),Jt,(Je,ct)=>{var Lt=io(),Rt=y(Lt),ft=y(Rt),Mt=k(Rt,2),Qe=y(Mt);B(()=>{L(ft,_(ct).name),L(Qe,_(ct).description)}),C(Je,Lt)}),B(Je=>Fe.open=Je,[()=>!_(s).trim()]),C(je,Fe)};fe(Ve,je=>{_(o).length>0&&je(lt)})}C(T,H)};fe(V,T=>{_(f)&&T(ee)})}var M=k(V,2);{var D=T=>{var H=fo(),G=k(y(H),2);le(G,17,()=>_(i),Jt,(Ve,lt)=>{var je=co(),Fe=y(je),Xe=y(Fe),Je=y(Xe),ct=k(Xe,2),Lt=y(ct),Rt=k(Fe,2);le(Rt,21,()=>_(lt).classes,Jt,(ft,Mt)=>{var Qe=lo(),Xt=y(Qe),bs=y(Xt),ys=k(Xt,2),Bs=y(ys);B(()=>{L(bs,_(Mt).name),L(Bs,_(Mt).description)}),C(ft,Qe)}),B(ft=>{je.open=ft,L(Je,_(lt).category),L(Lt,_(lt).description)},[()=>!_(s).trim()]),C(Ve,je)}),C(T,H)};fe(M,T=>{_(d)&&T(D)})}var P=k(M,2);{var q=T=>{var H=uo(),G=y(H);B(()=>L(G,`No results for "${_(s)??""}"`)),C(T,H)};fe(P,T=>{_(f)&&_(n).length===0&&_(o).length===0&&_(d)&&_(i).length===0&&T(q)})}B(()=>{b=ls(w,1,"svelte-osej3t",null,b,{active:_(r)==="all"}),$=ls(x,1,"svelte-osej3t",null,$,{active:_(r)==="variables"}),X=ls(U,1,"svelte-osej3t",null,X,{active:_(r)==="classes"})}),zs(m,()=>_(s),T=>I(s,T)),ce("click",w,()=>I(r,"all")),ce("click",x,()=>I(r,"variables")),ce("click",U,()=>I(r,"classes")),C(e,v),Pe()}zt(["click"]);var po=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),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) 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 _o(e,t){var s=po(),r=y(s),n=y(r),i=k(r,4),o=k(y(i));o.textContent="Tab.svelte",B(()=>L(n,t.tab)),C(e,s)}var go=z('
                                                    '),mo=z('

                                                    Live preview

                                                    Primary Action
                                                    Generated CSS:
                                                    ');function bo(e,t){De(t,!0);const s=["primary","secondary","tertiary","action","neutral","base"],r=W(()=>{const g=[],p=Ce.colors??{};for(const m of s){const h=p[`brand_${m}`];h&&g.push(`--sf-color-${m}-light:${h}`)}for(const m of["success","warning","error","info","danger"]){const h=p[`status_${m}`];h&&g.push(`--sf-color-${m}-light:${h}`)}return g.join(";")}),n=W(()=>{const g=[],p=Ce.colors??{};for(const m of s){const h=p[`brand_${m}`];h&&g.push(`--sf-color-${m}-light: ${h}`)}for(const m of["success","warning","error","info","danger"]){const h=p[`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",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 { ${g.join(`; `)}; -}`});var i=mo(),o=k(y(i),2);le(o,20,()=>s,g=>g,(g,p)=>{var m=go();let h;var w=y(m);B(()=>{We(m,"title",p),h=rs(m,"",h,{background:`var(--sf-color-${p}-light, #ddd)`}),L(w,p)}),C(g,m)});var l=k(o,2),a=y(l);rs(a,"",{},{background:"var(--sf-color-primary-light, #4338ca)"});var f=k(a,2);rs(f,"",{},{background:"var(--sf-color-action-light, #0891b2)"});var d=k(l,2),v=k(y(d)),u=y(v);B(()=>{rs(i,_(r)),L(u,_(n)||"/* (defaults — no overrides set) */")}),C(e,i),Pe()}var yo=z(' '),wo=z('Saving…'),ko=z('Saved'),xo=z('Unsaved changes'),So=z('All changes saved'),Eo=z('
                                                    ');function To(e,t){De(t,!0);async function s(){if(!E.saving){E.saving=!0,E.error="";try{const b=E.activeTab,x=Ce[b]??{},$=await Va(b,x);$&&$.values&&(Ce[b]=$.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 ${_e.tabs[E.activeTab]??E.activeTab} tab to defaults?`)){E.saving=!0,E.error="";try{await Ga(E.activeTab),xa(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);yn(()=>{if(E.lastSavedAt){I(n,!0);const b=setTimeout(()=>I(n,!1),2e3);return()=>clearTimeout(b)}});var i=Eo();let o;var l=y(i),a=y(l);{var f=b=>{var x=yo(),$=y(x);B(()=>L($,E.error)),C(b,x)},d=b=>{var x=wo();C(b,x)},v=b=>{var x=ko();C(b,x)},u=b=>{var x=xo();C(b,x)},g=b=>{var x=So();C(b,x)};fe(a,b=>{E.error?b(f):E.saving?b(d,1):_(n)?b(v,2):E.dirty?b(u,3):b(g,-1)})}var p=k(l,2),m=y(p),h=k(m,2),w=y(h);B(()=>{o=ls(i,1,"bar svelte-1oj49qa",null,o,{dirty:E.dirty}),m.disabled=E.saving,h.disabled=E.saving||!E.dirty,L(w,E.saving?"Saving…":"Save changes")}),ce("click",m,r),ce("click",h,s),C(e,i),Pe()}zt(["click"]);var jo=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 Ao(e,t){De(t,!0);const s=["cheatsheet","hooks","variables","classes"];let r=W(()=>s.includes(E.activeTab));yn(()=>{function b(x){E.dirty&&(x.preventDefault(),x.returnValue="")}return window.addEventListener("beforeunload",b),()=>window.removeEventListener("beforeunload",b)});var n=jo(),i=k(y(n),2);Ta(i,{});var o=k(i,2),l=y(o);{var a=b=>{Ra(b,{})},f=b=>{Fa(b,{})},d=b=>{Ha(b,{})},v=b=>{Za(b,{})},u=b=>{Qa(b)},g=b=>{ho(b,{})},p=b=>{{let x=W(()=>_e.tabs[E.activeTab]??E.activeTab);_o(b,{get tab(){return _(x)}})}};fe(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(p,-1)})}var m=k(o,2);bo(m,{});var h=k(m,2);{var w=b=>{To(b,{})};fe(h,b=>{_(r)||b(w)})}C(e,n),Pe()}const Hr=document.getElementById("slashed-admin-app");Hr&&ia(Ao,{target:Hr}); +}`});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}); //# sourceMappingURL=app.js.map From 88e4be8181db5e761810a7dbc74977dec7b6edab Mon Sep 17 00:00:00 2001 From: Kiro Agent <244629292+kiro-agent@users.noreply.github.com> Date: Tue, 26 May 2026 05:19:35 +0000 Subject: [PATCH 8/8] fix: address PR review feedback (a11y, timer fix, tab separation) --- .../features/FEAT-003.json | 2 +- .../task.json | 2 +- .../admin-app/src/components/BundleTab.svelte | 4 +++- .../src/components/CheatsheetTab.svelte | 4 ++++ .../admin-app/src/components/ClassesTab.svelte | 5 +++++ .../src/components/VariablesTab.svelte | 5 +++++ integrations/bricks/assets/admin-app/app.css | 2 +- integrations/bricks/assets/admin-app/app.js | 18 +++++++++--------- .../bricks/includes/class-admin-page.php | 16 ++++++++++------ 9 files changed, 39 insertions(+), 19 deletions(-) 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..5f170adb 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 (16 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." } 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..57878ea5 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,7 @@ { "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 } 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..f6664e26 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,16 @@ 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', + ) + ); } /**