@shahmilsaari/memory-core 1.0.4 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-WJG77BPO.js → chunk-VF2GJEJP.js} +25 -5
- package/dist/cli.js +2 -2
- package/dist/dashboard/assets/index-CbN3F0rB.js +2 -0
- package/dist/dashboard/index.html +1 -1
- package/dist/{dashboard-server-OEDFMSFB.js → dashboard-server-ONGEIYYG.js} +3 -2
- package/package.json +1 -1
- package/dist/dashboard/assets/index-C612Qqha.js +0 -2
|
@@ -967,7 +967,7 @@ var seeds = [
|
|
|
967
967
|
import { watch } from "chokidar";
|
|
968
968
|
import { spawnSync } from "child_process";
|
|
969
969
|
import { existsSync as existsSync6, readdirSync as readdirSync3, readFileSync as readFileSync5, statSync as statSync2, writeFileSync as writeFileSync3 } from "fs";
|
|
970
|
-
import { join as join7, relative as relative2, resolve as resolve4, sep } from "path";
|
|
970
|
+
import { dirname as dirname4, join as join7, relative as relative2, resolve as resolve4, sep } from "path";
|
|
971
971
|
import chalk from "chalk";
|
|
972
972
|
|
|
973
973
|
// src/generator.ts
|
|
@@ -2292,6 +2292,28 @@ var SOURCE_EXTENSIONS3 = /\.(ts|tsx|js|jsx|py|php|rb|go|java|cs|swift|kt|rs|vue|
|
|
|
2292
2292
|
var reasonMap = new Map(
|
|
2293
2293
|
seeds.filter((s) => s.reason).map((s) => [s.content, s.reason])
|
|
2294
2294
|
);
|
|
2295
|
+
function findProjectRoot(startPath) {
|
|
2296
|
+
let current = resolve4(startPath);
|
|
2297
|
+
while (true) {
|
|
2298
|
+
if (existsSync6(join7(current, ".memory-core.json"))) return current;
|
|
2299
|
+
const parent = dirname4(current);
|
|
2300
|
+
if (parent === current) return null;
|
|
2301
|
+
current = parent;
|
|
2302
|
+
}
|
|
2303
|
+
}
|
|
2304
|
+
function resolveWatchPaths(pathOption, projectRootOption) {
|
|
2305
|
+
if (projectRootOption) {
|
|
2306
|
+
const projectRoot2 = resolve4(projectRootOption);
|
|
2307
|
+
return {
|
|
2308
|
+
projectRoot: projectRoot2,
|
|
2309
|
+
watchPath: resolve4(projectRoot2, pathOption ?? ".")
|
|
2310
|
+
};
|
|
2311
|
+
}
|
|
2312
|
+
const cwdRoot = resolve4(process.cwd());
|
|
2313
|
+
const watchPath = resolve4(cwdRoot, pathOption ?? ".");
|
|
2314
|
+
const projectRoot = findProjectRoot(watchPath) ?? findProjectRoot(cwdRoot) ?? cwdRoot;
|
|
2315
|
+
return { projectRoot, watchPath };
|
|
2316
|
+
}
|
|
2295
2317
|
function readStatsFile(statsPath) {
|
|
2296
2318
|
if (!existsSync6(statsPath)) return { rules: {}, files: {} };
|
|
2297
2319
|
try {
|
|
@@ -2718,8 +2740,7 @@ ${inputToSend}`;
|
|
|
2718
2740
|
}
|
|
2719
2741
|
}
|
|
2720
2742
|
async function scanFiles(options = {}) {
|
|
2721
|
-
const projectRoot =
|
|
2722
|
-
const watchPath = resolve4(projectRoot, options.path ?? ".");
|
|
2743
|
+
const { projectRoot, watchPath } = resolveWatchPaths(options.path, options.projectRoot);
|
|
2723
2744
|
const config2 = loadConfig(projectRoot);
|
|
2724
2745
|
if (!config2) {
|
|
2725
2746
|
throw new Error("No .memory-core.json found. Run: memory-core init");
|
|
@@ -2758,8 +2779,7 @@ async function scanFiles(options = {}) {
|
|
|
2758
2779
|
return summary;
|
|
2759
2780
|
}
|
|
2760
2781
|
async function startWatch(options = {}) {
|
|
2761
|
-
const projectRoot =
|
|
2762
|
-
const watchPath = resolve4(projectRoot, options.path ?? ".");
|
|
2782
|
+
const { projectRoot, watchPath } = resolveWatchPaths(options.path, options.projectRoot);
|
|
2763
2783
|
const config2 = loadConfig(projectRoot);
|
|
2764
2784
|
const exitOnSetupFailure = options.exitOnSetupFailure ?? true;
|
|
2765
2785
|
if (!config2) {
|
package/dist/cli.js
CHANGED
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
retrieveMemorySelection,
|
|
21
21
|
runMigrations,
|
|
22
22
|
seeds
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-VF2GJEJP.js";
|
|
24
24
|
|
|
25
25
|
// src/cli.ts
|
|
26
26
|
import { Command } from "commander";
|
|
@@ -2127,7 +2127,7 @@ program.command("stats").description("Show violation counters recorded by check
|
|
|
2127
2127
|
}
|
|
2128
2128
|
});
|
|
2129
2129
|
program.command("dashboard").description("Start the live Svelte dashboard with WebSocket watch events").option("-p, --port <port>", "Dashboard port", "5178").option("--path <dir>", "Directory to watch (default: current directory)").option("--no-watch", "Serve the dashboard without starting file watch").action(async (opts) => {
|
|
2130
|
-
const { startDashboard } = await import("./dashboard-server-
|
|
2130
|
+
const { startDashboard } = await import("./dashboard-server-ONGEIYYG.js");
|
|
2131
2131
|
await startDashboard({
|
|
2132
2132
|
port: parseInt(opts.port, 10),
|
|
2133
2133
|
path: opts.path,
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var $l=Object.defineProperty;var zn=e=>{throw TypeError(e)};var Wl=(e,t,s)=>t in e?$l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var Fe=(e,t,s)=>Wl(e,typeof t!="symbol"?t+"":t,s),ar=(e,t,s)=>t.has(e)||zn("Cannot "+s);var c=(e,t,s)=>(ar(e,t,"read from private field"),s?s.call(e):t.get(e)),C=(e,t,s)=>t.has(e)?zn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),D=(e,t,s,r)=>(ar(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),U=(e,t,s)=>(ar(e,t,"access private method"),s);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const f of i.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function s(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=s(a);fetch(a.href,i)}})();const ql=!1;var Sr=Array.isArray,Ul=Array.prototype.indexOf,Kt=Array.prototype.includes,zs=Array.from,Vl=Object.defineProperty,us=Object.getOwnPropertyDescriptor,ua=Object.getOwnPropertyDescriptors,zl=Object.prototype,Hl=Array.prototype,Tr=Object.getPrototypeOf,Hn=Object.isExtensible;const Bl=()=>{};function Kl(e){return e()}function ur(e){for(var t=0;t<e.length;t++)e[t]()}function va(){var e,t,s=new Promise((r,a)=>{e=r,t=a});return{promise:s,resolve:e,reject:t}}const le=2,Yt=4,xs=8,da=1<<24,Ye=16,$e=32,dt=64,vr=128,Ae=512,Z=1024,ne=2048,We=4096,fe=8192,Re=16384,It=32768,Bn=1<<25,Gt=65536,dr=1<<17,Yl=1<<18,Xt=1<<19,pa=1<<20,Ke=1<<25,Nt=65536,$s=1<<21,_s=1<<22,ut=1<<23,Tt=Symbol("$state"),Xe=new class extends Error{constructor(){super(...arguments);Fe(this,"name","StaleReactionError");Fe(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function _a(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Gl(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Jl(e,t,s){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Ql(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Xl(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Zl(e){throw new Error("https://svelte.dev/e/effect_orphan")}function eo(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function to(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function so(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ro(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function no(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const ao=1,io=2,ha=4,lo=8,oo=16,co=2,te=Symbol(),ga="http://www.w3.org/1999/xhtml";function fo(){console.warn("https://svelte.dev/e/derived_inert")}function uo(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function vo(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function ba(e){return e===this.v}function po(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ma(e){return!po(e,this.v)}let ks=!1,_o=!1;function ho(){ks=!0}let H=null;function Jt(e){H=e}function ya(e,t=!1,s){H={p:H,i:!1,c:null,e:null,s:e,x:null,r:O,l:ks&&!t?{s:null,u:null,$:[]}:null}}function wa(e){var t=H,s=t.e;if(s!==null){t.e=null;for(var r of s)Ua(r)}return t.i=!0,H=t.p,{}}function Ss(){return!ks||H!==null&&H.l===null}let mt=[];function Ea(){var e=mt;mt=[],ur(e)}function vt(e){if(mt.length===0&&!vs){var t=mt;queueMicrotask(()=>{t===mt&&Ea()})}mt.push(e)}function go(){for(;mt.length>0;)Ea()}function xa(e){var t=O;if(t===null)return I.f|=ut,e;if(!(t.f&It)&&!(t.f&Yt))throw e;ft(e,t)}function ft(e,t){for(;t!==null;){if(t.f&vr){if(!(t.f&It))throw e;try{t.b.error(e);return}catch(s){e=s}}t=t.parent}throw e}const bo=-7169;function G(e,t){e.f=e.f&bo|t}function Ar(e){e.f&Ae||e.deps===null?G(e,Z):G(e,We)}function ka(e){if(e!==null)for(const t of e)!(t.f&le)||!(t.f&Nt)||(t.f^=Nt,ka(t.deps))}function Sa(e,t,s){e.f&ne?t.add(e):e.f&We&&s.add(e),ka(e.deps),G(e,Z)}const bt=new Set;let S=null,re=null,pr=null,vs=!1,ir=!1,qt=null,Ds=null;var Kn=0;let mo=1;var Ut,Vt,wt,Ze,ze,gs,be,bs,ot,et,He,zt,Ht,Et,ee,Os,Ta,Is,_r,Fs,yo;const qs=class qs{constructor(){C(this,ee);Fe(this,"id",mo++);Fe(this,"current",new Map);Fe(this,"previous",new Map);C(this,Ut,new Set);C(this,Vt,new Set);C(this,wt,new Set);C(this,Ze,new Map);C(this,ze,new Map);C(this,gs,null);C(this,be,[]);C(this,bs,[]);C(this,ot,new Set);C(this,et,new Set);C(this,He,new Map);C(this,zt,new Set);Fe(this,"is_fork",!1);C(this,Ht,!1);C(this,Et,new Set)}skip_effect(t){c(this,He).has(t)||c(this,He).set(t,{d:[],m:[]}),c(this,zt).delete(t)}unskip_effect(t,s=r=>this.schedule(r)){var r=c(this,He).get(t);if(r){c(this,He).delete(t);for(var a of r.d)G(a,ne),s(a);for(a of r.m)G(a,We),s(a)}c(this,zt).add(t)}capture(t,s,r=!1){t.v!==te&&!this.previous.has(t)&&this.previous.set(t,t.v),t.f&ut||(this.current.set(t,[s,r]),re==null||re.set(t,s)),this.is_fork||(t.v=s)}activate(){S=this}deactivate(){S=null,re=null}flush(){try{ir=!0,S=this,U(this,ee,Is).call(this)}finally{Kn=0,pr=null,qt=null,Ds=null,ir=!1,S=null,re=null,At.clear()}}discard(){for(const t of c(this,Vt))t(this);c(this,Vt).clear(),c(this,wt).clear(),bt.delete(this)}register_created_effect(t){c(this,bs).push(t)}increment(t,s){let r=c(this,Ze).get(s)??0;if(c(this,Ze).set(s,r+1),t){let a=c(this,ze).get(s)??0;c(this,ze).set(s,a+1)}}decrement(t,s,r){let a=c(this,Ze).get(s)??0;if(a===1?c(this,Ze).delete(s):c(this,Ze).set(s,a-1),t){let i=c(this,ze).get(s)??0;i===1?c(this,ze).delete(s):c(this,ze).set(s,i-1)}c(this,Ht)||r||(D(this,Ht,!0),vt(()=>{D(this,Ht,!1),this.flush()}))}transfer_effects(t,s){for(const r of t)c(this,ot).add(r);for(const r of s)c(this,et).add(r);t.clear(),s.clear()}oncommit(t){c(this,Ut).add(t)}ondiscard(t){c(this,Vt).add(t)}on_fork_commit(t){c(this,wt).add(t)}run_fork_commit_callbacks(){for(const t of c(this,wt))t(this);c(this,wt).clear()}settled(){return(c(this,gs)??D(this,gs,va())).promise}static ensure(){if(S===null){const t=S=new qs;ir||(bt.add(S),vs||vt(()=>{S===t&&t.flush()}))}return S}apply(){{re=null;return}}schedule(t){var a;if(pr=t,(a=t.b)!=null&&a.is_pending&&t.f&(Yt|xs|da)&&!(t.f&It)){t.b.defer_effect(t);return}for(var s=t;s.parent!==null;){s=s.parent;var r=s.f;if(qt!==null&&s===O&&(I===null||!(I.f&le)))return;if(r&(dt|$e)){if(!(r&Z))return;s.f^=Z}}c(this,be).push(s)}};Ut=new WeakMap,Vt=new WeakMap,wt=new WeakMap,Ze=new WeakMap,ze=new WeakMap,gs=new WeakMap,be=new WeakMap,bs=new WeakMap,ot=new WeakMap,et=new WeakMap,He=new WeakMap,zt=new WeakMap,Ht=new WeakMap,Et=new WeakMap,ee=new WeakSet,Os=function(){return this.is_fork||c(this,ze).size>0},Ta=function(){for(const r of c(this,Et))for(const a of c(r,ze).keys()){for(var t=!1,s=a;s.parent!==null;){if(c(this,He).has(s)){t=!0;break}s=s.parent}if(!t)return!0}return!1},Is=function(){var v,u;if(Kn++>1e3&&(bt.delete(this),Eo()),!U(this,ee,Os).call(this)){for(const p of c(this,ot))c(this,et).delete(p),G(p,ne),this.schedule(p);for(const p of c(this,et))G(p,We),this.schedule(p)}const t=c(this,be);D(this,be,[]),this.apply();var s=qt=[],r=[],a=Ds=[];for(const p of t)try{U(this,ee,_r).call(this,p,s,r)}catch(g){throw Ca(p),g}if(S=null,a.length>0){var i=qs.ensure();for(const p of a)i.schedule(p)}if(qt=null,Ds=null,U(this,ee,Os).call(this)||U(this,ee,Ta).call(this)){U(this,ee,Fs).call(this,r),U(this,ee,Fs).call(this,s);for(const[p,g]of c(this,He))Ra(p,g)}else{c(this,Ze).size===0&&bt.delete(this),c(this,ot).clear(),c(this,et).clear();for(const p of c(this,Ut))p(this);c(this,Ut).clear(),Yn(r),Yn(s),(v=c(this,gs))==null||v.resolve()}var f=S;if(c(this,be).length>0){const p=f??(f=this);c(p,be).push(...c(this,be).filter(g=>!c(p,be).includes(g)))}f!==null&&(bt.add(f),U(u=f,ee,Is).call(u))},_r=function(t,s,r){t.f^=Z;for(var a=t.first;a!==null;){var i=a.f,f=(i&($e|dt))!==0,v=f&&(i&Z)!==0,u=v||(i&fe)!==0||c(this,He).has(a);if(!u&&a.fn!==null){f?a.f^=Z:i&Yt?s.push(a):Zt(a)&&(i&Ye&&c(this,et).add(a),Ot(a));var p=a.first;if(p!==null){a=p;continue}}for(;a!==null;){var g=a.next;if(g!==null){a=g;break}a=a.parent}}},Fs=function(t){for(var s=0;s<t.length;s+=1)Sa(t[s],c(this,ot),c(this,et))},yo=function(){var g,E,w;for(const y of bt){var t=y.id<this.id,s=[];for(const[o,[T,m]]of this.current){if(y.current.has(o)){var r=y.current.get(o)[0];if(t&&T!==r)y.current.set(o,[T,m]);else continue}s.push(o)}var a=[...y.current.keys()].filter(o=>!this.current.has(o));if(a.length===0)t&&y.discard();else if(s.length>0){if(t)for(const o of c(this,zt))y.unskip_effect(o,T=>{var m;T.f&(Ye|_s)?y.schedule(T):U(m=y,ee,Fs).call(m,[T])});y.activate();var i=new Set,f=new Map;for(var v of s)Aa(v,a,i,f);f=new Map;var u=[...y.current.keys()].filter(o=>this.current.has(o)?this.current.get(o)[0]!==o:!0);for(const o of c(this,bs))!(o.f&(Re|fe|dr))&&Rr(o,u,f)&&(o.f&(_s|Ye)?(G(o,ne),y.schedule(o)):c(y,ot).add(o));if(c(y,be).length>0){y.apply();for(var p of c(y,be))U(g=y,ee,_r).call(g,p,[],[]);D(y,be,[])}y.deactivate()}}for(const y of bt)c(y,Et).has(this)&&(c(y,Et).delete(this),c(y,Et).size===0&&!U(E=y,ee,Os).call(E)&&(y.activate(),U(w=y,ee,Is).call(w)))};let Mt=qs;function wo(e){var t=vs;vs=!0;try{for(var s;;){if(go(),S===null)return s;S.flush()}}finally{vs=t}}function Eo(){try{eo()}catch(e){ft(e,pr)}}let Le=null;function Yn(e){var t=e.length;if(t!==0){for(var s=0;s<t;){var r=e[s++];if(!(r.f&(Re|fe))&&Zt(r)&&(Le=new Set,Ot(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&za(r),(Le==null?void 0:Le.size)>0)){At.clear();for(const a of Le){if(a.f&(Re|fe))continue;const i=[a];let f=a.parent;for(;f!==null;)Le.has(f)&&(Le.delete(f),i.push(f)),f=f.parent;for(let v=i.length-1;v>=0;v--){const u=i[v];u.f&(Re|fe)||Ot(u)}}Le.clear()}}Le=null}}function Aa(e,t,s,r){if(!s.has(e)&&(s.add(e),e.reactions!==null))for(const a of e.reactions){const i=a.f;i&le?Aa(a,t,s,r):i&(_s|Ye)&&!(i&ne)&&Rr(a,t,r)&&(G(a,ne),Cr(a))}}function Rr(e,t,s){const r=s.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const a of e.deps){if(Kt.call(t,a))return!0;if(a.f&le&&Rr(a,t,s))return s.set(a,!0),!0}return s.set(e,!1),!1}function Cr(e){S.schedule(e)}function Ra(e,t){if(!(e.f&$e&&e.f&Z)){e.f&ne?t.d.push(e):e.f&We&&t.m.push(e),G(e,Z);for(var s=e.first;s!==null;)Ra(s,t),s=s.next}}function Ca(e){G(e,Z);for(var t=e.first;t!==null;)Ca(t),t=t.next}function xo(e){let t=0,s=Dt(0),r;return()=>{Or()&&(n(s),Bs(()=>(t===0&&(r=b(()=>e(()=>ds(s)))),t+=1,()=>{vt(()=>{t-=1,t===0&&(r==null||r(),r=void 0,ds(s))})})))}}var ko=Gt|Xt;function So(e,t,s,r){new To(e,t,s,r)}var xe,kr,ke,xt,de,Se,ce,me,tt,kt,ct,Bt,ms,ys,st,Us,J,Ao,Ro,Co,hr,Ls,Ps,gr,br;class To{constructor(t,s,r,a){C(this,J);Fe(this,"parent");Fe(this,"is_pending",!1);Fe(this,"transform_error");C(this,xe);C(this,kr,null);C(this,ke);C(this,xt);C(this,de);C(this,Se,null);C(this,ce,null);C(this,me,null);C(this,tt,null);C(this,kt,0);C(this,ct,0);C(this,Bt,!1);C(this,ms,new Set);C(this,ys,new Set);C(this,st,null);C(this,Us,xo(()=>(D(this,st,Dt(c(this,kt))),()=>{D(this,st,null)})));var i;D(this,xe,t),D(this,ke,s),D(this,xt,f=>{var v=O;v.b=this,v.f|=vr,r(f)}),this.parent=O.b,this.transform_error=a??((i=this.parent)==null?void 0:i.transform_error)??(f=>f),D(this,de,Fr(()=>{U(this,J,hr).call(this)},ko))}defer_effect(t){Sa(t,c(this,ms),c(this,ys))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!c(this,ke).pending}update_pending_count(t,s){U(this,J,gr).call(this,t,s),D(this,kt,c(this,kt)+t),!(!c(this,st)||c(this,Bt))&&(D(this,Bt,!0),vt(()=>{D(this,Bt,!1),c(this,st)&&Qt(c(this,st),c(this,kt))}))}get_effect_pending(){return c(this,Us).call(this),n(c(this,st))}error(t){if(!c(this,ke).onerror&&!c(this,ke).failed)throw t;S!=null&&S.is_fork?(c(this,Se)&&S.skip_effect(c(this,Se)),c(this,ce)&&S.skip_effect(c(this,ce)),c(this,me)&&S.skip_effect(c(this,me)),S.on_fork_commit(()=>{U(this,J,br).call(this,t)})):U(this,J,br).call(this,t)}}xe=new WeakMap,kr=new WeakMap,ke=new WeakMap,xt=new WeakMap,de=new WeakMap,Se=new WeakMap,ce=new WeakMap,me=new WeakMap,tt=new WeakMap,kt=new WeakMap,ct=new WeakMap,Bt=new WeakMap,ms=new WeakMap,ys=new WeakMap,st=new WeakMap,Us=new WeakMap,J=new WeakSet,Ao=function(){try{D(this,Se,Te(()=>c(this,xt).call(this,c(this,xe))))}catch(t){this.error(t)}},Ro=function(t){const s=c(this,ke).failed;s&&D(this,me,Te(()=>{s(c(this,xe),()=>t,()=>()=>{})}))},Co=function(){const t=c(this,ke).pending;t&&(this.is_pending=!0,D(this,ce,Te(()=>t(c(this,xe)))),vt(()=>{var s=D(this,tt,document.createDocumentFragment()),r=rt();s.append(r),D(this,Se,U(this,J,Ps).call(this,()=>Te(()=>c(this,xt).call(this,r)))),c(this,ct)===0&&(c(this,xe).before(s),D(this,tt,null),Rt(c(this,ce),()=>{D(this,ce,null)}),U(this,J,Ls).call(this,S))}))},hr=function(){try{if(this.is_pending=this.has_pending_snippet(),D(this,ct,0),D(this,kt,0),D(this,Se,Te(()=>{c(this,xt).call(this,c(this,xe))})),c(this,ct)>0){var t=D(this,tt,document.createDocumentFragment());jr(c(this,Se),t);const s=c(this,ke).pending;D(this,ce,Te(()=>s(c(this,xe))))}else U(this,J,Ls).call(this,S)}catch(s){this.error(s)}},Ls=function(t){this.is_pending=!1,t.transfer_effects(c(this,ms),c(this,ys))},Ps=function(t){var s=O,r=I,a=H;Me(c(this,de)),Ne(c(this,de)),Jt(c(this,de).ctx);try{return Mt.ensure(),t()}catch(i){return xa(i),null}finally{Me(s),Ne(r),Jt(a)}},gr=function(t,s){var r;if(!this.has_pending_snippet()){this.parent&&U(r=this.parent,J,gr).call(r,t,s);return}D(this,ct,c(this,ct)+t),c(this,ct)===0&&(U(this,J,Ls).call(this,s),c(this,ce)&&Rt(c(this,ce),()=>{D(this,ce,null)}),c(this,tt)&&(c(this,xe).before(c(this,tt)),D(this,tt,null)))},br=function(t){c(this,Se)&&(_e(c(this,Se)),D(this,Se,null)),c(this,ce)&&(_e(c(this,ce)),D(this,ce,null)),c(this,me)&&(_e(c(this,me)),D(this,me,null));var s=c(this,ke).onerror;let r=c(this,ke).failed;var a=!1,i=!1;const f=()=>{if(a){vo();return}a=!0,i&&no(),c(this,me)!==null&&Rt(c(this,me),()=>{D(this,me,null)}),U(this,J,Ps).call(this,()=>{U(this,J,hr).call(this)})},v=u=>{try{i=!0,s==null||s(u,f),i=!1}catch(p){ft(p,c(this,de)&&c(this,de).parent)}r&&D(this,me,U(this,J,Ps).call(this,()=>{try{return Te(()=>{var p=O;p.b=this,p.f|=vr,r(c(this,xe),()=>u,()=>f)})}catch(p){return ft(p,c(this,de).parent),null}}))};vt(()=>{var u;try{u=this.transform_error(t)}catch(p){ft(p,c(this,de)&&c(this,de).parent);return}u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(v,p=>ft(p,c(this,de)&&c(this,de).parent)):v(u)})};function No(e,t,s,r){const a=Ss()?Nr:Ma;var i=e.filter(w=>!w.settled);if(s.length===0&&i.length===0){r(t.map(a));return}var f=O,v=Mo(),u=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(w=>w.promise)):null;function p(w){v();try{r(w)}catch(y){f.f&Re||ft(y,f)}Ws()}if(s.length===0){u.then(()=>p(t.map(a)));return}var g=Na();function E(){Promise.all(s.map(w=>Do(w))).then(w=>p([...t.map(a),...w])).catch(w=>ft(w,f)).finally(()=>g())}u?u.then(()=>{v(),E(),Ws()}):E()}function Mo(){var e=O,t=I,s=H,r=S;return function(i=!0){Me(e),Ne(t),Jt(s),i&&!(e.f&Re)&&(r==null||r.activate(),r==null||r.apply())}}function Ws(e=!0){Me(null),Ne(null),Jt(null),e&&(S==null||S.deactivate())}function Na(){var e=O,t=e.b,s=S,r=t.is_rendered();return t.update_pending_count(1,s),s.increment(r,e),(a=!1)=>{t.update_pending_count(-1,s),s.decrement(r,e,a)}}function Nr(e){var t=le|ne;return O!==null&&(O.f|=Xt),{ctx:H,deps:null,effects:null,equals:ba,f:t,fn:e,reactions:null,rv:0,v:te,wv:0,parent:O,ac:null}}function Do(e,t,s){let r=O;r===null&&Gl();var a=void 0,i=Dt(te),f=!I,v=new Map;return Ko(()=>{var y;var u=O,p=va();a=p.promise;try{Promise.resolve(e()).then(p.resolve,p.reject).finally(Ws)}catch(o){p.reject(o),Ws()}var g=S;if(f){if(u.f&It)var E=Na();if(r.b.is_rendered())(y=v.get(g))==null||y.reject(Xe),v.delete(g);else{for(const o of v.values())o.reject(Xe);v.clear()}v.set(g,p)}const w=(o,T=void 0)=>{if(E){var m=T===Xe;E(m)}if(!(T===Xe||u.f&Re)){if(g.activate(),T)i.f|=ut,Qt(i,T);else{i.f&ut&&(i.f^=ut),Qt(i,o);for(const[R,$]of v){if(v.delete(R),R===g)break;$.reject(Xe)}}g.deactivate()}};p.promise.then(w,o=>w(null,o||"unknown"))}),Ir(()=>{for(const u of v.values())u.reject(Xe)}),new Promise(u=>{function p(g){function E(){g===a?u(i):p(a)}g.then(E,E)}p(a)})}function Ma(e){const t=Nr(e);return t.equals=ma,t}function Oo(e){var t=e.effects;if(t!==null){e.effects=null;for(var s=0;s<t.length;s+=1)_e(t[s])}}function Mr(e){var t,s=O,r=e.parent;if(!pt&&r!==null&&r.f&(Re|fe))return fo(),e.v;Me(r);try{e.f&=~Nt,Oo(e),t=Ja(e)}finally{Me(s)}return t}function Da(e){var t=Mr(e);if(!e.equals(t)&&(e.wv=Ya(),(!(S!=null&&S.is_fork)||e.deps===null)&&(S!==null?S.capture(e,t,!0):e.v=t,e.deps===null))){G(e,Z);return}pt||(re!==null?(Or()||S!=null&&S.is_fork)&&re.set(e,t):Ar(e))}function Io(e){var t,s;if(e.effects!==null)for(const r of e.effects)(r.teardown||r.ac)&&((t=r.teardown)==null||t.call(r),(s=r.ac)==null||s.abort(Xe),r.teardown=Bl,r.ac=null,hs(r,0),Lr(r))}function Oa(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&Ot(t)}let mr=new Set;const At=new Map;let Ia=!1;function Dt(e,t){var s={f:0,v:e,reactions:null,equals:ba,rv:0,wv:0};return s}function it(e,t){const s=Dt(e);return Jo(s),s}function X(e,t=!1,s=!0){var a;const r=Dt(e);return t||(r.equals=ma),ks&&s&&H!==null&&H.l!==null&&((a=H.l).s??(a.s=[])).push(r),r}function is(e,t){return M(e,b(()=>n(e))),t}function M(e,t,s=!1){I!==null&&(!je||I.f&dr)&&Ss()&&I.f&(le|Ye|_s|dr)&&(Ce===null||!Kt.call(Ce,e))&&ro();let r=s?cs(t):t;return Qt(e,r,Ds)}function Qt(e,t,s=null){if(!e.equals(t)){At.set(e,pt?t:e.v);var r=Mt.ensure();if(r.capture(e,t),e.f&le){const a=e;e.f&ne&&Mr(a),re===null&&Ar(a)}e.wv=Ya(),Fa(e,ne,s),Ss()&&O!==null&&O.f&Z&&!(O.f&($e|dt))&&(Ee===null?Qo([e]):Ee.push(e)),!r.is_fork&&mr.size>0&&!Ia&&Fo()}return t}function Fo(){Ia=!1;for(const e of mr)e.f&Z&&G(e,We),Zt(e)&&Ot(e);mr.clear()}function ds(e){M(e,e.v+1)}function Fa(e,t,s){var r=e.reactions;if(r!==null)for(var a=Ss(),i=r.length,f=0;f<i;f++){var v=r[f],u=v.f;if(!(!a&&v===O)){var p=(u&ne)===0;if(p&&G(v,t),u&le){var g=v;re==null||re.delete(g),u&Nt||(u&Ae&&(O===null||!(O.f&$s))&&(v.f|=Nt),Fa(g,We,s))}else if(p){var E=v;u&Ye&&Le!==null&&Le.add(E),s!==null?s.push(E):Cr(E)}}}}function cs(e){if(typeof e!="object"||e===null||Tt in e)return e;const t=Tr(e);if(t!==zl&&t!==Hl)return e;var s=new Map,r=Sr(e),a=it(0),i=Ct,f=v=>{if(Ct===i)return v();var u=I,p=Ct;Ne(null),Zn(i);var g=v();return Ne(u),Zn(p),g};return r&&s.set("length",it(e.length)),new Proxy(e,{defineProperty(v,u,p){(!("value"in p)||p.configurable===!1||p.enumerable===!1||p.writable===!1)&&to();var g=s.get(u);return g===void 0?f(()=>{var E=it(p.value);return s.set(u,E),E}):M(g,p.value,!0),!0},deleteProperty(v,u){var p=s.get(u);if(p===void 0){if(u in v){const g=f(()=>it(te));s.set(u,g),ds(a)}}else M(p,te),ds(a);return!0},get(v,u,p){var y;if(u===Tt)return e;var g=s.get(u),E=u in v;if(g===void 0&&(!E||(y=us(v,u))!=null&&y.writable)&&(g=f(()=>{var o=cs(E?v[u]:te),T=it(o);return T}),s.set(u,g)),g!==void 0){var w=n(g);return w===te?void 0:w}return Reflect.get(v,u,p)},getOwnPropertyDescriptor(v,u){var p=Reflect.getOwnPropertyDescriptor(v,u);if(p&&"value"in p){var g=s.get(u);g&&(p.value=n(g))}else if(p===void 0){var E=s.get(u),w=E==null?void 0:E.v;if(E!==void 0&&w!==te)return{enumerable:!0,configurable:!0,value:w,writable:!0}}return p},has(v,u){var w;if(u===Tt)return!0;var p=s.get(u),g=p!==void 0&&p.v!==te||Reflect.has(v,u);if(p!==void 0||O!==null&&(!g||(w=us(v,u))!=null&&w.writable)){p===void 0&&(p=f(()=>{var y=g?cs(v[u]):te,o=it(y);return o}),s.set(u,p));var E=n(p);if(E===te)return!1}return g},set(v,u,p,g){var P;var E=s.get(u),w=u in v;if(r&&u==="length")for(var y=p;y<E.v;y+=1){var o=s.get(y+"");o!==void 0?M(o,te):y in v&&(o=f(()=>it(te)),s.set(y+"",o))}if(E===void 0)(!w||(P=us(v,u))!=null&&P.writable)&&(E=f(()=>it(void 0)),M(E,cs(p)),s.set(u,E));else{w=E.v!==te;var T=f(()=>cs(p));M(E,T)}var m=Reflect.getOwnPropertyDescriptor(v,u);if(m!=null&&m.set&&m.set.call(g,p),!w){if(r&&typeof u=="string"){var R=s.get("length"),$=Number(u);Number.isInteger($)&&$>=R.v&&M(R,$+1)}ds(a)}return!0},ownKeys(v){n(a);var u=Reflect.ownKeys(v).filter(E=>{var w=s.get(E);return w===void 0||w.v!==te});for(var[p,g]of s)g.v!==te&&!(p in v)&&u.push(p);return u},setPrototypeOf(){so()}})}function Gn(e){try{if(e!==null&&typeof e=="object"&&Tt in e)return e[Tt]}catch{}return e}function Lo(e,t){return Object.is(Gn(e),Gn(t))}var Jn,La,Pa,ja;function Po(){if(Jn===void 0){Jn=window,La=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,s=Text.prototype;Pa=us(t,"firstChild").get,ja=us(t,"nextSibling").get,Hn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Hn(s)&&(s.__t=void 0)}}function rt(e=""){return document.createTextNode(e)}function Dr(e){return Pa.call(e)}function Ts(e){return ja.call(e)}function _(e,t){return Dr(e)}function jo(e,t=!1){{var s=Dr(e);return s instanceof Comment&&s.data===""?Ts(s):s}}function h(e,t=1,s=!1){let r=e;for(;t--;)r=Ts(r);return r}function $o(e){e.textContent=""}function $a(){return!1}function Wo(e,t,s){return document.createElementNS(ga,e,void 0)}let Qn=!1;function qo(){Qn||(Qn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const s of e.target.elements)(t=s.__on_r)==null||t.call(s)})},{capture:!0}))}function Hs(e){var t=I,s=O;Ne(null),Me(null);try{return e()}finally{Ne(t),Me(s)}}function Wa(e,t,s,r=s){e.addEventListener(t,()=>Hs(s));const a=e.__on_r;a?e.__on_r=()=>{a(),r(!0)}:e.__on_r=()=>r(!0),qo()}function qa(e){O===null&&(I===null&&Zl(),Xl()),pt&&Ql()}function Uo(e,t){var s=t.last;s===null?t.last=t.first=e:(s.next=e,e.prev=s,t.last=e)}function Ge(e,t){var s=O;s!==null&&s.f&fe&&(e|=fe);var r={ctx:H,deps:null,nodes:null,f:e|ne|Ae,first:null,fn:t,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,wv:0,ac:null};S==null||S.register_created_effect(r);var a=r;if(e&Yt)qt!==null?qt.push(r):Mt.ensure().schedule(r);else if(t!==null){try{Ot(r)}catch(f){throw _e(r),f}a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&!(a.f&Xt)&&(a=a.first,e&Ye&&e&Gt&&a!==null&&(a.f|=Gt))}if(a!==null&&(a.parent=s,s!==null&&Uo(a,s),I!==null&&I.f&le&&!(e&dt))){var i=I;(i.effects??(i.effects=[])).push(a)}return r}function Or(){return I!==null&&!je}function Ir(e){const t=Ge(xs,null);return G(t,Z),t.teardown=e,t}function yr(e){qa();var t=O.f,s=!I&&(t&$e)!==0&&(t&It)===0;if(s){var r=H;(r.e??(r.e=[])).push(e)}else return Ua(e)}function Ua(e){return Ge(Yt|pa,e)}function Vo(e){return qa(),Ge(xs|pa,e)}function zo(e){Mt.ensure();const t=Ge(dt|Xt,e);return(s={})=>new Promise(r=>{s.outro?Rt(t,()=>{_e(t),r(void 0)}):(_e(t),r(void 0))})}function Ho(e){return Ge(Yt,e)}function we(e,t){var s=H,r={effect:null,ran:!1,deps:e};s.l.$.push(r),r.effect=Bs(()=>{if(e(),!r.ran){r.ran=!0;var a=O;try{Me(a.parent),b(t)}finally{Me(a)}}})}function Bo(){var e=H;Bs(()=>{for(var t of e.l.$){t.deps();var s=t.effect;s.f&Z&&s.deps!==null&&G(s,We),Zt(s)&&Ot(s),t.ran=!1}})}function Ko(e){return Ge(_s|Xt,e)}function Bs(e,t=0){return Ge(xs|t,e)}function V(e,t=[],s=[],r=[]){No(r,t,s,a=>{Ge(xs,()=>e(...a.map(n)))})}function Fr(e,t=0){var s=Ge(Ye|t,e);return s}function Te(e){return Ge($e|Xt,e)}function Va(e){var t=e.teardown;if(t!==null){const s=pt,r=I;Xn(!0),Ne(null);try{t.call(null)}finally{Xn(s),Ne(r)}}}function Lr(e,t=!1){var s=e.first;for(e.first=e.last=null;s!==null;){const a=s.ac;a!==null&&Hs(()=>{a.abort(Xe)});var r=s.next;s.f&dt?s.parent=null:_e(s,t),s=r}}function Yo(e){for(var t=e.first;t!==null;){var s=t.next;t.f&$e||_e(t),t=s}}function _e(e,t=!0){var s=!1;(t||e.f&Yl)&&e.nodes!==null&&e.nodes.end!==null&&(Go(e.nodes.start,e.nodes.end),s=!0),G(e,Bn),Lr(e,t&&!s),hs(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const i of r)i.stop();Va(e),e.f^=Bn,e.f|=Re;var a=e.parent;a!==null&&a.first!==null&&za(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Go(e,t){for(;e!==null;){var s=e===t?null:Ts(e);e.remove(),e=s}}function za(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 Rt(e,t,s=!0){var r=[];Ha(e,r,!0);var a=()=>{s&&_e(e),t&&t()},i=r.length;if(i>0){var f=()=>--i||a();for(var v of r)v.out(f)}else a()}function Ha(e,t,s){if(!(e.f&fe)){e.f^=fe;var r=e.nodes&&e.nodes.t;if(r!==null)for(const v of r)(v.is_global||s)&&t.push(v);for(var a=e.first;a!==null;){var i=a.next;if(!(a.f&dt)){var f=(a.f&Gt)!==0||(a.f&$e)!==0&&(e.f&Ye)!==0;Ha(a,t,f?s:!1)}a=i}}}function Pr(e){Ba(e,!0)}function Ba(e,t){if(e.f&fe){e.f^=fe,e.f&Z||(G(e,ne),Mt.ensure().schedule(e));for(var s=e.first;s!==null;){var r=s.next,a=(s.f&Gt)!==0||(s.f&$e)!==0;Ba(s,a?t:!1),s=r}var i=e.nodes&&e.nodes.t;if(i!==null)for(const f of i)(f.is_global||t)&&f.in()}}function jr(e,t){if(e.nodes)for(var s=e.nodes.start,r=e.nodes.end;s!==null;){var a=s===r?null:Ts(s);t.append(s),s=a}}let js=!1,pt=!1;function Xn(e){pt=e}let I=null,je=!1;function Ne(e){I=e}let O=null;function Me(e){O=e}let Ce=null;function Jo(e){I!==null&&(Ce===null?Ce=[e]:Ce.push(e))}let pe=null,ge=0,Ee=null;function Qo(e){Ee=e}let Ka=1,yt=0,Ct=yt;function Zn(e){Ct=e}function Ya(){return++Ka}function Zt(e){var t=e.f;if(t&ne)return!0;if(t&le&&(e.f&=~Nt),t&We){for(var s=e.deps,r=s.length,a=0;a<r;a++){var i=s[a];if(Zt(i)&&Da(i),i.wv>e.wv)return!0}t&Ae&&re===null&&G(e,Z)}return!1}function Ga(e,t,s=!0){var r=e.reactions;if(r!==null&&!(Ce!==null&&Kt.call(Ce,e)))for(var a=0;a<r.length;a++){var i=r[a];i.f&le?Ga(i,t,!1):t===i&&(s?G(i,ne):i.f&Z&&G(i,We),Cr(i))}}function Ja(e){var T;var t=pe,s=ge,r=Ee,a=I,i=Ce,f=H,v=je,u=Ct,p=e.f;pe=null,ge=0,Ee=null,I=p&($e|dt)?null:e,Ce=null,Jt(e.ctx),je=!1,Ct=++yt,e.ac!==null&&(Hs(()=>{e.ac.abort(Xe)}),e.ac=null);try{e.f|=$s;var g=e.fn,E=g();e.f|=It;var w=e.deps,y=S==null?void 0:S.is_fork;if(pe!==null){var o;if(y||hs(e,ge),w!==null&&ge>0)for(w.length=ge+pe.length,o=0;o<pe.length;o++)w[ge+o]=pe[o];else e.deps=w=pe;if(Or()&&e.f&Ae)for(o=ge;o<w.length;o++)((T=w[o]).reactions??(T.reactions=[])).push(e)}else!y&&w!==null&&ge<w.length&&(hs(e,ge),w.length=ge);if(Ss()&&Ee!==null&&!je&&w!==null&&!(e.f&(le|We|ne)))for(o=0;o<Ee.length;o++)Ga(Ee[o],e);if(a!==null&&a!==e){if(yt++,a.deps!==null)for(let m=0;m<s;m+=1)a.deps[m].rv=yt;if(t!==null)for(const m of t)m.rv=yt;Ee!==null&&(r===null?r=Ee:r.push(...Ee))}return e.f&ut&&(e.f^=ut),E}catch(m){return xa(m)}finally{e.f^=$s,pe=t,ge=s,Ee=r,I=a,Ce=i,Jt(f),je=v,Ct=u}}function Xo(e,t){let s=t.reactions;if(s!==null){var r=Ul.call(s,e);if(r!==-1){var a=s.length-1;a===0?s=t.reactions=null:(s[r]=s[a],s.pop())}}if(s===null&&t.f&le&&(pe===null||!Kt.call(pe,t))){var i=t;i.f&Ae&&(i.f^=Ae,i.f&=~Nt),i.v!==te&&Ar(i),Io(i),hs(i,0)}}function hs(e,t){var s=e.deps;if(s!==null)for(var r=t;r<s.length;r++)Xo(e,s[r])}function Ot(e){var t=e.f;if(!(t&Re)){G(e,Z);var s=O,r=js;O=e,js=!0;try{t&(Ye|da)?Yo(e):Lr(e),Va(e);var a=Ja(e);e.teardown=typeof a=="function"?a:null,e.wv=Ka;var i;ql&&_o&&e.f&ne&&e.deps}finally{js=r,O=s}}}async function Zo(){await Promise.resolve(),wo()}function n(e){var t=e.f,s=(t&le)!==0;if(I!==null&&!je){var r=O!==null&&(O.f&Re)!==0;if(!r&&(Ce===null||!Kt.call(Ce,e))){var a=I.deps;if(I.f&$s)e.rv<yt&&(e.rv=yt,pe===null&&a!==null&&a[ge]===e?ge++:pe===null?pe=[e]:pe.push(e));else{(I.deps??(I.deps=[])).push(e);var i=e.reactions;i===null?e.reactions=[I]:Kt.call(i,I)||i.push(I)}}}if(pt&&At.has(e))return At.get(e);if(s){var f=e;if(pt){var v=f.v;return(!(f.f&Z)&&f.reactions!==null||Xa(f))&&(v=Mr(f)),At.set(f,v),v}var u=(f.f&Ae)===0&&!je&&I!==null&&(js||(I.f&Ae)!==0),p=(f.f&It)===0;Zt(f)&&(u&&(f.f|=Ae),Da(f)),u&&!p&&(Oa(f),Qa(f))}if(re!=null&&re.has(e))return re.get(e);if(e.f&ut)throw e.v;return e.v}function Qa(e){if(e.f|=Ae,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&le&&!(t.f&Ae)&&(Oa(t),Qa(t))}function Xa(e){if(e.v===te)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(At.has(t)||t.f&le&&Xa(t))return!0;return!1}function b(e){var t=je;try{return je=!0,e()}finally{je=t}}function ec(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Tt in e)wr(e);else if(!Array.isArray(e))for(let t in e){const s=e[t];typeof s=="object"&&s&&Tt in s&&wr(s)}}}function wr(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{wr(e[r],t)}catch{}const s=Tr(e);if(s!==Object.prototype&&s!==Array.prototype&&s!==Map.prototype&&s!==Set.prototype&&s!==Date.prototype){const r=ua(s);for(let a in r){const i=r[a].get;if(i)try{i.call(e)}catch{}}}}}const tc=["touchstart","touchmove"];function sc(e){return tc.includes(e)}const Cs=Symbol("events"),rc=new Set,ea=new Set;function nc(e,t,s,r={}){function a(i){if(r.capture||Er.call(t,i),!i.cancelBubble)return Hs(()=>s==null?void 0:s.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?vt(()=>{t.addEventListener(e,a,r)}):t.addEventListener(e,a,r),a}function ta(e,t,s,r,a){var i={capture:r,passive:a},f=nc(e,t,s,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Ir(()=>{t.removeEventListener(e,f,i)})}let sa=null;function Er(e){var m,R;var t=this,s=t.ownerDocument,r=e.type,a=((m=e.composedPath)==null?void 0:m.call(e))||[],i=a[0]||e.target;sa=e;var f=0,v=sa===e&&e[Cs];if(v){var u=a.indexOf(v);if(u!==-1&&(t===document||t===window)){e[Cs]=t;return}var p=a.indexOf(t);if(p===-1)return;u<=p&&(f=u)}if(i=a[f]||e.target,i!==t){Vl(e,"currentTarget",{configurable:!0,get(){return i||s}});var g=I,E=O;Ne(null),Me(null);try{for(var w,y=[];i!==null;){var o=i.assignedSlot||i.parentNode||i.host||null;try{var T=(R=i[Cs])==null?void 0:R[r];T!=null&&(!i.disabled||e.target===i)&&T.call(i,e)}catch($){w?y.push($):w=$}if(e.cancelBubble||o===t||o===null)break;i=o}if(w){for(let $ of y)queueMicrotask(()=>{throw $});throw w}}finally{e[Cs]=t,delete e.currentTarget,Ne(g),Me(E)}}}var ca;const lr=((ca=globalThis==null?void 0:globalThis.window)==null?void 0:ca.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function ac(e){return(lr==null?void 0:lr.createHTML(e))??e}function ic(e){var t=Wo("template");return t.innerHTML=ac(e.replaceAll("<!>","<!---->")),t.content}function $r(e,t){var s=O;s.nodes===null&&(s.nodes={start:e,end:t,a:null,t:null})}function W(e,t){var s=(t&co)!==0,r,a=!e.startsWith("<!>");return()=>{r===void 0&&(r=ic(a?e:"<!>"+e),r=Dr(r));var i=s||La?document.importNode(r,!0):r.cloneNode(!0);return $r(i,i),i}}function ra(e=""){{var t=rt(e+"");return $r(t,t),t}}function lc(){var e=document.createDocumentFragment(),t=document.createComment(""),s=rt();return e.append(t,s),$r(t,s),e}function j(e,t){e!==null&&e.before(t)}function x(e,t){var s=t==null?"":typeof t=="object"?`${t}`:t;s!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=s,e.nodeValue=`${s}`)}function oc(e,t){return cc(e,t)}const Ns=new Map;function cc(e,{target:t,anchor:s,props:r={},events:a,context:i,intro:f=!0,transformError:v}){Po();var u=void 0,p=zo(()=>{var g=s??t.appendChild(rt());So(g,{pending:()=>{}},y=>{ya({});var o=H;i&&(o.c=i),a&&(r.$$events=a),u=e(y,r)||{},wa()},v);var E=new Set,w=y=>{for(var o=0;o<y.length;o++){var T=y[o];if(!E.has(T)){E.add(T);var m=sc(T);for(const P of[t,document]){var R=Ns.get(P);R===void 0&&(R=new Map,Ns.set(P,R));var $=R.get(T);$===void 0?(P.addEventListener(T,Er,{passive:m}),R.set(T,1)):R.set(T,$+1)}}}};return w(zs(rc)),ea.add(w),()=>{var m;for(var y of E)for(const R of[t,document]){var o=Ns.get(R),T=o.get(y);--T==0?(R.removeEventListener(y,Er),o.delete(y),o.size===0&&Ns.delete(R)):o.set(y,T)}ea.delete(w),g!==s&&((m=g.parentNode)==null||m.removeChild(g))}});return fc.set(u,p),u}let fc=new WeakMap;var Pe,Be,ye,St,ws,Es,Vs;class uc{constructor(t,s=!0){Fe(this,"anchor");C(this,Pe,new Map);C(this,Be,new Map);C(this,ye,new Map);C(this,St,new Set);C(this,ws,!0);C(this,Es,t=>{if(c(this,Pe).has(t)){var s=c(this,Pe).get(t),r=c(this,Be).get(s);if(r)Pr(r),c(this,St).delete(s);else{var a=c(this,ye).get(s);a&&(c(this,Be).set(s,a.effect),c(this,ye).delete(s),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),r=a.effect)}for(const[i,f]of c(this,Pe)){if(c(this,Pe).delete(i),i===t)break;const v=c(this,ye).get(f);v&&(_e(v.effect),c(this,ye).delete(f))}for(const[i,f]of c(this,Be)){if(i===s||c(this,St).has(i))continue;const v=()=>{if(Array.from(c(this,Pe).values()).includes(i)){var p=document.createDocumentFragment();jr(f,p),p.append(rt()),c(this,ye).set(i,{effect:f,fragment:p})}else _e(f);c(this,St).delete(i),c(this,Be).delete(i)};c(this,ws)||!r?(c(this,St).add(i),Rt(f,v,!1)):v()}}});C(this,Vs,t=>{c(this,Pe).delete(t);const s=Array.from(c(this,Pe).values());for(const[r,a]of c(this,ye))s.includes(r)||(_e(a.effect),c(this,ye).delete(r))});this.anchor=t,D(this,ws,s)}ensure(t,s){var r=S,a=$a();if(s&&!c(this,Be).has(t)&&!c(this,ye).has(t))if(a){var i=document.createDocumentFragment(),f=rt();i.append(f),c(this,ye).set(t,{effect:Te(()=>s(f)),fragment:i})}else c(this,Be).set(t,Te(()=>s(this.anchor)));if(c(this,Pe).set(r,t),a){for(const[v,u]of c(this,Be))v===t?r.unskip_effect(u):r.skip_effect(u);for(const[v,u]of c(this,ye))v===t?r.unskip_effect(u.effect):r.skip_effect(u.effect);r.oncommit(c(this,Es)),r.ondiscard(c(this,Vs))}else c(this,Es).call(this,r)}}Pe=new WeakMap,Be=new WeakMap,ye=new WeakMap,St=new WeakMap,ws=new WeakMap,Es=new WeakMap,Vs=new WeakMap;function oe(e,t,s=!1){var r=new uc(e),a=s?Gt:0;function i(f,v){r.ensure(f,v)}Fr(()=>{var f=!1;t((v,u=0)=>{f=!0,i(u,v)}),f||i(-1,null)},a)}function vc(e,t,s){for(var r=[],a=t.length,i,f=t.length,v=0;v<a;v++){let E=t[v];Rt(E,()=>{if(i){if(i.pending.delete(E),i.done.add(E),i.pending.size===0){var w=e.outrogroups;xr(e,zs(i.done)),w.delete(i),w.size===0&&(e.outrogroups=null)}}else f-=1},!1)}if(f===0){var u=r.length===0&&s!==null;if(u){var p=s,g=p.parentNode;$o(g),g.append(p),e.items.clear()}xr(e,t,!u)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function xr(e,t,s=!0){var r;if(e.pending.size>0){r=new Set;for(const f of e.pending.values())for(const v of f)r.add(e.items.get(v).e)}for(var a=0;a<t.length;a++){var i=t[a];if(r!=null&&r.has(i)){i.f|=Ke;const f=document.createDocumentFragment();jr(i,f)}else _e(t[a],s)}}var na;function Wt(e,t,s,r,a,i=null){var f=e,v=new Map,u=(t&ha)!==0;if(u){var p=e;f=p.appendChild(rt())}var g=null,E=Ma(()=>{var P=s();return Sr(P)?P:P==null?[]:zs(P)}),w,y=new Map,o=!0;function T(P){$.effect.f&Re||($.pending.delete(P),$.fallback=g,dc($,w,f,t,r),g!==null&&(w.length===0?g.f&Ke?(g.f^=Ke,fs(g,null,f)):Pr(g):Rt(g,()=>{g=null})))}function m(P){$.pending.delete(P)}var R=Fr(()=>{w=n(E);for(var P=w.length,Q=new Set,ae=S,qe=$a(),F=0;F<P;F+=1){var Je=w[F],nt=r(Je,F),ue=o?null:v.get(nt);ue?(ue.v&&Qt(ue.v,Je),ue.i&&Qt(ue.i,F),qe&&ae.unskip_effect(ue.e)):(ue=pc(v,o?f:na??(na=rt()),Je,nt,F,a,t,s),o||(ue.e.f|=Ke),v.set(nt,ue)),Q.add(nt)}if(P===0&&i&&!g&&(o?g=Te(()=>i(f)):(g=Te(()=>i(na??(na=rt()))),g.f|=Ke)),P>Q.size&&Jl(),!o)if(y.set(ae,Q),qe){for(const[at,_t]of v)Q.has(at)||ae.skip_effect(_t.e);ae.oncommit(T),ae.ondiscard(m)}else T(ae);n(E)}),$={effect:R,items:v,pending:y,outrogroups:null,fallback:g};o=!1}function ls(e){for(;e!==null&&!(e.f&$e);)e=e.next;return e}function dc(e,t,s,r,a){var ue,at,_t,ht,As,es,ts,ss,rs;var i=(r&lo)!==0,f=t.length,v=e.items,u=ls(e.effect.first),p,g=null,E,w=[],y=[],o,T,m,R;if(i)for(R=0;R<f;R+=1)o=t[R],T=a(o,R),m=v.get(T).e,m.f&Ke||((at=(ue=m.nodes)==null?void 0:ue.a)==null||at.measure(),(E??(E=new Set)).add(m));for(R=0;R<f;R+=1){if(o=t[R],T=a(o,R),m=v.get(T).e,e.outrogroups!==null)for(const De of e.outrogroups)De.pending.delete(m),De.done.delete(m);if(m.f&fe&&(Pr(m),i&&((ht=(_t=m.nodes)==null?void 0:_t.a)==null||ht.unfix(),(E??(E=new Set)).delete(m))),m.f&Ke)if(m.f^=Ke,m===u)fs(m,null,s);else{var $=g?g.next:u;m===e.effect.last&&(e.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),lt(e,g,m),lt(e,m,$),fs(m,$,s),g=m,w=[],y=[],u=ls(g.next);continue}if(m!==u){if(p!==void 0&&p.has(m)){if(w.length<y.length){var P=y[0],Q;g=P.prev;var ae=w[0],qe=w[w.length-1];for(Q=0;Q<w.length;Q+=1)fs(w[Q],P,s);for(Q=0;Q<y.length;Q+=1)p.delete(y[Q]);lt(e,ae.prev,qe.next),lt(e,g,ae),lt(e,qe,P),u=P,g=qe,R-=1,w=[],y=[]}else p.delete(m),fs(m,u,s),lt(e,m.prev,m.next),lt(e,m,g===null?e.effect.first:g.next),lt(e,g,m),g=m;continue}for(w=[],y=[];u!==null&&u!==m;)(p??(p=new Set)).add(u),y.push(u),u=ls(u.next);if(u===null)continue}m.f&Ke||w.push(m),g=m,u=ls(m.next)}if(e.outrogroups!==null){for(const De of e.outrogroups)De.pending.size===0&&(xr(e,zs(De.done)),(As=e.outrogroups)==null||As.delete(De));e.outrogroups.size===0&&(e.outrogroups=null)}if(u!==null||p!==void 0){var F=[];if(p!==void 0)for(m of p)m.f&fe||F.push(m);for(;u!==null;)!(u.f&fe)&&u!==e.fallback&&F.push(u),u=ls(u.next);var Je=F.length;if(Je>0){var nt=r&ha&&f===0?s:null;if(i){for(R=0;R<Je;R+=1)(ts=(es=F[R].nodes)==null?void 0:es.a)==null||ts.measure();for(R=0;R<Je;R+=1)(rs=(ss=F[R].nodes)==null?void 0:ss.a)==null||rs.fix()}vc(e,F,nt)}}i&&vt(()=>{var De,Ft;if(E!==void 0)for(m of E)(Ft=(De=m.nodes)==null?void 0:De.a)==null||Ft.apply()})}function pc(e,t,s,r,a,i,f,v){var u=f&ao?f&oo?Dt(s):X(s,!1,!1):null,p=f&io?Dt(a):null;return{v:u,i:p,e:Te(()=>(i(t,u??s,p??a,v),()=>{e.delete(r)}))}}function fs(e,t,s){if(e.nodes)for(var r=e.nodes.start,a=e.nodes.end,i=t&&!(t.f&Ke)?t.nodes.start:s;r!==null;){var f=Ts(r);if(i.before(r),r===a)return;r=f}}function lt(e,t,s){t===null?e.effect.first=s:t.next=s,s===null?e.effect.last=t:s.prev=t}const aa=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function _c(e,t,s){var r=e==null?"":""+e;if(s){for(var a of Object.keys(s))if(s[a])r=r?r+" "+a:a;else if(r.length)for(var i=a.length,f=0;(f=r.indexOf(a,f))>=0;){var v=f+i;(f===0||aa.includes(r[f-1]))&&(v===r.length||aa.includes(r[v]))?r=(f===0?"":r.substring(0,f))+r.substring(v+1):f=v}}return r===""?null:r}function hc(e,t){return e==null?null:String(e)}function os(e,t,s,r,a,i){var f=e.__className;if(f!==s||f===void 0){var v=_c(s,r,i);v==null?e.removeAttribute("class"):e.className=v,e.__className=s}else if(i&&a!==i)for(var u in i){var p=!!i[u];(a==null||p!==!!a[u])&&e.classList.toggle(u,p)}return i}function ia(e,t,s,r){var a=e.__style;if(a!==t){var i=hc(t);i==null?e.removeAttribute("style"):e.style.cssText=i,e.__style=t}return r}function Za(e,t,s=!1){if(e.multiple){if(t==null)return;if(!Sr(t))return uo();for(var r of e.options)r.selected=t.includes(ps(r));return}for(r of e.options){var a=ps(r);if(Lo(a,t)){r.selected=!0;return}}(!s||t!==void 0)&&(e.selectedIndex=-1)}function gc(e){var t=new MutationObserver(()=>{Za(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Ir(()=>{t.disconnect()})}function or(e,t,s=t){var r=new WeakSet,a=!0;Wa(e,"change",i=>{var f=i?"[selected]":":checked",v;if(e.multiple)v=[].map.call(e.querySelectorAll(f),ps);else{var u=e.querySelector(f)??e.querySelector("option:not([disabled])");v=u&&ps(u)}s(v),e.__value=v,S!==null&&r.add(S)}),Ho(()=>{var i=t();if(e===document.activeElement){var f=S;if(r.has(f))return}if(Za(e,i,a),a&&i===void 0){var v=e.querySelector(":checked");v!==null&&(i=ps(v),s(i))}e.__value=i,a=!1}),gc(e)}function ps(e){return"__value"in e?e.__value:e.value}const bc=Symbol("is custom element"),mc=Symbol("is html");function yc(e,t,s,r){var a=wc(e);a[t]!==(a[t]=s)&&(s==null?e.removeAttribute(t):typeof s!="string"&&Ec(e).includes(t)?e[t]=s:e.setAttribute(t,s))}function wc(e){return e.__attributes??(e.__attributes={[bc]:e.nodeName.includes("-"),[mc]:e.namespaceURI===ga})}var la=new Map;function Ec(e){var t=e.getAttribute("is")||e.nodeName,s=la.get(t);if(s)return s;la.set(t,s=[]);for(var r,a=e,i=Element.prototype;i!==a;){r=ua(a);for(var f in r)r[f].set&&s.push(f);a=Tr(a)}return s}function Ms(e,t,s=t){var r=new WeakSet;Wa(e,"input",async a=>{var i=a?e.defaultValue:e.value;if(i=cr(e)?fr(i):i,s(i),S!==null&&r.add(S),await Zo(),i!==(i=t())){var f=e.selectionStart,v=e.selectionEnd,u=e.value.length;if(e.value=i??"",v!==null){var p=e.value.length;f===v&&v===u&&p>u?(e.selectionStart=p,e.selectionEnd=p):(e.selectionStart=f,e.selectionEnd=Math.min(v,p))}}}),b(t)==null&&e.value&&(s(cr(e)?fr(e.value):e.value),S!==null&&r.add(S)),Bs(()=>{var a=t();if(e===document.activeElement){var i=S;if(r.has(i))return}cr(e)&&a===fr(e.value)||e.type==="date"&&!a&&!e.value||a!==e.value&&(e.value=a??"")})}function cr(e){var t=e.type;return t==="number"||t==="range"}function fr(e){return e===""?null:+e}function xc(e){return function(...t){var s=t[0];return s.preventDefault(),e==null?void 0:e.apply(this,t)}}function kc(e=!1){const t=H,s=t.l.u;if(!s)return;let r=()=>ec(t.s);if(e){let a=0,i={};const f=Nr(()=>{let v=!1;const u=t.s;for(const p in u)u[p]!==i[p]&&(i[p]=u[p],v=!0);return v&&a++,a});r=()=>n(f)}s.b.length&&Vo(()=>{oa(t,r),ur(s.b)}),yr(()=>{const a=b(()=>s.m.map(Kl));return()=>{for(const i of a)typeof i=="function"&&i()}}),s.a.length&&yr(()=>{oa(t,r),ur(s.a)})}function oa(e,t){if(e.l.s)for(const s of e.l.s)n(s);t()}function Sc(e){H===null&&_a(),ks&&H.l!==null?Ac(H).m.push(e):yr(()=>{const t=b(e);if(typeof t=="function")return t})}function Tc(e){H===null&&_a(),Sc(()=>()=>b(e))}function Ac(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const Rc="5";var fa;typeof window<"u"&&((fa=window.__svelte??(window.__svelte={})).v??(fa.v=new Set)).add(Rc);ho();var Cc=W('<div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Watch issue</span><strong class="status-warn svelte-d3ct2b"> </strong></div>'),Nc=W('<section class="notice svelte-d3ct2b"> </section>'),Mc=W('<section class="notice danger svelte-d3ct2b"> </section>'),Dc=W('<p class="terminal-line svelte-d3ct2b"><time class="svelte-d3ct2b">--:--:--</time><span class="sys svelte-d3ct2b">SYS</span><strong class="svelte-d3ct2b">Waiting for memory-core watch output...</strong></p>'),Oc=W('<strong class="svelte-d3ct2b"> </strong>'),Ic=W('<strong class="svelte-d3ct2b"> </strong>'),Fc=W('<strong class="svelte-d3ct2b"> </strong>'),Lc=W('<strong class="svelte-d3ct2b"> </strong>'),Pc=W('<strong class="svelte-d3ct2b"> </strong>'),jc=W('<p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Why:</b> </p>'),$c=W('<p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Issue:</b> </p>'),Wc=W('<p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Fix:</b> </p>'),qc=W('<pre class="svelte-d3ct2b"> </pre>'),Uc=W('<div class="terminal-detail svelte-d3ct2b"><p class="svelte-d3ct2b"> </p> <p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Rule:</b> </p> <!> <!> <!> <!></div>'),Vc=W('<section><p class="terminal-line svelte-d3ct2b"><time class="svelte-d3ct2b"> </time> <span class="svelte-d3ct2b"> </span> <!></p> <!></section>'),zc=W('<div class="metric-row svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b"> </span> <strong class="svelte-d3ct2b"> </strong></div> <i class="svelte-d3ct2b"></i></div>'),Hc=W('<p class="empty svelte-d3ct2b">No rule counters yet.</p>'),Bc=W('<div class="metric-row warning svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b"> </span> <strong class="svelte-d3ct2b"> </strong></div> <i class="svelte-d3ct2b"></i></div>'),Kc=W('<p class="empty svelte-d3ct2b">No file counters yet.</p>'),Yc=W('<small class="svelte-d3ct2b"> </small>'),Gc=W('<small class="svelte-d3ct2b"> </small>'),Jc=W('<section class="commit-item svelte-d3ct2b"><div class="commit-meta svelte-d3ct2b"><span> </span> <time> </time></div> <strong class="svelte-d3ct2b"> </strong> <p class="svelte-d3ct2b"> </p> <!> <!></section>'),Qc=W('<article class="glass-panel commit-watch svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Commit Watch</h2> <span class="svelte-d3ct2b"> </span></div> <div class="commit-list svelte-d3ct2b"></div></article>'),Xc=W('<small class="svelte-d3ct2b"> </small>'),Zc=W('<div class="rule-item svelte-d3ct2b"><div><div class="rule-meta svelte-d3ct2b"><span class="svelte-d3ct2b"> </span> <code class="svelte-d3ct2b"> </code></div> <p class="svelte-d3ct2b"> </p> <!></div> <button class="svelte-d3ct2b">Delete</button></div>'),ef=W('<p class="empty svelte-d3ct2b">No rules match the current filters.</p>'),tf=W('<div class="command-center svelte-d3ct2b"><aside class="sidebar svelte-d3ct2b"><div class="brand svelte-d3ct2b"><h1 class="svelte-d3ct2b">memory-core</h1> <span class="svelte-d3ct2b">command center</span></div> <nav aria-label="Dashboard navigation" class="svelte-d3ct2b"><a class="nav-item active svelte-d3ct2b" href="/"><span class="nav-icon svelte-d3ct2b">[]</span> <span>Command Center</span></a></nav> <div class="sidebar-footer svelte-d3ct2b"><div><i class="svelte-d3ct2b"></i> </div> <small class="svelte-d3ct2b"> </small></div></aside> <div class="workspace svelte-d3ct2b"><header class="topbar svelte-d3ct2b"><div class="topbar-left svelte-d3ct2b"><button class="icon-button mobile-menu svelte-d3ct2b" aria-label="Menu">=</button> <div><i class="svelte-d3ct2b"></i> <span> </span></div></div> <div class="header-metrics svelte-d3ct2b" aria-label="Global metrics"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Violations</span> <strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Files</span> <strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Rules</span> <strong class="svelte-d3ct2b"> </strong></div></div> <div class="top-actions svelte-d3ct2b" aria-label="Status shortcuts"><button class="icon-button svelte-d3ct2b" title="Warnings" aria-label="Warnings">!</button> <button class="icon-button svelte-d3ct2b" title="Rules" aria-label="Rules">R</button> <button class="icon-button svelte-d3ct2b" title="Database" aria-label="Database">DB</button> <button class="icon-button svelte-d3ct2b" title="Network" aria-label="Network">LAN</button></div></header> <main class="canvas svelte-d3ct2b"><section class="status-grid svelte-d3ct2b"><article class="glass-panel status-card svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Project</h2> <span class="svelte-d3ct2b"> </span></div> <div class="data-list svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Name</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Type</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Language</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Architecture</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Watcher</span><strong class="svelte-d3ct2b"> </strong></div> <!></div></article> <article class="glass-panel status-card svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Runtime</h2> <span class="svelte-d3ct2b"> </span></div> <div class="data-list svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Provider</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Check model</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Check status</span> <strong><!></strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Embedding</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Ollama URL</span><strong class="svelte-d3ct2b"> </strong></div></div></article> <article class="glass-panel status-card svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">PostgreSQL</h2> <span> </span></div> <div class="data-list svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Database</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">User</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Host</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">URL</span><strong class="svelte-d3ct2b"> </strong></div></div></article></section> <!> <!> <section class="terminal-panel glass-panel svelte-d3ct2b"><div class="terminal-head svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="terminal-icon svelte-d3ct2b">>_</span> <h2 class="svelte-d3ct2b">Live Feed</h2></div> <div class="window-dots svelte-d3ct2b" aria-hidden="true"><i class="svelte-d3ct2b"></i><i class="svelte-d3ct2b"></i><i class="svelte-d3ct2b"></i></div></div> <div class="terminal-body svelte-d3ct2b"><!> <!></div></section> <section class="content-grid svelte-d3ct2b"><article class="glass-panel stats-panel svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Stats</h2> <span class="svelte-d3ct2b">Recorded</span></div> <div class="stat-block svelte-d3ct2b"><h3 class="svelte-d3ct2b">Most Violated Rules</h3> <!></div> <div class="stat-block svelte-d3ct2b"><h3 class="svelte-d3ct2b">Problem Files</h3> <!></div> <div class="summary-strip svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Clean</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Issues</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Events</span><strong class="svelte-d3ct2b"> </strong></div></div></article> <!> <article class="glass-panel rule-engine svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Rule Engine</h2> <span class="svelte-d3ct2b"> </span></div> <form class="rule-form svelte-d3ct2b"><div class="control-grid svelte-d3ct2b"><select class="svelte-d3ct2b"><option>Rule</option><option>Decision</option><option>Pattern</option><option>Ignore</option></select> <select class="svelte-d3ct2b"><option>Project</option><option>Global</option></select></div> <textarea rows="3" placeholder="Rule or decision" class="svelte-d3ct2b"></textarea> <div class="control-grid svelte-d3ct2b"><input placeholder="Reason" class="svelte-d3ct2b"/> <input placeholder="Tags" class="svelte-d3ct2b"/></div> <button class="svelte-d3ct2b"> </button></form> <div class="control-grid filters svelte-d3ct2b"><select class="svelte-d3ct2b"><option>All types</option><option>Rules</option><option>Decisions</option><option>Patterns</option><option>Ignores</option></select> <input placeholder="Search rules..." class="svelte-d3ct2b"/></div> <div class="rule-list svelte-d3ct2b"></div></article></section></main></div></div>');function sf(e,t){ya(t,!1);const s=X(),r=X(),a=X(),i=X(),f=X(),v=X(),u=X(),p=X(),g=X(),E=X(),w=X(),y=X();let o=X({config:null,stats:{rules:{},files:{},topRules:[],topFiles:[]},files:[],memories:[]}),T=X([]),m=X(!1),R=X("all"),$=X(""),P=X(!1),Q=X(""),ae,qe=!1,F=X({type:"rule",scope:"project",content:"",reason:"",tags:"dashboard"});const Je=24*60*60*1e3,nt=()=>{var l;return((l=n(o).runtime)==null?void 0:l.project.name)??"memory-core"},ue=()=>{var A,N;const l=((A=n(o).runtime)==null?void 0:A.project.declaredArchitectures)??[],d=((N=n(o).runtime)==null?void 0:N.project.activeArchitectures)??[];return l.length>0?l.join(", "):d.length>0?d.join(", "):"none"};function at(l){M(T,[{...l,id:crypto.randomUUID()},...n(T)].slice(0,80))}function _t(l){return l.type==="saved"?{type:"saved",timestamp:l.timestamp,file:l.file}:l.type==="clean"?{type:"clean",timestamp:l.timestamp,file:l.file}:l.type==="skipped"?{type:"skipped",timestamp:l.timestamp,file:l.file,reason:l.reason}:l.type==="violations"?{type:"violations",timestamp:l.timestamp,file:l.file,violations:l.violations}:l.type==="error"?{type:"error",timestamp:l.timestamp,message:l.message}:l.type==="ready"?{type:"system",timestamp:l.timestamp,message:`Watching ${l.path} | ${l.rules} rules | ${l.model}`}:{type:"system",timestamp:l.timestamp,message:"Watch stopped"}}function ht(l){const d=n(o).files??[],A=d.findIndex(K=>K.file===l.file),N=d.slice();return A===-1?N.push(l):N[A]=l,N.sort((K,ie)=>ie.lastSeen.localeCompare(K.lastSeen))}function As(l){const d=n(o).watcher??{enabled:!0,running:!1,path:void 0,model:void 0,rules:void 0,lastEventAt:void 0,error:void 0};let A=n(o).files,N={...d,lastEventAt:l.timestamp,enabled:!0};l.type==="ready"&&(N={...N,running:!0,error:void 0,path:l.path,model:l.model,rules:l.rules}),l.type==="saved"&&(A=ht({file:l.file,status:"checking",lastSeen:l.timestamp,violations:[]})),l.type==="clean"&&(A=ht({file:l.file,status:"clean",lastSeen:l.timestamp,violations:[]})),l.type==="skipped"&&(A=ht({file:l.file,status:"skipped",lastSeen:l.timestamp,violations:[],message:l.reason})),l.type==="violations"&&(A=ht({file:l.file,status:"violations",lastSeen:l.timestamp,violations:l.violations})),l.type==="error"&&(N={...N,running:!1,error:l.message}),l.type==="stopped"&&(N={...N,running:!1});const K=[l,...n(o).events??[]].slice(0,100);M(o,{...n(o),files:A,events:K,watcher:N})}function es(l=[]){M(T,l.map(_t).map(d=>({...d,id:crypto.randomUUID()})).reverse().slice(0,80))}function ts(l){return new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(l))}function ss(l){return Math.max(1,...l.map(d=>d.count))}function rs(l,d){const A=l.file||d;return l.line?`${A}:${l.line}`:A}function De(l){return l.type==="saved"?"SAVE":l.type==="clean"?"OK":l.type==="skipped"?"SKIP":l.type==="violations"?"FAIL":l.type==="error"?"WARN":"SYS"}async function Ft(){const l=await fetch("/api/snapshot");M(o,await l.json()),es(n(o).events)}async function ei(){if(!qe&&document.visibilityState!=="hidden"){qe=!0;try{const l=await fetch("/api/stats",{cache:"no-store"});if(!l.ok)return;const d=await l.json();if(!d.stats)return;M(o,{...n(o),stats:d.stats})}catch{}finally{qe=!1}}}function ti(){ae&&clearInterval(ae),ae=setInterval(()=>{ei()},2e3)}function Wr(){const l=location.protocol==="https:"?"wss:":"ws:",d=new WebSocket(`${l}//${location.host}/ws`);d.addEventListener("open",()=>{M(m,!0),at({type:"system",timestamp:new Date().toISOString(),message:"Dashboard connected"})}),d.addEventListener("close",()=>{M(m,!1),at({type:"error",timestamp:new Date().toISOString(),message:"Dashboard disconnected"}),setTimeout(Wr,1500)}),d.addEventListener("message",A=>{const N=JSON.parse(A.data);if(N.type==="snapshot"){M(o,N.snapshot),n(T).length===0&&es(n(o).events);return}N.type==="watch"&&(As(N.event),at(_t(N.event)))})}async function si(){if(n(F).content.trim()){M(P,!0),M(Q,"");try{const l=await fetch("/api/memories",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n(F))});if(!l.ok)throw new Error((await l.json()).error??"Save failed");M(F,{type:"rule",scope:"project",content:"",reason:"",tags:"dashboard"}),await Ft()}catch(l){M(Q,l.message)}finally{M(P,!1)}}}async function ri(l){M(Q,"");const d=await fetch(`/api/memories/${l}`,{method:"DELETE"});if(!d.ok){M(Q,(await d.json()).error??"Delete failed");return}await Ft()}Ft().catch(l=>{M(Q,l.message)}),Wr(),ti(),Tc(()=>{ae&&(clearInterval(ae),ae=void 0)}),we(()=>(n(o),n(R),n($)),()=>{M(s,n(o).memories.filter(l=>{const d=n(R)==="all"||l.type===n(R),A=`${l.type} ${l.scope} ${l.content} ${l.reason??""} ${l.tags.join(" ")}`.toLowerCase();return d&&A.includes(n($).toLowerCase())}))}),we(()=>n(o),()=>{M(r,Object.values(n(o).stats.files??{}).reduce((l,d)=>l+d,0))}),we(()=>n(o),()=>{M(a,n(o).files.filter(l=>l.status==="clean").length)}),we(()=>n(o),()=>{M(i,Object.values(n(o).stats.rules).reduce((l,d)=>l+d,0))}),we(()=>n(o),()=>{M(f,n(o).stats.recentViolations??[])}),we(()=>n(f),()=>{M(v,n(f).filter(l=>{if(!(l.source==="hook"||l.source==="ci"))return!1;const d=Date.parse(l.timestamp);return Number.isNaN(d)?!1:Date.now()-d<=Je}))}),we(()=>n(r),()=>{M(u,n(r))}),we(()=>n(o),()=>{M(p,Object.keys(n(o).stats.files??{}).length)}),we(()=>n(o),()=>{M(g,n(o).memories.filter(l=>["rule","pattern","decision"].includes(l.type)).length)}),we(()=>n(o),()=>{var l;M(E,((l=n(o).memoryCount)==null?void 0:l.total)??n(o).memories.length)}),we(()=>n(o),()=>{var l;M(w,((l=n(o).memoryCount)==null?void 0:l.relevant)??n(o).memories.length)}),we(()=>(n(m),n(o)),()=>{var l,d;M(y,n(m)?((l=n(o).watcher)==null?void 0:l.enabled)===!1?{live:!1,label:"Watch off"}:(d=n(o).watcher)!=null&&d.running?{live:!0,label:"Watcher live"}:{live:!1,label:"Watcher idle"}:{live:!1,label:"Disconnected"})}),Bo(),kc();var qr=tf(),Ur=_(qr),ni=h(_(Ur),4),Ks=_(ni);let Vr;var ai=h(_(Ks)),ii=h(Ks,2),li=_(ii),oi=h(Ur,2),zr=_(oi),Hr=_(zr),Br=h(_(Hr),2);let Kr;var ci=h(_(Br),2),fi=_(ci),ui=h(Hr,2),Yr=_(ui),vi=h(_(Yr),2),di=_(vi),Gr=h(Yr,2),pi=h(_(Gr),2),_i=_(pi),hi=h(Gr,2),gi=h(_(hi),2),bi=_(gi),mi=h(zr,2),Jr=_(mi),Qr=_(Jr),Xr=_(Qr),yi=h(_(Xr),2),wi=_(yi),Ei=h(Xr,2),Zr=_(Ei),xi=h(_(Zr)),ki=_(xi),en=h(Zr,2),Si=h(_(en)),Ti=_(Si),tn=h(en,2),Ai=h(_(tn)),Ri=_(Ai),sn=h(tn,2),Ci=h(_(sn)),Ni=_(Ci),rn=h(sn,2),Mi=h(_(rn)),Di=_(Mi),Oi=h(rn,2);{var Ii=l=>{var d=Cc(),A=h(_(d)),N=_(A);V(()=>x(N,(n(o),b(()=>n(o).watcher.error)))),j(l,d)};oe(Oi,l=>{n(o),b(()=>{var d;return(d=n(o).watcher)==null?void 0:d.error})&&l(Ii)})}var nn=h(Qr,2),an=_(nn),Fi=h(_(an),2),Li=_(Fi),Pi=h(an,2),ln=_(Pi),ji=h(_(ln)),$i=_(ji),on=h(ln,2),Wi=h(_(on)),qi=_(Wi),cn=h(on,2),fn=h(_(cn),2);let un;var Ui=_(fn);{var Vi=l=>{var d=ra();V(()=>x(d,(n(o),b(()=>{var A;return(A=n(o).runtime)!=null&&A.model.checkModelInstalled?"installed":"missing"})))),j(l,d)},zi=l=>{var d=ra();V(()=>x(d,(n(o),b(()=>{var A;return(A=n(o).runtime)!=null&&A.model.apiKeyConfigured?"api key set":"api key missing"})))),j(l,d)};oe(Ui,l=>{n(o),b(()=>{var d;return((d=n(o).runtime)==null?void 0:d.model.provider)==="ollama"})?l(Vi):l(zi,-1)})}var vn=h(cn,2),Hi=h(_(vn)),Bi=_(Hi),Ki=h(vn,2),Yi=h(_(Ki)),Gi=_(Yi),Ji=h(nn,2),dn=_(Ji),pn=h(_(dn),2);let _n;var Qi=_(pn),Xi=h(dn,2),hn=_(Xi),Zi=h(_(hn)),el=_(Zi),gn=h(hn,2),tl=h(_(gn)),sl=_(tl),bn=h(gn,2),rl=h(_(bn)),nl=_(rl),al=h(bn,2),il=h(_(al)),ll=_(il),mn=h(Jr,2);{var ol=l=>{var d=Nc(),A=_(d);V(()=>x(A,(n(o),b(()=>n(o).dbError)))),j(l,d)};oe(mn,l=>{n(o),b(()=>n(o).dbError)&&l(ol)})}var yn=h(mn,2);{var cl=l=>{var d=Mc(),A=_(d);V(()=>x(A,n(Q))),j(l,d)};oe(yn,l=>{n(Q)&&l(cl)})}var wn=h(yn,2),fl=h(_(wn),2),En=_(fl);{var ul=l=>{var d=Dc();j(l,d)};oe(En,l=>{n(T),b(()=>n(T).length===0)&&l(ul)})}var vl=h(En,2);Wt(vl,1,()=>(n(T),b(()=>[...n(T)].reverse())),l=>l.id,(l,d)=>{var A=Vc();let N;var K=_(A),ie=_(K),ve=_(ie),L=h(ie,2),k=_(L),q=h(L,2);{var Qe=B=>{var Y=Oc(),he=_(Y);V(()=>x(he,(n(d),b(()=>n(d).message)))),j(B,Y)},ns=B=>{var Y=Ic(),he=_(Y);V(()=>x(he,`saved: ${n(d),b(()=>n(d).file)??""}`)),j(B,Y)},as=B=>{var Y=Fc(),he=_(Y);V(()=>x(he,`${n(d),b(()=>n(d).file)??""} - no violations`)),j(B,Y)},Lt=B=>{var Y=Lc(),he=_(Y);V(()=>x(he,`${n(d),b(()=>n(d).file)??""} - skipped: ${n(d),b(()=>n(d).reason)??""}`)),j(B,Y)},Ue=B=>{var Y=Pc(),he=_(Y);V(()=>x(he,`${n(d),b(()=>n(d).violations.length)??""} violation${n(d),b(()=>n(d).violations.length===1?"":"s")??""} in ${n(d),b(()=>n(d).file)??""}`)),j(B,Y)};oe(q,B=>{n(d),b(()=>n(d).type==="system"||n(d).type==="error")?B(Qe):(n(d),b(()=>n(d).type==="saved")?B(ns,1):(n(d),b(()=>n(d).type==="clean")?B(as,2):(n(d),b(()=>n(d).type==="skipped")?B(Lt,3):B(Ue,-1))))})}var Pt=h(K,2);{var jt=B=>{var Y=lc(),he=jo(Y);Wt(he,3,()=>(n(d),b(()=>n(d).violations)),(Rs,z)=>`${n(d).id}-${z}`,(Rs,z,Oe)=>{var Ve=Uc(),$t=_(Ve),Dl=_($t),Wn=h($t,2),Ol=h(_(Wn)),qn=h(Wn,2);{var Il=se=>{var Ie=jc(),gt=h(_(Ie));V(()=>x(gt,` ${n(z),b(()=>n(z).reason)??""}`)),j(se,Ie)};oe(qn,se=>{n(z),b(()=>n(z).reason)&&se(Il)})}var Un=h(qn,2);{var Fl=se=>{var Ie=$c(),gt=h(_(Ie));V(()=>x(gt,` ${n(z),b(()=>n(z).issue)??""}`)),j(se,Ie)};oe(Un,se=>{n(z),b(()=>n(z).issue)&&se(Fl)})}var Vn=h(Un,2);{var Ll=se=>{var Ie=Wc(),gt=h(_(Ie));V(()=>x(gt,` ${n(z),b(()=>n(z).suggestion)??""}`)),j(se,Ie)};oe(Vn,se=>{n(z),b(()=>n(z).suggestion)&&se(Ll)})}var Pl=h(Vn,2);{var jl=se=>{var Ie=qc(),gt=_(Ie);V(()=>x(gt,(n(z),b(()=>n(z).code)))),j(se,Ie)};oe(Pl,se=>{n(z),b(()=>n(z).code)&&se(jl)})}V(se=>{x(Dl,`[${n(Oe)+1}] ${se??""}`),x(Ol,` ${n(z),b(()=>n(z).rule)??""}`)},[()=>(n(z),n(d),b(()=>rs(n(z),n(d).file)))]),j(Rs,Ve)}),j(B,Y)};oe(Pt,B=>{n(d),b(()=>n(d).type==="violations")&&B(jt)})}V((B,Y)=>{N=os(A,1,"svelte-d3ct2b",null,N,{"error-line":n(d).type==="error","ok-line":n(d).type==="clean","violation-line":n(d).type==="violations"}),x(ve,B),x(k,Y)},[()=>(n(d),b(()=>ts(n(d).timestamp))),()=>(n(d),b(()=>De(n(d))))]),j(l,A)});var dl=h(wn,2),xn=_(dl),kn=h(_(xn),2),pl=h(_(kn),2);Wt(pl,1,()=>(n(o),b(()=>n(o).stats.topRules.slice(0,5))),l=>l.name,(l,d)=>{var A=zc(),N=_(A),K=_(N),ie=_(K),ve=h(K,2),L=_(ve),k=h(N,2);V(q=>{x(ie,(n(d),b(()=>n(d).name))),x(L,(n(d),b(()=>n(d).count))),ia(k,q)},[()=>(n(d),n(o),b(()=>`width: ${n(d).count/ss(n(o).stats.topRules)*100}%`))]),j(l,A)},l=>{var d=Hc();j(l,d)});var Sn=h(kn,2),_l=h(_(Sn),2);Wt(_l,1,()=>(n(o),b(()=>n(o).stats.topFiles.slice(0,5))),l=>l.name,(l,d)=>{var A=Bc(),N=_(A),K=_(N),ie=_(K),ve=h(K,2),L=_(ve),k=h(N,2);V(q=>{x(ie,(n(d),b(()=>n(d).name))),x(L,(n(d),b(()=>n(d).count))),ia(k,q)},[()=>(n(d),n(o),b(()=>`width: ${n(d).count/ss(n(o).stats.topFiles)*100}%`))]),j(l,A)},l=>{var d=Kc();j(l,d)});var hl=h(Sn,2),Tn=_(hl),gl=h(_(Tn)),bl=_(gl),An=h(Tn,2),ml=h(_(An)),yl=_(ml),wl=h(An,2),El=h(_(wl)),xl=_(El),Rn=h(xn,2);{var kl=l=>{var d=Qc(),A=_(d),N=h(_(A),2),K=_(N),ie=h(A,2);Wt(ie,7,()=>(n(v),b(()=>n(v).slice(0,8))),(ve,L)=>`${ve.timestamp}-${L}`,(ve,L)=>{var k=Jc(),q=_(k),Qe=_(q),ns=_(Qe),as=h(Qe,2),Lt=_(as),Ue=h(q,2),Pt=_(Ue),jt=h(Ue,2),B=_(jt),Y=h(jt,2);{var he=Oe=>{var Ve=Yc(),$t=_(Ve);V(()=>x($t,(n(L),b(()=>n(L).issue)))),j(Oe,Ve)};oe(Y,Oe=>{n(L),b(()=>n(L).issue)&&Oe(he)})}var Rs=h(Y,2);{var z=Oe=>{var Ve=Gc(),$t=_(Ve);V(()=>x($t,(n(L),b(()=>n(L).suggestion)))),j(Oe,Ve)};oe(Rs,Oe=>{n(L),b(()=>n(L).suggestion)&&Oe(z)})}V((Oe,Ve)=>{x(ns,(n(L),b(()=>n(L).source==="ci"?"CI":"Hook"))),x(Lt,Oe),x(Pt,(n(L),b(()=>n(L).rule))),x(B,Ve)},[()=>(n(L),b(()=>ts(n(L).timestamp))),()=>(n(L),b(()=>rs(n(L),n(L).file||"staged diff")))]),j(ve,k)}),V(()=>x(K,`${n(v),b(()=>n(v).length)??""} in 24h`)),j(l,d)};oe(Rn,l=>{n(v),b(()=>n(v).length>0)&&l(kl)})}var Sl=h(Rn,2),Cn=_(Sl),Tl=h(_(Cn),2),Al=_(Tl),Ys=h(Cn,2),Nn=_(Ys),Gs=_(Nn),Js=_(Gs);Js.value=Js.__value="rule";var Qs=h(Js);Qs.value=Qs.__value="decision";var Xs=h(Qs);Xs.value=Xs.__value="pattern";var Mn=h(Xs);Mn.value=Mn.__value="ignore";var Dn=h(Gs,2),Zs=_(Dn);Zs.value=Zs.__value="project";var On=h(Zs);On.value=On.__value="global";var In=h(Nn,2),Fn=h(In,2),Ln=_(Fn),Rl=h(Ln,2),Pn=h(Fn,2),Cl=_(Pn),jn=h(Ys,2),er=_(jn),tr=_(er);tr.value=tr.__value="all";var sr=h(tr);sr.value=sr.__value="rule";var rr=h(sr);rr.value=rr.__value="decision";var nr=h(rr);nr.value=nr.__value="pattern";var $n=h(nr);$n.value=$n.__value="ignore";var Nl=h(er,2),Ml=h(jn,2);Wt(Ml,5,()=>n(s),l=>l.id,(l,d)=>{var A=Zc(),N=_(A),K=_(N),ie=_(K),ve=_(ie),L=h(ie,2),k=_(L),q=h(K,2),Qe=_(q),ns=h(q,2);{var as=Ue=>{var Pt=Xc(),jt=_(Pt);V(()=>x(jt,(n(d),b(()=>n(d).reason)))),j(Ue,Pt)};oe(ns,Ue=>{n(d),b(()=>n(d).reason)&&Ue(as)})}var Lt=h(N,2);V(Ue=>{x(ve,(n(d),b(()=>n(d).scope))),x(k,`Rule-${Ue??""}`),x(Qe,(n(d),b(()=>n(d).content))),yc(Lt,"aria-label",(n(d),b(()=>`Delete ${n(d).id}`)))},[()=>(n(d),b(()=>String(n(d).id).padStart(3,"0")))]),ta("click",Lt,()=>ri(n(d).id)),j(l,A)},l=>{var d=ef();j(l,d)}),V((l,d,A)=>{var N,K,ie,ve,L;Vr=os(Ks,1,"status-chip svelte-d3ct2b",null,Vr,{live:n(y).live}),x(ai,` ${n(y),b(()=>n(y).label)??""}`),x(li,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.model.label)??"runtime pending"}))),Kr=os(Br,1,"live-label svelte-d3ct2b",null,Kr,{live:n(y).live}),x(fi,(n(y),b(()=>n(y).label))),x(di,n(u)),x(_i,n(p)),x(bi,n(g)),x(wi,(n(o),b(()=>{var k;return(k=n(o).runtime)!=null&&k.project.initialized?"Initialized":"Not initialized"}))),x(ki,l),x(Ti,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.project.type)??"unknown"}))),x(Ri,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.project.language)??"unknown"}))),x(Ni,d),x(Di,(n(o),b(()=>{var k,q;return((k=n(o).watcher)==null?void 0:k.enabled)===!1?"disabled":(q=n(o).watcher)!=null&&q.running?"running":"idle"}))),x(Li,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.model.label)??"pending"}))),x($i,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.model.provider)??"unknown"}))),x(qi,(n(o),b(()=>{var k,q,Qe;return((k=n(o).runtime)==null?void 0:k.model.checkModelResolved)??((q=n(o).runtime)==null?void 0:q.model.checkModel)??((Qe=n(o).runtime)==null?void 0:Qe.model.chatModel)??"unknown"}))),un=os(fn,1,"svelte-d3ct2b",null,un,{"status-ok":((N=n(o).runtime)==null?void 0:N.model.checkModelInstalled)||((K=n(o).runtime)==null?void 0:K.model.apiKeyConfigured),"status-warn":((ie=n(o).runtime)==null?void 0:ie.model.checkModelInstalled)===!1||((ve=n(o).runtime)==null?void 0:ve.model.error)}),x(Bi,(n(o),b(()=>{var k,q;return((k=n(o).runtime)==null?void 0:k.model.embeddingModelResolved)??((q=n(o).runtime)==null?void 0:q.model.embeddingModel)??"unknown"}))),x(Gi,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.model.ollamaUrl)??"unknown"}))),_n=os(pn,1,"svelte-d3ct2b",null,_n,{success:(L=n(o).runtime)==null?void 0:L.postgres.connected}),x(Qi,(n(o),b(()=>{var k;return(k=n(o).runtime)!=null&&k.postgres.connected?"Connected":"Not connected"}))),x(el,(n(o),b(()=>{var k,q;return((k=n(o).runtime)==null?void 0:k.postgres.serverDatabase)??((q=n(o).runtime)==null?void 0:q.postgres.database)??"unknown"}))),x(sl,(n(o),b(()=>{var k,q;return((k=n(o).runtime)==null?void 0:k.postgres.serverUser)??((q=n(o).runtime)==null?void 0:q.postgres.user)??"unknown"}))),x(nl,`${n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.postgres.host)??"unknown"})??""}${n(o),b(()=>{var k;return(k=n(o).runtime)!=null&&k.postgres.port?`:${n(o).runtime.postgres.port}`:""})??""}`),x(ll,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.postgres.url)??"(not set)"}))),x(bl,n(a)),x(yl,n(u)),x(xl,n(i)),x(Al,`${n(g)??""} rules active`),Pn.disabled=A,x(Cl,n(P)?"Saving...":"Add New Architecture Rule")},[()=>b(nt),()=>b(ue),()=>(n(P),n(F),b(()=>n(P)||!n(F).content.trim()))]),or(Gs,()=>n(F).type,l=>is(F,n(F).type=l)),or(Dn,()=>n(F).scope,l=>is(F,n(F).scope=l)),Ms(In,()=>n(F).content,l=>is(F,n(F).content=l)),Ms(Ln,()=>n(F).reason,l=>is(F,n(F).reason=l)),Ms(Rl,()=>n(F).tags,l=>is(F,n(F).tags=l)),ta("submit",Ys,xc(si)),or(er,()=>n(R),l=>M(R,l)),Ms(Nl,()=>n($),l=>M($,l)),j(e,qr),wa()}oc(sf,{target:document.getElementById("app")});
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Memory Core Dashboard</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-CbN3F0rB.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/assets/index-CJyZEmIe.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
saveMemory,
|
|
13
13
|
startWatch,
|
|
14
14
|
updateMemory
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-VF2GJEJP.js";
|
|
16
16
|
|
|
17
17
|
// src/dashboard-server.ts
|
|
18
18
|
import { createHash } from "crypto";
|
|
@@ -696,7 +696,8 @@ async function startDashboard(options = {}) {
|
|
|
696
696
|
if (options.watch ?? true) {
|
|
697
697
|
watcherStatus.enabled = true;
|
|
698
698
|
void startWatch({
|
|
699
|
-
|
|
699
|
+
projectRoot,
|
|
700
|
+
path: ".",
|
|
700
701
|
onEvent: handleWatchEvent,
|
|
701
702
|
exitOnSetupFailure: false
|
|
702
703
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shahmilsaari/memory-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Universal AI memory core — generate AI context files from architecture profiles with RAG support",
|
|
5
5
|
"homepage": "https://memory-core.shahmilsaari.my/",
|
|
6
6
|
"type": "module",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var Ul=Object.defineProperty;var zn=e=>{throw TypeError(e)};var Vl=(e,t,s)=>t in e?Ul(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var Pe=(e,t,s)=>Vl(e,typeof t!="symbol"?t+"":t,s),tr=(e,t,s)=>t.has(e)||zn("Cannot "+s);var o=(e,t,s)=>(tr(e,t,"read from private field"),s?s.call(e):t.get(e)),N=(e,t,s)=>t.has(e)?zn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),D=(e,t,s,r)=>(tr(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),U=(e,t,s)=>(tr(e,t,"access private method"),s);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const v of i.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&r(v)}).observe(document,{childList:!0,subtree:!0});function s(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=s(a);fetch(a.href,i)}})();const zl=!1;var wr=Array.isArray,Hl=Array.prototype.indexOf,Ht=Array.prototype.includes,Ws=Array.from,Bl=Object.defineProperty,os=Object.getOwnPropertyDescriptor,ua=Object.getOwnPropertyDescriptors,Kl=Object.prototype,Yl=Array.prototype,Er=Object.getPrototypeOf,Hn=Object.isExtensible;const Gl=()=>{};function Jl(e){return e()}function lr(e){for(var t=0;t<e.length;t++)e[t]()}function va(){var e,t,s=new Promise((r,a)=>{e=r,t=a});return{promise:s,resolve:e,reject:t}}const le=2,Bt=4,ys=8,da=1<<24,Ke=16,qe=32,vt=64,or=128,Ce=512,Q=1024,ae=2048,Ue=4096,ce=8192,Ne=16384,It=32768,Bn=1<<25,Kt=65536,cr=1<<17,Ql=1<<18,Jt=1<<19,pa=1<<20,Be=1<<25,Ct=65536,Fs=1<<21,vs=1<<22,ft=1<<23,St=Symbol("$state"),Qe=new class extends Error{constructor(){super(...arguments);Pe(this,"name","StaleReactionError");Pe(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function _a(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Xl(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Zl(e,t,s){throw new Error("https://svelte.dev/e/each_key_duplicate")}function eo(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function to(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function so(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ro(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function no(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ao(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function io(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function lo(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const oo=1,co=2,ha=4,fo=8,uo=16,vo=2,ee=Symbol(),ga="http://www.w3.org/1999/xhtml";function po(){console.warn("https://svelte.dev/e/derived_inert")}function _o(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function ho(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function ba(e){return e===this.v}function go(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ma(e){return!go(e,this.v)}let ws=!1,bo=!1;function mo(){ws=!0}let z=null;function Yt(e){z=e}function ya(e,t=!1,s){z={p:z,i:!1,c:null,e:null,s:e,x:null,r:I,l:ws&&!t?{s:null,u:null,$:[]}:null}}function wa(e){var t=z,s=t.e;if(s!==null){t.e=null;for(var r of s)Ua(r)}return t.i=!0,z=t.p,{}}function Es(){return!ws||z!==null&&z.l===null}let bt=[];function Ea(){var e=bt;bt=[],lr(e)}function ut(e){if(bt.length===0&&!cs){var t=bt;queueMicrotask(()=>{t===bt&&Ea()})}bt.push(e)}function yo(){for(;bt.length>0;)Ea()}function xa(e){var t=I;if(t===null)return O.f|=ft,e;if(!(t.f&It)&&!(t.f&Bt))throw e;ct(e,t)}function ct(e,t){for(;t!==null;){if(t.f&or){if(!(t.f&It))throw e;try{t.b.error(e);return}catch(s){e=s}}t=t.parent}throw e}const wo=-7169;function G(e,t){e.f=e.f&wo|t}function xr(e){e.f&Ce||e.deps===null?G(e,Q):G(e,Ue)}function ka(e){if(e!==null)for(const t of e)!(t.f&le)||!(t.f&Ct)||(t.f^=Ct,ka(t.deps))}function Sa(e,t,s){e.f&ae?t.add(e):e.f&Ue&&s.add(e),ka(e.deps),G(e,Q)}const gt=new Set;let T=null,ne=null,fr=null,cs=!1,sr=!1,$t=null,Rs=null;var Kn=0;let Eo=1;var Wt,qt,yt,Xe,Ve,ps,ye,_s,lt,Ze,ze,Ut,Vt,wt,X,Cs,Ta,Ns,ur,Ms,xo;const Ps=class Ps{constructor(){N(this,X);Pe(this,"id",Eo++);Pe(this,"current",new Map);Pe(this,"previous",new Map);N(this,Wt,new Set);N(this,qt,new Set);N(this,yt,new Set);N(this,Xe,new Map);N(this,Ve,new Map);N(this,ps,null);N(this,ye,[]);N(this,_s,[]);N(this,lt,new Set);N(this,Ze,new Set);N(this,ze,new Map);N(this,Ut,new Set);Pe(this,"is_fork",!1);N(this,Vt,!1);N(this,wt,new Set)}skip_effect(t){o(this,ze).has(t)||o(this,ze).set(t,{d:[],m:[]}),o(this,Ut).delete(t)}unskip_effect(t,s=r=>this.schedule(r)){var r=o(this,ze).get(t);if(r){o(this,ze).delete(t);for(var a of r.d)G(a,ae),s(a);for(a of r.m)G(a,Ue),s(a)}o(this,Ut).add(t)}capture(t,s,r=!1){t.v!==ee&&!this.previous.has(t)&&this.previous.set(t,t.v),t.f&ft||(this.current.set(t,[s,r]),ne==null||ne.set(t,s)),this.is_fork||(t.v=s)}activate(){T=this}deactivate(){T=null,ne=null}flush(){try{sr=!0,T=this,U(this,X,Ns).call(this)}finally{Kn=0,fr=null,$t=null,Rs=null,sr=!1,T=null,ne=null,Tt.clear()}}discard(){for(const t of o(this,qt))t(this);o(this,qt).clear(),o(this,yt).clear(),gt.delete(this)}register_created_effect(t){o(this,_s).push(t)}increment(t,s){let r=o(this,Xe).get(s)??0;if(o(this,Xe).set(s,r+1),t){let a=o(this,Ve).get(s)??0;o(this,Ve).set(s,a+1)}}decrement(t,s,r){let a=o(this,Xe).get(s)??0;if(a===1?o(this,Xe).delete(s):o(this,Xe).set(s,a-1),t){let i=o(this,Ve).get(s)??0;i===1?o(this,Ve).delete(s):o(this,Ve).set(s,i-1)}o(this,Vt)||r||(D(this,Vt,!0),ut(()=>{D(this,Vt,!1),this.flush()}))}transfer_effects(t,s){for(const r of t)o(this,lt).add(r);for(const r of s)o(this,Ze).add(r);t.clear(),s.clear()}oncommit(t){o(this,Wt).add(t)}ondiscard(t){o(this,qt).add(t)}on_fork_commit(t){o(this,yt).add(t)}run_fork_commit_callbacks(){for(const t of o(this,yt))t(this);o(this,yt).clear()}settled(){return(o(this,ps)??D(this,ps,va())).promise}static ensure(){if(T===null){const t=T=new Ps;sr||(gt.add(T),cs||ut(()=>{T===t&&t.flush()}))}return T}apply(){{ne=null;return}}schedule(t){var a;if(fr=t,(a=t.b)!=null&&a.is_pending&&t.f&(Bt|ys|da)&&!(t.f&It)){t.b.defer_effect(t);return}for(var s=t;s.parent!==null;){s=s.parent;var r=s.f;if($t!==null&&s===I&&(O===null||!(O.f&le)))return;if(r&(vt|qe)){if(!(r&Q))return;s.f^=Q}}o(this,ye).push(s)}};Wt=new WeakMap,qt=new WeakMap,yt=new WeakMap,Xe=new WeakMap,Ve=new WeakMap,ps=new WeakMap,ye=new WeakMap,_s=new WeakMap,lt=new WeakMap,Ze=new WeakMap,ze=new WeakMap,Ut=new WeakMap,Vt=new WeakMap,wt=new WeakMap,X=new WeakSet,Cs=function(){return this.is_fork||o(this,Ve).size>0},Ta=function(){for(const r of o(this,wt))for(const a of o(r,Ve).keys()){for(var t=!1,s=a;s.parent!==null;){if(o(this,ze).has(s)){t=!0;break}s=s.parent}if(!t)return!0}return!1},Ns=function(){var d,f;if(Kn++>1e3&&(gt.delete(this),So()),!U(this,X,Cs).call(this)){for(const p of o(this,lt))o(this,Ze).delete(p),G(p,ae),this.schedule(p);for(const p of o(this,Ze))G(p,Ue),this.schedule(p)}const t=o(this,ye);D(this,ye,[]),this.apply();var s=$t=[],r=[],a=Rs=[];for(const p of t)try{U(this,X,ur).call(this,p,s,r)}catch(g){throw Ca(p),g}if(T=null,a.length>0){var i=Ps.ensure();for(const p of a)i.schedule(p)}if($t=null,Rs=null,U(this,X,Cs).call(this)||U(this,X,Ta).call(this)){U(this,X,Ms).call(this,r),U(this,X,Ms).call(this,s);for(const[p,g]of o(this,ze))Ra(p,g)}else{o(this,Xe).size===0&>.delete(this),o(this,lt).clear(),o(this,Ze).clear();for(const p of o(this,Wt))p(this);o(this,Wt).clear(),Yn(r),Yn(s),(d=o(this,ps))==null||d.resolve()}var v=T;if(o(this,ye).length>0){const p=v??(v=this);o(p,ye).push(...o(this,ye).filter(g=>!o(p,ye).includes(g)))}v!==null&&(gt.add(v),U(f=v,X,Ns).call(f))},ur=function(t,s,r){t.f^=Q;for(var a=t.first;a!==null;){var i=a.f,v=(i&(qe|vt))!==0,d=v&&(i&Q)!==0,f=d||(i&ce)!==0||o(this,ze).has(a);if(!f&&a.fn!==null){v?a.f^=Q:i&Bt?s.push(a):Qt(a)&&(i&Ke&&o(this,Ze).add(a),Dt(a));var p=a.first;if(p!==null){a=p;continue}}for(;a!==null;){var g=a.next;if(g!==null){a=g;break}a=a.parent}}},Ms=function(t){for(var s=0;s<t.length;s+=1)Sa(t[s],o(this,lt),o(this,Ze))},xo=function(){var g,x,w;for(const E of gt){var t=E.id<this.id,s=[];for(const[m,[u,y]]of this.current){if(E.current.has(m)){var r=E.current.get(m)[0];if(t&&u!==r)E.current.set(m,[u,y]);else continue}s.push(m)}var a=[...E.current.keys()].filter(m=>!this.current.has(m));if(a.length===0)t&&E.discard();else if(s.length>0){if(t)for(const m of o(this,Ut))E.unskip_effect(m,u=>{var y;u.f&(Ke|vs)?E.schedule(u):U(y=E,X,Ms).call(y,[u])});E.activate();var i=new Set,v=new Map;for(var d of s)Aa(d,a,i,v);v=new Map;var f=[...E.current.keys()].filter(m=>this.current.has(m)?this.current.get(m)[0]!==m:!0);for(const m of o(this,_s))!(m.f&(Ne|ce|cr))&&kr(m,f,v)&&(m.f&(vs|Ke)?(G(m,ae),E.schedule(m)):o(E,lt).add(m));if(o(E,ye).length>0){E.apply();for(var p of o(E,ye))U(g=E,X,ur).call(g,p,[],[]);D(E,ye,[])}E.deactivate()}}for(const E of gt)o(E,wt).has(this)&&(o(E,wt).delete(this),o(E,wt).size===0&&!U(x=E,X,Cs).call(x)&&(E.activate(),U(w=E,X,Ns).call(w)))};let Nt=Ps;function ko(e){var t=cs;cs=!0;try{for(var s;;){if(yo(),T===null)return s;T.flush()}}finally{cs=t}}function So(){try{ro()}catch(e){ct(e,fr)}}let je=null;function Yn(e){var t=e.length;if(t!==0){for(var s=0;s<t;){var r=e[s++];if(!(r.f&(Ne|ce))&&Qt(r)&&(je=new Set,Dt(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&za(r),(je==null?void 0:je.size)>0)){Tt.clear();for(const a of je){if(a.f&(Ne|ce))continue;const i=[a];let v=a.parent;for(;v!==null;)je.has(v)&&(je.delete(v),i.push(v)),v=v.parent;for(let d=i.length-1;d>=0;d--){const f=i[d];f.f&(Ne|ce)||Dt(f)}}je.clear()}}je=null}}function Aa(e,t,s,r){if(!s.has(e)&&(s.add(e),e.reactions!==null))for(const a of e.reactions){const i=a.f;i&le?Aa(a,t,s,r):i&(vs|Ke)&&!(i&ae)&&kr(a,t,r)&&(G(a,ae),Sr(a))}}function kr(e,t,s){const r=s.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const a of e.deps){if(Ht.call(t,a))return!0;if(a.f&le&&kr(a,t,s))return s.set(a,!0),!0}return s.set(e,!1),!1}function Sr(e){T.schedule(e)}function Ra(e,t){if(!(e.f&qe&&e.f&Q)){e.f&ae?t.d.push(e):e.f&Ue&&t.m.push(e),G(e,Q);for(var s=e.first;s!==null;)Ra(s,t),s=s.next}}function Ca(e){G(e,Q);for(var t=e.first;t!==null;)Ca(t),t=t.next}function To(e){let t=0,s=Mt(0),r;return()=>{Cr()&&(n(s),Us(()=>(t===0&&(r=b(()=>e(()=>fs(s)))),t+=1,()=>{ut(()=>{t-=1,t===0&&(r==null||r(),r=void 0,fs(s))})})))}}var Ao=Kt|Jt;function Ro(e,t,s,r){new Co(e,t,s,r)}var Se,yr,Te,Et,ve,Ae,oe,we,et,xt,ot,zt,hs,gs,tt,js,J,No,Mo,Do,vr,Ds,Is,dr,pr;class Co{constructor(t,s,r,a){N(this,J);Pe(this,"parent");Pe(this,"is_pending",!1);Pe(this,"transform_error");N(this,Se);N(this,yr,null);N(this,Te);N(this,Et);N(this,ve);N(this,Ae,null);N(this,oe,null);N(this,we,null);N(this,et,null);N(this,xt,0);N(this,ot,0);N(this,zt,!1);N(this,hs,new Set);N(this,gs,new Set);N(this,tt,null);N(this,js,To(()=>(D(this,tt,Mt(o(this,xt))),()=>{D(this,tt,null)})));var i;D(this,Se,t),D(this,Te,s),D(this,Et,v=>{var d=I;d.b=this,d.f|=or,r(v)}),this.parent=I.b,this.transform_error=a??((i=this.parent)==null?void 0:i.transform_error)??(v=>v),D(this,ve,Mr(()=>{U(this,J,vr).call(this)},Ao))}defer_effect(t){Sa(t,o(this,hs),o(this,gs))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!o(this,Te).pending}update_pending_count(t,s){U(this,J,dr).call(this,t,s),D(this,xt,o(this,xt)+t),!(!o(this,tt)||o(this,zt))&&(D(this,zt,!0),ut(()=>{D(this,zt,!1),o(this,tt)&&Gt(o(this,tt),o(this,xt))}))}get_effect_pending(){return o(this,js).call(this),n(o(this,tt))}error(t){if(!o(this,Te).onerror&&!o(this,Te).failed)throw t;T!=null&&T.is_fork?(o(this,Ae)&&T.skip_effect(o(this,Ae)),o(this,oe)&&T.skip_effect(o(this,oe)),o(this,we)&&T.skip_effect(o(this,we)),T.on_fork_commit(()=>{U(this,J,pr).call(this,t)})):U(this,J,pr).call(this,t)}}Se=new WeakMap,yr=new WeakMap,Te=new WeakMap,Et=new WeakMap,ve=new WeakMap,Ae=new WeakMap,oe=new WeakMap,we=new WeakMap,et=new WeakMap,xt=new WeakMap,ot=new WeakMap,zt=new WeakMap,hs=new WeakMap,gs=new WeakMap,tt=new WeakMap,js=new WeakMap,J=new WeakSet,No=function(){try{D(this,Ae,Re(()=>o(this,Et).call(this,o(this,Se))))}catch(t){this.error(t)}},Mo=function(t){const s=o(this,Te).failed;s&&D(this,we,Re(()=>{s(o(this,Se),()=>t,()=>()=>{})}))},Do=function(){const t=o(this,Te).pending;t&&(this.is_pending=!0,D(this,oe,Re(()=>t(o(this,Se)))),ut(()=>{var s=D(this,et,document.createDocumentFragment()),r=st();s.append(r),D(this,Ae,U(this,J,Is).call(this,()=>Re(()=>o(this,Et).call(this,r)))),o(this,ot)===0&&(o(this,Se).before(s),D(this,et,null),At(o(this,oe),()=>{D(this,oe,null)}),U(this,J,Ds).call(this,T))}))},vr=function(){try{if(this.is_pending=this.has_pending_snippet(),D(this,ot,0),D(this,xt,0),D(this,Ae,Re(()=>{o(this,Et).call(this,o(this,Se))})),o(this,ot)>0){var t=D(this,et,document.createDocumentFragment());Or(o(this,Ae),t);const s=o(this,Te).pending;D(this,oe,Re(()=>s(o(this,Se))))}else U(this,J,Ds).call(this,T)}catch(s){this.error(s)}},Ds=function(t){this.is_pending=!1,t.transfer_effects(o(this,hs),o(this,gs))},Is=function(t){var s=I,r=O,a=z;Ie(o(this,ve)),De(o(this,ve)),Yt(o(this,ve).ctx);try{return Nt.ensure(),t()}catch(i){return xa(i),null}finally{Ie(s),De(r),Yt(a)}},dr=function(t,s){var r;if(!this.has_pending_snippet()){this.parent&&U(r=this.parent,J,dr).call(r,t,s);return}D(this,ot,o(this,ot)+t),o(this,ot)===0&&(U(this,J,Ds).call(this,s),o(this,oe)&&At(o(this,oe),()=>{D(this,oe,null)}),o(this,et)&&(o(this,Se).before(o(this,et)),D(this,et,null)))},pr=function(t){o(this,Ae)&&(pe(o(this,Ae)),D(this,Ae,null)),o(this,oe)&&(pe(o(this,oe)),D(this,oe,null)),o(this,we)&&(pe(o(this,we)),D(this,we,null));var s=o(this,Te).onerror;let r=o(this,Te).failed;var a=!1,i=!1;const v=()=>{if(a){ho();return}a=!0,i&&lo(),o(this,we)!==null&&At(o(this,we),()=>{D(this,we,null)}),U(this,J,Is).call(this,()=>{U(this,J,vr).call(this)})},d=f=>{try{i=!0,s==null||s(f,v),i=!1}catch(p){ct(p,o(this,ve)&&o(this,ve).parent)}r&&D(this,we,U(this,J,Is).call(this,()=>{try{return Re(()=>{var p=I;p.b=this,p.f|=or,r(o(this,Se),()=>f,()=>v)})}catch(p){return ct(p,o(this,ve).parent),null}}))};ut(()=>{var f;try{f=this.transform_error(t)}catch(p){ct(p,o(this,ve)&&o(this,ve).parent);return}f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(d,p=>ct(p,o(this,ve)&&o(this,ve).parent)):d(f)})};function Io(e,t,s,r){const a=Es()?Tr:Ma;var i=e.filter(w=>!w.settled);if(s.length===0&&i.length===0){r(t.map(a));return}var v=I,d=Oo(),f=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(w=>w.promise)):null;function p(w){d();try{r(w)}catch(E){v.f&Ne||ct(E,v)}Ls()}if(s.length===0){f.then(()=>p(t.map(a)));return}var g=Na();function x(){Promise.all(s.map(w=>Fo(w))).then(w=>p([...t.map(a),...w])).catch(w=>ct(w,v)).finally(()=>g())}f?f.then(()=>{d(),x(),Ls()}):x()}function Oo(){var e=I,t=O,s=z,r=T;return function(i=!0){Ie(e),De(t),Yt(s),i&&!(e.f&Ne)&&(r==null||r.activate(),r==null||r.apply())}}function Ls(e=!0){Ie(null),De(null),Yt(null),e&&(T==null||T.deactivate())}function Na(){var e=I,t=e.b,s=T,r=t.is_rendered();return t.update_pending_count(1,s),s.increment(r,e),(a=!1)=>{t.update_pending_count(-1,s),s.decrement(r,e,a)}}function Tr(e){var t=le|ae;return I!==null&&(I.f|=Jt),{ctx:z,deps:null,effects:null,equals:ba,f:t,fn:e,reactions:null,rv:0,v:ee,wv:0,parent:I,ac:null}}function Fo(e,t,s){let r=I;r===null&&Xl();var a=void 0,i=Mt(ee),v=!O,d=new Map;return Jo(()=>{var E;var f=I,p=va();a=p.promise;try{Promise.resolve(e()).then(p.resolve,p.reject).finally(Ls)}catch(m){p.reject(m),Ls()}var g=T;if(v){if(f.f&It)var x=Na();if(r.b.is_rendered())(E=d.get(g))==null||E.reject(Qe),d.delete(g);else{for(const m of d.values())m.reject(Qe);d.clear()}d.set(g,p)}const w=(m,u=void 0)=>{if(x){var y=u===Qe;x(y)}if(!(u===Qe||f.f&Ne)){if(g.activate(),u)i.f|=ft,Gt(i,u);else{i.f&ft&&(i.f^=ft),Gt(i,m);for(const[R,j]of d){if(d.delete(R),R===g)break;j.reject(Qe)}}g.deactivate()}};p.promise.then(w,m=>w(null,m||"unknown"))}),Nr(()=>{for(const f of d.values())f.reject(Qe)}),new Promise(f=>{function p(g){function x(){g===a?f(i):p(a)}g.then(x,x)}p(a)})}function Ma(e){const t=Tr(e);return t.equals=ma,t}function Lo(e){var t=e.effects;if(t!==null){e.effects=null;for(var s=0;s<t.length;s+=1)pe(t[s])}}function Ar(e){var t,s=I,r=e.parent;if(!dt&&r!==null&&r.f&(Ne|ce))return po(),e.v;Ie(r);try{e.f&=~Ct,Lo(e),t=Ja(e)}finally{Ie(s)}return t}function Da(e){var t=Ar(e);if(!e.equals(t)&&(e.wv=Ya(),(!(T!=null&&T.is_fork)||e.deps===null)&&(T!==null?T.capture(e,t,!0):e.v=t,e.deps===null))){G(e,Q);return}dt||(ne!==null?(Cr()||T!=null&&T.is_fork)&&ne.set(e,t):xr(e))}function Po(e){var t,s;if(e.effects!==null)for(const r of e.effects)(r.teardown||r.ac)&&((t=r.teardown)==null||t.call(r),(s=r.ac)==null||s.abort(Qe),r.teardown=Gl,r.ac=null,ds(r,0),Dr(r))}function Ia(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&Dt(t)}let _r=new Set;const Tt=new Map;let Oa=!1;function Mt(e,t){var s={f:0,v:e,reactions:null,equals:ba,rv:0,wv:0};return s}function at(e,t){const s=Mt(e);return Zo(s),s}function Y(e,t=!1,s=!0){var a;const r=Mt(e);return t||(r.equals=ma),ws&&s&&z!==null&&z.l!==null&&((a=z.l).s??(a.s=[])).push(r),r}function rs(e,t){return M(e,b(()=>n(e))),t}function M(e,t,s=!1){O!==null&&(!We||O.f&cr)&&Es()&&O.f&(le|Ke|vs|cr)&&(Me===null||!Ht.call(Me,e))&&io();let r=s?is(t):t;return Gt(e,r,Rs)}function Gt(e,t,s=null){if(!e.equals(t)){Tt.set(e,dt?t:e.v);var r=Nt.ensure();if(r.capture(e,t),e.f&le){const a=e;e.f&ae&&Ar(a),ne===null&&xr(a)}e.wv=Ya(),Fa(e,ae,s),Es()&&I!==null&&I.f&Q&&!(I.f&(qe|vt))&&(ke===null?ec([e]):ke.push(e)),!r.is_fork&&_r.size>0&&!Oa&&jo()}return t}function jo(){Oa=!1;for(const e of _r)e.f&Q&&G(e,Ue),Qt(e)&&Dt(e);_r.clear()}function fs(e){M(e,e.v+1)}function Fa(e,t,s){var r=e.reactions;if(r!==null)for(var a=Es(),i=r.length,v=0;v<i;v++){var d=r[v],f=d.f;if(!(!a&&d===I)){var p=(f&ae)===0;if(p&&G(d,t),f&le){var g=d;ne==null||ne.delete(g),f&Ct||(f&Ce&&(I===null||!(I.f&Fs))&&(d.f|=Ct),Fa(g,Ue,s))}else if(p){var x=d;f&Ke&&je!==null&&je.add(x),s!==null?s.push(x):Sr(x)}}}}function is(e){if(typeof e!="object"||e===null||St in e)return e;const t=Er(e);if(t!==Kl&&t!==Yl)return e;var s=new Map,r=wr(e),a=at(0),i=Rt,v=d=>{if(Rt===i)return d();var f=O,p=Rt;De(null),Zn(i);var g=d();return De(f),Zn(p),g};return r&&s.set("length",at(e.length)),new Proxy(e,{defineProperty(d,f,p){(!("value"in p)||p.configurable===!1||p.enumerable===!1||p.writable===!1)&&no();var g=s.get(f);return g===void 0?v(()=>{var x=at(p.value);return s.set(f,x),x}):M(g,p.value,!0),!0},deleteProperty(d,f){var p=s.get(f);if(p===void 0){if(f in d){const g=v(()=>at(ee));s.set(f,g),fs(a)}}else M(p,ee),fs(a);return!0},get(d,f,p){var E;if(f===St)return e;var g=s.get(f),x=f in d;if(g===void 0&&(!x||(E=os(d,f))!=null&&E.writable)&&(g=v(()=>{var m=is(x?d[f]:ee),u=at(m);return u}),s.set(f,g)),g!==void 0){var w=n(g);return w===ee?void 0:w}return Reflect.get(d,f,p)},getOwnPropertyDescriptor(d,f){var p=Reflect.getOwnPropertyDescriptor(d,f);if(p&&"value"in p){var g=s.get(f);g&&(p.value=n(g))}else if(p===void 0){var x=s.get(f),w=x==null?void 0:x.v;if(x!==void 0&&w!==ee)return{enumerable:!0,configurable:!0,value:w,writable:!0}}return p},has(d,f){var w;if(f===St)return!0;var p=s.get(f),g=p!==void 0&&p.v!==ee||Reflect.has(d,f);if(p!==void 0||I!==null&&(!g||(w=os(d,f))!=null&&w.writable)){p===void 0&&(p=v(()=>{var E=g?is(d[f]):ee,m=at(E);return m}),s.set(f,p));var x=n(p);if(x===ee)return!1}return g},set(d,f,p,g){var L;var x=s.get(f),w=f in d;if(r&&f==="length")for(var E=p;E<x.v;E+=1){var m=s.get(E+"");m!==void 0?M(m,ee):E in d&&(m=v(()=>at(ee)),s.set(E+"",m))}if(x===void 0)(!w||(L=os(d,f))!=null&&L.writable)&&(x=v(()=>at(void 0)),M(x,is(p)),s.set(f,x));else{w=x.v!==ee;var u=v(()=>is(p));M(x,u)}var y=Reflect.getOwnPropertyDescriptor(d,f);if(y!=null&&y.set&&y.set.call(g,p),!w){if(r&&typeof f=="string"){var R=s.get("length"),j=Number(f);Number.isInteger(j)&&j>=R.v&&M(R,j+1)}fs(a)}return!0},ownKeys(d){n(a);var f=Reflect.ownKeys(d).filter(x=>{var w=s.get(x);return w===void 0||w.v!==ee});for(var[p,g]of s)g.v!==ee&&!(p in d)&&f.push(p);return f},setPrototypeOf(){ao()}})}function Gn(e){try{if(e!==null&&typeof e=="object"&&St in e)return e[St]}catch{}return e}function $o(e,t){return Object.is(Gn(e),Gn(t))}var Jn,La,Pa,ja;function Wo(){if(Jn===void 0){Jn=window,La=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,s=Text.prototype;Pa=os(t,"firstChild").get,ja=os(t,"nextSibling").get,Hn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Hn(s)&&(s.__t=void 0)}}function st(e=""){return document.createTextNode(e)}function Rr(e){return Pa.call(e)}function xs(e){return ja.call(e)}function _(e,t){return Rr(e)}function qo(e,t=!1){{var s=Rr(e);return s instanceof Comment&&s.data===""?xs(s):s}}function h(e,t=1,s=!1){let r=e;for(;t--;)r=xs(r);return r}function Uo(e){e.textContent=""}function $a(){return!1}function Vo(e,t,s){return document.createElementNS(ga,e,void 0)}let Qn=!1;function zo(){Qn||(Qn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const s of e.target.elements)(t=s.__on_r)==null||t.call(s)})},{capture:!0}))}function qs(e){var t=O,s=I;De(null),Ie(null);try{return e()}finally{De(t),Ie(s)}}function Wa(e,t,s,r=s){e.addEventListener(t,()=>qs(s));const a=e.__on_r;a?e.__on_r=()=>{a(),r(!0)}:e.__on_r=()=>r(!0),zo()}function qa(e){I===null&&(O===null&&so(),to()),dt&&eo()}function Ho(e,t){var s=t.last;s===null?t.last=t.first=e:(s.next=e,e.prev=s,t.last=e)}function Ye(e,t){var s=I;s!==null&&s.f&ce&&(e|=ce);var r={ctx:z,deps:null,nodes:null,f:e|ae|Ce,first:null,fn:t,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,wv:0,ac:null};T==null||T.register_created_effect(r);var a=r;if(e&Bt)$t!==null?$t.push(r):Nt.ensure().schedule(r);else if(t!==null){try{Dt(r)}catch(v){throw pe(r),v}a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&!(a.f&Jt)&&(a=a.first,e&Ke&&e&Kt&&a!==null&&(a.f|=Kt))}if(a!==null&&(a.parent=s,s!==null&&Ho(a,s),O!==null&&O.f&le&&!(e&vt))){var i=O;(i.effects??(i.effects=[])).push(a)}return r}function Cr(){return O!==null&&!We}function Nr(e){const t=Ye(ys,null);return G(t,Q),t.teardown=e,t}function hr(e){qa();var t=I.f,s=!O&&(t&qe)!==0&&(t&It)===0;if(s){var r=z;(r.e??(r.e=[])).push(e)}else return Ua(e)}function Ua(e){return Ye(Bt|pa,e)}function Bo(e){return qa(),Ye(ys|pa,e)}function Ko(e){Nt.ensure();const t=Ye(vt|Jt,e);return(s={})=>new Promise(r=>{s.outro?At(t,()=>{pe(t),r(void 0)}):(pe(t),r(void 0))})}function Yo(e){return Ye(Bt,e)}function be(e,t){var s=z,r={effect:null,ran:!1,deps:e};s.l.$.push(r),r.effect=Us(()=>{if(e(),!r.ran){r.ran=!0;var a=I;try{Ie(a.parent),b(t)}finally{Ie(a)}}})}function Go(){var e=z;Us(()=>{for(var t of e.l.$){t.deps();var s=t.effect;s.f&Q&&s.deps!==null&&G(s,Ue),Qt(s)&&Dt(s),t.ran=!1}})}function Jo(e){return Ye(vs|Jt,e)}function Us(e,t=0){return Ye(ys|t,e)}function V(e,t=[],s=[],r=[]){Io(r,t,s,a=>{Ye(ys,()=>e(...a.map(n)))})}function Mr(e,t=0){var s=Ye(Ke|t,e);return s}function Re(e){return Ye(qe|Jt,e)}function Va(e){var t=e.teardown;if(t!==null){const s=dt,r=O;Xn(!0),De(null);try{t.call(null)}finally{Xn(s),De(r)}}}function Dr(e,t=!1){var s=e.first;for(e.first=e.last=null;s!==null;){const a=s.ac;a!==null&&qs(()=>{a.abort(Qe)});var r=s.next;s.f&vt?s.parent=null:pe(s,t),s=r}}function Qo(e){for(var t=e.first;t!==null;){var s=t.next;t.f&qe||pe(t),t=s}}function pe(e,t=!0){var s=!1;(t||e.f&Ql)&&e.nodes!==null&&e.nodes.end!==null&&(Xo(e.nodes.start,e.nodes.end),s=!0),G(e,Bn),Dr(e,t&&!s),ds(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const i of r)i.stop();Va(e),e.f^=Bn,e.f|=Ne;var a=e.parent;a!==null&&a.first!==null&&za(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Xo(e,t){for(;e!==null;){var s=e===t?null:xs(e);e.remove(),e=s}}function za(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 At(e,t,s=!0){var r=[];Ha(e,r,!0);var a=()=>{s&&pe(e),t&&t()},i=r.length;if(i>0){var v=()=>--i||a();for(var d of r)d.out(v)}else a()}function Ha(e,t,s){if(!(e.f&ce)){e.f^=ce;var r=e.nodes&&e.nodes.t;if(r!==null)for(const d of r)(d.is_global||s)&&t.push(d);for(var a=e.first;a!==null;){var i=a.next;if(!(a.f&vt)){var v=(a.f&Kt)!==0||(a.f&qe)!==0&&(e.f&Ke)!==0;Ha(a,t,v?s:!1)}a=i}}}function Ir(e){Ba(e,!0)}function Ba(e,t){if(e.f&ce){e.f^=ce,e.f&Q||(G(e,ae),Nt.ensure().schedule(e));for(var s=e.first;s!==null;){var r=s.next,a=(s.f&Kt)!==0||(s.f&qe)!==0;Ba(s,a?t:!1),s=r}var i=e.nodes&&e.nodes.t;if(i!==null)for(const v of i)(v.is_global||t)&&v.in()}}function Or(e,t){if(e.nodes)for(var s=e.nodes.start,r=e.nodes.end;s!==null;){var a=s===r?null:xs(s);t.append(s),s=a}}let Os=!1,dt=!1;function Xn(e){dt=e}let O=null,We=!1;function De(e){O=e}let I=null;function Ie(e){I=e}let Me=null;function Zo(e){O!==null&&(Me===null?Me=[e]:Me.push(e))}let de=null,me=0,ke=null;function ec(e){ke=e}let Ka=1,mt=0,Rt=mt;function Zn(e){Rt=e}function Ya(){return++Ka}function Qt(e){var t=e.f;if(t&ae)return!0;if(t&le&&(e.f&=~Ct),t&Ue){for(var s=e.deps,r=s.length,a=0;a<r;a++){var i=s[a];if(Qt(i)&&Da(i),i.wv>e.wv)return!0}t&Ce&&ne===null&&G(e,Q)}return!1}function Ga(e,t,s=!0){var r=e.reactions;if(r!==null&&!(Me!==null&&Ht.call(Me,e)))for(var a=0;a<r.length;a++){var i=r[a];i.f&le?Ga(i,t,!1):t===i&&(s?G(i,ae):i.f&Q&&G(i,Ue),Sr(i))}}function Ja(e){var u;var t=de,s=me,r=ke,a=O,i=Me,v=z,d=We,f=Rt,p=e.f;de=null,me=0,ke=null,O=p&(qe|vt)?null:e,Me=null,Yt(e.ctx),We=!1,Rt=++mt,e.ac!==null&&(qs(()=>{e.ac.abort(Qe)}),e.ac=null);try{e.f|=Fs;var g=e.fn,x=g();e.f|=It;var w=e.deps,E=T==null?void 0:T.is_fork;if(de!==null){var m;if(E||ds(e,me),w!==null&&me>0)for(w.length=me+de.length,m=0;m<de.length;m++)w[me+m]=de[m];else e.deps=w=de;if(Cr()&&e.f&Ce)for(m=me;m<w.length;m++)((u=w[m]).reactions??(u.reactions=[])).push(e)}else!E&&w!==null&&me<w.length&&(ds(e,me),w.length=me);if(Es()&&ke!==null&&!We&&w!==null&&!(e.f&(le|Ue|ae)))for(m=0;m<ke.length;m++)Ga(ke[m],e);if(a!==null&&a!==e){if(mt++,a.deps!==null)for(let y=0;y<s;y+=1)a.deps[y].rv=mt;if(t!==null)for(const y of t)y.rv=mt;ke!==null&&(r===null?r=ke:r.push(...ke))}return e.f&ft&&(e.f^=ft),x}catch(y){return xa(y)}finally{e.f^=Fs,de=t,me=s,ke=r,O=a,Me=i,Yt(v),We=d,Rt=f}}function tc(e,t){let s=t.reactions;if(s!==null){var r=Hl.call(s,e);if(r!==-1){var a=s.length-1;a===0?s=t.reactions=null:(s[r]=s[a],s.pop())}}if(s===null&&t.f&le&&(de===null||!Ht.call(de,t))){var i=t;i.f&Ce&&(i.f^=Ce,i.f&=~Ct),i.v!==ee&&xr(i),Po(i),ds(i,0)}}function ds(e,t){var s=e.deps;if(s!==null)for(var r=t;r<s.length;r++)tc(e,s[r])}function Dt(e){var t=e.f;if(!(t&Ne)){G(e,Q);var s=I,r=Os;I=e,Os=!0;try{t&(Ke|da)?Qo(e):Dr(e),Va(e);var a=Ja(e);e.teardown=typeof a=="function"?a:null,e.wv=Ka;var i;zl&&bo&&e.f&ae&&e.deps}finally{Os=r,I=s}}}async function sc(){await Promise.resolve(),ko()}function n(e){var t=e.f,s=(t&le)!==0;if(O!==null&&!We){var r=I!==null&&(I.f&Ne)!==0;if(!r&&(Me===null||!Ht.call(Me,e))){var a=O.deps;if(O.f&Fs)e.rv<mt&&(e.rv=mt,de===null&&a!==null&&a[me]===e?me++:de===null?de=[e]:de.push(e));else{(O.deps??(O.deps=[])).push(e);var i=e.reactions;i===null?e.reactions=[O]:Ht.call(i,O)||i.push(O)}}}if(dt&&Tt.has(e))return Tt.get(e);if(s){var v=e;if(dt){var d=v.v;return(!(v.f&Q)&&v.reactions!==null||Xa(v))&&(d=Ar(v)),Tt.set(v,d),d}var f=(v.f&Ce)===0&&!We&&O!==null&&(Os||(O.f&Ce)!==0),p=(v.f&It)===0;Qt(v)&&(f&&(v.f|=Ce),Da(v)),f&&!p&&(Ia(v),Qa(v))}if(ne!=null&&ne.has(e))return ne.get(e);if(e.f&ft)throw e.v;return e.v}function Qa(e){if(e.f|=Ce,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&le&&!(t.f&Ce)&&(Ia(t),Qa(t))}function Xa(e){if(e.v===ee)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Tt.has(t)||t.f&le&&Xa(t))return!0;return!1}function b(e){var t=We;try{return We=!0,e()}finally{We=t}}function rc(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(St in e)gr(e);else if(!Array.isArray(e))for(let t in e){const s=e[t];typeof s=="object"&&s&&St in s&&gr(s)}}}function gr(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{gr(e[r],t)}catch{}const s=Er(e);if(s!==Object.prototype&&s!==Array.prototype&&s!==Map.prototype&&s!==Set.prototype&&s!==Date.prototype){const r=ua(s);for(let a in r){const i=r[a].get;if(i)try{i.call(e)}catch{}}}}}const nc=["touchstart","touchmove"];function ac(e){return nc.includes(e)}const Ss=Symbol("events"),ic=new Set,ea=new Set;function lc(e,t,s,r={}){function a(i){if(r.capture||br.call(t,i),!i.cancelBubble)return qs(()=>s==null?void 0:s.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ut(()=>{t.addEventListener(e,a,r)}):t.addEventListener(e,a,r),a}function ta(e,t,s,r,a){var i={capture:r,passive:a},v=lc(e,t,s,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Nr(()=>{t.removeEventListener(e,v,i)})}let sa=null;function br(e){var y,R;var t=this,s=t.ownerDocument,r=e.type,a=((y=e.composedPath)==null?void 0:y.call(e))||[],i=a[0]||e.target;sa=e;var v=0,d=sa===e&&e[Ss];if(d){var f=a.indexOf(d);if(f!==-1&&(t===document||t===window)){e[Ss]=t;return}var p=a.indexOf(t);if(p===-1)return;f<=p&&(v=f)}if(i=a[v]||e.target,i!==t){Bl(e,"currentTarget",{configurable:!0,get(){return i||s}});var g=O,x=I;De(null),Ie(null);try{for(var w,E=[];i!==null;){var m=i.assignedSlot||i.parentNode||i.host||null;try{var u=(R=i[Ss])==null?void 0:R[r];u!=null&&(!i.disabled||e.target===i)&&u.call(i,e)}catch(j){w?E.push(j):w=j}if(e.cancelBubble||m===t||m===null)break;i=m}if(w){for(let j of E)queueMicrotask(()=>{throw j});throw w}}finally{e[Ss]=t,delete e.currentTarget,De(g),Ie(x)}}}var ca;const rr=((ca=globalThis==null?void 0:globalThis.window)==null?void 0:ca.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function oc(e){return(rr==null?void 0:rr.createHTML(e))??e}function cc(e){var t=Vo("template");return t.innerHTML=oc(e.replaceAll("<!>","<!---->")),t.content}function Fr(e,t){var s=I;s.nodes===null&&(s.nodes={start:e,end:t,a:null,t:null})}function W(e,t){var s=(t&vo)!==0,r,a=!e.startsWith("<!>");return()=>{r===void 0&&(r=cc(a?e:"<!>"+e),r=Rr(r));var i=s||La?document.importNode(r,!0):r.cloneNode(!0);return Fr(i,i),i}}function ra(e=""){{var t=st(e+"");return Fr(t,t),t}}function fc(){var e=document.createDocumentFragment(),t=document.createComment(""),s=st();return e.append(t,s),Fr(t,s),e}function F(e,t){e!==null&&e.before(t)}function k(e,t){var s=t==null?"":typeof t=="object"?`${t}`:t;s!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=s,e.nodeValue=`${s}`)}function uc(e,t){return vc(e,t)}const Ts=new Map;function vc(e,{target:t,anchor:s,props:r={},events:a,context:i,intro:v=!0,transformError:d}){Wo();var f=void 0,p=Ko(()=>{var g=s??t.appendChild(st());Ro(g,{pending:()=>{}},E=>{ya({});var m=z;i&&(m.c=i),a&&(r.$$events=a),f=e(E,r)||{},wa()},d);var x=new Set,w=E=>{for(var m=0;m<E.length;m++){var u=E[m];if(!x.has(u)){x.add(u);var y=ac(u);for(const L of[t,document]){var R=Ts.get(L);R===void 0&&(R=new Map,Ts.set(L,R));var j=R.get(u);j===void 0?(L.addEventListener(u,br,{passive:y}),R.set(u,1)):R.set(u,j+1)}}}};return w(Ws(ic)),ea.add(w),()=>{var y;for(var E of x)for(const R of[t,document]){var m=Ts.get(R),u=m.get(E);--u==0?(R.removeEventListener(E,br),m.delete(E),m.size===0&&Ts.delete(R)):m.set(E,u)}ea.delete(w),g!==s&&((y=g.parentNode)==null||y.removeChild(g))}});return dc.set(f,p),f}let dc=new WeakMap;var $e,He,Ee,kt,bs,ms,$s;class pc{constructor(t,s=!0){Pe(this,"anchor");N(this,$e,new Map);N(this,He,new Map);N(this,Ee,new Map);N(this,kt,new Set);N(this,bs,!0);N(this,ms,t=>{if(o(this,$e).has(t)){var s=o(this,$e).get(t),r=o(this,He).get(s);if(r)Ir(r),o(this,kt).delete(s);else{var a=o(this,Ee).get(s);a&&(o(this,He).set(s,a.effect),o(this,Ee).delete(s),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),r=a.effect)}for(const[i,v]of o(this,$e)){if(o(this,$e).delete(i),i===t)break;const d=o(this,Ee).get(v);d&&(pe(d.effect),o(this,Ee).delete(v))}for(const[i,v]of o(this,He)){if(i===s||o(this,kt).has(i))continue;const d=()=>{if(Array.from(o(this,$e).values()).includes(i)){var p=document.createDocumentFragment();Or(v,p),p.append(st()),o(this,Ee).set(i,{effect:v,fragment:p})}else pe(v);o(this,kt).delete(i),o(this,He).delete(i)};o(this,bs)||!r?(o(this,kt).add(i),At(v,d,!1)):d()}}});N(this,$s,t=>{o(this,$e).delete(t);const s=Array.from(o(this,$e).values());for(const[r,a]of o(this,Ee))s.includes(r)||(pe(a.effect),o(this,Ee).delete(r))});this.anchor=t,D(this,bs,s)}ensure(t,s){var r=T,a=$a();if(s&&!o(this,He).has(t)&&!o(this,Ee).has(t))if(a){var i=document.createDocumentFragment(),v=st();i.append(v),o(this,Ee).set(t,{effect:Re(()=>s(v)),fragment:i})}else o(this,He).set(t,Re(()=>s(this.anchor)));if(o(this,$e).set(r,t),a){for(const[d,f]of o(this,He))d===t?r.unskip_effect(f):r.skip_effect(f);for(const[d,f]of o(this,Ee))d===t?r.unskip_effect(f.effect):r.skip_effect(f.effect);r.oncommit(o(this,ms)),r.ondiscard(o(this,$s))}else o(this,ms).call(this,r)}}$e=new WeakMap,He=new WeakMap,Ee=new WeakMap,kt=new WeakMap,bs=new WeakMap,ms=new WeakMap,$s=new WeakMap;function ue(e,t,s=!1){var r=new pc(e),a=s?Kt:0;function i(v,d){r.ensure(v,d)}Mr(()=>{var v=!1;t((d,f=0)=>{v=!0,i(f,d)}),v||i(-1,null)},a)}function _c(e,t,s){for(var r=[],a=t.length,i,v=t.length,d=0;d<a;d++){let x=t[d];At(x,()=>{if(i){if(i.pending.delete(x),i.done.add(x),i.pending.size===0){var w=e.outrogroups;mr(e,Ws(i.done)),w.delete(i),w.size===0&&(e.outrogroups=null)}}else v-=1},!1)}if(v===0){var f=r.length===0&&s!==null;if(f){var p=s,g=p.parentNode;Uo(g),g.append(p),e.items.clear()}mr(e,t,!f)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function mr(e,t,s=!0){var r;if(e.pending.size>0){r=new Set;for(const v of e.pending.values())for(const d of v)r.add(e.items.get(d).e)}for(var a=0;a<t.length;a++){var i=t[a];if(r!=null&&r.has(i)){i.f|=Be;const v=document.createDocumentFragment();Or(i,v)}else pe(t[a],s)}}var na;function jt(e,t,s,r,a,i=null){var v=e,d=new Map,f=(t&ha)!==0;if(f){var p=e;v=p.appendChild(st())}var g=null,x=Ma(()=>{var L=s();return wr(L)?L:L==null?[]:Ws(L)}),w,E=new Map,m=!0;function u(L){j.effect.f&Ne||(j.pending.delete(L),j.fallback=g,hc(j,w,v,t,r),g!==null&&(w.length===0?g.f&Be?(g.f^=Be,ls(g,null,v)):Ir(g):At(g,()=>{g=null})))}function y(L){j.pending.delete(L)}var R=Mr(()=>{w=n(x);for(var L=w.length,Z=new Set,te=T,_e=$a(),se=0;se<L;se+=1){var $=w[se],rt=r($,se),fe=m?null:d.get(rt);fe?(fe.v&&Gt(fe.v,$),fe.i&&Gt(fe.i,se),_e&&te.unskip_effect(fe.e)):(fe=gc(d,m?v:na??(na=st()),$,rt,se,a,t,s),m||(fe.e.f|=Be),d.set(rt,fe)),Z.add(rt)}if(L===0&&i&&!g&&(m?g=Re(()=>i(v)):(g=Re(()=>i(na??(na=st()))),g.f|=Be)),L>Z.size&&Zl(),!m)if(E.set(te,Z),_e){for(const[nt,pt]of d)Z.has(nt)||te.skip_effect(pt.e);te.oncommit(u),te.ondiscard(y)}else u(te);n(x)}),j={effect:R,items:d,pending:E,outrogroups:null,fallback:g};m=!1}function ns(e){for(;e!==null&&!(e.f&qe);)e=e.next;return e}function hc(e,t,s,r,a){var fe,nt,pt,_t,ks,Xt,Zt,es,ts;var i=(r&fo)!==0,v=t.length,d=e.items,f=ns(e.effect.first),p,g=null,x,w=[],E=[],m,u,y,R;if(i)for(R=0;R<v;R+=1)m=t[R],u=a(m,R),y=d.get(u).e,y.f&Be||((nt=(fe=y.nodes)==null?void 0:fe.a)==null||nt.measure(),(x??(x=new Set)).add(y));for(R=0;R<v;R+=1){if(m=t[R],u=a(m,R),y=d.get(u).e,e.outrogroups!==null)for(const Oe of e.outrogroups)Oe.pending.delete(y),Oe.done.delete(y);if(y.f&ce&&(Ir(y),i&&((_t=(pt=y.nodes)==null?void 0:pt.a)==null||_t.unfix(),(x??(x=new Set)).delete(y))),y.f&Be)if(y.f^=Be,y===f)ls(y,null,s);else{var j=g?g.next:f;y===e.effect.last&&(e.effect.last=y.prev),y.prev&&(y.prev.next=y.next),y.next&&(y.next.prev=y.prev),it(e,g,y),it(e,y,j),ls(y,j,s),g=y,w=[],E=[],f=ns(g.next);continue}if(y!==f){if(p!==void 0&&p.has(y)){if(w.length<E.length){var L=E[0],Z;g=L.prev;var te=w[0],_e=w[w.length-1];for(Z=0;Z<w.length;Z+=1)ls(w[Z],L,s);for(Z=0;Z<E.length;Z+=1)p.delete(E[Z]);it(e,te.prev,_e.next),it(e,g,te),it(e,_e,L),f=L,g=_e,R-=1,w=[],E=[]}else p.delete(y),ls(y,f,s),it(e,y.prev,y.next),it(e,y,g===null?e.effect.first:g.next),it(e,g,y),g=y;continue}for(w=[],E=[];f!==null&&f!==y;)(p??(p=new Set)).add(f),E.push(f),f=ns(f.next);if(f===null)continue}y.f&Be||w.push(y),g=y,f=ns(y.next)}if(e.outrogroups!==null){for(const Oe of e.outrogroups)Oe.pending.size===0&&(mr(e,Ws(Oe.done)),(ks=e.outrogroups)==null||ks.delete(Oe));e.outrogroups.size===0&&(e.outrogroups=null)}if(f!==null||p!==void 0){var se=[];if(p!==void 0)for(y of p)y.f&ce||se.push(y);for(;f!==null;)!(f.f&ce)&&f!==e.fallback&&se.push(f),f=ns(f.next);var $=se.length;if($>0){var rt=r&ha&&v===0?s:null;if(i){for(R=0;R<$;R+=1)(Zt=(Xt=se[R].nodes)==null?void 0:Xt.a)==null||Zt.measure();for(R=0;R<$;R+=1)(ts=(es=se[R].nodes)==null?void 0:es.a)==null||ts.fix()}_c(e,se,rt)}}i&&ut(()=>{var Oe,Ot;if(x!==void 0)for(y of x)(Ot=(Oe=y.nodes)==null?void 0:Oe.a)==null||Ot.apply()})}function gc(e,t,s,r,a,i,v,d){var f=v&oo?v&uo?Mt(s):Y(s,!1,!1):null,p=v&co?Mt(a):null;return{v:f,i:p,e:Re(()=>(i(t,f??s,p??a,d),()=>{e.delete(r)}))}}function ls(e,t,s){if(e.nodes)for(var r=e.nodes.start,a=e.nodes.end,i=t&&!(t.f&Be)?t.nodes.start:s;r!==null;){var v=xs(r);if(i.before(r),r===a)return;r=v}}function it(e,t,s){t===null?e.effect.first=s:t.next=s,s===null?e.effect.last=t:s.prev=t}const aa=[...`
|
|
2
|
-
\r\f \v\uFEFF`];function bc(e,t,s){var r=e==null?"":""+e;if(s){for(var a of Object.keys(s))if(s[a])r=r?r+" "+a:a;else if(r.length)for(var i=a.length,v=0;(v=r.indexOf(a,v))>=0;){var d=v+i;(v===0||aa.includes(r[v-1]))&&(d===r.length||aa.includes(r[d]))?r=(v===0?"":r.substring(0,v))+r.substring(d+1):v=d}}return r===""?null:r}function mc(e,t){return e==null?null:String(e)}function as(e,t,s,r,a,i){var v=e.__className;if(v!==s||v===void 0){var d=bc(s,r,i);d==null?e.removeAttribute("class"):e.className=d,e.__className=s}else if(i&&a!==i)for(var f in i){var p=!!i[f];(a==null||p!==!!a[f])&&e.classList.toggle(f,p)}return i}function ia(e,t,s,r){var a=e.__style;if(a!==t){var i=mc(t);i==null?e.removeAttribute("style"):e.style.cssText=i,e.__style=t}return r}function Za(e,t,s=!1){if(e.multiple){if(t==null)return;if(!wr(t))return _o();for(var r of e.options)r.selected=t.includes(us(r));return}for(r of e.options){var a=us(r);if($o(a,t)){r.selected=!0;return}}(!s||t!==void 0)&&(e.selectedIndex=-1)}function yc(e){var t=new MutationObserver(()=>{Za(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Nr(()=>{t.disconnect()})}function nr(e,t,s=t){var r=new WeakSet,a=!0;Wa(e,"change",i=>{var v=i?"[selected]":":checked",d;if(e.multiple)d=[].map.call(e.querySelectorAll(v),us);else{var f=e.querySelector(v)??e.querySelector("option:not([disabled])");d=f&&us(f)}s(d),e.__value=d,T!==null&&r.add(T)}),Yo(()=>{var i=t();if(e===document.activeElement){var v=T;if(r.has(v))return}if(Za(e,i,a),a&&i===void 0){var d=e.querySelector(":checked");d!==null&&(i=us(d),s(i))}e.__value=i,a=!1}),yc(e)}function us(e){return"__value"in e?e.__value:e.value}const wc=Symbol("is custom element"),Ec=Symbol("is html");function xc(e,t,s,r){var a=kc(e);a[t]!==(a[t]=s)&&(s==null?e.removeAttribute(t):typeof s!="string"&&Sc(e).includes(t)?e[t]=s:e.setAttribute(t,s))}function kc(e){return e.__attributes??(e.__attributes={[wc]:e.nodeName.includes("-"),[Ec]:e.namespaceURI===ga})}var la=new Map;function Sc(e){var t=e.getAttribute("is")||e.nodeName,s=la.get(t);if(s)return s;la.set(t,s=[]);for(var r,a=e,i=Element.prototype;i!==a;){r=ua(a);for(var v in r)r[v].set&&s.push(v);a=Er(a)}return s}function As(e,t,s=t){var r=new WeakSet;Wa(e,"input",async a=>{var i=a?e.defaultValue:e.value;if(i=ar(e)?ir(i):i,s(i),T!==null&&r.add(T),await sc(),i!==(i=t())){var v=e.selectionStart,d=e.selectionEnd,f=e.value.length;if(e.value=i??"",d!==null){var p=e.value.length;v===d&&d===f&&p>f?(e.selectionStart=p,e.selectionEnd=p):(e.selectionStart=v,e.selectionEnd=Math.min(d,p))}}}),b(t)==null&&e.value&&(s(ar(e)?ir(e.value):e.value),T!==null&&r.add(T)),Us(()=>{var a=t();if(e===document.activeElement){var i=T;if(r.has(i))return}ar(e)&&a===ir(e.value)||e.type==="date"&&!a&&!e.value||a!==e.value&&(e.value=a??"")})}function ar(e){var t=e.type;return t==="number"||t==="range"}function ir(e){return e===""?null:+e}function Tc(e){return function(...t){var s=t[0];return s.preventDefault(),e==null?void 0:e.apply(this,t)}}function Ac(e=!1){const t=z,s=t.l.u;if(!s)return;let r=()=>rc(t.s);if(e){let a=0,i={};const v=Tr(()=>{let d=!1;const f=t.s;for(const p in f)f[p]!==i[p]&&(i[p]=f[p],d=!0);return d&&a++,a});r=()=>n(v)}s.b.length&&Bo(()=>{oa(t,r),lr(s.b)}),hr(()=>{const a=b(()=>s.m.map(Jl));return()=>{for(const i of a)typeof i=="function"&&i()}}),s.a.length&&hr(()=>{oa(t,r),lr(s.a)})}function oa(e,t){if(e.l.s)for(const s of e.l.s)n(s);t()}function Rc(e){z===null&&_a(),ws&&z.l!==null?Nc(z).m.push(e):hr(()=>{const t=b(e);if(typeof t=="function")return t})}function Cc(e){z===null&&_a(),Rc(()=>()=>b(e))}function Nc(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const Mc="5";var fa;typeof window<"u"&&((fa=window.__svelte??(window.__svelte={})).v??(fa.v=new Set)).add(Mc);mo();var Dc=W('<div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Watch issue</span><strong class="status-warn svelte-d3ct2b"> </strong></div>'),Ic=W('<section class="notice svelte-d3ct2b"> </section>'),Oc=W('<section class="notice danger svelte-d3ct2b"> </section>'),Fc=W('<p class="terminal-line svelte-d3ct2b"><time class="svelte-d3ct2b">--:--:--</time><span class="sys svelte-d3ct2b">SYS</span><strong class="svelte-d3ct2b">Waiting for memory-core watch output...</strong></p>'),Lc=W('<strong class="svelte-d3ct2b"> </strong>'),Pc=W('<strong class="svelte-d3ct2b"> </strong>'),jc=W('<strong class="svelte-d3ct2b"> </strong>'),$c=W('<strong class="svelte-d3ct2b"> </strong>'),Wc=W('<strong class="svelte-d3ct2b"> </strong>'),qc=W('<p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Why:</b> </p>'),Uc=W('<p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Issue:</b> </p>'),Vc=W('<p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Fix:</b> </p>'),zc=W('<pre class="svelte-d3ct2b"> </pre>'),Hc=W('<div class="terminal-detail svelte-d3ct2b"><p class="svelte-d3ct2b"> </p> <p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Rule:</b> </p> <!> <!> <!> <!></div>'),Bc=W('<section><p class="terminal-line svelte-d3ct2b"><time class="svelte-d3ct2b"> </time> <span class="svelte-d3ct2b"> </span> <!></p> <!></section>'),Kc=W('<div class="metric-row svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b"> </span> <strong class="svelte-d3ct2b"> </strong></div> <i class="svelte-d3ct2b"></i></div>'),Yc=W('<p class="empty svelte-d3ct2b">No rule counters yet.</p>'),Gc=W('<div class="metric-row warning svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b"> </span> <strong class="svelte-d3ct2b"> </strong></div> <i class="svelte-d3ct2b"></i></div>'),Jc=W('<p class="empty svelte-d3ct2b">No file counters yet.</p>'),Qc=W('<small class="svelte-d3ct2b"> </small>'),Xc=W('<small class="svelte-d3ct2b"> </small>'),Zc=W('<section class="commit-item svelte-d3ct2b"><div class="commit-meta svelte-d3ct2b"><span> </span> <time> </time></div> <strong class="svelte-d3ct2b"> </strong> <p class="svelte-d3ct2b"> </p> <!> <!></section>'),ef=W('<p class="empty svelte-d3ct2b">No commit hook violations recorded yet.</p>'),tf=W('<small class="svelte-d3ct2b"> </small>'),sf=W('<div class="rule-item svelte-d3ct2b"><div><div class="rule-meta svelte-d3ct2b"><span class="svelte-d3ct2b"> </span> <code class="svelte-d3ct2b"> </code></div> <p class="svelte-d3ct2b"> </p> <!></div> <button class="svelte-d3ct2b">Delete</button></div>'),rf=W('<p class="empty svelte-d3ct2b">No rules match the current filters.</p>'),nf=W('<div class="command-center svelte-d3ct2b"><aside class="sidebar svelte-d3ct2b"><div class="brand svelte-d3ct2b"><h1 class="svelte-d3ct2b">memory-core</h1> <span class="svelte-d3ct2b">command center</span></div> <nav aria-label="Dashboard navigation" class="svelte-d3ct2b"><a class="nav-item active svelte-d3ct2b" href="/"><span class="nav-icon svelte-d3ct2b">[]</span> <span>Command Center</span></a></nav> <div class="sidebar-footer svelte-d3ct2b"><div><i class="svelte-d3ct2b"></i> </div> <small class="svelte-d3ct2b"> </small></div></aside> <div class="workspace svelte-d3ct2b"><header class="topbar svelte-d3ct2b"><div class="topbar-left svelte-d3ct2b"><button class="icon-button mobile-menu svelte-d3ct2b" aria-label="Menu">=</button> <div><i class="svelte-d3ct2b"></i> <span> </span></div></div> <div class="header-metrics svelte-d3ct2b" aria-label="Global metrics"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Violations</span> <strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Files</span> <strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Rules</span> <strong class="svelte-d3ct2b"> </strong></div></div> <div class="top-actions svelte-d3ct2b" aria-label="Status shortcuts"><button class="icon-button svelte-d3ct2b" title="Warnings" aria-label="Warnings">!</button> <button class="icon-button svelte-d3ct2b" title="Rules" aria-label="Rules">R</button> <button class="icon-button svelte-d3ct2b" title="Database" aria-label="Database">DB</button> <button class="icon-button svelte-d3ct2b" title="Network" aria-label="Network">LAN</button></div></header> <main class="canvas svelte-d3ct2b"><section class="status-grid svelte-d3ct2b"><article class="glass-panel status-card svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Project</h2> <span class="svelte-d3ct2b"> </span></div> <div class="data-list svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Name</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Type</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Language</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Architecture</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Watcher</span><strong class="svelte-d3ct2b"> </strong></div> <!></div></article> <article class="glass-panel status-card svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Runtime</h2> <span class="svelte-d3ct2b"> </span></div> <div class="data-list svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Provider</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Check model</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Check status</span> <strong><!></strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Embedding</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Ollama URL</span><strong class="svelte-d3ct2b"> </strong></div></div></article> <article class="glass-panel status-card svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">PostgreSQL</h2> <span> </span></div> <div class="data-list svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Database</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">User</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Host</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">URL</span><strong class="svelte-d3ct2b"> </strong></div></div></article></section> <!> <!> <section class="terminal-panel glass-panel svelte-d3ct2b"><div class="terminal-head svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="terminal-icon svelte-d3ct2b">>_</span> <h2 class="svelte-d3ct2b">Live Feed</h2></div> <div class="window-dots svelte-d3ct2b" aria-hidden="true"><i class="svelte-d3ct2b"></i><i class="svelte-d3ct2b"></i><i class="svelte-d3ct2b"></i></div></div> <div class="terminal-body svelte-d3ct2b"><!> <!></div></section> <section class="content-grid svelte-d3ct2b"><article class="glass-panel stats-panel svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Stats</h2> <span class="svelte-d3ct2b">Recorded</span></div> <div class="stat-block svelte-d3ct2b"><h3 class="svelte-d3ct2b">Most Violated Rules</h3> <!></div> <div class="stat-block svelte-d3ct2b"><h3 class="svelte-d3ct2b">Problem Files</h3> <!></div> <div class="summary-strip svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Clean</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Issues</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Events</span><strong class="svelte-d3ct2b"> </strong></div></div></article> <article class="glass-panel commit-watch svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Commit Watch</h2> <span class="svelte-d3ct2b"> </span></div> <div class="commit-list svelte-d3ct2b"></div></article> <article class="glass-panel rule-engine svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Rule Engine</h2> <span class="svelte-d3ct2b"> </span></div> <form class="rule-form svelte-d3ct2b"><div class="control-grid svelte-d3ct2b"><select class="svelte-d3ct2b"><option>Rule</option><option>Decision</option><option>Pattern</option><option>Ignore</option></select> <select class="svelte-d3ct2b"><option>Project</option><option>Global</option></select></div> <textarea rows="3" placeholder="Rule or decision" class="svelte-d3ct2b"></textarea> <div class="control-grid svelte-d3ct2b"><input placeholder="Reason" class="svelte-d3ct2b"/> <input placeholder="Tags" class="svelte-d3ct2b"/></div> <button class="svelte-d3ct2b"> </button></form> <div class="control-grid filters svelte-d3ct2b"><select class="svelte-d3ct2b"><option>All types</option><option>Rules</option><option>Decisions</option><option>Patterns</option><option>Ignores</option></select> <input placeholder="Search rules..." class="svelte-d3ct2b"/></div> <div class="rule-list svelte-d3ct2b"></div></article></section></main></div></div>');function af(e,t){ya(t,!1);const s=Y(),r=Y(),a=Y(),i=Y(),v=Y(),d=Y(),f=Y(),p=Y(),g=Y(),x=Y(),w=Y(),E=Y(),m=Y();let u=Y({config:null,stats:{rules:{},files:{},topRules:[],topFiles:[]},files:[],memories:[]}),y=Y([]),R=Y(!1),j=Y("all"),L=Y(""),Z=Y(!1),te=Y(""),_e,se=!1,$=Y({type:"rule",scope:"project",content:"",reason:"",tags:"dashboard"});const rt=()=>{var l;return((l=n(u).runtime)==null?void 0:l.project.name)??"memory-core"},fe=()=>{var A,C;const l=((A=n(u).runtime)==null?void 0:A.project.declaredArchitectures)??[],c=((C=n(u).runtime)==null?void 0:C.project.activeArchitectures)??[];return l.length>0?l.join(", "):c.length>0?c.join(", "):"none"};function nt(l){M(y,[{...l,id:crypto.randomUUID()},...n(y)].slice(0,80))}function pt(l){return l.type==="saved"?{type:"saved",timestamp:l.timestamp,file:l.file}:l.type==="clean"?{type:"clean",timestamp:l.timestamp,file:l.file}:l.type==="skipped"?{type:"skipped",timestamp:l.timestamp,file:l.file,reason:l.reason}:l.type==="violations"?{type:"violations",timestamp:l.timestamp,file:l.file,violations:l.violations}:l.type==="error"?{type:"error",timestamp:l.timestamp,message:l.message}:l.type==="ready"?{type:"system",timestamp:l.timestamp,message:`Watching ${l.path} | ${l.rules} rules | ${l.model}`}:{type:"system",timestamp:l.timestamp,message:"Watch stopped"}}function _t(l){const c=n(u).files??[],A=c.findIndex(H=>H.file===l.file),C=c.slice();return A===-1?C.push(l):C[A]=l,C.sort((H,ie)=>ie.lastSeen.localeCompare(H.lastSeen))}function ks(l){const c=n(u).watcher??{enabled:!0,running:!1,path:void 0,model:void 0,rules:void 0,lastEventAt:void 0,error:void 0};let A=n(u).files,C={...c,lastEventAt:l.timestamp,enabled:!0};l.type==="ready"&&(C={...C,running:!0,error:void 0,path:l.path,model:l.model,rules:l.rules}),l.type==="saved"&&(A=_t({file:l.file,status:"checking",lastSeen:l.timestamp,violations:[]})),l.type==="clean"&&(A=_t({file:l.file,status:"clean",lastSeen:l.timestamp,violations:[]})),l.type==="skipped"&&(A=_t({file:l.file,status:"skipped",lastSeen:l.timestamp,violations:[],message:l.reason})),l.type==="violations"&&(A=_t({file:l.file,status:"violations",lastSeen:l.timestamp,violations:l.violations})),l.type==="error"&&(C={...C,running:!1,error:l.message}),l.type==="stopped"&&(C={...C,running:!1});const H=[l,...n(u).events??[]].slice(0,100);M(u,{...n(u),files:A,events:H,watcher:C})}function Xt(l=[]){M(y,l.map(pt).map(c=>({...c,id:crypto.randomUUID()})).reverse().slice(0,80))}function Zt(l){return new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(l))}function es(l){return Math.max(1,...l.map(c=>c.count))}function ts(l,c){const A=l.file||c;return l.line?`${A}:${l.line}`:A}function Oe(l){return l.type==="saved"?"SAVE":l.type==="clean"?"OK":l.type==="skipped"?"SKIP":l.type==="violations"?"FAIL":l.type==="error"?"WARN":"SYS"}async function Ot(){const l=await fetch("/api/snapshot");M(u,await l.json()),Xt(n(u).events)}async function ei(){if(!se&&document.visibilityState!=="hidden"){se=!0;try{const l=await fetch("/api/stats",{cache:"no-store"});if(!l.ok)return;const c=await l.json();if(!c.stats)return;M(u,{...n(u),stats:c.stats})}catch{}finally{se=!1}}}function ti(){_e&&clearInterval(_e),_e=setInterval(()=>{ei()},2e3)}function Lr(){const l=location.protocol==="https:"?"wss:":"ws:",c=new WebSocket(`${l}//${location.host}/ws`);c.addEventListener("open",()=>{M(R,!0),nt({type:"system",timestamp:new Date().toISOString(),message:"Dashboard connected"})}),c.addEventListener("close",()=>{M(R,!1),nt({type:"error",timestamp:new Date().toISOString(),message:"Dashboard disconnected"}),setTimeout(Lr,1500)}),c.addEventListener("message",A=>{const C=JSON.parse(A.data);if(C.type==="snapshot"){M(u,C.snapshot),n(y).length===0&&Xt(n(u).events);return}C.type==="watch"&&(ks(C.event),nt(pt(C.event)))})}async function si(){if(n($).content.trim()){M(Z,!0),M(te,"");try{const l=await fetch("/api/memories",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n($))});if(!l.ok)throw new Error((await l.json()).error??"Save failed");M($,{type:"rule",scope:"project",content:"",reason:"",tags:"dashboard"}),await Ot()}catch(l){M(te,l.message)}finally{M(Z,!1)}}}async function ri(l){M(te,"");const c=await fetch(`/api/memories/${l}`,{method:"DELETE"});if(!c.ok){M(te,(await c.json()).error??"Delete failed");return}await Ot()}Ot().catch(l=>{M(te,l.message)}),Lr(),ti(),Cc(()=>{_e&&(clearInterval(_e),_e=void 0)}),be(()=>(n(u),n(j),n(L)),()=>{M(s,n(u).memories.filter(l=>{const c=n(j)==="all"||l.type===n(j),A=`${l.type} ${l.scope} ${l.content} ${l.reason??""} ${l.tags.join(" ")}`.toLowerCase();return c&&A.includes(n(L).toLowerCase())}))}),be(()=>n(u),()=>{M(r,n(u).files.reduce((l,c)=>l+c.violations.length,0))}),be(()=>n(u),()=>{M(a,n(u).files.filter(l=>l.status==="clean").length)}),be(()=>n(u),()=>{M(i,n(u).files.filter(l=>l.status==="violations").length)}),be(()=>n(u),()=>{M(v,Object.values(n(u).stats.rules).reduce((l,c)=>l+c,0))}),be(()=>n(u),()=>{M(d,n(u).stats.recentViolations??[])}),be(()=>n(d),()=>{M(f,n(d).filter(l=>l.source==="hook"||l.source==="ci"))}),be(()=>(n(r),n(f)),()=>{M(p,n(r)+n(f).length)}),be(()=>(n(u),n(f)),()=>{M(g,new Set([...n(u).files.map(l=>l.file),...n(f).map(l=>l.file).filter(Boolean)]).size)}),be(()=>n(u),()=>{M(x,n(u).memories.filter(l=>["rule","pattern","decision"].includes(l.type)).length)}),be(()=>n(u),()=>{var l;M(w,((l=n(u).memoryCount)==null?void 0:l.total)??n(u).memories.length)}),be(()=>n(u),()=>{var l;M(E,((l=n(u).memoryCount)==null?void 0:l.relevant)??n(u).memories.length)}),be(()=>(n(R),n(u)),()=>{var l,c;M(m,n(R)?((l=n(u).watcher)==null?void 0:l.enabled)===!1?{live:!1,label:"Watch off"}:(c=n(u).watcher)!=null&&c.running?{live:!0,label:"Watcher live"}:{live:!1,label:"Watcher idle"}:{live:!1,label:"Disconnected"})}),Go(),Ac();var Pr=nf(),jr=_(Pr),ni=h(_(jr),4),Vs=_(ni);let $r;var ai=h(_(Vs)),ii=h(Vs,2),li=_(ii),oi=h(jr,2),Wr=_(oi),qr=_(Wr),Ur=h(_(qr),2);let Vr;var ci=h(_(Ur),2),fi=_(ci),ui=h(qr,2),zr=_(ui),vi=h(_(zr),2),di=_(vi),Hr=h(zr,2),pi=h(_(Hr),2),_i=_(pi),hi=h(Hr,2),gi=h(_(hi),2),bi=_(gi),mi=h(Wr,2),Br=_(mi),Kr=_(Br),Yr=_(Kr),yi=h(_(Yr),2),wi=_(yi),Ei=h(Yr,2),Gr=_(Ei),xi=h(_(Gr)),ki=_(xi),Jr=h(Gr,2),Si=h(_(Jr)),Ti=_(Si),Qr=h(Jr,2),Ai=h(_(Qr)),Ri=_(Ai),Xr=h(Qr,2),Ci=h(_(Xr)),Ni=_(Ci),Zr=h(Xr,2),Mi=h(_(Zr)),Di=_(Mi),Ii=h(Zr,2);{var Oi=l=>{var c=Dc(),A=h(_(c)),C=_(A);V(()=>k(C,(n(u),b(()=>n(u).watcher.error)))),F(l,c)};ue(Ii,l=>{n(u),b(()=>{var c;return(c=n(u).watcher)==null?void 0:c.error})&&l(Oi)})}var en=h(Kr,2),tn=_(en),Fi=h(_(tn),2),Li=_(Fi),Pi=h(tn,2),sn=_(Pi),ji=h(_(sn)),$i=_(ji),rn=h(sn,2),Wi=h(_(rn)),qi=_(Wi),nn=h(rn,2),an=h(_(nn),2);let ln;var Ui=_(an);{var Vi=l=>{var c=ra();V(()=>k(c,(n(u),b(()=>{var A;return(A=n(u).runtime)!=null&&A.model.checkModelInstalled?"installed":"missing"})))),F(l,c)},zi=l=>{var c=ra();V(()=>k(c,(n(u),b(()=>{var A;return(A=n(u).runtime)!=null&&A.model.apiKeyConfigured?"api key set":"api key missing"})))),F(l,c)};ue(Ui,l=>{n(u),b(()=>{var c;return((c=n(u).runtime)==null?void 0:c.model.provider)==="ollama"})?l(Vi):l(zi,-1)})}var on=h(nn,2),Hi=h(_(on)),Bi=_(Hi),Ki=h(on,2),Yi=h(_(Ki)),Gi=_(Yi),Ji=h(en,2),cn=_(Ji),fn=h(_(cn),2);let un;var Qi=_(fn),Xi=h(cn,2),vn=_(Xi),Zi=h(_(vn)),el=_(Zi),dn=h(vn,2),tl=h(_(dn)),sl=_(tl),pn=h(dn,2),rl=h(_(pn)),nl=_(rl),al=h(pn,2),il=h(_(al)),ll=_(il),_n=h(Br,2);{var ol=l=>{var c=Ic(),A=_(c);V(()=>k(A,(n(u),b(()=>n(u).dbError)))),F(l,c)};ue(_n,l=>{n(u),b(()=>n(u).dbError)&&l(ol)})}var hn=h(_n,2);{var cl=l=>{var c=Oc(),A=_(c);V(()=>k(A,n(te))),F(l,c)};ue(hn,l=>{n(te)&&l(cl)})}var gn=h(hn,2),fl=h(_(gn),2),bn=_(fl);{var ul=l=>{var c=Fc();F(l,c)};ue(bn,l=>{n(y),b(()=>n(y).length===0)&&l(ul)})}var vl=h(bn,2);jt(vl,1,()=>(n(y),b(()=>[...n(y)].reverse())),l=>l.id,(l,c)=>{var A=Bc();let C;var H=_(A),ie=_(H),xe=_(ie),he=h(ie,2),S=_(he),q=h(he,2);{var Ge=P=>{var B=Lc(),Fe=_(B);V(()=>k(Fe,(n(c),b(()=>n(c).message)))),F(P,B)},ss=P=>{var B=Pc(),Fe=_(B);V(()=>k(Fe,`saved: ${n(c),b(()=>n(c).file)??""}`)),F(P,B)},Ft=P=>{var B=jc(),Fe=_(B);V(()=>k(Fe,`${n(c),b(()=>n(c).file)??""} - no violations`)),F(P,B)},Lt=P=>{var B=$c(),Fe=_(B);V(()=>k(Fe,`${n(c),b(()=>n(c).file)??""} - skipped: ${n(c),b(()=>n(c).reason)??""}`)),F(P,B)},Je=P=>{var B=Wc(),Fe=_(B);V(()=>k(Fe,`${n(c),b(()=>n(c).violations.length)??""} violation${n(c),b(()=>n(c).violations.length===1?"":"s")??""} in ${n(c),b(()=>n(c).file)??""}`)),F(P,B)};ue(q,P=>{n(c),b(()=>n(c).type==="system"||n(c).type==="error")?P(Ge):(n(c),b(()=>n(c).type==="saved")?P(ss,1):(n(c),b(()=>n(c).type==="clean")?P(Ft,2):(n(c),b(()=>n(c).type==="skipped")?P(Lt,3):P(Je,-1))))})}var Pt=h(H,2);{var ge=P=>{var B=fc(),Fe=qo(B);jt(Fe,3,()=>(n(c),b(()=>n(c).violations)),(Pn,K)=>`${n(c).id}-${K}`,(Pn,K,Ol)=>{var jn=Hc(),$n=_(jn),Fl=_($n),Wn=h($n,2),Ll=h(_(Wn)),qn=h(Wn,2);{var Pl=re=>{var Le=qc(),ht=h(_(Le));V(()=>k(ht,` ${n(K),b(()=>n(K).reason)??""}`)),F(re,Le)};ue(qn,re=>{n(K),b(()=>n(K).reason)&&re(Pl)})}var Un=h(qn,2);{var jl=re=>{var Le=Uc(),ht=h(_(Le));V(()=>k(ht,` ${n(K),b(()=>n(K).issue)??""}`)),F(re,Le)};ue(Un,re=>{n(K),b(()=>n(K).issue)&&re(jl)})}var Vn=h(Un,2);{var $l=re=>{var Le=Vc(),ht=h(_(Le));V(()=>k(ht,` ${n(K),b(()=>n(K).suggestion)??""}`)),F(re,Le)};ue(Vn,re=>{n(K),b(()=>n(K).suggestion)&&re($l)})}var Wl=h(Vn,2);{var ql=re=>{var Le=zc(),ht=_(Le);V(()=>k(ht,(n(K),b(()=>n(K).code)))),F(re,Le)};ue(Wl,re=>{n(K),b(()=>n(K).code)&&re(ql)})}V(re=>{k(Fl,`[${n(Ol)+1}] ${re??""}`),k(Ll,` ${n(K),b(()=>n(K).rule)??""}`)},[()=>(n(K),n(c),b(()=>ts(n(K),n(c).file)))]),F(Pn,jn)}),F(P,B)};ue(Pt,P=>{n(c),b(()=>n(c).type==="violations")&&P(ge)})}V((P,B)=>{C=as(A,1,"svelte-d3ct2b",null,C,{"error-line":n(c).type==="error","ok-line":n(c).type==="clean","violation-line":n(c).type==="violations"}),k(xe,P),k(S,B)},[()=>(n(c),b(()=>Zt(n(c).timestamp))),()=>(n(c),b(()=>Oe(n(c))))]),F(l,A)});var dl=h(gn,2),mn=_(dl),yn=h(_(mn),2),pl=h(_(yn),2);jt(pl,1,()=>(n(u),b(()=>n(u).stats.topRules.slice(0,5))),l=>l.name,(l,c)=>{var A=Kc(),C=_(A),H=_(C),ie=_(H),xe=h(H,2),he=_(xe),S=h(C,2);V(q=>{k(ie,(n(c),b(()=>n(c).name))),k(he,(n(c),b(()=>n(c).count))),ia(S,q)},[()=>(n(c),n(u),b(()=>`width: ${n(c).count/es(n(u).stats.topRules)*100}%`))]),F(l,A)},l=>{var c=Yc();F(l,c)});var wn=h(yn,2),_l=h(_(wn),2);jt(_l,1,()=>(n(u),b(()=>n(u).stats.topFiles.slice(0,5))),l=>l.name,(l,c)=>{var A=Gc(),C=_(A),H=_(C),ie=_(H),xe=h(H,2),he=_(xe),S=h(C,2);V(q=>{k(ie,(n(c),b(()=>n(c).name))),k(he,(n(c),b(()=>n(c).count))),ia(S,q)},[()=>(n(c),n(u),b(()=>`width: ${n(c).count/es(n(u).stats.topFiles)*100}%`))]),F(l,A)},l=>{var c=Jc();F(l,c)});var hl=h(wn,2),En=_(hl),gl=h(_(En)),bl=_(gl),xn=h(En,2),ml=h(_(xn)),yl=_(ml),wl=h(xn,2),El=h(_(wl)),xl=_(El),kn=h(mn,2),Sn=_(kn),kl=h(_(Sn),2),Sl=_(kl),Tl=h(Sn,2);jt(Tl,7,()=>(n(f),b(()=>n(f).slice(0,8))),(l,c)=>`${l.timestamp}-${c}`,(l,c)=>{var A=Zc(),C=_(A),H=_(C),ie=_(H),xe=h(H,2),he=_(xe),S=h(C,2),q=_(S),Ge=h(S,2),ss=_(Ge),Ft=h(Ge,2);{var Lt=ge=>{var P=Qc(),B=_(P);V(()=>k(B,(n(c),b(()=>n(c).issue)))),F(ge,P)};ue(Ft,ge=>{n(c),b(()=>n(c).issue)&&ge(Lt)})}var Je=h(Ft,2);{var Pt=ge=>{var P=Xc(),B=_(P);V(()=>k(B,(n(c),b(()=>n(c).suggestion)))),F(ge,P)};ue(Je,ge=>{n(c),b(()=>n(c).suggestion)&&ge(Pt)})}V((ge,P)=>{k(ie,(n(c),b(()=>n(c).source==="ci"?"CI":"Hook"))),k(he,ge),k(q,(n(c),b(()=>n(c).rule))),k(ss,P)},[()=>(n(c),b(()=>Zt(n(c).timestamp))),()=>(n(c),b(()=>ts(n(c),n(c).file||"staged diff")))]),F(l,A)},l=>{var c=ef();F(l,c)});var Al=h(kn,2),Tn=_(Al),Rl=h(_(Tn),2),Cl=_(Rl),zs=h(Tn,2),An=_(zs),Hs=_(An),Bs=_(Hs);Bs.value=Bs.__value="rule";var Ks=h(Bs);Ks.value=Ks.__value="decision";var Ys=h(Ks);Ys.value=Ys.__value="pattern";var Rn=h(Ys);Rn.value=Rn.__value="ignore";var Cn=h(Hs,2),Gs=_(Cn);Gs.value=Gs.__value="project";var Nn=h(Gs);Nn.value=Nn.__value="global";var Mn=h(An,2),Dn=h(Mn,2),In=_(Dn),Nl=h(In,2),On=h(Dn,2),Ml=_(On),Fn=h(zs,2),Js=_(Fn),Qs=_(Js);Qs.value=Qs.__value="all";var Xs=h(Qs);Xs.value=Xs.__value="rule";var Zs=h(Xs);Zs.value=Zs.__value="decision";var er=h(Zs);er.value=er.__value="pattern";var Ln=h(er);Ln.value=Ln.__value="ignore";var Dl=h(Js,2),Il=h(Fn,2);jt(Il,5,()=>n(s),l=>l.id,(l,c)=>{var A=sf(),C=_(A),H=_(C),ie=_(H),xe=_(ie),he=h(ie,2),S=_(he),q=h(H,2),Ge=_(q),ss=h(q,2);{var Ft=Je=>{var Pt=tf(),ge=_(Pt);V(()=>k(ge,(n(c),b(()=>n(c).reason)))),F(Je,Pt)};ue(ss,Je=>{n(c),b(()=>n(c).reason)&&Je(Ft)})}var Lt=h(C,2);V(Je=>{k(xe,(n(c),b(()=>n(c).scope))),k(S,`Rule-${Je??""}`),k(Ge,(n(c),b(()=>n(c).content))),xc(Lt,"aria-label",(n(c),b(()=>`Delete ${n(c).id}`)))},[()=>(n(c),b(()=>String(n(c).id).padStart(3,"0")))]),ta("click",Lt,()=>ri(n(c).id)),F(l,A)},l=>{var c=rf();F(l,c)}),V((l,c,A)=>{var C,H,ie,xe,he;$r=as(Vs,1,"status-chip svelte-d3ct2b",null,$r,{live:n(m).live}),k(ai,` ${n(m),b(()=>n(m).label)??""}`),k(li,(n(u),b(()=>{var S;return((S=n(u).runtime)==null?void 0:S.model.label)??"runtime pending"}))),Vr=as(Ur,1,"live-label svelte-d3ct2b",null,Vr,{live:n(m).live}),k(fi,(n(m),b(()=>n(m).label))),k(di,n(p)),k(_i,n(g)),k(bi,n(x)),k(wi,(n(u),b(()=>{var S;return(S=n(u).runtime)!=null&&S.project.initialized?"Initialized":"Not initialized"}))),k(ki,l),k(Ti,(n(u),b(()=>{var S;return((S=n(u).runtime)==null?void 0:S.project.type)??"unknown"}))),k(Ri,(n(u),b(()=>{var S;return((S=n(u).runtime)==null?void 0:S.project.language)??"unknown"}))),k(Ni,c),k(Di,(n(u),b(()=>{var S,q;return((S=n(u).watcher)==null?void 0:S.enabled)===!1?"disabled":(q=n(u).watcher)!=null&&q.running?"running":"idle"}))),k(Li,(n(u),b(()=>{var S;return((S=n(u).runtime)==null?void 0:S.model.label)??"pending"}))),k($i,(n(u),b(()=>{var S;return((S=n(u).runtime)==null?void 0:S.model.provider)??"unknown"}))),k(qi,(n(u),b(()=>{var S,q,Ge;return((S=n(u).runtime)==null?void 0:S.model.checkModelResolved)??((q=n(u).runtime)==null?void 0:q.model.checkModel)??((Ge=n(u).runtime)==null?void 0:Ge.model.chatModel)??"unknown"}))),ln=as(an,1,"svelte-d3ct2b",null,ln,{"status-ok":((C=n(u).runtime)==null?void 0:C.model.checkModelInstalled)||((H=n(u).runtime)==null?void 0:H.model.apiKeyConfigured),"status-warn":((ie=n(u).runtime)==null?void 0:ie.model.checkModelInstalled)===!1||((xe=n(u).runtime)==null?void 0:xe.model.error)}),k(Bi,(n(u),b(()=>{var S,q;return((S=n(u).runtime)==null?void 0:S.model.embeddingModelResolved)??((q=n(u).runtime)==null?void 0:q.model.embeddingModel)??"unknown"}))),k(Gi,(n(u),b(()=>{var S;return((S=n(u).runtime)==null?void 0:S.model.ollamaUrl)??"unknown"}))),un=as(fn,1,"svelte-d3ct2b",null,un,{success:(he=n(u).runtime)==null?void 0:he.postgres.connected}),k(Qi,(n(u),b(()=>{var S;return(S=n(u).runtime)!=null&&S.postgres.connected?"Connected":"Not connected"}))),k(el,(n(u),b(()=>{var S,q;return((S=n(u).runtime)==null?void 0:S.postgres.serverDatabase)??((q=n(u).runtime)==null?void 0:q.postgres.database)??"unknown"}))),k(sl,(n(u),b(()=>{var S,q;return((S=n(u).runtime)==null?void 0:S.postgres.serverUser)??((q=n(u).runtime)==null?void 0:q.postgres.user)??"unknown"}))),k(nl,`${n(u),b(()=>{var S;return((S=n(u).runtime)==null?void 0:S.postgres.host)??"unknown"})??""}${n(u),b(()=>{var S;return(S=n(u).runtime)!=null&&S.postgres.port?`:${n(u).runtime.postgres.port}`:""})??""}`),k(ll,(n(u),b(()=>{var S;return((S=n(u).runtime)==null?void 0:S.postgres.url)??"(not set)"}))),k(bl,n(a)),k(yl,n(p)),k(xl,n(v)),k(Sl,`${n(f),b(()=>n(f).length)??""} recent`),k(Cl,`${n(x)??""} rules active`),On.disabled=A,k(Ml,n(Z)?"Saving...":"Add New Architecture Rule")},[()=>b(rt),()=>b(fe),()=>(n(Z),n($),b(()=>n(Z)||!n($).content.trim()))]),nr(Hs,()=>n($).type,l=>rs($,n($).type=l)),nr(Cn,()=>n($).scope,l=>rs($,n($).scope=l)),As(Mn,()=>n($).content,l=>rs($,n($).content=l)),As(In,()=>n($).reason,l=>rs($,n($).reason=l)),As(Nl,()=>n($).tags,l=>rs($,n($).tags=l)),ta("submit",zs,Tc(si)),nr(Js,()=>n(j),l=>M(j,l)),As(Dl,()=>n(L),l=>M(L,l)),F(e,Pr),wa()}uc(af,{target:document.getElementById("app")});
|